|
@@ -99,12 +99,15 @@
|
|
|
</el-table>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
-
|
|
|
+ <div>
|
|
|
+ <p class="starttitleSty">审批意见:</p>
|
|
|
+ <el-input v-model="descMsg" :rows="3" type="textarea" placeholder="请输入审批意见"></el-input>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<template #footer>
|
|
|
<span class="dialog-footer">
|
|
|
- <el-button type="primary" @click="dialogVisible = false">同 意</el-button>
|
|
|
- <el-button @click="dialogVisible = false">拒 绝</el-button>
|
|
|
+ <el-button type="primary" @click="examineAndApprove('agree')">同 意</el-button>
|
|
|
+ <el-button @click="examineAndApprove('reject')">拒 绝</el-button>
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
@@ -112,11 +115,12 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {apiGetdeptresponDetail,apiGetindicatorsaveBatchDto} from '../../api/api'
|
|
|
+import {apiGettaskDetail,apiGetindicatorsaveBatchDto, apiPostIsdoAction, apiPostgetInstanceAndChildren} from '../../api/api'
|
|
|
import addIcon from '../../assets/btnIcon/add.png'
|
|
|
import saveIcon from '../../assets/btnIcon/save.png'
|
|
|
import editIcon from '../../assets/btnIcon/edit.png'
|
|
|
import deleteIcon from '../../assets/btnIcon/delete.png'
|
|
|
+import { getToken } from '../../api/auth'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -139,7 +143,8 @@ export default {
|
|
|
saveIcon: saveIcon,
|
|
|
editIcon: editIcon,
|
|
|
deleteIcon: deleteIcon,
|
|
|
- rowMsg: {}
|
|
|
+ rowMsg: {},
|
|
|
+ descMsg: ''
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -148,17 +153,7 @@ export default {
|
|
|
init(row) {
|
|
|
this.dialogVisible = true
|
|
|
this.activeName = 'first'
|
|
|
- this.receiptMsg = {
|
|
|
- code: row.responsibilityCode,
|
|
|
- des: row.des,
|
|
|
- stage: row.stage,
|
|
|
- creator: row.createBy,
|
|
|
- createDate: row.createTime,
|
|
|
- type: row.organizationType,
|
|
|
- year: row.year,
|
|
|
- recStage: '有效'
|
|
|
- }
|
|
|
- this.getDetails(row.id)
|
|
|
+ this.getTaskId(row)
|
|
|
this.rowMsg = row
|
|
|
},
|
|
|
handleClick() {
|
|
@@ -167,16 +162,41 @@ export default {
|
|
|
rowClick(selection, row) {
|
|
|
this.changeDateSelect = selection
|
|
|
},
|
|
|
+ // 根据流程ID获取业务ID
|
|
|
+ getTaskId(row) {
|
|
|
+ let that = this
|
|
|
+ let params = {
|
|
|
+ id: row.instId,
|
|
|
+ iamCode: getToken('code')
|
|
|
+ }
|
|
|
+ apiPostgetInstanceAndChildren(params).then(datas =>{
|
|
|
+ if (datas && datas.data) {
|
|
|
+ let keyId = datas.data.data.bpmInstance.bizKey
|
|
|
+ that.getDetails(keyId)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
//获取详情
|
|
|
getDetails(id) {
|
|
|
let that = this
|
|
|
let params = {
|
|
|
- deptResponsibilityIds: id
|
|
|
+ id: id
|
|
|
}
|
|
|
- apiGetdeptresponDetail(params).then(datas =>{
|
|
|
+ apiGettaskDetail(params).then(datas =>{
|
|
|
if (datas && datas.data) {
|
|
|
- that.quantifiedList = datas.data.quantifiedList
|
|
|
- that.nonQuantifiedList = datas.data.nonQuantifiedList
|
|
|
+ let item = datas.data
|
|
|
+ that.receiptMsg = {
|
|
|
+ code: item.responsibilityCode,
|
|
|
+ des: item.des,
|
|
|
+ stage: item.stage,
|
|
|
+ creator: item.createBy,
|
|
|
+ createDate: item.createTime,
|
|
|
+ type: item.organizationType,
|
|
|
+ year: item.year,
|
|
|
+ recStage: '有效'
|
|
|
+ }
|
|
|
+ that.quantifiedList = item.map.quantifiedList
|
|
|
+ that.nonQuantifiedList = item.map.nonQuantifiedList
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -211,7 +231,30 @@ export default {
|
|
|
that.getDetails(that.rowMsg.id)
|
|
|
}
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
+ examineAndApprove(type) {
|
|
|
+ let that = this
|
|
|
+ let params = {
|
|
|
+ taskId: that.rowMsg.taskId, //任务ID
|
|
|
+ nodeId: that.rowMsg.nodeId, //节点ID
|
|
|
+ action: type, //固定值
|
|
|
+ instanceId: that.rowMsg.instId, //流程实例ID
|
|
|
+ opinion: that.descMsg, //审批意见
|
|
|
+ iamCode: getToken('code') //认证后code值
|
|
|
+ }
|
|
|
+ apiPostIsdoAction(params).then(datas =>{
|
|
|
+ if (datas && datas.data) {
|
|
|
+ that.$message({
|
|
|
+ message: datas.data.data,
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ if (datas.data.isOk) {
|
|
|
+ that.dialogVisible = false
|
|
|
+ that.$emit('approveMsg', datas.data.isOk)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -334,7 +377,7 @@ export default {
|
|
|
|
|
|
.el-table{
|
|
|
.el-table__body-wrapper{
|
|
|
- height: 40vh;
|
|
|
+ height: 30vh;
|
|
|
}
|
|
|
.el-table__row{
|
|
|
.cell{
|