样式修改
This commit is contained in:
parent
04a4cc4ac1
commit
8c3a0237f0
|
|
@ -128,7 +128,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="jccontent" style="margin-top: 51rpx;" v-if="qxList.length != 0">
|
<view class="jccontent" style="margin-top: 51rpx;" v-if="qxList.length != 0">
|
||||||
<view class="titles">
|
<view class="titles">
|
||||||
气象数据监测
|
水五常监测监测
|
||||||
</view>
|
</view>
|
||||||
<view class="botcontent">
|
<view class="botcontent">
|
||||||
<view class="botcontent_left" v-for="(item,index) in qxList" :key="index" @click="tosjdetail(item,index)">
|
<view class="botcontent_left" v-for="(item,index) in qxList" :key="index" @click="tosjdetail(item,index)">
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
<view class="form_bot">
|
<view class="form_bot">
|
||||||
<picker @change="bindPickerChange" :value="index" :range="array">
|
<picker @change="bindPickerChange" :value="index" :range="array">
|
||||||
<view class="dates">
|
<view class="dates">
|
||||||
<view class="uni-input" v-if="!details.stationName" style="color: #808080;">请选择监测站点</view>
|
<view class="uni-input" v-if="!details.stationName" style="color: #808080;">请选择检测站点</view>
|
||||||
<view class="uni-input" v-else>{{details.stationName}}</view>
|
<view class="uni-input" v-else>{{details.stationName}}</view>
|
||||||
</view>
|
</view>
|
||||||
<image class="dateimg" src="../../../static/xiala.png" mode="" style="width: 32rpx;height: 16rpx;"></image>
|
<image class="dateimg" src="../../../static/xiala.png" mode="" style="width: 32rpx;height: 16rpx;"></image>
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
</view>
|
</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">
|
||||||
<view class="uni-textarea">
|
<view class="uni-textarea">
|
||||||
|
|
@ -197,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
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<view class="nr">{{details.omName}}</view>
|
<view class="nr">{{details.omName}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="form_item" v-if="details.maintainPerson">
|
<view class="form_item" v-if="details.maintainPerson">
|
||||||
<view class="left">维护人:</view>
|
<view class="left">负责人:</view>
|
||||||
<view class="nr">{{details.maintainPerson}}</view>
|
<view class="nr">{{details.maintainPerson}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="form_item" v-if="details.maintainTime">
|
<view class="form_item" v-if="details.maintainTime">
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
<view class="form_bot">
|
<view class="form_bot">
|
||||||
<picker @change="bindPickerChange" :value="index" :range="array">
|
<picker @change="bindPickerChange" :value="index" :range="array">
|
||||||
<view class="dates">
|
<view class="dates">
|
||||||
<view class="uni-input" v-if="!details.stationName" style="color: #808080;">请选择监测站点</view>
|
<view class="uni-input" v-if="!details.stationName" style="color: #808080;">请选择检测站点</view>
|
||||||
<view class="uni-input" v-else>{{details.stationName}}</view>
|
<view class="uni-input" v-else>{{details.stationName}}</view>
|
||||||
</view>
|
</view>
|
||||||
<image class="dateimg" src="../../../static/xiala.png" mode="" style="width: 32rpx;height: 16rpx;"></image>
|
<image class="dateimg" src="../../../static/xiala.png" mode="" style="width: 32rpx;height: 16rpx;"></image>
|
||||||
|
|
@ -26,11 +26,9 @@
|
||||||
检测情况:
|
检测情况:
|
||||||
</view>
|
</view>
|
||||||
<view class="form_bot">
|
<view class="form_bot">
|
||||||
<uni-section type="line">
|
<view class="uni-textarea">
|
||||||
<view class="uni-px-5 uni-pb-5">
|
<textarea placeholder-style="color:#808080" auto-height v-model="details.maintainData1" placeholder="请输入内容" @blur="bindTextAreaBlur"/>
|
||||||
<uni-data-checkbox @change="change1" selectedColor="#47c693" mode="tag" v-model="details.itemId" :localdata="hobby"></uni-data-checkbox>
|
</view>
|
||||||
</view>
|
|
||||||
</uni-section>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="form_item">
|
<view class="form_item">
|
||||||
|
|
@ -106,6 +104,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
console.log("00000000",JSON.parse(decodeURIComponent(options.item)))
|
||||||
this.details = JSON.parse(decodeURIComponent(options.item));
|
this.details = JSON.parse(decodeURIComponent(options.item));
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
|
@ -156,6 +155,9 @@
|
||||||
change1(e){
|
change1(e){
|
||||||
this.details.itemId = e.detail.value
|
this.details.itemId = e.detail.value
|
||||||
},
|
},
|
||||||
|
bindTextAreaBlur(e) {
|
||||||
|
this.details.maintainData1 = e.detail.value
|
||||||
|
},
|
||||||
// 提交
|
// 提交
|
||||||
tosubmit(){
|
tosubmit(){
|
||||||
if(!this.details.stationName){
|
if(!this.details.stationName){
|
||||||
|
|
@ -166,9 +168,9 @@
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if(!this.details.itemId){
|
if(!this.details.maintainData1){
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "请选择维护内容",
|
title: "请选择检测内容",
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
|
|
@ -176,7 +178,7 @@
|
||||||
}
|
}
|
||||||
if(!this.details.maintainPerson){
|
if(!this.details.maintainPerson){
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "请输入运维人姓名",
|
title: "请输入负责人姓名",
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
</view>
|
</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">
|
||||||
|
|
@ -118,8 +118,7 @@
|
||||||
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)
|
|
||||||
this.scorllheight = this.height - 182
|
this.scorllheight = this.height - 182
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -131,8 +130,7 @@
|
||||||
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)
|
|
||||||
this.scorllheight = this.height - 182
|
this.scorllheight = this.height - 182
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -162,7 +160,6 @@
|
||||||
value:res.data.data[i].stationCode
|
value:res.data.data[i].stationCode
|
||||||
})
|
})
|
||||||
this.array.push(res.data.data[i].stationName)
|
this.array.push(res.data.data[i].stationName)
|
||||||
console.log(this.array)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -198,24 +195,18 @@
|
||||||
this.List = this.List.concat(data)
|
this.List = this.List.concat(data)
|
||||||
if(res.data.data.total != 0){
|
if(res.data.data.total != 0){
|
||||||
this.allNum = Number(res.data.data.total)/Number(this.pageSize)+'';
|
this.allNum = Number(res.data.data.total)/Number(this.pageSize)+'';
|
||||||
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')
|
|
||||||
} else {
|
} else {
|
||||||
this.allNum = parseInt(Number(this.allNum)+1);
|
this.allNum = parseInt(Number(this.allNum)+1);
|
||||||
console.log(this.allNum,'else')
|
|
||||||
}
|
}
|
||||||
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')
|
|
||||||
} 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')
|
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
this.isLastpage = true;
|
this.isLastpage = true;
|
||||||
|
|
@ -228,7 +219,6 @@
|
||||||
},
|
},
|
||||||
// 分页加载
|
// 分页加载
|
||||||
lower() {
|
lower() {
|
||||||
console.log("最后一页了,取消下拉功能");
|
|
||||||
// 最后一页了,取消下拉功能
|
// 最后一页了,取消下拉功能
|
||||||
if (this.isLastpage) {
|
if (this.isLastpage) {
|
||||||
return
|
return
|
||||||
|
|
@ -238,7 +228,6 @@
|
||||||
this.intervalId = setInterval(() => {
|
this.intervalId = setInterval(() => {
|
||||||
num = num+1;
|
num = num+1;
|
||||||
},1000)
|
},1000)
|
||||||
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
|
||||||
|
|
@ -255,12 +244,10 @@
|
||||||
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')
|
|
||||||
} 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')
|
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
this.isLastpage = true;
|
this.isLastpage = true;
|
||||||
|
|
@ -270,7 +257,6 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
bindPickerChange: function(e) {
|
bindPickerChange: function(e) {
|
||||||
console.log('picker发送选择改变,携带值为', e.detail.value)
|
|
||||||
this.index = e.detail.value
|
this.index = e.detail.value
|
||||||
this.stationName = this.array[this.index]
|
this.stationName = this.array[this.index]
|
||||||
for(var i=0;i<this.arrays.length;i++){
|
for(var i=0;i<this.arrays.length;i++){
|
||||||
|
|
@ -287,7 +273,6 @@
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
changenr(){
|
changenr(){
|
||||||
console.log(this.maintainPerson)
|
|
||||||
this.pageNo = 1
|
this.pageNo = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
|
|
@ -302,12 +287,10 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
caozuo(item){
|
caozuo(item){
|
||||||
console.log(item)
|
|
||||||
var that = this
|
var that = this
|
||||||
uni.showActionSheet({
|
uni.showActionSheet({
|
||||||
itemList: ['编辑', '删除'],
|
itemList: ['编辑', '删除'],
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
console.log('选中了第' + (res.tapIndex + 1) + '个按钮');
|
|
||||||
if((res.tapIndex + 1) == 1){
|
if((res.tapIndex + 1) == 1){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/packDetail/pages/operations/edit?item='+ encodeURIComponent(JSON.stringify(item))
|
url:'/packDetail/pages/operations/edit?item='+ encodeURIComponent(JSON.stringify(item))
|
||||||
|
|
@ -318,7 +301,6 @@
|
||||||
content: '是否删除数据?',
|
content: '是否删除数据?',
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
console.log('用户点击确定');
|
|
||||||
that.$http.delete(that.deleteUrl+'?id='+item.id).then(res =>{
|
that.$http.delete(that.deleteUrl+'?id='+item.id).then(res =>{
|
||||||
if(res.data.code == 0){
|
if(res.data.code == 0){
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="botleftleft_bot">
|
<view class="botleftleft_bot">
|
||||||
<view class="botleft_bottop">
|
<view class="botleft_bottop">
|
||||||
{{item.deviceInfo.deviceName}}
|
{{item.deployDes}}
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="botleft_botbot">
|
<!-- <view class="botleft_botbot">
|
||||||
型号:{{item.deviceInfo.deviceModel}}
|
型号:{{item.deviceInfo.deviceModel}}
|
||||||
|
|
|
||||||
|
|
@ -60,35 +60,58 @@
|
||||||
getList() {
|
getList() {
|
||||||
this.markers = []
|
this.markers = []
|
||||||
this.list = []
|
this.list = []
|
||||||
|
this.stationInfo = []
|
||||||
|
this.cusLocation = []
|
||||||
|
this.stationlist = []
|
||||||
|
this.stationTwolist = []
|
||||||
|
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '加载中'
|
title: '加载中'
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$http.get('/applet/survStationInfo/stationMap').then(res => {
|
this.$http.get('/applet/survStationInfo/stationMap').then(res => {
|
||||||
this.stationlist = [...res.data.data.stationInfo]
|
// 合并 stationInfo 和 deviceList
|
||||||
this.stationTwolist = [...res.data.data.stationInfo]
|
const combinedList = [...res.data.data.stationInfo, ...res.data.data.deviceList];
|
||||||
|
this.stationlist = combinedList;
|
||||||
|
this.stationTwolist = [...res.data.data.stationInfo];
|
||||||
|
|
||||||
|
console.log("合并后的stationlist+++++", this.stationlist);
|
||||||
|
|
||||||
|
// 处理所有标记点
|
||||||
this.stationlist.forEach((item, index) => {
|
this.stationlist.forEach((item, index) => {
|
||||||
item.id = index;
|
item.id = index;
|
||||||
if (item.stationType == 'cusLocaltion') {
|
|
||||||
this.cusLocation.push(item)
|
// 统一字段名称,处理 deviceList 和 stationInfo 的字段差异
|
||||||
|
const markerItem = {
|
||||||
|
id: item.id,
|
||||||
|
latitude: Number(item.latitude || item.stationLatitude),
|
||||||
|
longitude: Number(item.longitude || item.stationLongitude),
|
||||||
|
stationType: item.stationType || 'device', // deviceList 没有 stationType,默认为 'device'
|
||||||
|
sortNo: item.sortNo || index,
|
||||||
|
stationName: item.name || item.stationName,
|
||||||
|
stationCode: item.ids || item.stationCode || item.id,
|
||||||
|
// 添加分组信息
|
||||||
|
groupName: item.groupName || '',
|
||||||
|
// 设备类型
|
||||||
|
deviceType: item.type || null
|
||||||
|
};
|
||||||
|
|
||||||
|
this.list.push(markerItem);
|
||||||
|
|
||||||
|
// 分类处理
|
||||||
|
if (item.stationType === 'cusLocaltion') {
|
||||||
|
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({
|
});
|
||||||
latitude: Number(item.stationLatitude),
|
|
||||||
longitude: Number(item.stationLongitude),
|
|
||||||
stationType: item.stationType,
|
|
||||||
sortNo: item.sortNo,
|
|
||||||
stationName: item.stationName,
|
|
||||||
stationCode: item.stationCode
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
this.issscd = false
|
this.issscd = false
|
||||||
this.isssscd = false
|
this.isssscd = false
|
||||||
this.qiyeChange()
|
this.qiyeChange()
|
||||||
this.list1query()
|
this.list1query()
|
||||||
|
this.addDeviceMarkers() // 添加设备标记
|
||||||
|
|
||||||
// 延迟执行以确保标记已经添加到地图
|
// 延迟执行以确保标记已经添加到地图
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
@ -99,6 +122,54 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 添加设备标记
|
||||||
|
addDeviceMarkers() {
|
||||||
|
this.stationlist.forEach((item, index) => {
|
||||||
|
// 如果是 deviceList 中的设备(有 type 字段但没有 stationType 字段)
|
||||||
|
if (item.type && !item.stationType) {
|
||||||
|
let iconPath = '';
|
||||||
|
let width = 35;
|
||||||
|
let height = 35;
|
||||||
|
|
||||||
|
// 根据设备类型设置不同的图标
|
||||||
|
switch(item.type) {
|
||||||
|
case 'soil':
|
||||||
|
iconPath = this.baseUrl + '/icon/device/soil.png';
|
||||||
|
width = 40;
|
||||||
|
height = 40;
|
||||||
|
break;
|
||||||
|
case 'camera':
|
||||||
|
iconPath = this.baseUrl + '/icon/device/cam.png';
|
||||||
|
width = 45;
|
||||||
|
height = 45;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
iconPath = this.baseUrl + '/icon/device/default.png';
|
||||||
|
}
|
||||||
|
|
||||||
|
const markerItem = {
|
||||||
|
id: item.id,
|
||||||
|
iconPath: iconPath,
|
||||||
|
latitude: Number(item.latitude),
|
||||||
|
longitude: Number(item.longitude),
|
||||||
|
width: width,
|
||||||
|
height: height,
|
||||||
|
customCallout: {
|
||||||
|
anchorY: 0,
|
||||||
|
anchorX: 0,
|
||||||
|
display: 'ALWAYS'
|
||||||
|
},
|
||||||
|
stationType: 'device',
|
||||||
|
stationName: item.name,
|
||||||
|
stationCode: item.ids,
|
||||||
|
deviceType: item.type,
|
||||||
|
joinCluster: true
|
||||||
|
};
|
||||||
|
this.markers.push(markerItem);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
// 调整地图视野以包含所有标记点
|
// 调整地图视野以包含所有标记点
|
||||||
adjustMapToFitAllMarkers() {
|
adjustMapToFitAllMarkers() {
|
||||||
if (this.mapCtx && this.list.length > 0) {
|
if (this.mapCtx && this.list.length > 0) {
|
||||||
|
|
@ -144,20 +215,41 @@
|
||||||
|
|
||||||
markertap(e) {
|
markertap(e) {
|
||||||
const index = e.detail.markerId
|
const index = e.detail.markerId
|
||||||
if (['orient', 'livestock'].includes(this.list[index].stationType)) {
|
const marker = this.markers.find(m => m.id === index);
|
||||||
uni.navigateTo({
|
if (marker) {
|
||||||
url: `/packDetail/pages/Site/detail?item=${encodeURIComponent(JSON.stringify(this.list[index]))}`
|
if (['orient', 'livestock'].includes(marker.stationType)) {
|
||||||
})
|
uni.navigateTo({
|
||||||
|
url: `/packDetail/pages/Site/detail?item=${encodeURIComponent(JSON.stringify(marker))}`
|
||||||
|
})
|
||||||
|
} else if (marker.stationType === 'device') {
|
||||||
|
// 处理设备点击事件
|
||||||
|
uni.showToast({
|
||||||
|
title: `设备: ${marker.stationName}`,
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
// 可以在这里添加设备详情页面的跳转逻辑
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
callouttap(e) {
|
callouttap(e) {
|
||||||
const index = e.detail.markerId
|
const index = e.detail.markerId
|
||||||
if (['orient', 'livestock'].includes(this.list[index].stationType)) {
|
const marker = this.markers.find(m => m.id === index);
|
||||||
uni.navigateTo({
|
if (marker) {
|
||||||
url: `/packDetail/pages/Site/detail?item=${encodeURIComponent(JSON.stringify(this.list[index]))}`
|
if (['orient', 'livestock'].includes(marker.stationType)) {
|
||||||
})
|
uni.navigateTo({
|
||||||
|
url: `/packDetail/pages/Site/detail?item=${encodeURIComponent(JSON.stringify(marker))}`
|
||||||
|
})
|
||||||
|
} else if (marker.stationType === 'device') {
|
||||||
|
// 处理设备点击事件
|
||||||
|
uni.showToast({
|
||||||
|
title: `设备: ${marker.stationName}`,
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
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];
|
||||||
|
|
@ -166,14 +258,6 @@
|
||||||
item.longitude = Number(item.stationLongitude);
|
item.longitude = Number(item.stationLongitude);
|
||||||
item.width = 35;
|
item.width = 35;
|
||||||
item.height = 52;
|
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
|
|
||||||
})
|
|
||||||
|
|
||||||
const markerItem = {
|
const markerItem = {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
|
|
@ -195,6 +279,7 @@
|
||||||
this.markers.push(markerItem);
|
this.markers.push(markerItem);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
switch2Change(name) {
|
switch2Change(name) {
|
||||||
if (name === "团柏河") {
|
if (name === "团柏河") {
|
||||||
this.issscd = !this.issscd;
|
this.issscd = !this.issscd;
|
||||||
|
|
@ -215,6 +300,7 @@
|
||||||
}, 300);
|
}, 300);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
list1query() {
|
list1query() {
|
||||||
// 先清除所有orient类型的标记
|
// 先清除所有orient类型的标记
|
||||||
this.markers = this.markers.filter(item => item.stationType !== 'orient');
|
this.markers = this.markers.filter(item => item.stationType !== 'orient');
|
||||||
|
|
@ -256,6 +342,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
/* 样式保持不变 */
|
||||||
.bgimg {
|
.bgimg {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
// z-index: -99;
|
// z-index: -99;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue