This commit is contained in:
王丹 2025-02-20 18:14:50 +08:00
parent 2b71302f99
commit 4b040b2d12
2 changed files with 95 additions and 46 deletions

View File

@ -4,7 +4,53 @@
<template #top> <template #top>
<custom-nav-bar :left="true" title="阀门"></custom-nav-bar> <custom-nav-bar :left="true" title="阀门"></custom-nav-bar>
</template> </template>
<view class="index-container">
<view class="card" v-for="item in dataList">
<view class="cards-title">
<view>
<view style="font-size: 15px;"><em style="font-weight: bold;">{{ item.wo.showName }}</em>{{ item.device.deviceCode }}</view>
<uni-tag class="bg-green" :circle="true" text="在线"
v-if="dc.dataObj[item.device.deviceCode]?.online" />
<uni-tag class="bg-red" :circle="true" text="离线" v-else />
</view>
<view class="right">
<u-button type="success" size="mini" text="刷新"
:loading="dc.dataObj[item.device.deviceCode]?.refresh"
@click="dc.refreshDeviceItem(item.device.deviceCode, item.device)" />
</view>
</view>
<view class="cards-content">
<view class="txt-list">
<view class="list2">
<view style="width: 60%;">
<text>电量</text>
{{ dc.dataObj[item.device.deviceCode]?.adc.b || '-' }}%
</view>
<view style="width: 40%;">
<text>频段</text>{{ dataObj[item.device.deviceCode]?.lf || item.device.deviceExtendValve.rolaFrequency}}
</view>
<view style="width: 60%;">
<text>/硬件版本</text>
{{ dataObj[item.device.deviceCode]?.sv || item.device.softVer}} /
{{ dataObj[item.device.deviceCode]?.dv || item.device.deviceVersion }}
</view>
<view style="width: 40%;">
<text>压力</text>{{ dc.dataObj[item.device.deviceCode]?.adc.p || '-' }}
</view>
</view>
</view>
<view class="btn-grid">
<u-button type="primary" @click="restart(item)">重启</u-button>
<u-button type="primary" @click="editRolaFrequency(item)">修改频段</u-button>
<u-button type="primary" @click="getConfig(item)">获取配置</u-button>
<!-- <u-button type="primary" @click="" disabled>压力校准</u-button>
<u-button type="primary" @click="" disabled>桥接</u-button>
<u-button type="primary" @click="" disabled>删除桥接</u-button> -->
</view>
</view>
</view>
<!-- <view class="index-container">
<view class="item-container" v-for="item in dataList"> <view class="item-container" v-for="item in dataList">
<view style="display: flex; align-items: center; justify-content: space-between;"> <view style="display: flex; align-items: center; justify-content: space-between;">
<view class="flex-text" style="margin: 15px;"> <view class="flex-text" style="margin: 15px;">
@ -23,8 +69,8 @@
</view> </view>
<u-gap height="1" bgColor="#D2D2D2"></u-gap> <u-gap height="1" bgColor="#D2D2D2"></u-gap>
<view style="display: flex;justify-content: space-between;align-items: center;"> <view style="display: flex;justify-content: space-between;align-items: center;">
<uni-row class="data"> <uni-row class="data"> -->
<uni-col :span="12"> <!-- <uni-col :span="12">
<view class="flex-text global-font-size-1"> <view class="flex-text global-font-size-1">
<view class="flex-text-one">电量</view> <view class="flex-text-one">电量</view>
<view>{{ dc.dataObj[item.device.deviceCode]?.adc.b || '-' }}%</view> <view>{{ dc.dataObj[item.device.deviceCode]?.adc.b || '-' }}%</view>
@ -60,7 +106,8 @@
</uni-col> </uni-col>
<uni-col :span="8" v-hasPermi="['iot:dev-ops:gvc']"> <uni-col :span="8" v-hasPermi="['iot:dev-ops:gvc']">
<u-button type="primary" @click="getConfig(item)">获取配置</u-button> <u-button type="primary" @click="getConfig(item)">获取配置</u-button>
</uni-col>
</uni-col> -->
<!-- <uni-col :span="8"> <!-- <uni-col :span="8">
<u-button type="primary" @click="" disabled>压力校准</u-button> <u-button type="primary" @click="" disabled>压力校准</u-button>
</uni-col> --> </uni-col> -->
@ -70,10 +117,10 @@
<!-- <uni-col :span="8"> <!-- <uni-col :span="8">
<u-button type="primary" @click="" disabled>删除桥接</u-button> <u-button type="primary" @click="" disabled>删除桥接</u-button>
</uni-col> --> </uni-col> -->
</uni-row> <!-- </uni-row>
</view> </view>
</view> </view>
</view> </view> -->
</z-paging> </z-paging>
<!-- 修改频段 --> <!-- 修改频段 -->
@ -248,48 +295,48 @@
</script> </script>
<style lang="scss"> <style lang="scss">
.index-container { // .index-container {
.list { // .list {
margin: 0px 10px; // margin: 0px 10px;
} // }
.list-size { // .list-size {
display: flex; // display: flex;
padding: 5px 5px; // padding: 5px 5px;
background: white; // background: white;
justify-content: center; // justify-content: center;
} // }
.search { // .search {
background-color: white; // background-color: white;
padding: 10px; // padding: 10px;
} // }
.item-container { // .item-container {
margin: 10px 10px; // margin: 10px 10px;
background-color: white; // background-color: white;
padding-bottom: 10px; // padding-bottom: 10px;
border-radius: 10px; // border-radius: 10px;
box-shadow: 1px 1px 2px 2px rgba(0, 0, 0, 0.05); // box-shadow: 1px 1px 2px 2px rgba(0, 0, 0, 0.05);
} // }
.flex-text { // .flex-text {
display: flex; // display: flex;
align-items: center; // align-items: center;
.flex-text-one { // .flex-text-one {
color: #939393; // color: #939393;
font-weight: bold; // font-weight: bold;
} // }
} // }
.data { // .data {
margin: 10px 20px !important; // margin: 10px 20px !important;
width: 100%; // width: 100%;
.uni-col { // .uni-col {
margin-bottom: 5px; // margin-bottom: 5px;
} // }
} // }
} // }
</style> </style>

View File

@ -1,3 +1,5 @@
em{font-style: normal;}
/* 表单 */ /* 表单 */
.uni-forms { .uni-forms {
background-color: #fff !important; background-color: #fff !important;
@ -199,11 +201,11 @@
} }
.cards-title view view { .cards-title view view {
font-size: 0.8rem; font-size: 15px;margin-right: 10px;
} }
.cards-title view .text { .cards-title view .text {
font-size: 0.875rem; font-size: 16px;
margin-right: 10px; margin-right: 10px;
color: #39ac4f; color: #39ac4f;
font-weight: bold; font-weight: bold;
@ -226,7 +228,7 @@
/* 文字列表 */ /* 文字列表 */
.txt-list {display: flex;} .txt-list {display: flex;}
.txt-list .list2,.txt-list .list1 { .txt-list .list2,.txt-list .list1 {font-size: 14px;
color: #666;line-height: 24px; color: #666;line-height: 24px;
flex: 1 1 0%;display: flex; flex: 1 1 0%;display: flex;
flex-wrap: wrap;} flex-wrap: wrap;}