diff --git a/src/views/EquipmentUpOrDown/equipment/index.vue b/src/views/EquipmentUpOrDown/equipment/index.vue index 4f5cce5d..9d3b19e7 100644 --- a/src/views/EquipmentUpOrDown/equipment/index.vue +++ b/src/views/EquipmentUpOrDown/equipment/index.vue @@ -113,7 +113,7 @@ > - + @@ -142,12 +142,12 @@ - + diff --git a/src/views/equipmentRepair/repairApply/SelectToolDialog.vue b/src/views/equipmentRepair/repairApply/SelectToolDialog.vue index f19113a9..0bb50f23 100644 --- a/src/views/equipmentRepair/repairApply/SelectToolDialog.vue +++ b/src/views/equipmentRepair/repairApply/SelectToolDialog.vue @@ -102,7 +102,7 @@ :data="tableList" border stripe height="546" - :row-key="row => row.keyId" + row-key="id" @selection-change="handleSelectionChange" > @@ -127,6 +127,13 @@ + + 取消 @@ -181,9 +188,11 @@ export default { categoryEquipment: '', // 装备分类ID(传给接口) toolTypeId: '', // 工具分类ID(传给接口) devType: '', // 1=装备,2=工具(新增) - manageType:'' + manageType:'', + pageNum: 1, + pageSize: 10 }, - + total: 0, externalSelectedRows: [], tableList: [], selectedList: [], @@ -361,8 +370,8 @@ export default { devType: this.queryParams.devType, // 传递分类类型给后端 manageType: this.queryParams.manageType } - const res = await getToBeRepairList(queryParams) - const rows = res.data || [] + const res = await getToBeRepairList(this.queryParams) + const rows = res.rows || [] const externalMap = new Map( this.externalSelectedRows.map(item => [item.keyId, item]) ) @@ -381,9 +390,10 @@ export default { item.devType = this.queryParams.devType }) this.tableList = rows - this.$nextTick(() => { - if (this.restoreSelection) this.restoreSelection() - }) + this.total = res.total || 0 + // this.$nextTick(() => { + // if (this.restoreSelection) this.restoreSelection() + // }) } finally { this.loading = false } @@ -424,7 +434,9 @@ export default { categoryEquipment: '', toolTypeId: '', devType: '', // 重置分类选择 - manageType: '' + manageType: '', + pageNum: 1, + pageSize: 10 } this.getList() }, @@ -441,11 +453,11 @@ export default { } }) // 删除取消选中项 - for (const [keyId] of this.selectedMap) { - if (!selection.some(s => s.keyId === keyId)) { - this.selectedMap.delete(keyId) - } - } + // for (const [keyId] of this.selectedMap) { + // if (!selection.some(s => s.keyId === keyId)) { + // this.selectedMap.delete(keyId) + // } + // } }, openConfirm() { if (this.selectedMap.size === 0) { @@ -471,6 +483,9 @@ export default { this.$emit("confirm", [...this.selectedMap.values()]) this.selectedMap.clear() this.visible = false + this.$nextTick(() => { + this.restoreSelection() + }) }, // 弹窗关闭事件