This commit is contained in:
Iruka 2025-02-14 10:57:26 +08:00
parent b78b2d4ba5
commit 6811d8f899
2 changed files with 67 additions and 25 deletions

View File

@ -3,6 +3,14 @@
empty-view-text="抱歉,暂时还没有相关数据!"> empty-view-text="抱歉,暂时还没有相关数据!">
<template #top> <template #top>
<custom-nav-bar :left="true" title="设备运维"></custom-nav-bar> <custom-nav-bar :left="true" title="设备运维"></custom-nav-bar>
<view class="search">
<uni-forms ref="form" :model="queryParams" labelWidth="0px">
<uni-forms-item label="" name="">
<custom-land-tree :defaultLand="land" @change="handleTreeChange"
style="width: 100%;float: left;margin-right: 2px;"></custom-land-tree>
</uni-forms-item>
</uni-forms>
</view>
</template> </template>
<view class="card"> <view class="card">
@ -163,8 +171,6 @@
</uni-forms> </uni-forms>
</view> </view>
</custom-popup> </custom-popup>
</template> </template>
<script> <script>
import * as DevOpsApi from "@/api/dev-ops/index.js" import * as DevOpsApi from "@/api/dev-ops/index.js"
@ -172,6 +178,7 @@
export default { export default {
data() { data() {
return { return {
land: null,
landId: null, landId: null,
dataList: [], dataList: [],
dc: getApp().dc, // dc: getApp().dc, //
@ -186,12 +193,6 @@
} }
}, },
onLoad(par) { onLoad(par) {
if (getApp().ijs.land) {
this.landId = getApp().ijs.land.id;
} else {
this.landId = -1;
}
// //
let list = []; let list = [];
for (let i = 410; i < 491; i++) { for (let i = 410; i < 491; i++) {
@ -202,6 +203,7 @@
list.push(lfObj); list.push(lfObj);
} }
this.rolaFrequency.range = list; this.rolaFrequency.range = list;
this.setQueryParams(getApp().ijs.land);
const that = this; const that = this;
getApp().on("mqtt", "mqtt_devOps_station", function(e) { getApp().on("mqtt", "mqtt_devOps_station", function(e) {
if (e.type == "state") { if (e.type == "state") {
@ -235,6 +237,21 @@
getApp().off("mqtt", "mqtt_devOps_station") getApp().off("mqtt", "mqtt_devOps_station")
}, },
methods: { methods: {
//
setQueryParams(e) {
if (e) {
this.land = e || null;
this.landId = e.id;
} else {
this.land = null;
this.landId = -1;
}
},
//
handleTreeChange(e) {
this.setQueryParams(e);
this.$refs.paging.reload();
},
queryList(pageNo, pageSize) { queryList(pageNo, pageSize) {
DevOpsApi.getList(this.landId).then(res => { DevOpsApi.getList(this.landId).then(res => {
// console.error("res:", res); // console.error("res:", res);
@ -397,8 +414,33 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.search {
background: #fff;
::v-deep.uni-searchbar {
padding: 0px 10px 10px 10px;
}
//
::v-deep.uni-forms-item__label {
display: none !important;
}
.u-checkbox {
margin: 0 !important;
height: 35px;
}
.uni-forms-item.is-direction-left {
margin: 0 !important;
}
}
.card.card-grey { .card.card-grey {
margin: 10px 0 0; margin: 10px 0 0;
} }
::v-deep .tc-content{overflow: inherit !important;}
::v-deep .tc-content {
overflow: inherit !important;
}
</style> </style>

View File

@ -11,7 +11,7 @@
</uni-forms-item> </uni-forms-item>
</uni-forms> </uni-forms>
<uni-search-bar v-model="queryParams.searchValue" placeholder="请输入出水口/设备编码" cancelButton="none" <uni-search-bar v-model="queryParams.searchValue" placeholder="请输入出水口/设备编码" cancelButton="none"
@confirm="queryList" @clear="queryList" /> @confirm="$refs.paging.reload()" @clear="$refs.paging.reload()" />
</view> </view>
</template> </template>
<view class="card" v-for="item in dataList"> <view class="card" v-for="item in dataList">
@ -106,7 +106,7 @@
// //
handleTreeChange(e) { handleTreeChange(e) {
this.setQueryParams(e); this.setQueryParams(e);
this.queryList(1); this.$refs.paging.reload();
}, },
// //
queryList(pageNo, pageSize) { queryList(pageNo, pageSize) {
@ -175,6 +175,20 @@
::v-deep.uni-searchbar { ::v-deep.uni-searchbar {
padding: 0px 10px 10px 10px; padding: 0px 10px 10px 10px;
} }
//
::v-deep.uni-forms-item__label {
display: none !important;
}
.u-checkbox {
margin: 0 !important;
height: 35px;
}
.uni-forms-item.is-direction-left {
margin: 0 !important;
}
} }
.list1>view { .list1>view {
@ -189,20 +203,6 @@
font-size: 13px !important; font-size: 13px !important;
} }
//
::v-deep.uni-forms-item__label {
display: none !important;
}
.u-checkbox {
margin: 0 !important;
height: 35px;
}
.uni-forms-item.is-direction-left {
margin: 0 !important;
}
.popup-content { .popup-content {
padding: 10px; padding: 10px;
} }