From b46bc2dba51a3885a68e4c58316b41a31ea16bb2 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 14 二月 2023 13:35:03 +0800
Subject: [PATCH] 1.存货档案修改

---
 src/views/zzmx/gxdy.vue |  354 +++++++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 238 insertions(+), 116 deletions(-)

diff --git a/src/views/zzmx/gxdy.vue b/src/views/zzmx/gxdy.vue
index c98245e..f4d01a2 100644
--- a/src/views/zzmx/gxdy.vue
+++ b/src/views/zzmx/gxdy.vue
@@ -3,17 +3,17 @@
     <div class="body" :style="{height:mainHeight+'px'}">
 
       <div class="bodyTopButtonGroup">
-        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>
-        <!--        <el-button type="primary" icon="el-icon-upload2" @click="upload">瀵煎叆</el-button>-->
+        <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>
+        <!--        <el-button v-waves type="primary" icon="el-icon-upload2" @click="upload">瀵煎叆</el-button>-->
       </div>
 
       <div class="bodyTopFormGroup">
         <el-form
           ref="form"
           :model="form"
-          label-width="80px"
+          label-width="100px"
           inline
-          style="display: flex;justify-content: space-between"
+          style="display: flex;"
         >
           <div class="elForm">
             <el-form-item label="宸ュ簭缂栫爜" style=" display: flex;">
@@ -54,24 +54,43 @@
                 />
               </el-select>
             </el-form-item>
-            <el-form-item label="鍒涘缓浜哄憳" style=" display: flex;">
+            <el-form-item v-show="isExpandForm" label="鍒涘缓浜哄憳" style=" display: flex;">
               <el-input v-model="form.createuser" style="width: 200px" placeholder="璇疯緭鍏�" />
             </el-form-item>
           </div>
-          <div style="display: flex;align-items: start;margin-top: 5px;z-index: 2">
-            <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 class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}">
+            <el-button v-waves type="primary" icon="el-icon-search" @click="search">鏌ヨ</el-button>
+            <el-button v-waves type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
           </div>
         </el-form>
+        <div
+          class="bodyTopFormExpand"
+        >
+          <svg-icon
+            v-show="mouseHoverType==='mouseout'"
+            style="cursor: pointer"
+            :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'"
+            @mouseenter="mouseHoverType=$event.type"
+          />
+          <svg-icon
+            v-show="mouseHoverType==='mouseenter'"
+            style="cursor: pointer"
+            :icon-class="!isExpandForm?'doubleDown':'doubleUp'"
+            @click="isExpandForm=!isExpandForm"
+            @mouseout="mouseHoverType=$event.type"
+          />
+        </div>
       </div>
 
       <div class="elTableDiv">
         <el-table
+          ref="tableDataRef"
+          class="tableFixed"
           :data="tableData"
-          :height="tableHeight"
+          :height="isExpandForm?tableHeight:(tableHeight+40)+'px'"
           border
           :row-class-name="tableRowClassName"
-          :style="{width: 100+'%',height:tableHeight+'px'}"
+          :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+40)+'px',}"
           highlight-current-row
           :header-cell-style="this.$headerCellStyle"
           :cell-style="this.$cellStyle"
@@ -89,6 +108,7 @@
           />
           <el-table-column
             prop="stepcode"
+            show-tooltip-when-overflow
             label="宸ュ簭缂栫爜"
             min-width="150"
             sortable="custom"
@@ -96,12 +116,14 @@
           <el-table-column
             prop="stepname"
             min-width="150"
+            show-tooltip-when-overflow
             label="宸ュ簭鍚嶇О"
             sortable="custom"
           />
           <el-table-column
             prop="flwtype"
             min-width="150"
+            show-tooltip-when-overflow
             label="宸ュ簭绫诲瀷"
             sortable="custom"
           >
@@ -113,6 +135,7 @@
           </el-table-column>
           <el-table-column
             prop="descr"
+            show-tooltip-when-overflow
             label="宸ュ簭鎻忚堪"
             min-width="180"
             sortable="custom"
@@ -125,34 +148,44 @@
           <el-table-column
             prop="enable"
             label="鍚敤鐘舵��"
+            show-tooltip-when-overflow
             sortable="custom"
             width="110"
           >
             <template slot-scope="{row}">
