From 9edefe563de10226e322004e21e1db82f7ea227d Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 24 四月 2025 14:10:14 +0800
Subject: [PATCH] 工艺路线详情页面缓存

---
 src/views/technology/routing/index.vue |  167 ++++++++++++++++++++-----------------------------------
 1 files changed, 62 insertions(+), 105 deletions(-)

diff --git a/src/views/technology/routing/index.vue b/src/views/technology/routing/index.vue
index d281799..7c5b002 100644
--- a/src/views/technology/routing/index.vue
+++ b/src/views/technology/routing/index.vue
@@ -1,91 +1,48 @@
 <template>
   <div class="mod-config">
     <basic-container>
-      <ttable
-        :table="table"
-        @handleSelectionChange="handleSelectionChange"
-        @customUploadPage="routingImport"
-        :uploadInfo="uploadInfo"
-        :customUpload="customUpload"
-        :prelang="prelang"
-        :options="options"
-        :ajaxFun="ajaxFun"
-        ref="routingTable"
-      >
+      <ttable :table="table" @handleSelectionChange="handleSelectionChange" @customUploadPage="routingImport"
+        :uploadInfo="uploadInfo" :customUpload="customUpload" :prelang="prelang" :options="options" :ajaxFun="ajaxFun"
+        ref="routingTable">
         <template #toolbar></template>
       </ttable>
       <el-dialog title="瀵煎叆" :visible.sync="importRoutingVisible" width="50%">
         <span>
           <div style="display:flex;justify-content:space-around;">
             <div>
-              <el-upload
-                style="margin-left:8px;display: inline;"
-                class="upload-demo"
-                drag
-                :headers="headers"
-                :action="zhuangbeiUploadInfo.url"
-                :beforeUpload="beforeAvatarUpload"
-                :limit="1"
-                :show-file-list="false"
-                :file-list="zhuangbeifileList"
-                :data="zhuangbeiUploadInfo.uploadData"
-                :on-success="zhuangbeiFileSuccessUploadScan"
-                :on-error="handleError"
+              <el-upload style="margin-left:8px;display: inline;" class="upload-demo" drag :headers="headers"
+                :action="zhuangbeiUploadInfo.url" :beforeUpload="beforeAvatarUpload" :limit="1" :show-file-list="false"
+                :file-list="zhuangbeifileList" :data="zhuangbeiUploadInfo.uploadData"
+                :on-success="zhuangbeiFileSuccessUploadScan" :on-error="handleError"
                 accept=".xlsx,.xls,.csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
-                :auto-upload="true"
-                ref="zhuangbeiUploadScan"
-                multiple
-              >
+                :auto-upload="true" ref="zhuangbeiUploadScan" multiple>
                 <i class="el-icon-upload"></i>
                 <div class="el-upload__text"><em>瀵煎叆瑁呭鏁版嵁</em></div>
                 <div class="el-upload__tip" slot="tip">
-                  鍙兘涓婁紶xlsx/xls鏂囦欢锛屼笖涓嶈秴杩�10M<el-button
-                    type="text"
-                    style="font-size:12px;"
-                    @click="downZhuangbeiDataTemplate"
-                    >涓嬭浇妯℃澘</el-button
-                  >
+                  鍙兘涓婁紶xlsx/xls鏂囦欢锛屼笖涓嶈秴杩�10M<el-button type="text" style="font-size:12px;"
+                    @click="downZhuangbeiDataTemplate">涓嬭浇妯℃澘</el-button>
                 </div>
               </el-upload>
             </div>
             <div>
-              <el-upload
-                style="margin-left:8px;display: inline;"
-                class="upload-demo"
-                drag
-                :headers="headers"
-                :action="shepinUploadInfo.url"
-                :beforeUpload="beforeAvatarUpload"
-                :limit="1"
-                :show-file-list="false"
-                :file-list="shepinfileList"
-                :data="shepinUploadInfo.uploadData"
-                :on-success="shepinFileSuccessUploadScan"
-                :on-error="handleError"
+              <el-upload style="margin-left:8px;display: inline;" class="upload-demo" drag :headers="headers"
+                :action="shepinUploadInfo.url" :beforeUpload="beforeAvatarUpload" :limit="1" :show-file-list="false"
+                :file-list="shepinfileList" :data="shepinUploadInfo.uploadData"
+                :on-success="shepinFileSuccessUploadScan" :on-error="handleError"
                 accept=".xlsx,.xls,.csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
-                :auto-upload="true"
-                ref="shepinUploadScan"
-                multiple
-              >
+                :auto-upload="true" ref="shepinUploadScan" multiple>
                 <i class="el-icon-upload"></i>
                 <div class="el-upload__text"><em>瀵煎叆灏勯鏁版嵁</em></div>
                 <div class="el-upload__tip" slot="tip">
-                  鍙兘涓婁紶xlsx/xls鏂囦欢锛屼笖涓嶈秴杩�10M<el-button
-                    type="text"
-                    style="font-size:12px;"
-                    @click="downShepinDataTemplate"
-                    >涓嬭浇妯℃澘</el-button
-                  >
+                  鍙兘涓婁紶xlsx/xls鏂囦欢锛屼笖涓嶈秴杩�10M<el-button type="text" style="font-size:12px;"
+                    @click="downShepinDataTemplate">涓嬭浇妯℃澘</el-button>
                 </div>
               </el-upload>
             </div>
           </div>
         </span>
       </el-dialog>
-      <partDialog
-        :currshowlist.sync="showPart"
-        @listenToPartEvent="selectPart"
-      />
+      <partDialog :currshowlist.sync="showPart" @listenToPartEvent="selectPart" />
     </basic-container>
   </div>
 </template>
