fix 项目列表选择错乱、批量操作无法正常使用

This commit is contained in:
bwcx_jzy 2024-01-10 15:28:28 +08:00
parent f1b198d899
commit fe8f536fd9
No known key found for this signature in database
GPG Key ID: 5E48E9372088B9E5
2 changed files with 20 additions and 13 deletions

View File

@ -13,6 +13,7 @@
5. 【server】修复 无法新增项目(权限判断异常)(感谢@群友)
6. 【agent】修复 插件端环境变量值获取异常
7. 【agent】优化 插件端 java 项目启动支持读取环境变量
8. 【server】修复 项目列表选择错乱、批量操作无法正常使用(感谢@🇩)
------

View File

@ -16,6 +16,7 @@
:pagination="pagination"
@change="changePage"
:row-selection="rowSelection"
rowKey="id"
:scroll="{
x: 'max-content'
}"
@ -369,7 +370,7 @@
/>
</a-drawer>
<!-- 批量操作状态 -->
<a-modal destroyOnClose v-model:value="batchVisible" :title="temp.title" :footer="null" @cancel="batchClose">
<a-modal destroyOnClose v-model:open="batchVisible" :title="temp.title" :footer="null" @cancel="batchClose">
<a-list bordered :data-source="temp.data">
<template v-slot:renderItem="{ item }">
<a-list-item>
@ -940,14 +941,19 @@ export default {
* 将选中的 key 转为 data
*/
selectedRowKeysToId() {
return this.selectedRowKeys.map((item) => {
return {
projectId: this.projList[item]?.projectId,
nodeId: this.projList[item]?.nodeId,
runMode: this.projList[item]?.runMode,
name: this.projList[item]?.name
}
})
return this.projList
.filter((item) => {
return this.selectedRowKeys.includes(item.id)
})
.map((item) => {
return {
projectId: item.projectId,
nodeId: item.nodeId,
runMode: item.runMode,
name: item.name
}
})
// return this.selectedRowKeys.map((item) => {})
},
//
updateBatchData(index, data2) {
@ -1042,10 +1048,10 @@ export default {
//
getCheckboxProps(record) {
return {
props: {
disabled: record.runMode === 'File',
name: record.name
}
// props: {
disabled: record.runMode === 'File',
name: record.name
// }
}
},
//