This commit is contained in:
Iruka 2025-02-19 16:19:08 +08:00
parent 5163bd7410
commit 2e5f8feb0b

View File

@ -259,7 +259,7 @@
<view>
<view>{{ item.deviceCode }}</view>
<uni-tag class="bg-green" :circle="true" text="在线"
v-if="item.status == 'online'" />
v-if="item.data && item.data.items.s.value == 'online'" />
<uni-tag class="bg-red" :circle="true" text="离线" v-else />
</view>
<view class="right">
@ -270,17 +270,42 @@
</view>
<view class="cards-content">
<view class="txt-list">
<view class="list2">
<!-- <view style="width: 50%;">
<text>层数</text>{{ item.floors }}
<view class="list2" v-if="item.data && item.data.items">
<view style="width: 50%;">
<text>风力</text>{{ item.data.items.wc.value || "-" }}
</view>
<view style="width: 50%;">
<text>深度</text>{{ item.depth }}
</view> -->
<text>风速</text>{{ item.data.items.ws.value || "-" }}m/s
</view>
<view style="width: 50%;">
<text>风向</text>{{ item.data.items.wd.value || "-" }}
</view>
<view style="width: 50%;">
<text>大气压</text>{{ item.data.items.p.value || "-" }}MPa
</view>
<view style="width: 50%;">
<text>空气温度</text>{{ item.data.items.t.value || "-" }}
</view>
<view style="width: 50%;">
<text>空气湿度</text>{{ item.data.items.h.value || "-" }}%
</view>
<view style="width: 50%;">
<text>光照</text>{{ item.data.items.liy.value || "-" }}Lux
</view>
<view style="width: 50%;">
<text>当前雨量</text>{{ item.data.items.rt.value || "-" }}mm
</view>
<view style="width: 50%;">
<text>瞬时雨量</text>{{ item.data.items.ri.value || "-" }}mm
</view>
<view style="width: 50%;">
<text>累计雨量</text>{{ item.data.items.r.value || "-" }}mm
</view>
</view>
</view>
<view class="btn-grid">
<u-button type="primary" size="normal" text="采集时间" />
<u-button type="primary" size="normal" text="采集频率"
@click="qxzSetConfig(item)" />
</view>
</view>
</view>
@ -426,7 +451,7 @@
</z-paging>
<!-- 修改基站频段 -->
<custom-popup ref="refFrequency" :title="rolaFrequency.item?.deviceCode" :footer="true"
<custom-popup ref="frequencyRef" :title="rolaFrequency.item?.deviceCode" :footer="true"
@confirm="loraFrequencyHandler">
<view class="jz-info" style="width: 80vw;padding: 10px;">
<uni-forms ref="baseForm" style="padding-top: 10px;">
@ -439,6 +464,17 @@
</uni-forms>
</view>
</custom-popup>
<!-- 气象站配置 -->
<custom-popup ref="qxzRef" title="气象站配置" :footer="true" @confirm="qxzConfigHandler">
<view class="jz-info" style="width: 80vw;padding: 10px;">
<uni-forms ref="baseForm" style="padding-top: 10px;">
<uni-forms-item label="采集间隔" required>
<uni-number-box v-model="qxz.intervalTime" :width="120" />
</uni-forms-item>
</uni-forms>
</view>
</custom-popup>
</template>
<script>
import plugins from "../../plugins";
@ -459,6 +495,10 @@
new: null,
range: [],
},
qxz: {
item: null,
intervalTime: 10
}
}
},
onLoad(par) {
@ -592,7 +632,7 @@
},
//
SLF(item) {
this.$refs.refFrequency.show();
this.$refs.frequencyRef.show();
this.rolaFrequency.item = item;
this.rolaFrequency.old = item.rolaFrequency;
this.rolaFrequency.new = item.rolaFrequency;
@ -689,6 +729,20 @@
});
},
/************************************************** 墒情 **************************************************/
qxzSetConfig(item) {
console.error("item:", item);
this.$refs.qxzRef.show();
this.qxz.item = item;
this.qxz.intervalTime = item?.intervalTime || 10;
},
qxzConfigHandler(e) {
if (e) {
this.qxz.item.intervalTime = this.qxz.intervalTime;
}
},
/************************************************** 公共 **************************************************/
//