This commit is contained in:
bb_pan 2026-01-06 17:21:56 +08:00
parent 8e6bee04c1
commit 5ffb535536
2 changed files with 32 additions and 17 deletions

View File

@ -113,7 +113,7 @@
> >
<!-- 表格列保持原有内容 --> <!-- 表格列保持原有内容 -->
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column align="center" label="序号" type="index" width="80" /> <el-table-column align="center" label="序号" type="index" width="55" />
<!-- <el-table-column align="center" prop="province" label="所属省份" /> --> <!-- <el-table-column align="center" prop="province" label="所属省份" /> -->
<el-table-column align="center" prop="propertyUnit" label="产权单位" /> <el-table-column align="center" prop="propertyUnit" label="产权单位" />
<el-table-column align="center" prop="major" label="专业" /> <el-table-column align="center" prop="major" label="专业" />
@ -142,12 +142,12 @@
<el-table-column align="center" prop="originalValue" label="资产原值(万元)" /> <el-table-column align="center" prop="originalValue" label="资产原值(万元)" />
<el-table-column align="center" prop="maxServiceLifeYears" label="最大使用年限(年)" /> <el-table-column align="center" prop="maxServiceLifeYears" label="最大使用年限(年)" />
<el-table-column align="center" prop="nextMaintenanceDate" label="下次维保日期" /> <el-table-column align="center" prop="nextMaintenanceDate" label="下次维保日期" />
<el-table-column align="center" prop="appearanceImages" label="装备外观" /> <!-- <el-table-column align="center" prop="appearanceImages" label="装备外观" />
<el-table-column align="center" prop="certificates" label="合格证" /> <el-table-column align="center" prop="certificates" label="合格证" />
<el-table-column align="center" prop="inspectionReports" label="定期检验报告" /> <el-table-column align="center" prop="inspectionReports" label="定期检验报告" />
<el-table-column align="center" prop="purchaseInvoices" label="采购发票" /> <el-table-column align="center" prop="purchaseInvoices" label="采购发票" />
<el-table-column align="center" prop="feature1" label="特征项1" /> <el-table-column align="center" prop="feature1" label="特征项1" />
<el-table-column align="center" prop="featureValue1" label="特征值1" /> <el-table-column align="center" prop="featureValue1" label="特征值1" /> -->
<el-table-column align="center" prop="leasePrice" label="租赁价" /> <el-table-column align="center" prop="leasePrice" label="租赁价" />
<el-table-column align="center" label="操作" :width="199" fixed="right"> <el-table-column align="center" label="操作" :width="199" fixed="right">

View File

@ -102,7 +102,7 @@
:data="tableList" :data="tableList"
border stripe border stripe
height="546" height="546"
:row-key="row => row.keyId" row-key="id"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="50" :reserve-selection="true"/> <el-table-column type="selection" width="50" :reserve-selection="true"/>
@ -127,6 +127,13 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 底部按钮 --> <!-- 底部按钮 -->
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button> <el-button @click="visible = false">取消</el-button>
@ -181,9 +188,11 @@ export default {
categoryEquipment: '', // ID categoryEquipment: '', // ID
toolTypeId: '', // ID toolTypeId: '', // ID
devType: '', // 1=2= devType: '', // 1=2=
manageType:'' manageType:'',
pageNum: 1,
pageSize: 10
}, },
total: 0,
externalSelectedRows: [], externalSelectedRows: [],
tableList: [], tableList: [],
selectedList: [], selectedList: [],
@ -361,8 +370,8 @@ export default {
devType: this.queryParams.devType, // devType: this.queryParams.devType, //
manageType: this.queryParams.manageType manageType: this.queryParams.manageType
} }
const res = await getToBeRepairList(queryParams) const res = await getToBeRepairList(this.queryParams)
const rows = res.data || [] const rows = res.rows || []
const externalMap = new Map( const externalMap = new Map(
this.externalSelectedRows.map(item => [item.keyId, item]) this.externalSelectedRows.map(item => [item.keyId, item])
) )
@ -381,9 +390,10 @@ export default {
item.devType = this.queryParams.devType item.devType = this.queryParams.devType
}) })
this.tableList = rows this.tableList = rows
this.$nextTick(() => { this.total = res.total || 0
if (this.restoreSelection) this.restoreSelection() // this.$nextTick(() => {
}) // if (this.restoreSelection) this.restoreSelection()
// })
} finally { } finally {
this.loading = false this.loading = false
} }
@ -424,7 +434,9 @@ export default {
categoryEquipment: '', categoryEquipment: '',
toolTypeId: '', toolTypeId: '',
devType: '', // devType: '', //
manageType: '' manageType: '',
pageNum: 1,
pageSize: 10
} }
this.getList() this.getList()
}, },
@ -441,11 +453,11 @@ export default {
} }
}) })
// //
for (const [keyId] of this.selectedMap) { // for (const [keyId] of this.selectedMap) {
if (!selection.some(s => s.keyId === keyId)) { // if (!selection.some(s => s.keyId === keyId)) {
this.selectedMap.delete(keyId) // this.selectedMap.delete(keyId)
} // }
} // }
}, },
openConfirm() { openConfirm() {
if (this.selectedMap.size === 0) { if (this.selectedMap.size === 0) {
@ -471,6 +483,9 @@ export default {
this.$emit("confirm", [...this.selectedMap.values()]) this.$emit("confirm", [...this.selectedMap.values()])
this.selectedMap.clear() this.selectedMap.clear()
this.visible = false this.visible = false
this.$nextTick(() => {
this.restoreSelection()
})
}, },
// //