From 08bb85ea6e67dcef3c378fa73db060d4e279e7d6 Mon Sep 17 00:00:00 2001 From: “linengliang” <vanSuperEnergy@163.com> Date: 星期一, 18 十二月 2023 14:28:44 +0800 Subject: [PATCH] 三级保养 --- src/views/eam/modules/maintenancePlan/StandardSelect.vue | 113 +++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 82 insertions(+), 31 deletions(-) diff --git a/src/views/eam/modules/maintenancePlan/StandardSelect.vue b/src/views/eam/modules/maintenancePlan/StandardSelect.vue index 446c85f..f35b0b1 100644 --- a/src/views/eam/modules/maintenancePlan/StandardSelect.vue +++ b/src/views/eam/modules/maintenancePlan/StandardSelect.vue @@ -8,7 +8,7 @@ @cancel="close" style="top:50px" cancelText="鍏抽棴" - :width="1050" + :width="1500" > <a-card :bordered="false"> <div class="table-page-search-wrapper"> @@ -21,14 +21,24 @@ :md="8" :sm="6" > - <a-form-item label="妫�楠岄」鐩悕绉�"> + <a-form-item label="缁熶竴缂栫爜"> <a-input - placeholder="璇疯緭鍏ユ楠岄」鐩悕绉�" + placeholder="璇疯緭鍏ョ粺涓�缂栫爜" + v-model="queryParam.num" + /> + </a-form-item> + </a-col> + <a-col + :md="8" + :sm="6" + > + <a-form-item label="璁惧鍚嶇О"> + <a-input + placeholder="璁惧鍚嶇О" v-model="queryParam.name" /> </a-form-item> </a-col> - <a-col :md="3"> <span style="float: left;overflow: hidden;" @@ -77,6 +87,11 @@ mixins: [JeecgListMixin], components: {}, props: { + maintenanceType:{ + type:String, + default:'', + required:true + } }, data() { @@ -86,49 +101,61 @@ columns: [ { title: '#', - dataIndex: '', + dataIndex: 'id', key: 'rowIndex', width: 50, align: 'center', - customRender: function (t, r, index) { + customRender: function(t, r, index) { return parseInt(index) + 1 } - }, - - { - title: '鏍囧噯缂栫爜', - align: 'center', - dataIndex: 'num', - }, - { - title: '浣跨敤閮ㄩ棬', - align: 'center', - dataIndex: 'useDepartName', }, { title: '缁熶竴缂栫爜', align: 'center', - dataIndex: 'equipmentNum', + dataIndex: 'num', + width:200 }, { title: '璁惧鍚嶇О', align: 'center', - dataIndex: 'equipmentName', + dataIndex: 'name', + width:200 }, { title: '璁惧鍨嬪彿', align: 'center', - dataIndex: 'equipmentModel', + dataIndex: 'model', + width:200 }, { - title: '鐗堟湰', + title: '璁惧瑙勬牸', align: 'center', - dataIndex: 'version', + dataIndex: 'specification', + width:200 }, { - title: '鐗堟湰鐘舵��', + title: 'ABC鏍囪瘑', + align: "center", + dataIndex: 'equipmentImportanceId', + width:100 + }, + { + title: '鍏抽敭璁惧鏍囪瘑', + align: "center", + dataIndex: 'specificEquipment_dictText', + width:100 + }, + { + title: '璁惧鐘舵��', align: 'center', - dataIndex: 'versionStatusName', + dataIndex: 'equipmentStatus_dictText', + width:100 + }, + { + title: '鎶�鏈姸鎬�', + align: 'center', + dataIndex: 'technologyStatus_dictText', + width:100 }, ], selectedRowKeys: [], @@ -156,7 +183,8 @@ visible: false, loading: false, url: { - list: '/eam/maintenanceStandard/getMaintenanceStandardList', + list: '/eam/equipment/getEquipmentList', + getStandards:'/eam/equipmentMaintenancePlan/getStandards' }, } }, @@ -190,8 +218,9 @@ } let that = this this.loading = true - this.queryParam.versionStatus = '2' - this.queryParam.type = 'daily' + // this.queryParam.versionStatus = '2' + // this.queryParam.type = 'daily' + this.queryParam.isLine = 'no'; let params = this.getQueryParams()//鏌ヨ鏉′欢 await getAction(this.url.list, params).then((res) => { if (res.success) { @@ -251,12 +280,34 @@ this.isorter.order = 'ascend' === sorter.order ? 'asc' : 'desc'; } this.ipagination = pagination; - this.loadData(); + this.loadData(); }, handleSubmit() { - this.$emit('selectionRows', this.selectionRows); - this.searchReset(0) - this.close(); + this.loading = true + let that = this; + var ids = ''; + if(this.selectionRows.length==0){ + that.$message.warning("璇烽�夋嫨淇濆吇璁惧"); + this.loading=false; + return false; + } + 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){ + that.$message.warning(res.result.message); + } + that.$emit('selectionEquipmentRows', res.result.records); + that.searchReset(0) + that.close(); + } + }).finally(res=>{ + this.loading=false; + }) + + }, onSelectChange(selectionRows) { this.selectionRows = selectionRows; -- Gitblit v1.9.3