From bed4e60f46a75823d7314311e3d5fafe71c1a2fa Mon Sep 17 00:00:00 2001
From: zhuzhuanzhuan
Date: 星期二, 17 十月 2023 14:24:50 +0800
Subject: [PATCH] 代码格式化

---
 src/views/WorkshopSignage.vue                  |  636 +++++++++++++------------
 src/views/system/WorkshopSignageManagement.vue |  788 ++++++++++++++++----------------
 2 files changed, 725 insertions(+), 699 deletions(-)

diff --git a/src/views/WorkshopSignage.vue b/src/views/WorkshopSignage.vue
index d13018c..183ade3 100644
--- a/src/views/WorkshopSignage.vue
+++ b/src/views/WorkshopSignage.vue
@@ -1,58 +1,78 @@
 <template>
   <dv-full-screen-container class="full-screen-container">
     <header class="page-header">
-      {{workshopDetails.workshopName}}
+      {{ workshopDetails.workshopName }}
       <div class="header-right" v-has="'home:saveDevicePositionAndSize'">
         <a-space>
           <span v-if="!isSwitchChecked">寮�鍚姛鑳�</span>
           <span v-else>鍏抽棴鍔熻兘</span>
-          <a-switch checked-children="寮�" un-checked-children="鍏�" @change="handleSwitchChange"
-                    v-model="isSwitchChecked" :disabled="isSwitchChecked"/>
+          <a-switch
+            checked-children="寮�"
+            un-checked-children="鍏�"
+            @change="handleSwitchChange"
+            v-model="isSwitchChecked"
+            :disabled="isSwitchChecked"
+          />
         </a-space>
-        <a-button type="primary" icon="save" size="large" @click="saveDevicePositionAndSizeByApi"
-        >淇濆瓨浣嶇疆
-        </a-button>
+        <a-button type="primary" icon="save" size="large" @click="saveDevicePositionAndSizeByApi">淇濆瓨浣嶇疆</a-button>
       </div>
     </header>
 
     <dv-border-box-8>
       <div class="content-container" ref="deviceContainerRef">
-        <VueDragResize v-for="(item,index) in deviceList" :key="item.equipmentId" :w="item.vw"
-                       :h="item.vh" :x="item.coordinateLeft" :y="item.coordinateTop"
-                       v-on:resizing="resize($event,index)"
-                       v-on:dragging="resize($event,index)"
-                       :parentLimitation="true"
-                       :minw="100"
-                       :minh="100"
-                       :isDraggable="isDraggable"
-                       :isResizable="isResizable"
-                       :stickSize="6"
+        <VueDragResize
+          v-for="(item, index) in deviceList"
+          :key="item.equipmentId"
+          :w="item.vw"
+          :h="item.vh"
+          :x="item.coordinateLeft"
+          :y="item.coordinateTop"
+          v-on:resizing="resize($event, index)"
+          v-on:dragging="resize($event, index)"
+          :parentLimitation="true"
+          :minw="100"
+          :minh="100"
+          :isDraggable="isDraggable"
+          :isResizable="isResizable"
+          :stickSize="6"
         >
-          <div class="single-device"
-               :style="{width:  item.vw+ 'px',height:item.vh+'px'}">
+          <div class="single-device" :style="{ width: item.vw + 'px', height: item.vh + 'px' }">
             <div class="device-status">
-              <div v-if="item.equipmentStatus==2||item.equipmentStatus==1"
-                   :style="{backgroundImage:`url(${require('@/assets/yellow.png')})`}" class="status-image"></div>
-              <div v-if="item.equipmentStatus==22" :style="{backgroundImage:`url(${require('@/assets/red.png')})`}"
-                   class="status-image"></div>
-              <div v-if="item.equipmentStatus==0" :style="{backgroundImage:`url(${require('@/assets/gray.png')})`}"
-                   class="status-image"></div>
-              <div v-if="item.equipmentStatus==3" :style="{backgroundImage:`url(${require('@/assets/green.png')})`}"
-                   class="status-image"></div>
               <div
-                :style="{backgroundImage:`url(${getImgView(item.equipmentImage)||require('@/assets/8.png')})`}"
-                class="device-image"></div>
+                v-if="item.equipmentStatus == 2 || item.equipmentStatus == 1"
+                :style="{ backgroundImage: `url(${require('@/assets/yellow.png')})` }"
+                class="status-image"
+              ></div>
+              <div
+                v-if="item.equipmentStatus == 22"
+                :style="{ backgroundImage: `url(${require('@/assets/red.png')})` }"
+                class="status-image"
+              ></div>
+              <div
+                v-if="item.equipmentStatus == 0"
+                :style="{ backgroundImage: `url(${require('@/assets/gray.png')})` }"
+                class="status-image"
+              ></div>
+              <div
+                v-if="item.equipmentStatus == 3"
+                :style="{ backgroundImage: `url(${require('@/assets/green.png')})` }"
+                class="status-image"
+              ></div>
+              <div
+                :style="{ backgroundImage: `url(${getImgView(item.equipmentImage) || require('@/assets/8.png')})` }"
+                class="device-image"
+              ></div>
             </div>
-            <div class="device-id" :style="{fontSize: item.fontSize+'px'}">
-              {{item.equipmentId}}
+            <div class="device-id" :style="{ fontSize: item.fontSize + 'px' }">
+              {{ item.equipmentId }}
             </div>
           </div>
         </VueDragResize>
         <div class="device-status-info">
           <div v-for="item in deviceStatusList" :key="item.value" class="single-status-info">
-            <div>{{item.label}}</div>
-            <div class="status-square" :style="{backgroundColor:item.color}"></div>
-            <div>{{getDeviceNumberByStatus(item.value)}}</div>
+            <div>{{ item.label }}</div>
+            <div class="status-square" :style="{ backgroundColor: item.color }"></div>
+            <div>{{ getDeviceNumberByStatus(item.value) }}</div>
           </div>
         </div>
       </div>
@@ -61,289 +81,289 @@
 </template>
 
 <script>
-  import VueDragResize from 'vue-drag-resize'
-  import api from '@/api/mdc'
-  import { getFileAccessHttpUrl } from '@/api/manage'
+import VueDragResize from 'vue-drag-resize'
+import api from '@/api/mdc'
+import { getFileAccessHttpUrl } from '@/api/manage'
 