-              <div v-if="row.enable==='Y'"><svg-icon icon-class="circleYes" style="margin-right: 2px" />鏄�</div>
-              <div v-if="row.enable==='N'"> <svg-icon icon-class="circleNo" style="margin-right: 2px" />鍚�</div>
+              <div v-if="row.enable==='Y'">
+                <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" />
+                鏄�
+              </div>
+              <div v-if="row.enable==='N'">
+                <i class="el-icon-info" style="margin-right: 2px" />
+                鍚�
+              </div>
             </template>
           </el-table-column>
           <el-table-column
             prop="lm_user"
             label="鍒涘缓浜哄憳"
+            show-tooltip-when-overflow
             width="110"
             sortable="custom"
           />
           <el-table-column
             prop="lm_date"
             label="鍒涘缓鏃堕棿"
+            show-tooltip-when-overflow
             width="160"
             sortable="custom"
           />
           <el-table-column
             label="鍏宠仈宸ヤ綔绔�"
             prop="is_eqp"
+            show-tooltip-when-overflow
             width="110"
           >
             <template slot-scope="{row}">
               <div class="operationClass">
-                <i v-if="row.is_eqp==='Y'" class="el-icon-share" @click="workClick(row)" />
+                <i v-if="row.is_eqp==='Y'" :style="{color:$store.state.settings.theme}" class="el-icon-share" @click="workClick(row)" />
                 <i
                   v-if="row.is_eqp==='N'"
                   class="el-icon-share"
@@ -165,11 +198,12 @@
           <el-table-column
             label="鍏宠仈缂洪櫡"
             prop="is_defect"
+            show-tooltip-when-overflow
             width="110"
           >
             <template slot-scope="{row}">
               <div class="operationClass">
-                <i v-if="row.is_defect==='Y'" class="el-icon-share" @click="defectClick(row)" />
+                <i v-if="row.is_defect==='Y'" :style="{color:$store.state.settings.theme}" class="el-icon-share" @click="defectClick(row)" />
                 <i
                   v-if="row.is_defect==='N'"
                   class="el-icon-share"
@@ -187,10 +221,10 @@
             <template slot-scope="{row}">
               <div class="operationClass">
                 <el-tooltip class="item" effect="dark" content="缂栬緫" placement="top">
-                  <i class="el-icon-edit-outline" @click="edit('edit',row)" />
+                  <i :style="{color:$store.state.settings.theme}" class="el-icon-edit-outline" @click="edit('edit',row)" />
                 </el-tooltip>
                 <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
-                  <i class="el-icon-delete" @click="del(row)" />
+                  <i :style="{color:$store.state.settings.theme}" class="el-icon-delete" @click="del(row)" />
                 </el-tooltip>
               </div>
             </template>
@@ -211,6 +245,7 @@
 
     <!--鏂板淇敼瀵硅瘽妗�-->
     <el-dialog
+      v-el-drag-dialog
       :title="operation==='add'?'鏂板':'缂栬緫'"
       :visible.sync="dialogVisible"
       width="800px"
@@ -276,14 +311,21 @@
       </el-form>
       <span slot="footer" class="dialog-footer">
         <div class="footerButton">
-          <el-button @click="dialogVisibleCancel">鍙� 娑�</el-button>
-          <el-button type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>
+          <el-button v-waves @click="dialogVisibleCancel">鍙� 娑�</el-button>
+          <el-button
+            v-waves
+            type="primary"
+            :loading="$store.state.app.buttonIsDisabled"
+            :disabled="$store.state.app.buttonIsDisabled"
+            @click="dialogVisibleConfirm"
+          >纭� 瀹�</el-button>
         </div>
       </span>
     </el-dialog>
 
     <!--    鍏宠仈宸ヤ綔绔欏璇濇-->
     <el-dialog
+      v-el-drag-dialog
       title="鍏宠仈宸ヤ綔绔�"
       :visible.sync="workDialogVisible"
       width="50%"
@@ -296,38 +338,50 @@
       <!--      @opened="handleOpenedRoles"-->
 
       <div>
-        <i class="el-icon-s-comment" style="color:#42b983;" /> 宸ュ簭鍚嶇О锛歿{ workDialogForm.stepname }}
+        <i class="el-icon-s-comment" :style="{color:$store.state.settings.theme}" /> 宸ュ簭鍚嶇О锛歿{ workDialogForm.stepname }}
       </div>
       <el-divider />
       <div>
         <div style="margin-bottom:20px">
