优化带啊

dev_xds
姜玉琦 2023-09-17 18:09:42 +08:00
parent 4bb491435b
commit ff9f1492bc
1 changed files with 52 additions and 11 deletions

View File

@ -129,7 +129,7 @@
<label v-if="scope.row.assigneeName">{{scope.row.assigneeName}} <el-tag type="info" size="mini">{{scope.row.assigneeDeptName}}</el-tag></label> <label v-if="scope.row.assigneeName">{{scope.row.assigneeName}} <el-tag type="info" size="mini">{{scope.row.assigneeDeptName}}</el-tag></label>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="150" align="center" fixed="right" class-name="small-padding fixed-width"> <el-table-column label="操作" width="200" align="center" fixed="right" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="getActivate(scope.row)" @click="handleActivate(scope.row)" type="text" size="small" icon="el-icon-edit-outline"></el-button> <el-button v-if="getActivate(scope.row)" @click="handleActivate(scope.row)" type="text" size="small" icon="el-icon-edit-outline"></el-button>
<el-button @click="handleFlowRecord(scope.row)" type="text" size="small" icon="el-icon-finished">详情</el-button> <el-button @click="handleFlowRecord(scope.row)" type="text" size="small" icon="el-icon-finished">详情</el-button>
@ -213,6 +213,27 @@
@pagination="myDefinitionList" @pagination="myDefinitionList"
/> />
</el-dialog> </el-dialog>
<!-- 终止流程 -->
<el-dialog :title="title" :visible.sync="stopOpen" width="30%" append-to-body>
<el-form ref="form"
:model="form"
:rules="rules"
v-loading="stopLoading"
label-width="80px">
<el-form-item label="终止原因" prop="comment">
<el-input
type="textarea"
v-model="form.comment"
placeholder="请输入终止原因"
rows="5"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleStopClick"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<initTaskDrawer ref="initTaskDrawer" :closeCallBack="getList"></initTaskDrawer> <initTaskDrawer ref="initTaskDrawer" :closeCallBack="getList"></initTaskDrawer>
<initLeaveTaskDrawer ref="initLeaveTaskDrawer" :closeCallBack="getList"></initLeaveTaskDrawer> <initLeaveTaskDrawer ref="initLeaveTaskDrawer" :closeCallBack="getList"></initLeaveTaskDrawer>
<editTaskDrawer ref="editTaskDrawer" :closeCallBack="getList"></editTaskDrawer> <editTaskDrawer ref="editTaskDrawer" :closeCallBack="getList"></editTaskDrawer>
@ -255,6 +276,7 @@ export default {
return { return {
// //
loading: true, loading: true,
stopLoading: false,
processLoading: true, processLoading: true,
// //
ids: [], ids: [],
@ -273,6 +295,7 @@ export default {
title: "", title: "",
// //
open: false, open: false,
stopOpen:false,
src: "", src: "",
definitionList:[], definitionList:[],
// //
@ -303,6 +326,14 @@ export default {
form: {}, form: {},
// //
rules: { rules: {
comment: [
{ required: true, message: "请输入终止原因", trigger: "blur" },
{
max: 500,
message: "终止原因最多输入500字",
trigger: "blur",
},
],
}, },
daterangeCheckTime:[], daterangeCheckTime:[],
tabs:{ tabs:{
@ -357,6 +388,7 @@ export default {
// //
cancel() { cancel() {
this.open = false; this.open = false;
this.stopOpen = false;
this.reset(); this.reset();
}, },
// //
@ -448,17 +480,26 @@ export default {
}, },
/** 取消流程申请 */ /** 取消流程申请 */
handleStop(row){ handleStop(row){
const params = { this.form.taskId = row.taskId;
instanceId: row.procInsId this.form.userId = this.$store.getters.userId
} this.form.instanceId = row.procInsId;
this.stopOpen = true;
},
/** 取消流程申请 */
handleStopClick(){
let that = this; let that = this;
this.$modal.confirm('是否终止当前流程申请?').then(function() { this.$refs["form"].validate(valid => {
that.loading = true; if (valid) {
return stopProcess(params); this.$modal.confirm('是否终止当前流程申请?').then(function() {
}).then(res => { that.stopLoading = true;
that.$modal.msgSuccess(res.msg); return stopProcess(that.form);
that.loading=false; }).then(res => {
that.getList(); that.$modal.msgSuccess(res.msg);
that.stopLoading=false;
that.stopOpen = false;
that.getList();
});
}
}); });
}, },
/** 流程流转记录 */ /** 流程流转记录 */