Compare commits

...

3 Commits

Author SHA1 Message Date
978184212@qq.com a47eab0d42 样式修改 2025-11-17 16:29:40 +08:00
978184212@qq.com 65c1a8d1c8 Merge branch 'main' of https://zhgit.sxzooh.com/Administrator/FenXiNspUniapp into main 2025-11-15 15:03:03 +08:00
978184212@qq.com 4eea49358c 样式修改 2025-11-15 15:02:51 +08:00
10 changed files with 1926 additions and 1910 deletions

View File

@ -601,7 +601,18 @@
}, },
tojk(item,index){ tojk(item,index){
let items = item.deployCode.split('-') let items = item.deployCode.split('-')
uni.openEmbeddedMiniProgram({ appId: 'wxf2b3a0262975d8c2', path: '/pages/live/live?accessToken=' + this.token +'&deviceSerial=' + items[0] + '&channelNo=' + items[1]}) var obj = {
url: "https://m.ilhzn.cn/#/pages/cameraView/ysyCamera",
deployDes: item.deployDes + '-' + '',
ysToken: this.token,
deviceIotUrl: item.deviceUrl
};
const queryString = Object.keys(obj).map((key) =>
`${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join("&");
const webviewUrl = `/packDetail1/pages/device/index4?${queryString}`;
uni.navigateTo({
url: webviewUrl
});
}, },
changetab(index){ changetab(index){
this.isActive = index this.isActive = index

View File

@ -40,7 +40,7 @@
<view class="padding text-center margin-top"> <view class="padding text-center margin-top">
<button class="login-btn block bg-blue lg round" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">获取手机号登录</button> <button class="login-btn block bg-blue lg round" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">获取手机号登录</button>
<view class="botbq"> <view class="botbq">
版权所有@河津市农业农村局 版权所有@
</view> </view>
</view> </view>
</view> --> </view> -->

View File

@ -15,16 +15,17 @@
</picker> </picker>
</view> </view>
</view> </view>
<view class="form_item" v-if="details.maintainData3">
<view class="form_top">
站点位置:
</view>
<input type="text" placeholder="" disabled="true" v-model="details.maintainData3">
</view>
<view class="form_item"> <view class="form_item">
<view class="form_top"> <view class="form_top">
维护内容: 监测情况:
</view> </view>
<view class="form_bot"> <view class="form_bot">
<!-- <uni-section type="line">
<view class="uni-px-5 uni-pb-5">
<uni-data-checkbox @change="change1" selectedColor="#47c693" mode="tag" v-model="details.itemId" :localdata="hobby"></uni-data-checkbox>
</view>
</uni-section> -->
<view class="uni-textarea"> <view class="uni-textarea">
<textarea placeholder-style="color:#808080" auto-height placeholder="请输入内容" @blur="bindTextAreaBlur"/> <textarea placeholder-style="color:#808080" auto-height placeholder="请输入内容" @blur="bindTextAreaBlur"/>
</view> </view>
@ -32,14 +33,22 @@
</view> </view>
<view class="form_item"> <view class="form_item">
<view class="form_top"> <view class="form_top">
维护: 负责:
</view> </view>
<!-- <view class="form_bot" @click="tolist()"> <input type="text" placeholder="请输入负责人姓名" v-model="details.maintainPerson">
<view class="checkpeople"> </view>
+ 选择维护人 <view class="form_item">
</view> <view class="form_top">
</view> --> 联系方式:
<input type="text" placeholder="请输入运维人姓名" v-model="details.maintainPerson"> </view>
<input
type="text"
placeholder="请输入联系方式"
v-model="details.maintainData2"
@blur="validatePhone"
maxlength="11"
/>
<view class="error-text" v-if="phoneError">{{phoneError}}</view>
</view> </view>
<view class="form_item"> <view class="form_item">
<view class="form_top"> <view class="form_top">
@ -84,16 +93,17 @@
isDel: 0, isDel: 0,
itemId: "", itemId: "",
maintainData1: "", maintainData1: "",
maintainData2: "",
maintainNote: "", maintainNote: "",
maintainPerson: "", maintainPerson: "",
maintainData2:"",
maintainData3: "",
maintainTime: "", maintainTime: "",
reVision: 0, reVision: 0,
stationCode: "", stationCode: "",
stationName: "", stationName: "",
tenantId: "", tenantId: "",
updatedBy: "", updatedBy: "",
updatedTime: "" updatedTime: "",
}, },
index:'', index:'',
date:'', date:'',
@ -102,7 +112,8 @@
tag:'', tag:'',
hobby: [], hobby: [],
checkbox1: [], checkbox1: [],
reload:'true' reload:'true',
phoneError: '', //
} }
}, },
onLoad() { onLoad() {
@ -120,15 +131,14 @@
for(var i=0;i<res.data.data.length;i++){ for(var i=0;i<res.data.data.length;i++){
this.arrays.push({ this.arrays.push({
label:res.data.data[i].stationName, label:res.data.data[i].stationName,
value:res.data.data[i].stationCode value:res.data.data[i].stationCode,
add:res.data.data[i].stationLocation
}) })
this.array.push(res.data.data[i].stationName) this.array.push(res.data.data[i].stationName)
console.log(this.array)
} }
}) })
}, },
bindTextAreaBlur(e) { bindTextAreaBlur(e) {
console.log("00",e.detail.value)
this.details.maintainData1 = e.detail.value this.details.maintainData1 = e.detail.value
}, },
// //
@ -140,12 +150,10 @@
text:res.data.data[i].maintainData1, text:res.data.data[i].maintainData1,
value:res.data.data[i].id value:res.data.data[i].id
}) })
console.log(this.hobby)
} }
}) })
}, },
bindPickerChange: function(e) { bindPickerChange: function(e) {
console.log('picker发送选择改变携带值为', e.detail.value)
this.index = e.detail.value this.index = e.detail.value
this.details.stationName = this.array[this.index] this.details.stationName = this.array[this.index]
for(var i=0;i<this.arrays.length;i++){ for(var i=0;i<this.arrays.length;i++){
@ -153,10 +161,30 @@
this.details.stationCode = this.arrays[i].value this.details.stationCode = this.arrays[i].value
} }
} }
this.details.maintainData3 = this.arrays[this.index].add
}, },
bindDateChange: function(e) { bindDateChange: function(e) {
this.details.maintainTime = e.detail.value this.details.maintainTime = e.detail.value
}, },
//
validatePhone() {
const phone = this.details.maintainData2;
if (!phone) {
this.phoneError = '';
return true;
}
//
const phoneRegex = /^1[3-9]\d{9}$/;
if (!phoneRegex.test(phone)) {
this.phoneError = '请输入正确的手机号码';
return false;
} else {
this.phoneError = '';
return true;
}
},
// //
tosubmit(){ tosubmit(){
if(!this.details.stationName){ if(!this.details.stationName){
@ -169,7 +197,7 @@
} }
if(!this.details.maintainData1){ if(!this.details.maintainData1){
uni.showToast({ uni.showToast({
title: "请填写维护内容", title: "请填写监测情况",
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
@ -177,12 +205,29 @@
} }
if(!this.details.maintainPerson){ if(!this.details.maintainPerson){
uni.showToast({ uni.showToast({
title: "请输入运维人姓名", title: "请输入负责人姓名",
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
return return
} }
if(!this.details.maintainData2){
uni.showToast({
title: "请输入联系方式",
icon: 'none',
duration: 2000
})
return
}
//
if (!this.validatePhone()) {
uni.showToast({
title: "请输入正确的手机号码",
icon: 'none',
duration: 2000
})
return;
}
if(!this.details.maintainTime){ if(!this.details.maintainTime){
uni.showToast({ uni.showToast({
title: "请选择维护时间", title: "请选择维护时间",
@ -315,4 +360,14 @@
text-align: center; text-align: center;
color: #0472e3; color: #0472e3;
} }
.error-text {
color: #ff0000;
font-size: 24rpx;
margin-top: 10rpx;
}
//
.form_item input:focus {
border: 1rpx solid #ff0000;
}
</style> </style>

View File

@ -15,9 +15,15 @@
</picker> </picker>
</view> </view>
</view> </view>
<view class="form_item" v-if="details.maintainData3">
<view class="form_top">
站点位置:
</view>
<input type="text" placeholder="" v-model="details.maintainData3">
</view>
<view class="form_item"> <view class="form_item">
<view class="form_top"> <view class="form_top">
维护内容: 检测情况:
</view> </view>
<view class="form_bot"> <view class="form_bot">
<uni-section type="line"> <uni-section type="line">
@ -29,13 +35,8 @@
</view> </view>
<view class="form_item"> <view class="form_item">
<view class="form_top"> <view class="form_top">
维护: 负责:
</view> </view>
<!-- <view class="form_bot" @click="tolist()">
<view class="checkpeople">
+ 选择维护人
</view>
</view> -->
<input type="text" placeholder="请输入运维人姓名" v-model="details.maintainPerson"> <input type="text" placeholder="请输入运维人姓名" v-model="details.maintainPerson">
</view> </view>
<view class="form_item"> <view class="form_item">
@ -82,6 +83,7 @@
itemId: "", itemId: "",
maintainData1: "", maintainData1: "",
maintainData2: "", maintainData2: "",
maintainData3:"",
maintainNote: "", maintainNote: "",
maintainPerson: "", maintainPerson: "",
maintainTime: "", maintainTime: "",
@ -91,7 +93,7 @@
stationName: "", stationName: "",
tenantId: "", tenantId: "",
updatedBy: "", updatedBy: "",
updatedTime: "" updatedTime: "",
}, },
index:'', index:'',
date:'', date:'',
@ -119,10 +121,10 @@
for(var i=0;i<res.data.data.length;i++){ for(var i=0;i<res.data.data.length;i++){
this.arrays.push({ this.arrays.push({
label:res.data.data[i].stationName, label:res.data.data[i].stationName,
value:res.data.data[i].stationCode value:res.data.data[i].stationCode,
add:res.data.data[i].stationLocation
}) })
this.array.push(res.data.data[i].stationName) this.array.push(res.data.data[i].stationName)
console.log(this.array)
} }
}) })
}, },
@ -135,12 +137,10 @@
text:res.data.data[i].omName, text:res.data.data[i].omName,
value:res.data.data[i].id value:res.data.data[i].id
}) })
console.log(this.hobby)
} }
}) })
}, },
bindPickerChange: function(e) { bindPickerChange: function(e) {
console.log('picker发送选择改变携带值为', e.detail.value)
this.index = e.detail.value this.index = e.detail.value
this.details.stationName = this.array[this.index] this.details.stationName = this.array[this.index]
for(var i=0;i<this.arrays.length;i++){ for(var i=0;i<this.arrays.length;i++){
@ -148,12 +148,12 @@
this.details.stationCode = this.arrays[i].value this.details.stationCode = this.arrays[i].value
} }
} }
this.details.maintainData3 = this.arrays[this.index].add
}, },
bindDateChange: function(e) { bindDateChange: function(e) {
this.details.maintainTime = e.detail.value this.details.maintainTime = e.detail.value
}, },
change1(e){ change1(e){
console.log(e)
this.details.itemId = e.detail.value this.details.itemId = e.detail.value
}, },
// //

View File

@ -36,15 +36,23 @@
<image src="../../static/dian.png" mode=""></image> <image src="../../static/dian.png" mode=""></image>
</view> </view>
</view> </view>
<view class="bot_item" v-if="item.maintainData3">
<span class="nrbt">站点位置:</span>
<span class="number">{{item.maintainData3}}</span>
</view>
<view class="itembox_bot" @click="todetails(item,index)"> <view class="itembox_bot" @click="todetails(item,index)">
<view class="bot_item"> <view class="bot_item">
<span class="nrbt">维护内容:</span> <span class="nrbt">监测情况:</span>
{{item.maintainData1}} {{item.maintainData1}}
</view> </view>
<view class="bot_item"> <view class="bot_item">
<span class="nrbt">维护人员:</span> <span class="nrbt">负责人员:</span>
<span class="number">{{item.maintainPerson}}</span> <span class="number">{{item.maintainPerson}}</span>
</view> </view>
<view class="bot_item" v-if="item.maintainData2">
<span class="nrbt">联系方式:</span>
<span class="number">{{item.maintainData2}}</span>
</view>
<view class="bot_item"> <view class="bot_item">
<span class="nrbt">维护时间:</span> <span class="nrbt">维护时间:</span>
{{item.maintainTime}} {{item.maintainTime}}

View File

@ -168,7 +168,7 @@
dictLabel:'监测站告警' dictLabel:'监测站告警'
}, },
{ {
dictLabel:'杀虫灯告警' dictLabel:'异常趋势图'
} }
], ],
isActive:0, isActive:0,

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="container"> <view class="container">
<view class="liebiaos" v-if="List.length != 0"> <view class="liebiaos" v-if="List.length != 0">
<scroll-view :style="{height:scorllheight + 'rpx'}" scroll-y="true" class="scroll-Y" @scrolltolower="lower"> <scroll-view :style="{height:scorllheight + 'rpx'}" scroll-y="true" class="scroll-Y" @scrolltolower="lower">
<view class="item_jklist" v-for="(item,index) in List" :key="index"> <view class="item_jklist" v-for="(item,index) in List" :key="index">
<view class="itembox_top"> <view class="itembox_top">
@ -12,16 +12,16 @@
</view> </view>
</view> </view>
<view class="bot_box"> <view class="bot_box">
<view class="bot_left" v-for="(it,i) in item.depUrlArr" :key="i" @click="todetail(it,i,item)"> <view class="bot_left" v-for="(it,i) in item.depUrlArr" :key="i" @click="todetail(it,i,item)">
<view class="botleft_bot"> <view class="botleft_bot">
<view class=""> <view class="">
{{item.depDesArr[i]}} {{item.depDesArr[i]}}
</view>
</view>
<view class="botleft_top">
<image src="../../static/mrt.png" mode=""></image>
</view> </view>
</view> </view>
<view class="botleft_top">
<image src="../../static/mrt.png" mode=""></image>
</view>
</view>
</view> </view>
</view> </view>
<view class="load"> <view class="load">
@ -44,34 +44,34 @@
import api from "@/api/api" import api from "@/api/api"
import configService from '@/common/service/config.service.js'; import configService from '@/common/service/config.service.js';
export default { export default {
data(){ data() {
return{ return {
height:0, height: 0,
scorllheight:0, scorllheight: 0,
baseUrl:configService.apiUrl, baseUrl: configService.apiUrl,
allNum: '', allNum: '',
isLastpage: '', isLastpage: '',
intervalId: null, intervalId: null,
loadStatus:'more', //more-loading-nomore- loadStatus: 'more', //more-loading-nomore-
isLoadMore:false, // isLoadMore: false, //
show:false, show: false,
show1:false, show1: false,
top:0, top: 0,
List:[], List: [],
pageNo:1, pageNo: 1,
pageSize:4, pageSize: 4,
token:'', token: '',
sxtlist:[] sxtlist: []
} }
}, },
onLoad() { onLoad() {
uni.getSystemInfo({ uni.getSystemInfo({
success: res => { success: res => {
var pxToRpxScale = 750 / res.windowWidth var pxToRpxScale = 750 / res.windowWidth
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
var navigationHeight = 44 * pxToRpxScale var navigationHeight = 44 * pxToRpxScale
this.height = res.windowHeight * pxToRpxScale//px rpx this.height = res.windowHeight * pxToRpxScale //px rpx
console.log(this.height,ktxStatusHeight,navigationHeight) console.log(this.height, ktxStatusHeight, navigationHeight)
this.scorllheight = this.height this.scorllheight = this.height
} }
}); });
@ -81,22 +81,22 @@
onShow() { onShow() {
uni.getSystemInfo({ uni.getSystemInfo({
success: res => { success: res => {
var pxToRpxScale = 750 / res.windowWidth var pxToRpxScale = 750 / res.windowWidth
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
var navigationHeight = 44 * pxToRpxScale var navigationHeight = 44 * pxToRpxScale
this.height = res.windowHeight * pxToRpxScale//px rpx this.height = res.windowHeight * pxToRpxScale //px rpx
console.log(this.height,ktxStatusHeight,navigationHeight) console.log(this.height, ktxStatusHeight, navigationHeight)
this.scorllheight = this.height this.scorllheight = this.height
} }
}); });
}, },
methods:{ methods: {
getToken(){ getToken() {
this.$http.post('/applet/ysyun/getYsToken').then(res =>{ this.$http.post('/applet/ysyun/getYsToken').then(res => {
this.token = res.data.data.ysToken this.token = res.data.data.ysToken
}) })
}, },
getList(){ getList() {
let params = {} let params = {}
params.pageNo = this.pageNo params.pageNo = this.pageNo
params.pageSize = this.pageSize params.pageSize = this.pageSize
@ -104,38 +104,40 @@
title: '加载中' title: '加载中'
}); });
this.List = [] this.List = []
this.$http.get('/applet/survDeviceDeploy/list',{params:params}).then(res =>{ this.$http.get('/applet/survDeviceDeploy/list', {
if(res.data.code == 0){ params: params
}).then(res => {
if (res.data.code == 0) {
var data = res.data.data var data = res.data.data
this.List = this.List.concat(data) this.List = this.List.concat(data)
if(data.length != 0){ if (data.length != 0) {
this.allNum = Number(data.length)/Number(this.pageSize)+''; this.allNum = Number(data.length) / Number(this.pageSize) + '';
console.log(this.allNum,'总页数') console.log(this.allNum, '总页数')
if(this.allNum.indexOf('.') == -1) { if (this.allNum.indexOf('.') == -1) {
this.allNum = this.allNum; this.allNum = this.allNum;
console.log(this.allNum,'if') console.log(this.allNum, 'if')
} else { } else {
this.allNum = parseInt(Number(this.allNum)+1); this.allNum = parseInt(Number(this.allNum) + 1);
console.log(this.allNum,'else') console.log(this.allNum, 'else')
} }
console.log(this.pageNo,this.allNum,'156156') console.log(this.pageNo, this.allNum, '156156')
if(this.pageNo == this.allNum) { if (this.pageNo == this.allNum) {
this.isLastpage = true; this.isLastpage = true;
this.loadStatus='nomore' this.loadStatus = 'nomore'
console.log(this.isLastpage,'true','nomore') console.log(this.isLastpage, 'true', 'nomore')
} else { } else {
this.isLastpage = false; this.isLastpage = false;
// this.isLoadMore=true // this.isLoadMore=true
this.loadStatus = 'more' this.loadStatus = 'more'
console.log(this.isLastpage,'false') console.log(this.isLastpage, 'false')
} }
}else{ } else {
this.isLastpage = true; this.isLastpage = true;
this.loadStatus='nomore' this.loadStatus = 'nomore'
} }
} }
uni.hideLoading(); uni.hideLoading();
this.isRefresher= false this.isRefresher = false
}) })
}, },
lower() { lower() {
@ -147,77 +149,85 @@
clearInterval(this.intervalId); clearInterval(this.intervalId);
var num = 1; var num = 1;
this.intervalId = setInterval(() => { this.intervalId = setInterval(() => {
num = num+1; num = num + 1;
},1000) }, 1000)
console.log(this.intervalId,num) console.log(this.intervalId, num)
this.pageNo = this.pageNo + 1; this.pageNo = this.pageNo + 1;
let params = {} let params = {}
params.pageNo = this.pageNo params.pageNo = this.pageNo
params.pageSize = this.pageSize params.pageSize = this.pageSize
this.$http.get('/applet/survDeviceDeploy/list',{params:params}).then(res =>{ this.$http.get('/applet/survDeviceDeploy/list', {
if(res.data.code == 0){ params: params
}).then(res => {
if (res.data.code == 0) {
var data = res.data.data var data = res.data.data
this.List = this.List.concat(data) this.List = this.List.concat(data)
if(data.length != 0){ if (data.length != 0) {
if(this.pageNo == this.allNum) { if (this.pageNo == this.allNum) {
this.isLastpage = true; this.isLastpage = true;
this.loadStatus='nomore' this.loadStatus = 'nomore'
console.log(this.isLastpage,'true') console.log(this.isLastpage, 'true')
} else { } else {
this.isLastpage = false; this.isLastpage = false;
// this.isLoadMore=true // this.isLoadMore=true
this.loadStatus = 'more' this.loadStatus = 'more'
console.log(this.isLastpage,'false') console.log(this.isLastpage, 'false')
} }
}else{ } else {
this.isLastpage = true; this.isLastpage = true;
this.loadStatus='nomore' this.loadStatus = 'nomore'
} }
} }
}) })
}, },
todetail(it,i,val){ todetail(it, i, val) {
let item = it.split('-') let item = it.split('-')
// utils_config.config.h5LinkIp // utils_config.config.h5LinkIp
var obj = { var obj = {
url: "https://m.ilhzn.cn/#/pages/cameraView/ysyCamera", url: "https://m.ilhzn.cn/#/pages/cameraView/ysyCamera",
deployDes: val.stationName+'-'+val.depDesArr[i], deployDes: val.stationName + '-' + val.depDesArr[i],
ysToken: this.token, ysToken: this.token,
deviceIotUrl: item[0] deviceIotUrl: item[0]
}; };
const queryString = Object.keys(obj).map((key) => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join("&"); const queryString = Object.keys(obj).map((key) =>
const webviewUrl = `/packDetail1/pages/device/index4?${queryString}`; `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join("&");
uni.navigateTo({ const webviewUrl = `/packDetail1/pages/device/index4?${queryString}`;
url: webviewUrl uni.navigateTo({
}); url: webviewUrl
});
} }
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
page{ page {
height: 100%; height: 100%;
background-color: #fff; background-color: #fff;
} }
.container{
.container {
height: 100%; height: 100%;
overflow-y: scroll; overflow-y: scroll;
overflow-x: hidden; overflow-x: hidden;
} }
.bgimg{
.bgimg {
width: 100%; width: 100%;
height: 2135rpx; height: 2135rpx;
} }
.item_jklist{
.item_jklist {
padding: 0rpx 20rpx 0rpx; padding: 0rpx 20rpx 0rpx;
background-color: #ffffff; background-color: #ffffff;
margin-bottom: 15rpx; margin-bottom: 15rpx;
} }
.item_jklist{
.item_jklist {
margin-bottom: 0; margin-bottom: 0;
} }
.itembox_top{
.itembox_top {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -225,42 +235,49 @@
padding: 20rpx 0; padding: 20rpx 0;
color: #8b95ea; color: #8b95ea;
} }
.top_box{
.top_box {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.top_box image{
.top_box image {
width: 38rpx; width: 38rpx;
height: 40rpx; height: 40rpx;
margin-right: 14rpx; margin-right: 14rpx;
} }
.bot_box{
.bot_box {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
} }
.bot_left{
.bot_left {
width: 48%; width: 48%;
border: 4rpx solid #f0f0f0; border: 4rpx solid #f0f0f0;
border-radius: 4rpx; border-radius: 4rpx;
// margin-top: 30rpx; // margin-top: 30rpx;
// box-shadow: 5px 5px 5px #0000001a; // box-shadow: 5px 5px 5px #0000001a;
} }
// .bot_left:first-child{ // .bot_left:first-child{
// margin-top: 12rpx; // margin-top: 12rpx;
// } // }
// .bot_left:nth-child(2){ // .bot_left:nth-child(2){
// margin-top: 12rpx; // margin-top: 12rpx;
// } // }
.botleft_top{ .botleft_top {
width: 100%; width: 100%;
height: 214rpx; height: 214rpx;
} }
.botleft_top image{
.botleft_top image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.botleft_bot{
.botleft_bot {
padding: 16rpx 0; padding: 16rpx 0;
display: flex; display: flex;
align-items: center; align-items: center;
@ -269,53 +286,63 @@
color: #414141; color: #414141;
border-bottom: 2rpx solid #f0f0f0; border-bottom: 2rpx solid #f0f0f0;
} }
.botleft_bot image{
.botleft_bot image {
width: 36rpx; width: 36rpx;
height: 40rpx; height: 40rpx;
margin-right: 18rpx; margin-right: 18rpx;
} }
.item_jklist1{
.item_jklist1 {
margin-top: 20rpx; margin-top: 20rpx;
} }
.bot_box1{
.bot_box1 {
height: 464rpx; height: 464rpx;
border-top-left-radius: 28rpx; border-top-left-radius: 28rpx;
border-top-right-radius: 28rpx; border-top-right-radius: 28rpx;
box-shadow: 5px 5px 5px #0000001a; box-shadow: 5px 5px 5px #0000001a;
} }
.botleft_top1{
.botleft_top1 {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-top-left-radius: 28rpx; border-top-left-radius: 28rpx;
border-top-right-radius: 28rpx; border-top-right-radius: 28rpx;
} }
.botleft_top1 image{
.botleft_top1 image {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-top-left-radius: 28rpx; border-top-left-radius: 28rpx;
border-top-right-radius: 28rpx; border-top-right-radius: 28rpx;
} }
.load{
.load {
height: 100rpx; height: 100rpx;
line-height: 100rpx; line-height: 100rpx;
text-align: center; text-align: center;
color: #c6c6c6; color: #c6c6c6;
} }
.zwsj{
.zwsj {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: flex;
padding: 60% 170rpx 0; padding: 60% 170rpx 0;
} }
.inzwsj{
.inzwsj {
width: 100%; width: 100%;
} }
.zwsjimg{
.zwsjimg {
width: 100%; width: 100%;
height: 224rpx; height: 224rpx;
margin-bottom: 37rpx; margin-bottom: 37rpx;
} }
.zwsjtext{
.zwsjtext {
width: 100%; width: 100%;
font-size: 26rpx; font-size: 26rpx;
font-family: Source Han Sans SC; font-family: Source Han Sans SC;
@ -324,4 +351,4 @@
line-height: 31rpx; line-height: 31rpx;
text-align: center; text-align: center;
} }
</style> </style>

View File

@ -109,7 +109,7 @@
{ {
"path": "pages/Site/index", "path": "pages/Site/index",
"style": { "style": {
"navigationBarTitleText": "监测站点", "navigationBarTitleText": "站点管理",
"navigationStyle": "default", "navigationStyle": "default",
"navigationBarBackgroundColor":"#0F6EFF" "navigationBarBackgroundColor":"#0F6EFF"
} }
@ -117,7 +117,7 @@
{ {
"path": "pages/Site/detail", "path": "pages/Site/detail",
"style": { "style": {
"navigationBarTitleText": "监测站点", "navigationBarTitleText": "站点管理",
"navigationStyle": "custom", "navigationStyle": "custom",
"navigationBarBackgroundColor":"#0F6EFF" "navigationBarBackgroundColor":"#0F6EFF"
} }
@ -125,7 +125,7 @@
{ {
"path": "pages/Site/sjdetail", "path": "pages/Site/sjdetail",
"style": { "style": {
"navigationBarTitleText": "监测站点", "navigationBarTitleText": "站点管理",
"navigationStyle": "custom", "navigationStyle": "custom",
"navigationBarBackgroundColor":"#0F6EFF" "navigationBarBackgroundColor":"#0F6EFF"
} }
@ -188,7 +188,7 @@
{ {
"path": "pages/analysis/index", "path": "pages/analysis/index",
"style": { "style": {
"navigationBarTitleText": "数据分析", "navigationBarTitleText": "统计分析",
"navigationStyle": "default", "navigationStyle": "default",
"navigationBarBackgroundColor":"#0F6EFF" "navigationBarBackgroundColor":"#0F6EFF"
} }
@ -204,7 +204,7 @@
{ {
"path": "pages/sjdyj/index", "path": "pages/sjdyj/index",
"style": { "style": {
"navigationBarTitleText": "设备告警", "navigationBarTitleText": "预警信息",
"navigationStyle": "default", "navigationStyle": "default",
"navigationBarBackgroundColor":"#0F6EFF" "navigationBarBackgroundColor":"#0F6EFF"
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
<template> <template>
<view class="container"> <view class="container">
<!-- <image src="../../static/zddt.jpg" mode="" class="bgimg" @click="todetail()"></image> --> <!-- <image src="../../static/zddt.jpg" mode="" class="bgimg" @click="todetail()"></image> -->
<map id="map" style="width: 100%; height:2000rpx;" scale="13" :markers="markers" longitude="110.628279" <map id="map" style="width: 100%; height:2000rpx;" scale="13" :markers="markers" longitude="111.436625"
latitude="35.546105" show-location @markertap="markertap" @callouttap="callouttap"> latitude="36.771975" show-location @markertap="markertap" @callouttap="callouttap">
<cover-view slot="callout"> <cover-view slot="callout">
<cover-view v-for="(item,index) in markers" :key="index" class="customCallout" :marker-id="item.id"> <cover-view v-for="(item,index) in markers" :key="index" class="customCallout" :marker-id="item.id">
<cover-image class="imgs" src="@/static/zhandian_icon_xuqin_title.png" <cover-image class="imgs" src="@/static/zhandian_icon_xuqin_title.png"
@ -19,33 +19,21 @@
</cover-view> </cover-view>
</map> </map>
<view class="zdxq"> <view class="zdxq">
<view class="zdxqitem" @click="switch1Change">
<image src="../../static/zhandian_sahchong_dingwei.png" mode=""></image>
<view class="textss">
联网式太阳能杀虫灯
</view>
<view class="crildon" :style="!isscd?'background:#00ff37':'background: #ccc;'"></view>
</view>
<view class="zdxqitem" @click="switch2Change"> <view class="zdxqitem" @click="switch2Change">
<image src="../../static/zhandian_xuqin_dingwei.png" mode=""></image> <image src="../../static/zhandian_xuqin_dingwei.png" mode=""></image>
<view class="textss"> <view class="textss">
畜禽养殖污染监测站 团柏河典型小流域监测站
</view> </view>
<view class="crildon" :style="!issscd?'background:#00ff37':'background: #ccc;'"></view> <view class="crildon" :style="!issscd?'background:#00ff37':'background: #ccc;'"></view>
</view> </view>
<view class="zdxqitem" @click="switch3Change"> <view class="zdxqitem" @click="switch3Change">
<image src="../../static/zhandian_nongtian_dingwei.png" mode=""></image> <image src="../../static/zhandian_nongtian_dingwei.png" mode=""></image>
<view class="textss"> <view class="textss">
农田面源污染监测站 对竹河典型小流域监测站
</view> </view>
<view class="crildon" :style="!isssscd?'background:#00ff37':'background: #ccc;'"></view> <view class="crildon" :style="!isssscd?'background:#00ff37':'background: #ccc;'"></view>
</view> </view>
</view> </view>
<!-- <view class="switchs" :defaultSwitch="isscd">-->
<!-- <selectSwitch @change="switch1Change" :defaultSwitch="isscd" checked_bj_color="#13ce66"/>-->
<!-- <switch style="margin-right: 10rpx;" :checked="isscd" @change="switch1Change" />-->
<!-- &lt;!&ndash; 显示/隐藏杀虫灯 &ndash;&gt;-->
<!-- </view>-->
</view> </view>
</template> </template>
@ -78,9 +66,9 @@
onLoad() { onLoad() {
// this.isscd = true // this.isscd = true
// this.getList() // this.getList()
this.$nextTick(() => { this.$nextTick(() => {
this.getList() this.getList()
}) })
}, },
onShow() { onShow() {
var that = this var that = this
@ -130,32 +118,34 @@
title: '加载中' title: '加载中'
}); });
this.$http.get('/applet/survStationInfo/stationMap').then(res => { this.$http.get('/applet/survStationInfo/stationMap').then(res => {
this.stationlist = [...res.data.data.pestlight, ...res.data.data.cusLocation, ...res.data.data.stationInfo] this.stationlist = [...res.data.data.pestlight, ...res.data.data.cusLocation, ...res.data.data
this.stationlist.forEach((item,index) => { .stationInfo
item.id = index; ]
if(item.inType == 'pestlight'){ this.stationlist.forEach((item, index) => {
this.pestlight.push(item) item.id = index;
} if (item.inType == 'pestlight') {
if(item.stationType == 'cusLocaltion'){ this.pestlight.push(item)
this.cusLocation.push(item) }
} if (item.stationType == 'cusLocaltion') {
if(item.stationType == 'orient' || item.stationType == 'livestock'){ this.cusLocation.push(item)
this.stationInfo.push(item) }
} if (item.stationType == 'orient' || item.stationType == 'livestock') {
this.list.push({ this.stationInfo.push(item)
latitude:Number(item.stationLatitude), }
longitude: Number(item.stationLongitude), this.list.push({
stationType:item.stationType, latitude: Number(item.stationLatitude),
sortNo: item.sortNo, longitude: Number(item.stationLongitude),
stationName: item.stationName, stationType: item.stationType,
stationCode: item.stationCode sortNo: item.sortNo,
}) stationName: item.stationName,
}) stationCode: item.stationCode
this.issscd = false })
this.isssscd = false })
this.issscd = false
this.isssscd = false
this.qiyeChange() this.qiyeChange()
this.list1query() this.list1query()
this.list2query() this.list2query()
uni.hideLoading(); uni.hideLoading();
}) })
}, },
@ -226,7 +216,7 @@
}, },
markertap(e) { markertap(e) {
const index = e.detail.markerId const index = e.detail.markerId
console.log(e.detail,'index') console.log(e.detail, 'index')
if (['orient', 'livestock'].includes(this.list[index].stationType)) { if (['orient', 'livestock'].includes(this.list[index].stationType)) {
uni.navigateTo({ uni.navigateTo({
url: `/packDetail/pages/Site/detail?item=${encodeURIComponent(JSON.stringify(this.list[index]))}` url: `/packDetail/pages/Site/detail?item=${encodeURIComponent(JSON.stringify(this.list[index]))}`
@ -244,22 +234,64 @@
todetails(item) { todetails(item) {
console.log(item, '还是个然后') console.log(item, '还是个然后')
}, },
switch1Change() { qiyeChange() {
this.isscd = !this.isscd; for (let i = 0; i < this.cusLocation.length; i++) {
let index = 0; const item = this.cusLocation[i];
if (!this.isscd) { item.iconPath = '/static/qiyeIcon.png';
this.pestlightMarker = []; item.latitude = Number(item.stationLatitude);
this.timerSet = setInterval(() => { item.longitude = Number(item.stationLongitude);
for (let i = 0; i < 50 && index < this.pestlight.length; i++) { item.width = 35;
const item = this.pestlight[index]; item.height = 52;
item.iconPath = '/static/zhandian_sahchong_dingwei.png'; this.list.push({
item.latitude = Number(item.latitude); latitude: Number(item.stationLatitude),
item.longitude = Number(item.longitude); longitude: Number(item.stationLongitude),
item.width = 15; stationType: item.stationType,
item.height = 20; sortNo: item.sortNo,
stationName: item.stationName,
stationCode: item.stationCode
})
// markers
const markerItem = {
id: item.id,
iconPath: item.iconPath,
latitude: item.latitude,
longitude: item.longitude,
width: item.width,
height: item.height,
customCallout: {
anchorY: 0, // Y
anchorX: 0, // X
display: 'ALWAYS' //
},
stationType: item.stationType,
stationName: item.stationName,
stationCode: item.stationCode,
joinCluster: true //
};
this.markers.push(markerItem);
}
},
switch2Change() {
this.issscd = !this.issscd
this.list1query()
},
switch3Change() {
this.isssscd = !this.isssscd
this.list2query()
},
list1query() {
if (!this.issscd) {
for (let i = 0; i < this.stationInfo.length; i++) {
const item = this.stationInfo[i];
if (item.stationType === 'orient') {
item.iconPath = '/static/zhandian_nongtian_dingwei.png';
item.latitude = Number(item.stationLatitude);
item.longitude = Number(item.stationLongitude);
item.width = 35;
item.height = 52;
// markers // markers
const markerItem = { const markerItem = {
id: item.id, id: item.id,
iconPath: item.iconPath, iconPath: item.iconPath,
latitude: item.latitude, latitude: item.latitude,
longitude: item.longitude, longitude: item.longitude,
@ -270,147 +302,57 @@
anchorX: 0, // X anchorX: 0, // X
display: 'ALWAYS' // display: 'ALWAYS' //
}, },
// stationType: item.stationType, stationType: item.stationType,
inType: item.inType,
stationName: item.stationName, stationName: item.stationName,
stationCode: item.stationCode, stationCode: item.stationCode,
joinCluster: false // joinCluster: true //
}; };
this.markers.push(markerItem); this.markers.push(markerItem);
index++;
} }
// this.markers = this.markers.concat(aa); }
if (index >= this.pestlight.length) {
clearInterval(this.timerSet);
}
}, 1000);
} else { } else {
clearInterval(this.timerSet); this.markers = this.markers.filter((item) => {
this.markers = this.markers.filter((item)=>{ return item.stationType !== 'orient'
return item.inType !== 'pestlight'
}) })
} }
}, },
qiyeChange() { list2query() {
for (let i = 0; i < this.cusLocation.length; i++) { if (!this.isssscd) {
const item = this.cusLocation[i]; for (let i = 0; i < this.stationInfo.length; i++) {
item.iconPath = '/static/qiyeIcon.png'; const item = this.stationInfo[i];
item.latitude = Number(item.stationLatitude); if (item.stationType === 'livestock') {
item.longitude = Number(item.stationLongitude); item.iconPath = '/static/zhandian_xuqin_dingwei.png';
item.width = 35; item.latitude = Number(item.stationLatitude);
item.height = 52; item.longitude = Number(item.stationLongitude);
this.list.push({ item.width = 35;
latitude:Number(item.stationLatitude), item.height = 52;
longitude: Number(item.stationLongitude), // markers
stationType:item.stationType, const markerItem = {
sortNo: item.sortNo, id: item.id,
stationName: item.stationName, iconPath: item.iconPath,
stationCode: item.stationCode latitude: item.latitude,
}) longitude: item.longitude,
// markers width: item.width,
const markerItem = { height: item.height,
id: item.id, customCallout: {
iconPath: item.iconPath, anchorY: 0, // Y
latitude: item.latitude, anchorX: 0, // X
longitude: item.longitude, display: 'ALWAYS' //
width: item.width, },
height: item.height, stationType: item.stationType,
customCallout: { stationName: item.stationName,
anchorY: 0, // Y stationCode: item.stationCode,
anchorX: 0, // X joinCluster: true //
display: 'ALWAYS' // };
}, this.markers.push(markerItem);
stationType: item.stationType, }
stationName: item.stationName, }
stationCode: item.stationCode, } else {
joinCluster: true // this.markers = this.markers.filter((item) => {
}; return item.stationType !== 'livestock'
this.markers.push(markerItem); })
} }
}, }
switch2Change() {
this.issscd = !this.issscd
this.list1query()
},
switch3Change() {
this.isssscd = !this.isssscd
this.list2query()
},
list1query(){
if (!this.issscd) {
for (let i = 0; i < this.stationInfo.length; i++) {
const item = this.stationInfo[i];
if(item.stationType === 'orient'){
item.iconPath = '/static/zhandian_nongtian_dingwei.png';
item.latitude = Number(item.stationLatitude);
item.longitude = Number(item.stationLongitude);
item.width = 35;
item.height = 52;
// markers
const markerItem = {
id: item.id,
iconPath: item.iconPath,
latitude: item.latitude,
longitude: item.longitude,
width: item.width,
height: item.height,
customCallout: {
anchorY: 0, // Y
anchorX: 0, // X
display: 'ALWAYS' //
},
stationType: item.stationType,
stationName: item.stationName,
stationCode: item.stationCode,
joinCluster: true //
};
this.markers.push(markerItem);
}
}
} else {
this.markers = this.markers.filter((item)=>{
return item.stationType !== 'orient'
})
}
},
list2query(){
if (!this.isssscd) {
for (let i = 0; i < this.stationInfo.length; i++) {
const item = this.stationInfo[i];
if(item.stationType === 'livestock'){
item.iconPath = '/static/zhandian_xuqin_dingwei.png';
item.latitude = Number(item.stationLatitude);
item.longitude = Number(item.stationLongitude);
item.width = 35;
item.height = 52;
// markers
const markerItem = {
id: item.id,
iconPath: item.iconPath,
latitude: item.latitude,
longitude: item.longitude,
width: item.width,
height: item.height,
customCallout: {
anchorY: 0, // Y
anchorX: 0, // X
display: 'ALWAYS' //
},
stationType: item.stationType,
stationName: item.stationName,
stationCode: item.stationCode,
joinCluster: true //
};
this.markers.push(markerItem);
}
}
} else {
this.markers = this.markers.filter((item)=>{
return item.stationType !== 'livestock'
})
}
}
} }
} }
</script> </script>
@ -471,7 +413,7 @@
font-weight: 500; font-weight: 500;
color: #FFFFFF; color: #FFFFFF;
text-shadow: 0rpx 1rpx 0rpx rgba(4, 49, 52, 0.55); text-shadow: 0rpx 1rpx 0rpx rgba(4, 49, 52, 0.55);
width: 299rpx; width: 359rpx;
background: rgba(0, 0, 0, 0.52); background: rgba(0, 0, 0, 0.52);
border: 1px solid #4B677C; border: 1px solid #4B677C;
border-radius: 6rpx; border-radius: 6rpx;
@ -521,4 +463,4 @@
display: flex; display: flex;
align-items: center; align-items: center;
} }
</style> </style>