From e4ffdc74b58bcca7de4b1b05f589444c493d9b01 Mon Sep 17 00:00:00 2001
From: 李喆(开发组) <lzhe@yxqiche.com>
Date: 星期一, 04 八月 2025 17:34:14 +0800
Subject: [PATCH] 1
---
src/views/flow/todolist.vue | 37 ++++++++++++++++++++++++++++++++-----
1 files changed, 32 insertions(+), 5 deletions(-)
diff --git a/src/views/flow/todolist.vue b/src/views/flow/todolist.vue
index 568b4ab..1bfb122 100644
--- a/src/views/flow/todolist.vue
+++ b/src/views/flow/todolist.vue
@@ -9,8 +9,7 @@
</el-button>
</template>
<template #menu="scope">
- <el-button type="primary" text size="default" v-if="permission.flow_model_update"
- @click.stop="handleAction(scope.row, scope.index)">瀹℃壒
+ <el-button type="primary" text size="default" @click.stop="handleAction(scope.row, scope.index)">瀹℃壒
</el-button>
</template>
</avue-crud>
@@ -44,6 +43,7 @@
},
data() {
return {
+
applist: [],
assigneeData: [],
row: {},
@@ -89,7 +89,20 @@
span: 24,
prop: 'comment',
type: 'textarea',
- rules: [{ required: true, message: '璇疯緭鍏ュ鎵规剰瑙�', trigger: 'blur' }],
+ // rules: [{ required: true, message: '璇疯緭鍏ュ鎵规剰瑙�', trigger: 'blur' }],
+ rules: [
+ {
+ validator: (rule, value, callback) => {
+ console.log('-------',this.formApprove)
+ if (value === '' && this.formApprove.approve !== 'Y') {
+ callback(new Error('璇疯緭鍏ュ娉�'));
+ } else {
+ callback();
+ }
+ },
+ trigger: 'blur'
+ }
+ ]
},
],
},
@@ -189,7 +202,7 @@
{
label: '鏂囦欢',
width: 200,
- prop: '',
+ prop: 'file',
},
{
label: '鍒拌揪鏃堕棿',
@@ -310,9 +323,11 @@
this.reassignBox = false;
this.$refs?.reassginform?.resetForm();
this.onLoad(this.page, this.query);
+ done()
}).catch(err => {
console.error(err);
+ done()
})
});
done();
@@ -338,17 +353,29 @@
console.log('handleAction', row, index);
},
handleSubmit(form, done) {
+ if(this.row.taskDefinitionKey === 'programmingTask') {
+ // if(this.applist.length !== 1) {
+ // done();
+ // return this.$message.success('璇烽�夋嫨1涓▼搴�');
+ // }
+ }
approve({
...this.formApprove,
taskId: this.row.taskId,
processInstanceId: this.row.processInstanceId,
- programIds: this.row.taskDefinitionKey === 'programmingTask' ? this.applist.map(v => v.id).join(',') : '',
+ // programIds: this.row.taskDefinitionKey === 'programmingTask' ? this.applist.map(v => v.id).join(',') : '',
}).then(res => {
+ if(res.data.code !== 200) {
+ this.$message.error(res.data.msg);
+ done();
+ return;
+ }
this.$message.success('瀹℃壒鎴愬姛');
this.approveBox = false;
this.onLoad(this.page, this.query);
done();
}).catch(err => {
+ done();
console.error(err);
});
},
--
Gitblit v1.9.3