|
|
@@ -1,18 +1,35 @@
|
|
|
<template>
|
|
|
<view class="page-wrap">
|
|
|
<!-- 建议放在外层 -->
|
|
|
- <u-navbar :title="name" @leftClick="backPage" bgColor="transparent" :bgImage="backPic" :bgStatusImage="backPic0"
|
|
|
- :safeAreaInsetTop="true" titleStyle="fw600 fs-18" height="50px" leftIconColor="#303133">
|
|
|
+ <u-navbar
|
|
|
+ :title="name"
|
|
|
+ @leftClick="backPage"
|
|
|
+ bgColor="transparent"
|
|
|
+ :bgImage="backPic"
|
|
|
+ :bgStatusImage="backPic0"
|
|
|
+ :safeAreaInsetTop="true"
|
|
|
+ titleStyle="fw600 fs-18"
|
|
|
+ height="50px"
|
|
|
+ leftIconColor="#303133"
|
|
|
+ >
|
|
|
<view class="u-nav-slot" slot="left">
|
|
|
<u-icon name="arrow-left" size="20" color="#303133"> </u-icon>
|
|
|
</view>
|
|
|
</u-navbar>
|
|
|
<!-- 实时 / 历史 切换(仅样式分区,历史沿用空态提示) -->
|
|
|
<view class="detail-tabs">
|
|
|
- <view class="detail-tab" :class="{ active: detailTab === 0 }" @tap="detailTab = 0">
|
|
|
+ <view
|
|
|
+ class="detail-tab"
|
|
|
+ :class="{ active: detailTab === 0 }"
|
|
|
+ @tap="detailTab = 0"
|
|
|
+ >
|
|
|
<text>实时数据</text>
|
|
|
</view>
|
|
|
- <view class="detail-tab" :class="{ active: detailTab === 1 }" @tap="detailTab = 1">
|
|
|
+ <view
|
|
|
+ class="detail-tab"
|
|
|
+ :class="{ active: detailTab === 1 }"
|
|
|
+ @tap="detailTab = 1"
|
|
|
+ >
|
|
|
<text>历史数据</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -22,386 +39,302 @@
|
|
|
<!-- 控制按钮 -->
|
|
|
<view class="flcard control-card" v-if="TabCur == 'gate'">
|
|
|
<view class="btn-row">
|
|
|
- <view class="ctrl-btn" @click="showPasswordDialog('frontGateOpen_S')">打开前门</view>
|
|
|
- <view class="ctrl-btn" @click="showPasswordDialog('frontGateClose_S')">关闭前门</view>
|
|
|
- <view class="ctrl-btn" @click="showPasswordDialog('rearGateOpen_S')">打开后门</view>
|
|
|
- <view class="ctrl-btn" @click="showPasswordDialog('rearGateClose_S')">关闭后门</view>
|
|
|
+ <view
|
|
|
+ class="ctrl-btn"
|
|
|
+ @click="showPasswordDialog('frontGateOpen_S')"
|
|
|
+ >打开前门</view
|
|
|
+ >
|
|
|
+ <view
|
|
|
+ class="ctrl-btn"
|
|
|
+ @click="showPasswordDialog('frontGateClose_S')"
|
|
|
+ >关闭前门</view
|
|
|
+ >
|
|
|
+ <view
|
|
|
+ class="ctrl-btn"
|
|
|
+ @click="showPasswordDialog('rearGateOpen_S')"
|
|
|
+ >打开后门</view
|
|
|
+ >
|
|
|
+ <view
|
|
|
+ class="ctrl-btn"
|
|
|
+ @click="showPasswordDialog('rearGateClose_S')"
|
|
|
+ >关闭后门</view
|
|
|
+ >
|
|
|
</view>
|
|
|
<view class="btn-row btn-row-second">
|
|
|
- <view class="ctrl-btn ctrl-btn-wide" @click="showPasswordDialog('sameTimeOpen')">打开前后门</view>
|
|
|
- <view class="ctrl-btn ctrl-btn-wide" @click="showPasswordDialog('sameTimeClose')">关闭前后门</view>
|
|
|
+ <view
|
|
|
+ class="ctrl-btn ctrl-btn-wide"
|
|
|
+ @click="showPasswordDialog('sameTimeOpen')"
|
|
|
+ >打开前后门</view
|
|
|
+ >
|
|
|
+ <view
|
|
|
+ class="ctrl-btn ctrl-btn-wide"
|
|
|
+ @click="showPasswordDialog('sameTimeClose')"
|
|
|
+ >关闭前后门</view
|
|
|
+ >
|
|
|
<view class="mode-group">
|
|
|
<text class="mode-label">控制模式:</text>
|
|
|
<view class="mode-item" @tap="controlMode = 'local'">
|
|
|
- <view class="radio" :class="{ checked: controlMode === 'local' }"></view>
|
|
|
+ <view
|
|
|
+ class="radio"
|
|
|
+ :class="{ checked: controlMode === 'local' }"
|
|
|
+ ></view>
|
|
|
<text>就地</text>
|
|
|
</view>
|
|
|
<view class="mode-item" @tap="controlMode = 'remote'">
|
|
|
- <view class="radio" :class="{ checked: controlMode === 'remote' }"></view>
|
|
|
+ <view
|
|
|
+ class="radio"
|
|
|
+ :class="{ checked: controlMode === 'remote' }"
|
|
|
+ ></view>
|
|
|
<text>远程</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="flcard control-card" v-if="TabCur == 'window' && nwindownum == 1">
|
|
|
+ <view
|
|
|
+ class="flcard control-card"
|
|
|
+ v-if="TabCur == 'window' && nwindownum == 1"
|
|
|
+ >
|
|
|
<view class="btn-row">
|
|
|
- <view class="ctrl-btn ctrl-btn-wide" @click="showPasswordDialog('frontSetValue')">设定面积</view>
|
|
|
+ <view
|
|
|
+ class="ctrl-btn ctrl-btn-wide"
|
|
|
+ @click="showPasswordDialog('frontSetValue')"
|
|
|
+ >设定面积</view
|
|
|
+ >
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="flcard control-card" v-if="TabCur == 'window' && nwindownum == 2">
|
|
|
+ <view
|
|
|
+ class="flcard control-card"
|
|
|
+ v-if="TabCur == 'window' && nwindownum == 2"
|
|
|
+ >
|
|
|
<view class="btn-row">
|
|
|
- <view class="ctrl-btn ctrl-btn-wide" @click="showPasswordDialog('frontSetValue')">设定前窗面积</view>
|
|
|
- <view class="ctrl-btn ctrl-btn-wide" @click="showPasswordDialog('rearSetValue')">设定后窗面积</view>
|
|
|
+ <view
|
|
|
+ class="ctrl-btn ctrl-btn-wide"
|
|
|
+ @click="showPasswordDialog('frontSetValue')"
|
|
|
+ >设定前窗面积</view
|
|
|
+ >
|
|
|
+ <view
|
|
|
+ class="ctrl-btn ctrl-btn-wide"
|
|
|
+ @click="showPasswordDialog('rearSetValue')"
|
|
|
+ >设定后窗面积</view
|
|
|
+ >
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<view class="flcard deviceback" v-if="TabCur == 'gate'">
|
|
|
- <doorAnimate :gatestate1="frontGateStatus" :gatestate2="midGateStatus" :gatestate3="rearGateStatus"
|
|
|
- :height="height" :doorcount="ndoorcount">
|
|
|
+ <doorAnimate
|
|
|
+ :gatestate1="frontGateStatus"
|
|
|
+ :gatestate2="midGateStatus"
|
|
|
+ :gatestate3="rearGateStatus"
|
|
|
+ :height="height"
|
|
|
+ :doorcount="ndoorcount"
|
|
|
+ >
|
|
|
</doorAnimate>
|
|
|
</view>
|
|
|
<view class="flcard deviceback" v-if="TabCur == 'windrect'">
|
|
|
- <windrectAnimate :state="state" :title="title" :height="height" :type="deviceType">
|
|
|
+ <windrectAnimate
|
|
|
+ :state="state"
|
|
|
+ :title="title"
|
|
|
+ :height="height"
|
|
|
+ :type="deviceType"
|
|
|
+ >
|
|
|
</windrectAnimate>
|
|
|
</view>
|
|
|
<view class="flcard deviceback" v-if="TabCur == 'fanlocal'">
|
|
|
- <fanlocalAnimate :fan1State="fan1State" :fan2State="fan2State" :title="title" :height="height">
|
|
|
+ <fanlocalAnimate
|
|
|
+ :fan1State="fan1State"
|
|
|
+ :fan2State="fan2State"
|
|
|
+ :title="title"
|
|
|
+ :height="height"
|
|
|
+ >
|
|
|
</fanlocalAnimate>
|
|
|
</view>
|
|
|
<view class="flcard deviceback" v-if="TabCur == 'fanmain'">
|
|
|
- <fanmainAnimate ref="fanpage" style="width: 100%" :door1="door1" :topdoor1="topdoor1" :fundoor1="fundoor1"
|
|
|
- :door2="door2" :topdoor2="topdoor2" :fundoor2="fundoor2" :nowfengji="qidongfengji"></fanmainAnimate>
|
|
|
+ <fanmainAnimate
|
|
|
+ ref="fanpage"
|
|
|
+ style="width: 100%"
|
|
|
+ :door1="door1"
|
|
|
+ :topdoor1="topdoor1"
|
|
|
+ :fundoor1="fundoor1"
|
|
|
+ :door2="door2"
|
|
|
+ :topdoor2="topdoor2"
|
|
|
+ :fundoor2="fundoor2"
|
|
|
+ :nowfengji="qidongfengji"
|
|
|
+ ></fanmainAnimate>
|
|
|
</view>
|
|
|
<view class="flcard deviceback" v-if="TabCur == 'window'">
|
|
|
- <windowAnimate :windowAngle="windowAngle" :windowAngle1="windowAngle1" :height="height"
|
|
|
- :windowcount="nwindownum"></windowAnimate>
|
|
|
+ <windowAnimate
|
|
|
+ :windowAngle="windowAngle"
|
|
|
+ :windowAngle1="windowAngle1"
|
|
|
+ :height="height"
|
|
|
+ :windowcount="nwindownum"
|
|
|
+ ></windowAnimate>
|
|
|
</view>
|
|
|
<view v-if="cameraList.length > 0">
|
|
|
- <view class="flcard deviceback" v-for="(item, index) in cameraList" :key="index">
|
|
|
- <yingbing-video v-if="item.devicekind == 'flv'" style="width: 100%; height: 250px" :src="item.addr"
|
|
|
- autoplay muted></yingbing-video>
|
|
|
- <video v-else style="width: 100%; height: 250px" id="myVideo" controls show-loading autoplay
|
|
|
- class="r-video" :vslide-gesture="true" :vslide-gesture-in-fullscreen="true" :src="item.addr"></video>
|
|
|
+ <view
|
|
|
+ class="flcard deviceback"
|
|
|
+ v-for="(item, index) in cameraList"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ <yingbing-video
|
|
|
+ v-if="item.devicekind == 'flv'"
|
|
|
+ style="width: 100%; height: 250px"
|
|
|
+ :src="item.addr"
|
|
|
+ autoplay
|
|
|
+ muted
|
|
|
+ ></yingbing-video>
|
|
|
+ <video
|
|
|
+ v-else
|
|
|
+ style="width: 100%; height: 250px"
|
|
|
+ id="myVideo"
|
|
|
+ controls
|
|
|
+ show-loading
|
|
|
+ autoplay
|
|
|
+ class="r-video"
|
|
|
+ :vslide-gesture="true"
|
|
|
+ :vslide-gesture-in-fullscreen="true"
|
|
|
+ :src="item.addr"
|
|
|
+ ></video>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="flcard data-card-wrap">
|
|
|
- <view class="flex-container data-grid" v-if="TabCur != 'fanlocal' && TabCur != 'fanmain'">
|
|
|
- <view class="datacard" v-for="(item, index) in deviceShowList" :key="index" v-show="item.appShow == 1 &&
|
|
|
- item.monitorcode != 'strinstallpos' &&
|
|
|
- item.monitorcode != 'netStatus' &&
|
|
|
- item.monitorcode != 'warnFlag' &&
|
|
|
- item.monitorcode != ''
|
|
|
- ">
|
|
|
+ <view
|
|
|
+ class="flex-container data-grid"
|
|
|
+ v-if="TabCur != 'fanlocal' && TabCur != 'fanmain'"
|
|
|
+ >
|
|
|
+ <view
|
|
|
+ class="datacard"
|
|
|
+ v-for="(item, index) in deviceShowList"
|
|
|
+ :key="index"
|
|
|
+ v-show="
|
|
|
+ item.appShow == 1 &&
|
|
|
+ item.monitorcode != 'strinstallpos' &&
|
|
|
+ item.monitorcode != 'netStatus' &&
|
|
|
+ item.monitorcode != 'warnFlag' &&
|
|
|
+ item.monitorcode != ''
|
|
|
+ "
|
|
|
+ >
|
|
|
<view class="data-icon">
|
|
|
- <u-icon :name="getFieldIcon(item.monitorcode)" color="#ffffff" size="14"></u-icon>
|
|
|
+ <u-icon
|
|
|
+ :name="getFieldIcon(item.monitorcode)"
|
|
|
+ color="#ffffff"
|
|
|
+ size="14"
|
|
|
+ ></u-icon>
|
|
|
</view>
|
|
|
<view class="data-text">
|
|
|
- <text class="data-value" :class="{ 'data-value-error': isErrorValue(item) }">{{ getMonitorValue(item)
|
|
|
- }}</text>
|
|
|
+ <text
|
|
|
+ class="data-value"
|
|
|
+ :class="{ 'data-value-error': isErrorValue(item) }"
|
|
|
+ >{{ getMonitorValue(item) }}</text
|
|
|
+ >
|
|
|
+ <text class="data-label">{{ item.des }}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view
|
|
|
+ class="flex-container data-grid"
|
|
|
+ v-else-if="TabCur == 'fanmain' || TabCur == 'fanlocal'"
|
|
|
+ >
|
|
|
+ <view class="fan-group-title">主机</view>
|
|
|
+ <view
|
|
|
+ class="datacard"
|
|
|
+ v-for="(item, index) in deviceShowList1"
|
|
|
+ :key="'host-' + index"
|
|
|
+ v-show="item.appShow == 1"
|
|
|
+ >
|
|
|
+ <view class="data-icon">
|
|
|
+ <u-icon
|
|
|
+ :name="getFieldIcon(item.monitorcode)"
|
|
|
+ color="#ffffff"
|
|
|
+ size="14"
|
|
|
+ ></u-icon>
|
|
|
+ </view>
|
|
|
+ <view class="data-text">
|
|
|
+ <text
|
|
|
+ class="data-value"
|
|
|
+ :class="{ 'data-value-error': isFanMonitorError(item, 1) }"
|
|
|
+ >{{ getFanMonitorValue(item, 1) }}</text
|
|
|
+ >
|
|
|
+ <text class="data-label">{{ item.des }}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="fan-group-title">备机</view>
|
|
|
+ <view
|
|
|
+ class="datacard"
|
|
|
+ v-for="(item, index) in deviceShowList1"
|
|
|
+ :key="'backup-' + index"
|
|
|
+ v-show="item.appShow == 1"
|
|
|
+ >
|
|
|
+ <view class="data-icon">
|
|
|
+ <u-icon
|
|
|
+ :name="getFieldIcon(item.monitorcode)"
|
|
|
+ color="#ffffff"
|
|
|
+ size="14"
|
|
|
+ ></u-icon>
|
|
|
+ </view>
|
|
|
+ <view class="data-text">
|
|
|
+ <text
|
|
|
+ class="data-value"
|
|
|
+ :class="{ 'data-value-error': isFanMonitorError(item, 2) }"
|
|
|
+ >{{ getFanMonitorValue(item, 2) }}</text
|
|
|
+ >
|
|
|
<text class="data-label">{{ item.des }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <div class="flex-container" v-else-if="TabCur == 'fanmain'">
|
|
|
- <div class="monitor-content">
|
|
|
- <div class="zhuji">
|
|
|
- <div>主机</div>
|
|
|
- <div class="itemback" v-for="(item, index) in deviceShowList1" :key="index"
|
|
|
- v-show="item.appShow == 1">
|
|
|
- <div class="datacardtime" v-if="item.monitorcode == 'readTime' && item.datatype == 1">
|
|
|
- <view class="demo-layout bg-purple-light" style="padding: 20rpx; color: #3787fe">
|
|
|
- {{ readTime }}
|
|
|
- </view>
|
|
|
- </div>
|
|
|
- <div class="datacard" v-if="item.monitorcode !== 'readTime'">
|
|
|
- <div class="TabCurCSS">
|
|
|
- <view v-if="
|
|
|
- item.monitorcode == 'netStatus' && item.datatype == 1
|
|
|
- " class="demo-layout bg-purple-light" style="margin-top: 60rpx; color: #3787fe">
|
|
|
- {{ doorNetStatus == "1" ? "正常" : "异常" }}
|
|
|
- </view>
|
|
|
- <view v-else-if="item.datatype == 1" class="demo-layout bg-purple-light"
|
|
|
- style="margin-top: 60rpx; color: #3787fe">
|
|
|
- {{
|
|
|
- tableData[
|
|
|
- item.monitorcode.startsWith("Fan")
|
|
|
- ? item.monitorcode.replace(/^Fan/, "Fan1")
|
|
|
- : item.monitorcode
|
|
|
- ] !== undefined &&
|
|
|
- tableData[
|
|
|
- item.monitorcode.startsWith("Fan")
|
|
|
- ? item.monitorcode.replace(/^Fan/, "Fan1")
|
|
|
- : item.monitorcode
|
|
|
- ] !== null
|
|
|
- ? tableData[
|
|
|
- item.monitorcode.startsWith("Fan")
|
|
|
- ? item.monitorcode.replace(/^Fan/, "Fan1")
|
|
|
- : item.monitorcode
|
|
|
- ]
|
|
|
- : "-"
|
|
|
- }}
|
|
|
- </view>
|
|
|
- <view v-else-if="item.datatype == 2" class="demo-layout bg-purple-light"
|
|
|
- style="margin-top: 60rpx; color: #3787fe">
|
|
|
- {{
|
|
|
- tableData[
|
|
|
- item.monitorcode.startsWith("Fan")
|
|
|
- ? item.monitorcode.replace(/^Fan/, "Fan1")
|
|
|
- : item.monitorcode
|
|
|
- ] !== undefined &&
|
|
|
- tableData[
|
|
|
- item.monitorcode.startsWith("Fan")
|
|
|
- ? item.monitorcode.replace(/^Fan/, "Fan1")
|
|
|
- : item.monitorcode
|
|
|
- ] !== null
|
|
|
- ? tableData[
|
|
|
- item.monitorcode.startsWith("Fan")
|
|
|
- ? item.monitorcode.replace(/^Fan/, "Fan1")
|
|
|
- : item.monitorcode
|
|
|
- ]
|
|
|
- : "-"
|
|
|
- }}
|
|
|
- </view>
|
|
|
- <div class="spacer"></div>
|
|
|
- <!-- 间距 -->
|
|
|
- <view class="demo-layout bg-purple-light" style="color: #677799">
|
|
|
- {{ item.des }}
|
|
|
- </view>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="beiji">
|
|
|
- <div>备机</div>
|
|
|
- <div class="itemback" v-for="(item, index) in deviceShowList1" :key="index"
|
|
|
- v-show="item.appShow == 1">
|
|
|
- <div class="datacardtime" v-if="item.monitorcode == 'readTime' && item.datatype == 1">
|
|
|
- <view class="demo-layout bg-purple-light" style="padding: 20rpx; color: #3787fe">
|
|
|
- {{ readTime }}
|
|
|
- </view>
|
|
|
- </div>
|
|
|
- <div class="datacard" v-if="item.monitorcode !== 'readTime'">
|
|
|
- <div class="TabCurCSS">
|
|
|
- <view v-if="
|
|
|
- item.monitorcode == 'netStatus' && item.datatype == 1
|
|
|
- " class="demo-layout bg-purple-light" style="margin-top: 60rpx; color: #3787fe">
|
|
|
- {{ doorNetStatus == "1" ? "正常" : "异常" }}
|
|
|
- </view>
|
|
|
- <view v-else-if="item.datatype == 1" class="demo-layout bg-purple-light"
|
|
|
- style="margin-top: 60rpx; color: #3787fe">
|
|
|
- {{
|
|
|
- tableData[
|
|
|
- item.monitorcode.startsWith("Fan")
|
|
|
- ? item.monitorcode.replace(/^Fan/, "Fan2")
|
|
|
- : item.monitorcode
|
|
|
- ] !== undefined &&
|
|
|
- tableData[
|
|
|
- item.monitorcode.startsWith("Fan")
|
|
|
- ? item.monitorcode.replace(/^Fan/, "Fan2")
|
|
|
- : item.monitorcode
|
|
|
- ] !== null
|
|
|
- ? tableData[
|
|
|
- item.monitorcode.startsWith("Fan")
|
|
|
- ? item.monitorcode.replace(/^Fan/, "Fan2")
|
|
|
- : item.monitorcode
|
|
|
- ]
|
|
|
- : "-"
|
|
|
- }}
|
|
|
- </view>
|
|
|
- <view v-else-if="item.datatype == 2" class="demo-layout bg-purple-light"
|
|
|
- style="margin-top: 60rpx; color: #3787fe">
|
|
|
- {{
|
|
|
- tableData[
|
|
|
- item.monitorcode.startsWith("Fan")
|
|
|
- ? item.monitorcode.replace(/^Fan/, "Fan2")
|
|
|
- : item.monitorcode
|
|
|
- ] !== undefined &&
|
|
|
- tableData[
|
|
|
- item.monitorcode.startsWith("Fan")
|
|
|
- ? item.monitorcode.replace(/^Fan/, "Fan2")
|
|
|
- : item.monitorcode
|
|
|
- ] !== null
|
|
|
- ? tableData[
|
|
|
- item.monitorcode.startsWith("Fan")
|
|
|
- ? item.monitorcode.replace(/^Fan/, "Fan2")
|
|
|
- : item.monitorcode
|
|
|
- ]
|
|
|
- : "-"
|
|
|
- }}
|
|
|
- </view>
|
|
|
- <div class="spacer"></div>
|
|
|
- <!-- 间距 -->
|
|
|
- <view class="demo-layout bg-purple-light" style="color: #677799">
|
|
|
- {{ item.des }}
|
|
|
- </view>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="flex-container" v-else-if="TabCur == 'fanlocal'">
|
|
|
- <div class="monitor-content">
|
|
|
- <div class="zhuji">
|
|
|
- <div>主机</div>
|
|
|
- <div class="itemback" v-for="(item, index) in deviceShowList1" :key="index"
|
|
|
- v-show="item.appShow == 1">
|
|
|
- <div class="datacardtime" v-if="item.monitorcode == 'readTime' && item.datatype == 1">
|
|
|
- <view class="demo-layout bg-purple-light" style="padding: 20rpx; color: #3787fe">
|
|
|
- {{ readTime }}
|
|
|
- </view>
|
|
|
- </div>
|
|
|
- <div class="datacard" v-if="item.monitorcode !== 'readTime'">
|
|
|
- <div class="TabCurCSS">
|
|
|
- <view v-if="
|
|
|
- item.monitorcode == 'netStatus' && item.datatype == 1
|
|
|
- " class="demo-layout bg-purple-light" style="margin-top: 60rpx; color: #3787fe">
|
|
|
- {{ doorNetStatus == "1" ? "正常" : "异常" }}
|
|
|
- </view>
|
|
|
- <view v-else-if="item.datatype == 1" class="demo-layout bg-purple-light"
|
|
|
- style="margin-top: 60rpx; color: #3787fe">
|
|
|
- {{
|
|
|
- tableData[
|
|
|
- item.monitorcode.startsWith("Fan")
|
|
|
- ? item.monitorcode.replace(/^Fan/, "Fan1")
|
|
|
- : item.monitorcode
|
|
|
- ] !== undefined &&
|
|
|
- tableData[
|
|
|
- item.monitorcode.startsWith("Fan")
|
|
|
- ? item.monitorcode.replace(/^Fan/, "Fan1")
|
|
|
- : item.monitorcode
|
|
|
- ] !== null
|
|
|
- ? tableData[
|
|
|
- item.monitorcode.startsWith("Fan")
|
|
|
- ? item.monitorcode.replace(/^Fan/, "Fan1")
|
|
|
- : item.monitorcode
|
|
|
- ]
|
|
|
- : "-"
|
|
|
- }}
|
|
|
- </view>
|
|
|
- <view v-else-if="item.datatype == 2" class="demo-layout bg-purple-light"
|
|
|
- style="margin-top: 60rpx; color: #3787fe">
|
|
|
- {{
|
|
|
- tableData[
|
|
|
- item.monitorcode.startsWith("Fan")
|
|
|
- ? item.monitorcode.replace(/^Fan/, "Fan1")
|
|
|
- : item.monitorcode
|
|
|
- ] !== undefined &&
|
|
|
- tableData[
|
|
|
- item.monitorcode.startsWith("Fan")
|
|
|
- ? item.monitorcode.replace(/^Fan/, "Fan1")
|
|
|
- : item.monitorcode
|
|
|
- ] !== null
|
|
|
- ? tableData[
|
|
|
- item.monitorcode.startsWith("Fan")
|
|
|
- ? item.monitorcode.replace(/^Fan/, "Fan1")
|
|
|
- : item.monitorcode
|
|
|
- ]
|
|
|
- : "-"
|
|
|
- }}
|
|
|
- </view>
|
|
|
- <div class="spacer"></div>
|
|
|
- <!-- 间距 -->
|
|
|
- <view class="demo-layout bg-purple-light" style="color: #677799">
|
|
|
- {{ item.des }}
|
|
|
- </view>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="beiji">
|
|
|
- <div>备机</div>
|
|
|
- <div class="itemback" v-for="(item, index) in deviceShowList1" :key="index"
|
|
|
- v-show="item.appShow == 1">
|
|
|
- <div class="datacardtime" v-if="item.monitorcode == 'readTime' && item.datatype == 1">
|
|
|
- <view class="demo-layout bg-purple-light" style="padding: 20rpx; color: #3787fe">
|
|
|
- {{ readTime }}
|
|
|
- </view>
|
|
|
- </div>
|
|
|
- <div class="datacard" v-if="item.monitorcode !== 'readTime'">
|
|
|
- <div class="TabCurCSS">
|
|
|
- <view v-if="
|
|
|
- item.monitorcode == 'netStatus' && item.datatype == 1
|
|
|
- " class="demo-layout bg-purple-light" style="margin-top: 60rpx; color: #3787fe">
|
|
|
- {{ doorNetStatus == "1" ? "正常" : "异常" }}
|
|
|
- </view>
|
|
|
- <view v-else-if="item.datatype == 1" class="demo-layout bg-purple-light"
|
|
|
- style="margin-top: 60rpx; color: #3787fe">
|
|
|
- {{
|
|
|
- tableData[
|
|
|
- item.monitorcode.startsWith("Fan")
|
|
|
- ? item.monitorcode.replace(/^Fan/, "Fan2")
|
|
|
- : item.monitorcode
|
|
|
- ] !== undefined &&
|
|
|
- tableData[
|
|
|
- item.monitorcode.startsWith("Fan")
|
|
|
- ? item.monitorcode.replace(/^Fan/, "Fan2")
|
|
|
- : item.monitorcode
|
|
|
- ] !== null
|
|
|
- ? tableData[
|
|
|
- item.monitorcode.startsWith("Fan")
|
|
|
- ? item.monitorcode.replace(/^Fan/, "Fan2")
|
|
|
- : item.monitorcode
|
|
|
- ]
|
|
|
- : "-"
|
|
|
- }}
|
|
|
- </view>
|
|
|
- <view v-else-if="item.datatype == 2" class="demo-layout bg-purple-light"
|
|
|
- style="margin-top: 60rpx; color: #3787fe">
|
|
|
- {{
|
|
|
- tableData[
|
|
|
- item.monitorcode.startsWith("Fan")
|
|
|
- ? item.monitorcode.replace(/^Fan/, "Fan2")
|
|
|
- : item.monitorcode
|
|
|
- ] !== undefined &&
|
|
|
- tableData[
|
|
|
- item.monitorcode.startsWith("Fan")
|
|
|
- ? item.monitorcode.replace(/^Fan/, "Fan2")
|
|
|
- : item.monitorcode
|
|
|
- ] !== null
|
|
|
- ? tableData[
|
|
|
- item.monitorcode.startsWith("Fan")
|
|
|
- ? item.monitorcode.replace(/^Fan/, "Fan2")
|
|
|
- : item.monitorcode
|
|
|
- ]
|
|
|
- : "-"
|
|
|
- }}
|
|
|
- </view>
|
|
|
- <div class="spacer"></div>
|
|
|
- <!-- 间距 -->
|
|
|
- <view class="demo-layout bg-purple-light" style="color: #677799">
|
|
|
- {{ item.des }}
|
|
|
- </view>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <!-- 历史数据占位:跳转回设备页历史 Tab 由上层承接,此处仅做界面分区 -->
|
|
|
- <view v-show="detailTab === 1" class="history-placeholder flcard">
|
|
|
- <history :key="1" cur="history" :showColum="showColum" :deviceType="deviceTypeHis"></history>
|
|
|
+ <!-- 历史数据 -->
|
|
|
+ <view v-show="detailTab === 1">
|
|
|
+ <history
|
|
|
+ :key="1"
|
|
|
+ cur="history"
|
|
|
+ :showColum="showColum"
|
|
|
+ :deviceType="deviceTypeHis"
|
|
|
+ ></history>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<u-popup :show="show" mode="bottom" :safeAreaInsetBottom="false">
|
|
|
<div class="containers">
|
|
|
<view class="passWordName">
|
|
|
- <view class="title" style="margin-top: 15px" v-if="this.TabCur == 'window'">风窗面积</view>
|
|
|
- <u-input class="passArea" style="margin-top: 15px; border-color: #2a94ff" v-model="windowArea" type="text"
|
|
|
- v-if="this.TabCur == 'window'"></u-input>
|
|
|
+ <view
|
|
|
+ class="title"
|
|
|
+ style="margin-top: 15px"
|
|
|
+ v-if="this.TabCur == 'window'"
|
|
|
+ >风窗面积</view
|
|
|
+ >
|
|
|
+ <u-input
|
|
|
+ class="passArea"
|
|
|
+ style="margin-top: 15px; border-color: #2a94ff"
|
|
|
+ v-model="windowArea"
|
|
|
+ type="text"
|
|
|
+ v-if="this.TabCur == 'window'"
|
|
|
+ ></u-input>
|
|
|
</view>
|
|
|
<view class="passWordInput">
|
|
|
<view style="margin-top: 15px" class="title">输入密码</view>
|
|
|
- <u-input style="margin-top: 15px; border-color: #2a94ff" v-model="password" type="password"></u-input>
|
|
|
+ <u-input
|
|
|
+ style="margin-top: 15px; border-color: #2a94ff"
|
|
|
+ v-model="password"
|
|
|
+ type="password"
|
|
|
+ ></u-input>
|
|
|
</view>
|
|
|
</div>
|
|
|
<view class="btns">
|
|
|
- <u-button style="margin: 20px" type="primary" @click="confirmPassword()"
|
|
|
- color="linear-gradient(to right, rgb(53, 138, 254), rgb(38, 171, 244))">确认</u-button>
|
|
|
- <u-button style="margin: 20px" type="primary" :plain="true" @click="cancelPassword()">取消</u-button>
|
|
|
+ <u-button
|
|
|
+ style="margin: 20px"
|
|
|
+ type="primary"
|
|
|
+ @click="confirmPassword()"
|
|
|
+ color="linear-gradient(to right, rgb(53, 138, 254), rgb(38, 171, 244))"
|
|
|
+ >确认</u-button
|
|
|
+ >
|
|
|
+ <u-button
|
|
|
+ style="margin: 20px"
|
|
|
+ type="primary"
|
|
|
+ :plain="true"
|
|
|
+ @click="cancelPassword()"
|
|
|
+ >取消</u-button
|
|
|
+ >
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
</view>
|
|
|
@@ -472,7 +405,7 @@ export default {
|
|
|
fundoor2: 0, //蝶阀2# 1打开 0 关闭
|
|
|
detailTab: 0, // 0实时 1历史
|
|
|
controlMode: "local", // 控制模式展示:就地/远程
|
|
|
- deviceTypeHis:'', //历史数据设备类型
|
|
|
+ deviceTypeHis: "", //历史数据设备类型
|
|
|
};
|
|
|
},
|
|
|
onLoad(query) {
|
|
|
@@ -511,12 +444,12 @@ export default {
|
|
|
},
|
|
|
// 返回上一个页面
|
|
|
backPage() {
|
|
|
- this.$destroy();
|
|
|
+ this.stopTimer();
|
|
|
uni.navigateBack({
|
|
|
delta: 1,
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
getShowColum() {
|
|
|
new Promise((resolve, reject) => {
|
|
|
api
|
|
|
@@ -612,7 +545,10 @@ export default {
|
|
|
this.nwindownum = result.nwindownum;
|
|
|
this.ndoorcount = result.ndoorcount;
|
|
|
this.deviceType = result.deviceType;
|
|
|
- this.deviceTypeHis = result.deviceType.substring(0,result.deviceType.indexOf('_')) //历史数据设备类型
|
|
|
+ this.deviceTypeHis = result.deviceType.substring(
|
|
|
+ 0,
|
|
|
+ result.deviceType.indexOf("_")
|
|
|
+ ); //历史数据设备类型
|
|
|
this.state = result.readData.sign;
|
|
|
this.frontGateStatus = this.tableData.frontGateOpen;
|
|
|
this.midGateStatus = this.tableData.midGateOpen;
|
|
|
@@ -622,7 +558,7 @@ export default {
|
|
|
this.readTime = result.readTime;
|
|
|
this.qidongfengji =
|
|
|
result.readData.Fan1MOT2_RunningStatus1 == "1" ||
|
|
|
- result.readData.Fan1StartStatus == "1"
|
|
|
+ result.readData.Fan1StartStatus == "1"
|
|
|
? "1"
|
|
|
: "2";
|
|
|
if (this.qidongfengji == "1") {
|
|
|
@@ -765,14 +701,79 @@ export default {
|
|
|
if (item.monitorcode == "readTime") {
|
|
|
return this.readTime || this.tableData.readTime || "-";
|
|
|
}
|
|
|
- const val = this.tableData[item.monitorcode];
|
|
|
- if (val !== undefined && val !== null && val !== "") return val;
|
|
|
+ const raw = this.tableData[item.monitorcode];
|
|
|
+ const statusText = this.getStatusText(item.monitorcode, item.des, raw);
|
|
|
+ if (statusText !== null) return statusText;
|
|
|
+ if (raw !== undefined && raw !== null && raw !== "") return raw;
|
|
|
return "-";
|
|
|
},
|
|
|
+ // 是否为报警/故障等状态类字段
|
|
|
+ isStatusField(code, des) {
|
|
|
+ const key = String(code || "").toLowerCase();
|
|
|
+ const label = String(des || "");
|
|
|
+ return (
|
|
|
+ key.indexOf("warn") > -1 ||
|
|
|
+ key.indexOf("fault") > -1 ||
|
|
|
+ key.indexOf("alarm") > -1 ||
|
|
|
+ key.indexOf("err") > -1 ||
|
|
|
+ label.indexOf("报警") > -1 ||
|
|
|
+ label.indexOf("故障") > -1
|
|
|
+ );
|
|
|
+ },
|
|
|
+ // 报警/故障等状态类字段值转中文(0-正常 1-报警/故障 2-断开)
|
|
|
+ getStatusText(code, des, val) {
|
|
|
+ if (!this.isStatusField(code, des)) return null;
|
|
|
+ const key = String(code || "").toLowerCase();
|
|
|
+ const label = String(des || "");
|
|
|
+ const isFault =
|
|
|
+ key.indexOf("fault") > -1 ||
|
|
|
+ key.indexOf("err") > -1 ||
|
|
|
+ label.indexOf("故障") > -1;
|
|
|
+ const text = val === undefined || val === null ? "" : String(val);
|
|
|
+ if (text === "" || text === "-") return "未监测";
|
|
|
+ if (text == "0" || text.indexOf("正常") > -1) return "正常";
|
|
|
+ if (text == "2" || text.indexOf("断开") > -1) return "断开";
|
|
|
+ if (text == "1") return isFault ? "故障" : "报警";
|
|
|
+ return text;
|
|
|
+ },
|
|
|
isErrorValue(item) {
|
|
|
const val = String(this.getMonitorValue(item) || "");
|
|
|
const code = (item.monitorcode || "").toLowerCase();
|
|
|
- if (code.indexOf("warn") > -1 || code.indexOf("fault") > -1) return true;
|
|
|
+ if (this.isStatusField(code, item.des)) {
|
|
|
+ return val !== "正常";
|
|
|
+ }
|
|
|
+ return (
|
|
|
+ val.indexOf("异常") > -1 ||
|
|
|
+ val.indexOf("故障") > -1 ||
|
|
|
+ val.indexOf("报警") > -1 ||
|
|
|
+ val.indexOf("超限") > -1
|
|
|
+ );
|
|
|
+ },
|
|
|
+ // 风机类设备(fanmain/fanlocal)主机/备机监测数值
|
|
|
+ getFanMonitorValue(item, fanNo) {
|
|
|
+ const code = String(item.monitorcode || "");
|
|
|
+ if (code == "netStatus") {
|
|
|
+ return this.doorNetStatus == "1" ? "正常" : "异常";
|
|
|
+ }
|
|
|
+ if (code == "readTime") {
|
|
|
+ return this.readTime || this.tableData.readTime || "-";
|
|
|
+ }
|
|
|
+ const key = code.startsWith("Fan")
|
|
|
+ ? code.replace(/^Fan/, "Fan" + fanNo)
|
|
|
+ : code;
|
|
|
+ const val = this.tableData[key];
|
|
|
+ const statusText = this.getStatusText(code, item.des, val);
|
|
|
+ if (statusText !== null) return statusText;
|
|
|
+ if (val !== undefined && val !== null && val !== "") return val;
|
|
|
+ return "-";
|
|
|
+ },
|
|
|
+ // 风机类设备(fanmain/fanlocal)异常判断
|
|
|
+ isFanMonitorError(item, fanNo) {
|
|
|
+ const val = String(this.getFanMonitorValue(item, fanNo) || "");
|
|
|
+ const code = String(item.monitorcode || "").toLowerCase();
|
|
|
+ if (this.isStatusField(code, item.des)) {
|
|
|
+ return val !== "正常";
|
|
|
+ }
|
|
|
return (
|
|
|
val.indexOf("异常") > -1 ||
|
|
|
val.indexOf("故障") > -1 ||
|
|
|
@@ -791,7 +792,7 @@ export default {
|
|
|
.page-wrap {
|
|
|
// overflow: auto;
|
|
|
height: 100vh;
|
|
|
- background: url('../../../../static/desk-img/1-3.png') no-repeat;
|
|
|
+ background: url("../../../../static/desk-img/1-3.png") no-repeat;
|
|
|
background-size: 100% auto;
|
|
|
}
|
|
|
|
|
|
@@ -1005,19 +1006,6 @@ export default {
|
|
|
flex-wrap: wrap;
|
|
|
}
|
|
|
|
|
|
-.datacardtime {
|
|
|
- display: flex;
|
|
|
- width: 100%;
|
|
|
- flex: 1;
|
|
|
- margin: 6rpx;
|
|
|
- height: auto;
|
|
|
- min-height: 50px;
|
|
|
- line-height: 29px;
|
|
|
- text-align: left;
|
|
|
- border-radius: 12rpx;
|
|
|
- background: linear-gradient(to bottom, #e6eeff, #ffffff);
|
|
|
-}
|
|
|
-
|
|
|
.datacard {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
@@ -1034,7 +1022,11 @@ export default {
|
|
|
border: none;
|
|
|
// background: linear-gradient(to bottom, #e6eeff 0%, #ffffff 100%);
|
|
|
// background-image: linear-gradient(to bottom, #e6eeff 0%, #ffffff 100%);
|
|
|
- background: linear-gradient(to bottom, rgba(175, 195, 252, .6) 0%, rgba(175, 195, 252, .1) 100%);
|
|
|
+ background: linear-gradient(
|
|
|
+ to bottom,
|
|
|
+ rgba(175, 195, 252, 0.6) 0%,
|
|
|
+ rgba(175, 195, 252, 0.1) 100%
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
.data-icon {
|
|
|
@@ -1080,11 +1072,14 @@ export default {
|
|
|
white-space: nowrap;
|
|
|
}
|
|
|
|
|
|
-.datacard .TabCurCSS {
|
|
|
- background: transparent;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
+/* 风机类设备(fanmain/fanlocal)主机/备机分组标题 */
|
|
|
+.fan-group-title {
|
|
|
width: 100%;
|
|
|
+ margin: 10rpx 6rpx 4rpx;
|
|
|
+ font-size: 24rpx;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #333333;
|
|
|
+ line-height: 1.4;
|
|
|
}
|
|
|
|
|
|
.left-content {
|
|
|
@@ -1095,10 +1090,6 @@ export default {
|
|
|
height: 100%;
|
|
|
}
|
|
|
|
|
|
-.spacer {
|
|
|
- height: 10rpx;
|
|
|
-}
|
|
|
-
|
|
|
.right-content {
|
|
|
width: 50%;
|
|
|
background-image: url("/static/dataBg.png");
|
|
|
@@ -1253,9 +1244,4 @@ div.window_new_5 {
|
|
|
.passArea {
|
|
|
border-color: red;
|
|
|
}
|
|
|
-
|
|
|
-.monitor-content {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
-}
|
|
|
</style>
|