From ef561e204ee6fd7df25477b456b0d466b026550e Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期一, 30 一月 2023 15:28:32 +0800
Subject: [PATCH] 1.tagView标签新增可拖动功能

---
 src/views/zzmx/jpgj.vue |   25 ++++++++++++++++++-------
 1 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/src/views/zzmx/jpgj.vue b/src/views/zzmx/jpgj.vue
index d2ba5d2..2dd8453 100644
--- a/src/views/zzmx/jpgj.vue
+++ b/src/views/zzmx/jpgj.vue
@@ -13,10 +13,10 @@
           :model="form"
           label-width="100px"
           inline
-          style="display: flex;justify-content: space-between"
+          style="display: flex;"
         >
           <div class="elForm">
-            <el-form-item label-width="70px" label="浜у搧鍚嶇О" style=" display: flex;">
+            <el-form-item label="浜у搧鍚嶇О" style=" display: flex;">
               <el-select
                 v-model="form.partcode"
                 filterable
@@ -88,7 +88,7 @@
               </el-select>
             </el-form-item>
           </div>
-          <div class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened?'5%':'10%'}">
+          <div class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}">
             <el-button type="primary" icon="el-icon-search" @click="search">鏌ヨ</el-button>
             <el-button type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
           </div>
@@ -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