设备监控-指标详情添加devId

This commit is contained in:
zhujiyan
2024-08-08 15:38:59 +08:00
parent 6a6239c488
commit a28a61c8e4
3 changed files with 41 additions and 46 deletions

View File

@@ -60,6 +60,7 @@ const init = () => {
echartsData.value = null
loading.value = true
getDeviceDataTrend({
devId:props.detail.pid,
endTime: datePickerRef.value.timeValue[1],
lineId: props.detail.lineId,
startTime: datePickerRef.value.timeValue[0],

View File

@@ -238,7 +238,7 @@
<div v-if="!tableData" style="height: 42px"></div>
</el-tabs>
</div>
<el-empty v-else description="请选择设备" class="device-control-right"/>
<el-empty v-else description="请选择设备" class="device-control-right" />
<Detail ref="detailRef" :detail="detail" @close="detail = null" v-if="detail"></Detail>
<!-- 离线数据导入组件 -->
<offLineDataImport ref="offLineDataImportRef"></offLineDataImport>
@@ -417,7 +417,7 @@ const timer: any = ref()
//tab点击事件
const handleClick = async (tab?: any) => {
//点击tab时更新dataSet最新值
if(tab&&tab.props&&tab.props.name&&dataSet.value!=tab.props.name){
if (tab && tab.props && tab.props.name && dataSet.value != tab.props.name) {
dataSet.value = tab.props.name
}

View File

@@ -9,16 +9,10 @@
></PointTree>
</pane>
<pane style="background: #fff" :style="height">
<div class="default-main">
<TableHeader ref="TableHeaderRef" datePicker>
<template v-slot:select>
<el-form-item label="模板策略">
<el-select
v-model="Template"
@change="changetype"
placeholder="请选择模版"
value-key="id"
>
<el-select v-model="Template" @change="changetype" placeholder="请选择模版" value-key="id">
<el-option
v-for="item in templatePolicy"
:key="item.id"
@@ -50,7 +44,6 @@
<div class="box">
<div id="luckysheet" :style="`height: calc(${tableStore.table.height} + 45px)`"></div>
</div>
</div>
</pane>
</splitpanes>
</div>
@@ -102,6 +95,7 @@ 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
@@ -114,12 +108,12 @@ const tableStore = new TableStore({
showtoolbar: false, // 是否显示工具栏
showinfobar: false, // 是否显示顶部信息栏
showsheetbar: true, // 是否显示底部sheet按钮
// data: data
data: tableStore.table.data
})
}
})
provide('tableStore', tableStore)
onMounted(() => {
const dom = document.getElementById('navigation-splitpanes')
if (dom) {
@@ -130,13 +124,13 @@ getTemplateByDept({ id: dictData.state.area[0].id }).then((res: any) => {
templatePolicy.value = res.data
Template.value = res.data[0]
reportForm.value = res.data[0]?.reportForm
// tableStore.index()
})
const changetype = (val: any) => {
reportForm.value = val.reportForm
}
const handleNodeClick = (data: any, node: any) => {
console.log(data.level,"+++++++++++++");
if (data.level == 3) {
dotList.value = data
tableStore.index()