样式修改

This commit is contained in:
978184212@qq.com 2025-11-24 19:41:12 +08:00
parent 04a4cc4ac1
commit 8c3a0237f0
7 changed files with 138 additions and 67 deletions

View File

@ -128,7 +128,7 @@
</view>
<view class="jccontent" style="margin-top: 51rpx;" v-if="qxList.length != 0">
<view class="titles">
气象数据监测
水五常监测监测
</view>
<view class="botcontent">
<view class="botcontent_left" v-for="(item,index) in qxList" :key="index" @click="tosjdetail(item,index)">

View File

@ -8,7 +8,7 @@
<view class="form_bot">
<picker @change="bindPickerChange" :value="index" :range="array">
<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>
<image class="dateimg" src="../../../static/xiala.png" mode="" style="width: 32rpx;height: 16rpx;"></image>
@ -23,7 +23,7 @@
</view>
<view class="form_item">
<view class="form_top">
测情况:
测情况:
</view>
<view class="form_bot">
<view class="uni-textarea">
@ -197,7 +197,7 @@
}
if(!this.details.maintainData1){
uni.showToast({
title: "请填写测情况",
title: "请填写测情况",
icon: 'none',
duration: 2000
})

View File

@ -10,7 +10,7 @@
<view class="nr">{{details.omName}}</view>
</view>
<view class="form_item" v-if="details.maintainPerson">
<view class="left">维护:</view>
<view class="left">负责:</view>
<view class="nr">{{details.maintainPerson}}</view>
</view>
<view class="form_item" v-if="details.maintainTime">

View File

@ -8,7 +8,7 @@
<view class="form_bot">
<picker @change="bindPickerChange" :value="index" :range="array">
<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>
<image class="dateimg" src="../../../static/xiala.png" mode="" style="width: 32rpx;height: 16rpx;"></image>
@ -26,11 +26,9 @@
检测情况:
</view>
<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">
<textarea placeholder-style="color:#808080" auto-height v-model="details.maintainData1" placeholder="请输入内容" @blur="bindTextAreaBlur"/>
</view>
</view>
</view>
<view class="form_item">
@ -106,6 +104,7 @@
}
},
onLoad(options) {
console.log("00000000",JSON.parse(decodeURIComponent(options.item)))
this.details = JSON.parse(decodeURIComponent(options.item));
},
onShow() {
@ -156,6 +155,9 @@
change1(e){
this.details.itemId = e.detail.value
},
bindTextAreaBlur(e) {
this.details.maintainData1 = e.detail.value
},
//
tosubmit(){
if(!this.details.stationName){
@ -166,9 +168,9 @@
})
return
}
if(!this.details.itemId){
if(!this.details.maintainData1){
uni.showToast({
title: "请选择维护内容",
title: "请选择检测内容",
icon: 'none',
duration: 2000
})
@ -176,7 +178,7 @@
}
if(!this.details.maintainPerson){
uni.showToast({
title: "请输入运维人姓名",
title: "请输入负责人姓名",
icon: 'none',
duration: 2000
})

View File

@ -42,7 +42,7 @@
</view>
<view class="itembox_bot" @click="todetails(item,index)">
<view class="bot_item">
<span class="nrbt">测情况:</span>
<span class="nrbt">测情况:</span>
{{item.maintainData1}}
</view>
<view class="bot_item">
@ -118,8 +118,7 @@
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
this.scorllheight = this.height - 182
}
});
@ -131,8 +130,7 @@
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
this.scorllheight = this.height - 182
}
});
@ -162,7 +160,6 @@
value:res.data.data[i].stationCode
})
this.array.push(res.data.data[i].stationName)
console.log(this.array)
}
})
},
@ -198,24 +195,18 @@
this.List = this.List.concat(data)
if(res.data.data.total != 0){
this.allNum = Number(res.data.data.total)/Number(this.pageSize)+'';
console.log(this.allNum,'总页数')
if(this.allNum.indexOf('.') == -1) {
this.allNum = this.allNum;
console.log(this.allNum,'if')
} 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) {
this.isLastpage = true;
this.loadStatus='nomore'
console.log(this.isLastpage,'true','nomore')
} else {
this.isLastpage = false;
// this.isLoadMore=true
this.loadStatus = 'more'
console.log(this.isLastpage,'false')
}
}else{
this.isLastpage = true;
@ -228,7 +219,6 @@
},
//
lower() {
console.log("最后一页了,取消下拉功能");
//
if (this.isLastpage) {
return
@ -238,7 +228,6 @@
this.intervalId = setInterval(() => {
num = num+1;
},1000)
console.log(this.intervalId,num)
this.pageNo = this.pageNo + 1;
let params = {}
params.pageNo = this.pageNo
@ -255,12 +244,10 @@
if(this.pageNo == this.allNum) {
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')
}
}else{
this.isLastpage = true;
@ -270,7 +257,6 @@
})
},
bindPickerChange: function(e) {
console.log('picker发送选择改变携带值为', e.detail.value)
this.index = e.detail.value
this.stationName = this.array[this.index]
for(var i=0;i<this.arrays.length;i++){
@ -287,7 +273,6 @@
this.getList()
},
changenr(){
console.log(this.maintainPerson)
this.pageNo = 1
this.getList()
},
@ -302,12 +287,10 @@
})
},
caozuo(item){
console.log(item)
var that = this
uni.showActionSheet({
itemList: ['编辑', '删除'],
success: function (res) {
console.log('选中了第' + (res.tapIndex + 1) + '个按钮');
if((res.tapIndex + 1) == 1){
uni.navigateTo({
url:'/packDetail/pages/operations/edit?item='+ encodeURIComponent(JSON.stringify(item))
@ -318,7 +301,6 @@
content: '是否删除数据?',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
that.$http.delete(that.deleteUrl+'?id='+item.id).then(res =>{
if(res.data.code == 0){
uni.showToast({

View File

@ -33,7 +33,7 @@
</view>
<view class="botleftleft_bot">
<view class="botleft_bottop">
{{item.deviceInfo.deviceName}}
{{item.deployDes}}
</view>
<!-- <view class="botleft_botbot">
型号{{item.deviceInfo.deviceModel}}

View File

@ -60,35 +60,58 @@
getList() {
this.markers = []
this.list = []
this.stationInfo = []
this.cusLocation = []
this.stationlist = []
this.stationTwolist = []
uni.showLoading({
title: '加载中'
});
this.$http.get('/applet/survStationInfo/stationMap').then(res => {
this.stationlist = [...res.data.data.stationInfo]
this.stationTwolist = [...res.data.data.stationInfo]
// stationInfo deviceList
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) => {
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') {
this.stationInfo.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.addDeviceMarkers() //
//
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() {
if (this.mapCtx && this.list.length > 0) {
@ -144,20 +215,41 @@
markertap(e) {
const index = e.detail.markerId
if (['orient', 'livestock'].includes(this.list[index].stationType)) {
uni.navigateTo({
url: `/packDetail/pages/Site/detail?item=${encodeURIComponent(JSON.stringify(this.list[index]))}`
})
const marker = this.markers.find(m => m.id === index);
if (marker) {
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) {
const index = e.detail.markerId
if (['orient', 'livestock'].includes(this.list[index].stationType)) {
uni.navigateTo({
url: `/packDetail/pages/Site/detail?item=${encodeURIComponent(JSON.stringify(this.list[index]))}`
})
const marker = this.markers.find(m => m.id === index);
if (marker) {
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() {
for (let i = 0; i < this.cusLocation.length; i++) {
const item = this.cusLocation[i];
@ -166,14 +258,6 @@
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
})
const markerItem = {
id: item.id,
@ -195,6 +279,7 @@
this.markers.push(markerItem);
}
},
switch2Change(name) {
if (name === "团柏河") {
this.issscd = !this.issscd;
@ -215,6 +300,7 @@
}, 300);
}
},
list1query() {
// orient
this.markers = this.markers.filter(item => item.stationType !== 'orient');
@ -256,6 +342,7 @@
</script>
<style lang="scss">
/* 样式保持不变 */
.bgimg {
position: fixed;
// z-index: -99;