From 1e653db94c24389cc7615fd4a7ef1d63b00af534 Mon Sep 17 00:00:00 2001
From: cuilei <ray_tsu1@163.com>
Date: 星期五, 13 六月 2025 11:39:32 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 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