add 工作中心-流程配置
This commit is contained in:
@@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<div>
|
||||
<j-table
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:can-drag="true"
|
||||
rowKey="id"
|
||||
:pagination="false"
|
||||
:scroll="{x: '100%'}"
|
||||
:operation-list="operationList"
|
||||
:loading="loading"
|
||||
@change="handleTableChange"
|
||||
@operationClick="operationClick">
|
||||
</j-table>
|
||||
</div>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JTable from '../../../components/jero/JTable.vue'
|
||||
import { JeroListMixin } from '../../../mixins/JeroListMixin.js'
|
||||
import { deployWorkFlow } from '../../../api/workCenter.js'
|
||||
|
||||
export default {
|
||||
name: 'ProcessConfig',
|
||||
components: { JTable },
|
||||
mixins: [JeroListMixin],
|
||||
data () {
|
||||
return {
|
||||
columns: [
|
||||
// 序号
|
||||
{
|
||||
title: this.$t('serialNumber'),
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 60,
|
||||
align: 'center',
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
// 流程名称
|
||||
{
|
||||
dataIndex: 'name',
|
||||
title: this.$t('processName'),
|
||||
width: 250
|
||||
},
|
||||
// 流程类型
|
||||
{
|
||||
dataIndex: 'category',
|
||||
title: this.$t('workCenter.processConfig.processType'),
|
||||
width: 250
|
||||
},
|
||||
// 创建时间
|
||||
{
|
||||
dataIndex: 'createTime',
|
||||
title: this.$t('createTime'),
|
||||
width: 250
|
||||
},
|
||||
// 操作
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
fixed: 'right',
|
||||
width: 180,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: '/activitiModel/modelList'
|
||||
},
|
||||
operationList: [
|
||||
// 编辑流程图
|
||||
{
|
||||
text: this.$t('workCenter.processConfig.editFlowchart'),
|
||||
clickEvent: 'handleEditFlowchart',
|
||||
has: ''
|
||||
},
|
||||
// 编辑流程节点
|
||||
{
|
||||
text: this.$t('workCenter.processConfig.editFlowNode'),
|
||||
clickEvent: 'handleEditFlowNode',
|
||||
has: ''
|
||||
},
|
||||
// 部署
|
||||
{
|
||||
text: this.$t('workCenter.processConfig.deploy'),
|
||||
clickEvent: 'handleDeploy',
|
||||
has: ''
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 编辑流程图
|
||||
* @param id
|
||||
*/
|
||||
handleEditFlowchart ({ id }) {
|
||||
window.open(window._CONFIG.flowchartFixedAddress + id, '_blank')
|
||||
},
|
||||
/**
|
||||
* 部署
|
||||
* @param id
|
||||
*/
|
||||
handleDeploy ({ id }) {
|
||||
this.loading = true
|
||||
deployWorkFlow({ modelId: id }).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.modalFormOk()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user