From fe011cf7399e8ad5738ab7668a7d6109d9a5cbc6 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期一, 09 六月 2025 16:56:36 +0800 Subject: [PATCH] 联调终端停机上报页面列表查询、维护停机和拆分停机信息功能 --- 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..b43965e 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.confirmLoading = true + this.$refs.form.validate(valid => { + if (valid) { + 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