去除多余选项例如视频监控等
This commit is contained in:
parent
2dc83215a7
commit
c19378aa37
@ -20,12 +20,12 @@
|
||||
<running-status v-if="deviceForm.deviceId" v-show="baseTabIndex === 0" ref="runningStatus"
|
||||
:device="deviceForm"></running-status>
|
||||
<!-- 设备实时监测 -->
|
||||
<device-monitor v-show="baseTabIndex == 1" ref="deviceMonitor" :show="baseTabIndex == 1"
|
||||
<!-- <device-monitor v-show="baseTabIndex == 1" ref="deviceMonitor" :show="baseTabIndex == 1"
|
||||
:device="deviceForm">
|
||||
</device-monitor>
|
||||
</device-monitor> -->
|
||||
<!-- 视频监控 -->
|
||||
<video-monitor v-show="baseTabIndex == 2" ref="videoMonitor"
|
||||
:device="deviceForm"></video-monitor>
|
||||
<!-- <video-monitor v-show="baseTabIndex == 2" ref="videoMonitor"
|
||||
:device="deviceForm"></video-monitor> -->
|
||||
<!-- 告警记录 -->
|
||||
<device-alertLog v-show="baseTabIndex == 3" ref="deviceAlertLog"
|
||||
:device="deviceForm"></device-alertLog>
|
||||
@ -239,7 +239,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 设备定时 -->
|
||||
<device-timing v-if="tabbarIndex === 1" ref="deviceTiming" :device="deviceForm"></device-timing>
|
||||
<!-- <device-timing v-if="tabbarIndex === 1" ref="deviceTiming" :device="deviceForm"></device-timing> -->
|
||||
<!-- 设备日志 -->
|
||||
<device-log v-if="tabbarIndex === 2" ref="deviceLog" :device="deviceForm"></device-log>
|
||||
<!-- 设备统计 -->
|
||||
@ -247,8 +247,9 @@
|
||||
ref="deviceStatistic"></device-statistic> -->
|
||||
<device-history v-if="tabbarIndex === 3" ref="deviceHistory" :device="deviceForm"></device-history>
|
||||
<!-- 设备组态 -->
|
||||
<device-scada v-show="tabbarIndex === 4" :show="tabbarIndex === 4" :device="deviceForm"
|
||||
ref="deviceScada"></device-scada>
|
||||
<!-- <device-scada v-show="tabbarIndex === 4" :show="tabbarIndex === 4" :device="deviceForm"
|
||||
ref="deviceScada"></device-scada> -->
|
||||
|
||||
<u-tabbar :value="tabbarIndex" @change="tabbarChange" :fixed="true" :placeholder="true"
|
||||
:safeAreaInsetBottom="true" :border="false" activeColor="#3378FE" v-if="deviceForm.deviceType !==3">
|
||||
<u-tabbar-item :text="$tt('deviceDetail.device')" @click="tabbarClick(0)">
|
||||
@ -257,12 +258,12 @@
|
||||
<image style="width:18px;height:18px;" slot="inactive-icon" src="/static/home/tabBar/device_black.png">
|
||||
</image>
|
||||
</u-tabbar-item>
|
||||
<u-tabbar-item :text="$tt('deviceDetail.timing')" @click="tabbarClick(1)">
|
||||
<!-- <u-tabbar-item :text="$tt('deviceDetail.timing')" @click="tabbarClick(1)">
|
||||
<image style="width:18px;height:18px;" slot="active-icon" src="/static/home/tabBar/time_blue.png">
|
||||
</image>
|
||||
<image style="width:18px;height:18px;" slot="inactive-icon" src="/static/home/tabBar/time_black.png">
|
||||
</image>
|
||||
</u-tabbar-item>
|
||||
</u-tabbar-item> -->
|
||||
<u-tabbar-item :text="$tt('deviceDetail.journal')" @click="tabbarClick(2)">
|
||||
<image style="width:18px;height:18px;" slot="active-icon" src="/static/home/tabBar/log_blue.png">
|
||||
</image>
|
||||
@ -276,15 +277,15 @@
|
||||
src="/static/home/tabBar/statistic_black.png">
|
||||
</image>
|
||||
</u-tabbar-item>
|
||||
<u-tabbar-item :text="$tt('deviceDetail.scada')" @click="tabbarClick(4)">
|
||||
<!-- <u-tabbar-item :text="$tt('deviceDetail.scada')" @click="tabbarClick(4)">
|
||||
<image style="width:18px;height:18px;" slot="active-icon" src="/static/home/tabBar/scada_blue.png">
|
||||
</image>
|
||||
<image style="width:18px;height:18px;" slot="inactive-icon" src="/static/home/tabBar/scada_black.png">
|
||||
</image>
|
||||
</u-tabbar-item>
|
||||
</u-tabbar-item> -->
|
||||
</u-tabbar>
|
||||
<u-modal :show="showScada" content="暂无组态,请先去网页端配置模板组态" @confirm="() => showScada = false"
|
||||
@cancel="() => showScada = false" showCancelButton></u-modal>
|
||||
<!-- <u-modal :show="showScada" content="暂无组态,请先去网页端配置模板组态" @confirm="() => showScada = false"
|
||||
@cancel="() => showScada = false" showCancelButton></u-modal> -->
|
||||
<!-- 选择直播还是回放 -->
|
||||
<u-popup :show="isSelect" :round="5" mode="bottom" :closeOnClickOverlay="true" @close="isSelect = false">
|
||||
<view class="trigger-popup-wrap">
|
||||
@ -313,14 +314,14 @@
|
||||
<script>
|
||||
import projectConfig from '@/env.config.js';
|
||||
import navbar from '@/components/navBar/index.vue';
|
||||
import videoMonitor from './video/index.vue';
|
||||
// import videoMonitor from './video/index.vue';
|
||||
import deviceAlertLog from './log/alertLog.vue';
|
||||
import runningStatus from './status/index.vue';
|
||||
import deviceLog from './log/index.vue';
|
||||
import deviceHistory from './statistic/history.vue';
|
||||
import deviceMonitor from './monitor/index.vue';
|
||||
import deviceTiming from './timing/index.vue';
|
||||
import deviceScada from './scada.vue';
|
||||
// import deviceMonitor from './monitor/index.vue';
|
||||
// import deviceTiming from './timing/index.vue';
|
||||
// import deviceScada from './scada.vue';
|
||||
import {
|
||||
listChannel
|
||||
} from '@/apis/modules/sip';
|
||||
@ -342,12 +343,12 @@
|
||||
navbar,
|
||||
runningStatus,
|
||||
deviceLog,
|
||||
deviceMonitor,
|
||||
deviceTiming,
|
||||
videoMonitor,
|
||||
// deviceMonitor,
|
||||
// deviceTiming,
|
||||
// videoMonitor,
|
||||
deviceAlertLog,
|
||||
deviceHistory,
|
||||
deviceScada
|
||||
// deviceScada
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -358,10 +359,6 @@
|
||||
tabbarIndex: 0,
|
||||
baseTabList: [{
|
||||
name: this.$tt('deviceDetail.overview')
|
||||
}, {
|
||||
name: this.$tt('deviceDetail.monitor')
|
||||
}, {
|
||||
name: this.$tt('deviceDetail.Surveillance')
|
||||
}, {
|
||||
name: this.$tt('deviceDetail.alert')
|
||||
}],
|
||||
@ -401,7 +398,7 @@
|
||||
},
|
||||
channelTotal: 0,
|
||||
channelList: [],
|
||||
showScada: false,
|
||||
// showScada: false,
|
||||
showcalendar: false, //录像时间选择弹出框
|
||||
minDate: "",
|
||||
maxDate: "",
|
||||
@ -420,14 +417,14 @@
|
||||
this.mqttUnSubscribe(this.deviceForm); // 取消订阅主题
|
||||
},
|
||||
onShow() {
|
||||
uni.$off('re-device-timing-list');
|
||||
uni.$once('re-device-timing-list', (dat) => {
|
||||
if (dat) {
|
||||
this.$refs.deviceTiming.dataList = [];
|
||||
this.$refs.deviceTiming.queryParams.pageNum = 1;
|
||||
this.$refs.deviceTiming.getList();
|
||||
}
|
||||
});
|
||||
// uni.$off('re-device-timing-list');
|
||||
// uni.$once('re-device-timing-list', (dat) => {
|
||||
// if (dat) {
|
||||
// this.$refs.deviceTiming.dataList = [];
|
||||
// this.$refs.deviceTiming.queryParams.pageNum = 1;
|
||||
// this.$refs.deviceTiming.getList();
|
||||
// }
|
||||
// });
|
||||
},
|
||||
mounted() {
|
||||
this.initCalendar();
|
||||
@ -531,19 +528,20 @@
|
||||
// 设备运行状态
|
||||
this.getDevice();
|
||||
this.$refs.runningStatus.baseStatusRefresh();
|
||||
} else if (this.baseTabIndex == 2) {
|
||||
// 设备信息
|
||||
} else if (this.baseTabIndex == 1) {
|
||||
// 告警记录
|
||||
this.getDevice();
|
||||
} else {
|
||||
uni.stopPullDownRefresh();
|
||||
}
|
||||
} else if (this.tabbarIndex == 1) {
|
||||
// 设备定时
|
||||
this.$refs.deviceTiming.deviceTimerRefresh();
|
||||
// this.$refs.deviceTiming.deviceTimerRefresh();
|
||||
uni.stopPullDownRefresh();
|
||||
} else if (this.tabbarIndex == 3) {
|
||||
// 设备统计
|
||||
this.$refs.deviceStatistic.getCacheThingsModdel();
|
||||
// this.$refs.deviceStatistic.getCacheThingsModdel();
|
||||
uni.stopPullDownRefresh();
|
||||
} else {
|
||||
uni.stopPullDownRefresh();
|
||||
}
|
||||
@ -640,7 +638,8 @@
|
||||
// console.log('存在下划线', data.thingsModels[i].id);
|
||||
//判断存在下划线的个数为1
|
||||
const thingsModelId = data.thingsModels[i].id.split('_');
|
||||
const thingsModelName = data.thingsModels[i].name?.includes('array_') ? data.thingsModels[i].name
|
||||
const thingsModelName = data.thingsModels[i].name?.includes('array_') ? data.thingsModels[i]
|
||||
.name
|
||||
?.split('_') : [data.thingsModels[i].name];
|
||||
if (thingsModelId.length >= 2 && thingsModelId[0] !== 'array' && thingsModelName.length >= 2) {
|
||||
//找到一个对象
|
||||
|
Loading…
x
Reference in New Issue
Block a user