From 561224d0c6ea8767766a8114ce15c98e31b6a0d9 Mon Sep 17 00:00:00 2001 From: lzhe <181968431@qq.com> Date: 星期二, 08 七月 2025 23:54:10 +0800 Subject: [PATCH] 1 --- src/views/flow/todolist.vue | 88 +++++++++++++++++++++++++++++++++---------- 1 files changed, 67 insertions(+), 21 deletions(-) diff --git a/src/views/flow/todolist.vue b/src/views/flow/todolist.vue index 87d71cd..250ad09 100644 --- a/src/views/flow/todolist.vue +++ b/src/views/flow/todolist.vue @@ -13,15 +13,28 @@ </el-button> </template> </avue-crud> - <el-dialog title="瀹℃壒" append-to-body v-model="approveBox" width="20%"> - <avue-form ref="form" :option="optionApprove" v-model="formApprove" @submit="handleSubmit" /> - <!-- <template #footer> - <span class="dialog-footer"> - <el-button @click="deployBox = false">鍙� 娑�</el-button> - <el-button type="primary" @click="handleDoDeploy" :loading="deployLoading">纭� 瀹�</el-button> - </span> - </template> --> - </el-dialog> + <!-- <el-dialog title="瀹℃壒" append-to-body v-model="approveBox" width="100%"> + <div class="approve-box"> + <div class="left"> + <TodolistLeft :row="row"/> + </div> + <div class="right"> + <TodolistRightTop :row="row" /> + <avue-form ref="form" :option="optionApprove" v-model="formApprove" @submit="handleSubmit" /> + </div> + </div> + </el-dialog> --> + <el-drawer title="瀹℃壒" append-to-body v-model="approveBox" size="100%" v-if="approveBox"> + <div class="approve-box"> + <div class="left"> + <TodolistLeft :row="row" @selection-change="selectionChange"/> + </div> + <div class="right"> + <TodolistRightTop :row="row" /> + <avue-form ref="form" :option="optionApprove" v-model="formApprove" @submit="handleSubmit" /> + </div> + </div> + </el-drawer> </basic-container> </template> @@ -29,9 +42,16 @@ import { getList, approve,getAssignee } from '@/api/flow/todolist'; import { mapGetters } from 'vuex'; import dayjs from 'dayjs'; +import TodolistLeft from './components/TodolistLeft.vue'; +import TodolistRightTop from './components/TodolistRightTop.vue'; export default { + components: { + TodolistLeft, + TodolistRightTop + }, data() { return { + applist: [], assigneeData: [], row: {}, approveBox: false, @@ -55,7 +75,7 @@ rules: [{ required: true, message: '璇烽�夋嫨瀹℃壒缁撴灉', trigger: 'blur' }], }, { - label: '涓嬩竴瀹℃壒鐢ㄦ埛', + label: '鍙戦�佺粰', prop: 'assignee', type: 'select', // dicUrl: `/blade-mdm/flow/flow-user-list?deptId=0`, @@ -132,7 +152,7 @@ { label: '娴佺▼绫诲瀷', width: 100, - prop: 'processDefinitionName', + prop: 'categoryName', }, { @@ -161,6 +181,24 @@ // hide: true, }, { + label: '涓婁竴姝ョ敤鎴�', + width: 200, + prop: '', + formatter: (val, value, label) => { + return `${val?.variables?.approveUserNickName || ''}`; + }, + }, + { + label: '褰撳墠鑺傜偣', + width: 200, + prop: 'taskName', + }, + { + label: '鏂囦欢', + width: 200, + prop: '', + }, + { label: '鍒拌揪鏃堕棿', width: 200, prop: 'createTime', @@ -169,15 +207,6 @@ label: '鍒拌揪鎻忚堪', width: 200, prop: 'comment', - }, - { - label: '鏂囦欢', - width: 200, - prop: '', - }, - { - label: '褰撳墠鑺傜偣', - prop: 'taskName', }, ], @@ -249,6 +278,7 @@ ...this.formApprove, taskId: this.row.taskId, processInstanceId: this.row.processInstanceId, + programIds: this.row.taskDefinitionKey === 'programmingTask' ? this.applist.map(v => v.id).join(',') : '', }).then(res => { this.$message.success('瀹℃壒鎴愬姛'); this.approveBox = false; @@ -317,8 +347,24 @@ this.loading = false; }); }, + selectionChange (applist) { + this.applist = applist + }, }, }; </script> -<style></style> +<style scoped="scoped" lang="scss"> +.approve-box { + display: flex; + & > div { + border: 1px solid #ccc; + } + .left { + width: 400px; + } + .right { + flex:1; + } +} +</style> -- Gitblit v1.9.3