From b7ad54294da15dccc59f7b6c879af3e000024d9d Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期四, 19 六月 2025 17:51:30 +0800
Subject: [PATCH] 1、全局树组件多选设备抽屉组件增加点击树节点名称也可以选中当前节点 2、设备监控页面布局图查看设备详情时首次进入清空上一次设备信息(由于数据为定时刷新不能每次获取数据均清空) 3、设备类型管理页面调整设备类型图片尺寸以解决表格错行问题 4、设备管理页面添加或编辑设备弹窗选择设备时增加点击行即可选中

---
 src/views/dnc/base/modules/TerminalIndex/ReportEquipmentClose/MaintainShutdownModal.vue |   77 ++++++++++++++++++++++----------------
 1 files changed, 44 insertions(+), 33 deletions(-)

diff --git a/src/views/dnc/base/modules/TerminalIndex/ReportEquipmentClose/MaintainShutdownModal.vue b/src/views/dnc/base/modules/TerminalIndex/ReportEquipmentClose/MaintainShutdownModal.vue
index 36053ea..505e752 100644
--- a/src/views/dnc/base/modules/TerminalIndex/ReportEquipmentClose/MaintainShutdownModal.vue
+++ b/src/views/dnc/base/modules/TerminalIndex/ReportEquipmentClose/MaintainShutdownModal.vue
@@ -1,58 +1,69 @@
 <template>
-  <a-modal :visible="visible" title="缁存姢鍋滄満" @ok="handleSubmit" @cancel="handleCancel">
+  <j-modal :visible="visible" title="缁存姢鍋滄満" @ok="handleSubmit" @cancel="handleCancel" :confirmLoading="confirmLoading">
     <a-form-model ref="form" :model="model" :rules="validateRules" :labelCol="{span:5}" :wrapperCol="{span:18}">
-      <a-form-model-item prop="closeReason" label="鍋滄満鍘熷洜">
-        <a-select v-model="model.closeReason" placeholder="璇烽�夋嫨鍋滄満鍘熷洜">
-          <a-select-option v-for="item in closeReasonList" :key="item.id">
+      <a-form-model-item prop="reasonId" label="鍋滄満鍘熷洜">
+        <a-select v-model="model.reasonId" placeholder="璇烽�夋嫨鍋滄満鍘熷洜">
+          <a-select-option v-for="item in downtimeDescriptionList" :key="item.value">
             {{item.label}}
           </a-select-option>
         </a-select>
       </a-form-model-item>
     </a-form-model>
-  </a-modal>
+  </j-modal>
 </template>
 
 <script>
+  import { postAction } from '@/api/manage'
+
   export default {
     name: 'MaintainShutdownModal',
+    props: {
+      downtimeDescriptionList: {
+        type: Array
+      }
+    },
     data() {
       return {
         visible: false,
         model: {},
         validateRules: {
-          closeReason: [{ required: true, message: '璇烽�夋嫨鍋滄満鍘熷洜锛�' }]
+          reasonId: [{ required: true, message: '璇烽�夋嫨鍋滄満鍘熷洜锛�' }]
         },
-        closeReasonList: [
-          {
-            id: 1,
-            label: '鍚冮キ鏃堕棿浼戞伅'
-          },
-          {
-            id: 2,
-            label: '宸ヤ綔鏃堕棿浼戞伅'
-          },
-          {
-            id: 3,
-            label: '璁″垝鎬у仠鐢�'
-          },
-          {
-            id: 4,
-            label: '寰呮枡鍋滄満'
-          },
-          {
-            id: 5,
-            label: '棣栦欢璋冭瘯'
-          },
-          {
-            id: 6,
-            label: '鍒�閲忓叿鍑嗗'
-          }
-        ]
+        confirmLoading: false,
+        url: {
+          submit: '/mdc/operator/mdcDowntime/updateReason'
+        }
       }
     },
     methods: {
       handleSubmit() {
-
+        const that = this
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true
+            postAction(that.url.submit, that.model)
+              .then(res => {
+                if (res.success) {
+                  that.$notification.success({
+                    message: '娑堟伅',
+                    description: res.message
+                  })
+                  that.handleCancel()
+                  that.$emit('submitSuccess')
+                } else {
+                  that.$notification.warning({
+                    message: '娑堟伅',
+                    description: res.message
+                  })
+                }
+              })
+              .finally(() => {
+                that.confirmLoading = false
+              })
+          } else {
+            return false
+          }
+        })
       },
 
       handleCancel() {

--
Gitblit v1.9.3