diff --git a/packDetail/pages/Site/detail.vue b/packDetail/pages/Site/detail.vue
index 9f4bb6f..147cdc7 100644
--- a/packDetail/pages/Site/detail.vue
+++ b/packDetail/pages/Site/detail.vue
@@ -601,7 +601,18 @@
},
tojk(item,index){
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){
this.isActive = index
diff --git a/packDetail/pages/login/login.vue b/packDetail/pages/login/login.vue
index befaa04..bb4db9e 100644
--- a/packDetail/pages/login/login.vue
+++ b/packDetail/pages/login/login.vue
@@ -40,7 +40,7 @@
- 版权所有@河津市农业农村局
+ 版权所有@
-->
diff --git a/packDetail1/pages/device/index.vue b/packDetail1/pages/device/index.vue
index 2fb6935..4769a1a 100644
--- a/packDetail1/pages/device/index.vue
+++ b/packDetail1/pages/device/index.vue
@@ -1,6 +1,6 @@
-
+
@@ -12,16 +12,16 @@
-
-
-
- {{item.depDesArr[i]}}
-
-
-
-
+
+
+
+ {{item.depDesArr[i]}}
+
+
+
+
@@ -44,34 +44,34 @@
import api from "@/api/api"
import configService from '@/common/service/config.service.js';
export default {
- data(){
- return{
- height:0,
- scorllheight:0,
- baseUrl:configService.apiUrl,
+ data() {
+ return {
+ height: 0,
+ scorllheight: 0,
+ baseUrl: configService.apiUrl,
allNum: '',
isLastpage: '',
intervalId: null,
- loadStatus:'more', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
- isLoadMore:false, //是否加载中
- show:false,
- show1:false,
- top:0,
- List:[],
- pageNo:1,
- pageSize:4,
- token:'',
- sxtlist:[]
+ loadStatus: 'more', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
+ isLoadMore: false, //是否加载中
+ show: false,
+ show1: false,
+ top: 0,
+ List: [],
+ pageNo: 1,
+ pageSize: 4,
+ token: '',
+ sxtlist: []
}
},
onLoad() {
uni.getSystemInfo({
success: res => {
- var pxToRpxScale = 750 / res.windowWidth
+ var pxToRpxScale = 750 / res.windowWidth
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
var navigationHeight = 44 * pxToRpxScale
- this.height = res.windowHeight * pxToRpxScale//将px 转换rpx
- console.log(this.height,ktxStatusHeight,navigationHeight)
+ this.height = res.windowHeight * pxToRpxScale //将px 转换rpx
+ console.log(this.height, ktxStatusHeight, navigationHeight)
this.scorllheight = this.height
}
});
@@ -81,22 +81,22 @@
onShow() {
uni.getSystemInfo({
success: res => {
- var pxToRpxScale = 750 / res.windowWidth
+ var pxToRpxScale = 750 / res.windowWidth
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
var navigationHeight = 44 * pxToRpxScale
- this.height = res.windowHeight * pxToRpxScale//将px 转换rpx
- console.log(this.height,ktxStatusHeight,navigationHeight)
+ this.height = res.windowHeight * pxToRpxScale //将px 转换rpx
+ console.log(this.height, ktxStatusHeight, navigationHeight)
this.scorllheight = this.height
}
});
},
- methods:{
- getToken(){
- this.$http.post('/applet/ysyun/getYsToken').then(res =>{
+ methods: {
+ getToken() {
+ this.$http.post('/applet/ysyun/getYsToken').then(res => {
this.token = res.data.data.ysToken
})
},
- getList(){
+ getList() {
let params = {}
params.pageNo = this.pageNo
params.pageSize = this.pageSize
@@ -104,38 +104,40 @@
title: '加载中'
});
this.List = []
- this.$http.get('/applet/survDeviceDeploy/list',{params:params}).then(res =>{
- if(res.data.code == 0){
+ this.$http.get('/applet/survDeviceDeploy/list', {
+ params: params
+ }).then(res => {
+ if (res.data.code == 0) {
var data = res.data.data
this.List = this.List.concat(data)
- if(data.length != 0){
- this.allNum = Number(data.length)/Number(this.pageSize)+'';
- console.log(this.allNum,'总页数')
- if(this.allNum.indexOf('.') == -1) {
+ if (data.length != 0) {
+ this.allNum = Number(data.length) / Number(this.pageSize) + '';
+ console.log(this.allNum, '总页数')
+ if (this.allNum.indexOf('.') == -1) {
this.allNum = this.allNum;
- console.log(this.allNum,'if')
+ console.log(this.allNum, 'if')
} else {
- this.allNum = parseInt(Number(this.allNum)+1);
- console.log(this.allNum,'else')
+ this.allNum = parseInt(Number(this.allNum) + 1);
+ console.log(this.allNum, 'else')
}
- console.log(this.pageNo,this.allNum,'156156')
- if(this.pageNo == this.allNum) {
+ console.log(this.pageNo, this.allNum, '156156')
+ if (this.pageNo == this.allNum) {
this.isLastpage = true;
- this.loadStatus='nomore'
- console.log(this.isLastpage,'true','nomore')
+ this.loadStatus = 'nomore'
+ console.log(this.isLastpage, 'true', 'nomore')
} else {
this.isLastpage = false;
// this.isLoadMore=true
this.loadStatus = 'more'
- console.log(this.isLastpage,'false')
+ console.log(this.isLastpage, 'false')
}
- }else{
+ } else {
this.isLastpage = true;
- this.loadStatus='nomore'
+ this.loadStatus = 'nomore'
}
}
uni.hideLoading();
- this.isRefresher= false
+ this.isRefresher = false
})
},
lower() {
@@ -147,77 +149,85 @@
clearInterval(this.intervalId);
var num = 1;
this.intervalId = setInterval(() => {
- num = num+1;
- },1000)
- console.log(this.intervalId,num)
+ num = num + 1;
+ }, 1000)
+ console.log(this.intervalId, num)
this.pageNo = this.pageNo + 1;
let params = {}
params.pageNo = this.pageNo
params.pageSize = this.pageSize
- this.$http.get('/applet/survDeviceDeploy/list',{params:params}).then(res =>{
- if(res.data.code == 0){
+ this.$http.get('/applet/survDeviceDeploy/list', {
+ params: params
+ }).then(res => {
+ if (res.data.code == 0) {
var data = res.data.data
this.List = this.List.concat(data)
- if(data.length != 0){
- if(this.pageNo == this.allNum) {
+ if (data.length != 0) {
+ if (this.pageNo == this.allNum) {
this.isLastpage = true;
- this.loadStatus='nomore'
- console.log(this.isLastpage,'true')
+ this.loadStatus = 'nomore'
+ console.log(this.isLastpage, 'true')
} else {
this.isLastpage = false;
// this.isLoadMore=true
this.loadStatus = 'more'
- console.log(this.isLastpage,'false')
+ console.log(this.isLastpage, 'false')
}
- }else{
+ } else {
this.isLastpage = true;
- this.loadStatus='nomore'
+ this.loadStatus = 'nomore'
}
}
})
},
- todetail(it,i,val){
+ todetail(it, i, val) {
let item = it.split('-')
- // utils_config.config.h5LinkIp
- var obj = {
- url: "https://m.ilhzn.cn/#/pages/cameraView/ysyCamera",
- deployDes: val.stationName+'-'+val.depDesArr[i],
- ysToken: this.token,
- deviceIotUrl: item[0]
- };
- const queryString = Object.keys(obj).map((key) => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join("&");
- const webviewUrl = `/packDetail1/pages/device/index4?${queryString}`;
- uni.navigateTo({
- url: webviewUrl
- });
+ // utils_config.config.h5LinkIp
+ var obj = {
+ url: "https://m.ilhzn.cn/#/pages/cameraView/ysyCamera",
+ deployDes: val.stationName + '-' + val.depDesArr[i],
+ ysToken: this.token,
+ deviceIotUrl: item[0]
+ };
+ const queryString = Object.keys(obj).map((key) =>
+ `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join("&");
+ const webviewUrl = `/packDetail1/pages/device/index4?${queryString}`;
+ uni.navigateTo({
+ url: webviewUrl
+ });
}
}
}
+
\ No newline at end of file
diff --git a/pages/maps/index.vue b/pages/maps/index.vue
index 71a0967..ab0a5e7 100644
--- a/pages/maps/index.vue
+++ b/pages/maps/index.vue
@@ -1,8 +1,8 @@
-
@@ -78,9 +66,9 @@
onLoad() {
// this.isscd = true
// this.getList()
- this.$nextTick(() => {
- this.getList()
- })
+ this.$nextTick(() => {
+ this.getList()
+ })
},
onShow() {
var that = this
@@ -130,32 +118,34 @@
title: '加载中'
});
this.$http.get('/applet/survStationInfo/stationMap').then(res => {
- this.stationlist = [...res.data.data.pestlight, ...res.data.data.cusLocation, ...res.data.data.stationInfo]
- this.stationlist.forEach((item,index) => {
- item.id = index;
- if(item.inType == 'pestlight'){
- this.pestlight.push(item)
- }
- if(item.stationType == 'cusLocaltion'){
- this.cusLocation.push(item)
- }
- if(item.stationType == 'orient' || item.stationType == 'livestock'){
- this.stationInfo.push(item)
- }
- this.list.push({
- latitude:Number(item.stationLatitude),
- longitude: Number(item.stationLongitude),
- stationType:item.stationType,
- sortNo: item.sortNo,
- stationName: item.stationName,
- stationCode: item.stationCode
- })
- })
- this.issscd = false
- this.isssscd = false
+ this.stationlist = [...res.data.data.pestlight, ...res.data.data.cusLocation, ...res.data.data
+ .stationInfo
+ ]
+ this.stationlist.forEach((item, index) => {
+ item.id = index;
+ if (item.inType == 'pestlight') {
+ this.pestlight.push(item)
+ }
+ if (item.stationType == 'cusLocaltion') {
+ this.cusLocation.push(item)
+ }
+ if (item.stationType == 'orient' || item.stationType == 'livestock') {
+ this.stationInfo.push(item)
+ }
+ this.list.push({
+ latitude: Number(item.stationLatitude),
+ longitude: Number(item.stationLongitude),
+ stationType: item.stationType,
+ sortNo: item.sortNo,
+ stationName: item.stationName,
+ stationCode: item.stationCode
+ })
+ })
+ this.issscd = false
+ this.isssscd = false
this.qiyeChange()
this.list1query()
- this.list2query()
+ this.list2query()
uni.hideLoading();
})
},
@@ -226,7 +216,7 @@
},
markertap(e) {
const index = e.detail.markerId
- console.log(e.detail,'index')
+ console.log(e.detail, 'index')
if (['orient', 'livestock'].includes(this.list[index].stationType)) {
uni.navigateTo({
url: `/packDetail/pages/Site/detail?item=${encodeURIComponent(JSON.stringify(this.list[index]))}`
@@ -244,22 +234,64 @@
todetails(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;
+ qiyeChange() {
+ for (let i = 0; i < this.cusLocation.length; i++) {
+ const item = this.cusLocation[i];
+ item.iconPath = '/static/qiyeIcon.png';
+ item.latitude = Number(item.stationLatitude);
+ item.longitude = Number(item.stationLongitude);
+ item.width = 35;
+ item.height = 52;
+ this.list.push({
+ latitude: Number(item.stationLatitude),
+ longitude: Number(item.stationLongitude),
+ stationType: item.stationType,
+ 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 格式的对象
const markerItem = {
- id: item.id,
+ id: item.id,
iconPath: item.iconPath,
latitude: item.latitude,
longitude: item.longitude,
@@ -270,147 +302,57 @@
anchorX: 0, // X轴偏移量
display: 'ALWAYS' // 一直展示
},
- // stationType: item.stationType,
- inType: item.inType,
+ stationType: item.stationType,
stationName: item.stationName,
stationCode: item.stationCode,
- joinCluster: false // 是否参与点聚合
+ joinCluster: true // 是否参与点聚合
};
- this.markers.push(markerItem);
- index++;
+ this.markers.push(markerItem);
}
- // 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'
+ this.markers = this.markers.filter((item) => {
+ return item.stationType !== 'orient'
})
}
},
- qiyeChange() {
- for (let i = 0; i < this.cusLocation.length; i++) {
- const item = this.cusLocation[i];
- item.iconPath = '/static/qiyeIcon.png';
- item.latitude = Number(item.stationLatitude);
- item.longitude = Number(item.stationLongitude);
- item.width = 35;
- item.height = 52;
- this.list.push({
- latitude:Number(item.stationLatitude),
- longitude: Number(item.stationLongitude),
- stationType:item.stationType,
- 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 格式的对象
- 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'
- })
- }
- }
+ 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'
+ })
+ }
+ }
}
}
@@ -471,7 +413,7 @@
font-weight: 500;
color: #FFFFFF;
text-shadow: 0rpx 1rpx 0rpx rgba(4, 49, 52, 0.55);
- width: 299rpx;
+ width: 359rpx;
background: rgba(0, 0, 0, 0.52);
border: 1px solid #4B677C;
border-radius: 6rpx;
@@ -521,4 +463,4 @@
display: flex;
align-items: center;
}
-
+
\ No newline at end of file