From 585fb0bbd4a7bc7f8f333ecba7c5fecd2ee5cbc2 Mon Sep 17 00:00:00 2001 From: qushaowei <qushaowei@163.com> Date: 星期四, 28 三月 2024 09:46:44 +0800 Subject: [PATCH] Merge branch 'master' of http://117.34.109.166:18448/r/vue_mdc_430 into develop --- src/views/eam/modules/maintenancePlan/StandardSelect.vue | 176 ++++++++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 140 insertions(+), 36 deletions(-) diff --git a/src/views/eam/modules/maintenancePlan/StandardSelect.vue b/src/views/eam/modules/maintenancePlan/StandardSelect.vue index 46b3804..59a841e 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="2000" > <a-card :bordered="false"> <div class="table-page-search-wrapper"> @@ -18,16 +18,59 @@ > <a-row :gutter="24"> <a-col - :md="8" + :md="6" :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="6" + :sm="6" + > + <a-form-item label="璁惧鍚嶇О"> + <a-input + placeholder="璁惧鍚嶇О" v-model="queryParam.name" /> </a-form-item> </a-col> + <!-- 鎸変腑蹇冩煡璇� --> + <a-col + :md="6" + :sm="6" > + <a-form-item label="涓績"> + <j-dict-select-tag + allow-clear + placeholder="璇烽�夋嫨涓績" + :triggerChange="true" + dictCode="mom_base_area,name,id,del_flag!='1' and type='1'" + v-model="queryParam.workCenterId" + /> + </a-form-item> + </a-col> + <a-col + :md="6" + :sm="6"> + <a-form-model-item + label="涓嬫涓変繚鏃堕棿" + prop="ranges" + > + <a-range-picker + v-model="ranges" + style="width:100%" + format="YYYY-MM-DD HH:mm:ss" + showTime + :placeholder="[ '寮�濮嬫椂闂�', '缁撴潫鏃堕棿']" + @change="changeDate" + /> + </a-form-model-item> + </a-col> + <a-col :md="3"> <span @@ -77,16 +120,22 @@ mixins: [JeecgListMixin], components: {}, props: { + maintenanceType: { + type: String, + default: '', + required: true + } }, data() { return { queryParam: { }, + ranges: [], columns: [ { title: '#', - dataIndex: '', + dataIndex: 'id', key: 'rowIndex', width: 50, align: 'center', @@ -95,41 +144,66 @@ } }, { - title: '鐗堟湰', - align: 'center', - dataIndex: 'version', - width: 100, - }, - { - title: '鐗堟湰鐘舵��', - align: 'center', - dataIndex: 'versionStatusName', - width: 130, - }, - { - title: '鏍囧噯缂栫爜', + title: '缁熶竴缂栫爜', align: 'center', dataIndex: 'num', - }, - { - title: '瀵硅薄閮ㄩ棬', - align: 'center', - dataIndex: 'useDepartName', - }, - { - title: '璁惧缂栫爜', - align: 'center', - dataIndex: 'equipmentNum', + width: 200 }, { title: '璁惧鍚嶇О', align: 'center', - dataIndex: 'equipmentName', + dataIndex: 'name', + width: 200 }, { title: '璁惧鍨嬪彿', align: 'center', - dataIndex: 'equipmentModel', + dataIndex: 'model', + width: 200 + }, + { + title: '璁惧瑙勬牸', + align: 'center', + dataIndex: 'specification', + width: 200 + }, + { + title: 'ABC鏍囪瘑', + align: "center", + dataIndex: 'equipmentImportanceId', + width: 100 + }, + { + title: '鍏抽敭璁惧鏍囪瘑', + align: "center", + dataIndex: 'specificEquipment_dictText', + width: 100 + }, + { + title: '璁惧鐘舵��', + align: 'center', + dataIndex: 'equipmentStatus_dictText', + width: 100 + }, + { + title: '鎶�鏈姸鎬�', + align: 'center', + dataIndex: 'technologyStatus_dictText', + width: 100 + }, + //涓嬫涓変繚鏃堕棿 + { + title: '涓嬫涓変繚鏃堕棿', + align: 'center', + dataIndex: 'nextThirdMaintenanceTime', + width: 200 + }, + //涓績 + { + title: '涓績', + align: 'center', + dataIndex: 'workCenterId_dictText', + width: 200 }, ], selectedRowKeys: [], @@ -157,7 +231,8 @@ visible: false, loading: false, url: { - list: '/eam/maintenanceStandard/getMaintenanceStandardList', + list: '/eam/equipment/planEquipmentList', + getStandards: '/eam/equipmentMaintenancePlan/getStandards' }, } }, @@ -191,8 +266,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) { @@ -235,9 +311,11 @@ searchReset(num) { let that = this; this.queryParam = []; + this.ranges = []; if (num !== 0) { that.loadData(1); } + that.selectborrowIds = []; }, close() { @@ -255,9 +333,35 @@ 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; + }) + + + }, + changeDate(date, dateString) { + this.queryParam.startTime = dateString[0].format('YYYY-MM-DD HH:mm:ss'); + this.queryParam.endTime = dateString[1].format('YYYY-MM-DD HH:mm:ss'); }, onSelectChange(selectionRows) { this.selectionRows = selectionRows; -- Gitblit v1.9.3