From 729b698b17d7468acbc6c495746a72c9150fdaeb Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期二, 09 九月 2025 11:49:47 +0800
Subject: [PATCH] 按钮改名下传

---
 src/views/statreport/confirmTablePrint.vue |  235 ++++++----------------------------------------------------
 1 files changed, 27 insertions(+), 208 deletions(-)

diff --git a/src/views/statreport/confirmTablePrint.vue b/src/views/statreport/confirmTablePrint.vue
index 75fa687..974078f 100644
--- a/src/views/statreport/confirmTablePrint.vue
+++ b/src/views/statreport/confirmTablePrint.vue
@@ -15,39 +15,18 @@
                 
             </template>
             <template #menu="scope">
-                <el-button type="primary" text size="default" @click.stop="customView(scope.row, scope.index, 0)">鏌ョ湅
+                <el-button type="primary" text size="default" @click.stop="handleConfirmTable(scope.row, scope.index, 0)">涓嬭浇纭琛�
                 </el-button>
-                <!--
-               <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="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%">
-            <avue-form ref="reassginform" :option="reassignOption" v-model="reassignForm"
-                @submit="toPerson"></avue-form>
-        </el-dialog>
 
-        <el-dialog title="鏌ョ湅璇︽儏" v-model="dialogVisible" width="60%">
-            <avue-form v-model="viewRow" :option="viewFormOption" readonly class="viewRowForm"></avue-form>
-            <el-table :data="tableData" style="width: 100%">
-                <el-table-column prop="assigneeName" label="鎵ц浜�" />
-                <el-table-column prop="taskName" label="浠诲姟鍚嶇О" />
-                <el-table-column prop="comment" label="鎵规敞" />
-                <el-table-column prop="createTime" label="寮�濮嬫椂闂�" />
-                <el-table-column prop="endTime" label="瀹屾垚鏃堕棿" />
-            </el-table>
-        </el-dialog>
     </basic-container>
 </template>
 
 <script>
-import { getList2, deleteRow, printRow } from '@/api/flowmgr/processQuery.js';
-import { getAssignee, reassgin } from '@/api/flow/todolist';
+import { getConfirmTableList } from '@/api/statreport/confirmtable.js';
+import { getAssignee, } from '@/api/flow/todolist';
 import { exportBlobPost } from '@/api/common';
 import NProgress from 'nprogress';
 import { downloadFile } from '@/utils/util';
@@ -83,24 +62,13 @@
                 border: true,
                 index: true,
                 selection: false,
-                menuWidth: 80,
+                menuWidth: 100,
                 // menu: false,
                 labelWidth: 90,
                 menuSpan: 6,
                 dialogClickModal: false,
                 column: [
-                    {
-                        label: '娴佺▼鍚嶇О',
-                        prop: 'myProcessName',
-                        search: true,
-                        searchType: 'select',
-                        hide: true,
-                        dicUrl: `/blade-system/dict-biz/dictionary?code=process_name`,
-                        props: {
-                            label: 'dictValue',
-                            value: 'dictValue',
-                        },
-                    },
+                    
                     {
                         label: '鍒涘缓鏃堕棿',
                         prop: 'createTime',
@@ -119,45 +87,21 @@
                         hide: true,
                         viewDisplay: false,
                     },
-					{
-                        label: '鏍囬',
-                        prop: 'variables.title',
-                        width: 150,
-						render: ({ row }) => {
-                            return h('p',
-                                {
-                                    attrs: {},
-                                    class: {},
-                                    style: {},
-                                }, row?.variables?.title)
-                        },
-                        renderForm: ({ row }) => {
-                            return h('span', {
-                                attrs: {},
-                                class: {},
-                                style: {},
-                            }, row?.variables?.title || '');
-                        }
-                    },
-					{
-                        label: '娴佺▼鍚嶇О',
-                        prop: '',
-                        width: 80,
-						render: ({ row }) => {
-                            return h('p',
-                                {
-                                    attrs: {},
-                                    class: {},
-                                    style: {},
-                                }, row?.variables?.myProcessName)
-                        }
-                    },
+					
                     {
                         label: '鎵规鍙�',
                         prop: 'variables.craftEdition',
                         width: 80,
                         render: ({ row }) => {
                             return h('span', {}, row?.variables?.craftEdition || '');
+                        }
+                    },
+                     {
+                        label: '闆剁粍浠跺彿',
+                        prop: 'drawingNo',
+                        width: 80,
+                        render: ({ row }) => {
+                            return h('span', {}, row?.variables?.drawingNo || '');
                         }
                     },
                     {
@@ -184,14 +128,7 @@
                             return h('span', {}, row?.variables?.processEdition || '');
                         }
                     },
