|
|
@ -122,6 +122,7 @@ |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.ticketsId)">修改</el-button> |
|
|
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.ticketsId)">删除</el-button> |
|
|
|
<el-button type="text" size="small" @click="startFlowHandle(scope.row.ticketsId)">指派</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
@ -136,6 +137,48 @@ |
|
|
|
</el-pagination> |
|
|
|
<!-- 弹窗, 新增 / 修改 --> |
|
|
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :dictData="dictData" @refreshDataList="getDataList"></add-or-update> |
|
|
|
<el-dialog |
|
|
|
title="发起流程" |
|
|
|
:visible.sync="dialogFormVisible" |
|
|
|
width="30%"> |
|
|
|
<el-form :model="flowForm" label-width="100px" class="demo-dynamic"> |
|
|
|
<el-form-item |
|
|
|
v-for="(form) in dynamiForm" |
|
|
|
:label="form.name" |
|
|
|
:key="form.key" |
|
|
|
:prop="form.key" |
|
|
|
> |
|
|
|
<el-select v-if="form.type == 'assignee'" v-model="flowForm[form.key]" placeholder="请选择"> |
|
|
|
<el-option |
|
|
|
v-for="item in users" |
|
|
|
:key="item.userId" |
|
|
|
:label="item.nickname+'['+item.username+']'" |
|
|
|
:value="item.userId"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
<el-select v-if="form.type == 'candidateUsers'" v-model="flowForm[form.key]" placeholder="请选择"> |
|
|
|
<el-option |
|
|
|
v-for="item in users" |
|
|
|
:key="item.userId" |
|
|
|
:label="item.nickname+'['+item.username+']'" |
|
|
|
:value="item.userId"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
<el-select v-if="form.type == 'candidateGroups'" v-model="flowForm[form.key]" placeholder="请选择"> |
|
|
|
<el-option |
|
|
|
v-for="item in roles" |
|
|
|
:key="item.roleId" |
|
|
|
:label="item.roleName" |
|
|
|
:value="item.roleId"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button size="mini" @click="dialogFormVisible = false">取消</el-button> |
|
|
|
<el-button size="mini" type="primary" @click="submitStartFlow()">提交</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
@ -156,7 +199,12 @@ |
|
|
|
dataListSelections: [], |
|
|
|
addOrUpdateVisible: false, |
|
|
|
dictConfigs: [{url: '/car/car/list', type: 'list', value: 'carId', label: 'carName'}, {type: 'dict', code: 'error_type'}, {url: '/flow/contract/list', type: 'list', value: 'contractId', label: 'contractNumber'}, {url: '/client/client/list', type: 'list', value: 'clientId', label: 'clientName'}], |
|
|
|
dictData: [] |
|
|
|
dictData: [], |
|
|
|
dialogFormVisible: false, |
|
|
|
flowForm:{id: 'Process_1:2:05cb9af4-03a2-11f0-8846-e40d36456f42', ticketsId: null}, |
|
|
|
dynamiForm:[], |
|
|
|
users: [], |
|
|
|
roles: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
mixins: [apiUtils], |
|
|
@ -240,6 +288,44 @@ |
|
|
|
} |
|
|
|
}) |
|
|
|
}).catch(() => {}) |
|
|
|
}, |
|
|
|
startFlowHandle(id){ |
|
|
|
this.flowForm = {} |
|
|
|
this.flowForm.ticketsId = id |
|
|
|
this.$http({ |
|
|
|
url: this.$http.adornUrl(`/flow/deploy/flowDef/${id}`), |
|
|
|
method: 'get', |
|
|
|
params: this.$http.adornParams() |
|
|
|
}).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.dynamiForm = [...data.data] |
|
|
|
this.users = [...data.users] |
|
|
|
this.roles = [...data.roles] |
|
|
|
this.dialogFormVisible = true |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
submitStartFlow(){ |
|
|
|
// 提交表单数据 |
|
|
|
this.$http({ |
|
|
|
url: this.$http.adornUrl(`/flw/instance/startFlowInstance`), |
|
|
|
method: 'get', |
|
|
|
params: this.$http.adornParams(this.flowForm) |
|
|
|
}).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => { |
|
|
|
this.dialogFormVisible = false |
|
|
|
this.flowForm = {} |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|