From 52190152691bc217844d4f87b700274c297b104e Mon Sep 17 00:00:00 2001 From: qushaowei <qushaowei@163.com> Date: 星期四, 25 七月 2024 09:55:53 +0800 Subject: [PATCH] 设备管理修改 --- src/views/eam/ABC/modules/EquipmentSelectModel.vue | 81 ++++++++++++++++++++++++++++++++-------- 1 files changed, 65 insertions(+), 16 deletions(-) diff --git a/src/views/eam/ABC/modules/EquipmentSelectModel.vue b/src/views/eam/ABC/modules/EquipmentSelectModel.vue index fbbcb6d..8a891a5 100644 --- a/src/views/eam/ABC/modules/EquipmentSelectModel.vue +++ b/src/views/eam/ABC/modules/EquipmentSelectModel.vue @@ -39,6 +39,22 @@ /> </a-form-item> </a-col> + <a-col + :md="8" + :sm="6" + > + <a-form-item label="涓績"> + <!-- <a-input + placeholder="涓績" + v-model="queryParam.useId" + /> --> + <j-dict-select-tag + placeholder='璇烽�夋嫨鎵�灞炰腑蹇�' + dictCode="mom_base_area,name,id,del_flag!='1' and type='1'" + v-model="queryParam.workCenterId" + /> + </a-form-item> + </a-col> <a-col :md="3"> <span style="float: left;overflow: hidden;" @@ -72,10 +88,23 @@ :loading="loading" @change="handleTableChange" > - <template slot="equipmentPhoto" slot-scope="text,record"> - <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span> - <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> - </template> + <template + slot="equipmentPhoto" + slot-scope="text,record" + > + <span + v-if="!text" + style="font-size: 12px;font-style: italic;" + >鏃犲浘鐗�</span> + <img + v-else + :src="getImgView(text)" + :preview="record.id" + height="25px" + alt="" + style="max-width:80px;font-size: 12px;font-style: italic;" + /> + </template> </a-table> </a-card> </a-modal> @@ -101,7 +130,7 @@ key: 'rowIndex', width: 50, align: 'center', - customRender: function(t, r, index) { + customRender: function (t, r, index) { return parseInt(index) + 1 } }, @@ -109,49 +138,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: [], @@ -159,6 +188,7 @@ scrollTrigger: {}, dataSource: [], selectionRows: [], + selectionRowsNotClear: [], title: '閫夋嫨璁惧', ipagination: { current: 1, @@ -188,14 +218,29 @@ type: 'checkbox', onChange: (selectedRowKeys, selectedRows) => { this.selectedRowKeys = selectedRowKeys - this.onSelectChange(selectedRows) + this.selectionRows = selectedRows + // debugger + // this.selectionRowsNotClear.push(selectedRows) + // this.onSelectChange(selectedRows) + }, + onSelect: (record, selected, selectedRows) => { + if (selected) { + this.selectionRowsNotClear.push(record); + } + if (!selected) { + let delIndex = this.selectionRowsNotClear.findIndex(val => { + return val.id === record.id + }) + this.selectionRowsNotClear.splice(delIndex, 1); + } }, getCheckboxProps: record => ({ props: { disabled: record.distable } }), - selectedRowKeys: this.selectedRowKeys + selectedRowKeys: this.selectedRowKeys, + selectedRows: this.selectionRows } } }, @@ -230,6 +275,9 @@ }, showModals(oldSelectRows) { + this.selectionRows = [] + this.selectedRowKeys = [] + this.selectionRowsNotClear = [] this.oldSelectRows = oldSelectRows this.visible = true this.loadData(1) @@ -273,7 +321,8 @@ this.loadData() }, handleSubmit() { - this.$emit('selectionRows', this.selectionRows) + debugger + this.$emit('selectionRows', this.selectionRowsNotClear) this.searchReset(0) this.close() }, -- Gitblit v1.9.3