From 13c58d78112a8bb63abd288a51165f122fc0965b Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 31 一月 2023 10:29:57 +0800
Subject: [PATCH] 1.页面刷新功能优化

---
 src/views/zzmx/jpgj.vue |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/src/views/zzmx/jpgj.vue b/src/views/zzmx/jpgj.vue
index b2ae70b..2dd8453 100644
--- a/src/views/zzmx/jpgj.vue
+++ b/src/views/zzmx/jpgj.vue
@@ -246,6 +246,7 @@
     </div>
 
     <el-dialog
+      v-el-drag-dialog
       :title="operation==='add'?'鏂板':'缂栬緫'"
       :visible.sync="dialogVisible"
       width="1000px"
@@ -333,6 +334,7 @@
 
         <el-table
           ref="eqpDialogArrRef"
+          :key="tableTimeStampKey"
           class="tableFixed"
           :data="eqpDialogArr"
           :height="tableHeight"
@@ -444,10 +446,10 @@
           >
             <template slot-scope="{row}">
               <div class="operationClass">
-                <el-button v-show="row.isVisible===1" type="text" @click="saveRow(row)">淇濆瓨</el-button>
-                <el-button v-show="row.isVisible===1" type="text" @click="cancelRow(row)">鍙栨秷</el-button>
-                <el-button v-show="row.isVisible===0" type="text" @click="editRow(row)">缂栬緫</el-button>
-                <el-button v-show="row.isVisible===0" type="text" @click="copyRow(row)">澶嶅埗</el-button>
+                <el-button v-if="row.isVisible===1" type="text" @click="saveRow(row)">淇濆瓨</el-button>
+                <el-button v-if="row.isVisible===1" type="text" @click="cancelRow(row)">鍙栨秷</el-button>
+                <el-button v-if="row.isVisible===0" type="text" @click="editRow(row)">缂栬緫</el-button>
+                <el-button v-if="row.isVisible===0" type="text" @click="copyRow(row)">澶嶅埗</el-button>
               </div>
             </template>
           </el-table-column>
@@ -499,12 +501,14 @@
   StepSelectEqpList
 } from '@/api/zzmx'
 import ImportPicker from '@/components/ImportPicker'
+import elDragDialog from '@/directive/el-drag-dialog'
 
 export default {
   name: 'JPGJ',
   components: {
     Pagination, ImportPicker
   },
+  directives: { elDragDialog },
   data() {
     return {
       isIpad: false,
@@ -559,6 +563,8 @@
       operation: '',
       dialogFormRules: {},
       radioChangeTempValue: '',
+
+      tableTimeStampKey: new Date().getTime(),
 
       title_value: '鏁版嵁瀵煎叆 / 鑺傛媿宸ヤ环',
       code: '24',
@@ -727,6 +733,10 @@
     // 鍙栨秷琛�
     cancelRow(row) {
       this.getEqpTable()
+
+      this.radioChange(this.radioChangeTempValue)
+      this.dialogForm.stepcode = this.radioChangeTempValue
+
       this.isEqpTableEdit = true
     },
     // 缂栬緫琛�
@@ -742,6 +752,7 @@
           }
         })
         this.isEqpTableEdit = false
+        this.tableTimeStampKey = new Date().getTime()
       } else {
         return this.$message.info('鍙兘涓�琛屼竴琛屼慨鏀癸紒')
       }

--
Gitblit v1.9.3