-  export default {
-    components: {
-      VueDragResize
-    },
-    data() {
-      return {
-        workshopDetails: {}, //  杞﹂棿璇︾粏淇℃伅,
-        isDraggable: false, // 鏄惁寮�鍚嫋鎷�
-        isResizable: false, // 鏄惁寮�鍚缉鏀�
-        isSwitchChecked: false, // 鏄惁寮�鍚姛鑳�
-        timingAcquisition: null, // 瀹氭椂鍒锋柊鏄惁寮�鍚�
-        deviceList: [
-          // {
-          //   equipmentId: '123213213123232',// 璁惧ID
-          //   equipmentImage: require('@/assets/8.png'), // 璁惧鍥剧墖
-          //   coordinateTop: 200, // 鎷栨嫿鍏冪礌璺濈洅瀛愰《璺濈
-          //   coordinateLeft: 100, // 鎷栨嫿鍏冪礌璺濈洅瀛愬乏渚ц窛绂�
-          //   vw: 100,  // 缂╂斁鍏冪礌瀹藉害
-          //   vh: 100, // 缂╂斁鍏冪礌楂樺害
-          //   fontSize: 12, // 缂╂斁鍏冪礌瀛椾綋澶у皬
-          //   equipmentStatus: 1 // 璁惧鐘舵�� 0:鍏虫満 22:鎶ヨ 2:寰呮満 3:杩愯 寮�鏈�:1锛堟病鏈夊洓鑹茬伅鏍囪瘑褰掍负寰呮満锛�
-          // }
-        ], // 璁惧淇℃伅鍒楄〃
-        deviceStatusList: [
-          {
-            label: '鍏虫満',
-            value: 0,
-            color: '#A8A8A8'
-          },
-          {
-            label: '寰呮満',
-            value: 2,
-            color: '#FFFF00'
-          },
-          {
-            label: '杩愯',
-            value: 3,
-            color: '#00EE00'
-          },
-          {
-            label: '鎶ヨ',
-            value: 22,
-            color: '#FF0000'
-          }
-        ] // 璁惧鐘舵�佹寚绀虹伅鍒楄〃
-      }
-    },
-    watch: {
-      isSwitchChecked: {
-        handler(newVal) {
-          if (!newVal) {
-            console.log('瀹氭椂鍣ㄥ紑鍚腑')
-            this.timingAcquisition = setInterval(() => {
-              this.getDeviceListByApi(this.$route.params.id)
-            }, 2000)
-          } else {
-            console.log('鍏抽棴瀹氭椂鍣�')
-            clearInterval(this.timingAcquisition)
-            this.timingAcquisition = null
-          }
-        },
-        immediate: true
-      }
-    },
-    methods: {
-      /**
-       * 閫氳繃杞﹂棿Id璋冪敤鎺ュ彛鑾峰彇璁惧淇℃伅鍒楄〃
-       * @param id 杞﹂棿Id
-       */
-      getDeviceListByApi(id) {
-        console.log('閲嶆柊鍒锋柊')
-        api.getDeviceListInWorkshopSignagePageApi(id).then(res => {
-          if (res.result && res.result.length > 0) {
-            this.deviceList = res.result
-          }
-        })
-      },
-
-      /**
-       * 閫氳繃杞﹂棿Id璋冪敤鎺ュ彛鑾峰彇杞﹂棿璇︾粏淇℃伅
-       * @param id 杞﹂棿Id
-       */
-      getWorkshopDetailsByApi(id) {
-        api.getWorkshopDetailByWorkshopIdApi(id).then(res => {
-          this.workshopDetails = res.result
-          this.$refs.deviceContainerRef.style.backgroundImage = `url(${this.getImgView(this.workshopDetails.backgroundImage)})`
-        })
-      },
-
-      /**
-       * 鍥剧墖棰勮
-       * @param text 鍥剧墖鍦板潃
-       */
-      getImgView(text) {
-        if (text && text.indexOf(',') > 0) {
-          text = text.substring(0, text.indexOf(','))
-        }
-        return getFileAccessHttpUrl(text)
-      },
-
-      /**
-       * 鐐瑰嚮淇濆瓨鎸夐挳璋冪敤鎺ュ彛淇濆瓨鎷栨嫿鍚庣殑浣嶇疆涓庤澶囧浘鏍囧昂瀵�
-       */
-      saveDevicePositionAndSizeByApi() {
-        console.log('瑙﹀彂淇濆瓨')
-        if (this.isOperatingDevice) {
-          api.saveDevicePositionAndSizeApi(this.deviceList).then(res => {
-            if (res.code === 200) {
-              this.$notification.success({
-                message: '娑堟伅',
-                description: res.message
-              })
-              this.isOperatingDevice = false
-              if (this.isSwitchChecked) {
-                this.isSwitchChecked = false
-                this.isResizable = !this.isResizable
-                this.isDraggable = !this.isDraggable
-              }
-              this.getDeviceListByApi(this.$route.params.id)
-            }
-          })
-        } else {
-          this.$notification.warning({
-            message: '娑堟伅',
-            description: '璇峰紑鍚姛鑳藉悗鍐嶈繘琛屼繚瀛�'
-          })
-        }
-
-      },
-
-      /**
-       * 璁惧鎷栨嫿鎴栫缉鏀炬椂瑙﹀彂浜嬩欢
-       * @param newRect 鎷栨嫿鎴栫缉鏀惧悗鐨勫昂瀵稿強璺濈
-       * @param index 鎷栨嫿璁惧鍦ㄦ暟缁勪腑鐨勪笅鏍�
-       */
-      resize(newRect, index) {
-        // if (newRect.width > 100) {
-        //   if (newRect.width / newRect.height < 2) {
-        //     this.deviceList[index].fontSize = newRect.width / 10
-        //   } else {
-        //     this.deviceList[index].fontSize = newRect.height / 5
-        //   }
-        // } else {
-        //   this.deviceList[index].fontSize = 12
+export default {
+  components: {
+    VueDragResize,
+  },
+  data() {
+    return {
+      workshopDetails: {}, //  杞﹂棿璇︾粏淇℃伅,
+      isDraggable: false, // 鏄惁寮�鍚嫋鎷�
+      isResizable: false, // 鏄惁寮�鍚缉鏀�
+      isSwitchChecked: false, // 鏄惁寮�鍚姛鑳�
+      timingAcquisition: null, // 瀹氭椂鍒锋柊鏄惁寮�鍚�
+      deviceList: [
+        // {
+        //   equipmentId: '123213213123232',// 璁惧ID
+        //   equipmentImage: require('@/assets/8.png'), // 璁惧鍥剧墖
+        //   coordinateTop: 200, // 鎷栨嫿鍏冪礌璺濈洅瀛愰《璺濈
+        //   coordinateLeft: 100, // 鎷栨嫿鍏冪礌璺濈洅瀛愬乏渚ц窛绂�
+        //   vw: 100,  // 缂╂斁鍏冪礌瀹藉害
+        //   vh: 100, // 缂╂斁鍏冪礌楂樺害
+        //   fontSize: 12, // 缂╂斁鍏冪礌瀛椾綋澶у皬
+        //   equipmentStatus: 1 // 璁惧鐘舵�� 0:鍏虫満 22:鎶ヨ 2:寰呮満 3:杩愯 寮�鏈�:1锛堟病鏈夊洓鑹茬伅鏍囪瘑褰掍负寰呮満锛�
         // }
-        this.deviceList[index].vw = newRect.width
-        this.deviceList[index].vh = newRect.height
-        this.deviceList[index].coordinateTop = newRect.top
-        this.deviceList[index].coordinateLeft = newRect.left
-      },
-
-      /**
-       * 鏍规嵁璁惧鐘舵�佸�艰幏鍙栧搴旇澶囨暟閲�
-       * @param value 璁惧鐘舵�佸��
-       * @returns {number} 璁惧鏁伴噺
-       */
-      getDeviceNumberByStatus(value) {
-        return this.deviceList.filter(item => item.equipmentStatus === value).length
-      },
-
-      /**
-       * 寮�鍚姛鑳借Е鍙戜簨浠�
-       * @param checked 褰撳墠switch鐘舵�侊紝鏄惁寮�鍚紝鍒濆涓篺alse
-       */
-      handleSwitchChange(checked) {
-        this.isOperatingDevice = true
-        this.isResizable = !this.isResizable
-        this.isDraggable = !this.isDraggable
-      }
-    },
-    created() {
-      if (this.$route.params.id) {
-        this.getDeviceListByApi(this.$route.params.id)
-        this.getWorkshopDetailsByApi(this.$route.params.id)
-      }
-    },
-    mounted() {
-      // 绂佹鐢ㄦ埛閫変腑鍐呭
-      document.onselectstart = () => false
-    },
-    beforeDestroy() {
-      // 纭繚閿�姣佸畾鏃跺櫒鍙婂洖鏀惰祫婧�
-      clearInterval(this.timingAcquisition)
-      this.timingAcquisition = null
+      ], // 璁惧淇℃伅鍒楄〃
+      deviceStatusList: [
+        {
+          label: '鍏虫満',
+          value: 0,
+          color: '#A8A8A8',
+        },
+        {
+          label: '寰呮満',
+          value: 2,
+          color: '#FFFF00',
+        },
+        {
+          label: '杩愯',
+          value: 3,
+          color: '#00EE00',
+        },
+        {
+          label: '鎶ヨ',
+          value: 22,
+          color: '#FF0000',
+        },
+      ], // 璁惧鐘舵�佹寚绀虹伅鍒楄〃
     }
-  }
+  },
+  watch: {
+    isSwitchChecked: {
+      handler(newVal) {
+        if (!newVal) {
+          console.log('瀹氭椂鍣ㄥ紑鍚腑')
+          this.timingAcquisition = setInterval(() => {
+            this.getDeviceListByApi(this.$route.params.id)
+          }, 2000)
+        } else {
+          console.log('鍏抽棴瀹氭椂鍣�')
+          clearInterval(this.timingAcquisition)
+          this.timingAcquisition = null
+        }
+      },
+      immediate: true,
+    },
+  },
+  methods: {
+    /**
+     * 閫氳繃杞﹂棿Id璋冪敤鎺ュ彛鑾峰彇璁惧淇℃伅鍒楄〃
+     * @param id 杞﹂棿Id
+     */
+    getDeviceListByApi(id) {
+      console.log('閲嶆柊鍒锋柊')
+      api.getDeviceListInWorkshopSignagePageApi(id).then((res) => {
+        if (res.result && res.result.length > 0) {
+          this.deviceList = res.result
+        }
+      })
+    },
+
+    /**
+     * 閫氳繃杞﹂棿Id璋冪敤鎺ュ彛鑾峰彇杞﹂棿璇︾粏淇℃伅
+     * @param id 杞﹂棿Id
+     */
+    getWorkshopDetailsByApi(id) {
+      api.getWorkshopDetailByWorkshopIdApi(id).then((res) => {
+        this.workshopDetails = res.result
+        this.$refs.deviceContainerRef.style.backgroundImage = `url(${this.getImgView(
+          this.workshopDetails.backgroundImage
+        )})`
+      })
+    },
+
+    /**
+     * 鍥剧墖棰勮
+     * @param text 鍥剧墖鍦板潃
+     */
+    getImgView(text) {
+      if (text && text.indexOf(',') > 0) {
+        text = text.substring(0, text.indexOf(','))
+      }
+      return getFileAccessHttpUrl(text)
+    },
+
+    /**
+     * 鐐瑰嚮淇濆瓨鎸夐挳璋冪敤鎺ュ彛淇濆瓨鎷栨嫿鍚庣殑浣嶇疆涓庤澶囧浘鏍囧昂瀵�
+     */
+    saveDevicePositionAndSizeByApi() {
+      console.log('瑙﹀彂淇濆瓨')
+      if (this.isOperatingDevice) {
+        api.saveDevicePositionAndSizeApi(this.deviceList).then((res) => {
+          if (res.code === 200) {
+            this.$notification.success({
+              message: '娑堟伅',
+              description: res.message,
+            })
+            this.isOperatingDevice = false
+            if (this.isSwitchChecked) {
+              this.isSwitchChecked = false
+              this.isResizable = !this.isResizable
+              this.isDraggable = !this.isDraggable
+            }
+            this.getDeviceListByApi(this.$route.params.id)
+          }
+        })
+      } else {
+        this.$notification.warning({
+          message: '娑堟伅',
+          description: '璇峰紑鍚姛鑳藉悗鍐嶈繘琛屼繚瀛�',
+        })
+      }
+    },
+
+    /**
+     * 璁惧鎷栨嫿鎴栫缉鏀炬椂瑙﹀彂浜嬩欢
+     * @param newRect 鎷栨嫿鎴栫缉鏀惧悗鐨勫昂瀵稿強璺濈
+     * @param index 鎷栨嫿璁惧鍦ㄦ暟缁勪腑鐨勪笅鏍�
+     */
+    resize(newRect, index) {
+      // if (newRect.width > 100) {
+      //   if (newRect.width / newRect.height < 2) {
+      //     this.deviceList[index].fontSize = newRect.width / 10
+      //   } else {
+      //     this.deviceList[index].fontSize = newRect.height / 5
+      //   }
+      // } else {
+      //   this.deviceList[index].fontSize = 12
+      // }
+      this.deviceList[index].vw = newRect.width
+      this.deviceList[index].vh = newRect.height
+      this.deviceList[index].coordinateTop = newRect.top
+      this.deviceList[index].coordinateLeft = newRect.left
+    },
+
+    /**
+     * 鏍规嵁璁惧鐘舵�佸�艰幏鍙栧搴旇澶囨暟閲�
+     * @param value 璁惧鐘舵�佸��
+     * @returns {number} 璁惧鏁伴噺
+     */
+    getDeviceNumberByStatus(value) {
+      return this.deviceList.filter((item) => item.equipmentStatus === value).length
+    },
+
+    /**
+     * 寮�鍚姛鑳借Е鍙戜簨浠�
+     * @param checked 褰撳墠switch鐘舵�侊紝鏄惁寮�鍚紝鍒濆涓篺alse
+     */
+    handleSwitchChange(checked) {
+      this.isOperatingDevice = true
+      this.isResizable = !this.isResizable
+      this.isDraggable = !this.isDraggable
+    },
+  },
+  created() {
+    if (this.$route.params.id) {
+      this.getDeviceListByApi(this.$route.params.id)
+      this.getWorkshopDetailsByApi(this.$route.params.id)
+    }
+  },
+  mounted() {
+    // 绂佹鐢ㄦ埛閫変腑鍐呭
+    document.onselectstart = () => false
+  },
+  beforeDestroy() {
+    // 纭繚閿�姣佸畾鏃跺櫒鍙婂洖鏀惰祫婧�
+    clearInterval(this.timingAcquisition)
+    this.timingAcquisition = null
+  },
+}
 </script>
 
 <style scoped lang="less">
-  .full-screen-container {
-    background-image: url('../assets/Bj.jpg');
-    background-size: 100% 100%;
-    color: #fff;
+.full-screen-container {
+  background-image: url('../assets/Bj.jpg');
+  background-size: 100% 100%;
+  color: #fff;
 
-    .page-header {
-      height: 80px;
-      font-size: 50px;
-      text-align: center;
-      position: relative;
+  .page-header {
+    height: 80px;
+    font-size: 50px;
+    text-align: center;
+    position: relative;
 
-      .header-right {
-        width: 450px;
-        position: absolute;
-        right: 0px;
-        top: 35px;
-        display: flex;
-        justify-content: space-evenly;
-        align-items: center;
-        font-size: 16px;
-      }
-    }
-
-    .content-container {
-      position: relative;
-      width: 100%;
-      height: 100%;
-      background-repeat: no-repeat;
-      background-size: 100% 100%;
-
-      .device-status-info {
-        width: 400px;
-        position: absolute;
-        top: 5px;
-        right: 5px;
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-
-        .single-status-info {
-          width: 60px;
-          display: flex;
-          align-items: center;
-          justify-content: space-between;
-
-          .status-square {
-            width: 14px;
-            height: 14px;
-            border: 1px solid #fff;
-            border-radius: 2px;
-          }
-        }
-      }
-
-      .single-device {
-        position: absolute;
-        border: 1px solid transparent;
-        padding: 10px;
-        display: flex;
-        flex-direction: column;
-        align-items: center;
-        justify-content: space-between;
-        cursor: default;
-
-        &:active {
-          border: 1px solid #1890ff;
-        }
-
-        .device-status {
-          width: 100%;
-          height: 100%;
-          display: flex;
-          justify-content: space-between;
-
-          .status-image {
-            background-size: 100% 100%;
-            background-repeat: no-repeat;
-            width: 45px;
-            margin-right: 10px;
-          }
-
-          .device-image {
-            background-size: 100% 100%;
-            background-repeat: no-repeat;
-            width: 100%;
-            height: 100%;
-          }
-        }
-      }
-
+    .header-right {
+      width: 450px;
+      position: absolute;
+      right: 0px;
+      top: 35px;
+      display: flex;
+      justify-content: space-evenly;
+      align-items: center;
+      font-size: 16px;
     }
   }
+
+  .content-container {
+    position: relative;
+    width: 100%;
+    height: 100%;
+    background-repeat: no-repeat;
+    background-size: 100% 100%;
+
+    .device-status-info {
+      width: 400px;
+      position: absolute;
+      top: 5px;
+      right: 5px;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+
+      .single-status-info {
+        width: 60px;
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+
+        .status-square {
+          width: 14px;
+          height: 14px;
+          border: 1px solid #fff;
+          border-radius: 2px;
+        }
+      }
+    }
+
+    .single-device {
+      position: absolute;
+      border: 1px solid transparent;
+      padding: 10px;
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: space-between;
+      cursor: default;
+
+      &:active {
+        border: 1px solid #1890ff;
+      }
+
+      .device-status {
+        width: 100%;
+        height: 100%;
+        display: flex;
+        justify-content: space-between;
+
+        .status-image {
+          background-size: 100% 100%;
+          background-repeat: no-repeat;
+          width: 45px;
+          margin-right: 10px;
+        }
+
+        .device-image {
+          background-size: 100% 100%;
+          background-repeat: no-repeat;
+          width: 100%;
+          height: 100%;
+        }
+      }
+    }
+  }
+}
 </style>
\ No newline at end of file
diff --git a/src/views/system/WorkshopSignageManagement.vue b/src/views/system/WorkshopSignageManagement.vue
index a1f2cf4..1572098 100644
--- a/src/views/system/WorkshopSignageManagement.vue
+++ b/src/views/system/WorkshopSignageManagement.vue
@@ -8,16 +8,16 @@
           <a-form layout="inline" @keyup.enter.native="searchQuery">
             <a-row :gutter="24">
               <a-col :md="12" :sm="8">
-                <a-form-item label="杞﹂棿鍚嶇О" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
+                <a-form-item label="杞﹂棿鍚嶇О" :labelCol="{ span: 5 }" :wrapperCol="{ span: 18, offset: 1 }">
                   <a-input placeholder="" v-model="queryParam.workshopName"></a-input>
                 </a-form-item>
               </a-col>
-              <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
-            <a-col :md="12" :sm="24">
-               <a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 21px">鏌ヨ</a-button>
-              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
-            </a-col>
-          </span>
+              <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
+                <a-col :md="12" :sm="24">
+                  <a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 21px">鏌ヨ</a-button>
+                  <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
+                </a-col>
+              </span>
             </a-row>
           </a-form>
         </div>
@@ -26,15 +26,17 @@
           <a-button @click="handleAdd" type="primary" icon="plus">鏂板缓杞﹂棿</a-button>
         </div>
 
-        <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
-          <i class="anticon anticon-info-circle ant-alert-icon">
-          </i> 宸查�夋嫨 <a><b>{{ selectedRowKeys1.length }}</b></a>椤�
+        <div class="ant-alert ant-alert-info" style="margin-bottom: 16px">
+          <i class="anticon anticon-info-circle ant-alert-icon"> </i> 宸查�夋嫨
+          <a
+            ><b>{{ selectedRowKeys1.length }}</b></a
+          >椤�
           <a style="margin-left: 24px" @click="onClearSelected1">娓呯┖</a>
         </div>
 
         <div style="margin-top: 15px">
           <a-table
-            style="height:500px"
+            style="height: 500px"
             ref="table"
             size="middle"
             bordered
@@ -43,85 +45,85 @@
             :dataSource="dataSource"
             :pagination="ipagination"
             :loading="loading"
-            :rowSelection="{selectedRowKeys: selectedRowKeys1, onChange: onSelectChange1, type:'radio'}"
-            @change="handleTableChange">
-            <template slot="backgroundImage" slot-scope="text,record">
-              <img :src="getImgView(record.backgroundImage)" width="50" height="50">
+            :rowSelection="{ selectedRowKeys: selectedRowKeys1, onChange: onSelectChange1, type: 'radio' }"
+            @change="handleTableChange"
+          >
+            <template slot="backgroundImage" slot-scope="text, record">
+              <img :src="getImgView(record.backgroundImage)" width="50" height="50" />
             </template>
             <span slot="action" slot-scope="text, record">
-            <a @click="handleOpen(record)">杞﹂棿</a>
-            <a-divider type="vertical"/>
-            <a-dropdown>
-              <a class="ant-dropdown-link">
-                鏇村 <a-icon type="down"/>
-              </a>
-              <a-menu slot="overlay">
-                <a-menu-item>
-                  <a @click="handleEdit(record)">缂栬緫</a>
-                </a-menu-item>
-                <a-menu-item>
-                  <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete1(record.id)">
-                    <a>鍒犻櫎</a>
-                  </a-popconfirm>
-                </a-menu-item>
-              </a-menu>
-            </a-dropdown>
-        </span>
+              <a @click="handleOpen(record)">璁惧</a>
+              <a-divider type="vertical" />
+              <a-dropdown>
+                <a class="ant-dropdown-link"> 鏇村 <a-icon type="down" /> </a>
+                <a-menu slot="overlay">
+                  <a-menu-item>
+                    <a @click="handleEdit(record)">缂栬緫</a>
+                  </a-menu-item>
+                  <a-menu-item>
+                    <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete1(record.id)">
+                      <a>鍒犻櫎</a>
+                    </a-popconfirm>
+                  </a-menu-item>
+                </a-menu>
+              </a-dropdown>
+            </span>
           </a-table>
         </div>
       </a-card>
     </a-col>
     <a-col :md="rightColMd" :sm="24" v-if="this.rightcolval == 1">
       <a-card :bordered="false">
-        <div style="text-align: right;">
-          <a-icon type="close-circle" @click="hideUserList"/>
+        <div style="text-align: right">
+          <a-icon type="close-circle" @click="hideUserList" />
         </div>
         <!-- 鏌ヨ鍖哄煙 -->
         <div class="table-page-search-wrapper">
           <a-form layout="inline">
             <a-row :gutter="24">
-
               <a-col :md="12" :sm="12">
                 <a-form-item label="璁惧缂栫爜">
                   <a-input placeholder="" v-model="queryParam2.equipmentId"></a-input>
                 </a-form-item>
               </a-col>
-              <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
-            <a-col :md="9" :sm="24">
-             <a-button type="primary" @click="searchQuery2" icon="search" style="margin-left: 21px">鏌ヨ</a-button>
-              <a-button type="primary" @click="searchReset2" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
-
-            </a-col>
-          </span>
+              <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
+                <a-col :md="9" :sm="24">
+                  <a-button type="primary" @click="searchQuery2" icon="search" style="margin-left: 21px">鏌ヨ</a-button>
+                  <a-button type="primary" @click="searchReset2" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
+                </a-col>
+              </span>
             </a-row>
           </a-form>
         </div>
         <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
         <div class="table-operator" :md="24" :sm="24">
-          <a-button @click="handleAddDeviceInWorkshop" type="primary" icon="plus" style="margin-top: 16px">宸叉湁璁惧
+          <a-button @click="handleAddDeviceInWorkshop" type="primary" icon="plus" style="margin-top: 16px"
+            >宸叉湁璁惧
           </a-button>
 
           <a-dropdown v-if="selectedRowKeys2.length > 0">
             <a-menu slot="overlay">
               <a-menu-item key="1" @click="batchDel2">
-                <a-icon type="delete"/>
+                <a-icon type="delete" />
                 鍒犻櫎
               </a-menu-item>
             </a-menu>
-            <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔
-              <a-icon type="down"/>
+            <a-button style="margin-left: 8px">
+              鎵归噺鎿嶄綔
+              <a-icon type="down" />
             </a-button>
           </a-dropdown>
         </div>
         <!-- table鍖哄煙-begin -->
         <div>
-          <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
-            <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{
-            selectedRowKeys2.length }}</a>椤�
+          <div class="ant-alert ant-alert-info" style="margin-bottom: 16px">
+            <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨
+            <a style="font-weight: 600">{{ selectedRowKeys2.length }}</a
+            >椤�
             <a style="margin-left: 24px" @click="onClearSelected2">娓呯┖</a>
           </div>
           <a-table
-            style="height:500px"
+            style="height: 500px"
             ref="table2"
             bordered
             size="middle"
@@ -130,366 +132,370 @@
             :dataSource="dataSource2"
             :pagination="ipagination2"
             :loading="loading2"
-            :rowSelection="{selectedRowKeys: selectedRowKeys2, onChange: onSelectChange2}"
-            @change="handleTableChange2">
+            :rowSelection="{ selectedRowKeys: selectedRowKeys2, onChange: onSelectChange2 }"
+            @change="handleTableChange2"
+          >
             <span slot="action" slot-scope="text, record">
-          <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete2(record.equipmentId)">
-                  <a>鍒犻櫎</a>
-          </a-popconfirm>
-        </span>
+              <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete2(record.equipmentId)">
+                <a>鍒犻櫎</a>
+              </a-popconfirm>
+            </span>
           </a-table>
         </div>
       </a-card>
     </a-col>
     <!-- 琛ㄥ崟鍖哄煙 -->
-    <workshop-modal ref="modalForm" @ok="modalFormOk"></workshop-modal> <!--鏂板杞﹂棿-->
-    <select-device-modal ref="selectUserModal" @selectFinished="selectOK"></select-device-modal> <!--宸叉湁璁惧-->
+    <workshop-modal ref="modalForm" @ok="modalFormOk"></workshop-modal>
+    <!--鏂板杞﹂棿-->
+    <select-device-modal ref="selectUserModal" @selectFinished="selectOK"></select-device-modal>
+    <!--宸叉湁璁惧-->
   </a-row>
 </template>
 <script>
-  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-  import { deleteAction, postAction, getAction } from '@/api/manage'
-  import SelectDeviceModal from './modules/SelectDeviceModal'
-  import WorkshopModal from './modules/WorkshopModal'
-  import { filterObj } from '@/utils/util'
-  import moment from 'moment'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import { deleteAction, postAction, getAction } from '@/api/manage'
+import SelectDeviceModal from './modules/SelectDeviceModal'
+import WorkshopModal from './modules/WorkshopModal'
+import { filterObj } from '@/utils/util'
+import moment from 'moment'
 
-  export default {
-    name: 'WorkshopSignageManagement',
-    mixins: [JeecgListMixin],
-    components: {
-      SelectDeviceModal,
-      WorkshopModal,
-      moment
+export default {
+  name: 'WorkshopSignageManagement',
+  mixins: [JeecgListMixin],
+  components: {
+    SelectDeviceModal,
+    WorkshopModal,
+    moment,
+  },
+  data() {
+    return {
+      model1: {},
+      model2: {},
+      currentRoleId: '',
+      currentWorkshopId: '',
+      queryParam1: {},
+      queryParam2: {},
+      dataSource1: [],
+      dataSource2: [],
+      ipagination1: {
+        current: 1,
+        pageSize: 10,
+        pageSizeOptions: ['10', '20', '30'],
+        showTotal: (total, range) => {
+          return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�'
+        },
+        showQuickJumper: true,
+        showSizeChanger: true,
+        total: 0,
+      },
+      ipagination2: {
+        current: 1,
+        pageSize: 10,
+        pageSizeOptions: ['10', '20', '30'],
+        showTotal: (total, range) => {
+          return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�'
+        },
+        showQuickJumper: true,
+        showSizeChanger: true,
+        total: 0,
+      },
+      isorter1: {
+        column: 'createTime',
+        order: 'desc',
+      },
+      isorter2: {
+        column: 'createTime',
+        order: 'desc',
+      },
+      filters1: {},
+      filters2: {},
+      loading1: false,
+      loading2: false,
+      selectedRowKeys1: [],
+      selectedRowKeys2: [],
+      selectionRows1: [],
+      selectionRows2: [],
+      test: {},
+      rightcolval: 0,
+      columns: [
+        {
+          title: '杞﹂棿鍚嶇О',
+          align: 'center',
+          dataIndex: 'workshopName',
+        },
+        {
+          title: '杞﹂棿鑳屾櫙鍥�',
+          dataIndex: 'backgroundImage',
+          align: 'center',
+          scopedSlots: { customRender: 'backgroundImage' },
+        },
+        {
+          title: '鎿嶄綔',
+          dataIndex: 'action',
+          align: 'center',
+          scopedSlots: { customRender: 'action' },
+        },
+      ],
+      columns2: [
+        {
+          title: '璁惧缂栫爜',
+          align: 'center',
+          dataIndex: 'equipmentId',
+          width: 120,
+        },
+        {
+          title: '璁惧鍚嶇О',
+          align: 'center',
+          width: 100,
+          dataIndex: 'equipmentName',
+        },
+        {
+          title: '璁惧绫诲瀷',
+          align: 'center',
+          width: 80,
+          dataIndex: 'equipmentType',
+        },
+
+        {
+          title: '鎿嶄綔',
+          dataIndex: 'action',
+          scopedSlots: { customRender: 'action' },
+          align: 'center',
+          width: 120,
+        },
+      ],
+      // 楂樼骇鏌ヨ鍙傛暟
+      superQueryParams2: '',
+      // 楂樼骇鏌ヨ鎷兼帴鏉′欢
+      superQueryMatchType2: 'and',
+      url: {
+        list: '/mdc/mdcWorkshopInfo/list',
+        delete: '/mdc/mdcWorkshopInfo/delete',
+        list2: '/mdc/mdcWorkshopInfo/workshopEquipmentList',
+        addDeviceInWorkshop: '/mdc/mdcWorkshopInfo/addWorkshopEquipment',
+        delete2: '/mdc/mdcWorkshopInfo/deleteWorkshopEquipment',
+        deleteBatch2: '/mdc/mdcWorkshopInfo/deleteWorkshopEquipmentBatch',
+      },
+    }
+  },
+  computed: {
+    leftColMd() {
+      return this.selectedRowKeys1.length === 0 ? 24 : 12
     },
-    data() {
-      return {
-        model1: {},
-        model2: {},
-        currentRoleId: '',
-        currentWorkshopId: '',
-        queryParam1: {},
-        queryParam2: {},
-        dataSource1: [],
-        dataSource2: [],
-        ipagination1: {
-          current: 1,
-          pageSize: 10,
-          pageSizeOptions: ['10', '20', '30'],
-          showTotal: (total, range) => {
-            return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�'
-          },
-          showQuickJumper: true,
-          showSizeChanger: true,
-          total: 0
-        },
-        ipagination2: {
-          current: 1,
-          pageSize: 10,
-          pageSizeOptions: ['10', '20', '30'],
-          showTotal: (total, range) => {
-            return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�'
-          },
-          showQuickJumper: true,
-          showSizeChanger: true,
-          total: 0
-        },
-        isorter1: {
-          column: 'createTime',
-          order: 'desc'
-        },
-        isorter2: {
-          column: 'createTime',
-          order: 'desc'
-        },
-        filters1: {},
-        filters2: {},
-        loading1: false,
-        loading2: false,
-        selectedRowKeys1: [],
-        selectedRowKeys2: [],
-        selectionRows1: [],
-        selectionRows2: [],
-        test: {},
-        rightcolval: 0,
-        columns: [
-          {
-            title: '杞﹂棿鍚嶇О',
-            align: 'center',
-            dataIndex: 'workshopName'
-          },
-          {
-            title: '杞﹂棿鑳屾櫙鍥�',
-            dataIndex: 'backgroundImage',
-            align: 'center',
-            scopedSlots: { customRender: 'backgroundImage' }
-          },
-          {
-            title: '鎿嶄綔',
-            dataIndex: 'action',
-            align: 'center',
-            scopedSlots: { customRender: 'action' }
-          }
-        ],
-        columns2: [
-          {
-            title: '璁惧缂栫爜',
-            align: 'center',
-            dataIndex: 'equipmentId',
-            width: 120
-          },
-          {
-            title: '璁惧鍚嶇О',
-            align: 'center',
-            width: 100,
-            dataIndex: 'equipmentName'
-          },
-          {
-            title: '璁惧绫诲瀷',
-            align: 'center',
-            width: 80,
-            dataIndex: 'equipmentType'
-          },
-
-          {
-            title: '鎿嶄綔',
-            dataIndex: 'action',
-            scopedSlots: { customRender: 'action' },
-            align: 'center',
-            width: 120
-          }],
-        // 楂樼骇鏌ヨ鍙傛暟
-        superQueryParams2: '',
-        // 楂樼骇鏌ヨ鎷兼帴鏉′欢
-        superQueryMatchType2: 'and',
-        url: {
-          list: '/mdc/mdcWorkshopInfo/list',
-          delete: '/mdc/mdcWorkshopInfo/delete',
-          list2: '/mdc/mdcWorkshopInfo/workshopEquipmentList',
-          addDeviceInWorkshop: '/mdc/mdcWorkshopInfo/addWorkshopEquipment',
-          delete2: '/mdc/mdcWorkshopInfo/deleteWorkshopEquipment',
-          deleteBatch2: '/mdc/mdcWorkshopInfo/deleteWorkshopEquipmentBatch'
-        }
+    rightColMd() {
+      return this.selectedRowKeys1.length === 0 ? 0 : 12
+    },
+  },
+  methods: {
+    onSelectChange2(selectedRowKeys, selectionRows) {
+      this.selectedRowKeys2 = selectedRowKeys
+      this.selectionRows2 = selectionRows
+    },
+    onClearSelected2() {
+      this.selectedRowKeys2 = []
+      this.selectionRows2 = []
+    },
+    onClearSelected1() {
+      this.selectedRowKeys1 = []
+      this.selectionRows1 = []
+    },
+    onSelectChange1(selectedRowKeys, selectionRows) {
+      this.rightcolval = 1
+      this.selectedRowKeys1 = selectedRowKeys
+      this.selectionRows1 = selectionRows
+      this.model1 = Object.assign({}, selectionRows[0])
+      this.currentWorkshopId = selectedRowKeys[0]
+      this.loadData2()
+    },
+    getQueryParams2() {
+      //鑾峰彇鏌ヨ鏉′欢
+      let sqp = {}
+      if (this.superQueryParams2) {
+        sqp['superQueryParams'] = encodeURI(this.superQueryParams2)
+        sqp['superQueryMatchType'] = this.superQueryMatchType2
       }
+      var param = Object.assign(sqp, this.queryParam2, this.isorter2, this.filters2)
+      param.field = this.getQueryField2()
+      param.pageNo = this.ipagination2.current
+      param.pageSize = this.ipagination2.pageSize
+      return filterObj(param)
     },
-    computed: {
-      leftColMd() {
-        return this.selectedRowKeys1.length === 0 ? 24 : 12
-      },
-      rightColMd() {
-        return this.selectedRowKeys1.length === 0 ? 0 : 12
+    getQueryField2() {
+      //TODO 瀛楁鏉冮檺鎺у埗
+      var str = 'id,'
+      this.columns2.forEach(function (value) {
+        str += ',' + value.dataIndex
+      })
+      return str
+    },
+    modalFormOk2() {
+      // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
+      this.loadData2()
+    },
+    loadData2(arg) {
+      if (!this.url.list2) {
+        this.$message.error('璇疯缃畊rl.list2灞炴��!')
+        return
       }
+      //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
+      if (arg === 1) {
+        this.ipagination2.current = 1
+      }
+      if (this.currentWorkshopId === '') return
+      let params = this.getQueryParams2() //鏌ヨ鏉′欢
+      params.workshopId = this.currentWorkshopId
+      this.loading2 = true
+      getAction(this.url.list2, params).then((res) => {
+        if (res.success) {
+          this.dataSource2 = res.result.records
+          this.ipagination2.total = res.result.total
+        }
+        this.loading2 = false
+      })
     },
-    methods: {
-      onSelectChange2(selectedRowKeys, selectionRows) {
-        this.selectedRowKeys2 = selectedRowKeys
-        this.selectionRows2 = selectionRows
-      },
-      onClearSelected2() {
-        this.selectedRowKeys2 = []
-        this.selectionRows2 = []
-      },
-      onClearSelected1() {
-        this.selectedRowKeys1 = []
-        this.selectionRows1 = []
-      },
-      onSelectChange1(selectedRowKeys, selectionRows) {
-        this.rightcolval = 1
-        this.selectedRowKeys1 = selectedRowKeys
-        this.selectionRows1 = selectionRows
-        this.model1 = Object.assign({}, selectionRows[0])
-        this.currentWorkshopId = selectedRowKeys[0]
-        this.loadData2()
-      },
-      getQueryParams2() {
-        //鑾峰彇鏌ヨ鏉′欢
-        let sqp = {}
-        if (this.superQueryParams2) {
-          sqp['superQueryParams'] = encodeURI(this.superQueryParams2)
-          sqp['superQueryMatchType'] = this.superQueryMatchType2
-        }
-        var param = Object.assign(sqp, this.queryParam2, this.isorter2, this.filters2)
-        param.field = this.getQueryField2()
-        param.pageNo = this.ipagination2.current
-        param.pageSize = this.ipagination2.pageSize
-        return filterObj(param)
-      },
-      getQueryField2() {
-        //TODO 瀛楁鏉冮檺鎺у埗
-        var str = 'id,'
-        this.columns2.forEach(function(value) {
-          str += ',' + value.dataIndex
-        })
-        return str
-      },
-      modalFormOk2() {
-        // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
-        this.loadData2()
-      },
-      loadData2(arg) {
-        if (!this.url.list2) {
-          this.$message.error('璇疯缃畊rl.list2灞炴��!')
-          return
-        }
-        //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
-        if (arg === 1) {
-          this.ipagination2.current = 1
-        }
-        if (this.currentWorkshopId === '') return
-        let params = this.getQueryParams2()//鏌ヨ鏉′欢
-        params.workshopId = this.currentWorkshopId
-        this.loading2 = true
-        getAction(this.url.list2, params).then((res) => {
-          if (res.success) {
-            this.dataSource2 = res.result.records
-            this.ipagination2.total = res.result.total
-          }
-          this.loading2 = false
-        })
-      },
-      handleDelete1: function(id) {
-        this.handleDelete(id)
-        this.dataSource2 = []
-        this.currentRoleId = ''
-      },
+    handleDelete1: function (id) {
+      this.handleDelete(id)
+      this.dataSource2 = []
+      this.currentRoleId = ''
+    },
 
-      /**
-       * 鐐瑰嚮璁惧琛ㄦ牸涓殑鍒犻櫎鎸夐挳鍚庤Е鍙戝垹闄ゅ崟涓溅闂翠笌璁惧鐨勫叧绯�
-       * @param equipmentId 褰撳墠琛岀殑璁惧缂栧彿
-       */
-      handleDelete2: function(equipmentId) {
-        if (!this.url.delete2) {
-          this.$message.error('璇疯缃畊rl.delete2灞炴��!')
-          return
+    /**
+     * 鐐瑰嚮璁惧琛ㄦ牸涓殑鍒犻櫎鎸夐挳鍚庤Е鍙戝垹闄ゅ崟涓溅闂翠笌璁惧鐨勫叧绯�
+     * @param equipmentId 褰撳墠琛岀殑璁惧缂栧彿
+     */
+    handleDelete2: function (equipmentId) {
+      if (!this.url.delete2) {
+        this.$message.error('璇疯缃畊rl.delete2灞炴��!')
+        return
+      }
+      var that = this
+      deleteAction(that.url.delete2, { workshopId: this.currentWorkshopId, equipmentId }).then((res) => {
+        if (res.success) {
+          that.$message.success(res.message)
+          that.loadData2()
+        } else {
+          that.$message.warning(res.message)
+        }
+      })
+    },
+
+    /**
+     * 鎵归噺鍒犻櫎杞﹂棿涓庤澶囩殑鍏崇郴
+     */
+    batchDel2: function () {
+      if (!this.url.deleteBatch2) {
+        this.$message.error('璇疯缃畊rl.deleteBatch2灞炴��!')
+        return
+      }
+      if (this.selectedRowKeys2.length <= 0) {
+        // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒')
+        this.$notification.warning({
+          message: '娑堟伅',
+          description: '璇烽�夋嫨涓�鏉¤褰�',
+        })
+        return
+      } else {
+        var ids = ''
+        for (var a = 0; a < this.selectedRowKeys2.length; a++) {
+          ids += this.selectedRowKeys2[a] + ','
         }
         var that = this
-        deleteAction(that.url.delete2, { workshopId: this.currentWorkshopId, equipmentId }).then((res) => {
-          if (res.success) {
-            that.$message.success(res.message)
-            that.loadData2()
-          } else {
-            that.$message.warning(res.message)
-          }
+        this.$confirm({
+          title: '纭鍒犻櫎',
+          content: '鏄惁鍒犻櫎閫変腑鏁版嵁?',
+          onOk: function () {
+            deleteAction(that.url.deleteBatch2, {
+              workshopId: that.currentWorkshopId,
+              equipmentIds: ids,
+            }).then((res) => {
+              if (res.success) {
+                that.$message.success(res.message)
+                that.loadData2()
+                that.onClearSelected()
+              } else {
+                that.$message.warning(res.message)
+              }
+            })
+          },
         })
-      },
-
-      /**
-       * 鎵归噺鍒犻櫎杞﹂棿涓庤澶囩殑鍏崇郴
-       */
-      batchDel2: function() {
-        if (!this.url.deleteBatch2) {
-          this.$message.error('璇疯缃畊rl.deleteBatch2灞炴��!')
-          return
-        }
-        if (this.selectedRowKeys2.length <= 0) {
-          // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒')
-          this.$notification.warning({
-            message: '娑堟伅',
-            description: '璇烽�夋嫨涓�鏉¤褰�'
-          })
-          return
-        } else {
-          var ids = ''
-          for (var a = 0; a < this.selectedRowKeys2.length; a++) {
-            ids += this.selectedRowKeys2[a] + ','
-          }
-          var that = this
-          this.$confirm({
-            title: '纭鍒犻櫎',
-            content: '鏄惁鍒犻櫎閫変腑鏁版嵁?',
-            onOk: function() {
-              deleteAction(that.url.deleteBatch2, {
-                workshopId: that.currentWorkshopId,
-                equipmentIds: ids
-              }).then((res) => {
-                if (res.success) {
-                  that.$message.success(res.message)
-                  that.loadData2()
-                  that.onClearSelected()
-                } else {
-                  that.$message.warning(res.message)
-                }
-              })
-            }
-          })
-        }
-      },
-
-      /**
-       * 閫夋嫨宸叉湁璁惧鍚庣偣鍑荤‘瀹氭椂瑙﹀彂
-       * @param data 宸查�夋嫨鐨勮澶�
-       */
-      selectOK(data) {
-        let params = {}
-        params.workshopId = this.currentWorkshopId
-        params.equipmentIdList = []
-        for (var a = 0; a < data.length; a++) {
-          params.equipmentIdList.push(data[a])
-        }
-        console.log(params)
-        postAction(this.url.addDeviceInWorkshop, params).then((res) => {
-          if (res.success) {
-            this.loadData2()
-            this.$message.success(res.message)
-          } else {
-            this.$message.warning(res.message)
-          }
-        })
-      },
-
-      /**
-       * 鐐瑰嚮宸叉湁璁惧鎸夐挳瑙﹀彂
-       */
-      handleAddDeviceInWorkshop() {
-        if (this.currentWorkshopId == '') {
-          this.$message.error('璇烽�夋嫨涓�涓溅闂�!')
-        } else {
-          this.$refs.selectUserModal.visible = true
-          this.$refs.selectUserModal.selectedRowKeys = []
-          this.$refs.selectUserModal.selectedRows = []
-        }
-      },
-
-      /**
-       * 鐐瑰嚮褰撳墠琛岃溅闂撮�夐」鍚庤Е鍙戜簨浠�
-       * @param record 褰撳墠琛屾暟鎹�
-       */
-      handleOpen(record) {
-        this.rightcolval = 1
-        this.selectedRowKeys1 = [record.id]
-        this.model1 = Object.assign({}, record)
-        this.currentWorkshopId = record.id
-        this.onClearSelected2()
-        this.loadData2()
-      },
-
-      searchQuery2() {
-        this.loadData2(1)
-      },
-      searchReset2() {
-        this.queryParam2 = {}
-        this.loadData2(1)
-      },
-      handleTableChange2(pagination, filters, sorter) {
-        //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂
-        //TODO 绛涢��
-        if (Object.keys(sorter).length > 0) {
-          this.isorter2.column = sorter.field
-          this.isorter2.order = 'ascend' == sorter.order ? 'asc' : 'desc'
-        }
-        this.ipagination2 = pagination
-        this.loadData2()
-      },
-      hideUserList() {
-        //this.rightcolval = 0
-        this.selectedRowKeys1 = []
       }
-    }
-  }
+    },
+
+    /**
+     * 閫夋嫨宸叉湁璁惧鍚庣偣鍑荤‘瀹氭椂瑙﹀彂
+     * @param data 宸查�夋嫨鐨勮澶�
+     */
+    selectOK(data) {
+      let params = {}
+      params.workshopId = this.currentWorkshopId
+      params.equipmentIdList = []
+      for (var a = 0; a < data.length; a++) {
+        params.equipmentIdList.push(data[a])
+      }
+      console.log(params)
+      postAction(this.url.addDeviceInWorkshop, params).then((res) => {
+        if (res.success) {
+          this.loadData2()
+          this.$message.success(res.message)
+        } else {
+          this.$message.warning(res.message)
+        }
+      })
+    },
+
+    /**
+     * 鐐瑰嚮宸叉湁璁惧鎸夐挳瑙﹀彂
+     */
+    handleAddDeviceInWorkshop() {
+      if (this.currentWorkshopId == '') {
+        this.$message.error('璇烽�夋嫨涓�涓溅闂�!')
+      } else {
+        this.$refs.selectUserModal.visible = true
+        this.$refs.selectUserModal.selectedRowKeys = []
+        this.$refs.selectUserModal.selectedRows = []
+      }
+    },
+
+    /**
+     * 鐐瑰嚮褰撳墠琛岃溅闂撮�夐」鍚庤Е鍙戜簨浠�
+     * @param record 褰撳墠琛屾暟鎹�
+     */
+    handleOpen(record) {
+      this.rightcolval = 1
+      this.selectedRowKeys1 = [record.id]
+      this.model1 = Object.assign({}, record)
+      this.currentWorkshopId = record.id
+      this.onClearSelected2()
+      this.loadData2()
+    },
+
+    searchQuery2() {
+      this.loadData2(1)
+    },
+    searchReset2() {
+      this.queryParam2 = {}
+      this.loadData2(1)
+    },
+    handleTableChange2(pagination, filters, sorter) {
+      //鍒嗛〉銆佹帓搴忋�佺瓫閫夊彉鍖栨椂瑙﹀彂
+      //TODO 绛涢��
+      if (Object.keys(sorter).length > 0) {
+        this.isorter2.column = sorter.field
+        this.isorter2.order = 'ascend' == sorter.order ? 'asc' : 'desc'
+      }
+      this.ipagination2 = pagination
+      this.loadData2()
+    },
+    hideUserList() {
+      //this.rightcolval = 0
+      this.selectedRowKeys1 = []
+    },
+  },
+}
 </script>
 <style scoped>
-  /** Button鎸夐挳闂磋窛 */
-  .ant-btn {
-    margin-left: 8px
-  }
+/** Button鎸夐挳闂磋窛 */
+.ant-btn {
+  margin-left: 8px;
+}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3