Compare commits
3 Commits
77a4767f7d
...
a47eab0d42
| Author | SHA1 | Date |
|---|---|---|
|
|
a47eab0d42 | |
|
|
65c1a8d1c8 | |
|
|
4eea49358c |
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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> -->
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
</view> -->
|
<view class="form_item">
|
||||||
<input type="text" placeholder="请输入运维人姓名" v-model="details.maintainPerson">
|
<view class="form_top">
|
||||||
|
联系方式:
|
||||||
|
</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>
|
||||||
|
|
@ -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
|
||||||
},
|
},
|
||||||
// 提交
|
// 提交
|
||||||
|
|
|
||||||
|
|
@ -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}}
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@
|
||||||
dictLabel:'监测站告警'
|
dictLabel:'监测站告警'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dictLabel:'杀虫灯告警'
|
dictLabel:'异常趋势图'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
isActive:0,
|
isActive:0,
|
||||||
|
|
|
||||||
|
|
@ -44,24 +44,24 @@
|
||||||
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() {
|
||||||
|
|
@ -70,8 +70,8 @@
|
||||||
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
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -84,19 +84,19 @@
|
||||||
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,45 +149,48 @@
|
||||||
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) =>
|
||||||
|
`${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join("&");
|
||||||
const webviewUrl = `/packDetail1/pages/device/index4?${queryString}`;
|
const webviewUrl = `/packDetail1/pages/device/index4?${queryString}`;
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: webviewUrl
|
url: webviewUrl
|
||||||
|
|
@ -196,28 +201,33 @@
|
||||||
</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;
|
||||||
|
|
|
||||||
10
pages.json
10
pages.json
|
|
@ -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"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<uni-nav-bar :fixed="true" background-color="transparent" status-bar title="农业面源污染监测系统"/>
|
<uni-nav-bar :fixed="true" background-color="transparent" status-bar title="农业面源污染监测系统" />
|
||||||
<image src="../../static/home_top_bg.png" mode="" class="bgimg"></image>
|
<image src="../../static/home_top_bg.png" mode="" class="bgimg"></image>
|
||||||
<scroll-view class="content" scroll-y="true" :style="{height:contentheight + 'rpx'}">
|
<scroll-view class="content" scroll-y="true" :style="{height:contentheight + 'rpx'}">
|
||||||
<view class="top_address">
|
<view class="top_address">
|
||||||
|
|
@ -22,7 +22,8 @@
|
||||||
indicator-active-color="rgba(197, 197, 197, 1)" :autoplay="autoplay" interval="3000"
|
indicator-active-color="rgba(197, 197, 197, 1)" :autoplay="autoplay" interval="3000"
|
||||||
:duration="duration">
|
:duration="duration">
|
||||||
<swiper-item class="swiper_items" v-for="(item,index) in bigswiperList" :key="index">
|
<swiper-item class="swiper_items" v-for="(item,index) in bigswiperList" :key="index">
|
||||||
<image class="siwper_imgs" :src="baseUrl + '/applet/common/static/' + item.detailPics" mode=""></image>
|
<image class="siwper_imgs" :src="baseUrl + '/applet/common/static/' + item.detailPics" mode="">
|
||||||
|
</image>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -76,7 +77,8 @@
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<view class="bot_mid">
|
<view class="bot_mid">
|
||||||
<view class="bot_mid_left" :class="{'bot_mid_lefts':item.type == 2 || item.type == 0}">
|
<view class="bot_mid_left"
|
||||||
|
:class="{'bot_mid_lefts':item.type == 2 || item.type == 0}">
|
||||||
{{ item.value }}{{ item.unit }}
|
{{ item.value }}{{ item.unit }}
|
||||||
</view>
|
</view>
|
||||||
<!-- <image v-if="item.type == 1" src="../../static/home_shuju_shang.png" mode=""></image>
|
<!-- <image v-if="item.type == 1" src="../../static/home_shuju_shang.png" mode=""></image>
|
||||||
|
|
@ -98,11 +100,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
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';
|
||||||
//高德SDKjs
|
//高德SDKjs
|
||||||
// import amap from '@/common/amap-wx.130.js'; //自己js的所在的位置
|
// import amap from '@/common/amap-wx.130.js'; //自己js的所在的位置
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
contentheight: 0,
|
contentheight: 0,
|
||||||
|
|
@ -118,8 +120,12 @@ export default {
|
||||||
numbers: 0,
|
numbers: 0,
|
||||||
wrwlist: [],
|
wrwlist: [],
|
||||||
wrwcode: [],
|
wrwcode: [],
|
||||||
colorList: ['#22BB8A', '#EE701C', '#52AC2A', '#2BADB9', '#D75A28', '#AD8F49', '#26A3CC', '#6C48C7', '#22BB8A', '#415FBE', '#52AC2A', '#EE701C'],
|
colorList: ['#22BB8A', '#EE701C', '#52AC2A', '#2BADB9', '#D75A28', '#AD8F49', '#26A3CC', '#6C48C7',
|
||||||
colorList1: ['#22BB8A', '#EE701C', '#52AC2A', '#2BADB9', '#D75A28', '#AD8F49', '#26A3CC', '#6C48C7', '#22BB8A'],
|
'#22BB8A', '#415FBE', '#52AC2A', '#EE701C'
|
||||||
|
],
|
||||||
|
colorList1: ['#22BB8A', '#EE701C', '#52AC2A', '#2BADB9', '#D75A28', '#AD8F49', '#26A3CC', '#6C48C7',
|
||||||
|
'#22BB8A'
|
||||||
|
],
|
||||||
bigswiperList: [
|
bigswiperList: [
|
||||||
// {
|
// {
|
||||||
// img:require('../../static/banner1.png')
|
// img:require('../../static/banner1.png')
|
||||||
|
|
@ -128,26 +134,35 @@ export default {
|
||||||
// img:require('../../static/banner.jpg')
|
// img:require('../../static/banner.jpg')
|
||||||
// }
|
// }
|
||||||
],
|
],
|
||||||
menuList: [
|
menuList: [{
|
||||||
{
|
name: '预警信息',
|
||||||
name: '监测站点',
|
|
||||||
img: require('../../static/home_icon_jiance.png'),
|
|
||||||
path: '/packDetail/pages/Site/index'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '设备告警',
|
|
||||||
img: require('../../static/scd.png'),
|
img: require('../../static/scd.png'),
|
||||||
path: '/packDetail/pages/sjdyj/index'
|
path: '/packDetail/pages/sjdyj/index'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '视频监控',
|
name: '统计分析',
|
||||||
img: require('../../static/home_icon_shipin.png'),
|
img: require('../../static/home_icon_shuju.png'),
|
||||||
path: '/packDetail/pages/device/index'
|
path: '/packDetail/pages/analysis/index'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '站点管理',
|
||||||
|
img: require('../../static/home_icon_jiance.png'),
|
||||||
|
path: '/packDetail/pages/Site/index'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '站点运维',
|
name: '站点运维',
|
||||||
img: require('../../static/home_icon_yunwei.png'),
|
img: require('../../static/home_icon_yunwei.png'),
|
||||||
path: '/packDetail/pages/waste/index'
|
path: '/packDetail/pages/operations/index'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '视频监控',
|
||||||
|
img: require('../../static/home_icon_shipin.png'),
|
||||||
|
path: '/packDetail1/pages/device/index'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '设备管理',
|
||||||
|
img: require('../../static/home_icon_shebei.png'),
|
||||||
|
path: '/packDetail/pages/vidio/index'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '农业废弃物',
|
name: '农业废弃物',
|
||||||
|
|
@ -157,17 +172,7 @@ export default {
|
||||||
{
|
{
|
||||||
name: '粪污台账',
|
name: '粪污台账',
|
||||||
img: require('../../static/home_icon_fenwu.png'),
|
img: require('../../static/home_icon_fenwu.png'),
|
||||||
path: '/packDetail/pages/waste/index'
|
path: '/packDetail/pages/fwtz/index'
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '设备管理',
|
|
||||||
img: require('../../static/home_icon_shebei.png'),
|
|
||||||
path: '/packDetail/pages/vidio/index'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '数据分析',
|
|
||||||
img: require('../../static/home_icon_shuju.png'),
|
|
||||||
path: '/packDetail/pages/waste/index'
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
list: [],
|
list: [],
|
||||||
|
|
@ -184,7 +189,7 @@ export default {
|
||||||
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(navigationHeight,'111111111')
|
// console.log(navigationHeight,'111111111')
|
||||||
// console.log(this.height, ktxStatusHeight, navigationHeight)
|
// console.log(this.height, ktxStatusHeight, navigationHeight)
|
||||||
this.contentheight = this.height - ktxStatusHeight - navigationHeight
|
this.contentheight = this.height - ktxStatusHeight - navigationHeight
|
||||||
|
|
@ -204,7 +209,7 @@ export default {
|
||||||
myAmapFun.getWeather({
|
myAmapFun.getWeather({
|
||||||
type: 'live',
|
type: 'live',
|
||||||
// city:code,
|
// city:code,
|
||||||
success: function (data) {
|
success: function(data) {
|
||||||
console.log(data) //天气数据
|
console.log(data) //天气数据
|
||||||
that.weather = data.temperature.data + '℃'
|
that.weather = data.temperature.data + '℃'
|
||||||
that.city = data.liveData.city;
|
that.city = data.liveData.city;
|
||||||
|
|
@ -243,11 +248,11 @@ export default {
|
||||||
that.weatherimg = '/static/tianqi_icon_duoyun.png'
|
that.weatherimg = '/static/tianqi_icon_duoyun.png'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fail: function (info) {
|
fail: function(info) {
|
||||||
//失败回调
|
//失败回调
|
||||||
console.log(info)
|
console.log(info)
|
||||||
},
|
},
|
||||||
complete: function (resa) {
|
complete: function(resa) {
|
||||||
console.log(resa)
|
console.log(resa)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -256,7 +261,7 @@ export default {
|
||||||
var that = this
|
var that = this
|
||||||
if (uni.getStorageSync('third_session')) {
|
if (uni.getStorageSync('third_session')) {
|
||||||
uni.login({
|
uni.login({
|
||||||
success: function (res) {
|
success: function(res) {
|
||||||
console.log(res.code)
|
console.log(res.code)
|
||||||
this.code = res.code
|
this.code = res.code
|
||||||
let params = {}
|
let params = {}
|
||||||
|
|
@ -271,8 +276,7 @@ export default {
|
||||||
// uni.reLaunch({
|
// uni.reLaunch({
|
||||||
// url:'/packDetail/pages/login/login'
|
// url:'/packDetail/pages/login/login'
|
||||||
// })
|
// })
|
||||||
that.bigswiperList = [
|
that.bigswiperList = [{
|
||||||
{
|
|
||||||
"id": "1692474977070829569",
|
"id": "1692474977070829569",
|
||||||
"infoId": "1692474921957675010",
|
"infoId": "1692474921957675010",
|
||||||
"detailCode": "图1",
|
"detailCode": "图1",
|
||||||
|
|
@ -313,8 +317,7 @@ export default {
|
||||||
"isDel": 0,
|
"isDel": 0,
|
||||||
"updatedTime": null
|
"updatedTime": null
|
||||||
}]
|
}]
|
||||||
that.wrwlist = [
|
that.wrwlist = [{
|
||||||
{
|
|
||||||
"unit": "℃",
|
"unit": "℃",
|
||||||
"code": "dataAirTemp",
|
"code": "dataAirTemp",
|
||||||
"color": "#22BB8A",
|
"color": "#22BB8A",
|
||||||
|
|
@ -500,9 +503,14 @@ export default {
|
||||||
"color": "#f06464",
|
"color": "#f06464",
|
||||||
"icon": "sys/icon/zhandian_icon_tvoc.png",
|
"icon": "sys/icon/zhandian_icon_tvoc.png",
|
||||||
"description": "总挥发性有机物"
|
"description": "总挥发性有机物"
|
||||||
}, {"unit": "台", "code": "default", "color": "#DEAB8A", "icon": "", "description": "默认"}]
|
}, {
|
||||||
that.list = [
|
"unit": "台",
|
||||||
{
|
"code": "default",
|
||||||
|
"color": "#DEAB8A",
|
||||||
|
"icon": "",
|
||||||
|
"description": "默认"
|
||||||
|
}]
|
||||||
|
that.list = [{
|
||||||
"name": "总氮",
|
"name": "总氮",
|
||||||
"unit": "mg/L",
|
"unit": "mg/L",
|
||||||
"value": "2.0000",
|
"value": "2.0000",
|
||||||
|
|
@ -678,8 +686,10 @@ export default {
|
||||||
// console.log(this.wrwlist,'污染物shuzu')
|
// console.log(this.wrwlist,'污染物shuzu')
|
||||||
for (var j = 0; j < that.wrwlist.length; j++) {
|
for (var j = 0; j < that.wrwlist.length; j++) {
|
||||||
// Object.keys 获取字段名
|
// Object.keys 获取字段名
|
||||||
for (var k = 0; k < Object.keys(this.list[i]).length; k++) {
|
for (var k = 0; k < Object.keys(this.list[i])
|
||||||
if (that.wrwlist[j].code == Object.keys(that.list[i])[k]) {
|
.length; k++) {
|
||||||
|
if (that.wrwlist[j].code == Object.keys(that.list[
|
||||||
|
i])[k]) {
|
||||||
this.list[i].wrwcode.push({
|
this.list[i].wrwcode.push({
|
||||||
name: that.wrwlist[j].description,
|
name: that.wrwlist[j].description,
|
||||||
icon: that.wrwlist[j].icon,
|
icon: that.wrwlist[j].icon,
|
||||||
|
|
@ -711,8 +721,7 @@ export default {
|
||||||
// uni.reLaunch({
|
// uni.reLaunch({
|
||||||
// url: '/pages/loginindex'
|
// url: '/pages/loginindex'
|
||||||
// })
|
// })
|
||||||
that.bigswiperList = [
|
that.bigswiperList = [{
|
||||||
{
|
|
||||||
"id": "1692474977070829569",
|
"id": "1692474977070829569",
|
||||||
"infoId": "1692474921957675010",
|
"infoId": "1692474921957675010",
|
||||||
"detailCode": "图1",
|
"detailCode": "图1",
|
||||||
|
|
@ -753,8 +762,7 @@ export default {
|
||||||
"isDel": 0,
|
"isDel": 0,
|
||||||
"updatedTime": null
|
"updatedTime": null
|
||||||
}]
|
}]
|
||||||
that.wrwlist = [
|
that.wrwlist = [{
|
||||||
{
|
|
||||||
"unit": "℃",
|
"unit": "℃",
|
||||||
"code": "dataAirTemp",
|
"code": "dataAirTemp",
|
||||||
"color": "#22BB8A",
|
"color": "#22BB8A",
|
||||||
|
|
@ -940,9 +948,14 @@ export default {
|
||||||
"color": "#f06464",
|
"color": "#f06464",
|
||||||
"icon": "sys/icon/zhandian_icon_tvoc.png",
|
"icon": "sys/icon/zhandian_icon_tvoc.png",
|
||||||
"description": "总挥发性有机物"
|
"description": "总挥发性有机物"
|
||||||
}, {"unit": "台", "code": "default", "color": "#DEAB8A", "icon": "", "description": "默认"}]
|
}, {
|
||||||
that.list = [
|
"unit": "台",
|
||||||
{
|
"code": "default",
|
||||||
|
"color": "#DEAB8A",
|
||||||
|
"icon": "",
|
||||||
|
"description": "默认"
|
||||||
|
}]
|
||||||
|
that.list = [{
|
||||||
"name": "总氮",
|
"name": "总氮",
|
||||||
"unit": "mg/L",
|
"unit": "mg/L",
|
||||||
"value": "2.0000",
|
"value": "2.0000",
|
||||||
|
|
@ -1145,7 +1158,7 @@ export default {
|
||||||
var that = this
|
var that = this
|
||||||
if (uni.getStorageSync('third_session')) {
|
if (uni.getStorageSync('third_session')) {
|
||||||
uni.login({
|
uni.login({
|
||||||
success: function (res) {
|
success: function(res) {
|
||||||
that.code = res.code
|
that.code = res.code
|
||||||
let params = {}
|
let params = {}
|
||||||
params.jsCode = that.code
|
params.jsCode = that.code
|
||||||
|
|
@ -1154,7 +1167,7 @@ export default {
|
||||||
let userInfo = res.data.data;
|
let userInfo = res.data.data;
|
||||||
if (!userInfo.id) {
|
if (!userInfo.id) {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url:'/packDetail/pages/login/login'
|
url: '/packDetail/pages/login/login'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
@ -1235,135 +1248,95 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
toList(item, index) {
|
toList(item, index) {
|
||||||
if (index == 0) {
|
this.isAathorize(item.path)
|
||||||
this.isAathorize('/packDetail/pages/Site/index')
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url: '/packDetail/pages/Site/index'
|
|
||||||
// })
|
|
||||||
} else if (index == 1) {
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url: '/packDetail/pages/sjdyj/index'
|
|
||||||
// })
|
|
||||||
this.isAathorize('/packDetail/pages/sjdyj/index')
|
|
||||||
} else if (index == 2) {
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url: '/packDetail1/pages/device/index'
|
|
||||||
// })
|
|
||||||
this.isAathorize('/packDetail1/pages/device/index')
|
|
||||||
} else if (index == 3) {
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url: '/packDetail/pages/operations/index'
|
|
||||||
// })
|
|
||||||
this.isAathorize('/packDetail/pages/operations/index')
|
|
||||||
} else if (index == 4) {
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url: '/packDetail/pages/waste/index'
|
|
||||||
// })
|
|
||||||
this.isAathorize('/packDetail/pages/waste/index')
|
|
||||||
} else if (index == 5) {
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url: '/packDetail/pages/fwtz/index'
|
|
||||||
// })
|
|
||||||
this.isAathorize('/packDetail/pages/fwtz/index')
|
|
||||||
} else if (index == 6) {
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url: '/packDetail/pages/vidio/index'
|
|
||||||
// })
|
|
||||||
this.isAathorize('/packDetail/pages/vidio/index')
|
|
||||||
} else if (index == 7) {
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url: '/packDetail/pages/analysis/index'
|
|
||||||
// })
|
|
||||||
this.isAathorize('/packDetail/pages/analysis/index')
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
page {
|
page {
|
||||||
background-color: #F4F5F9;
|
background-color: #F4F5F9;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-nav-bar {
|
.uni-nav-bar {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
height: 44px;
|
height: 44px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-nav-bar-text {
|
.uni-nav-bar-text {
|
||||||
font-size: 32rpx !important;
|
font-size: 32rpx !important;
|
||||||
font-family: Source Han Sans SC;
|
font-family: Source Han Sans SC;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #FFFFFF !important;
|
color: #FFFFFF !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-nav-bar__left,
|
.uni-nav-bar__left,
|
||||||
.uni-nav-bar__right {
|
.uni-nav-bar__right {
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-navbar__content {
|
.uni-navbar__content {
|
||||||
border: 0 none !important;
|
border: 0 none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bgimg {
|
.bgimg {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
z-index: -99;
|
z-index: -99;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
padding: 0 29rpx;
|
padding: 0 29rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.top_address {
|
.top_address {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.address_left {
|
.address_left {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.address_left image {
|
.address_left image {
|
||||||
width: 32rpx;
|
width: 32rpx;
|
||||||
height: 32rpx;
|
height: 32rpx;
|
||||||
margin-right: 6rpx;
|
margin-right: 6rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.left_shi {
|
.left_shi {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-family: Source Han Sans SC;
|
font-family: Source Han Sans SC;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.address_right {
|
.address_right {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-family: Source Han Sans SC;
|
font-family: Source Han Sans SC;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.address_right image {
|
.address_right image {
|
||||||
width: 38rpx;
|
width: 38rpx;
|
||||||
height: 38rpx;
|
height: 38rpx;
|
||||||
margin-left: 14rpx;
|
margin-left: 14rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pic {
|
.pic {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 342rpx;
|
height: 342rpx;
|
||||||
background: #DFE6E8;
|
background: #DFE6E8;
|
||||||
|
|
@ -1371,23 +1344,23 @@ page {
|
||||||
border-radius: 28rpx;
|
border-radius: 28rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
transform: translateY(0);
|
transform: translateY(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
.pics {
|
.pics {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border-radius: 28rpx;
|
border-radius: 28rpx;
|
||||||
transform: translateY(0);
|
transform: translateY(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
.swiper_items image {
|
.swiper_items image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-radius: 28rpx;
|
border-radius: 28rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.jgg {
|
.jgg {
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
border-radius: 36rpx;
|
border-radius: 36rpx;
|
||||||
margin-top: 40rpx;
|
margin-top: 40rpx;
|
||||||
|
|
@ -1395,35 +1368,35 @@ page {
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin-bottom: 32rpx;
|
margin-bottom: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-grid-item {
|
.uni-grid-item {
|
||||||
height: 200rpx;
|
height: 200rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-grid-item image {
|
.uni-grid-item image {
|
||||||
width: 124rpx;
|
width: 124rpx;
|
||||||
height: 124rpx;
|
height: 124rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
font-family: Source Han Sans SC;
|
font-family: Source Han Sans SC;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
margin-top: 14rpx;
|
margin-top: 14rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.grid-item-box {
|
.grid-item-box {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.numberbj {
|
.numberbj {
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
min-width: 40rpx;
|
min-width: 40rpx;
|
||||||
padding: 0 12rpx;
|
padding: 0 12rpx;
|
||||||
|
|
@ -1438,67 +1411,67 @@ page {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
top: -5rpx;
|
top: -5rpx;
|
||||||
right: 5rpx;
|
right: 5rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.grid-item-box-row {
|
.grid-item-box-row {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.grid-dot {
|
.grid-dot {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 5px;
|
top: 5px;
|
||||||
right: 15px;
|
right: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom_box {
|
.bottom_box {
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
border-radius: 36rpx;
|
border-radius: 36rpx;
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-bottom: 28rpx;
|
padding-bottom: 28rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom_top {
|
.bottom_top {
|
||||||
height: 94rpx;
|
height: 94rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom_left image {
|
.bottom_left image {
|
||||||
width: 358rpx;
|
width: 358rpx;
|
||||||
height: 32rpx;
|
height: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom_right {
|
.bottom_right {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
font-family: Source Han Sans SC;
|
font-family: Source Han Sans SC;
|
||||||
color: #B3C1D1;
|
color: #B3C1D1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.num {
|
.num {
|
||||||
font-size: 34rpx;
|
font-size: 34rpx;
|
||||||
font-family: DIN Next LT Pro;
|
font-family: DIN Next LT Pro;
|
||||||
color: #2AC166;
|
color: #2AC166;
|
||||||
margin: 0 9rpx;
|
margin: 0 9rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.line {
|
.line {
|
||||||
height: 2rpx;
|
height: 2rpx;
|
||||||
background: #EBF2FB;
|
background: #EBF2FB;
|
||||||
}
|
}
|
||||||
|
|
||||||
.topline {
|
.topline {
|
||||||
margin-left: 24rpx;
|
margin-left: 24rpx;
|
||||||
height: 24rpx;
|
height: 24rpx;
|
||||||
border-left: 1rpx solid #EBF2FB;
|
border-left: 1rpx solid #EBF2FB;
|
||||||
}
|
}
|
||||||
|
|
||||||
.List {
|
.List {
|
||||||
margin-left: 24rpx;
|
margin-left: 24rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-left: 1rpx solid #EBF2FB;
|
border-left: 1rpx solid #EBF2FB;
|
||||||
|
|
@ -1507,27 +1480,27 @@ page {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-left: 20rpx;
|
padding-left: 20rpx;
|
||||||
height: 120rpx;
|
height: 120rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.imgs {
|
.imgs {
|
||||||
width: 37rpx;
|
width: 37rpx;
|
||||||
height: 37rpx;
|
height: 37rpx;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 44%;
|
top: 44%;
|
||||||
left: -20rpx;
|
left: -20rpx;
|
||||||
transform: translateY(-44%);
|
transform: translateY(-44%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.list_left {
|
.list_left {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list_left image {
|
.list_left image {
|
||||||
width: 13rpx;
|
width: 13rpx;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list_right {
|
.list_right {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: #F6F6F6;
|
background-color: #F6F6F6;
|
||||||
border-radius: 0rpx 12rpx 12rpx 0rpx;
|
border-radius: 0rpx 12rpx 12rpx 0rpx;
|
||||||
|
|
@ -1539,14 +1512,14 @@ page {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding-bottom: 18rpx;
|
padding-bottom: 18rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list_right_top {
|
.list_right_top {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rit_top_lef {
|
.rit_top_lef {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-family: Source Han Sans SC;
|
font-family: Source Han Sans SC;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
|
|
@ -1554,79 +1527,79 @@ page {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rit_top_rig {
|
.rit_top_rig {
|
||||||
font-size: 25rpx;
|
font-size: 25rpx;
|
||||||
font-family: DIN Next LT Pro;
|
font-family: DIN Next LT Pro;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list_right_bot {
|
.list_right_bot {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bot_lef {
|
.bot_lef {
|
||||||
padding: 6rpx 22rpx 6rpx 21rpx;
|
padding: 6rpx 22rpx 6rpx 21rpx;
|
||||||
// background: #22BB8A;
|
// background: #22BB8A;
|
||||||
border-radius: 4rpx;
|
border-radius: 4rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
font-family: Source Han Sans SC;
|
font-family: Source Han Sans SC;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bot_mid {
|
.bot_mid {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bot_mid_left {
|
.bot_mid_left {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-family: DIN Next LT Pro;
|
font-family: DIN Next LT Pro;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #FF4242;
|
color: #FF4242;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bot_mid_lefts {
|
.bot_mid_lefts {
|
||||||
color: #2FCD81;
|
color: #2FCD81;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gg {
|
.gg {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
font-family: DIN Next LT Pro;
|
font-family: DIN Next LT Pro;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #308DFF;
|
color: #308DFF;
|
||||||
margin-left: 10rpx;
|
margin-left: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bot_mid image {
|
.bot_mid image {
|
||||||
width: 32rpx;
|
width: 32rpx;
|
||||||
height: 32rpx;
|
height: 32rpx;
|
||||||
margin-left: 10rpx;
|
margin-left: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bot_rig {
|
.bot_rig {
|
||||||
font-size: 25rpx;
|
font-size: 25rpx;
|
||||||
font-family: DIN Next LT Pro;
|
font-family: DIN Next LT Pro;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
margin-left: 39rpx;
|
margin-left: 39rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toplines {
|
.toplines {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pagebot {
|
.pagebot {
|
||||||
height: 59rpx;
|
height: 59rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.liebiao {
|
.liebiao {
|
||||||
height: 713rpx;
|
height: 713rpx;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -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" />-->
|
|
||||||
<!-- <!– 显示/隐藏杀虫灯 –>-->
|
|
||||||
<!-- </view>-->
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -130,22 +118,24 @@
|
||||||
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
|
||||||
|
]
|
||||||
|
this.stationlist.forEach((item, index) => {
|
||||||
item.id = index;
|
item.id = index;
|
||||||
if(item.inType == 'pestlight'){
|
if (item.inType == 'pestlight') {
|
||||||
this.pestlight.push(item)
|
this.pestlight.push(item)
|
||||||
}
|
}
|
||||||
if(item.stationType == 'cusLocaltion'){
|
if (item.stationType == 'cusLocaltion') {
|
||||||
this.cusLocation.push(item)
|
this.cusLocation.push(item)
|
||||||
}
|
}
|
||||||
if(item.stationType == 'orient' || item.stationType == 'livestock'){
|
if (item.stationType == 'orient' || item.stationType == 'livestock') {
|
||||||
this.stationInfo.push(item)
|
this.stationInfo.push(item)
|
||||||
}
|
}
|
||||||
this.list.push({
|
this.list.push({
|
||||||
latitude:Number(item.stationLatitude),
|
latitude: Number(item.stationLatitude),
|
||||||
longitude: Number(item.stationLongitude),
|
longitude: Number(item.stationLongitude),
|
||||||
stationType:item.stationType,
|
stationType: item.stationType,
|
||||||
sortNo: item.sortNo,
|
sortNo: item.sortNo,
|
||||||
stationName: item.stationName,
|
stationName: item.stationName,
|
||||||
stationCode: item.stationCode
|
stationCode: item.stationCode
|
||||||
|
|
@ -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,54 +234,6 @@
|
||||||
todetails(item) {
|
todetails(item) {
|
||||||
console.log(item, '还是个然后')
|
console.log(item, '还是个然后')
|
||||||
},
|
},
|
||||||
switch1Change() {
|
|
||||||
this.isscd = !this.isscd;
|
|
||||||
let index = 0;
|
|
||||||
if (!this.isscd) {
|
|
||||||
this.pestlightMarker = [];
|
|
||||||
this.timerSet = setInterval(() => {
|
|
||||||
for (let i = 0; i < 50 && index < this.pestlight.length; i++) {
|
|
||||||
const item = this.pestlight[index];
|
|
||||||
item.iconPath = '/static/zhandian_sahchong_dingwei.png';
|
|
||||||
item.latitude = Number(item.latitude);
|
|
||||||
item.longitude = Number(item.longitude);
|
|
||||||
item.width = 15;
|
|
||||||
item.height = 20;
|
|
||||||
// 创建符合 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,
|
|
||||||
inType: item.inType,
|
|
||||||
stationName: item.stationName,
|
|
||||||
stationCode: item.stationCode,
|
|
||||||
joinCluster: false // 是否参与点聚合
|
|
||||||
};
|
|
||||||
this.markers.push(markerItem);
|
|
||||||
index++;
|
|
||||||
}
|
|
||||||
// this.markers = this.markers.concat(aa);
|
|
||||||
if (index >= this.pestlight.length) {
|
|
||||||
clearInterval(this.timerSet);
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
clearInterval(this.timerSet);
|
|
||||||
this.markers = this.markers.filter((item)=>{
|
|
||||||
return item.inType !== 'pestlight'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
qiyeChange() {
|
qiyeChange() {
|
||||||
for (let i = 0; i < this.cusLocation.length; i++) {
|
for (let i = 0; i < this.cusLocation.length; i++) {
|
||||||
const item = this.cusLocation[i];
|
const item = this.cusLocation[i];
|
||||||
|
|
@ -301,9 +243,9 @@
|
||||||
item.width = 35;
|
item.width = 35;
|
||||||
item.height = 52;
|
item.height = 52;
|
||||||
this.list.push({
|
this.list.push({
|
||||||
latitude:Number(item.stationLatitude),
|
latitude: Number(item.stationLatitude),
|
||||||
longitude: Number(item.stationLongitude),
|
longitude: Number(item.stationLongitude),
|
||||||
stationType:item.stationType,
|
stationType: item.stationType,
|
||||||
sortNo: item.sortNo,
|
sortNo: item.sortNo,
|
||||||
stationName: item.stationName,
|
stationName: item.stationName,
|
||||||
stationCode: item.stationCode
|
stationCode: item.stationCode
|
||||||
|
|
@ -337,11 +279,11 @@
|
||||||
this.isssscd = !this.isssscd
|
this.isssscd = !this.isssscd
|
||||||
this.list2query()
|
this.list2query()
|
||||||
},
|
},
|
||||||
list1query(){
|
list1query() {
|
||||||
if (!this.issscd) {
|
if (!this.issscd) {
|
||||||
for (let i = 0; i < this.stationInfo.length; i++) {
|
for (let i = 0; i < this.stationInfo.length; i++) {
|
||||||
const item = this.stationInfo[i];
|
const item = this.stationInfo[i];
|
||||||
if(item.stationType === 'orient'){
|
if (item.stationType === 'orient') {
|
||||||
item.iconPath = '/static/zhandian_nongtian_dingwei.png';
|
item.iconPath = '/static/zhandian_nongtian_dingwei.png';
|
||||||
item.latitude = Number(item.stationLatitude);
|
item.latitude = Number(item.stationLatitude);
|
||||||
item.longitude = Number(item.stationLongitude);
|
item.longitude = Number(item.stationLongitude);
|
||||||
|
|
@ -369,16 +311,16 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.markers = this.markers.filter((item)=>{
|
this.markers = this.markers.filter((item) => {
|
||||||
return item.stationType !== 'orient'
|
return item.stationType !== 'orient'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
list2query(){
|
list2query() {
|
||||||
if (!this.isssscd) {
|
if (!this.isssscd) {
|
||||||
for (let i = 0; i < this.stationInfo.length; i++) {
|
for (let i = 0; i < this.stationInfo.length; i++) {
|
||||||
const item = this.stationInfo[i];
|
const item = this.stationInfo[i];
|
||||||
if(item.stationType === 'livestock'){
|
if (item.stationType === 'livestock') {
|
||||||
item.iconPath = '/static/zhandian_xuqin_dingwei.png';
|
item.iconPath = '/static/zhandian_xuqin_dingwei.png';
|
||||||
item.latitude = Number(item.stationLatitude);
|
item.latitude = Number(item.stationLatitude);
|
||||||
item.longitude = Number(item.stationLongitude);
|
item.longitude = Number(item.stationLongitude);
|
||||||
|
|
@ -406,7 +348,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.markers = this.markers.filter((item)=>{
|
this.markers = this.markers.filter((item) => {
|
||||||
return item.stationType !== 'livestock'
|
return item.stationType !== 'livestock'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue