|
@@ -2,149 +2,158 @@
|
|
|
<view class="container">
|
|
|
<view v-if="!menushow" class="main">
|
|
|
<view class="u-page">
|
|
|
- <u-list>
|
|
|
- <u-list-item
|
|
|
- class="itemback"
|
|
|
- v-for="(item, index) in curlist"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
- <div @tap="openNewPage(item)">
|
|
|
- <u-row gutter="5" customStyle="margin-bottom: 10px">
|
|
|
- <u-col span="24">
|
|
|
- <image
|
|
|
- style="position: absolute; width: 18px; height: 18px"
|
|
|
- class="icon"
|
|
|
- :src="getIcon(TabCur)"
|
|
|
- alt="Icon"
|
|
|
- />
|
|
|
- <span class="title">{{ item.strinstallpos }}</span>
|
|
|
- </u-col>
|
|
|
- </u-row>
|
|
|
- <u-row gutter="5" customStyle="margin-bottom: 10px">
|
|
|
- <u-col span="3" style="margin-right: 5rpx">
|
|
|
- <div v-if="item.netStatus == 0" class="error-tag1">
|
|
|
+ <u-list :class="{ empty: curlist.length === 0 }">
|
|
|
+ <template v-if="curlist.length > 0">
|
|
|
+ <u-list-item
|
|
|
+ class="itemback"
|
|
|
+ v-for="(item, index) in curlist"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ <div @tap="openNewPage(item)">
|
|
|
+ <u-row gutter="5" customStyle="margin-bottom: 10px">
|
|
|
+ <u-col span="24">
|
|
|
<image
|
|
|
- src="/static/model/connectFalse.svg"
|
|
|
- alt=""
|
|
|
- class="icon-style"
|
|
|
+ style="position: absolute; width: 18px; height: 18px"
|
|
|
+ class="icon"
|
|
|
+ :src="getIcon(TabCur)"
|
|
|
+ alt="Icon"
|
|
|
/>
|
|
|
- <span style="float: right">断开</span>
|
|
|
- </div>
|
|
|
- <div v-else class="success-tag">
|
|
|
- <image
|
|
|
- src="/static/model/connectTrue.svg"
|
|
|
- alt=""
|
|
|
- class="icon-style"
|
|
|
- />
|
|
|
- <span style="float: right">连接</span>
|
|
|
- </div>
|
|
|
- </u-col>
|
|
|
- <u-col span="4">
|
|
|
- <div v-if="item.warnFlag == 0" class="success-tag">
|
|
|
- <image
|
|
|
- src="/static/model/alarmTrue.svg"
|
|
|
- alt=""
|
|
|
- class="icon-style"
|
|
|
- />
|
|
|
- <span style="float: right">连接</span>
|
|
|
- </div>
|
|
|
- <div v-else class="error-tag">
|
|
|
- <image
|
|
|
- src="/static/model/alarmFalse.svg"
|
|
|
- alt=""
|
|
|
- class="icon-style"
|
|
|
- />
|
|
|
- <span style="float: right">断开</span>
|
|
|
- </div>
|
|
|
- </u-col>
|
|
|
- <u-col span="5">
|
|
|
- <u--text class="timetext" :text="item.readTime"></u--text>
|
|
|
- </u-col>
|
|
|
- </u-row>
|
|
|
- <view v-if="colums[TabCur + '_monitor'] != null">
|
|
|
- <view
|
|
|
- class="datacard"
|
|
|
- v-for="(showitem, index) in colums[TabCur + '_monitor']"
|
|
|
- :key="index"
|
|
|
- v-show="
|
|
|
- showitem.appShow == 1 &&
|
|
|
- showitem.monitorcode != 'strinstallpos' &&
|
|
|
- showitem.monitorcode != 'netStatus' &&
|
|
|
- showitem.monitorcode != 'warnFlag' &&
|
|
|
- showitem.monitorcode != 'readTime' &&
|
|
|
- showitem.monitorcode != ''
|
|
|
- "
|
|
|
- >
|
|
|
+ <span class="title">{{ item.strinstallpos }}</span>
|
|
|
+ </u-col>
|
|
|
+ </u-row>
|
|
|
+ <u-row gutter="5" customStyle="margin-bottom: 10px">
|
|
|
+ <u-col span="3" style="margin-right: 5rpx">
|
|
|
+ <div v-if="item.netStatus == 0" class="error-tag1">
|
|
|
+ <image
|
|
|
+ src="/static/model/connectFalse.svg"
|
|
|
+ alt=""
|
|
|
+ class="icon-style"
|
|
|
+ />
|
|
|
+ <span style="float: right">断开</span>
|
|
|
+ </div>
|
|
|
+ <div v-else class="success-tag">
|
|
|
+ <image
|
|
|
+ src="/static/model/connectTrue.svg"
|
|
|
+ alt=""
|
|
|
+ class="icon-style"
|
|
|
+ />
|
|
|
+ <span style="float: right">连接</span>
|
|
|
+ </div>
|
|
|
+ </u-col>
|
|
|
+ <u-col span="4">
|
|
|
+ <div v-if="item.warnFlag == 0" class="success-tag">
|
|
|
+ <image
|
|
|
+ src="/static/model/alarmTrue.svg"
|
|
|
+ alt=""
|
|
|
+ class="icon-style"
|
|
|
+ />
|
|
|
+ <span style="float: right">连接</span>
|
|
|
+ </div>
|
|
|
+ <div v-else class="error-tag">
|
|
|
+ <image
|
|
|
+ src="/static/model/alarmFalse.svg"
|
|
|
+ alt=""
|
|
|
+ class="icon-style"
|
|
|
+ />
|
|
|
+ <span style="float: right">断开</span>
|
|
|
+ </div>
|
|
|
+ </u-col>
|
|
|
+ <u-col span="5">
|
|
|
+ <u--text class="timetext" :text="item.readTime"></u--text>
|
|
|
+ </u-col>
|
|
|
+ </u-row>
|
|
|
+ <view v-if="colums[TabCur + '_monitor'] != null">
|
|
|
<view
|
|
|
- :class="TabCur"
|
|
|
- style="padding-top: 10rpx; padding-bottom: 10rpx"
|
|
|
+ class="datacard"
|
|
|
+ v-for="(showitem, index) in colums[TabCur + '_monitor']"
|
|
|
+ :key="index"
|
|
|
+ v-show="
|
|
|
+ showitem.appShow == 1 &&
|
|
|
+ showitem.monitorcode != 'strinstallpos' &&
|
|
|
+ showitem.monitorcode != 'netStatus' &&
|
|
|
+ showitem.monitorcode != 'warnFlag' &&
|
|
|
+ showitem.monitorcode != 'readTime' &&
|
|
|
+ showitem.monitorcode != ''
|
|
|
+ "
|
|
|
>
|
|
|
<view
|
|
|
- v-if="
|
|
|
- showitem.datatype == 1 &&
|
|
|
- showitem.monitorcode == 'doorUse'
|
|
|
- "
|
|
|
- class="demo-layout bg-purple-light"
|
|
|
- style="
|
|
|
- margin-top: 10rpx;
|
|
|
- color: #3787fe;
|
|
|
- font-size: 30rpx;
|
|
|
- margin-top: 5rpx;
|
|
|
- "
|
|
|
- >
|
|
|
- {{
|
|
|
- item[showitem.monitorcode] == "2"
|
|
|
- ? "行人"
|
|
|
- : item[showitem.monitorcode] == "1"
|
|
|
- ? "行车"
|
|
|
- : "-"
|
|
|
- }}
|
|
|
- </view>
|
|
|
- <view
|
|
|
- v-else-if="showitem.datatype == 1"
|
|
|
- class="demo-layout bg-purple-light"
|
|
|
- style="
|
|
|
- margin-top: 10rpx;
|
|
|
- color: #3787fe;
|
|
|
- font-size: 30rpx;
|
|
|
- margin-top: 5rpx;
|
|
|
- "
|
|
|
+ :class="TabCur"
|
|
|
+ style="padding-top: 10rpx; padding-bottom: 10rpx"
|
|
|
>
|
|
|
- {{
|
|
|
- item[showitem.monitorcode] == null ||
|
|
|
- item[showitem.monitorcode] == ""
|
|
|
- ? "-"
|
|
|
- : item[showitem.monitorcode]
|
|
|
- }}
|
|
|
- </view>
|
|
|
- <view
|
|
|
- v-else-if="showitem.datatype == 2"
|
|
|
- class="demo-layout bg-purple-light"
|
|
|
- style="color: #3787fe; font-size: 30rpx; margin-top: 5rpx"
|
|
|
- >
|
|
|
- {{
|
|
|
- item.readData[showitem.monitorcode] == null ||
|
|
|
- item.readData[showitem.monitorcode] == ""
|
|
|
- ? "-"
|
|
|
- : item.readData[showitem.monitorcode]
|
|
|
- }}
|
|
|
- </view>
|
|
|
+ <view
|
|
|
+ v-if="
|
|
|
+ showitem.datatype == 1 &&
|
|
|
+ showitem.monitorcode == 'doorUse'
|
|
|
+ "
|
|
|
+ class="demo-layout bg-purple-light"
|
|
|
+ style="
|
|
|
+ margin-top: 10rpx;
|
|
|
+ color: #3787fe;
|
|
|
+ font-size: 30rpx;
|
|
|
+ margin-top: 5rpx;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ {{
|
|
|
+ item[showitem.monitorcode] == "2"
|
|
|
+ ? "行人"
|
|
|
+ : item[showitem.monitorcode] == "1"
|
|
|
+ ? "行车"
|
|
|
+ : "-"
|
|
|
+ }}
|
|
|
+ </view>
|
|
|
+ <view
|
|
|
+ v-else-if="showitem.datatype == 1"
|
|
|
+ class="demo-layout bg-purple-light"
|
|
|
+ style="
|
|
|
+ margin-top: 10rpx;
|
|
|
+ color: #3787fe;
|
|
|
+ font-size: 30rpx;
|
|
|
+ margin-top: 5rpx;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ {{
|
|
|
+ item[showitem.monitorcode] == null ||
|
|
|
+ item[showitem.monitorcode] == ""
|
|
|
+ ? "-"
|
|
|
+ : item[showitem.monitorcode]
|
|
|
+ }}
|
|
|
+ </view>
|
|
|
+ <view
|
|
|
+ v-else-if="showitem.datatype == 2"
|
|
|
+ class="demo-layout bg-purple-light"
|
|
|
+ style="
|
|
|
+ color: #3787fe;
|
|
|
+ font-size: 30rpx;
|
|
|
+ margin-top: 5rpx;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ {{
|
|
|
+ item.readData[showitem.monitorcode] == null ||
|
|
|
+ item.readData[showitem.monitorcode] == ""
|
|
|
+ ? "-"
|
|
|
+ : item.readData[showitem.monitorcode]
|
|
|
+ }}
|
|
|
+ </view>
|
|
|
|
|
|
- <view
|
|
|
- class="demo-layout bg-purple-light"
|
|
|
- style="
|
|
|
- margin-top: 6rpx;
|
|
|
- color: #677799;
|
|
|
- margin-bottom: 5rpx;
|
|
|
- "
|
|
|
- >
|
|
|
- {{ showitem.des }}
|
|
|
+ <view
|
|
|
+ class="demo-layout bg-purple-light"
|
|
|
+ style="
|
|
|
+ margin-top: 6rpx;
|
|
|
+ color: #677799;
|
|
|
+ margin-bottom: 5rpx;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ {{ showitem.des }}
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- </div>
|
|
|
- </u-list-item>
|
|
|
+ </div>
|
|
|
+ </u-list-item>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <div class="empty-message">数据为空</div>
|
|
|
+ </template>
|
|
|
</u-list>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -312,6 +321,18 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style>
|
|
|
+.empty {
|
|
|
+ background: url("/static/empty.png") no-repeat;
|
|
|
+ background-size: 100% 50%;
|
|
|
+}
|
|
|
+.empty-message {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ font-size: 16px;
|
|
|
+ line-height: 80vh;
|
|
|
+ color: #333;
|
|
|
+}
|
|
|
>>> .u-navbar--fixed {
|
|
|
/* margin-top: 20px; */
|
|
|
}
|