设备监控-tab切换内容显示问题修改
This commit is contained in:
@@ -62,7 +62,6 @@
|
||||
{{ deviceData.time ? deviceData.time : '/' }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<!-- {{ dataSet }} -->
|
||||
<el-tabs v-model="dataSet" type="border-card" class="device-control-box-card" @tab-click="handleClick">
|
||||
<el-tab-pane
|
||||
lazy
|
||||
@@ -373,7 +372,6 @@ const nodeClick = async (e: anyObj) => {
|
||||
tableData.value = []
|
||||
} else {
|
||||
res.data.dataSetList.forEach((item: any) => {
|
||||
console.log(item.type, '777777777')
|
||||
//历史
|
||||
if (item.type === 'history') {
|
||||
item.id = item.id + '_history'
|
||||
@@ -418,6 +416,9 @@ const eventRef: any = ref()
|
||||
const timer: any = ref()
|
||||
//tab点击事件
|
||||
const handleClick = async (tab?: any) => {
|
||||
let activeName = ''
|
||||
activeName = tab?.props.name ? tab?.props.name : deviceData.value.dataSetList[0].id
|
||||
dataSet.value = activeName
|
||||
tableLoading.value = true
|
||||
//初始化点击tab隐藏实时录波、实时趋势、谐波频谱按钮
|
||||
realTimeFlag.value = false
|
||||
@@ -459,7 +460,6 @@ const handleClick = async (tab?: any) => {
|
||||
// await getTabsDataByType(obj).then(res => {
|
||||
// console.log(res, '趋势数据结果')
|
||||
// })
|
||||
console.log(trendRef.value, '++++++++++++++++++')
|
||||
trendRef.value && trendRef.value.getTrendRequest(obj)
|
||||
}
|
||||
//查询实时数据
|
||||
@@ -474,14 +474,12 @@ const handleClick = async (tab?: any) => {
|
||||
intRealTime(obj)
|
||||
}
|
||||
if (!dataSet.value.includes('_realtimedata')) {
|
||||
// console.log(timer.value, '=====定时球带哦用时间=====')
|
||||
// if(timer.value){
|
||||
// window.clearInterval(timer.value)
|
||||
// }
|
||||
}
|
||||
//查询暂态事件
|
||||
if (dataSet.value.includes('_event')) {
|
||||
console.log('_event')
|
||||
let obj = {
|
||||
devId: deviceId.value, //e.id
|
||||
lineId: lineId.value, //e.pid
|
||||
@@ -583,10 +581,16 @@ watch(
|
||||
() => dataSet.value,
|
||||
(val: any, oldVal: any) => {
|
||||
if (val) {
|
||||
handleClick()
|
||||
// handleClick()
|
||||
}
|
||||
}
|
||||
)
|
||||
watch(
|
||||
() => tableData.value,
|
||||
(val: any, oldVal: any) => {
|
||||
// console.log(val, '==========', oldVal)
|
||||
}
|
||||
)
|
||||
onMounted(() => {})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -73,9 +73,6 @@ defineOptions({
|
||||
const height = mainHeight(20)
|
||||
const size = ref(0)
|
||||
const dictData = useDictData()
|
||||
console.log(dictData.state.area[0].id, '++++++++')
|
||||
const deptId = ref('')
|
||||
deptId.value = dictData.state.area[0].id
|
||||
const TableHeaderRef = ref()
|
||||
const dotList: any = ref({})
|
||||
const Template: any = ref({})
|
||||
@@ -105,7 +102,6 @@ const tableStore = new TableStore({
|
||||
tableStore.table.params.lineId = dotList.value.id
|
||||
},
|
||||
loadCallback: () => {
|
||||
console.log(tableStore.table.data)
|
||||
tableStore.table.data.forEach((item: any) => {
|
||||
item.celldata.forEach((k: any) => {
|
||||
item.data[k.r][k.c].v = k.v
|
||||
@@ -131,7 +127,6 @@ onMounted(() => {
|
||||
}
|
||||
})
|
||||
getTemplateByDept({ id: dictData.state.area[0].id }).then((res: any) => {
|
||||
console.log(res.data[0], '77777666666666')
|
||||
templatePolicy.value = res.data
|
||||
Template.value = res.data[0]
|
||||
reportForm.value = res.data[0]?.reportForm
|
||||
@@ -142,7 +137,6 @@ const changetype = (val: any) => {
|
||||
}
|
||||
|
||||
const handleNodeClick = (data: any, node: any) => {
|
||||
console.log(data.level, '++++++++++155')
|
||||
if (data.level == 3) {
|
||||
dotList.value = data
|
||||
tableStore.index()
|
||||
|
||||
Reference in New Issue
Block a user