|
|
@ -30,12 +30,12 @@ |
|
|
|
</el-select> |
|
|
|
<el-select |
|
|
|
v-model="listQuery.bglx" |
|
|
|
placeholder="请选择报告类型" |
|
|
|
placeholder="请选择流程模式" |
|
|
|
style="width: 200px" |
|
|
|
clearable |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in bglxList" |
|
|
|
v-for="item in modeList" |
|
|
|
:key="item.value" |
|
|
|
:label="item.name" |
|
|
|
:value="item.value" |
|
|
@ -64,10 +64,10 @@ |
|
|
|
<el-table-column type="selection" width="50" /> |
|
|
|
<el-table-column type="index" align="center" label="序号" width="50" /> |
|
|
|
<el-table-column |
|
|
|
:formatter="formatterBglx" |
|
|
|
:formatter="formatterMode" |
|
|
|
align="center" |
|
|
|
label="报告类型" |
|
|
|
prop="bglx" |
|
|
|
label="流程模式" |
|
|
|
prop="mode" |
|
|
|
width="100" |
|
|
|
/> |
|
|
|
<el-table-column align="center" label="归属部门" prop="departmentName" /> |
|
|
@ -93,7 +93,7 @@ |
|
|
|
<el-table-column align="center" label="环节处理人" prop="nickname" /> |
|
|
|
<el-table-column align="center" fixed="right" label="管理" width="150px"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-dropdown trigger="click"> |
|
|
|
<el-dropdown trigger="hover"> |
|
|
|
<el-button |
|
|
|
type="text" |
|
|
|
round |
|
|
@ -109,12 +109,12 @@ |
|
|
|
修改 |
|
|
|
</el-button> |
|
|
|
</el-dropdown-item> |
|
|
|
<el-dropdown-item v-for="link in linkList" :key="link.value"> |
|
|
|
<el-dropdown-item v-for="link in linkList" v-show="link.mode === scope.row.mode" :key="link.id"> |
|
|
|
<el-button |
|
|
|
type="text" |
|
|
|
@click="showUpdateMember(scope.$index, link.value, scope.row)" |
|
|
|
@click="showUpdateMember(scope.$index, link.id)" |
|
|
|
> |
|
|
|
{{ link.name }} |
|
|
|
{{ getLinkName(link) }} |
|
|
|
</el-button> |
|
|
|
</el-dropdown-item> |
|
|
|
</el-dropdown-menu> |
|
|
@ -202,10 +202,10 @@ |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="报告类型" required> |
|
|
|
<el-select v-model="formDefinition.bglx" clearable> |
|
|
|
<el-form-item label="流程模式" required> |
|
|
|
<el-select v-model="formDefinition.mode" clearable> |
|
|
|
<el-option |
|
|
|
v-for="item in bglxList" |
|
|
|
v-for="item in modeList" |
|
|
|
:key="item.value" |
|
|
|
:label="item.name" |
|
|
|
:value="item.value" |
|
|
@ -231,31 +231,32 @@ |
|
|
|
</el-dialog> |
|
|
|
<!-- 添加人员 --> |
|
|
|
<el-dialog |
|
|
|
:title="textMapMember[dialogStatus]" |
|
|
|
:title="memerTitle" |
|
|
|
:visible.sync="dialogFormMemberVisible" |
|
|
|
> |
|
|
|
<!-- <el-row> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-button type="primary" icon="el-icon-plus"> |
|
|
|
<el-button type="primary" icon="el-icon-plus" @click="tableJs.addRow($refs.tableData, { definitionId: definitionId, linkId: linkId })"> |
|
|
|
新建 |
|
|
|
</el-button> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-button type="danger" icon="el-icon-delete"> |
|
|
|
删除 |
|
|
|
<el-col :offset="1" :span="3"> |
|
|
|
<el-button type="danger" icon="el-icon-delete" @click="deleteLink"> |
|
|
|
删除 - TODO |
|
|
|
</el-button> |
|
|
|
</el-col> |
|
|
|
</el-row> --> |
|
|
|
</el-row> |
|
|
|
<el-table |
|
|
|
ref="tableData" |
|
|
|
:data="tableData" |
|
|
|
border |
|
|
|
style="width: 100%" |
|
|
|
@selection-change="handleSelectionChange" |
|
|
|
> |
|
|
|
<el-table-column type="selection" width="55" /> |
|
|
|
<el-table-column type="index" label="序号" width="50" /> |
|
|
|
<el-table-column prop="userId" label="环节人员" width="180"> |
|
|
|
<el-table-column prop="nickname" label="环节人员" width="180"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-select v-model="scope.row.nickname" placeholder="请选择"> |
|
|
|
<el-select v-model="scope.row.userId" filterable clearable placeholder="请选择"> |
|
|
|
<el-option |
|
|
|
v-for="item in options" |
|
|
|
:key="item.id" |
|
|
@ -311,7 +312,7 @@ export default { |
|
|
|
create: '添加人员', |
|
|
|
update: '编辑人员' |
|
|
|
}, |
|
|
|
bglx: 1, |
|
|
|
mode: 1, |
|
|
|
sbzlList: [], |
|
|
|
listDepartment: [], |
|
|
|
listLink: [], |
|
|
@ -323,16 +324,8 @@ export default { |
|
|
|
formMember: {}, |
|
|
|
jylbList: [], |
|
|
|
nblbList: [], |
|
|
|
bglxList: [], |
|
|
|
linkList: [ |
|
|
|
{ name: '审核', value: 2 }, |
|
|
|
{ name: '审批', value: 3 }, |
|
|
|
{ name: '重启质检', value: 5 }, |
|
|
|
{ name: '重启技检', value: 6 }, |
|
|
|
{ name: '重启审批', value: 7 }, |
|
|
|
{ name: '收费审核', value: 8 }, |
|
|
|
{ name: '收费审批', value: 9 } |
|
|
|
], |
|
|
|
modeList: [], |
|
|
|
linkList: [], |
|
|
|
multipleSelection: [], |
|
|
|
dialogFormVisible: false, |
|
|
|
dialogFormMemberVisible: false, |
|
|
@ -340,18 +333,61 @@ export default { |
|
|
|
neibuleibie: [], |
|
|
|
spanArr: [], |
|
|
|
tableData: [], |
|
|
|
options: [] |
|
|
|
options: [], |
|
|
|
memerTitle: '', |
|
|
|
definitionId: 0, |
|
|
|
linkId: 0, |
|
|
|
linkLabelList: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getList() |
|
|
|
this.getAllDepartment() |
|
|
|
this.getSbList() |
|
|
|
this.getBglxList() |
|
|
|
this.getDicDataList('REPORT_CLASS') |
|
|
|
this.getDicDataList('FLOW_LINK') |
|
|
|
this.getJylbList() |
|
|
|
this.getUserList() |
|
|
|
this.getLinkListAll() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
deleteLink() { |
|
|
|
const linkIds = [] |
|
|
|
console.log(this.$refs.tableData.selection) |
|
|
|
this.$refs.tableData.selection.forEach(row => { |
|
|
|
if (row.id) { |
|
|
|
linkIds.push(row.id) |
|
|
|
} |
|
|
|
}) |
|
|
|
this.api({ |
|
|
|
url: '/definition', |
|
|
|
method: 'delete', |
|
|
|
params: { |
|
|
|
ids: linkIds |
|
|
|
} |
|
|
|
}).then(data => { |
|
|
|
this.$notify.sucess('操作成功') |
|
|
|
this.$refs.tableData.selection.forEach(row => this.tableData.splice(this.tableData.indexOf(row), 1)) |
|
|
|
}) |
|
|
|
}, |
|
|
|
getLinkName(link) { |
|
|
|
if (!this.linkLabelList.length) { |
|
|
|
return |
|
|
|
} |
|
|
|
const linkLabel = this.linkLabelList.filter(row => row.value === link.nextName)[0] |
|
|
|
if (!linkLabel) { |
|
|
|
return |
|
|
|
} |
|
|
|
return linkLabel.name |
|
|
|
}, |
|
|
|
getLinkListAll() { |
|
|
|
this.api({ |
|
|
|
url: '/link/all', |
|
|
|
method: 'get' |
|
|
|
}).then(data => { |
|
|
|
this.linkList = data |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取所有用户 |
|
|
|
getUserList() { |
|
|
|
this.api({ |
|
|
@ -398,15 +434,24 @@ export default { |
|
|
|
this.sbzlList = data |
|
|
|
}) |
|
|
|
}, |
|
|
|
getBglxList() { |
|
|
|
getDicDataList(typeCode) { |
|
|
|
this.api({ |
|
|
|
url: '/dicData/getDicDataByTypeCode', |
|
|
|
method: 'get', |
|
|
|
params: { |
|
|
|
typeCode: 'REPORT_CLASS' |
|
|
|
typeCode: typeCode |
|
|
|
} |
|
|
|
}).then((data) => { |
|
|
|
this.bglxList = data |
|
|
|
switch (typeCode) { |
|
|
|
case 'REPORT_CLASS': |
|
|
|
this.modeList = data |
|
|
|
break |
|
|
|
case 'FLOW_LINK': |
|
|
|
this.linkLabelList = data |
|
|
|
break |
|
|
|
default: |
|
|
|
break |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
getJylbList() { |
|
|
@ -445,7 +490,7 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
showCreate() { |
|
|
|
this.$set(this.formDefinition, 'bglx', 1) |
|
|
|
this.$set(this.formDefinition, 'mode', 1) |
|
|
|
this.dialogStatus = 'create' |
|
|
|
this.dialogFormVisible = true |
|
|
|
}, |
|
|
@ -460,40 +505,23 @@ export default { |
|
|
|
this.dialogStatus = 'update' |
|
|
|
this.dialogFormVisible = true |
|
|
|
}, |
|
|
|
showUpdateMember($index, $link, row) { |
|
|
|
this.listLink = [] |
|
|
|
this.bglx = this.list[$index].bglx |
|
|
|
this.formMember.definitionId = this.list[$index].id |
|
|
|
this.formMember.linkId = $link - 1 |
|
|
|
let userIdArray = [] |
|
|
|
try { |
|
|
|
if ($link === '2') { |
|
|
|
userIdArray = this.list[$index].userId.split(',') |
|
|
|
} else { |
|
|
|
if (this.list[$index].id === this.list[$index + 1].id) { |
|
|
|
userIdArray = this.list[$index + 1].userId.split(',') |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (e) { |
|
|
|
// |
|
|
|
} |
|
|
|
const userId = [] |
|
|
|
for (let i = 0; i < userIdArray.length; i++) { |
|
|
|
userId.push(parseInt(userIdArray[i])) |
|
|
|
showUpdateMember($index, linkId) { |
|
|
|
this.tableData = [] |
|
|
|
const row = this.list[$index] |
|
|
|
this.memerTitle = row.name |
|
|
|
this.definitionId = row.id |
|
|
|
this.linkId = linkId |
|
|
|
this.api({ |
|
|
|
url: '/member/all', |
|
|
|
method: 'get', |
|
|
|
params: { |
|
|
|
definitionId: row.id, |
|
|
|
linkId: linkId |
|
|
|
} |
|
|
|
this.listMemberUser = userId |
|
|
|
this.dialogStatus = 'update' |
|
|
|
console.log(row) |
|
|
|
const arr = [] |
|
|
|
arr.push(row) |
|
|
|
this.tableData = arr |
|
|
|
this.tableData.map((item) => { |
|
|
|
item.nickname = item.nickname.split(',') |
|
|
|
item.userId = item.userId.split(',') |
|
|
|
}) |
|
|
|
console.log(this.tableData[0].userId, arr) |
|
|
|
|
|
|
|
}).then(data => { |
|
|
|
this.tableData = data |
|
|
|
this.dialogFormMemberVisible = true |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleFilter() { |
|
|
|
// 查询事件 |
|
|
@ -555,12 +583,14 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
updateLink() { |
|
|
|
this.formMember.userIds = this.listMemberUser |
|
|
|
console.log(this.tableData) |
|
|
|
const _vue = this |
|
|
|
this.api({ |
|
|
|
url: '/definition/updateGroupMember', |
|
|
|
url: '/member/updateGroupMembers', |
|
|
|
method: 'post', |
|
|
|
data: this.formMember |
|
|
|
data: { |
|
|
|
groupMembers: this.tableData |
|
|
|
} |
|
|
|
}).then(() => { |
|
|
|
this.dialogFormMemberVisible = false |
|
|
|
this.$message({ |
|
|
@ -614,10 +644,10 @@ export default { |
|
|
|
this.formDefinition = {} |
|
|
|
this.neibuleibie = [] |
|
|
|
}, |
|
|
|
formatterBglx(row) { |
|
|
|
const bglx = this.bglxList.filter((bglx) => bglx.value === row.bglx) |
|
|
|
if (bglx && bglx.length) { |
|
|
|
return bglx[0].name |
|
|
|
formatterMode(row) { |
|
|
|
const mode = this.modeList.filter((mode) => mode.value === row.mode) |
|
|
|
if (mode && mode.length) { |
|
|
|
return mode[0].name |
|
|
|
} else { |
|
|
|
return '未知' |
|
|
|
} |
|
|
@ -657,7 +687,7 @@ export default { |
|
|
|
// 判断当前元素与上一个元素是否相同 |
|
|
|
if ( |
|
|
|
data[i].departmentId === data[i - 1].departmentId && |
|
|
|
data[i].bglx === data[i - 1].bglx && |
|
|
|
data[i].mode === data[i - 1].mode && |
|
|
|
data[i].shebeizhongleidaima === data[i - 1].shebeizhongleidaima && |
|
|
|
data[i].neibuleibie === data[i - 1].neibuleibie |
|
|
|
) { |
|
|
|