From b311b3cfee0a4635c236eea6c5870d805a29a160 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期一, 22 九月 2025 13:09:31 +0800
Subject: [PATCH] 优化导出工控网

---
 src/views/flowmgr/programonmachine.vue        |   56 ++++++++------
 src/views/flowmgr/taskassigntemp.vue          |   19 +++-
 src/views/tasks/machinereturnfileop.vue       |    7 -
 src/views/flowmgr/exceptiontask.vue           |    4 
 src/views/flowmgr/programexport.vue           |   78 ++++++++++++-------
 src/views/flowmgr/taskassign.vue              |   25 ++++-
 src/views/statreport/machinefileexception.vue |    1 
 7 files changed, 120 insertions(+), 70 deletions(-)

diff --git a/src/views/flowmgr/exceptiontask.vue b/src/views/flowmgr/exceptiontask.vue
index 070edfd..cf97c21 100644
--- a/src/views/flowmgr/exceptiontask.vue
+++ b/src/views/flowmgr/exceptiontask.vue
@@ -244,7 +244,7 @@
         showStartBox(row){
             this.startForm = row;
             queryProgrammer(row.drawingNo).then(res=>{
-                console.log(res);
+                
                 if(res.data.data.code == 200){
                     this.startForm.producePlanId =res.data.data.id;
                     this.startForm.programmerName = res.data.data.programmer;
@@ -284,7 +284,7 @@
                                 type: 'success',
                                 message: '鎿嶄綔鎴愬姛!',
                             });
-                           
+                           this.startBox = false;
                             this.onLoad(this.page,this.query);
                         }else{
                             this.$message({
diff --git a/src/views/flowmgr/programexport.vue b/src/views/flowmgr/programexport.vue
index c5ba897..5ea9bbf 100644
--- a/src/views/flowmgr/programexport.vue
+++ b/src/views/flowmgr/programexport.vue
@@ -8,32 +8,25 @@
     <basic-container>
         <el-tabs v-model="activeName" type="card" class="demo-tabs" @tab-click="tabsClick">
             <el-tab-pane label="寰呭姙" name="todo">
-                <avue-crud :option="option" :table-loading="loading" :data="data" v-model:page="page" v-model="form" ref="crud" @current-change="currentChange"
-                    @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange">
+                <avue-crud :option="option" :search="searchData" :table-loading="loading" :data="data" v-model:page="page" v-model="form" ref="crud" @current-change="currentChange"
+                    @size-change="sizeChange" @refresh-change="refreshChange" @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange">
                     <template #menu-left>
-                        <!-- <el-button type="primary" plain @click="exportWebSite">瀵煎嚭鍥炰紶娑夊瘑缃�</el-button> -->
-                        <!-- <el-button type="primary" plain @click="reassign">鎸傝浇杞﹀簥绋嬪簭搴�</el-button> -->
+                      <!-- @on-load="onLoad"-->
                         <el-button type="primary" :disabled="this.selection.length==0" plain @click="exportExcel">瀵煎嚭</el-button>
                     </template>
                     <template #menu="scope">
-                        <!-- <el-button type="primary" text size="default"
-                            @click.stop="handleAction(scope.row, scope.index)">澶勭悊鎰忚
-                        </el-button> -->
                     </template>
                 </avue-crud>
             </el-tab-pane>
             <el-tab-pane label="宸插姙" name="completed">
-                <avue-crud :option="optionCompleted" :table-loading="loading" :data="data" v-model:page="page" v-model="form" ref="crud" @current-change="currentChange"
-                    @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange">
+                <avue-crud :option="optionCompleted" :search="searchData" :table-loading="loading" :data="data" v-model:page="page" v-model="form" ref="crud1" @current-change="currentChange"
+                    @size-change="sizeChange" @refresh-change="refreshChange" @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange">
                     <template #menu-left>
-                        <!-- <el-button type="primary" plain @click="exportWebSite">瀵煎嚭鍥炰紶娑夊瘑缃�</el-button> -->
+                        <!-- <el-button type="primary" plain @click="exportWebSite">瀵煎嚭鍥炰紶娑夊瘑缃�</el-button> @on-load="onLoad" -->
                         <!-- <el-button type="primary" plain @click="reassign">鎸傝浇杞﹀簥绋嬪簭搴�</el-button> -->
                         <el-button type="primary" :disabled="this.selection.length==0" plain @click="exportExcel">瀵煎嚭</el-button>
                     </template>
                     <template #menu="scope">
-                        <!-- <el-button type="primary" text size="default"
-                            @click.stop="handleAction(scope.row, scope.index)">澶勭悊鎰忚
-                        </el-button> -->
                     </template>
                 </avue-crud>
             </el-tab-pane>
@@ -60,6 +53,7 @@
                 total: 0,
             },
             form: {},
+            searchData:{},
             query: {},
             loading: true,
             data: [],
@@ -71,16 +65,13 @@
                 viewBtn: true,
                 columnBtn: false,
                 tip: false,
-                // simplePage: true,
                 searchShow: true,
                 searchMenuSpan: 6,
                 searchEnter:true,
                 dialogWidth: '60%',
-                // tree: true,
                 border: true,
                 index: true,
                 selection: true,
-                // viewBtn: true,
                 menuWidth: 200,
                 menu: false,
                 dialogClickModal: false,
@@ -120,7 +111,17 @@
                         label: '绋嬪簭鍖呭悕',
                         prop: 'name',
                         search: true,
+                        searchSpan:6,
                         with: 100
+                    },
+                     {
+                        label: '鏌ヨ鑼冨洿',
+                        prop: 'queryType',
+                        type: 'select',
+                        search: true,
+                        clearable:false,
+                        searchSpan:4,
+                        with: 100,
                     },
                     {
                         label: '閫氳繃鏃堕棿',
@@ -223,10 +224,11 @@
                         sortable: true,
                     },
                 ],
-            }
+            },
         };
     },
     methods: {
+        
         tabsClick(tab,event) {
             this.onLoad(this.page, this.query);
         },
@@ -246,16 +248,18 @@
         },
         searchChange(params, done) {
             let data = {}
+            
             this.query = params;
             this.page.currentPage = 1;
-            console.log('searchChange', params);
+            //console.log('searchChange', params);
             params.passTimeBegin = params?.passTime?.[0] || '';
             params.passTimeEnd = params?.passTime?.[1] || '';
-            console.log(params);
+            //console.log(params);
             data = {
                 createTimeBegin: params.passTimeBegin,
                 createTimeEnd: params.passTimeEnd,
-                name: params.name || ''
+                name: params.name || '',
+                queryType:this.query.queryType
             }
             this.query = data
             this.onLoad(this.page, data);
@@ -263,6 +267,7 @@
         },
         searchReset() {
             this.query = {};
+            this.query.queryType = this.searchData.queryType;
             this.onLoad(this.page);
         },
         /** * 椤甸潰鍔犺浇鏃惰幏鍙栨暟鎹�
@@ -270,17 +275,10 @@
         onLoad(page, params = {}) {
             const query = {
                 ...this.query,
-                // category: params.category ? flowCategory(params.category) : null,
-                mode: this.mode,
             };
             var status = this.activeName == 'todo'?null:2;
             params.status = status;
-            try {
-                delete query.confirmTime; // 鍒犻櫎涓嶅繀瑕佺殑鏌ヨ鏉′欢
-            } catch (error) {
-                console.error('鏃ユ湡鏍煎紡鍖栭敊璇�', error);
-            }
-
+           
             this.loading = true;
             getList(page.currentPage, page.pageSize, Object.assign(query, params)).then(res => {
                 const data = res.data.data;
@@ -353,8 +351,32 @@
             });
         },
     },
+    computed: {
+       ...mapGetters(['permission']),
+       
+    },
     mounted() {
+        let queryTypeDicData = [
+                            {
+                                label: '鍚岀粍缂栧埗',
+                                value:'group',
+                            },
+                            {
+                                label: '鏈汉缂栧埗',
+                                value:'self',
+                            }
+                        ];
+       
+        //console.log('this.permission.program_allexpor',this.permission.program_allexport)
+        if(this.permission.program_allexport==true){
+            queryTypeDicData.push({label:'鍏ㄩ儴鏁版嵁',value:'all'});
+            this.searchData.queryType = 'all'
+        }else{
+            this.searchData.queryType = 'self';
+        }
+        this.option.column[7].dicData = queryTypeDicData;
 
+        this.onLoad(this.page, this.searchData);
     }
 }
 </script>
diff --git a/src/views/flowmgr/programonmachine.vue b/src/views/flowmgr/programonmachine.vue
index 7ee1686..948a825 100644
--- a/src/views/flowmgr/programonmachine.vue
+++ b/src/views/flowmgr/programonmachine.vue
@@ -106,7 +106,7 @@
                     {
                         label: '宸ュ簭鐗堟',
                         prop: 'processEdition',
-                        width: 80,
+                        width: 82,
                         render: ({ row }) => {
                             return h('span', {}, row?.variables?.processEdition || '');
                         }
@@ -122,20 +122,46 @@
                     {
                         label: '浠诲姟杞﹂棿',
                         prop: 'workshop',
-                        width: 80,
+                        width: 82,
                         render: ({ row }) => {
                             return h('p',{'class': 'margin0'}, row?.variables?.workshop || '');
                         }
                     },
                     {
+                        label: '鏈哄簥',
+                        prop: '',
+                        render: ({ row }) => {
+                            return h('p',
+                                {
+                                    attrs: {},
+                                    class: {},
+                                    style: {},
+                                }, row?.variables?.machineCode)
+                        },
+                        renderForm: ({ row }) => {
+                            return h('span', {
+                                attrs: {},
+                                class: {},
+                                style: {},
+                            }, row?.variables?.machineCode || '');
+                        }
+                    },
+                    {
                         label: '杩囩▼鍗″彿',
                         prop: '',
-                        width: 80,
+                        width: 82,
                         render: ({ row }) => {
                             return h('p',{'class': 'margin0'}, row?.variables?.processCard || '');
                         },
                     },
-					
+					{
+                        label: '涓存椂鏇存敼鍗�',
+                        prop: '',
+                        width: 95,
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.deviation || '');
+                        },
+                    },
 					{
                         label: '浜у搧鍨嬪彿',
                         prop: '',
@@ -157,25 +183,7 @@
                         }
                     },
 					
-                    {
-                        label: '鏈哄簥',
-                        prop: '',
-                        render: ({ row }) => {
-                            return h('p',
-                                {
-                                    attrs: {},
-                                    class: {},
-                                    style: {},
-                                }, row?.variables?.machineCode)
-                        },
-                        renderForm: ({ row }) => {
-                            return h('span', {
-                                attrs: {},
-                                class: {},
-                                style: {},
-                            }, row?.variables?.machineCode || '');
-                        }
-                    },
+                    
                     {
                         label: '鍒涘缓鏃堕棿',
                         prop: 'processCreateTime',
@@ -258,7 +266,7 @@
                 ...this.query,
                 endTimeBegin: this.query?.endTime?.[0] || undefined,
                 endTimeEnd: this.query?.endTime?.[1] || undefined,
-                drawingNo: params.drawingNo || '',
+                //drawingNo: params.drawingNo || '',
             };
             this.loading = true;
             getList(page.currentPage, page.pageSize, Object.assign(data, params)).then(res => {
diff --git a/src/views/flowmgr/taskassign.vue b/src/views/flowmgr/taskassign.vue
index a27f14d..2c27e8c 100644
--- a/src/views/flowmgr/taskassign.vue
+++ b/src/views/flowmgr/taskassign.vue
@@ -17,9 +17,13 @@
       </template>
       <template #drawingNo="{}">
         <el-autocomplete   v-model="attachForm.drawingNo"
-        :fetch-suggestions="querySearchAsync"
-        :trigger-on-focus="false" @select="handleSelect"
+        :trigger-on-focus="false" :fetch-suggestions="querySearchAsync"
+         @select="handleSelect"
           >
+          <!--
+          <template solt="input" slot-scope="{$attrs}">
+            <input type="hidden" :disabled="true" :value="$refs.input.value"/>
+          </template>-->
         </el-autocomplete>
       </template>
       <!--
@@ -114,11 +118,9 @@
             prop: 'productModel',
             type: 'input',
             span: 12,
+            disabled:true,
+            placeholder:'閫夋嫨闆剁粍浠跺彿鑷姩濉厖',
             dataType: 'string',
-            rules: [{ required: true, message: '蹇呭~', trigger: 'blur' }],
-            blur: (col) => {
-              this.handleTrim(col)
-            },
           },
           {
             label: '宸ュ簭鍙�',
@@ -132,6 +134,15 @@
             blur: (col) => {
               this.handleTrim(col)
             },
+          },
+          {
+            label: '闆剁粍浠跺悕绉�',
+            prop: 'drawingName',
+            type: 'input',
+            placeholder:'閫夋嫨闆剁粍浠跺彿鑷姩濉厖',
+            span: 12,
+            disabled:true,
+            dataType: 'string',
           },
           {
             label: '宸ュ簭鍚嶇О',
@@ -298,6 +309,7 @@
         params: {drawingNo: query},
       }).then(
         res => {
+          this.attachForm.productModel = '';//
           if(res.data.code == 200){
             let list = res.data.data;
             for(let i of list){
@@ -319,6 +331,7 @@
     },
     handleSelect(item) {
       this.attachForm.productModel = item.cph;
+      this.attachForm.drawingName = item.ljmc;
     },
     /*
     queryProgrammerAsync(query, cb) {//涓荤宸ヨ壓鎼滅储寤鸿
diff --git a/src/views/flowmgr/taskassigntemp.vue b/src/views/flowmgr/taskassigntemp.vue
index cf87a20..a81c6b2 100644
--- a/src/views/flowmgr/taskassigntemp.vue
+++ b/src/views/flowmgr/taskassigntemp.vue
@@ -107,11 +107,9 @@
             prop: 'productModel',
             type: 'input',
             span: 12,
+            disabled:true,
+            placeholder:'閫夋嫨闆剁粍浠跺彿鑷姩濉厖',
             dataType: 'string',
-            rules: [{ required: true, message: '蹇呭~', trigger: 'blur' }],
-            blur: (col) => {
-              this.handleTrim(col)
-            },
           },
           {
             label: '宸ュ簭鍙�',
@@ -126,6 +124,15 @@
             blur: (col) => {
               this.handleTrim(col)
             },
+          },
+          {
+            label: '闆剁粍浠跺悕绉�',
+            prop: 'drawingName',
+            type: 'input',
+            placeholder:'閫夋嫨闆剁粍浠跺彿鑷姩濉厖',
+            span: 12,
+            disabled:true,
+            dataType: 'string',
           },
           {
             label: '宸ュ簭鍚嶇О',
@@ -152,7 +159,7 @@
           {
             label: '鎵规鍙�',
             prop: 'craftEdition',
-            placeholder:'濡�"A"',
+            placeholder:'濡�"2S24001"',
             type: 'input',
             span: 12,
             dataType: 'string',
@@ -277,6 +284,7 @@
         params: {drawingNo: query},
       }).then(
         res => {
+          this.attachForm.productModel = '';
           if(res.data.code == 200){
             let list = res.data.data;
             for(let i of list){
@@ -298,6 +306,7 @@
     },
     handleSelect(item) {
       this.attachForm.productModel = item.cph;
+      this.attachForm.drawingName = item.ljmc;
     },
     handleTrim(col){
       //console.log(col)
diff --git a/src/views/statreport/machinefileexception.vue b/src/views/statreport/machinefileexception.vue
index 7b0a4e3..1dc7846 100644
--- a/src/views/statreport/machinefileexception.vue
+++ b/src/views/statreport/machinefileexception.vue
@@ -3,7 +3,6 @@
  * @Date: 2025-06-18 09:17:09
  * @LastEditors: gaoshp
  * @LastEditTime: 2025-08-13 21:23:34
- * @FilePath: /mdmweb/src/views/tasks/machinereturnfileop.vue
 -->
 <template>
     <basic-container>
diff --git a/src/views/tasks/machinereturnfileop.vue b/src/views/tasks/machinereturnfileop.vue
index 3af182e..21510c5 100644
--- a/src/views/tasks/machinereturnfileop.vue
+++ b/src/views/tasks/machinereturnfileop.vue
@@ -49,15 +49,12 @@
                 delBtn: false,
                 columnBtn: false,
                 tip: false,
-                // simplePage: true,
                 searchShow: true,
                 searchMenuSpan: 6,
                 dialogWidth: '60%',
-                // tree: true,
                 border: true,
                 index: true,
                 selection: true,
-                // viewBtn: true,
                 menuWidth: 100,
                 menu: false,
                 dialogClickModal: false,
@@ -67,12 +64,14 @@
                         label: '鏂囦欢鍚嶇О',
                         prop: 'name',
                         search:true,
+                        searchSpan:4
                     },
                     {
                         label: '瀵煎嚭鐘舵��',
                         prop: 'status',
                         search:true,
                         type:'select',
+                        searchSpan:4,
                         dicData:[
                             {
                                 label: '鏈鍑�',
@@ -124,7 +123,7 @@
                         valueFormat: 'YYYY-MM-DD HH:mm:ss',
                         search: true,
                         searchRange: true,
-                        searchSpan: 8,
+                        searchSpan: 10,
                         hide: false,
                     },
 					{

--
Gitblit v1.9.3