常态化干扰源用户管理-入网设计方案/治理工程验收申请添加判断根据浏览器页签变化刷新当前页面
This commit is contained in:
@@ -55,7 +55,7 @@ defineOptions({
|
||||
name: 'ProgramReview'
|
||||
})
|
||||
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import { ref, onMounted, provide, nextTick, onUnmounted } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import { cancel } from '@/api/supervision-boot/interfere/index'
|
||||
@@ -246,8 +246,20 @@ const titleButton = ref()
|
||||
const titleButton1 = ref()
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
const handleVisibilityChange = async () => {
|
||||
if (document.visibilityState === 'visible') {
|
||||
// 在这里执行页面回到回到当前页签需要做的事情
|
||||
await tableStore.index()
|
||||
} else if (document.visibilityState === 'hidden') {
|
||||
// 在这里执行页面离开时需要做的事情
|
||||
}
|
||||
}
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
document.addEventListener('visibilitychange', handleVisibilityChange)
|
||||
})
|
||||
onUnmounted(() => {
|
||||
document.removeEventListener('visibilitychange', handleVisibilityChange)
|
||||
})
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
|
||||
@@ -687,17 +687,16 @@ resetForm()
|
||||
//获取树形图数据
|
||||
const getTreeList = () => {
|
||||
queryByAllCode().then(res => {
|
||||
nonlinearDeviceTypeList.value = [res.data.find(item => item.code == 'Major_Nonlinear_Device')]
|
||||
nonlinearDeviceTypeList.value.map(item => {
|
||||
nonlinearDeviceTypeList.value = [res.data.find((item: any) => item.code == 'Major_Nonlinear_Device')]
|
||||
nonlinearDeviceTypeList.value.map((item: any) => {
|
||||
//tree禁用根节点
|
||||
item.disabled = 'disabled'
|
||||
item.children.map(vv => {
|
||||
item.children.map((vv: any) => {
|
||||
//tree禁用二级节点
|
||||
vv.disabled = 'disabled'
|
||||
vv.children.map(kk => {
|
||||
vv.children.map((kk: any) => {
|
||||
//tree禁用三级节点
|
||||
kk.disabled = 'disabled'
|
||||
kk.children.map(ss => {})
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -705,22 +704,6 @@ const getTreeList = () => {
|
||||
}
|
||||
getTreeList()
|
||||
const treeRef = ref()
|
||||
//选中树形节点变化事件
|
||||
const handleCheckChange = data => {
|
||||
const checkedNodes = treeRef.value.getCheckedKeys()
|
||||
if (checkedNodes.length > 1) {
|
||||
checkedNodes.map((item, index) => {
|
||||
if (index == checkedNodes.length - 1) {
|
||||
treeRef.value.setChecked(checkedNodes[index], true)
|
||||
} else {
|
||||
treeRef.value.setChecked(checkedNodes[index], false)
|
||||
}
|
||||
})
|
||||
form.value.nonlinearDeviceType = checkedNodes[checkedNodes.length - 1]
|
||||
} else if (checkedNodes.length == 1) {
|
||||
form.value.nonlinearDeviceType = checkedNodes[0]
|
||||
}
|
||||
}
|
||||
const subForm: any = ref({
|
||||
city: '', //所在地市
|
||||
evaluationConclusion: '', //预测评估结论
|
||||
@@ -1035,7 +1018,6 @@ const close = () => {
|
||||
resetForm()
|
||||
}
|
||||
onMounted(() => {
|
||||
console.log()
|
||||
})
|
||||
|
||||
// 上传报告
|
||||
|
||||
Reference in New Issue
Block a user