|
|
@@ -12,12 +12,15 @@
|
|
|
/>
|
|
|
</div>
|
|
|
<div class="l-flex__fill l-flex c-sibling-item--v">
|
|
|
- <div class="c-sibling-item c-sidebar u-width--lg l-flex--col">
|
|
|
+ <div class="l-flex--col c-sibling-item c-sidebar u-width">
|
|
|
<schema-table :schema="deviceSchema" />
|
|
|
</div>
|
|
|
- <div class="l-flex__fill l-flex--col c-sibling-item far">
|
|
|
+ <div class="l-flex--col c-sidebar c-sibling-item far u-width--lg">
|
|
|
<schema-table :schema="timeSchema" />
|
|
|
</div>
|
|
|
+ <div class="l-flex__fill l-flex--col c-sibling-item far">
|
|
|
+ <schema-table :schema="historySchema" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<material-dialog ref="materialDialog" />
|
|
|
</template>
|
|
|
@@ -25,8 +28,12 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import {
|
|
|
+ State,
|
|
|
+ WorkflowStateInfo
|
|
|
+} from '@/constant'
|
|
|
import { parseDeploy } from '../utils'
|
|
|
-import { getWorkflowDetail } from '../api'
|
|
|
+import { getWorkflow } from '../api'
|
|
|
|
|
|
export default {
|
|
|
name: 'WorkflowDialog',
|
|
|
@@ -47,6 +54,9 @@ export default {
|
|
|
},
|
|
|
deviceSchema: {
|
|
|
nonPagination: true,
|
|
|
+ props: {
|
|
|
+ size: 'small'
|
|
|
+ },
|
|
|
list: this.getDevices,
|
|
|
cols: [
|
|
|
{ prop: 'deviceName', label: '上播设备' }
|
|
|
@@ -54,17 +64,43 @@ export default {
|
|
|
},
|
|
|
timeSchema: {
|
|
|
nonPagination: true,
|
|
|
+ props: {
|
|
|
+ size: 'small'
|
|
|
+ },
|
|
|
list: this.getTimes,
|
|
|
cols: [
|
|
|
{ prop: 'time', label: '上播时间' }
|
|
|
]
|
|
|
+ },
|
|
|
+ historySchema: {
|
|
|
+ nonPagination: true,
|
|
|
+ props: {
|
|
|
+ size: 'small'
|
|
|
+ },
|
|
|
+ list: this.getWorkflowHistory,
|
|
|
+ cols: [
|
|
|
+ { label: '节点', render: ({ severalReviewed }) => WorkflowStateInfo[severalReviewed], width: 60, align: 'center' },
|
|
|
+ { type: 'tag', render: ({ status, remark }) => status > State.READY
|
|
|
+ ? {
|
|
|
+ size: 'sm',
|
|
|
+ type: ['', 'primary', 'success', 'danger'][status],
|
|
|
+ label: ['', '待审核', '通过', '驳回'][status],
|
|
|
+ msg: remark
|
|
|
+ }
|
|
|
+ : null, width: 68 },
|
|
|
+ { prop: 'reviewedBy', label: '处理人', align: 'center' },
|
|
|
+ { prop: 'reviewedTime', label: '处理时间', width: 140, align: 'center' }
|
|
|
+ ]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
show (workflowId) {
|
|
|
- getWorkflowDetail(workflowId, { loading: true }).then(({ data }) => {
|
|
|
- this.workflow = parseDeploy(data)
|
|
|
+ getWorkflow(workflowId, { loading: true }).then(({ data }) => {
|
|
|
+ this.workflow = {
|
|
|
+ ...parseDeploy(data.businessData),
|
|
|
+ workflowNodeDtoList: data.workflowNodeDtoList
|
|
|
+ }
|
|
|
this.$refs.dialog.show()
|
|
|
})
|
|
|
},
|
|
|
@@ -77,6 +113,9 @@ export default {
|
|
|
getTimes () {
|
|
|
return Promise.resolve({ data: this.workflow.targetList })
|
|
|
},
|
|
|
+ getWorkflowHistory () {
|
|
|
+ return Promise.resolve({ data: this.workflow.workflowNodeDtoList })
|
|
|
+ },
|
|
|
onView ({ detail }) {
|
|
|
this.$refs.materialDialog.showPublishTarget(detail)
|
|
|
}
|