微调
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import { ref, onMounted, provide, nextTick, watch } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
@@ -52,7 +52,7 @@ import { useDictData } from '@/stores/dictData'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { downloadSensitiveReportTemplate } from '@/api/supervision-boot/userReport/form'
|
||||
import DetailInfo from '../../interfere/components/undocumented/detail.vue'
|
||||
import { cancelFormData } from '@/api/supervision-boot/interfere/index'
|
||||
import { cancelFormData, getUserReportById } from '@/api/supervision-boot/interfere/index'
|
||||
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
||||
const addForms = ref()
|
||||
const dictData = useDictData()
|
||||
@@ -357,4 +357,22 @@ const exportExcelTemplate = () => {
|
||||
const importUserData = () => {
|
||||
sensitiveUserPopup.value.open('导入干扰源用户')
|
||||
}
|
||||
|
||||
const props = defineProps({id: {type: String, default: 'null'}})
|
||||
watch(() => props.id, async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
let nowTime = Date.now()
|
||||
const routeTime = Number(newValue.split('@')[1])
|
||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||
await getUserReportById(fullId).then(res => {
|
||||
if (res && res.code == 'A0000') {
|
||||
addForms.value.setcontroFlag()
|
||||
addForms.value.open({
|
||||
title: '重新发起',
|
||||
row: res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
}, {immediate: true})
|
||||
</script>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class='default-main'>
|
||||
<el-tabs v-model='activeName' type='border-card'>
|
||||
<el-tab-pane label='干扰源用户台账' name='1' >
|
||||
<interferenceUserTable v-if="activeName == '1'" />
|
||||
<interferenceUserTable :id='id' v-if="activeName == '1'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='敏感及重要用户台账' name='2' >
|
||||
<sensitiveUserTable v-if="activeName == '2'" />
|
||||
@@ -28,15 +28,28 @@ import substationLedger from './components/substationLedger.vue'
|
||||
import deviceLedgerTable from './components/deviceLedgerTable.vue'
|
||||
import monitorLedgerTable from './components/monitorLedgerTable.vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
const id = ref('')
|
||||
|
||||
defineOptions({
|
||||
name: 'Supervision/Terminaldetection'
|
||||
})
|
||||
const activeName = ref('1')
|
||||
const network = ref('1')
|
||||
const cycle = ref('1')
|
||||
const Statistics = ref()
|
||||
const compatibility = ref()
|
||||
|
||||
|
||||
watch(() => route.query.t, async (newValue, oldValue) => {
|
||||
if (route.fullPath.includes('Supervision/Terminaldetection')) {
|
||||
let type = (route.query.type as string) || 'null'
|
||||
if (type == '1') {
|
||||
activeName.value = '1'
|
||||
} else {
|
||||
activeName.value = '4'
|
||||
}
|
||||
id.value = (route.query.id as string) || 'null'
|
||||
id.value = id.value + '@' + route.query.t
|
||||
}
|
||||
}, {deep: true, immediate: true})
|
||||
|
||||
const layout = mainHeight(63) as any
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user