-                    {
-                        label: '闆剁粍浠跺彿',
-                        prop: 'drawingNo',
-                        width: 80,
-                        render: ({ row }) => {
-                            return h('span', {}, row?.variables?.drawingNo || '');
-                        }
-                    },
+                   
                     {
                         label: '浠诲姟杞﹂棿',
                         prop: 'workshop',
@@ -202,8 +139,11 @@
                     },
                     {
                         label: '杩囩▼鍗″彿',
-                        prop: 'empty',
+                        prop: '',
                         width: 80,
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.processCard || '');
+                        },
                     },
 					{
                         label: '鍥惧彿',
@@ -266,34 +206,8 @@
                         }
                     },
                     {
-                        label: '鍒涘缓浜�',
-                        prop: 'startUserName',
-						width: 80,
-                    },
-                    {
                         label: '鍒涘缓鏃堕棿',
                         prop: 'processCreateTime',
-                    },
-                    {
-                        label: '褰撳墠鑺傜偣',
-                        prop: 'taskName',
-						width: 90
-                    },
-                    {
-                        label: '璁″垝鍔犲伐鏃堕棿',
-                        prop: 'planStartTime',
-                        width: 180,
-                        render: ({ row }) => {
-                            return h('span', {}, row?.variables?.planStartTime || '');
-                        }
-                    },
-                    {
-                        label: '绋嬪簭鍖呭悕',
-                        prop: 'programPackageName',
-                        width: 80,
-                        render: ({ row }) => {
-                            return h('span', {}, row?.variables?.programPackageName || '');
-                        }
                     },
                 ],
             },
@@ -370,9 +284,9 @@
                     },
                     {
                         label: '杩囩▼鍗″彿',
-                        prop: 'empty',
+                        prop: '',
                         render: ({ row }) => {
-                            return h('p',{'class': 'margin0'}, row?.variables?.empty || '');
+                            return h('p',{'class': 'margin0'}, row?.variables?.processCard || '');
                         }
                     },
                     {
@@ -494,112 +408,18 @@
             });
             this.dialogVisible = true;
         },
-        reassign() {// 閲嶆柊鎸囨淳
-            console.log(this.selectedList.length)
-            if (this.selectedList.length === 0) {
-                this.$message.warning('璇烽�夋嫨闇�瑕侀噸鏂版寚娲剧殑浠诲姟');
-                return;
-            }
-            if (this.selectedList.length > 1) {
-                this.$message.warning('璇烽�夋嫨涓�鏉�');
-                return;
-            }
-            this.reassignBox = true;
-        },
-        toPerson(form, done) {
-            this.$confirm('璇风‘璁ゆ槸鍚︽寚娲�', '', {
-                confirmButtonText: this.$t('submitText'),
-                cancelButtonText: this.$t('cancelText'),
-                type: 'warning',
-            }).then(() => {
-                console.log('toPerson', form);
-                reassgin({
-                    ...form,
-                    taskId: this.selectedList[0].taskId,
-                    processInstanceId: this.selectedList[0].processInstanceId,
-                }).then(res => {
-                    this.$message.success('鎸囨淳鎴愬姛');
-                    this.reassignBox = false;
-                    this.$refs?.reassginform?.resetForm();
-                    this.onLoad(this.page, this.query);
-
-                }).catch(err => {
-                    console.error(err);
-                })
-            });
-            done();
-        },
-        handleAction(row, index, flag) {
-            if (flag === 0) {
-                // 澶勭悊鎺ュ彈鎴栨嫆缁濇搷浣�
-                let ids = [row.id].toString();
-                this.$confirm('纭畾灏嗛�夋嫨鏁版嵁鍒犻櫎?', {
-                    confirmButtonText: '纭畾',
-                    cancelButtonText: '鍙栨秷',
-                    type: 'warning',
-                })
-                    .then(() => {
-                        deleteRow({ processInstanceId: row.processInstanceId,id:row.processInstanceId }).then(res => {
-                            this.onLoad(this.page, this.query);
-                        })
-                    })
-            } else if (flag === 1) {
-               
-                this.$confirm('鏄惁瀵煎嚭?', '鎻愮ず', {
-                    confirmButtonText: '纭畾',
-                    cancelButtonText: '鍙栨秷',
-                    type: 'warning',
-                }).then(() => {
-                    console.log(this.selection)
-                    NProgress.start();
-                    exportBlobPost(
-                        `/blade-mdm/flow/mgr/export-approve-table`,
-                        { processInstanceId: row.processInstanceId },
-                        { processInstanceId: row.processInstanceId },
-                    ).then(res => {
-                        let name = res.headers['content-disposition'].split('filename=')[1]
-                        console.log(res.headers['content-disposition'].split('filename=')[1]);
-                        downloadFile(res.data, `瀹℃壒鎵撳嵃-${name}`);
-                        NProgress.done();
-                    });
-                });
-            }
-
-        },
-        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('鏄惁瀵煎嚭纭琛�?', '鎻愮ず', {
+            this.$confirm('鏄惁瀵煎嚭纭琛�1?', '鎻愮ず', {
                 confirmButtonText: '纭畾',
                 cancelButtonText: '鍙栨秷',
                 type: 'warning',
             }).then(() => {
-                console.log(this.selection)
+                
                 NProgress.start();
                 exportBlobPost(
-                    `/blade-mdm/flow/mgr/export-confirm-table`,
+                    `/blade-mdm/statreport/tableprint/export-confirm-table`,
                     { processInstanceId: row.processInstanceId }
                 ).then(res => {
                     let name = res.headers['content-disposition'].split('filename=')[1]
@@ -676,13 +496,12 @@
                 myProcessName: params.myProcessName || ''
             };
             this.loading = true;
-            getList2(page.currentPage, page.pageSize, Object.assign(data, params)).then(res => {
+            getConfirmTableList(page.currentPage, page.pageSize, Object.assign(data, params)).then(res => {
                 const data = res.data.data
                 this.page.total = data.total;
                 this.data = data.records.map(v=> {
                     return {
                         ...v,
-                        id: v.processInstanceId,
                     }
                 });
                 this.loading = false;

--
Gitblit v1.9.3