mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-13 21:06:44 +08:00
测评上传权限改为只能添加单条
This commit is contained in:
@@ -752,7 +752,7 @@ import {downLoadZip} from "@/utils/zipdownload";
|
|||||||
const state = reactive({
|
const state = reactive({
|
||||||
activeUrl: process.env.VUE_APP_ACT_API + '/evaluation/import',
|
activeUrl: process.env.VUE_APP_ACT_API + '/evaluation/import',
|
||||||
uploadTypes: true,
|
uploadTypes: true,
|
||||||
selectedRows: [],
|
selectedRows: null,
|
||||||
uploadStatusType: true,
|
uploadStatusType: true,
|
||||||
saveNotUpload: true,
|
saveNotUpload: true,
|
||||||
stateUpload: true,
|
stateUpload: true,
|
||||||
@@ -766,7 +766,7 @@ import {downLoadZip} from "@/utils/zipdownload";
|
|||||||
uploadDownLoad: false,
|
uploadDownLoad: false,
|
||||||
uploadDownId: null,
|
uploadDownId: null,
|
||||||
loadData: false,
|
loadData: false,
|
||||||
saveList: [],
|
saveList: {},
|
||||||
powerStatus:{},
|
powerStatus:{},
|
||||||
saveListPid: '',
|
saveListPid: '',
|
||||||
idValue: null,
|
idValue: null,
|
||||||
@@ -906,17 +906,18 @@ import {downLoadZip} from "@/utils/zipdownload";
|
|||||||
const customRow = (record) => ({
|
const customRow = (record) => ({
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
// 添加或移除记录,以确保其在选中数组中的状态
|
// 添加或移除记录,以确保其在选中数组中的状态
|
||||||
const index = state.selectedRows.findIndex((item) => JSON.stringify(item) === JSON.stringify(record));
|
// const index = state.selectedRows.findIndex((item) => JSON.stringify(item) === JSON.stringify(record));
|
||||||
if (index === -1) {
|
// if (index === -1) {
|
||||||
state.selectedRows.push(record);
|
// state.selectedRows.push(record);
|
||||||
} else {
|
// } else {
|
||||||
state.selectedRows.splice(index, 1);
|
// state.selectedRows.splice(index, 1);
|
||||||
}
|
// }
|
||||||
state.saveList = state.selectedRows
|
state.selectedRows = record
|
||||||
|
state.saveList = { ...record };
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const getRowClassName = (record, index) => {
|
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(() => ({
|
const paginationAdd = computed(() => ({
|
||||||
total: state.totalAdd,
|
total: state.totalAdd,
|
||||||
@@ -1561,7 +1562,7 @@ import {downLoadZip} from "@/utils/zipdownload";
|
|||||||
state.bg_addsetting = false
|
state.bg_addsetting = false
|
||||||
state.searchParam.createName = ''
|
state.searchParam.createName = ''
|
||||||
state.tableDataAdd = []
|
state.tableDataAdd = []
|
||||||
state.saveList = []
|
state.saveList = {}
|
||||||
state.selectedRows = []
|
state.selectedRows = []
|
||||||
}
|
}
|
||||||
//搜索权限
|
//搜索权限
|
||||||
@@ -1591,7 +1592,7 @@ import {downLoadZip} from "@/utils/zipdownload";
|
|||||||
}
|
}
|
||||||
//添加权限确定
|
//添加权限确定
|
||||||
const addSettingUp = async () => {
|
const addSettingUp = async () => {
|
||||||
await savePermission({userList:state.saveList,pid:state.saveListPid})
|
await savePermission({userList:[state.saveList],pid:state.saveListPid})
|
||||||
saveListItem()
|
saveListItem()
|
||||||
of_addsetting()
|
of_addsetting()
|
||||||
listData()
|
listData()
|
||||||
|
|||||||
Reference in New Issue
Block a user