From d8750fe7ab9bd6691cb3078f7cf365ae1f64ac06 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期一, 09 六月 2025 11:45:08 +0800 Subject: [PATCH] 利用率分段分析页面时间段默认值从00:00至08:00点调整为00:00至23:59分 --- src/views/mdc/base/modules/OEEAnalysis/ComputeOeeModal.vue | 42 ++++++++++++++++++++++++++++-------------- 1 files changed, 28 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..680178f 100644 --- a/src/views/mdc/base/modules/OEEAnalysis/ComputeOeeModal.vue +++ b/src/views/mdc/base/modules/OEEAnalysis/ComputeOeeModal.vue @@ -1,21 +1,24 @@ <template> - <a-modal title="璁$畻OEE" :visible="visible" :width="550" @cancel="handleModalClose" @ok="handleComputeOee" - :maskClosable="false"> - <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> - </a-form-model-item> - </a-col> - </a-row> - </a-form-model> - </a-modal> + <j-modal title="璁$畻OEE" :visible="visible" :width="550" @cancel="handleModalClose" @ok="handleComputeOee" + :maskClosable="false" :confirmLoading="confirmLoading"> + <a-spin :spinning="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" :disabledDate="disabledDate" style="width: 100%" value-format="YYYY-MM-DD" + @change="dateParamChange"></a-range-picker> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </a-spin> + </j-modal> </template> <script> import mdcApi from '@/api/mdc' + import moment from 'moment' export default { name: 'ComputeOeeModal', @@ -23,6 +26,7 @@ data() { return { visible: false, + confirmLoading: false, model: {}, dates: [], labelColLong: { @@ -46,6 +50,7 @@ return } + this.confirmLoading = true mdcApi.computeOeeApi(this.model) .then(res => { if (res.success) { @@ -53,7 +58,8 @@ message: '娑堟伅', description: res.message }) - this.visible = false + this.$emit('ok') + this.handleModalClose() } else { this.$notification.error({ message: '娑堟伅', @@ -67,6 +73,9 @@ description: '璁$畻澶辫触' }) }) + .finally(() => { + this.confirmLoading = false + }) }, dateParamChange(value1, value2) { @@ -74,6 +83,11 @@ this.model.endTime = value2[1] }, + disabledDate(current) { + // 涓嶈兘閫夋嫨褰撳ぉ鍙婂綋澶╀互鍚庣殑鏃ユ湡 + return current && current > moment().startOf('days') + }, + handleModalClose() { this.visible = false this.model = {} -- Gitblit v1.9.3