测评上传权限改为只能添加单条

This commit is contained in:
zhangsir
2024-04-16 13:35:19 +08:00
parent 16f29f273f
commit fee8970e98

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,
selectedRows: [],
selectedRows: null,
uploadStatusType: true,
saveNotUpload: true,
stateUpload: true,
@@ -766,7 +766,7 @@ import {downLoadZip} from "@/utils/zipdownload";
uploadDownLoad: false,
uploadDownId: null,
loadData: false,
saveList: [],
saveList: {},
powerStatus:{},
saveListPid: '',
idValue: null,
@@ -906,17 +906,18 @@ import {downLoadZip} from "@/utils/zipdownload";
const customRow = (record) => ({
onClick: () => {
// 添加或移除记录,以确保其在选中数组中的状态
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 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.selectedRows = record
state.saveList = { ...record };
}
})
const getRowClassName = (record, index) => {
return state.selectedRows.some((selected) => JSON.stringify(selected) === JSON.stringify(record)) ? 'highlight-row' : '';
return state.selectedRows==record ? 'highlight-row' : '';
}
const paginationAdd = computed(() => ({
total: state.totalAdd,
@@ -1561,7 +1562,7 @@ import {downLoadZip} from "@/utils/zipdownload";
state.bg_addsetting = false
state.searchParam.createName = ''
state.tableDataAdd = []
state.saveList = []
state.saveList = {}
state.selectedRows = []
}
//搜索权限
@@ -1591,7 +1592,7 @@ import {downLoadZip} from "@/utils/zipdownload";
}
//添加权限确定
const addSettingUp = async () => {
await savePermission({userList:state.saveList,pid:state.saveListPid})
await savePermission({userList:[state.saveList],pid:state.saveListPid})
saveListItem()
of_addsetting()
listData()