From 872362acd0e306bb2150d72cce1b556d272e6ba5 Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期三, 25 六月 2025 10:01:24 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/mdc/base/modules/OEEAnalysis/ComputeOeeModal.vue |   26 ++++++++++++--------------
 1 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/src/views/mdc/base/modules/OEEAnalysis/ComputeOeeModal.vue b/src/views/mdc/base/modules/OEEAnalysis/ComputeOeeModal.vue
index 1445eee..91e11fb 100644
--- a/src/views/mdc/base/modules/OEEAnalysis/ComputeOeeModal.vue
+++ b/src/views/mdc/base/modules/OEEAnalysis/ComputeOeeModal.vue
@@ -1,17 +1,17 @@
 <template>
-  <a-modal title="璁$畻OEE" :visible="visible" :width="550" @cancel="handleModalClose" @ok="handleComputeOee"
-           :maskClosable="false">
+  <j-modal title="璁$畻OEE" :visible="visible" :width="550" @cancel="handleModalClose" @ok="handleComputeOee"
+           :maskClosable="false" :confirmLoading="confirmLoading">
     <a-form-model :model="model" :labelCol="labelColLong" :wrapperCol="wrapperColLong">
       <a-row>
         <a-col :span="24">
           <a-form-model-item label="鏃ユ湡">
             <a-range-picker v-model="dates" style="width: 100%" value-format="YYYY-MM-DD"
-                            @change="dateParamChange"></a-range-picker>
+                            @change="dateParamChange" :allow-clear="false"/>
           </a-form-model-item>
         </a-col>
       </a-row>
     </a-form-model>
-  </a-modal>
+  </j-modal>
 </template>
 
 <script>
@@ -25,6 +25,7 @@
         visible: false,
         model: {},
         dates: [],
+        confirmLoading: false,
         labelColLong: {
           xs: { span: 24 },
           sm: { span: 3 }
@@ -37,7 +38,6 @@
     },
     methods: {
       handleComputeOee() {
-        console.log('model', this.model)
         if (this.dates.length === 0) {
           this.$notification.warning({
             message: '娑堟伅',
@@ -45,27 +45,25 @@
           })
           return
         }
-
+        this.confirmLoading = true
+        const that = this
         mdcApi.computeOeeApi(this.model)
           .then(res => {
             if (res.success) {
-              this.$notification.success({
+              that.$notification.success({
                 message: '娑堟伅',
                 description: res.message
               })
-              this.visible = false
+              that.handleModalClose()
             } else {
-              this.$notification.error({
+              that.$notification.error({
                 message: '娑堟伅',
                 description: '璁$畻澶辫触'
               })
             }
           })
-          .catch(err => {
-            this.$notification.error({
-              message: '娑堟伅',
-              description: '璁$畻澶辫触'
-            })
+          .finally(() => {
+            that.confirmLoading = false
           })
       },
 

--
Gitblit v1.9.3