样式修改

This commit is contained in:
978184212@qq.com 2025-11-17 16:29:40 +08:00
parent 65c1a8d1c8
commit a47eab0d42
6 changed files with 1651 additions and 1615 deletions

View File

@ -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>

View File

@ -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
}, },
// //

View File

@ -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}}

View File

@ -168,7 +168,7 @@
dictLabel:'监测站告警' dictLabel:'监测站告警'
}, },
{ {
dictLabel:'杀虫灯告警' dictLabel:'异常趋势图'
} }
], ],
isActive:0, isActive:0,

View File

@ -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"
} }

View File

@ -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>
@ -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: [],
@ -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",
@ -1235,47 +1248,7 @@ 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')
}
} }
} }
} }