@@ -294,15 +251,15 @@
             searchInfoType: 'text'
           }, */
           // 鏇夸唬鎻忚堪
-         /*  {
-            minWidth: '120',
-            prop: 'alternativeDesc',
-            label: '鏇夸唬鎻忚堪',
-            sort: true,
-            isTrue: true,
-            isSearch: true,
-            searchInfoType: 'text'
-          }, */
+          /*  {
+             minWidth: '120',
+             prop: 'alternativeDesc',
+             label: '鏇夸唬鎻忚堪',
+             sort: true,
+             isTrue: true,
+             isSearch: true,
+             searchInfoType: 'text'
+           }, */
           // 鏄惁宸插悓姝ヨ嚦IFS
           // {
           //   minWidth: '120',
@@ -418,77 +375,77 @@
     this.getData()
   },
   created() {
-    if(this.permissions.technology_routing_add){
+    if (this.permissions.technology_routing_add) {
       this.table.toolbar.push({
         text: '鏂板',
         disabled: false,
         type: 'primary',
-        fun: ()=>{this.addOrUpdateHandle()},
+        fun: () => { this.addOrUpdateHandle() },
         permitArr: []
       })
     }
-    if(this.permissions.technology_routing_accept){
+    if (this.permissions.technology_routing_accept) {
       this.table.toolbar.push({
         text: '鎵瑰噯',
         disabled: true,
-        fun: ()=>{this.approveHandle('ACCEPT')},
+        fun: () => { this.approveHandle('ACCEPT') },
         permitArr: ['01draft'],
       })
     }
-    if(this.permissions.technology_routing_revoke){
+    if (this.permissions.technology_routing_revoke) {
       this.table.toolbar.push({
         text: '鎾ゅ洖',
         disabled: true,
-        fun: () => {this.approveHandle('REVOKE')},
+        fun: () => { this.approveHandle('REVOKE') },
         permitArr: ['02accepted'],
       })
     }
-    if(this.permissions.technology_routing_cancel){
+    if (this.permissions.technology_routing_cancel) {
       this.table.toolbar.push({
         text: '鎷掔粷',
         disabled: true,
-        fun: ()=>{this.approveHandle('CANCEL')},
+        fun: () => { this.approveHandle('CANCEL') },
         permitArr: ['02accepted'],
       })
     }
-    if(this.permissions.technology_routing_copy){
+    if (this.permissions.technology_routing_copy) {
       this.table.toolbar.push({
         text: '澶嶅埗',
         disabled: false,
-        fun: ()=>{this.copyRouting()},
+        fun: () => { this.copyRouting() },
         permitArr: []
       })
     }
-    if(this.permissions.technology_routing_batch_del){
+    if (this.permissions.technology_routing_batch_del) {
       this.table.toolbar.push({
         text: '鎵归噺鍒犻櫎',
-        type:'primary',
+        type: 'primary',
         disabled: false,
         permitArr: [],
-        fun: ()=>{this.deleteAll()},
+        fun: () => { this.deleteAll() },
       })
     }
-    if(this.permissions.technology_routing_del){
+    if (this.permissions.technology_routing_del) {
       this.table.operator = [
-          {
-            text: '鍒犻櫎',
-            type: 'text',
-            size: 'small',
-            fun: this.deleteHandle
-            // show: {
-            //   val: ['01draft'],
-            //   key: 'state'
-            // }
-          }
-        ]
+        {
+          text: '鍒犻櫎',
+          type: 'text',
+          size: 'small',
+          fun: this.deleteHandle
+          // show: {
+          //   val: ['01draft'],
+          //   key: 'state'
+          // }
+        }
+      ]
     }
     this.getBomTypeDbOptions()
   },
-  watch:{
-    multipleSelection(newVal){
-      if(newVal.length==0){
-        this.table.toolbar.forEach(ele=>{
-          if(ele.text=='鎷掔粷' || ele.text=='鎵瑰噯' || ele.text=='鎾ゅ洖'){
+  watch: {
+    multipleSelection(newVal) {
+      if (newVal.length == 0) {
+        this.table.toolbar.forEach(ele => {
+          if (ele.text == '鎷掔粷' || ele.text == '鎵瑰噯' || ele.text == '鎾ゅ洖') {
             ele.disabled = true
           }
         })
@@ -510,12 +467,12 @@
     },
     // 鏂板 / 淇敼
     addOrUpdateHandle(row) {
-      if(!this.permissions.technology_routing_edit && row.id!=null){
+      if (!this.permissions.technology_routing_edit && row.id != null) {
         this.$message.error("璇ヨ鑹叉病鏈夋搷浣滄潈闄�")
         return
       }
       this.$router.push({
-        name: 'routingForm',
+        path: '/technology/routing/routing-form',
         query: { id: row == null ? null : row.id }
       })
     },
@@ -527,7 +484,7 @@
         closeOnClickModal: false,
         type: 'warning'
       })
-        .then(function() {
+        .then(function () {
           const ids = []
           ids.push(row.id)
           return delObj(ids)
@@ -552,7 +509,7 @@
           type: 'warning',
           closeOnClickModal: false
         })
-          .then(function() {
+          .then(function () {
             const ids = that.multipleSelection.map((item) => {
               return item.id
             })
@@ -609,7 +566,7 @@
     handleSelectionChange(val) {
       // 鏍规嵁鐘舵�侊紝绂佺敤琛ㄥご鎸夐挳
       // 绛涢�夊嚭閫変腑璁板綍鐨勭姸鎬�
-      var stateArr = val.map(function(value, index) {
+      var stateArr = val.map(function (value, index) {
         return value.state
       })
       // 閫変腑鐘舵�佹暟缁勫厓绱犲幓閲�

--
Gitblit v1.9.3