|
|
@ -128,24 +128,25 @@ |
|
|
|
<!--End 添加修改部分--> |
|
|
|
<!-- 选择待办人 的弹出框--> |
|
|
|
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%"> |
|
|
|
<el-form label-position="right" class="formadd"> |
|
|
|
<el-row v-show="currentLink"> |
|
|
|
<el-col :span="4" class="tleftb">当前环节</el-col> |
|
|
|
<el-col :span="20" class="trightb"> |
|
|
|
<el-form-item prop="purchasingUnitName"><span>{{ current.taskName }}->{{ nextNode.name }}</span> |
|
|
|
</el-form-item> |
|
|
|
<el-form class="formadd" > |
|
|
|
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb"> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span>当前环节:</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="20"> |
|
|
|
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row style="border-bottom: 1px solid #e0e3eb;"> |
|
|
|
<el-col :span="4" class="tleftb">意见</el-col> |
|
|
|
<el-col :span="20" class="trightb"> |
|
|
|
<el-form-item> |
|
|
|
<el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" clearable></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-row :class="{rowClass:!currentLink}"> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span>意见:</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="20"> |
|
|
|
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable ></el-input></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<div style="text-align:center;margin-top: 20px;"> |
|
|
|
<el-button type="primary" size="mini" @click="confirm">确 定</el-button> |
|
|
|
<el-button type="primary" size="mini" @click="reject">确 定</el-button> |
|
|
|
<el-button type="info " size="mini" @click="nodeDialogVisible = false">取 消</el-button> |
|
|
|
</div> |
|
|
|
</el-form> |
|
|
@ -170,12 +171,10 @@ export default { |
|
|
|
temp: {}, // 添加和修改 |
|
|
|
rules: {}, |
|
|
|
// ------流程所需------------------------------ |
|
|
|
currentLink: true, // 控制当前环节一行的显示隐藏 |
|
|
|
operation: '', // 点击操作按钮 |
|
|
|
dialogList: { |
|
|
|
comment: '' |
|
|
|
}, |
|
|
|
xmlData: '', // 模型xml数据 |
|
|
|
taskList: [], |
|
|
|
startTask: true, |
|
|
|
current: { |
|
|
|
taskDefKey: '', |
|
|
@ -183,8 +182,9 @@ export default { |
|
|
|
}, |
|
|
|
nextNode: {}, // 下一环节 |
|
|
|
nodeDialogVisible: false, |
|
|
|
// 同意办理列表 |
|
|
|
agreeList: { |
|
|
|
currentLink: true, |
|
|
|
// 环节所需参数 |
|
|
|
linkByParameter: { |
|
|
|
businessSid: '', |
|
|
|
comment: '', |
|
|
|
instanceId: '', |
|
|
@ -192,22 +192,6 @@ export default { |
|
|
|
orgSidPath: '', |
|
|
|
taskDefKey: '', |
|
|
|
userSid: '' |
|
|
|
}, |
|
|
|
// 驳回列表 |
|
|
|
regectList: { |
|
|
|
businessSid: '', |
|
|
|
comment: '', |
|
|
|
instanceId: '', |
|
|
|
taskId: '', |
|
|
|
userSid: '' |
|
|
|
}, |
|
|
|
// 终止列表 |
|
|
|
stopList: { |
|
|
|
businessSid: '', |
|
|
|
comment: '', |
|
|
|
instanceId: '', |
|
|
|
taskId: '', |
|
|
|
userSid: '' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
@ -227,31 +211,17 @@ export default { |
|
|
|
const data = window.location.href.substr(one) // url解码unescape()已从web中移除,尽量不使用 |
|
|
|
const obj = JSON.parse(decodeURIComponent(data)) |
|
|
|
console.log('获取到的obj', obj) |
|
|
|
// 同意列表 |
|
|
|
this.agreeList.businessSid = obj.businessSid |
|
|
|
this.agreeList.instanceId = obj.instanceId |
|
|
|
this.agreeList.taskId = obj.taskId |
|
|
|
this.agreeList.taskDefKey = obj.taskDefKey |
|
|
|
this.agreeList.userSid = window.sessionStorage.getItem('userSid') |
|
|
|
this.agreeList.orgSidPath = window.sessionStorage.getItem('orgSidPath') |
|
|
|
// 点击(同意、终止、驳回、驳回)操作时所需的参数 |
|
|
|
this.linkByParameter.businessSid = obj.businessSid |
|
|
|
this.linkByParameter.instanceId = obj.instanceId |
|
|
|
this.linkByParameter.taskId = obj.taskId |
|
|
|
this.linkByParameter.taskDefKey = obj.taskDefKey |
|
|
|
this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath') |
|
|
|
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid') |
|
|
|
this.current.taskDefKey = obj.taskDefKey |
|
|
|
this.current.taskName = obj.taskName |
|
|
|
// 驳回列表 |
|
|
|
this.regectList.businessSid = obj.businessSid |
|
|
|
this.regectList.instanceId = obj.instanceId |
|
|
|
this.regectList.taskId = obj.taskId |
|
|
|
this.regectList.userSid = window.sessionStorage.getItem('userSid') |
|
|
|
// 终止列表 |
|
|
|
this.stopList.businessSid = obj.businessSid |
|
|
|
this.stopList.instanceId = obj.instanceId |
|
|
|
this.stopList.taskId = obj.taskId |
|
|
|
this.stopList.userSid = window.sessionStorage.getItem('userSid') |
|
|
|
// 办理状态 |
|
|
|
this.transactState = obj.transactState |
|
|
|
// 加载流程图相关的数据 |
|
|
|
// 加载表单数据 |
|
|
|
this.showInfo(obj.businessSid) |
|
|
|
// this.getModelDetail(obj.deployId) |
|
|
|
// this.getFlowViewer(obj.instanceId) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
handleReturn() { |
|
|
@ -279,12 +249,9 @@ export default { |
|
|
|
// 同意 |
|
|
|
openAgree(val) { |
|
|
|
this.operation = val |
|
|
|
this.currentLink = true |
|
|
|
this.dialogList.comment = '同意' |
|
|
|
this.currentLink = true // 控制当前环节一行的显示隐藏 |
|
|
|
const formVariables = { |
|
|
|
businessSid: this.agreeList.businessSid |
|
|
|
} |
|
|
|
req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey, formVariables }).then((resp) => { |
|
|
|
req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
var arr = resp.data |
|
|
|
this.nextNode = arr[0] |
|
|
@ -296,12 +263,9 @@ export default { |
|
|
|
// 驳回 |
|
|
|
openReject(val) { |
|
|
|
this.operation = val |
|
|
|
this.currentLink = true |
|
|
|
this.dialogList.comment = '' |
|
|
|
this.currentLink = true // 控制当前环节一行的显示隐藏 |
|
|
|
const formVariables = { |
|
|
|
businessSid: this.regectList.businessSid |
|
|
|
} |
|
|
|
req.getPreviousNodesForReject({ taskDefKey: this.current.taskDefKey, formVariables }).then((resp) => { |
|
|
|
req.getPreviousNodesForReject({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
var arr = resp.data |
|
|
|
this.nextNode = arr[0] |
|
|
@ -313,37 +277,37 @@ export default { |
|
|
|
// 终止 |
|
|
|
openStop(val) { |
|
|
|
this.operation = val |
|
|
|
this.currentLink = false |
|
|
|
this.dialogList.comment = '' |
|
|
|
this.currentLink = false // 控制当前环节一行的显示隐藏 |
|
|
|
this.nodeDialogVisible = true |
|
|
|
}, |
|
|
|
/** 选择代办人确认 */ |
|
|
|
confirm() { |
|
|
|
reject() { |
|
|
|
if (this.operation === '同意') { |
|
|
|
this.handleAgree() |
|
|
|
} else if (this.operation === '驳回') { |
|
|
|
this.handleReject() |
|
|
|
if (this.dialogList.comment === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' }) |
|
|
|
} else { |
|
|
|
this.handleReject() |
|
|
|
} |
|
|
|
} else if (this.operation === '终止') { |
|
|
|
this.handleStop() |
|
|
|
if (this.dialogList.comment === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' }) |
|
|
|
} else { |
|
|
|
this.handleStop() |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
/** 同意任务 */ |
|
|
|
handleAgree() { |
|
|
|
this.agreeList.comment = this.dialogList.comment |
|
|
|
if (this.agreeList.comment === '') { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
message: '请填写同意意见!', |
|
|
|
type: 'error' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
req.agreeTask(this.agreeList).then((response) => { |
|
|
|
this.linkByParameter.comment = this.dialogList.comment |
|
|
|
req.agreeTask(this.linkByParameter).then((response) => { |
|
|
|
if (response.success) { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '执行成功', |
|
|
|
type: 'success' |
|
|
|
type: 'success', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
this.nodeDialogVisible = false |
|
|
|
// 子页面向父级页面传递值 |
|
|
@ -359,21 +323,14 @@ export default { |
|
|
|
}, |
|
|
|
/** 驳回任务 */ |
|
|
|
handleReject() { |
|
|
|
this.regectList.comment = this.dialogList.comment |
|
|
|
if (this.regectList.comment === '') { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
message: '请填写驳回意见!', |
|
|
|
type: 'error' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
req.rejectTask(this.regectList).then((response) => { |
|
|
|
this.linkByParameter.comment = this.dialogList.comment |
|
|
|
req.revokeTask(this.linkByParameter).then((response) => { |
|
|
|
if (response.success) { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '执行成功', |
|
|
|
type: 'success' |
|
|
|
type: 'success', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
this.nodeDialogVisible = false |
|
|
|
// 子页面向父级页面传递值 |
|
|
@ -389,21 +346,14 @@ export default { |
|
|
|
}, |
|
|
|
/** 终止任务 */ |
|
|
|
handleStop() { |
|
|
|
this.stopList.comment = this.dialogList.comment |
|
|
|
if (this.stopList.comment === '') { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
message: '请填写终止意见!', |
|
|
|
type: 'error' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
req.breakTask(this.stopList).then((response) => { |
|
|
|
this.linkByParameter.comment = this.dialogList.comment |
|
|
|
req.breakTask(this.linkByParameter).then((response) => { |
|
|
|
if (response.success) { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '执行成功', |
|
|
|
type: 'success' |
|
|
|
type: 'success', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
this.nodeDialogVisible = false |
|
|
|
// 子页面向父级页面传递值 |
|
|
@ -441,12 +391,7 @@ export default { |
|
|
|
padding: 30px 0 20px 0; |
|
|
|
} |
|
|
|
|
|
|
|
.tleftb { |
|
|
|
border-bottom: 0 !important; |
|
|
|
border-top: 1px solid #e0e3eb; |
|
|
|
} |
|
|
|
.trightb{ |
|
|
|
border-bottom: 0 !important; |
|
|
|
border-top: 1px solid #e0e3eb; |
|
|
|
.rowClass{ |
|
|
|
border-top: 1px solid #E0E3EB; |
|
|
|
} |
|
|
|
</style> |
|
|
|