|
@@ -268,6 +268,7 @@ const HandleAddUser = async (row, cell) => {
|
|
|
*/
|
|
*/
|
|
|
const dialogVisible = ref(false)
|
|
const dialogVisible = ref(false)
|
|
|
const dialogSubmitLoading = ref(false)
|
|
const dialogSubmitLoading = ref(false)
|
|
|
|
|
+const currentDeleteCellIndex = ref() //当前删除的(员工)所在单元格内的索引
|
|
|
const currentDeleteCell = ref() //当前准备删除的(员工)单元格数据
|
|
const currentDeleteCell = ref() //当前准备删除的(员工)单元格数据
|
|
|
const currentDeleteRow = ref() //当前准备删除的(员工)所在行数据
|
|
const currentDeleteRow = ref() //当前准备删除的(员工)所在行数据
|
|
|
const currentDeleteColumn = ref() //当前准备删除的(员工)所在列信息
|
|
const currentDeleteColumn = ref() //当前准备删除的(员工)所在列信息
|
|
@@ -280,9 +281,13 @@ const HandleDialogConfirm = async ()=>{
|
|
|
}catch{}
|
|
}catch{}
|
|
|
if(res?.code == 200){
|
|
if(res?.code == 200){
|
|
|
ElMessage.success(res?.msg)
|
|
ElMessage.success(res?.msg)
|
|
|
- currentDeleteRow.value[currentDeleteColumn.value.name] = currentDeleteRow.value[currentDeleteColumn.value.name].filter(item=>{
|
|
|
|
|
- return item.id !== currentDeleteCell.value.id
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ // 删除对应索引
|
|
|
|
|
+ currentDeleteRow.value[currentDeleteColumn.value.name].splice(currentDeleteCellIndex.value,1)
|
|
|
|
|
+
|
|
|
|
|
+ // 引用丢失 --重新渲染 会复原
|
|
|
|
|
+ // currentDeleteRow.value[currentDeleteColumn.value.name] = currentDeleteRow.value[currentDeleteColumn.value.name].filter(item=>{
|
|
|
|
|
+ // return item.id !== currentDeleteCell.value.id
|
|
|
|
|
+ // })
|
|
|
HandleDialogClose()
|
|
HandleDialogClose()
|
|
|
// 重新查询分组 _更新禁删权限
|
|
// 重新查询分组 _更新禁删权限
|
|
|
await GetGroupList()
|
|
await GetGroupList()
|
|
@@ -297,10 +302,12 @@ const HandleDialogClose = ()=>{
|
|
|
currentDeleteColumn.value = null
|
|
currentDeleteColumn.value = null
|
|
|
dialogVisible.value = false
|
|
dialogVisible.value = false
|
|
|
dialogSubmitLoading.value = false
|
|
dialogSubmitLoading.value = false
|
|
|
|
|
+ currentDeleteCellIndex.value = null
|
|
|
}
|
|
}
|
|
|
const OpenDeleteDialog = (row, cellObj,index)=>{
|
|
const OpenDeleteDialog = (row, cellObj,index)=>{
|
|
|
if (!isConfigMode.value) return;
|
|
if (!isConfigMode.value) return;
|
|
|
dialogVisible.value = true
|
|
dialogVisible.value = true
|
|
|
|
|
+ currentDeleteCellIndex.value = index
|
|
|
currentDeleteCell.value = row[cellObj.name][index]
|
|
currentDeleteCell.value = row[cellObj.name][index]
|
|
|
currentDeleteRow.value = row
|
|
currentDeleteRow.value = row
|
|
|
currentDeleteColumn.value = cellObj
|
|
currentDeleteColumn.value = cellObj
|