From 2781142ab67deba83925da706ca26b7f8ea1a759 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期四, 04 九月 2025 15:42:24 +0800
Subject: [PATCH] 审批用户列表改为树形

---
 src/views/flowmgr/processQuery2.vue |  157 +++++++++++++++++++++++++---------------------------
 1 files changed, 75 insertions(+), 82 deletions(-)

diff --git a/src/views/flowmgr/processQuery2.vue b/src/views/flowmgr/processQuery2.vue
index 84c1a16..75fa687 100644
--- a/src/views/flowmgr/processQuery2.vue
+++ b/src/views/flowmgr/processQuery2.vue
@@ -10,28 +10,21 @@
             @search-change="searchChange" @search-reset="searchReset" @current-change="currentChange"
             @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"
             @selection-change="selectionChange">
-            <!-- <template slot="view" slot-scope="{ row }">
-              <div class="custom-view-footer">
-                <p>杩欐槸鑷畾涔夌殑搴曢儴鍐呭</p>
-                <p>褰撳墠琛屾暟鎹細{{ row }}</p>
-              </div>
-            </template> -->
+            
             <template #menu-left>
-                <!-- <el-button type="primary" plain @click="exportWebSite">瀵煎嚭鍥炰紶娑夊瘑缃�</el-button> -->
-                <!-- <el-button type="primary" plain @click="reassign">鎸傝浇杞﹀簥绋嬪簭搴�</el-button> -->
-                <!-- <el-button type="primary" plain @click="exportExcel">瀵煎嚭鍒癊XCEL</el-button> -->
-                <!-- <el-button type="primary" plain @click="reassign">閲嶆柊鎸囨淳
-                </el-button> -->
+                
             </template>
             <template #menu="scope">
                 <el-button type="primary" text size="default" @click.stop="customView(scope.row, scope.index, 0)">鏌ョ湅
                 </el-button>
-                <!-- <el-button type="primary" text size="default" v-if="scope.row.processDefinitionKey === 'dispatch'"
-                    @click.stop="handleAction(scope.row, scope.index, 1)">瀹℃壒琛ㄦ墦鍗�
+                <!--
+               <el-button type="primary" text size="default" v-if="scope.row.processDefinitionKey === 'dispatch'"
+                    @click.stop="handleApproveTable(scope.row, scope.index)">瀹℃壒琛�
                 </el-button>
-                <el-button type="danger" text size="default" @click.stop="handleAction(scope.row, scope.index, 0)">鍒犻櫎
-                </el-button> -->
-                
+                <el-button type="primary" text size="default" v-if="scope.row.processDefinitionKey === 'program-cure'"
+                    @click.stop="handleConfirmTable(scope.row, scope.index)">纭琛�
+                </el-button>
+                -->
             </template>
         </avue-crud>
         <el-dialog title="鎸囨淳" append-to-body v-model="reassignBox" width="30%">
@@ -82,31 +75,30 @@
                 viewBtn: false,
                 columnBtn: false,
                 tip: false,
-                // simplePage: true,
                 searchShow: true,
                 searchMenuSpan: 7,
+                searchEnter:true,
                 dialogWidth: '70%',
                 // tree: true,
                 border: true,
                 index: true,
