|
@@ -1,70 +1,104 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view>
|
|
<view>
|
|
|
<view class="status_bar"></view>
|
|
<view class="status_bar"></view>
|
|
|
- <view class="" style="position: relative;top: 40px;">
|
|
|
|
|
- <view style="position: fixed;z-index: 100;">
|
|
|
|
|
- <uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回"
|
|
|
|
|
- size="16">
|
|
|
|
|
- <view class="bases_search">
|
|
|
|
|
- <view class="bases_search_text" @click="clickRight">
|
|
|
|
|
- <u-icon name="search" class="search" @click="search"></u-icon>
|
|
|
|
|
- <input type="text" v-model="data.search" placeholder="设备ID搜索" disabled/>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </uni-nav-bar>
|
|
|
|
|
|
|
+ <view class="" style="position: relative; top: 44px">
|
|
|
|
|
+ <view style="position: fixed; z-index: 100">
|
|
|
|
|
+ <uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回" title="环境监测系统" right-icon="search"
|
|
|
|
|
+ @clickRight="clickRight" size="16"></uni-nav-bar>
|
|
|
|
|
+ <view class="inputs" :style="{ width: width + 'rpx' }">
|
|
|
|
|
+ <input type="text" value="" placeholder="请输入设备ID或设备名称" v-model="imports" @input="searchinp"
|
|
|
|
|
+ class="inputbox" :clearable="false" />
|
|
|
|
|
+ <u-icon name="search" size="40" class="icon" @click="search"></u-icon>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
- <image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/environment/1.png'" mode="" class="image"></image>
|
|
|
|
|
|
|
+ <image :src="
|
|
|
|
|
+ 'http://www.hnyfwlw.com:8006/bigdata_app' + '/image/environment/1.png'
|
|
|
|
|
+ " mode="" class="image">
|
|
|
|
|
+ </image>
|
|
|
<view class="loading" v-if="loadingtf">
|
|
<view class="loading" v-if="loadingtf">
|
|
|
<image src="../../static/images/ajax-loader.gif" mode="" class="img"></image>
|
|
<image src="../../static/images/ajax-loader.gif" mode="" class="img"></image>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="tab-box">
|
|
<view class="tab-box">
|
|
|
- <view v-for="(item,index) in equipArr" :key="item.type" v-if="item.tf" @click="tabClick(index,item.type)" :class="['tab-item',active==index?'active':'']">
|
|
|
|
|
- <text>{{item.name}}</text>
|
|
|
|
|
|
|
+ <view v-for="(item, index) in equipArr" :key="item.type" v-if="item.tf"
|
|
|
|
|
+ @click="tabClick(index, item.type)" :class="['tab-item', active == index ? 'active' : '']">
|
|
|
|
|
+ <text>{{ item.name }}</text>
|
|
|
<text class="bottom-line"></text>
|
|
<text class="bottom-line"></text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="prevents">
|
|
<view class="prevents">
|
|
|
- <view class="prevents_item" v-for="item,index in eqlistdata" :key="index" @click="eqdetails(item)">
|
|
|
|
|
|
|
+ <view class="prevents_item" v-for="(item, index) in eqlistdata" :key="index" @click="eqdetails(item)">
|
|
|
<view class="" v-if="side_type == 5">
|
|
<view class="" v-if="side_type == 5">
|
|
|
- <image
|
|
|
|
|
- :src="item.is_online==1?'http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/6.png':'http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/7.png'"
|
|
|
|
|
- mode="" class="prevents_item_img"></image>
|
|
|
|
|
|
|
+ <image :src="
|
|
|
|
|
+ item.is_online == 1
|
|
|
|
|
+ ? 'http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/6.png'
|
|
|
|
|
+ : 'http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/7.png'
|
|
|
|
|
+ " mode="" class="prevents_item_img"></image>
|
|
|
<view class="prevents_item_top">
|
|
<view class="prevents_item_top">
|
|
|
- <p>设备名称:{{item.equip_name==""?"无":item.equip_name}}</p>
|
|
|
|
|
- <p :class="item.is_online==1?'green':'red'" v-text="item.is_online==1?'在线':'离线'"></p>
|
|
|
|
|
|
|
+ <p>
|
|
|
|
|
+ 设备名称:{{
|
|
|
|
|
+ item.equip_name == "" ? "环境监测" : item.equip_name
|
|
|
|
|
+ }}
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <p :class="item.is_online == 1 ? 'green' : 'red'"
|
|
|
|
|
+ v-text="item.is_online == 1 ? '在线' : '离线'"></p>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="prevents_item_bot">
|
|
<view class="prevents_item_bot">
|
|
|
- <p>设备 ID:{{item.equip_id || item.device_id}}</p>
|
|
|
|
|
- <p>最新上报时间:{{item.uptime|timeFormat()}}</p>
|
|
|
|
|
- <view class="" style="display: flex;justify-content: space-between;">
|
|
|
|
|
- <p>设备到期情况:<span
|
|
|
|
|
- :class="'prevents_item_bot_sapn'+item.device_expire">{{item.device_expiretext}}</span>
|
|
|
|
|
|
|
+ <p>设备 ID:{{ item.equip_id || item.device_id }}</p>
|
|
|
|
|
+ <p>最新上报时间:{{ item.uptime | timeFormat() }}</p>
|
|
|
|
|
+ <view class="" style="display: flex; justify-content: space-between">
|
|
|
|
|
+ <p>
|
|
|
|
|
+ 设备到期情况:<span
|
|
|
|
|
+ :class="'prevents_item_bot_sapn' + item.device_expire">{{ item.device_expiretext }}</span>
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <p style="color: #3c84fe" v-if="item.device_expire != 0" @click.stop="examine(item)">
|
|
|
|
|
+ 查看详情
|
|
|
</p>
|
|
</p>
|
|
|
- <p style="color: #3C84FE;" v-if="item.device_expire!=0" @click.stop="examine(item)">查看详情</p>
|
|
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="" v-if="side_type == 15">
|
|
<view class="" v-if="side_type == 15">
|
|
|
- <image
|
|
|
|
|
- src="http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/6.png"
|
|
|
|
|
- mode="" class="prevents_item_img"></image>
|
|
|
|
|
|
|
+ <image src="http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/6.png" mode=""
|
|
|
|
|
+ class="prevents_item_img"></image>
|
|
|
<view class="prevents_item_top">
|
|
<view class="prevents_item_top">
|
|
|
- <p>设备名称:{{item.device_name==""?"无":item.device_name}}</p>
|
|
|
|
|
|
|
+ <p>
|
|
|
|
|
+ 设备名称:{{
|
|
|
|
|
+ item.device_name == "" ? "管式墒情" : item.device_name
|
|
|
|
|
+ }}
|
|
|
|
|
+ </p>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="prevents_item_bot">
|
|
<view class="prevents_item_bot">
|
|
|
- <p>设备 ID:{{item.device_id}}</p>
|
|
|
|
|
- <p>最新上报时间:{{item.uptime|timeFormat()}}</p>
|
|
|
|
|
|
|
+ <p>设备 ID:{{ item.device_id }}</p>
|
|
|
|
|
+ <p>最新上报时间:{{ item.uptime | timeFormat() }}</p>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="" v-if="side_type == 11 || side_type == 19 || side_type == 20">
|
|
|
|
|
+ <image src="http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/6.png" mode=""
|
|
|
|
|
+ class="prevents_item_img"></image>
|
|
|
|
|
+ <view class="prevents_item_top">
|
|
|
|
|
+ <p>
|
|
|
|
|
+ 设备名称:{{
|
|
|
|
|
+ item.device_name == "" ? "暂无" : item.device_name
|
|
|
|
|
+ }}
|
|
|
|
|
+ </p>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="prevents_item_bot">
|
|
|
|
|
+ <p>设备 ID:{{ item.device_id }}</p>
|
|
|
|
|
+ <p>最新上报时间:{{ item.uptime | timeFormat() }}</p>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <u-modal v-model="show" :title="title" :showConfirmButton="false" :title-style="{'text-align':'left','padding-left':'10px','font-weight':700}" :mask-close-able="true">
|
|
|
|
|
|
|
+ <u-modal v-model="show" :title="title" :showConfirmButton="false" :title-style="{
|
|
|
|
|
+ 'text-align': 'left',
|
|
|
|
|
+ 'padding-left': '10px',
|
|
|
|
|
+ 'font-weight': 700,
|
|
|
|
|
+ }" :mask-close-able="true">
|
|
|
<view class="slot-content">
|
|
<view class="slot-content">
|
|
|
<rich-text :nodes="content"></rich-text>
|
|
<rich-text :nodes="content"></rich-text>
|
|
|
</view>
|
|
</view>
|
|
|
</u-modal>
|
|
</u-modal>
|
|
|
- <view class="top" v-if="side_type==5">
|
|
|
|
|
|
|
+ <view class="top" v-if="side_type == 5">
|
|
|
<view class="backtop" @click="top" v-if="isTop">
|
|
<view class="backtop" @click="top" v-if="isTop">
|
|
|
<image src="../../static/images/1.png" mode="" class="img0"></image>
|
|
<image src="../../static/images/1.png" mode="" class="img0"></image>
|
|
|
</view>
|
|
</view>
|
|
@@ -87,262 +121,399 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+ import {
|
|
|
|
|
+ Debounce
|
|
|
|
|
+ } from "../../util/anitthro.js";
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ diseaseId: 11,
|
|
|
page: 1,
|
|
page: 1,
|
|
|
size: 10,
|
|
size: 10,
|
|
|
eqlistdata: [],
|
|
eqlistdata: [],
|
|
|
- isTop:false,
|
|
|
|
|
- filtrateTF:false,
|
|
|
|
|
- device_status:"",
|
|
|
|
|
- loadingtf:false,//加载提示
|
|
|
|
|
|
|
+ isTop: false,
|
|
|
|
|
+ filtrateTF: false,
|
|
|
|
|
+ device_status: "",
|
|
|
|
|
+ width: 0, //顶部搜索栏宽度
|
|
|
|
|
+ imports: "", //搜索设备id
|
|
|
|
|
+ loadingtf: false,
|
|
|
equipArr: [{
|
|
equipArr: [{
|
|
|
- name: '环境监测',
|
|
|
|
|
|
|
+ name: "环境监测",
|
|
|
type: 5, //5 环境监测 15 管式墒情
|
|
type: 5, //5 环境监测 15 管式墒情
|
|
|
list: [],
|
|
list: [],
|
|
|
pageIndex: 1,
|
|
pageIndex: 1,
|
|
|
- tf:false,
|
|
|
|
|
- }, {
|
|
|
|
|
- name: '管式墒情',
|
|
|
|
|
|
|
+ tf: false,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: "管式墒情",
|
|
|
type: 15, //5 环境监测 15 管式墒情
|
|
type: 15, //5 环境监测 15 管式墒情
|
|
|
list: [],
|
|
list: [],
|
|
|
pageIndex: 1,
|
|
pageIndex: 1,
|
|
|
- tf:false,
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ tf: false,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: "小麦赤霉病",
|
|
|
|
|
+ type: 11, //5 环境监测 15 管式墒情 11小麦赤霉病 19玉米大斑病
|
|
|
|
|
+ list: [],
|
|
|
|
|
+ pageIndex: 1,
|
|
|
|
|
+ tf: false,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: "玉米大斑病",
|
|
|
|
|
+ type: 19, //5 环境监测 15 管式墒情 11小麦赤霉病 19玉米大斑病
|
|
|
|
|
+ list: [],
|
|
|
|
|
+ pageIndex: 1,
|
|
|
|
|
+ tf: false,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: "小麦条锈病",
|
|
|
|
|
+ type: 20, //5 环境监测 15 管式墒情 11小麦赤霉病 19玉米大斑病 20小麦条锈病
|
|
|
|
|
+ list: [],
|
|
|
|
|
+ pageIndex: 1,
|
|
|
|
|
+ tf: false,
|
|
|
|
|
+ },
|
|
|
],
|
|
],
|
|
|
- active:0,//tab选中的下标
|
|
|
|
|
- side_type:5,//当前选中的设备类型
|
|
|
|
|
|
|
+ active: 0, //tab选中的下标
|
|
|
|
|
+ side_type: 5, //当前选中的设备类型
|
|
|
show: false,
|
|
show: false,
|
|
|
title: "",
|
|
title: "",
|
|
|
- content: ""
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ content: "",
|
|
|
|
|
+ };
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- async eqlist() { //设备列表
|
|
|
|
|
- this.loadingtf = true
|
|
|
|
|
|
|
+ async eqlist() {
|
|
|
|
|
+ console.log("搜素字段s", this.imports);
|
|
|
|
|
+ //设备列表 环境监测
|
|
|
|
|
+ this.loadingtf = true;
|
|
|
const res = await this.$myRequest({
|
|
const res = await this.$myRequest({
|
|
|
- url: '/api/api_gateway?method=weather.weather.qxz_page',
|
|
|
|
|
- data: {
|
|
|
|
|
- page: this.page,
|
|
|
|
|
- device_status:this.device_status,
|
|
|
|
|
- page_size: 10,
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- this.loadingtf = false
|
|
|
|
|
- this.eqlistdata = this.eqlistdata.concat(res.ids)
|
|
|
|
|
- console.log(res.ids)
|
|
|
|
|
- },
|
|
|
|
|
- async tubulareqlist() { //设备列表 环境监测
|
|
|
|
|
- this.loadingtf = true
|
|
|
|
|
- const res = await this.$myRequest({
|
|
|
|
|
- url: '/api/api_gateway?method=weather.weather.nd_qxz_page',
|
|
|
|
|
|
|
+ url: "/api/api_gateway?method=weather.weather.qxz_page",
|
|
|
data: {
|
|
data: {
|
|
|
page: this.page,
|
|
page: this.page,
|
|
|
device_status: this.device_status,
|
|
device_status: this.device_status,
|
|
|
page_size: 10,
|
|
page_size: 10,
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- this.loadingtf = false
|
|
|
|
|
- this.eqlistdata = this.eqlistdata.concat(res.ids)
|
|
|
|
|
|
|
+ device_id: this.imports,
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ this.loadingtf = false;
|
|
|
|
|
+ this.eqlistdata = this.eqlistdata.concat(res.ids);
|
|
|
for (var i = 0; i < this.eqlistdata.length; i++) {
|
|
for (var i = 0; i < this.eqlistdata.length; i++) {
|
|
|
if (this.eqlistdata[i].device_expire == 0) {
|
|
if (this.eqlistdata[i].device_expire == 0) {
|
|
|
- this.eqlistdata[i]['device_expiretext'] = "未到期"
|
|
|
|
|
|
|
+ this.eqlistdata[i]["device_expiretext"] = "未到期";
|
|
|
} else if (this.eqlistdata[i].device_expire == 1) {
|
|
} else if (this.eqlistdata[i].device_expire == 1) {
|
|
|
- this.eqlistdata[i]['device_expiretext'] = "已到期"
|
|
|
|
|
|
|
+ this.eqlistdata[i]["device_expiretext"] = "已到期";
|
|
|
} else if (this.eqlistdata[i].device_expire == 2) {
|
|
} else if (this.eqlistdata[i].device_expire == 2) {
|
|
|
- this.eqlistdata[i]['device_expiretext'] = "即将到期"
|
|
|
|
|
|
|
+ this.eqlistdata[i]["device_expiretext"] = "即将到期";
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- console.log(res.ids)
|
|
|
|
|
|
|
+ console.log(res.ids);
|
|
|
|
|
+ },
|
|
|
|
|
+ // weather.weather.nd_qxz_page 管式墒情
|
|
|
|
|
+ async tubulareqlist() {
|
|
|
|
|
+ //设备列表 环境监测
|
|
|
|
|
+ this.loadingtf = true;
|
|
|
|
|
+ const res = await this.$myRequest({
|
|
|
|
|
+ url: "/api/api_gateway?method=weather.weather.nd_qxz_page",
|
|
|
|
|
+ data: {
|
|
|
|
|
+ page: this.page,
|
|
|
|
|
+ device_status: this.device_status,
|
|
|
|
|
+ page_size: 10,
|
|
|
|
|
+ device_id: this.imports,
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ this.loadingtf = false;
|
|
|
|
|
+ this.eqlistdata = this.eqlistdata.concat(res.ids);
|
|
|
|
|
+ },
|
|
|
|
|
+ //设备列表 病害
|
|
|
|
|
+ async getEquipList() {
|
|
|
|
|
+ this.loadingtf = true;
|
|
|
|
|
+ const res = await this.$myRequest({
|
|
|
|
|
+ method: "POST",
|
|
|
|
|
+ url: "/api/api_gateway?method=wheat.wheat.wheat_list",
|
|
|
|
|
+ data: {
|
|
|
|
|
+ device_id: this.imports,
|
|
|
|
|
+ device_name: "",
|
|
|
|
|
+ page: this.page,
|
|
|
|
|
+ device_type: this.diseaseId,
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ this.loadingtf = false;
|
|
|
|
|
+ this.eqlistdata = this.eqlistdata.concat(res.ids);
|
|
|
},
|
|
},
|
|
|
clickRight() {
|
|
clickRight() {
|
|
|
- uni.navigateTo({
|
|
|
|
|
- url: "./search?type="+this.side_type
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.width = 600;
|
|
|
},
|
|
},
|
|
|
clickLeft() {
|
|
clickLeft() {
|
|
|
uni.switchTab({
|
|
uni.switchTab({
|
|
|
- url: "../index/index"
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ url: "../index/index",
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
eqdetails(data) {
|
|
eqdetails(data) {
|
|
|
- if(this.side_type == 5){
|
|
|
|
|
|
|
+ console.log(data, this.side_type);
|
|
|
|
|
+ if (this.side_type == 5) {
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: "./equipment?shebei=" + JSON.stringify(data),
|
|
|
|
|
+ });
|
|
|
|
|
+ } else if (this.side_type == 15) {
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: "./gsequipment?shebei=" + JSON.stringify(data),
|
|
|
|
|
+ });
|
|
|
|
|
+ } else if (this.side_type == 11) {
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
- url: "./equipment?shebei=" + JSON.stringify(data)
|
|
|
|
|
- })
|
|
|
|
|
- }else if(this.side_type == 15){
|
|
|
|
|
|
|
+ url: "../disease/cmb?shebei=" + JSON.stringify(data),
|
|
|
|
|
+ });
|
|
|
|
|
+ } else if (this.side_type == 19) {
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
- url: "./gsequipment?shebei=" + JSON.stringify(data)
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ url: "../disease/cmb?shebei=" + JSON.stringify(data),
|
|
|
|
|
+ });
|
|
|
|
|
+ } else if (this.side_type == 20) {
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: "../disease/cmb?shebei=" + JSON.stringify(data),
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- filtrate(){
|
|
|
|
|
- this.filtrateTF = !this.filtrateTF
|
|
|
|
|
|
|
+ filtrate() {
|
|
|
|
|
+ this.filtrateTF = !this.filtrateTF;
|
|
|
},
|
|
},
|
|
|
top() {
|
|
top() {
|
|
|
uni.pageScrollTo({
|
|
uni.pageScrollTo({
|
|
|
scrollTop: 0,
|
|
scrollTop: 0,
|
|
|
- duration: 500
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ duration: 500,
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ online() {
|
|
|
|
|
+ this.eqlistdata = [];
|
|
|
|
|
+ this.page = 1;
|
|
|
|
|
+ this.device_status = 1;
|
|
|
|
|
+ this.eqlist();
|
|
|
|
|
+ this.filtrateTF = !this.filtrateTF;
|
|
|
},
|
|
},
|
|
|
- online(){
|
|
|
|
|
- this.eqlistdata=[]
|
|
|
|
|
- this.page = 1
|
|
|
|
|
- this.device_status = 1
|
|
|
|
|
- this.eqlist()
|
|
|
|
|
- this.filtrateTF = !this.filtrateTF
|
|
|
|
|
|
|
+ offline() {
|
|
|
|
|
+ this.eqlistdata = [];
|
|
|
|
|
+ this.page = 1;
|
|
|
|
|
+ this.device_status = 0;
|
|
|
|
|
+ this.eqlist();
|
|
|
|
|
+ this.filtrateTF = !this.filtrateTF;
|
|
|
},
|
|
},
|
|
|
- offline(){
|
|
|
|
|
- this.eqlistdata=[]
|
|
|
|
|
- this.page = 1
|
|
|
|
|
- this.device_status = 0
|
|
|
|
|
- this.eqlist()
|
|
|
|
|
- this.filtrateTF = !this.filtrateTF
|
|
|
|
|
|
|
+ complete() {
|
|
|
|
|
+ this.eqlistdata = [];
|
|
|
|
|
+ this.page = 1;
|
|
|
|
|
+ this.device_status = "";
|
|
|
|
|
+ this.eqlist();
|
|
|
|
|
+ this.filtrateTF = !this.filtrateTF;
|
|
|
},
|
|
},
|
|
|
- complete(){
|
|
|
|
|
- this.eqlistdata=[]
|
|
|
|
|
- this.page = 1
|
|
|
|
|
- this.device_status = ""
|
|
|
|
|
- this.eqlist()
|
|
|
|
|
- this.filtrateTF = !this.filtrateTF
|
|
|
|
|
|
|
+ search() {
|
|
|
|
|
+ //搜索按钮搜索
|
|
|
|
|
+ this.searchinp();
|
|
|
},
|
|
},
|
|
|
- tabClick(index,type){
|
|
|
|
|
- this.active = index
|
|
|
|
|
- this.side_type = type
|
|
|
|
|
- this.page = 1
|
|
|
|
|
- if(type == 5){
|
|
|
|
|
- this.eqlistdata = []
|
|
|
|
|
- this.eqlist()
|
|
|
|
|
- }else if(type == 15){
|
|
|
|
|
- this.eqlistdata = []
|
|
|
|
|
- this.tubulareqlist()
|
|
|
|
|
|
|
+ searchinp() {
|
|
|
|
|
+ //自动搜索
|
|
|
|
|
+ Debounce(() => {
|
|
|
|
|
+ this.page = 1;
|
|
|
|
|
+ if (this.side_type == 5) {
|
|
|
|
|
+ this.eqlistdata = [];
|
|
|
|
|
+ this.eqlist();
|
|
|
|
|
+ } else if (this.side_type == 15) {
|
|
|
|
|
+ this.eqlistdata = [];
|
|
|
|
|
+ this.tubulareqlist();
|
|
|
|
|
+ } else if (
|
|
|
|
|
+ this.side_type == 11 ||
|
|
|
|
|
+ this.side_type == 19 ||
|
|
|
|
|
+ this.side_type == 20
|
|
|
|
|
+ ) {
|
|
|
|
|
+ this.eqlistdata = [];
|
|
|
|
|
+ this.getEquipList();
|
|
|
|
|
+ }
|
|
|
|
|
+ }, 1000)();
|
|
|
|
|
+ },
|
|
|
|
|
+ tabClick(index, type) {
|
|
|
|
|
+ this.active = index;
|
|
|
|
|
+ this.side_type = type;
|
|
|
|
|
+ this.page = 1;
|
|
|
|
|
+ if (type == 5) {
|
|
|
|
|
+ this.eqlistdata = [];
|
|
|
|
|
+ this.eqlist();
|
|
|
|
|
+ } else if (type == 15) {
|
|
|
|
|
+ this.eqlistdata = [];
|
|
|
|
|
+ this.tubulareqlist();
|
|
|
|
|
+ } else if (type == 11) {
|
|
|
|
|
+ this.diseaseId = type;
|
|
|
|
|
+ this.eqlistdata = [];
|
|
|
|
|
+ this.getEquipList();
|
|
|
|
|
+ } else if (type == 19) {
|
|
|
|
|
+ this.diseaseId = type;
|
|
|
|
|
+ this.eqlistdata = [];
|
|
|
|
|
+ this.getEquipList();
|
|
|
|
|
+ } else if (type == 20) {
|
|
|
|
|
+ this.diseaseId = type;
|
|
|
|
|
+ this.eqlistdata = [];
|
|
|
|
|
+ this.getEquipList();
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
examine(e) {
|
|
examine(e) {
|
|
|
// console.log(this)
|
|
// console.log(this)
|
|
|
- this.show = true
|
|
|
|
|
- this.title = e.device_expiretext
|
|
|
|
|
- this.content = `<p style="padding-left:10px;margin:10px 0;font-size:14px;">到期时间 ${this.timezhuan(e.device_expire_time)}
|
|
|
|
|
- </p><p style="font-size:14px;text-align:right;color:#3C84FE;margin-bottom:10px;padding-right:10px">注:请前往PC端进行充值</p>`
|
|
|
|
|
|
|
+ this.show = true;
|
|
|
|
|
+ this.title = e.device_expiretext;
|
|
|
|
|
+ this.content =
|
|
|
|
|
+ `<p style="padding-left:10px;margin:10px 0;font-size:14px;">到期时间 ${this.timezhuan(
|
|
|
|
|
+ e.device_expire_time
|
|
|
|
|
+ )}
|
|
|
|
|
+ </p><p style="font-size:14px;text-align:right;color:#3C84FE;margin-bottom:10px;padding-right:10px">注:请前往PC端进行充值</p>`;
|
|
|
},
|
|
},
|
|
|
timezhuan(time) {
|
|
timezhuan(time) {
|
|
|
function fun(a) {
|
|
function fun(a) {
|
|
|
- return String(a).length == 1 ? '0' + a : a
|
|
|
|
|
|
|
+ return String(a).length == 1 ? "0" + a : a;
|
|
|
}
|
|
}
|
|
|
- let date = new Date(time * 1000)
|
|
|
|
|
- let y = date.getFullYear()
|
|
|
|
|
- let m = date.getMonth() + 1
|
|
|
|
|
- let d = date.getDate()
|
|
|
|
|
- let h = date.getHours()
|
|
|
|
|
- let min = date.getMinutes()
|
|
|
|
|
- let sec = date.getSeconds()
|
|
|
|
|
- return `${y}-${fun(m)}-${fun(d)} ${fun(h)}:${fun(min)}:${fun(sec)}`
|
|
|
|
|
|
|
+ let date = new Date(time * 1000);
|
|
|
|
|
+ let y = date.getFullYear();
|
|
|
|
|
+ let m = date.getMonth() + 1;
|
|
|
|
|
+ let d = date.getDate();
|
|
|
|
|
+ let h = date.getHours();
|
|
|
|
|
+ let min = date.getMinutes();
|
|
|
|
|
+ let sec = date.getSeconds();
|
|
|
|
|
+ return `${y}-${fun(m)}-${fun(d)} ${fun(h)}:${fun(min)}:${fun(sec)}`;
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
onLoad() {
|
|
onLoad() {
|
|
|
- this.eqlist()
|
|
|
|
|
|
|
+ this.eqlist();
|
|
|
uni.getStorage({
|
|
uni.getStorage({
|
|
|
- key:"jurisdiction",
|
|
|
|
|
- success:(res)=>{
|
|
|
|
|
- let items = JSON.parse(res.data).filter((item)=>{
|
|
|
|
|
- return item.purview_name == "环境监测系统"
|
|
|
|
|
- })
|
|
|
|
|
- var itemarr = items[0].children
|
|
|
|
|
- console.log(itemarr)
|
|
|
|
|
- for(var i =0;i<itemarr.length;i++){
|
|
|
|
|
- switch (itemarr[i].purview_name){
|
|
|
|
|
- case "环境监测":
|
|
|
|
|
- this.equipArr[0].tf = true
|
|
|
|
|
- break
|
|
|
|
|
- case "管式墒情":
|
|
|
|
|
- this.equipArr[1].tf = true
|
|
|
|
|
- break
|
|
|
|
|
|
|
+ key: "jurisdiction",
|
|
|
|
|
+ success: (res) => {
|
|
|
|
|
+ let items = JSON.parse(res.data).filter((item) => {
|
|
|
|
|
+ return item.pur_id == 40;
|
|
|
|
|
+ });
|
|
|
|
|
+ var itemarr = items[0].children;
|
|
|
|
|
+ console.log(itemarr);
|
|
|
|
|
+ for (var i = 0; i < itemarr.length; i++) {
|
|
|
|
|
+ switch (itemarr[i].pur_id) {
|
|
|
|
|
+ case 41:
|
|
|
|
|
+ this.equipArr[0].tf = true;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 170:
|
|
|
|
|
+ this.equipArr[1].tf = true;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 218:
|
|
|
|
|
+ this.equipArr[2].tf = true;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 219:
|
|
|
|
|
+ this.equipArr[3].tf = true;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 220:
|
|
|
|
|
+ this.equipArr[4].tf = true;
|
|
|
|
|
+ break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
onReachBottom() {
|
|
onReachBottom() {
|
|
|
- this.page++
|
|
|
|
|
- this.eqlist()
|
|
|
|
|
|
|
+ this.page++;
|
|
|
|
|
+ if (this.side_type == 5) {
|
|
|
|
|
+ this.eqlist();
|
|
|
|
|
+ } else if (this.side_type == 15) {
|
|
|
|
|
+ this.tubulareqlist();
|
|
|
|
|
+ } else if (
|
|
|
|
|
+ this.side_type == 11 ||
|
|
|
|
|
+ this.side_type == 19 ||
|
|
|
|
|
+ this.side_type == 20
|
|
|
|
|
+ ) {
|
|
|
|
|
+ this.getEquipList();
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
- onPageScroll(e) { //nvue暂不支持滚动监听,可用bindingx代替
|
|
|
|
|
- if (e.scrollTop > 200) { //距离大于200时显示
|
|
|
|
|
- this.isTop = true
|
|
|
|
|
- } else { //距离小于200时隐藏
|
|
|
|
|
- this.isTop = false
|
|
|
|
|
|
|
+ onPageScroll(e) {
|
|
|
|
|
+ //nvue暂不支持滚动监听,可用bindingx代替
|
|
|
|
|
+ if (e.scrollTop > 200) {
|
|
|
|
|
+ //距离大于200时显示
|
|
|
|
|
+ this.isTop = true;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ //距离小于200时隐藏
|
|
|
|
|
+ this.isTop = false;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- }
|
|
|
|
|
|
|
+ };
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
<style lang="scss">
|
|
|
|
|
+ page {
|
|
|
|
|
+ background: $uni-bg-color-grey;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .inputs {
|
|
|
|
|
+ height: 54rpx;
|
|
|
|
|
+ background-color: #e4e4e4;
|
|
|
|
|
+ border-radius: 27rpx;
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ right: 20rpx;
|
|
|
|
|
+ top: 20rpx;
|
|
|
|
|
+ transition: width 0.5s;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ padding-top: 8rpx;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+
|
|
|
|
|
+ .inputbox {
|
|
|
|
|
+ width: 85%;
|
|
|
|
|
+ text-indent: 1rem;
|
|
|
|
|
+ font-size: 26rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .icon {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top: 8rpx;
|
|
|
|
|
+ right: 26rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/deep/.uni-icons {
|
|
/deep/.uni-icons {
|
|
|
font-size: 40rpx !important;
|
|
font-size: 40rpx !important;
|
|
|
}
|
|
}
|
|
|
- page{
|
|
|
|
|
- background: $uni-bg-color-grey;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
.image {
|
|
.image {
|
|
|
position: fixed;
|
|
position: fixed;
|
|
|
- top: 80px;
|
|
|
|
|
|
|
+ top: 84px;
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
height: 160rpx;
|
|
height: 160rpx;
|
|
|
z-index: 555;
|
|
z-index: 555;
|
|
|
}
|
|
}
|
|
|
- .loading{
|
|
|
|
|
|
|
+
|
|
|
|
|
+ .loading {
|
|
|
position: fixed;
|
|
position: fixed;
|
|
|
top: 440px;
|
|
top: 440px;
|
|
|
width: 95%;
|
|
width: 95%;
|
|
|
left: 2.5%;
|
|
left: 2.5%;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
- .img{
|
|
|
|
|
|
|
+ z-index: 9;
|
|
|
|
|
+
|
|
|
|
|
+ .img {
|
|
|
width: 300rpx;
|
|
width: 300rpx;
|
|
|
height: 40rpx;
|
|
height: 40rpx;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- .bases_search {
|
|
|
|
|
- width: 60%;
|
|
|
|
|
- background-color: #FFFFFF;
|
|
|
|
|
- position: absolute;
|
|
|
|
|
- top: 10rpx;
|
|
|
|
|
- left: 50%;
|
|
|
|
|
- margin-left: -33%;
|
|
|
|
|
- .bases_search_text {
|
|
|
|
|
- width: 90%;
|
|
|
|
|
- margin: 0 auto;
|
|
|
|
|
- background-color: #F8F8F8;
|
|
|
|
|
- height: 60rpx;
|
|
|
|
|
- border-radius: 30rpx;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- line-height: 60rpx;
|
|
|
|
|
- .search {
|
|
|
|
|
- padding: 0 20rpx;
|
|
|
|
|
- font-size: 34rpx;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- input {
|
|
|
|
|
- width: 80%;
|
|
|
|
|
- margin-top: 10rpx;
|
|
|
|
|
- font-size: 28rpx;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ .tab-box::-webkit-scrollbar {
|
|
|
|
|
+ display: none;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.tab-box {
|
|
.tab-box {
|
|
|
position: fixed;
|
|
position: fixed;
|
|
|
- top: 159px;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: space-around;
|
|
|
|
|
|
|
+ top: 170px;
|
|
|
|
|
+ // display: flex;
|
|
|
|
|
+ // justify-content: space-around;
|
|
|
font-size: 30rpx;
|
|
font-size: 30rpx;
|
|
|
line-height: 80rpx;
|
|
line-height: 80rpx;
|
|
|
- background-color: #FFFFFF;
|
|
|
|
|
|
|
+ background-color: #ffffff;
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
z-index: 2;
|
|
z-index: 2;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ overflow-x: scroll;
|
|
|
|
|
+ white-space: nowrap;
|
|
|
|
|
+
|
|
|
.tab-item {
|
|
.tab-item {
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
position: relative;
|
|
position: relative;
|
|
|
- };
|
|
|
|
|
|
|
+ width: 25%;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ display: inline-block;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
.tab-item.active {
|
|
.tab-item.active {
|
|
|
.bottom-line {
|
|
.bottom-line {
|
|
|
bottom: 0;
|
|
bottom: 0;
|
|
@@ -357,10 +528,11 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.prevents {
|
|
.prevents {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
- top: 170px;
|
|
|
|
|
|
|
+ top: 180px;
|
|
|
|
|
|
|
|
.prevents_item {
|
|
.prevents_item {
|
|
|
width: 95%;
|
|
width: 95%;
|
|
@@ -371,6 +543,7 @@
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
position: relative;
|
|
position: relative;
|
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
|
|
|
+
|
|
|
.prevents_item_img {
|
|
.prevents_item_img {
|
|
|
width: 30rpx;
|
|
width: 30rpx;
|
|
|
height: 50rpx;
|
|
height: 50rpx;
|
|
@@ -383,7 +556,7 @@
|
|
|
display: flex;
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
|
height: 60rpx;
|
|
height: 60rpx;
|
|
|
- border-bottom: 2rpx solid #F4F4F4;
|
|
|
|
|
|
|
+ border-bottom: 2rpx solid #f4f4f4;
|
|
|
line-height: 60rpx;
|
|
line-height: 60rpx;
|
|
|
font-size: 26rpx;
|
|
font-size: 26rpx;
|
|
|
|
|
|
|
@@ -392,49 +565,55 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.green {
|
|
.green {
|
|
|
- color: #7DBB91;
|
|
|
|
|
|
|
+ color: #7dbb91;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.prevents_item_bot {
|
|
.prevents_item_bot {
|
|
|
margin-top: 20rpx;
|
|
margin-top: 20rpx;
|
|
|
font-size: 26rpx;
|
|
font-size: 26rpx;
|
|
|
- color: #BDBDBD;
|
|
|
|
|
|
|
+ color: #bdbdbd;
|
|
|
|
|
+
|
|
|
.prevents_item_bot_sapn0 {
|
|
.prevents_item_bot_sapn0 {
|
|
|
- color: #00B075;
|
|
|
|
|
|
|
+ color: #00b075;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
.prevents_item_bot_sapn1 {
|
|
.prevents_item_bot_sapn1 {
|
|
|
- color: #FF4747;
|
|
|
|
|
|
|
+ color: #ff4747;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
.prevents_item_bot_sapn2 {
|
|
.prevents_item_bot_sapn2 {
|
|
|
- color: #FFAB00;
|
|
|
|
|
|
|
+ color: #ffab00;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.top {
|
|
.top {
|
|
|
position: fixed;
|
|
position: fixed;
|
|
|
right: 10px;
|
|
right: 10px;
|
|
|
bottom: 40px;
|
|
bottom: 40px;
|
|
|
z-index: 100;
|
|
z-index: 100;
|
|
|
|
|
+
|
|
|
image {
|
|
image {
|
|
|
width: 100rpx;
|
|
width: 100rpx;
|
|
|
height: 100rpx;
|
|
height: 100rpx;
|
|
|
}
|
|
}
|
|
|
- .backtop{
|
|
|
|
|
|
|
+
|
|
|
|
|
+ .backtop {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
justify-content: flex-end;
|
|
justify-content: flex-end;
|
|
|
margin-bottom: 10rpx;
|
|
margin-bottom: 10rpx;
|
|
|
}
|
|
}
|
|
|
- .more{
|
|
|
|
|
|
|
+
|
|
|
|
|
+ .more {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
}
|
|
}
|
|
|
- .box{
|
|
|
|
|
|
|
+
|
|
|
|
|
+ .box {
|
|
|
width: 80rpx;
|
|
width: 80rpx;
|
|
|
height: 80rpx;
|
|
height: 80rpx;
|
|
|
- background-color: rgba(161,161,161,0.45);
|
|
|
|
|
|
|
+ background-color: rgba(161, 161, 161, 0.45);
|
|
|
border-radius: 50%;
|
|
border-radius: 50%;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
line-height: 80rpx;
|
|
line-height: 80rpx;
|