测评上传添加权限改完多人添加

This commit is contained in:
zhangsir
2024-04-16 11:32:59 +08:00
parent fa562c08ce
commit 9dc386edb1

View File

@@ -752,7 +752,7 @@ import {downLoadZip} from "@/utils/zipdownload";
const state = reactive({
activeUrl: process.env.VUE_APP_ACT_API + '/evaluation/import',
uploadTypes: true,
selectedRow: null,
selectedRows: [],
uploadStatusType: true,
saveNotUpload: true,
stateUpload: true,
@@ -905,12 +905,18 @@ import {downLoadZip} from "@/utils/zipdownload";
// 添加权限
const customRow = (record) => ({
onClick: () => {
state.selectedRow = record
state.saveList.push(record)
// 添加或移除记录,以确保其在选中数组中的状态
const index = state.selectedRows.findIndex((item) => JSON.stringify(item) === JSON.stringify(record));
if (index === -1) {
state.selectedRows.push(record);
} else {
state.selectedRows.splice(index, 1);
}
state.saveList = state.selectedRows
}
})
const getRowClassName = (record, index) => {
return state.selectedRow === record ? 'highlight-row' : '';
return state.selectedRows.some((selected) => JSON.stringify(selected) === JSON.stringify(record)) ? 'highlight-row' : '';
}
const paginationAdd = computed(() => ({
total: state.totalAdd,
@@ -1556,6 +1562,7 @@ import {downLoadZip} from "@/utils/zipdownload";
state.searchParam.createName = ''
state.tableDataAdd = []
state.saveList = []
state.selectedRows = []
}
//搜索权限
const searchSave = async () => {