样式更新

This commit is contained in:
978184212@qq.com 2025-11-27 14:37:33 +08:00
parent 9ee7ff809b
commit e4c8f8c24d
3 changed files with 92 additions and 24 deletions

View File

@ -164,18 +164,10 @@
enableScroll: false,
legend: {},
xAxis: {
// X
disabled: true, // X
itemCount: 3,
//
// disableGrid: true, // 线
// type: 'grid', //
// gridType: 'dash', // 线
// itemCount: 3, //
// scrollShow: true, //
// scrollAlign: 'left', //
// scrollBackgroundColor: '#F7F7FF', //
// scrollColor: '#DEE7F7' //
disabled: false, // X
// itemCount
gridType: 'dash', //
dashLength: 2,
},
yAxis: {
gridType: "dash",
@ -403,7 +395,6 @@
//
radioChange(e){
this.riqinumber = e.detail.value
console.log("0000000000000",this.datetwo)
this.bindDateqsChange(this.datetwo,'twotime')
},
//
@ -431,24 +422,38 @@
this.qushicov();
},
//
// qushicov
qushicov() {
let data = {
summrayMode: this.riqinumber,
startTime: this.dateqs,
}
this.$http.post('/applet/survDeviceDeploy/waterIntegrateStatistic', data).then(iem => {
console.log("接口返回数据", iem)
let lynum = iem.data.data
setTimeout(() => {
let categories = [];
let displayCategories = []; // X
let series = [];
let allValues = []; //
if (lynum.tableHead && lynum.tableHead.length > 0) {
categories = lynum.tableIndex;
// X
if (categories.length > 0) {
const first = categories[0];
const middle = categories[Math.floor(categories.length / 2)];
const last = categories[categories.length - 3];
// categories
displayCategories = categories.map((item, index) => {
if (index === 0 || index === Math.floor(categories.length / 2) || index === categories.length - 2) {
return item;
}
return '';
});
}
lynum.tableHead.forEach((header, index) => {
const seriesData = lynum.tableData2.map(row => {
const value = row[index] === "0" ? 0 : parseFloat(row[index]) || 0;
@ -488,11 +493,9 @@
}
let res = {
categories: categories,
categories: displayCategories, // 使
series: series
};
console.log("处理后的图表数据", res);
this.chartData = JSON.parse(JSON.stringify(res));
}, 500);
})

View File

@ -2,17 +2,25 @@
<view class="container">
<view class="form">
<view class="form_item" v-if="details.stationName">
<view class="left">选择站点:</view>
<view class="left">站点名称:</view>
<view class="nr">{{details.stationName}}</view>
</view>
<view class="form_item" v-if="details.omName">
<view class="left">维护内容:</view>
<view class="nr">{{details.omName}}</view>
<view class="form_item" v-if="details.maintainData3">
<view class="left">站点位置:</view>
<view class="nr">{{details.maintainData3}}</view>
</view>
<view class="form_item" v-if="details.maintainData1">
<view class="left">检测情况:</view>
<view class="nr">{{details.maintainData1}}</view>
</view>
<view class="form_item" v-if="details.maintainPerson">
<view class="left">负责人:</view>
<view class="nr">{{details.maintainPerson}}</view>
</view>
<view class="form_item" v-if="details.maintainData2">
<view class="left">联系方式:</view>
<view class="nr">{{details.maintainData2}}</view>
</view>
<view class="form_item" v-if="details.maintainTime">
<view class="left">维护时间:</view>
<view class="nr">{{details.maintainTime}}</view>
@ -43,6 +51,9 @@
maintainPerson:'',
maintainTime:'',
maintainNote:'',
maintainData1:'',
maintainData2:'',
maintainData3:'',
omName:''
}
}

View File

@ -37,6 +37,19 @@
</view>
<input type="text" placeholder="请输入运维人姓名" v-model="details.maintainPerson">
</view>
<view class="form_item">
<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 class="form_item">
<view class="form_top">
维护时间:
@ -100,11 +113,11 @@
tag:'',
hobby: [],
checkbox1: [],
reload:'true'
reload:'true',
phoneError: '', //
}
},
onLoad(options) {
console.log("00000000",JSON.parse(decodeURIComponent(options.item)))
this.details = JSON.parse(decodeURIComponent(options.item));
},
onShow() {
@ -112,6 +125,25 @@
this.getazsurvMulchRecord1()
},
methods:{
//
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;
}
},
//
getazsurvMulchRecord(){
this.array = []
@ -184,6 +216,23 @@
})
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){
uni.showToast({
title: "请选择维护时间",
@ -316,4 +365,9 @@
text-align: center;
color: #0472e3;
}
.error-text {
color: #ff0000;
font-size: 24rpx;
margin-top: 10rpx;
}
</style>