Commit 3e5ca5ba authored by hubaoshan's avatar hubaoshan

解决了一进页面没有默认进入最新数据,和一些显示bug

parent 2b368ba9
...@@ -182,8 +182,8 @@ defineExpose({ ...@@ -182,8 +182,8 @@ defineExpose({
<el-form ref="form" :model="singleDetails" size="small" label-width="90px" class="my-custom-form"> <el-form ref="form" :model="singleDetails" size="small" label-width="90px" class="my-custom-form">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="设备名称:" prop="relateDeviceId"> <el-form-item label="设备名称:" prop="srcName">
<span>{{ singleDetails.relateDeviceId || '-' }}</span> <span>{{ singleDetails.srcName || '-' }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
......
...@@ -257,6 +257,8 @@ watch( ...@@ -257,6 +257,8 @@ watch(
() => route.path, // 只监听路径变化 () => route.path, // 只监听路径变化
() => { () => {
if(route.path === '/AIStation/Extinguisher') { if(route.path === '/AIStation/Extinguisher') {
// selectedComponent.value = ExtinguisherNewDataPage
activeName.value = ExtinguisherNewDataPage
// 路由变化,执行相应操作 // 路由变化,执行相应操作
handleGetAIToken(); handleGetAIToken();
const checkAIToken = setInterval(() => { const checkAIToken = setInterval(() => {
......
...@@ -211,11 +211,8 @@ const handleSortChange = (column, prop, order) => { ...@@ -211,11 +211,8 @@ const handleSortChange = (column, prop, order) => {
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="所属换热站:" prop="stationId"> <el-form-item label="所属换热站:" prop="stationName">
<span v-if="singleDetails.stationId=== '1'">行政区供热站</span> <span>{{ singleDetails.stationName || '-' }}</span>
<span v-else-if="singleDetails.stationId=== '2'">东部供热站</span>
<span v-else-if="singleDetails.stationId=== '3'">小王庄供热站</span>
<span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -227,9 +224,9 @@ const handleSortChange = (column, prop, order) => { ...@@ -227,9 +224,9 @@ const handleSortChange = (column, prop, order) => {
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="状态:" prop="taskState"> <el-form-item label="状态:" prop="taskState">
<span v-if="singleDetails.taskState=== '0'">执行中</span> <span v-if="singleDetails.taskState=== 0">执行中</span>
<span v-else-if="singleDetails.taskState=== '1'">成功</span> <span v-else-if="singleDetails.taskState=== 1">成功</span>
<span v-else-if="singleDetails.taskState=== '99'">失败</span> <span v-else-if="singleDetails.taskState=== 99">失败</span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
......
...@@ -213,11 +213,8 @@ const handleSortChange = (column, prop, order) => { ...@@ -213,11 +213,8 @@ const handleSortChange = (column, prop, order) => {
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="所属换热站:" prop="stationId"> <el-form-item label="所属换热站:" prop="stationName">
<span v-if="singleDetails.stationId=== '1'">行政区供热站</span> <span>{{ singleDetails.stationName || '-' }}</span>
<span v-else-if="singleDetails.stationId=== '2'">东部供热站</span>
<span v-else-if="singleDetails.stationId=== '3'">小王庄供热站</span>
<span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -229,9 +226,9 @@ const handleSortChange = (column, prop, order) => { ...@@ -229,9 +226,9 @@ const handleSortChange = (column, prop, order) => {
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="状态:" prop="taskState"> <el-form-item label="状态:" prop="taskState">
<span v-if="singleDetails.taskState=== '0'">执行中</span> <span v-if="singleDetails.taskState=== 0">执行中</span>
<span v-else-if="singleDetails.taskState=== '1'">成功</span> <span v-else-if="singleDetails.taskState=== 1">成功</span>
<span v-else-if="singleDetails.taskState=== '99'">失败</span> <span v-else-if="singleDetails.taskState=== 99">失败</span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
......
...@@ -13,6 +13,7 @@ import { ...@@ -13,6 +13,7 @@ import {
} from "../../../api/AIStation/MoveMonitor.js"; } from "../../../api/AIStation/MoveMonitor.js";
import {useRoute} from "vue-router"; import {useRoute} from "vue-router";
import {handleGetAIToken} from "../AItoken.js"; import {handleGetAIToken} from "../AItoken.js";
import ExtinguisherNewDataPage from "../ExtinguisherPage/ExtinguisherNewDataPage.vue";
const options = ref([]); const options = ref([]);
...@@ -257,6 +258,7 @@ watch( ...@@ -257,6 +258,7 @@ watch(
() => route.path, // 只监听路径变化 () => route.path, // 只监听路径变化
() => { () => {
if(route.path === '/AIStation/MoveMonitor') { if(route.path === '/AIStation/MoveMonitor') {
activeName.value = MoveMonitorNewDataPage
// 路由变化,执行相应操作 // 路由变化,执行相应操作
handleGetAIToken(); handleGetAIToken();
// 轮询检测 localStorage 是否更新 // 轮询检测 localStorage 是否更新
......
...@@ -163,11 +163,8 @@ const handleSortChange = (column, prop, order) => { ...@@ -163,11 +163,8 @@ const handleSortChange = (column, prop, order) => {
<el-form ref="form" :model="singleDetails" size="small" label-width="90px" class="my-custom-form"> <el-form ref="form" :model="singleDetails" size="small" label-width="90px" class="my-custom-form">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="换热站:" prop="stationId"> <el-form-item label="换热站:" prop="stationName">
<span v-if="singleDetails.stationId === '1'">行政区供热站</span> <span>{{ singleDetails.stationName || '-' }}</span>
<span v-else-if="singleDetails.stationId === '2'">东部供热站</span>
<span v-else-if="singleDetails.stationId === '3'">小王庄供热站</span>
<span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
......
...@@ -170,11 +170,8 @@ const handleSortChange = (column, prop, order) => { ...@@ -170,11 +170,8 @@ const handleSortChange = (column, prop, order) => {
<el-form ref="form" :model="singleDetails" size="small" label-width="90px" class="my-custom-form"> <el-form ref="form" :model="singleDetails" size="small" label-width="90px" class="my-custom-form">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="换热站:" prop="stationId"> <el-form-item label="换热站:" prop="stationName">
<span v-if="singleDetails.stationId === '1'">行政区供热站</span> <span>{{ singleDetails.stationName || '-' }}</span>
<span v-else-if="singleDetails.stationId === '2'">东部供热站</span>
<span v-else-if="singleDetails.stationId === '3'">小王庄供热站</span>
<span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
......
...@@ -14,6 +14,7 @@ import { ...@@ -14,6 +14,7 @@ import {
} from "../../../api/AIStation/PipelineTemp.js"; } from "../../../api/AIStation/PipelineTemp.js";
import {useRoute} from "vue-router"; import {useRoute} from "vue-router";
import {handleGetAIToken} from "../AItoken.js"; import {handleGetAIToken} from "../AItoken.js";
import RecyclePumpNewDataPage from "../RecyclePumpPage/RecyclePumpNewDataPage.vue";
const {proxy} = getCurrentInstance(); const {proxy} = getCurrentInstance();
...@@ -282,6 +283,7 @@ watch( ...@@ -282,6 +283,7 @@ watch(
() => route.path, // 只监听路径变化 () => route.path, // 只监听路径变化
() => { () => {
if(route.path === '/AIStation/PipelineTemp') { if(route.path === '/AIStation/PipelineTemp') {
activeName.value = PipelineTempNewDataPage
// 路由变化,执行相应操作 // 路由变化,执行相应操作
handleGetAIToken(); handleGetAIToken();
// 轮询检测 localStorage 是否更新 // 轮询检测 localStorage 是否更新
......
...@@ -182,6 +182,7 @@ watch( ...@@ -182,6 +182,7 @@ watch(
() => route.path, // 只监听路径变化 () => route.path, // 只监听路径变化
() => { () => {
if(route.path === '/AIStation/RecyclePump') { if(route.path === '/AIStation/RecyclePump') {
activeName.value = RecyclePumpNewDataPage
// 路由变化,执行相应操作 // 路由变化,执行相应操作
handleGetAIToken(); handleGetAIToken();
// 轮询检测 localStorage 是否更新 // 轮询检测 localStorage 是否更新
......
...@@ -176,17 +176,14 @@ const handleSortChange = (column, prop, order) => { ...@@ -176,17 +176,14 @@ const handleSortChange = (column, prop, order) => {
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="换热站:" prop="stationId"> <el-form-item label="换热站:" prop="stationName">
<span v-if="singleDetails.stationId === '1'">行政区供热站</span> <span>{{ singleDetails.stationName || '-' }}</span>
<span v-else-if="singleDetails.stationId === '2'">东部供热站</span>
<span v-else-if="singleDetails.stationId === '3'">小王庄供热站</span>
<span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="设备名称:" prop="relateDeviceId"> <el-form-item label="设备名称:" prop="deviceName">
<span>{{ singleDetails.relateDeviceId || '-' }}</span> <span>{{ singleDetails.deviceName || '-' }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
......
...@@ -182,17 +182,14 @@ const handleSortChange = (column, prop, order) => { ...@@ -182,17 +182,14 @@ const handleSortChange = (column, prop, order) => {
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="换热站:" prop="stationId"> <el-form-item label="换热站:" prop="stationName">
<span v-if="singleDetails.stationId === '1'">行政区供热站</span> <span>{{ singleDetails.stationName || '-' }}</span>
<span v-else-if="singleDetails.stationId === '2'">东部供热站</span>
<span v-else-if="singleDetails.stationId === '3'">小王庄供热站</span>
<span v-else>-</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="设备名称:" prop="relateDeviceId"> <el-form-item label="设备名称:" prop="deviceName">
<span>{{ singleDetails.relateDeviceId || '-' }}</span> <span>{{ singleDetails.deviceName || '-' }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -225,8 +222,8 @@ const handleSortChange = (column, prop, order) => { ...@@ -225,8 +222,8 @@ const handleSortChange = (column, prop, order) => {
<span v-else-if="singleDetails.alarmStatus=== '1'">异常</span> <span v-else-if="singleDetails.alarmStatus=== '1'">异常</span>
<span v-else>-</span> <span v-else>-</span>
</el-form-item> </el-form-item>
<el-form-item label="图片:" prop="picUrl"> <el-form-item label="图片:" prop="imageUrl">
<el-image :src="singleDetails.picUrl ? singleDetails.picUrl : analysisImage" <el-image :src="singleDetails.imageUrl ? singleDetails.imageUrl : analysisImage"
style="max-width: 80%; height: auto;"/> style="max-width: 80%; height: auto;"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
......
...@@ -291,6 +291,7 @@ watch( ...@@ -291,6 +291,7 @@ watch(
() => route.path, // 只监听路径变化 () => route.path, // 只监听路径变化
() => { () => {
if(route.path === '/AIStation/TransTemp') { if(route.path === '/AIStation/TransTemp') {
activeName.value = TransTempNewDataPage;
// 路由变化,执行相应操作 // 路由变化,执行相应操作
handleGetAIToken(); handleGetAIToken();
// 轮询检测 localStorage 是否更新 // 轮询检测 localStorage 是否更新
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment