From 47ad515964b18ed9b6bea66b7298be1e95ad4de5 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期四, 24 十月 2024 15:22:27 +0800 Subject: [PATCH] 1、新增设备综合效率分析以及报警分析页面 2、新增总控车间看板跳转第三方页面及外部应用功能 3、调整分控车间看板每日生产计划表格一直显示3条记录 --- src/views/mdc/base/modules/SparePartsManagement/SparePartsModal.vue | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/views/mdc/base/modules/SparePartsManagement/SparePartsModal.vue b/src/views/mdc/base/modules/SparePartsManagement/SparePartsModal.vue index 6102800..200e688 100644 --- a/src/views/mdc/base/modules/SparePartsManagement/SparePartsModal.vue +++ b/src/views/mdc/base/modules/SparePartsManagement/SparePartsModal.vue @@ -59,13 +59,14 @@ <a-col :span="12"> <a-form-model-item prop="overallFlag" label="鏄惁涓鸿嚜鍔ㄧ嚎" :labelCol="{xs: { span: 24 },sm: { span: 8 }}" :wrapperCol="{xs: { span: 24 },sm: { span: 16 }}"> - <j-switch v-model="model.overallFlag"></j-switch> + <j-switch v-model="model.overallFlag" @change="handleSwitchChange"></j-switch> </a-form-model-item> </a-col> - <a-col :span="12"> + <a-col :span="12" v-if="model.overallFlag==='N'"> <a-form-model-item prop="equipmentId" label="鐢熶骇璁惧" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-select v-model="model.equipmentId" placeholder="璇烽�夋嫨鐢熶骇璁惧" style="width: 100%"> + <a-select v-model="model.equipmentId" placeholder="璇烽�夋嫨鐢熶骇璁惧" mode="multiple" :maxTagCount="1" + style="width: 100%" allow-clear> <a-select-option v-for="(item,index) in equipmentList" :key="index" :value="item.equipmentId"> {{item.equipmentId}} </a-select-option> @@ -80,7 +81,7 @@ <template slot="footer"> - <a-popconfirm title="纭畾鏀惧純鎿嶄綔锛�" @confirm="visible=false" okText="纭畾" cancelText="鍙栨秷"> + <a-popconfirm title="纭畾鏀惧純鎿嶄綔锛�" @confirm="handleModalClose" okText="纭畾" cancelText="鍙栨秷"> <a-button style="margin-right: .8rem">鍙栨秷</a-button> </a-popconfirm> <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">鎻愪氦</a-button> @@ -185,6 +186,7 @@ edit(record) { this.visible = true this.model = Object.assign({}, record) + this.model.equipmentId = this.model.equipmentId.split(',') console.log('model', this.model) this.getProductionLineByApi() this.$nextTick(() => { @@ -199,6 +201,8 @@ if (valid) { that.confirmLoading = true let obj + if (!this.model.equipmentId) this.model.equipmentId = '' + else this.model.equipmentId = this.model.equipmentId.join(',') if (this.title == '鏂板') { obj = api.addSparePartApi(this.model) } else { @@ -249,6 +253,11 @@ this.getEquipmentListByProductionId() }, + handleSwitchChange(value) { + console.log('value', value) + if (value === 'Y') delete this.model.equipmentId + }, + getEquipmentListByProductionId() { api.getEquipmentListByProductionIdApi(this.model.productionId) .then(res => { @@ -260,6 +269,7 @@ handleModalClose() { this.visible = false this.equipmentList = [] + this.removeValidate() }, /** -- Gitblit v1.9.3