mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-23 23:45:08 +08:00
调整流程任务的审批结果,拆成 approve 和 reject 接口
This commit is contained in:
@ -8,3 +8,26 @@ export function getTodoTaskPage(query) {
|
||||
})
|
||||
}
|
||||
|
||||
export function completeTask(data) {
|
||||
return request({
|
||||
url: '/bpm/task/complete',
|
||||
method: 'PUT',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function approveTask(data) {
|
||||
return request({
|
||||
url: '/bpm/task/approve',
|
||||
method: 'PUT',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function rejectTask(data) {
|
||||
return request({
|
||||
url: '/bpm/task/reject',
|
||||
method: 'PUT',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
@ -41,15 +41,14 @@
|
||||
</div>
|
||||
</el-col>
|
||||
</el-card>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span class="el-icon-picture-outline">流程图</span>
|
||||
</div>
|
||||
<my-process-viewer key="designer" v-model="bpmnXML" v-bind="bpmnControlForm" />
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span class="el-icon-picture-outline">流程图</span>
|
||||
</div>
|
||||
<my-process-viewer key="designer" v-model="bpmnXML" v-bind="bpmnControlForm" />
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -64,11 +64,11 @@
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<span>
|
||||
<el-tag type="primary" v-if="scope.row.result === 1"> <!-- 进行中 -->
|
||||
{{ getDictDataLabel(DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS, scope.row.result) }}
|
||||
<el-tag type="primary" v-if="scope.row.status === 1"> <!-- 进行中 -->
|
||||
{{ getDictDataLabel(DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS, scope.row.status) }}
|
||||
</el-tag>
|
||||
<el-tag type="success" v-if="scope.row.result === 2"> <!-- 已结束 -->
|
||||
{{ getDictDataLabel(DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS, scope.row.result) }}
|
||||
<el-tag type="success" v-if="scope.row.status === 2"> <!-- 已结束 -->
|
||||
{{ getDictDataLabel(DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS, scope.row.status) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
|
@ -37,6 +37,8 @@
|
||||
<template slot-scope="scope">
|
||||
<!-- TODO 权限、颜色 -->
|
||||
<el-button size="mini" type="text" icon="el-icon-edit">审批</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="audit(scope.row, true)">通过</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="audit(scope.row, false)">不通过</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" v-if="scope.row.suspensionState === 2">激活</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" v-if="scope.row.suspensionState === 1">挂起</el-button>
|
||||
</template>
|
||||
@ -50,7 +52,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getTodoTaskPage } from '@/api/bpm/task'
|
||||
import {approveTask, completeTask, getTodoTaskPage, rejectTask} from '@/api/bpm/task'
|
||||
|
||||
export default {
|
||||
name: "Todo",
|
||||
@ -124,6 +126,19 @@ export default {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
audit(row, pass) {
|
||||
if (pass) {
|
||||
approveTask({
|
||||
id: row.id,
|
||||
comment: '通过'
|
||||
})
|
||||
} else {
|
||||
rejectTask({
|
||||
id: row.id,
|
||||
comment: '不通过'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user