This commit is contained in:
jsy_zjg 2025-01-14 17:59:17 +08:00
parent 49b382ba4a
commit e79f903f61
8 changed files with 95 additions and 82 deletions

View File

@ -182,7 +182,8 @@
"path": "pages/work/user/ground",
"style": {
"navigationBarTitleText": "用户地块",
"enablePullDownRefresh": false
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "pages/work/user/device",

View File

@ -1,5 +1,4 @@
<template>
<z-paging ref="paging" use-virtual-list @query="queryList" bg-color="#F3F3F3" :loading-more-enabled="false">
<template #top>
<custom-nav-bar :left="true" title="农情"></custom-nav-bar>
@ -34,7 +33,6 @@
</view>
</template>
</z-paging>
</template>
<script>
import {

View File

@ -1,60 +1,62 @@
<template>
<z-paging ref="paging" use-virtual-list @query="queryList" bg-color="#F3F3F3" :loading-more-enabled="false">
<template #top>
<custom-nav-bar :left="false" leftText="" @leftClick="" title="首部">
<template v-slot:left>
<view @click="$refs.landRef.open()">地块</view>
</template>
</custom-nav-bar>
</template>
<view class="text-intel" v-if="landName">
<view class="iconfont icon-ditu">
<z-paging ref="paging" use-virtual-list @query="queryList" bg-color="#F3F3F3" :loading-more-enabled="false">
<template #top>
<custom-nav-bar :left="false" leftText="" @leftClick="" title="首部">
<template v-slot:left>
<view @click="$refs.landRef.open()">地块</view>
</template>
</custom-nav-bar>
</template>
<view class="text-intel" v-if="landName">
<view class="iconfont icon-ditu">
</view>
<view>
<span>{{landName}}</span>
</view>
</view>
<template #cell="{item}">
<view class="card" @click="onClickItem(item)">
<view class="cards-title">
<view>
<view class="text" v-if="item.deviceTypeId==4">
施肥机编号
</view>
<view class="text" v-if="item.deviceTypeId==5">
首部控制器
</view>
<view>
{{item.deviceCode}}
</view>
</view>
</view>
<view>
<span>{{landName}}</span>
<view class="content">
<view class="cards-content">
<view class="txt-list">
<view class="left">
<view><text>状态</text><text
:class="item.status=='offline'?'font-red':''">{{item.status=="online"?"在线":"离线"}}</text>
</view>
<view><text>水流</text><text>{{item.deviceData.fs == 1 ? "有" : "无"}}</text></view>
</view>
<view class="left">
<view><text>水泵开关</text><text>{{item.deviceData.sc=="1"?"启动":"停止"}}</text></view>
<view><text>压力</text><text>{{item.deviceData.wip?item.deviceData.wip:"--"}}Mpa</text>
</view>
</view>
<view class="right">
<view class="iconfont icon-you">
</view>
</view>
</view>
</view>
</view>
</view>
<template #cell="{item}">
<view class="card" @click="onClickItem(item)">
<view class="cards-title">
<view>
<view class="text" v-if="item.deviceTypeId==4">
施肥机编号
</view>
<view class="text" v-if="item.deviceTypeId==5">
首部控制器
</view>
<view>
{{item.deviceCode}}
</view>
</view>
</view>
<view class="content">
<view class="cards-content">
<view class="txt-list">
<view class="left">
<view><text>状态</text><text :class="item.status=='offline'?'font-red':''">{{item.status=="online"?"在线":"离线"}}</text></view>
<view><text>水流</text><text>{{item.deviceData.fs == 1 ? "有" : "无"}}</text></view>
</view>
<view class="left">
<view><text>水泵开关</text><text>{{item.deviceData.sc=="1"?"启动":"停止"}}</text></view>
<view><text>压力</text><text>{{item.deviceData.wip?item.deviceData.wip:"--"}}Mpa</text></view>
</view>
<view class="right">
<view class="iconfont icon-you">
</view>
</view>
</view>
</view>
</view>
</view>
</template>
</z-paging>
<!-- 地块选择 -->
<custom-select-land ref="landRef" :data="ijs.companys" :defaultSelect="ijs.land" @getLand="getLand"
@select="landChange" />
</template>
</z-paging>
<!-- 地块选择 -->
<custom-select-land ref="landRef" :data="ijs.companys" :defaultSelect="ijs.land" @getLand="getLand"
@select="landChange" />
</template>
<script>
import {
@ -72,15 +74,15 @@
title: "",
isFirst: true,
user: store.state.user.user,
landName:null,
landName: null,
query: {
landId: null,
landName: null
},
}
},
onShow(){
if(this.ijs.land){
onShow() {
if (this.ijs.land) {
this.landName = this.ijs.land.landName;
this.query.landId = this.ijs.land.id;
this.queryList();
@ -107,15 +109,17 @@
this.query.landId = e.id;
this.queryList();
},
onClickItem(item){
onClickItem(item) {
if (item.deviceTypeId === 4) {
if(item.controlMode==1){
plugin.tab.navigateTo("/pages/head/fertilizerapplicator/detail?item=" + encodeURIComponent(JSON.stringify(
item)))
if (item.controlMode == 1) {
plugin.tab.navigateTo("/pages/head/fertilizerapplicator/detail?item=" + encodeURIComponent(JSON
.stringify(
item)))
}
if(item.controlMode==2){
plugin.tab.navigateTo("/pages/head/fertilizerapplicator/detailkl?item=" + encodeURIComponent(JSON.stringify(
item)))
if (item.controlMode == 2) {
plugin.tab.navigateTo("/pages/head/fertilizerapplicator/detailkl?item=" + encodeURIComponent(JSON
.stringify(
item)))
}
}
if (item.deviceTypeId === 5) {
@ -127,6 +131,12 @@
</script>
<style lang="scss" scoped>
.cards-title{border: none;}
.cards-title uni-view .text{font-weight: normal; color: #333;}
.cards-title {
border: none;
}
.cards-title uni-view .text {
font-weight: normal;
color: #333;
}
</style>

View File

@ -58,7 +58,7 @@
</template>
<view class="content">
<view class="cards-content">
<view class="txt-list" @click="taskdetails">
<view class="txt-list" >
<view class="left">
<view><text>地块名称</text><text>{{item.landName}}</text></view>
<view><text>地块面积</text><text>{{item.landName}}</text></view>

View File

@ -24,14 +24,14 @@
<view>
<text>{{ item.showName }}</text>
</view>
<view style="margin-left: 30px; height: 25px;">
<view style="margin-left: 40px; height: 25px;">
<u-checkbox-group class="checkBox" style="margin: 0;" icon-placement="left" placement="row"
@change="handleChangeRow($event, item)">
<u-checkbox active-color="#35842E" label="全选" :checked="isAllSelected(item)"
name="all"></u-checkbox>
</u-checkbox-group>
</view>
<view style="margin-left: 110px; height: 25px;">
<view style="margin-left: 100px; height: 25px;">
<u-radio-group class="checkBox" style="margin: 0;"
v-if="item.landWaterOutletPermissionVo.showDevice==0" icon-placement="left"
placement="row" v-model="item.landWaterOutletPermissionVo.deviceTypeKey"

View File

@ -2,6 +2,8 @@
<view class="index-container">
<z-paging class="paging" ref="paging" use-virtual-list @query="queryList" bg-color="#F6F3F3" :loading-more-enabled="false">
<template #top>
<custom-nav-bar :left="true" title="用户地块">
</custom-nav-bar>
<view class="title">
<u--image style="margin-right: 10px" :src="userInfo.avatarURL ? userInfo.avatarURL : avatar" shape="circle" width="50px" height="50px"></u--image>
<text>{{ userInfo.name }}</text>

View File

@ -34,7 +34,7 @@
<template #cell="{ item }">
<view class="card">
<view class="cards-content" @click="clickMore(item)">
<view class="txt-list" @click="taskdetails">
<view class="txt-list" >
<view class="left">
<view>
<u--image :showLoading="true" shape="square" radius="5px" width="70px" height="70px"

View File

@ -1,15 +1,15 @@
<template>
<custom-nav-bar :left="true" title="其它设备权限">
<template v-slot:right>
<view class="fixed">
<view align="right" class="iconfont icon-jia icon" v-hasPermi="['system:permission:add']"
@click="onAdd"></view>
</view>
</template>
</custom-nav-bar>
<view class="index-container">
<z-paging class="paging" ref="paging" use-virtual-list bg-color="#F6F3F3" :loading-more-enabled="false">
<template #top>
<custom-nav-bar :left="true" title="其它设备权限">
<template v-slot:right>
<view class="fixed">
<view align="right" class="iconfont icon-jia icon" v-hasPermi="['system:permission:add']"
@click="onAdd"></view>
</view>
</template>
</custom-nav-bar>
<view class="search">
<u-search placeholder="请输入设备编号" @search="onSearchValue" @custom="onSearchValue"
@clear="onSearchValue(null)" shape="square"></u-search>
@ -60,8 +60,10 @@
};
},
onLoad(options) {
this.query.landId = options.landId;
this.query.userId = options.userId;
if(options){
this.query.landId = options.landId;
this.query.userId = options.userId;
}
},
onShow() {
this.queryList();