From 8b666c73d249fcb81b666b03ec638a8bb7357c45 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期六, 09 八月 2025 17:02:12 +0800
Subject: [PATCH] 修改文字
---
src/views/flow/todolist.vue | 110 ++++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 88 insertions(+), 22 deletions(-)
diff --git a/src/views/flow/todolist.vue b/src/views/flow/todolist.vue
index 568b4ab..d44b60d 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>
@@ -43,7 +42,10 @@
TodolistRightTop
},
data() {
+ let rejectText = '椹冲洖';//+this.row.categoryName;
+ console.log(this,'ttt');
return {
+
applist: [],
assigneeData: [],
row: {},
@@ -51,6 +53,7 @@
formApprove: {
comment: '',
approve: '', // 榛樿鍚屾剰
+ assignee: ''
},
optionApprove: {
labelWidth: 100,
@@ -63,7 +66,7 @@
span: 24,
dicData: [
{ label: '閫氳繃', value: 'Y' },
- { label: '椹冲洖', value: 'N' },
+ { label: rejectText, value: 'N' },
],
rules: [{ required: true, message: '璇烽�夋嫨瀹℃壒缁撴灉', trigger: 'blur' }],
},
@@ -77,6 +80,7 @@
label: 'name',
value: 'id',
},
+ filterable: true,
span: 24,
disabled: false,
dicData: [
@@ -85,11 +89,33 @@
// rules: [{ required: true, message: '璇烽�夋嫨涓嬩竴瀹℃壒鐢ㄦ埛', trigger: 'blur' }],
},
{
+ label: '宸ュ簭鐗堟',
+ prop: 'processEdition',
+ type: 'input',
+ span: 24,
+ // disabled: true,
+ display: false,// 闅愯棌鏄剧ず
+ // rules: [{ required: true, message: '璇烽�夋嫨涓嬩竴瀹℃壒鐢ㄦ埛', trigger: 'blur' }],
+ },
+ {
label: '澶囨敞',
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'
+ }
+ ]
},
],
},
@@ -102,6 +128,7 @@
query: {},
loading: true,
option: {
+ rowKey: "taskId",
addBtn: false,
editBtn: false,
delBtn: false,
@@ -137,16 +164,29 @@
},
],
},
+ {
+ label: '鏍囬',
+ prop: '',
+ width: 100,
+ render: ({ row }) => {
+ return h('p',
+ {
+ attrs: {},
+ class: {},
+ style: {},
+ }, row?.variables?.title)
+ }
+ },
{
- label: '浠诲姟鍚嶇О',
+ label: '娴佺▼鍚嶇О',
prop: 'processDefinitionName',
width: 100,
- },
+ },/*
{
label: '娴佺▼绫诲瀷',
width: 100,
prop: 'categoryName',
- },
+ },*/
{
label: '鏈哄簥',
@@ -189,7 +229,7 @@
{
label: '鏂囦欢',
width: 200,
- prop: '',
+ prop: 'file',
},
{
label: '鍒拌揪鏃堕棿',
@@ -253,12 +293,21 @@
// });
// },
'formApprove.approve'(val) {
- if (val === 'Y' && this.row.taskDefinitionKey === 'approveTask') {
+ if (val === 'Y' && ["approveTask", 'seniorApproveTask'].includes(this.row.taskDefinitionKey)) {// 楂樺笀
this.optionApprove.column[1].disabled = true;
this.formApprove.assignee = ''; // 濡傛灉鏄�氳繃锛屽垯榛樿鎸囨淳缁欒嚜宸�
- } else {
- this.optionApprove.column[1].disabled = false;
+ } else if(val === 'Y'){
+ this.setAssignee(this.row);
+ } else if(val === 'N') {
+ this.formApprove.assignee = ''
+ // this.formApprove.assignee = row.variables.senior;
}
+ if(val === 'Y' && ['confirmIsUseableTask'].includes(this.row.taskDefinitionKey) && this.row.variables.isProcessEditionSame=='N') {
+ this.optionApprove.column[2].display = true; // 鏄剧ず宸ュ簭鐗堟
+ } else {
+ this.optionApprove.column[2].display = false; // 闅愯棌宸ュ簭鐗堟
+ }
+
},
},
computed: {
@@ -310,45 +359,62 @@
this.reassignBox = false;
this.$refs?.reassginform?.resetForm();
this.onLoad(this.page, this.query);
+ done()
}).catch(err => {
console.error(err);
+ done()
})
});
done();
},
- handleAction(row, index) {
- this.formApprove = {
- comment: '',
- approve: '', // 榛樿鍚�
- }
- this.approveBox = true;
- this.row = row
- if (row.taskDefinitionKey == "check") {
+ setAssignee (row) {
+ if (["check", 'cureCheckTask '].includes(row.taskDefinitionKey)) {// 鏍″
this.formApprove.assignee = row.variables.senior;
- } else if (row.taskDefinitionKey == "programmingTask") {
+ } else if (["programmingTask",'cureProgramTask'].includes(row.taskDefinitionKey)) {// 缂栧埗锛屾牎瀵�
this.formApprove.assignee = row.variables.checker;
} else if (row.taskDefinitionKey == "teamLeaderTask") {
this.formApprove.assignee = row.variables.programmer
} else if (row.taskDefinitionKey == "confirmIsUseableTask") {
this.formApprove.assignee = row.variables.checker
- } else if (row.taskDefinitionKey == "approveTask") {
+ } else if (["approveTask", 'seniorApproveTask'].includes(row.taskDefinitionKey)) {// 楂樺笀瀹℃牳
}
+ },
+ handleAction(row, index) {
+ this.formApprove = {
+ comment: '',
+ approve: 'Y', // 榛樿鍚�
+ }
+ this.approveBox = true;
+ this.row = row
+ this.setAssignee(row);
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