-          <i class="el-icon-s-operation" style="color:#42b983;" /> 宸ヤ綔绔欓泦鍚堬細
+          <i class="el-icon-s-operation":style="{color:$store.state.settings.theme}" /> 宸ヤ綔绔欓泦鍚堬細
         </div>
         <div class="myCheckboxGroup">
           <div
             v-for="item in workDialogForm.workGatherArr"
             :key="item.code"
-            :style="{border:item.isSelected1?'1px solid #42b983':'1px solid #eee'}"
+            :style="{border:item.isSelected1?'1px solid '+$store.state.settings.theme :'1px solid #eee'}"
             class="myCheckbox"
             @click="myCheckboxClick(item)"
           >
-            <input
-              class="myCheckboxInput"
-              type="checkbox"
-              :value="item.code"
-              name="gather"
-              :style="{color:item.isSelected2?'#42b983':'#fff'}"
-              @click="myCheckboxInputClick(item)"
-            >{{ item.name }}
+            <!--            <input-->
+            <!--              class="myCheckboxInput"-->
+            <!--              type="checkbox"-->
+            <!--              :value="item.code"-->
+            <!--              name="gather"-->
+            <!--              :style="{color:item.isSelected2?'#42b983':'#fff'}"-->
+            <!--              @click="myCheckboxInputClick(item)"-->
+            <!--            >{{ item.name }}-->
             <!--            鐖跺瓙鐐瑰嚮浜嬩欢涓嶅奖鍝�-->
             <!--            onClick="event.cancelBubble = true"-->
+            <el-checkbox
+              :key="item.code"
+              v-model="item.isSelected2"
+              class="myCheckboxInput"
+              :value="item.code"
+              :name="item.name"
+              :label="item.name"
+              :checked="item.isSelected2"
+              @change="myCheckboxInputClick(item)"
+            />
+            <div class="myCheckboxInputLabel">{{ item.name }}</div>
+
           </div>
         </div>
       </div>
       <el-divider />
       <div>
         <div style="margin-bottom:20px">
-          <i class="el-icon-s-operation" style="color:#42b983;" /> 宸ヤ綔绔欙細
+          <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> 宸ヤ綔绔欙細
         </div>
         <el-tree
           ref="workTree"
@@ -344,14 +398,21 @@
       </div>
       <span slot="footer" class="dialog-footer">
         <div class="footerButton">
-          <el-button @click="workDialogVisibleCancel">鍙� 娑�</el-button>
-          <el-button type="primary" @click="workDialogVisibleConfirm">纭� 瀹�</el-button>
+          <el-button v-waves @click="workDialogVisibleCancel">鍙� 娑�</el-button>
+          <el-button
+            v-waves
+            type="primary"
+            :loading="$store.state.app.buttonIsDisabled"
+            :disabled="$store.state.app.buttonIsDisabled"
+            @click="workDialogVisibleConfirm"
+          >纭� 瀹�</el-button>
         </div>
       </span>
     </el-dialog>
 
     <!--    鍏宠仈缂洪櫡瀵硅瘽妗�-->
     <el-dialog
+      v-el-drag-dialog
       title="宸ュ簭鍏宠仈缂洪櫡"
       :visible.sync="defectDialogVisible"
       width="50%"
@@ -364,7 +425,7 @@
       <!--      @opened="handleOpenedRoles"-->
 
       <div style="margin-bottom: 20px">
-        <i class="el-icon-s-comment" style="color:#42b983;" /> 宸ュ簭鍚嶇О锛歿{ defectTreeName }}
+        <i class="el-icon-s-comment" :style="{color:$store.state.settings.theme}" /> 宸ュ簭鍚嶇О锛歿{ defectTreeName }}
       </div>
 
       <div>
@@ -386,8 +447,14 @@
       </div>
       <span slot="footer" class="dialog-footer">
         <div class="footerButton">
