修改台账
This commit is contained in:
@@ -28,6 +28,7 @@ import { mainHeight } from '@/utils/layout'
|
||||
import { getVisitorConfig, updateVisitorConfig } from '@/api/cs-device-boot/user'
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { debounce } from 'lodash-es'
|
||||
const pageHeight = mainHeight(60)
|
||||
const loading = ref(true)
|
||||
const defaultCheckedKeys: any = ref([])
|
||||
@@ -35,6 +36,7 @@ const tableData = ref([])
|
||||
const treeRef = ref(null)
|
||||
const ignoreCheckChange = ref(false)
|
||||
const checkChange = (data: any) => {
|
||||
console.log('🚀 ~ checkChange ~ data:', data)
|
||||
if (data.data.pName == '便携式设备') {
|
||||
if (ignoreCheckChange.value) {
|
||||
ignoreCheckChange.value = false // 清除标记,不影响后续正常触发
|
||||
@@ -55,7 +57,7 @@ const checkChange = (data: any) => {
|
||||
updateVisitorConfigs()
|
||||
}
|
||||
}
|
||||
const updateVisitorConfigs = () => {
|
||||
const updateVisitorConfigs = debounce (() => {
|
||||
const result = Array.from(new Set(defaultCheckedKeys.value))
|
||||
updateVisitorConfig(
|
||||
result.map(item => {
|
||||
@@ -68,7 +70,7 @@ const updateVisitorConfigs = () => {
|
||||
getVisitorConfigs()
|
||||
}
|
||||
})
|
||||
}
|
||||
},500)
|
||||
const getVisitorConfigs = () => {
|
||||
getVisitorConfig().then((res: any) => {
|
||||
if (res.code === 'A0000') {
|
||||
|
||||
Reference in New Issue
Block a user