-                selection: true,
-
-                menuWidth: 200,
+                selection: false,
+                menuWidth: 80,
                 // menu: false,
                 labelWidth: 90,
                 menuSpan: 6,
                 dialogClickModal: false,
                 column: [
                     {
-                        label: '娴佺▼绫诲瀷',
-                        prop: 'processDefinitionKey',
+                        label: '娴佺▼鍚嶇О',
+                        prop: 'myProcessName',
                         search: true,
                         searchType: 'select',
                         hide: true,
-                        dicUrl: `/blade-mdm/system/dict/dictionary?code=flow`,
+                        dicUrl: `/blade-system/dict-biz/dictionary?code=process_name`,
                         props: {
                             label: 'dictValue',
-                            value: 'remark',
+                            value: 'dictValue',
                         },
                     },
                     {
@@ -161,7 +153,7 @@
                         }
                     },
                     {
-                        label: '宸ヨ壓鐗堟',
+                        label: '鎵规鍙�',
                         prop: 'variables.craftEdition',
                         width: 80,
                         render: ({ row }) => {
@@ -313,11 +305,11 @@
                 span: 8,
                 column: [
                     {
-                        label: '娴佺▼绫诲瀷',
-                        prop: 'processDefinitionKey',
+                        label: '娴佺▼鍚嶇О',
+                        prop: '',
                         render: ({ row }) => {
-                            return h('p',{'class': 'margin0'}, row?.processDefinitionKey)
-                        },
+                            return h('p',{'class': 'margin0'}, row?.variables.myProcessName)
+                        }
                     },
                     {
                         label: '鍒涘缓鏃堕棿',
@@ -333,15 +325,9 @@
                             return h('p',{'class': 'margin0'}, row?.variables?.title)
                         }
                     },
+                    
                     {
-                        label: '娴佺▼鍚嶇О',
-                        prop: '',
-                        render: ({ row }) => {
-                            return h('p',{'class': 'margin0'}, row?.variables.myProcessName)
-                        }
-                    },
-                    {
-                        label: '宸ヨ壓鐗堟',
+                        label: '鎵规鍙�',
                         prop: 'variables.craftEdition',
                         render: ({ row }) => {
                             return h('p',{'class': 'margin0'}, row?.variables?.craftEdition || '');
@@ -558,7 +544,7 @@
                         })
                     })
             } else if (flag === 1) {
-                printRow({ processInstanceId: row.processInstanceId })
+               
                 this.$confirm('鏄惁瀵煎嚭?', '鎻愮ず', {
                     confirmButtonText: '纭畾',
                     cancelButtonText: '鍙栨秷',
@@ -580,51 +566,58 @@
             }
 
         },
+        handleApproveTable(row, index,) {
+           //瀹℃壒琛ㄤ笅杞�
+            this.$confirm('鏄惁瀵煎嚭瀹℃壒琛�?', '鎻愮ず', {
+                confirmButtonText: '纭畾',
+                cancelButtonText: '鍙栨秷',
+                type: 'warning',
+            }).then(() => {
+                console.log(this.selection)
+                NProgress.start();
+                exportBlobPost(
+                    `/blade-mdm/flow/mgr/export-approve-table`,
+                    { processInstanceId: row.processInstanceId }
+                ).then(res => {
+                    let name = res.headers['content-disposition'].split('filename=')[1]
+                    console.log(res.headers['content-disposition'].split('filename=')[1]);
+                    name = decodeURI(name)
+                    downloadFile(res.data, `${name}`);
+                    NProgress.done();
+                });
+            });
+            
+
+        },
+        handleConfirmTable(row, index,) {
+           //纭琛ㄤ笅杞�
+            this.$confirm('鏄惁瀵煎嚭纭琛�?', '鎻愮ず', {
+                confirmButtonText: '纭畾',
+                cancelButtonText: '鍙栨秷',
+                type: 'warning',
+            }).then(() => {
+                console.log(this.selection)
+                NProgress.start();
+                exportBlobPost(
+                    `/blade-mdm/flow/mgr/export-confirm-table`,
+                    { processInstanceId: row.processInstanceId }
+                ).then(res => {
+                    let name = res.headers['content-disposition'].split('filename=')[1]
+                    console.log(res.headers['content-disposition'].split('filename=')[1]);
+                    name = decodeURI(name)
+                    downloadFile(res.data, `${name}`);
+                    NProgress.done();
+                });
+            });
+            
+
+        },
+        
         selectionChange(list) {
             console.log('selectionChange', list);
             this.selectedList = list;
         },
-        // exportWebSite() {
-        //     if (this.selectedList.length === 0) {
-        //         this.$message.warning('璇峰厛閫夋嫨闇�瑕佸鍑虹殑鏁版嵁');
-        //         return;
-        //     }
-        //     this.$confirm('鏄惁瀵煎嚭?', '鎻愮ず', {
-        //         confirmButtonText: '纭畾',
-        //         cancelButtonText: '鍙栨秷',
-        //         type: 'warning',
-        //     }).then(() => {
-        //         NProgress.start();
-        //         exportBlob(
-        //             `/blade-mdm/machineback/filehandle/export-to-inner`,
-        //             {
-        //                 ids: this.selectedList.map(item => item.id).join(','),
-        //             }
-        //         ).then(res => {
-        //             downloadXls(res.data, `瀵煎嚭鍥炰紶娑夊瘑缃�${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
-        //             NProgress.done();
-        //         });
-        //     });
-        // },
-        // exportExcel() {
-        //     if (this.selectedList.length === 0) {
-        //         this.$message.warning('璇峰厛閫夋嫨闇�瑕佸鍑虹殑鏁版嵁');
-        //         return;
-        //     }
-        //     this.$confirm('鏄惁瀵煎嚭?', '鎻愮ず', {
-        //         confirmButtonText: '纭畾',
-        //         cancelButtonText: '鍙栨秷',
-        //         type: 'warning',
-        //     }).then(() => {
-        //         NProgress.start();
-        //         exportBlob(
-        //             `/blade-mdm/machineback/filehandle/export-excel?${this.website.tokenHeader}=${getToken()}`
-        //         ).then(res => {
-        //             downloadXls(res.data, `瀵煎嚭鏈哄簥鍥炰紶绋嬪簭${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
-        //             NProgress.done();
-        //         });
-        //     });
-        // },
+        
         searchChange(params, done) {
             let data = {}
             this.query = params;
@@ -642,7 +635,7 @@
                 createTimeBegin: params.createTimeBegin || undefined,
                 createTimeEnd: params.createTimeEnd || undefined,
                 keyword: params.keyword || undefined,
-                processDefinitionKey: params.processDefinitionKey || undefined
+                myProcessName: params.myProcessName || undefined
             }
             this.query = data
             this.onLoad(this.page, data);
@@ -656,7 +649,7 @@
                 createTimeBegin: params.createTimeBegin,
                 createTimeEnd: params.createTimeEnd,
                 keyword: params.keyword || '',
-                processDefinitionKey: params.processDefinitionKey || ''
+                myProcessName: params.myProcessName || ''
             }
             this.onLoad(this.page, data);
             done();
@@ -680,7 +673,7 @@
                 createTimeBegin: params.createTimeBegin,
                 createTimeEnd: params.createTimeEnd,
                 keyword: params.keyword || '',
-                processDefinitionKey: params.processDefinitionKey || ''
+                myProcessName: params.myProcessName || ''
             };
             this.loading = true;
             getList2(page.currentPage, page.pageSize, Object.assign(data, params)).then(res => {

--
Gitblit v1.9.3