-          <el-button @click="defectDialogVisibleCancel">鍙� 娑�</el-button>
-          <el-button type="primary" @click="defectDialogVisibleConfirm">纭� 瀹�</el-button>
+          <el-button v-waves @click="defectDialogVisibleCancel">鍙� 娑�</el-button>
+          <el-button
+            v-waves
+            type="primary"
+            :loading="$store.state.app.buttonIsDisabled"
+            :disabled="$store.state.app.buttonIsDisabled"
+            @click="defectDialogVisibleConfirm"
+          >纭� 瀹�</el-button>
         </div>
       </span>
     </el-dialog>
@@ -406,26 +473,20 @@
   StepSearch
 } from '@/api/zzmx'
 import $ from 'jquery'
+import { validateCode } from '@/utils/global'
+import elDragDialog from '@/directive/el-drag-dialog'
+import waves from '@/directive/waves'
 
-const SER_HZ = /^[\u4e00-\u9fa5]+$/
 export default {
   name: 'GXDY',
   components: {
     Pagination
   },
+  directives: { elDragDialog, waves },
   data() {
-    const validateName = (rule, value, callback) => {
-      if (!value) {
-        return callback(new Error('璇疯緭鍏ョ紪鐮�'))
-      } else {
-        if (SER_HZ.test(value)) {
-          return callback(new Error('缂栫爜涓嶈兘涓轰腑鏂�'))
-        } else {
-          callback()
-        }
-      }
-    }
     return {
+      mouseHoverType: 'mouseout',
+      isExpandForm: false,
       isIpad: false,
       mainHeight: 0,
       tableHeight: 0,
@@ -464,7 +525,7 @@
       operation: '',
       dialogFormRules: {
         stepcode: [
-          { required: true, validator: validateName, trigger: ['blur', 'change'] }
+          { required: true, validator: validateCode, trigger: ['blur', 'change'] }
         ],
         stepname: [
           { required: true, message: '璇疯緭鍏ュ悕绉�', trigger: ['blur', 'change'] }
@@ -600,6 +661,7 @@
     dialogVisibleConfirm() {
       this.$refs.dialogForm.validate(valid => {
         if (valid) {
+          this.$store.state.app.buttonIsDisabled = true
           const data = {
             id: this.dialogForm.id,
             stepcode: this.dialogForm.stepcode,
@@ -611,9 +673,10 @@
           }
           AddUpdateStep(data).then(res => {
             if (res.code === '200') {
-              this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
               this.dialogVisible = false
+              this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
               this.getStepSearch()
+              this.$store.state.app.buttonIsDisabled = false
             } else {
               this.$message.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '淇敼澶辫触锛�')
             }
@@ -626,64 +689,81 @@
       this.$nextTick(() => {
         // this.mainHeight = window.innerHeight - 250
         this.mainHeight = window.innerHeight - 85
-        this.tableHeight = this.mainHeight - 200
+        this.tableHeight = this.mainHeight - 255
         if (window.innerHeight < 769) {
           this.tableHeight = this.tableHeight - 40
         }
         this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
+        this.$refs.tableDataRef.doLayout()
       })
     },
     /* 鍏宠仈宸ヤ綔绔欐ā鍧�*/
     // 鍏宠仈宸ヤ綔绔欑偣鍑�
-    async workClick(row) {
-      this.workDialogVisible = true
+    workClick(row) {
+      const loading = this.$loading({
+        lock: true,
+        text: '姝e湪鍔犺浇鏁版嵁锛岃绋嶇瓑...',
+        spinner: 'el-icon-loading',
+        customClass: 'osloading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+
       this.workDialogForm.stepcode = row.stepcode
       this.workDialogForm.stepname = row.stepname
-      const { data: res } = await StepAssociationEqp({ stepcode: this.workDialogForm.stepcode })
-      this.workDialogForm.workArr = res
-      let workGatherArr = []
-      if (row.flwtype === 'W') { // 澶栧崗鎯呭喌涓�
-        workGatherArr = this.workDialogForm.workArr.filter(item => item.type === 'W')
-      } else if (row.flwtype === 'Z') { // 鑷埗鎯呭喌涓�
-        workGatherArr = this.workDialogForm.workArr.filter(item => item.type === 'E')
-      } else { // 鑷埗锛嬪鍗�
-        workGatherArr = this.workDialogForm.workArr
-      }
-      // this.workDialogForm.workArr[1].children = []
-      const nodeKey = []// 闇�瑕佹爲褰㈡暟鏄剧殑鍊�
-      workGatherArr.forEach((item, index) => {
-        this.workDialogForm.workGatherArr.push({
-          isSelected1: index === 0,
-          isSelected2: item.flag === 'Y',
-          code: item.code,
-          name: item.name,
-          type: item.type,
-          flag: item.flag
-        })
-        if (item.flag === 'Y' && item.children && item.children.length > 0) {
-          this.$nextTick(() => {
-            $("input[name='gather']").eq(index).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
-          })
-          item.children.forEach(it => {
-            if (it.flag === 'Y') {
-              nodeKey.push(it.code)
-            }
-          })
-        }
-        if (index === 0) {
-          if (item.children && item.children.length > 0) {
-            this.workDialogForm.workTreeArr = this.workDialogForm.workArr.filter(it => it.code === item.code)
-            this.workDialogForm.workTreeArr[0].name = '鍏ㄩ儴'
-          }
-        }
-        // item.flag === 'Y'&&item
-      })
-      console.log(nodeKey, 1)
-      this.$refs.workTree.setCheckedKeys(nodeKey)
-      this.workDialogForm.workTreeSelectedArr = nodeKey
+      StepAssociationEqp({ stepcode: this.workDialogForm.stepcode }).then(res => {
+        if (res.code === '200') {
+          setTimeout(() => {
+            loading.close()
+            this.workDialogVisible = true
 
-      console.log(this.workDialogForm.workGatherArr, 6)
-      console.log(this.workDialogForm.workTreeArr, 7)
+            this.workDialogForm.workArr = res.data.filter(item => item.children.length !== 0)
+
+            let workGatherArr = []
+            if (row.flwtype === 'W') { // 澶栧崗鎯呭喌涓�
+              workGatherArr = this.workDialogForm.workArr.filter(item => item.type === 'W')
+            } else if (row.flwtype === 'Z') { // 鑷埗鎯呭喌涓�
+              workGatherArr = this.workDialogForm.workArr.filter(item => item.type === 'E')
+            } else { // 鑷埗锛嬪鍗�
+              workGatherArr = this.workDialogForm.workArr
+            }
+            const nodeKey = []// 闇�瑕佹爲褰㈡暟鏄剧殑鍊�
+            workGatherArr.forEach((item, index) => {
+              this.workDialogForm.workGatherArr.push({
+                isSelected1: index === 0,
+                isSelected2: item.flag === 'Y',
+                code: item.code,
+                name: item.name,
+                type: item.type,
+                flag: item.flag
+              })
+              if (item.flag === 'Y' && item.children && item.children.length > 0) {
+                this.$nextTick(() => {
+                  $("input[name='gather']").eq(index).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
+                })
+                item.children.forEach(it => {
+                  if (it.flag === 'Y') {
+                    nodeKey.push(it.code)
+                  }
+                })
+              }
+              if (index === 0) {
+                if (item.children && item.children.length > 0) {
+                  this.workDialogForm.workTreeArr = this.workDialogForm.workArr.filter(it => it.code === item.code)
+                  this.workDialogForm.workTreeArr[0].name = '鍏ㄩ儴'
+                }
+              }
+              // item.flag === 'Y'&&item
+            })
+
+            this.$nextTick(() => {
+              this.$refs.workTree.setCheckedKeys(nodeKey)
+            })
+            this.workDialogForm.workTreeSelectedArr = nodeKey
+          }, 1000)
+        } else {
+          loading.close()
+        }
+      })
     },
     // 澶х洅瀛愮偣鍑讳簨浠�
     myCheckboxClick(val) {
@@ -703,7 +783,7 @@
     },
     // 灏忕洅瀛愮偣鍑讳簨浠�
     myCheckboxInputClick(val) {
-      val.isSelected2 = !val.isSelected2
+      val.isSelected2 = !!val.isSelected2
       console.log(val.code, 1)
       this.workDialogForm.workCodeSelectedGatherArr = [...new Set(this.workDialogForm.workCodeSelectedGatherArr)]
       // 1.绗竴绉嶆儏鍐�  灏忕洅瀛愪粠娌¢�変腑鍒伴�変腑
@@ -902,8 +982,7 @@
     // 纭
     async workDialogVisibleConfirm() {
       this.workDialogForm.workTreeSelectedArr = [...new Set(this.workDialogForm.workTreeSelectedArr)]
-      console.log(this.workDialogForm.workTreeSelectedArr, 18)
-      console.log(this.workDialogForm.workArr, 20)
+
       const data = []
       this.workDialogForm.workArr.forEach(item => {
         if (item.flag === 'Y' && item.children && item.children.length > 0) {
@@ -914,34 +993,51 @@
           })
         }
       })
-      console.log(data)
+      this.$store.state.app.buttonIsDisabled = true
       const res = await SaveStepAssociationEqp(this.workDialogForm.stepcode, data)
       if (res.code === '200') {
+        this.workDialogVisible = false
         this.$message.success('淇濆瓨鎴愬姛锛�')
         await this.getStepSearch()
-        this.workDialogVisible = false
+        this.$store.state.app.buttonIsDisabled = false
       }
     },
     /* 鍏宠仈缂洪櫡*/
     //  鍏宠仈缂洪櫡鐐瑰嚮
-    async defectClick(row) {
+    defectClick(row) {
+      const loading = this.$loading({
+        lock: true,
+        text: '姝e湪鍔犺浇鏁版嵁锛岃绋嶇瓑...',
+        spinner: 'el-icon-loading',
+        customClass: 'osloading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+
       this.defectTreeCode = row.stepcode
       this.defectTreeName = row.stepname
-      this.defectDialogVisible = true
 
-      const { data: res } = await StepAssociationDefect({ stepcode: row.stepcode })
-      // this.defectTree = res
-      this.defectTree.push({ code: 'QB', name: '鍏ㄩ儴', children: res, flag: 'N' })
-      console.log(this.defectTree, 6)
-      const nokeKey = []
-      this.defectTree[0].children.forEach(item => {
-        if (item.flag === 'Y') {
-          nokeKey.push(item.code)
+      StepAssociationDefect({ stepcode: row.stepcode }).then(res => {
+        if (res.code === '200') {
+          setTimeout(() => {
+            loading.close()
+            this.defectDialogVisible = true
+
+            this.defectTree.push({ code: 'QB', name: '鍏ㄩ儴', children: res.data, flag: 'N' })
+
+            const nokeKey = []
+            this.defectTree[0].children.forEach(item => {
+              if (item.flag === 'Y') {
+                nokeKey.push(item.code)
+              }
+            })
+
+            this.$nextTick(() => {
+              this.$refs.defectTree.setCheckedKeys(nokeKey)
+            })
+          }, 1000)
+        } else {
+          loading.close()
         }
-      })
-      console.log(nokeKey, 2)
-      this.$nextTick(() => {
-        this.$refs.defectTree.setCheckedKeys(nokeKey)
       })
     },
     // 鍏抽棴
@@ -962,11 +1058,13 @@
           data.push({ code: item.code, name: item.name })
         }
       })
+      this.$store.state.app.buttonIsDisabled = true
       const res = await SaveStepAssociationDefect(this.defectTreeCode, data)
       if (res.code === '200') {
+        this.defectDialogVisible = false
         this.$message.success('淇濆瓨鎴愬姛锛�')
         await this.getStepSearch()
-        this.defectDialogVisible = false
+        this.$store.state.app.buttonIsDisabled = false
       }
     }
   }
@@ -988,10 +1086,19 @@
       margin: 10px 30px 0 0;
       border-radius: 5px;
       cursor: default;
+      position: relative;
 
       .myCheckboxInput {
         margin: 1px 5px 0 0;
         cursor: pointer;
+      }
+
+      .myCheckboxInputLabel {
+        position: absolute;
+        left: 29px;
+        padding: 5px;
+        top: 6px;
+        color: transparent;
       }
 
     }
@@ -1125,9 +1232,24 @@
   margin-bottom: 0;
 }
 
+.tableFixed {
+  ::v-deep .el-table__fixed-right {
+    height: 100% !important;
+  }
+
+  ::v-deep .el-table__fixed {
+    height: 100% !important;
+  }
+}
 </style>
 <style>
+.osloading{
+  font-size: 26px !important;
+}
 
+.el-loading-text{
+  font-size: 26px !important;
+}
 .el-table .custom-row {
   background: #f8f8fa;
 }

--
Gitblit v1.9.3