From 2b4abfa6fc83152b800a7696636fe682b7ec6cbf Mon Sep 17 00:00:00 2001 From: qushaowei <qushaowei@163.com> Date: 星期五, 12 一月 2024 16:39:50 +0800 Subject: [PATCH] 问题项修改 --- src/views/eam/modules/daily3MaintenanceOrder/Maintenance3ReceiptModal.vue | 8 src/views/eam/modules/precisionParametersTemplate/PrecisionParametersTemplateEditForm.vue | 424 ++++++++------- src/views/eam/modules/dailyMaintenanceStandard3/DailyMaintenanceStandardModal.vue | 2 src/views/eam/DailyInspectionStandardList.vue | 5 src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue | 40 src/views/eam/modules/dailyInspectionStandard/EquipmentList.vue | 2 src/views/eam/modules/dailyMaintenanceStandard3/EquipmentList.vue | 314 +++++++++++ src/views/eam/DailyMaintenanceStandard3List.vue | 6 src/views/eam/modules/dailyMaintenanceOrder/MaintenanceOrderModal.vue | 2 src/views/eam/modules/dailyMaintenanceStandard3/DailyMaintenanceStandardDetail.vue | 12 src/views/eam/modules/equipmentNew/EquipmentPrecisionParametersList.vue | 298 ++++++----- src/views/eam/DailyMaintenanceStandardList.vue | 6 src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardDetail.vue | 12 src/views/eam/modules/equipmentCalibrationOrder/TechnologyStatusAuthenticateModal.vue | 202 ++++++- src/views/eam/modules/maintenancePlan/StandardSelect.vue | 54 +- src/views/eam/modules/daily3MaintenanceOrder/TechnologyStatusAuthenticateModal.vue | 207 ++++++- src/views/eam/modules/maintenancePlan/EquipmentMaintenancePlanForm.vue | 2 src/views/eam/modules/dailyInspectionStandard/DailyInspectionStandardDetail.vue | 24 18 files changed, 1,156 insertions(+), 464 deletions(-) diff --git a/src/views/eam/DailyInspectionStandardList.vue b/src/views/eam/DailyInspectionStandardList.vue index 6025a98..3db495e 100644 --- a/src/views/eam/DailyInspectionStandardList.vue +++ b/src/views/eam/DailyInspectionStandardList.vue @@ -278,6 +278,11 @@ dataIndex: 'num', }, { + title: '绠$悊鍒跺害', + align: 'center', + dataIndex: 'disUda1', + }, + { title: '绛惧鐘舵��', align: 'center', dataIndex: 'approvalStatusName', diff --git a/src/views/eam/DailyMaintenanceStandard3List.vue b/src/views/eam/DailyMaintenanceStandard3List.vue index 776caca..96409ab 100644 --- a/src/views/eam/DailyMaintenanceStandard3List.vue +++ b/src/views/eam/DailyMaintenanceStandard3List.vue @@ -28,10 +28,10 @@ :md='8' :sm='24' > - <a-form-item label='璁惧鍚嶇О'> + <a-form-item label='缁熶竴缂栧彿'> <a-input - placeholder='璇疯緭鍏ヨ澶囧悕绉�' - v-model='queryParam.name' + placeholder='璇疯緭鍏ョ粺涓�缂栧彿' + v-model='queryParam.equipmentNum' ></a-input> </a-form-item> </a-col> diff --git a/src/views/eam/DailyMaintenanceStandardList.vue b/src/views/eam/DailyMaintenanceStandardList.vue index 40619b2..1959e41 100644 --- a/src/views/eam/DailyMaintenanceStandardList.vue +++ b/src/views/eam/DailyMaintenanceStandardList.vue @@ -28,10 +28,10 @@ :md='8' :sm='24' > - <a-form-item label='璁惧鍚嶇О'> + <a-form-item label='缁熶竴缂栧彿'> <a-input - placeholder='璇疯緭鍏ヨ澶囧悕绉�' - v-model='queryParam.name' + placeholder='璇疯緭鍏ョ粺涓�缂栧彿' + v-model='queryParam.equipmentNum' ></a-input> </a-form-item> </a-col> diff --git a/src/views/eam/modules/daily3MaintenanceOrder/Maintenance3ReceiptModal.vue b/src/views/eam/modules/daily3MaintenanceOrder/Maintenance3ReceiptModal.vue index 72e4c19..976f629 100644 --- a/src/views/eam/modules/daily3MaintenanceOrder/Maintenance3ReceiptModal.vue +++ b/src/views/eam/modules/daily3MaintenanceOrder/Maintenance3ReceiptModal.vue @@ -288,7 +288,6 @@ edit(record) { let that = this; - debugger if (record.receipts == "" || record.receipts == null) { this.getSysFileName() } @@ -323,6 +322,13 @@ const that = this; // 瑙﹀彂琛ㄥ崟楠岃瘉 + for (let i = 0; i < that.dataSource.length; i++) { + let o = that.dataSource[i] + if (o.firstInspect == "2" && o.secondInspect == "2") { + that.$message.warning("楠屾敹鍗曠" + (i + 1) + "琛岋紝涓ゆ妫�楠屽潎涓轰笉閫氳繃锛岃閲嶆柊妫�楠岃椤逛繚鍏诲唴瀹癸紒"); + return + } + } that.form.validateFields((err, values) => { if (!err) { this.$confirm({ diff --git a/src/views/eam/modules/daily3MaintenanceOrder/TechnologyStatusAuthenticateModal.vue b/src/views/eam/modules/daily3MaintenanceOrder/TechnologyStatusAuthenticateModal.vue index 1290a4a..583ce51 100644 --- a/src/views/eam/modules/daily3MaintenanceOrder/TechnologyStatusAuthenticateModal.vue +++ b/src/views/eam/modules/daily3MaintenanceOrder/TechnologyStatusAuthenticateModal.vue @@ -1,6 +1,6 @@ <template> <a-modal - :width="800" + :width="1000" :visible="visible" :maskClosable="false" @ok="handleOk" @@ -79,173 +79,240 @@ </div> <div> - <div :style="{height: '45px',float: 'left',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >妫�鏌ラ儴浣�</span> </div> - <div :style="{height: '45px',float: 'left',width: '40%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >妫�鏌ユ爣鍑�</span> </div> - <div :style="{height: '45px',float: 'right',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" - >妫�鏌ョ粨鏋�(鍚堟牸/涓嶅悎鏍�)</span> + >鏈夋棤姝ら」</span> + </div> + <div :style="{height: '45px',float: 'right',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <span + class="ant-descriptions-title" + style="font-size: large;font-style: normal;font-size: 15px;" + >妫�鏌ョ粨鏋�</span> </div> </div> <div> - <div :style="{height: '45px',float: 'left',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >鎿嶇旱鎵嬫焺鍙婂紑鍏�</span> </div> - <div :style="{height: '45px',float: 'left',width: '40%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >瀹夊叏銆佹棤鐮存崯</span> </div> - <div :style="{height: '45px',float: 'right',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <a-switch + checked-children="鏈�" + un-checked-children="娌℃湁" + :checked="model.result_8 == '0'" + @change="handle8Switch(model.result_8)" + /> + </div> + <div :style="{height: '45px',float: 'right',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <a-switch checked-children="鍚堟牸" un-checked-children="涓嶅悎鏍�" :checked="model.result_1 == '0'" @change="handleSwitch(model.result_1)" + :hidden="model.hidden1Switch" /> </div> </div> <div> - <div :style="{height: '45px',float: 'left',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >浼犲姩绯荤粺</span> </div> - <div :style="{height: '45px',float: 'left',width: '40%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >鐏垫椿銆佹棤寮傚搷</span> </div> - <div :style="{height: '45px',float: 'right',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <a-switch + checked-children="鏈�" + un-checked-children="娌℃湁" + :checked="model.result_9 == '0'" + @change="handle9Switch(model.result_9)" + /> + </div> + <div :style="{height: '45px',float: 'right',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <a-switch checked-children="鍚堟牸" un-checked-children="涓嶅悎鏍�" :checked="model.result_2 == '0'" @change="handle2Switch(model.result_2)" + :hidden="model.hidden2Switch" /> </div> </div> <div> - <div :style="{height: '45px',float: 'left',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >瀹夊叏瑁呯疆</span> </div> - <div :style="{height: '45px',float: 'left',width: '40%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >瀹夊叏銆佺伒鏁忋�佸彲闈�</span> </div> - <div :style="{height: '45px',float: 'right',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <a-switch + checked-children="鏈�" + un-checked-children="娌℃湁" + :checked="model.result_10 == '0'" + @change="handle10Switch(model.result_10)" + /> + </div> + <div :style="{height: '45px',float: 'right',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <a-switch checked-children="鍚堟牸" un-checked-children="涓嶅悎鏍�" :checked="model.result_3 == '0'" @change="handle3Switch(model.result_3)" + :hidden="model.hidden3Switch" /> </div> </div> <div> - <div :style="{height: '45px',float: 'left',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >璁惧澶栬</span> </div> - <div :style="{height: '45px',float: 'left',width: '40%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >鏁存磥</span> </div> - <div :style="{height: '45px',float: 'right',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <a-switch + checked-children="鏈�" + un-checked-children="娌℃湁" + :checked="model.result_11 == '0'" + @change="handle11Switch(model.result_11)" + /> + </div> + <div :style="{height: '45px',float: 'right',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <a-switch checked-children="鍚堟牸" un-checked-children="涓嶅悎鏍�" :checked="model.result_4 == '0'" @change="handle4Switch(model.result_4)" + :hidden="model.hidden4Switch" /> </div> </div> <div> - <div :style="{height: '45px',float: 'left',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >鐢垫皵绾胯矾</span> </div> - <div :style="{height: '45px',float: 'left',width: '40%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >绾胯矾鏁撮綈銆佹帴绾挎纭�</span> </div> - <div :style="{height: '45px',float: 'right',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <a-switch + checked-children="鏈�" + un-checked-children="娌℃湁" + :checked="model.result_12 == '0'" + @change="handle12Switch(model.result_12)" + /> + </div> + <div :style="{height: '45px',float: 'right',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <a-switch checked-children="鍚堟牸" un-checked-children="涓嶅悎鏍�" :checked="model.result_5 == '0'" @change="handle5Switch(model.result_5)" + :hidden="model.hidden5Switch" /> </div> </div> <div> - <div :style="{height: '45px',float: 'left',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >妫�鏌ュ悇绱у浐瑁呯疆</span> </div> - <div :style="{height: '45px',float: 'left',width: '40%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >鏃犳澗鍔�</span> </div> - <div :style="{height: '45px',float: 'right',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <a-switch + checked-children="鏈�" + un-checked-children="娌℃湁" + :checked="model.result_13 == '0'" + @change="handle13Switch(model.result_13)" + /> + </div> + <div :style="{height: '45px',float: 'right',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <a-switch checked-children="鍚堟牸" un-checked-children="涓嶅悎鏍�" :checked="model.result_6 == '0'" @change="handle6Switch(model.result_6)" + :hidden="model.hidden6Switch" /> - </div> </div> <div> - <div :style="{height: '45px',float: 'left',width: '70%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '50%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;float: center" >鏄惁婊¤冻鐢熶骇鍔犲伐瑕佹眰</span> </div> - <div :style="{height: '45px',float: 'right',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> - + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <a-switch + checked-children="鏈�" + un-checked-children="娌℃湁" + :checked="model.result_14 == '0'" + @change="handle14Switch(model.result_14)" + /> + </div> + <div :style="{height: '45px',float: 'right',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <a-switch checked-children="鍚堟牸" un-checked-children="涓嶅悎鏍�" :checked="model.result_7 == '0'" @change="handle7Switch(model.result_7)" + :hidden="model.hidden7Switch" /> </div> </div> @@ -360,13 +427,6 @@ }, confirmLoading: false, form: this.$form.createForm(this), - validatorRules: { - num: { - rules: [ - { required: true, message: '璇疯緭鍏ヤ繚鍏诲伐鍗曠紪鐮�!' }, - ] - }, - }, url: { add: "/eam/technologyStatus/technologyStatusAuthenticate", getTechnologyStatus: "/eam/technologyStatus/getTechnologyStatus", @@ -532,6 +592,85 @@ this.model = Object.assign({}, this.model); }, + handle8Switch(result_8) { + if ('0' == result_8) { + this.model.result_8 = '1' + this.model.hidden1Switch = true + } else { + this.model.result_8 = '0' + this.model.hidden1Switch = false + } + + this.model = Object.assign({}, this.model); + }, + + handle9Switch(result_9) { + if ('0' == result_9) { + this.model.result_9 = '1' + this.model.hidden2Switch = true + } else { + this.model.result_9 = '0' + this.model.hidden2Switch = false + } + this.model = Object.assign({}, this.model); + }, + + handle10Switch(result_10) { + + if ('0' == result_10) { + this.model.result_10 = '1' + this.model.hidden3Switch = true + } else { + this.model.result_10 = '0' + this.model.hidden3Switch = false + } + this.model = Object.assign({}, this.model); + }, + + handle11Switch(result_11) { + if ('0' == result_11) { + this.model.result_11 = '1' + this.model.hidden4Switch = true + } else { + this.model.result_11 = '0' + this.model.hidden4Switch = false + } + this.model = Object.assign({}, this.model); + }, + + handle12Switch(result_12) { + if ('0' == result_12) { + this.model.result_12 = '1' + this.model.hidden5Switch = true + } else { + this.model.result_12 = '0' + this.model.hidden5Switch = false + } + this.model = Object.assign({}, this.model); + }, + + handle13Switch(result_13) { + if ('0' == result_13) { + this.model.result_13 = '1' + this.model.hidden6Switch = true + } else { + this.model.result_13 = '0' + this.model.hidden6Switch = false + } + this.model = Object.assign({}, this.model); + }, + + handle14Switch(result_14) { + if ('0' == result_14) { + this.model.result_14 = '1' + this.model.hidden7Switch = true + } else { + this.model.result_14 = '0' + this.model.hidden7Switch = false + } + this.model = Object.assign({}, this.model); + }, + // handle21Switch(result_21) { diff --git a/src/views/eam/modules/dailyInspectionStandard/DailyInspectionStandardDetail.vue b/src/views/eam/modules/dailyInspectionStandard/DailyInspectionStandardDetail.vue index 9014edc..d6065e7 100644 --- a/src/views/eam/modules/dailyInspectionStandard/DailyInspectionStandardDetail.vue +++ b/src/views/eam/modules/dailyInspectionStandard/DailyInspectionStandardDetail.vue @@ -104,11 +104,11 @@ return parseInt(index) + 1; } }, - { - title: '閮ㄤ綅', - align: "center", - dataIndex: 'location', - }, + // { + // title: '閮ㄤ綅', + // align: "center", + // dataIndex: 'location', + // }, // { // title: '绀烘剰鍥�', // align: "center", @@ -122,7 +122,7 @@ }, { - title: '妫�娴嬫爣鍑�', + title: '瀹屾垚鏁版嵁/瑕佹眰', align: "center", dataIndex: 'detectionStandard', @@ -154,6 +154,18 @@ url: { list: "/eam/inspectionStandardDetail/getInspectionStandardList",//鏁版嵁鏉ユ簮mom_eam_daily_inspection_standard_detail }, + /* 鍒嗛〉鍙傛暟 */ + ipagination: { + current: 1, + pageSize: 20, + pageSizeOptions: ['5', '10', '20', '50'], + showTotal: (total, range) => { + return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�' + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 + }, } }, created() { diff --git a/src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue b/src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue index b2f3d01..cca34ff 100644 --- a/src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue +++ b/src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue @@ -129,22 +129,20 @@ </a-col> --> </a-row> <a-row :gutter="24"> - <!-- <a-col :span="12"> + <a-col :span="12"> <a-form-item - label="娲惧伐鏂瑰紡" + label="绠$悊鍒跺害" :labelCol="labelCol" :wrapperCol="wrapperCol" > - <j-dict-select-tag + <a-input allow-clear - :disabled="disableSubmit" - :placeholder="disableSubmit?'':'璇烽�夋嫨娲惧伐鏂瑰紡'" - :triggerChange="true" - dictCode="assign_mode" - v-decorator="['assignMode', validatorRules.assignMode]" + :disabled="false" + :placeholder="disableSubmit?'':'璇疯緭鍏ョ鐞嗗埗搴�'" + v-decorator="['disUda1', validatorRules.disUda1 ]" /> </a-form-item> - </a-col> --> + </a-col> <a-col :span="12"> <a-form-item label="鐗堟湰" @@ -326,7 +324,7 @@ dataIndex: 'name' }, { - title: '妫�娴嬫爣鍑�', + title: '瀹屾垚鏁版嵁/瑕佹眰', align: 'center', dataIndex: 'detectionStandard' }, @@ -350,7 +348,6 @@ align: 'center', dataIndex: 'inspectionCycleId', scopedSlots: { customRender: 'inspectionCycleId' }, - width: 170, }, // { // title: '绀烘剰鍥�', @@ -359,13 +356,13 @@ // scopedSlots: { customRender: 'photo' }, // width: 170, // }, - { - title: '閮ㄤ綅', - align: 'center', - dataIndex: 'location', - scopedSlots: { customRender: 'location' }, - width: 170, - }, + // { + // title: '閮ㄤ綅', + // align: 'center', + // dataIndex: 'location', + // scopedSlots: { customRender: 'location' }, + // width: 170, + // }, { title: '鎿嶄綔', align: 'center', @@ -418,6 +415,11 @@ historyVersion: { rules: [ { required: true, message: '璇疯緭鍏ュ巻鍙茬増鏈�!' }, + ] + }, + disUda1: { + rules: [ + { required: true, message: '璇疯緭鍏ョ鐞嗗埗搴�!' }, ] }, }, @@ -485,7 +487,7 @@ that.dataSource = temp; } that.$nextTick(() => { - that.form.setFieldsValue(pick(that.model, 'num', 'equipmentId', 'equipmentName', 'useDepartName', 'useId', 'teamName', 'assignMode', 'version', 'remark')); + that.form.setFieldsValue(pick(that.model, 'num', 'equipmentId', 'equipmentName', 'useDepartName', 'disUda1', 'useId', 'teamName', 'assignMode', 'version', 'remark')); }); if (record.id) { that.codeDisable = true; diff --git a/src/views/eam/modules/dailyInspectionStandard/EquipmentList.vue b/src/views/eam/modules/dailyInspectionStandard/EquipmentList.vue index 152ac50..0c3a096 100644 --- a/src/views/eam/modules/dailyInspectionStandard/EquipmentList.vue +++ b/src/views/eam/modules/dailyInspectionStandard/EquipmentList.vue @@ -170,7 +170,7 @@ }, ], url: { - list: "/eam/equipment/getEquipmentList", + list: "/eam/equipment/showEquipmentList", }, } }, diff --git a/src/views/eam/modules/dailyMaintenanceOrder/MaintenanceOrderModal.vue b/src/views/eam/modules/dailyMaintenanceOrder/MaintenanceOrderModal.vue index f7d9086..d72624a 100644 --- a/src/views/eam/modules/dailyMaintenanceOrder/MaintenanceOrderModal.vue +++ b/src/views/eam/modules/dailyMaintenanceOrder/MaintenanceOrderModal.vue @@ -646,7 +646,7 @@ // return // } this.$refs.DailyMaintenanceStandardList.list(data.useId); - this.$refs.DailyMaintenanceStandardList.title = "閫夋嫨鏃ュ父淇濆吇鏍囧噯"; + this.$refs.DailyMaintenanceStandardList.title = "閫夋嫨浜岀骇淇濆吇鏍囧噯"; }, sendMaintenanceStandardRecord(data) { let record = data.record; diff --git a/src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardDetail.vue b/src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardDetail.vue index 22a7fcf..a20afa7 100644 --- a/src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardDetail.vue +++ b/src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardDetail.vue @@ -195,6 +195,18 @@ url: { list: "/eam/maintenanceStandardDetail/getMaintenanceStandardList",//鏁版嵁鏉ユ簮mom_eam_daily_inspection_standard_detail }, + /* 鍒嗛〉鍙傛暟 */ + ipagination: { + current: 1, + pageSize: 20, + pageSizeOptions: ['5', '10', '20', '50'], + showTotal: (total, range) => { + return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�' + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 + }, } }, created() { diff --git a/src/views/eam/modules/dailyMaintenanceStandard3/DailyMaintenanceStandardDetail.vue b/src/views/eam/modules/dailyMaintenanceStandard3/DailyMaintenanceStandardDetail.vue index fd8a858..df3ac58 100644 --- a/src/views/eam/modules/dailyMaintenanceStandard3/DailyMaintenanceStandardDetail.vue +++ b/src/views/eam/modules/dailyMaintenanceStandard3/DailyMaintenanceStandardDetail.vue @@ -194,6 +194,18 @@ url: { list: "/eam/maintenanceStandardDetail/getMaintenanceStandardList",//鏁版嵁鏉ユ簮mom_eam_daily_inspection_standard_detail }, + /* 鍒嗛〉鍙傛暟 */ + ipagination: { + current: 1, + pageSize: 20, + pageSizeOptions: ['5', '10', '20', '50'], + showTotal: (total, range) => { + return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�' + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 + }, } }, created() { diff --git a/src/views/eam/modules/dailyMaintenanceStandard3/DailyMaintenanceStandardModal.vue b/src/views/eam/modules/dailyMaintenanceStandard3/DailyMaintenanceStandardModal.vue index 7147dcd..7fb8eae 100644 --- a/src/views/eam/modules/dailyMaintenanceStandard3/DailyMaintenanceStandardModal.vue +++ b/src/views/eam/modules/dailyMaintenanceStandard3/DailyMaintenanceStandardModal.vue @@ -404,7 +404,7 @@ import Vue from 'vue' import PdfView from '@views/common/PdfView' import { getFileAccessHttpUrl } from '@/api/manage'; -import EquipmentList from '.././dailyInspectionStandard/EquipmentList' +import EquipmentList from './EquipmentList' import DepartList from '.././dailyInspectionStandard/DepartList' export default { diff --git a/src/views/eam/modules/dailyMaintenanceStandard3/EquipmentList.vue b/src/views/eam/modules/dailyMaintenanceStandard3/EquipmentList.vue new file mode 100644 index 0000000..8385684 --- /dev/null +++ b/src/views/eam/modules/dailyMaintenanceStandard3/EquipmentList.vue @@ -0,0 +1,314 @@ +<template> + <a-modal + :title="title" + :width="1250" + :visible="visible" + :confirmLoading="confirmLoading" + :okButtonProps="{ props: {disabled: disableSubmit} }" + @ok="handleOk" + @cancel="handleCancel" + cancelText="鍏抽棴" + > + <a-spin :spinning="confirmLoading"> + <a-form :form="form"> + <div class="table-page-search-wrapper"> + <a-form + layout="inline" + @keyup.enter.native="searchQuery" + > + <a-row :gutter="24"> + <a-col + :md="6" + :sm="8" + > + <a-form-item label="缁熶竴缂栫爜"> + <a-input + placeholder="璇疯緭鍏ョ粺涓�缂栫爜妫�绱�" + v-model="queryParam.num" + ></a-input> + </a-form-item> + </a-col> + + <a-col + :md="6" + :sm="8" + > + <a-form-item label="璁惧鍚嶇О"> + <a-input + placeholder="璇疯緭鍏ヨ澶囧悕绉版绱�" + v-model="queryParam.name" + ></a-input> + </a-form-item> + </a-col> + <a-col + :md="6" + :sm="8" + > + <a-button + type="primary" + @click="searchQuery" + icon="search" + >鏌ヨ</a-button> + <a-button + @click="searchReset" + icon="reload" + style="margin-left:8px;" + >閲嶇疆</a-button> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="24"> + + </a-col> + </a-row> + </a-form> + </div> + <div style="margin-top:8px;"> + <a-table + ref="table" + size="middle" + bordered + rowKey="id" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + @change="handleTableChange" + :customRow="clickThenCheck" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:type}" + > + + </a-table> + </div> + </a-form> + </a-spin> + + </a-modal> +</template> + +<script> + +import { postAction, getAction } from '@/api/manage' +import JDate from '@/components/jeecg/JDate' +import Tooltip from 'ant-design-vue/es/tooltip' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import JEllipsis from '@/components/jeecg/JEllipsis'//寮曞叆杩囬暱瑁佸壀 +import store from '@/store' + +export default { + name: "EquipmentList", + mixins: [JeecgListMixin], + components: { + JDate, + Tooltip, + JEllipsis, + }, + data() { + return { + title: "璁惧淇℃伅", + visible: false, + model: {}, + dataSource: [], + disableSubmit: false, + type: "radio", + /* 鍒嗛〉鍙傛暟 */ + ipagination: { + current: 1, + pageSize: 10, + pageSizeOptions: ['10', '20', '30'], + showTotal: (total, range) => { + return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 + }, + labelCol: { + xs: { span: 24 }, + sm: { span: 6 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 18 }, + }, + confirmLoading: false, + form: this.$form.createForm(this), + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + align: 'center', + customRender: function (t, r, index) { + return parseInt(index) + 1 + } + }, + { + title: '缁熶竴缂栫爜', + align: 'center', + dataIndex: 'num', + }, + { + title: '璁惧鍚嶇О', + align: 'center', + dataIndex: 'name', + }, + { + title: '璁惧鍨嬪彿', + align: "center", + dataIndex: 'model' + }, + { + title: '璁惧瑙勬牸', + align: "center", + dataIndex: 'specification' + }, + { + title: '璁惧鐘舵��', + align: "center", + dataIndex: 'equipmentStatus_dictText' + }, + ], + url: { + list: "/eam/equipment/findEquipmentList", + }, + } + }, + + + methods: { + + searchQuery() { + this.loadData(1); + }, + searchReset() { + this.queryParam = { equipmentStatus: '1' }; + this.loadData(1) + }, + list(params) { + this.selectedRowKeys = []; + this.selectedRowRecord = []; + this.visible = true; + if (params == null || params == "") { + this.queryParam.useId = "" + } else { + this.queryParam.useId = params + } + this.queryParam.equipmentStatus = '1' + this.loadData(1); + }, + clickThenCheck(record) { + return { + on: { + click: (e) => { + this.selectedRowRecord = record; + this.onSelectChange(record.id.split(","), [record]); + } + } + }; + }, + onSelectChange(selectedRowKeys, selectedRows) { + this.selectedRowKeys = selectedRowKeys; + this.selectedRowRecord = selectedRows[0]; + }, + close() { + this.queryParam = {}; + this.$emit('close'); + this.visible = false; + }, + handleOk() { + const that = this; + // 瑙﹀彂琛ㄥ崟楠岃瘉 + if (that.selectedRowKeys.length > 0) { + if (that.selectedRowRecord.id != null && that.selectedRowRecord.id != "") { + that.$emit('sendEquipmentRecord', { record: that.selectedRowRecord }); + that.close(); + } else { + that.$message.error("璇烽�夋嫨璁惧淇℃伅锛�") + } + } else { + that.$message.error("璇烽�夋嫨璁惧淇℃伅锛�") + } + }, + + handleCancel() { + this.close(); + }, + + }, +} +</script> +<style scoped> +.ant-btn { + padding: 0 10px; + margin-left: 3px; +} + +.ant-form-item-control { + line-height: 0px; +} + +.fontweight { + font-weight: bold; +} + +/** 涓昏〃鍗曡闂磋窛 */ +.ant-form .ant-form-item { + margin-bottom: 10px; +} + +/** Tab椤甸潰琛岄棿璺� */ +.ant-tabs-content .ant-form-item { + margin-bottom: 0px; +} +.ant-table-tbody .ant-table-row td { + padding-top: 10px; + padding-bottom: 10px; +} + +.anty-row-operator button { + margin: 0 5px; +} + +.ant-btn-danger { + background-color: #ffffff; +} + +.ant-modal-cust-warp { + height: 100%; +} + +.ant-modal-cust-warp .ant-modal-body { + height: calc(100% - 110px) !important; + overflow-y: auto; +} + +.ant-modal-cust-warp .ant-modal-content { + height: 90% !important; + overflow-y: hidden; +} + +/deep/ .notshow { + display: none; +} + +.frozenRowClass { + color: #c9c9c9; +} +.hight { + color: #f5222d; +} +.middle { + color: #fa8c16; +} +.low { + color: #52c41a; +} +.dataUnKnow { + color: #1890ff; +} + +/deep/ .frozenRowClass { + color: #c9c9c9; +} +</style> \ No newline at end of file diff --git a/src/views/eam/modules/equipmentCalibrationOrder/TechnologyStatusAuthenticateModal.vue b/src/views/eam/modules/equipmentCalibrationOrder/TechnologyStatusAuthenticateModal.vue index 2e8af12..bd3f36b 100644 --- a/src/views/eam/modules/equipmentCalibrationOrder/TechnologyStatusAuthenticateModal.vue +++ b/src/views/eam/modules/equipmentCalibrationOrder/TechnologyStatusAuthenticateModal.vue @@ -1,6 +1,6 @@ <template> <a-modal - :width="800" + :width="1000" :visible="visible" :maskClosable="false" @ok="handleOk" @@ -76,176 +76,241 @@ style="font-size: large;font-style: normal;font-size: 15px;" >{{this.model.equipmentNum}}</span> </div> - </div> <div> - <div :style="{height: '45px',float: 'left',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >妫�鏌ラ儴浣�</span> </div> - <div :style="{height: '45px',float: 'left',width: '40%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >妫�鏌ユ爣鍑�</span> </div> - <div :style="{height: '45px',float: 'right',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" - >妫�鏌ョ粨鏋�(鍚堟牸/涓嶅悎鏍�)</span> + >鏈夋棤姝ら」</span> + </div> + <div :style="{height: '45px',float: 'right',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <span + class="ant-descriptions-title" + style="font-size: large;font-style: normal;font-size: 15px;" + >妫�鏌ョ粨鏋�</span> </div> </div> - <div> - <div :style="{height: '45px',float: 'left',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >鎿嶇旱鎵嬫焺鍙婂紑鍏�</span> </div> - <div :style="{height: '45px',float: 'left',width: '40%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >瀹夊叏銆佹棤鐮存崯</span> </div> - <div :style="{height: '45px',float: 'right',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <a-switch + checked-children="鏈�" + un-checked-children="娌℃湁" + :checked="model.result_8 == '0'" + @change="handle8Switch(model.result_8)" + /> + </div> + <div :style="{height: '45px',float: 'right',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <a-switch checked-children="鍚堟牸" un-checked-children="涓嶅悎鏍�" :checked="model.result_1 == '0'" @change="handleSwitch(model.result_1)" + :hidden="model.hidden1Switch" /> </div> </div> <div> - <div :style="{height: '45px',float: 'left',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >浼犲姩绯荤粺</span> </div> - <div :style="{height: '45px',float: 'left',width: '40%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >鐏垫椿銆佹棤寮傚搷</span> </div> - <div :style="{height: '45px',float: 'right',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <a-switch + checked-children="鏈�" + un-checked-children="娌℃湁" + :checked="model.result_9 == '0'" + @change="handle9Switch(model.result_9)" + /> + </div> + <div :style="{height: '45px',float: 'right',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <a-switch checked-children="鍚堟牸" un-checked-children="涓嶅悎鏍�" :checked="model.result_2 == '0'" @change="handle2Switch(model.result_2)" + :hidden="model.hidden2Switch" /> </div> </div> <div> - <div :style="{height: '45px',float: 'left',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >瀹夊叏瑁呯疆</span> </div> - <div :style="{height: '45px',float: 'left',width: '40%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >瀹夊叏銆佺伒鏁忋�佸彲闈�</span> </div> - <div :style="{height: '45px',float: 'right',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <a-switch + checked-children="鏈�" + un-checked-children="娌℃湁" + :checked="model.result_10 == '0'" + @change="handle10Switch(model.result_10)" + /> + </div> + <div :style="{height: '45px',float: 'right',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <a-switch checked-children="鍚堟牸" un-checked-children="涓嶅悎鏍�" :checked="model.result_3 == '0'" @change="handle3Switch(model.result_3)" + :hidden="model.hidden3Switch" /> </div> </div> <div> - <div :style="{height: '45px',float: 'left',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >璁惧澶栬</span> </div> - <div :style="{height: '45px',float: 'left',width: '40%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >鏁存磥</span> </div> - <div :style="{height: '45px',float: 'right',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <a-switch + checked-children="鏈�" + un-checked-children="娌℃湁" + :checked="model.result_11 == '0'" + @change="handle11Switch(model.result_11)" + /> + </div> + <div :style="{height: '45px',float: 'right',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <a-switch checked-children="鍚堟牸" un-checked-children="涓嶅悎鏍�" :checked="model.result_4 == '0'" @change="handle4Switch(model.result_4)" + :hidden="model.hidden4Switch" /> </div> </div> <div> - <div :style="{height: '45px',float: 'left',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >鐢垫皵绾胯矾</span> </div> - <div :style="{height: '45px',float: 'left',width: '40%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >绾胯矾鏁撮綈銆佹帴绾挎纭�</span> </div> - <div :style="{height: '45px',float: 'right',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <a-switch + checked-children="鏈�" + un-checked-children="娌℃湁" + :checked="model.result_12 == '0'" + @change="handle12Switch(model.result_12)" + /> + </div> + <div :style="{height: '45px',float: 'right',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <a-switch checked-children="鍚堟牸" un-checked-children="涓嶅悎鏍�" :checked="model.result_5 == '0'" @change="handle5Switch(model.result_5)" + :hidden="model.hidden5Switch" /> </div> </div> <div> - <div :style="{height: '45px',float: 'left',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >妫�鏌ュ悇绱у浐瑁呯疆</span> </div> - <div :style="{height: '45px',float: 'left',width: '40%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;" >鏃犳澗鍔�</span> </div> - <div :style="{height: '45px',float: 'right',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <a-switch + checked-children="鏈�" + un-checked-children="娌℃湁" + :checked="model.result_13 == '0'" + @change="handle13Switch(model.result_13)" + /> + </div> + <div :style="{height: '45px',float: 'right',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <a-switch checked-children="鍚堟牸" un-checked-children="涓嶅悎鏍�" :checked="model.result_6 == '0'" @change="handle6Switch(model.result_6)" + :hidden="model.hidden6Switch" /> - </div> </div> <div> - <div :style="{height: '45px',float: 'left',width: '70%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <div :style="{height: '45px',float: 'left',width: '50%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <span class="ant-descriptions-title" style="font-size: large;font-style: normal;font-size: 15px;float: center" >鏄惁婊¤冻鐢熶骇鍔犲伐瑕佹眰</span> </div> - <div :style="{height: '45px',float: 'right',width: '30%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> - + <div :style="{height: '45px',float: 'left',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> + <a-switch + checked-children="鏈�" + un-checked-children="娌℃湁" + :checked="model.result_14 == '0'" + @change="handle14Switch(model.result_14)" + /> + </div> + <div :style="{height: '45px',float: 'right',width: '25%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> <a-switch checked-children="鍚堟牸" un-checked-children="涓嶅悎鏍�" :checked="model.result_7 == '0'" @change="handle7Switch(model.result_7)" + :hidden="model.hidden7Switch" /> </div> </div> @@ -533,6 +598,85 @@ this.model = Object.assign({}, this.model); }, + handle8Switch(result_8) { + if ('0' == result_8) { + this.model.result_8 = '1' + this.model.hidden1Switch = true + } else { + this.model.result_8 = '0' + this.model.hidden1Switch = false + } + + this.model = Object.assign({}, this.model); + }, + + handle9Switch(result_9) { + if ('0' == result_9) { + this.model.result_9 = '1' + this.model.hidden2Switch = true + } else { + this.model.result_9 = '0' + this.model.hidden2Switch = false + } + this.model = Object.assign({}, this.model); + }, + + handle10Switch(result_10) { + + if ('0' == result_10) { + this.model.result_10 = '1' + this.model.hidden3Switch = true + } else { + this.model.result_10 = '0' + this.model.hidden3Switch = false + } + this.model = Object.assign({}, this.model); + }, + + handle11Switch(result_11) { + if ('0' == result_11) { + this.model.result_11 = '1' + this.model.hidden4Switch = true + } else { + this.model.result_11 = '0' + this.model.hidden4Switch = false + } + this.model = Object.assign({}, this.model); + }, + + handle12Switch(result_12) { + if ('0' == result_12) { + this.model.result_12 = '1' + this.model.hidden5Switch = true + } else { + this.model.result_12 = '0' + this.model.hidden5Switch = false + } + this.model = Object.assign({}, this.model); + }, + + handle13Switch(result_13) { + if ('0' == result_13) { + this.model.result_13 = '1' + this.model.hidden6Switch = true + } else { + this.model.result_13 = '0' + this.model.hidden6Switch = false + } + this.model = Object.assign({}, this.model); + }, + + handle14Switch(result_14) { + if ('0' == result_14) { + this.model.result_14 = '1' + this.model.hidden7Switch = true + } else { + this.model.result_14 = '0' + this.model.hidden7Switch = false + } + this.model = Object.assign({}, this.model); + }, + }, } </script> diff --git a/src/views/eam/modules/equipmentNew/EquipmentPrecisionParametersList.vue b/src/views/eam/modules/equipmentNew/EquipmentPrecisionParametersList.vue index 935def3..92c48b0 100644 --- a/src/views/eam/modules/equipmentNew/EquipmentPrecisionParametersList.vue +++ b/src/views/eam/modules/equipmentNew/EquipmentPrecisionParametersList.vue @@ -1,8 +1,14 @@ <template> - <a-card :bordered="false" :class="'cust-erp-sub-tab'"> + <a-card + :bordered="false" + :class="'cust-erp-sub-tab'" + > <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> - <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-form + layout="inline" + @keyup.enter.native="searchQuery" + > <a-row :gutter="24"> </a-row> </a-form> @@ -10,7 +16,10 @@ <!-- 鏌ヨ鍖哄煙-END --> <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> - <div class="table-operator" v-if="mainId"> + <div + class="table-operator" + v-if="mainId" + > <!-- <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> --> <!-- <a-button type="primary" icon="download" @click="handleExportXls('璁惧绮惧害')">瀵煎嚭</a-button> <a-upload @@ -22,9 +31,15 @@ @change="handleImportExcel"> <a-button type="primary" icon="import">瀵煎叆</a-button> </a-upload> --> - <a-dropdown v-if="selectedRowKeys.length > 0" v-has="'accountSons:add&edit&delete&submit'"> + <a-dropdown + v-if="selectedRowKeys.length > 0" + v-has="'accountSons:add&edit&delete&submit'" + > <a-menu slot="overlay"> - <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>鍒犻櫎</a-menu-item> + <a-menu-item + key="1" + @click="batchDel" + ><a-icon type="delete" />鍒犻櫎</a-menu-item> <!-- <a-menu-item key="1" @click="handleSubmitBatch"><a-icon type="to-top" />鎻愪氦</a-menu-item> --> </a-menu> <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 <a-icon type="down" /></a-button> @@ -33,9 +48,15 @@ <!-- table鍖哄煙-begin --> <div> - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> + <div + class="ant-alert ant-alert-info" + style="margin-bottom: 16px;" + > <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤� - <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a> + <a + style="margin-left: 24px" + @click="onClearSelected" + >娓呯┖</a> </div> <a-table @@ -49,14 +70,15 @@ :pagination="ipagination" :loading="loading" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" - @change="handleTableChange"> + @change="handleTableChange" + > <!-- <template v-for="col in columns" :slot="col.dataIndex" slot-scope='text, record, index' > --> - <!-- <div :key="col.dataIndex"> + <!-- <div :key="col.dataIndex"> <span v-if="col.dataIndex == 'remark'"> <j-ellipsis :value="text" @@ -110,114 +132,118 @@ </a-table> </div> - <equipmentPrecisionParameters-modal ref="modalForm" @ok="modalFormOk" :mainId="mainId"></equipmentPrecisionParameters-modal> + <equipmentPrecisionParameters-modal + ref="modalForm" + @ok="modalFormOk" + :mainId="mainId" + ></equipmentPrecisionParameters-modal> </a-card> </template> <script> - import { JeecgListMixin } from '@/mixins/JeecgListMixin' - import EquipmentPrecisionParametersModal from './EquipmentPrecisionParametersModal' - import { postAction, putAction } from '../../../../api/manage' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import EquipmentPrecisionParametersModal from './EquipmentPrecisionParametersModal' +import { postAction, putAction } from '../../../../api/manage' - export default { - name: "EquipmentPrecisionParametersList", - mixins:[JeecgListMixin], - components: { EquipmentPrecisionParametersModal }, - props:{ - mainId:{ - type:String, - default:'', - required:false - }, - isOpen:{ - type:Boolean, - default:true, - required:false - } +export default { + name: "EquipmentPrecisionParametersList", + mixins: [JeecgListMixin], + components: { EquipmentPrecisionParametersModal }, + props: { + mainId: { + type: String, + default: '', + required: false }, - watch:{ - mainId:{ - immediate: true, - handler(val) { - if(!this.mainId){ - this.clearList() - }else{ - this.queryParam['precisionParametersTemplateId'] = val - this.loadData(1); - } + isOpen: { + type: Boolean, + default: true, + required: false + } + }, + watch: { + mainId: { + immediate: true, + handler(val) { + if (!this.mainId) { + this.clearList() + } else { + this.queryParam['precisionParametersTemplateId'] = val + this.loadData(1); } } - }, - data () { - return { - description: '璁惧鍙拌处绠$悊椤甸潰', - disableMixinCreated:true, - // 琛ㄥご - columns: [ + } + }, + data() { + return { + description: '璁惧鍙拌处绠$悊椤甸潰', + disableMixinCreated: true, + // 琛ㄥご + columns: [ { - title: '#', - dataIndex: '', - key:'rowIndex', - width:100, - align:"center", - customRender:function (t,r,index) { - return parseInt(index)+1; - } - }, - { - title:'妫�楠岄」鐩悕绉�', - align:"center", - dataIndex: 'precisionParametersName', - width:400 - }, - { - title:'浣嶇疆', - align:"center", - dataIndex: 'precisionParametersUda1', - width:400 - }, - { - title:'鍏佸樊锛坢m锛�', - align:"center", - dataIndex: 'tolerance', - width:400 - }, - { - title:'瀹炴祴鍊�', - align:"center", - dataIndex: 'actualValue', - width:400 - }, - ], - url: { - list: '/eam/precisionParametersTemplateDetail/listByPrecisionParametersTemplateId', - edit: "/eam/equipmentPrecisionParameters/edit", - submitBatch:"/eam/equipmentPrecisionParameters/submitBatch", - // delete: "/new/equipment/deleteEquipmentPrecisionParameters", - // deleteBatch: "/new/equipment/deleteBatchEquipmentPrecisionParameters", - // exportXlsUrl: "/new/equipment/exportEquipmentPrecisionParameters", - // importUrl: "/new/equipment/importEquipmentPrecisionParameters", + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 100, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } }, - dictOptions:{ - } - } - }, - created() { - }, - computed: { - importExcelUrl(){ - return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`; - } - }, - methods: { - clearList(){ - this.dataSource=[] - this.selectedRowKeys=[] - this.selectionRows = [] - this.ipagination.current = 1 + { + title: '妫�楠岄」鐩悕绉�', + align: "center", + dataIndex: 'precisionParametersName', + width: 400 + }, + { + title: '浣嶇疆', + align: "center", + dataIndex: 'precisionParametersUda1', + width: 400 + }, + { + title: '鍏佸樊锛坢m锛�', + align: "center", + dataIndex: 'tolerance', + width: 400 + }, + // { + // title:'瀹炴祴鍊�', + // align:"center", + // dataIndex: 'actualValue', + // width:400 + // }, + ], + url: { + list: '/eam/precisionParametersTemplateDetail/listByPrecisionParametersTemplateId', + edit: "/eam/equipmentPrecisionParameters/edit", + submitBatch: "/eam/equipmentPrecisionParameters/submitBatch", + // delete: "/new/equipment/deleteEquipmentPrecisionParameters", + // deleteBatch: "/new/equipment/deleteBatchEquipmentPrecisionParameters", + // exportXlsUrl: "/new/equipment/exportEquipmentPrecisionParameters", + // importUrl: "/new/equipment/importEquipmentPrecisionParameters", }, - handleChange(value, key, column, index) { + dictOptions: { + } + } + }, + created() { + }, + computed: { + importExcelUrl() { + return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`; + } + }, + methods: { + clearList() { + this.dataSource = [] + this.selectedRowKeys = [] + this.selectionRows = [] + this.ipagination.current = 1 + }, + handleChange(value, key, column, index) { let that = this; const temp = [...that.dataSource]; const target = temp.filter(item => key === item.key)[index]; @@ -258,33 +284,33 @@ modalFormOk() { this.loadData(1); }, - handleSubmitBatch(){ - for(var i=0;i<this.selectionRows.length;i++){ - let upperLimit = this.selectionRows[i].upperLimit; - let lowerLimit = this.selectionRows[i].lowerLimit; - let actualValue = this.selectionRows[i].actualValue; - if(upperLimit==null||upperLimit==undefined||upperLimit==''){ - this.$message.warning("璇峰厛濉啓閫夋嫨椤圭殑涓婇檺鍊煎啀鎻愪氦") - return false; - } - if(lowerLimit==null||lowerLimit==undefined||lowerLimit==''){ - this.$message.warning("璇峰厛濉啓閫夋嫨椤圭殑涓嬮檺鍊煎啀鎻愪氦") - return false; - } - if(actualValue==null||actualValue==undefined||actualValue==''){ - this.$message.warning("璇峰厛濉啓閫夋嫨椤圭殑瀹為檯鍊煎啀鎻愪氦") - return false; - } - } - let that = this; - this.$confirm({ + handleSubmitBatch() { + for (var i = 0; i < this.selectionRows.length; i++) { + let upperLimit = this.selectionRows[i].upperLimit; + let lowerLimit = this.selectionRows[i].lowerLimit; + let actualValue = this.selectionRows[i].actualValue; + if (upperLimit == null || upperLimit == undefined || upperLimit == '') { + this.$message.warning("璇峰厛濉啓閫夋嫨椤圭殑涓婇檺鍊煎啀鎻愪氦") + return false; + } + if (lowerLimit == null || lowerLimit == undefined || lowerLimit == '') { + this.$message.warning("璇峰厛濉啓閫夋嫨椤圭殑涓嬮檺鍊煎啀鎻愪氦") + return false; + } + if (actualValue == null || actualValue == undefined || actualValue == '') { + this.$message.warning("璇峰厛濉啓閫夋嫨椤圭殑瀹為檯鍊煎啀鎻愪氦") + return false; + } + } + let that = this; + this.$confirm({ title: '璁惧绮惧害纭鎻愪氦锛�', content: '纭鎻愪氦鍚楋紒', okText: '纭', cancelText: '鍙栨秷', onOk() { - that.loading=true; - putAction(that.url.submitBatch,that.selectionRows).then((res) => { + that.loading = true; + putAction(that.url.submitBatch, that.selectionRows).then((res) => { if (res.success) { that.$message.success("鎻愪氦鎴愬姛锛�") that.loadData(1) @@ -299,18 +325,18 @@ }) }, onSelectChange(selectedRowKeys, selectionRows) { - this.selectedRowKeys = selectedRowKeys; - this.selectionRows = selectionRows; + this.selectedRowKeys = selectedRowKeys; + this.selectionRows = selectionRows; }, - }, - mounted(){ - this.$bus.$on('loadData', (data) => { - this.loadData(); - }); - } + }, + mounted() { + this.$bus.$on('loadData', (data) => { + this.loadData(); + }); } +} </script> <style scoped> - @import '~@assets/less/common.less' +@import '~@assets/less/common.less'; </style> diff --git a/src/views/eam/modules/maintenancePlan/EquipmentMaintenancePlanForm.vue b/src/views/eam/modules/maintenancePlan/EquipmentMaintenancePlanForm.vue index d31736e..af9b878 100644 --- a/src/views/eam/modules/maintenancePlan/EquipmentMaintenancePlanForm.vue +++ b/src/views/eam/modules/maintenancePlan/EquipmentMaintenancePlanForm.vue @@ -324,7 +324,7 @@ ids.push(tableData[i].standardId) } this.$refs.standardSelectModel.showModal(ids) - this.$refs.standardSelectModel.title = '閫夋嫨绮惧害鍙傛暟' + this.$refs.standardSelectModel.title = '閫夋嫨璁惧' this.$refs.standardSelectModel.disableSubmit = false }, addSelected(data) { diff --git a/src/views/eam/modules/maintenancePlan/StandardSelect.vue b/src/views/eam/modules/maintenancePlan/StandardSelect.vue index f35b0b1..0f3e8a3 100644 --- a/src/views/eam/modules/maintenancePlan/StandardSelect.vue +++ b/src/views/eam/modules/maintenancePlan/StandardSelect.vue @@ -87,10 +87,10 @@ mixins: [JeecgListMixin], components: {}, props: { - maintenanceType:{ - type:String, - default:'', - required:true + maintenanceType: { + type: String, + default: '', + required: true } }, @@ -105,7 +105,7 @@ key: 'rowIndex', width: 50, align: 'center', - customRender: function(t, r, index) { + customRender: function (t, r, index) { return parseInt(index) + 1 } }, @@ -113,49 +113,49 @@ title: '缁熶竴缂栫爜', align: 'center', dataIndex: 'num', - width:200 + width: 200 }, { title: '璁惧鍚嶇О', align: 'center', dataIndex: 'name', - width:200 + width: 200 }, { title: '璁惧鍨嬪彿', align: 'center', dataIndex: 'model', - width:200 + width: 200 }, { title: '璁惧瑙勬牸', align: 'center', dataIndex: 'specification', - width:200 + width: 200 }, { title: 'ABC鏍囪瘑', align: "center", dataIndex: 'equipmentImportanceId', - width:100 + width: 100 }, { title: '鍏抽敭璁惧鏍囪瘑', align: "center", dataIndex: 'specificEquipment_dictText', - width:100 + width: 100 }, { title: '璁惧鐘舵��', align: 'center', dataIndex: 'equipmentStatus_dictText', - width:100 + width: 100 }, { title: '鎶�鏈姸鎬�', align: 'center', dataIndex: 'technologyStatus_dictText', - width:100 + width: 100 }, ], selectedRowKeys: [], @@ -183,8 +183,8 @@ visible: false, loading: false, url: { - list: '/eam/equipment/getEquipmentList', - getStandards:'/eam/equipmentMaintenancePlan/getStandards' + list: '/eam/equipment/showEquipmentList', + getStandards: '/eam/equipmentMaintenancePlan/getStandards' }, } }, @@ -280,34 +280,34 @@ this.isorter.order = 'ascend' === sorter.order ? 'asc' : 'desc'; } this.ipagination = pagination; - this.loadData(); + this.loadData(); }, handleSubmit() { this.loading = true let that = this; var ids = ''; - if(this.selectionRows.length==0){ + if (this.selectionRows.length == 0) { that.$message.warning("璇烽�夋嫨淇濆吇璁惧"); - this.loading=false; + this.loading = false; return false; } - for(var i = 0;i<this.selectionRows.length;i++){ - ids = ids+this.selectionRows[i].id+','; + for (var i = 0; i < this.selectionRows.length; i++) { + ids = ids + this.selectionRows[i].id + ','; } - getAction(this.url.getStandards,{ids:ids,maintenanceType:this.maintenanceType}).then(res=>{ - if(res.success){ - if(res.result.records.length!==that.selectionRows.length){ + getAction(this.url.getStandards, { ids: ids, maintenanceType: this.maintenanceType }).then(res => { + if (res.success) { + if (res.result.records.length !== that.selectionRows.length) { that.$message.warning(res.result.message); } that.$emit('selectionEquipmentRows', res.result.records); that.searchReset(0) that.close(); } - }).finally(res=>{ - this.loading=false; + }).finally(res => { + this.loading = false; }) - - + + }, onSelectChange(selectionRows) { this.selectionRows = selectionRows; diff --git a/src/views/eam/modules/precisionParametersTemplate/PrecisionParametersTemplateEditForm.vue b/src/views/eam/modules/precisionParametersTemplate/PrecisionParametersTemplateEditForm.vue index a6421e9..174a8f4 100644 --- a/src/views/eam/modules/precisionParametersTemplate/PrecisionParametersTemplateEditForm.vue +++ b/src/views/eam/modules/precisionParametersTemplate/PrecisionParametersTemplateEditForm.vue @@ -2,7 +2,12 @@ <a-spin :spinning="confirmLoading"> <j-form-container :disabled="formDisabled"> <!-- 涓昏〃鍗曞尯鍩� --> - <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> + <a-form-model + ref="form" + :model="model" + :rules="validatorRules" + slot="detail" + > <a-row :gutter="24"> <a-col :span="12"> <a-form-model-item @@ -12,15 +17,15 @@ prop="num" > <a-auto-complete - v-model="model.num" - :data-source="numList" - :disabled="formDisabled" - placeholder="璇疯緭鍏ョ簿搴﹀弬鏁版ā鏉跨紪鐮�" - @search="onSearchNums" + v-model="model.num" + :data-source="numList" + :disabled="formDisabled" + placeholder="璇疯緭鍏ョ簿搴﹀弬鏁版ā鏉跨紪鐮�" + @search="onSearchNums" /> </a-form-model-item> </a-col> - <a-col :span="12" > + <a-col :span="12"> <a-form-model-item label="鍚嶇О" :labelCol="labelCol" @@ -55,9 +60,16 @@ </a-row> </a-form-model> </j-form-container> - <!-- 瀛愯〃鍗曞尯鍩� --> - <a-tabs v-model="activeKey" @change="handleChangeTabs"> - <a-tab-pane tab="绮惧害鍙傛暟鏄庣粏" :key="refKeys[0]" :forceRender="true"> + <!-- 瀛愯〃鍗曞尯鍩� --> + <a-tabs + v-model="activeKey" + @change="handleChangeTabs" + > + <a-tab-pane + tab="绮惧害鍙傛暟鏄庣粏" + :key="refKeys[0]" + :forceRender="true" + > <j-vxe-table keep-source :ref="refKeys[0]" @@ -72,218 +84,226 @@ bordered :alwaysEdit="true" :toolbarConfig='toolbarConfig' - > + > <!-- @valueChange="changeDate" --> <template slot='toolbarPrefix'> - <a-button type='primary' @click='precisionParametersDetailSelect' :disabled="formDisabled" icon="plus">閫夋嫨绮惧害鍙傛暟 + <a-button + type='primary' + @click='precisionParametersDetailSelect' + :disabled="formDisabled" + icon="plus" + >閫夋嫨绮惧害鍙傛暟 </a-button> </template> </j-vxe-table> </a-tab-pane> </a-tabs> - <j-select-precision-parameters-modal @selectionRows='selectionRows' ref='JSelectPrecisionParametersModal' ></j-select-precision-parameters-modal> + <j-select-precision-parameters-modal + @selectionRows='selectionRows' + ref='JSelectPrecisionParametersModal' + ></j-select-precision-parameters-modal> </a-spin> </template> <script> - import { getAction } from '@/api/manage' - import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' - import { duplicateCheck } from '@/api/api' - import { JVXETypes } from '@/components/jeecg/JVxeTable' - import { getRefPromise,VALIDATE_FAILED} from '@/components/jeecg/JVxeTable/utils/vxeUtils.js' - import { validateDuplicateValue } from '@/utils/util' - import JFormContainer from '@/components/jeecg/JFormContainer' - - - import dayjs from 'dayjs' - import JSelectPrecisionParametersModal from './JSelectPrecisionParametersModal' - export default { - name: 'PrecisionParameters', - mixins: [JVxeTableModelMixin], - components: { - JFormContainer, - dayjs, - JSelectPrecisionParametersModal - }, - data() { - return { - toolbarConfig: { +import { getAction } from '@/api/manage' +import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' +import { duplicateCheck } from '@/api/api' +import { JVXETypes } from '@/components/jeecg/JVxeTable' +import { getRefPromise, VALIDATE_FAILED } from '@/components/jeecg/JVxeTable/utils/vxeUtils.js' +import { validateDuplicateValue } from '@/utils/util' +import JFormContainer from '@/components/jeecg/JFormContainer' + + +import dayjs from 'dayjs' +import JSelectPrecisionParametersModal from './JSelectPrecisionParametersModal' +export default { + name: 'PrecisionParameters', + mixins: [JVxeTableModelMixin], + components: { + JFormContainer, + dayjs, + JSelectPrecisionParametersModal + }, + data() { + return { + toolbarConfig: { // prefix 鍓嶇紑锛泂uffix 鍚庣紑 slot: ['prefix', 'suffix'], // add 鏂板鎸夐挳锛況emove 鍒犻櫎鎸夐挳锛沜learSelection 娓呯┖閫夋嫨鎸夐挳 btn: ['remove', 'clearSelection'] - }, - labelCol: { - xs: { span: 24 }, - sm: { span: 5 }, - }, - wrapperCol: { - xs: { span: 24 }, - sm: { span: 16 }, - }, - model:{ - }, - // 鏂板鏃跺瓙琛ㄩ粯璁ゆ坊鍔犲嚑琛岀┖鏁版嵁 - addDefaultRowNum: 0, - validatorRules: { - num: [ + }, + labelCol: { + xs: { span: 24 }, + sm: { span: 5 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 16 }, + }, + model: { + }, + // 鏂板鏃跺瓙琛ㄩ粯璁ゆ坊鍔犲嚑琛岀┖鏁版嵁 + addDefaultRowNum: 0, + validatorRules: { + num: [ { required: true, message: '璇疯緭鍏ョ紪鐮�!' }, { min: 1, max: 30, message: '闀垮害鍦� 2 鍒� 30 涓瓧绗�', trigger: 'blur' }, { validator: this.validateNum }, ], - name: [ + name: [ { required: true, message: '璇疯緭鍏ュ悕绉�!' }, { min: 1, max: 30, message: '闀垮害鍦� 2 鍒� 30 涓瓧绗�', trigger: 'blur' }, ], - }, - refKeys: ['precisionParametersList', ], - tableKeys:['precisionParametersList', ], - activeKey: 'precisionParametersList', - precisionParameters: { - loading: false, - dataSource: [], - columns: [ - { - title: 'id', - key: 'id', - type: JVXETypes.hidden, - disabled:true, - align:'center', - }, - { - title: '妫�楠岄」鐩悕绉�', - key: 'precisionParametersName', - type: JVXETypes.normal, - width:"350px", - placeholder: '璇疯緭鍏�${title}', - disabled:true, - align:'center', - defaultValue:'', - }, - { - title: '鏂瑰悜', - key: 'precisionParametersUda1', - type: JVXETypes.normal, - width:"350px", - placeholder: '璇疯緭鍏�${title}', - disabled:true, - align:'center', - defaultValue:'', - }, - { - title: '鍏佸樊锛坢m锛�', - key: 'tolerance', - type: JVXETypes.input, - width:"350px", - placeholder: '璇疯緭鍏�${title}', - align:'center', - validateRules: [ - { handler({ cellValue, row, column }, callback, target) { - const regex = /^[+]?\d*\.?\d+\/[+]?\d*\.?\d+$/; - if (!new RegExp(regex).test(cellValue)&&cellValue!=null) { - callback(false, '鍏佸樊瑕佺鍚堛�愪笂闄�/璺濈銆戠殑濉啓瑙勫垯锛屽: 0.16/300') // false = 鏈�氳繃锛屽彲浠ヨ窡鑷畾涔夋彁绀� - } else { - callback(true) // true = 閫氳繃楠岃瘉 - } - }, - message: '${title}榛樿鎻愮ず' - }, - ] - }, - ] - }, - url: { - getNums:'/eam/precisionParametersTemplate/getNums', - add: '/eam/precisionParametersTemplate/addNew', - edit:'/eam/precisionParametersTemplate/editNew', - precisionParametersList: { - list: '/eam/precisionParametersTemplateDetail/listByPrecisionParametersTemplateId' + }, + refKeys: ['precisionParametersList',], + tableKeys: ['precisionParametersList',], + activeKey: 'precisionParametersList', + precisionParameters: { + loading: false, + dataSource: [], + columns: [ + { + title: 'id', + key: 'id', + type: JVXETypes.hidden, + disabled: true, + align: 'center', }, + { + title: '妫�楠岄」鐩悕绉�', + key: 'precisionParametersName', + type: JVXETypes.normal, + width: "350px", + placeholder: '璇疯緭鍏�${title}', + disabled: true, + align: 'center', + defaultValue: '', + }, + { + title: '鏂瑰悜', + key: 'precisionParametersUda1', + type: JVXETypes.normal, + width: "350px", + placeholder: '璇疯緭鍏�${title}', + disabled: true, + align: 'center', + defaultValue: '', + }, + { + title: '鍏佸樊锛坢m锛�', + key: 'tolerance', + type: JVXETypes.input, + width: "350px", + placeholder: '璇疯緭鍏�${title}', + align: 'center', + // validateRules: [ + // { handler({ cellValue, row, column }, callback, target) { + // const regex = /^[+]?\d*\.?\d+\/[+]?\d*\.?\d+$/; + // if (!new RegExp(regex).test(cellValue)&&cellValue!=null) { + // callback(false, '鍏佸樊瑕佺鍚堛�愪笂闄�/璺濈銆戠殑濉啓瑙勫垯锛屽: 0.16/300') // false = 鏈�氳繃锛屽彲浠ヨ窡鑷畾涔夋彁绀� + // } else { + // callback(true) // true = 閫氳繃楠岃瘉 + // } + // }, + // message: '${title}榛樿鎻愮ず' + // }, + // ] + }, + ] + }, + url: { + getNums: '/eam/precisionParametersTemplate/getNums', + add: '/eam/precisionParametersTemplate/addNew', + edit: '/eam/precisionParametersTemplate/editNew', + precisionParametersList: { + list: '/eam/precisionParametersTemplateDetail/listByPrecisionParametersTemplateId' }, - numList:[], + }, + numList: [], + } + }, + props: { + //琛ㄥ崟绂佺敤 + disabled: { + type: Boolean, + default: false, + required: false + }, + }, + computed: { + formDisabled() { + return this.disabled + }, + }, + created() { + }, + methods: { + addBefore() { + this.precisionParameters + + }, + getAllTable() { + let values = this.tableKeys.map(key => getRefPromise(this, key)) + return Promise.all(values) + }, + /** 璋冪敤瀹宔dit()鏂规硶涔嬪悗浼氳嚜鍔ㄨ皟鐢ㄦ鏂规硶 */ + editAfter() { + this.$nextTick(() => { + }) + // 鍔犺浇瀛愯〃鏁版嵁 + if (this.model.id) { + let params = { + precisionParametersTemplateId: this.model.id, + pageSize: 9999, + } + this.requestSubTableData(this.url.precisionParametersList.list, params, this.precisionParameters) + } + if (this.model.num == '') { + this.model.id = '' } }, - props: { - //琛ㄥ崟绂佺敤 - disabled: { - type: Boolean, - default: false, - required: false - }, - }, - computed: { - formDisabled(){ - return this.disabled - }, - }, - created () { - }, - methods: { - addBefore(){ - this.precisionParameters - - }, - getAllTable() { - let values = this.tableKeys.map(key => getRefPromise(this, key)) - return Promise.all(values) - }, - /** 璋冪敤瀹宔dit()鏂规硶涔嬪悗浼氳嚜鍔ㄨ皟鐢ㄦ鏂规硶 */ - editAfter() { - this.$nextTick(() => { - }) - // 鍔犺浇瀛愯〃鏁版嵁 - if (this.model.id) { - let params = { - precisionParametersTemplateId: this.model.id, - pageSize:9999, + //鏍¢獙鎵�鏈変竴瀵逛竴瀛愯〃琛ㄥ崟 + validateSubForm(allValues) { + return new Promise((resolve, reject) => { + Promise.all([ + ]).then(() => { + resolve(allValues) + }).catch(e => { + if (e.error === VALIDATE_FAILED) { + // 濡傛灉鏈夋湭閫氳繃琛ㄥ崟楠岃瘉鐨勫瓙琛紝灏辫嚜鍔ㄨ烦杞埌瀹冩墍鍦ㄧ殑tab + this.activeKey = e.index == null ? this.activeKey : this.refKeys[e.index] + } else { + console.error(e) } - this.requestSubTableData(this.url.precisionParametersList.list, params, this.precisionParameters) + }) + }) + }, + /** 鏁寸悊鎴恌ormData */ + classifyIntoFormData(allValues) { + let main = Object.assign(this.model, allValues.formValue) + let details = allValues.tablesValue[0].tableData; + for (var i = 0; i < details.length; i++) { + details[i].sort = i + 1; + if (details[i].tolerance != null && details[i].tolerance != '' && details[i].tolerance != undefined) { + var inf = details[i].tolerance.split('/'); + var distance = inf[1]; + var upper = inf[0]; + details[i].distance = parseFloat(distance); + details[i].upper = parseFloat(upper); + details[i].lower = 0; } - if(this.model.num==''){ - this.model.id = '' - } - }, - //鏍¢獙鎵�鏈変竴瀵逛竴瀛愯〃琛ㄥ崟 - validateSubForm(allValues){ - return new Promise((resolve,reject)=>{ - Promise.all([ - ]).then(() => { - resolve(allValues) - }).catch(e => { - if (e.error === VALIDATE_FAILED) { - // 濡傛灉鏈夋湭閫氳繃琛ㄥ崟楠岃瘉鐨勫瓙琛紝灏辫嚜鍔ㄨ烦杞埌瀹冩墍鍦ㄧ殑tab - this.activeKey = e.index == null ? this.activeKey : this.refKeys[e.index] - } else { - console.error(e) - } - }) - }) - }, - /** 鏁寸悊鎴恌ormData */ - classifyIntoFormData(allValues) { - let main = Object.assign(this.model, allValues.formValue) - let details = allValues.tablesValue[0].tableData; - for(var i=0;i<details.length;i++){ - details[i].sort=i+1; - if(details[i].tolerance!=null&&details[i].tolerance!=''&&details[i].tolerance!=undefined){ - var inf = details[i].tolerance.split('/'); - var distance = inf[1]; - var upper = inf[0]; - details[i].distance = parseFloat(distance); - details[i].upper = parseFloat(upper); - details[i].lower = 0; - } - } - return { - ...main, // 灞曞紑 - precisionParametersTemplateDetailList: details, - } - }, - validateError(msg){ - this.$message.error(msg) - }, - precisionParametersDetailSelect() { + } + return { + ...main, // 灞曞紑 + precisionParametersTemplateDetailList: details, + } + }, + validateError(msg) { + this.$message.error(msg) + }, + precisionParametersDetailSelect() { let ids = [] let tableData = this.$refs.precisionParametersList.getTableData() for (let i = 0; i < tableData.length; i++) { @@ -304,10 +324,10 @@ var precisionParameters = {} if (tableStr.indexOf(data[i].id) == -1) { precisionParameters = { - precisionParametersId:data[i].id, + precisionParametersId: data[i].id, precisionParametersName: data[i].name, - precisionParametersUda1:data[i].precisionParametersUda1, - precisionParametersTemplateId:this.model.id, + precisionParametersUda1: data[i].precisionParametersUda1, + precisionParametersTemplateId: this.model.id, } } addRows.push(precisionParameters) @@ -319,11 +339,11 @@ this.addSelected(data) }, - onSearchNums(searchText){ - getAction(this.url.getNums,{searchText:searchText}).then(res=>{ - if(res.success){ - this.numList = res.result - } + onSearchNums(searchText) { + getAction(this.url.getNums, { searchText: searchText }).then(res => { + if (res.success) { + this.numList = res.result + } }) }, @@ -345,8 +365,8 @@ }) }, - } } +} </script> <style scoped> -- Gitblit v1.9.3