样式修改
This commit is contained in:
parent
65c1a8d1c8
commit
a47eab0d42
|
|
@ -15,16 +15,17 @@
|
|||
</picker>
|
||||
</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_top">
|
||||
维护内容:
|
||||
监测情况:
|
||||
</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 placeholder="请输入内容" @blur="bindTextAreaBlur"/>
|
||||
</view>
|
||||
|
|
@ -32,14 +33,22 @@
|
|||
</view>
|
||||
<view class="form_item">
|
||||
<view class="form_top">
|
||||
维护人:
|
||||
负责人:
|
||||
</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 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">
|
||||
|
|
@ -84,16 +93,17 @@
|
|||
isDel: 0,
|
||||
itemId: "",
|
||||
maintainData1: "",
|
||||
maintainData2: "",
|
||||
maintainNote: "",
|
||||
maintainPerson: "",
|
||||
maintainData2:"",
|
||||
maintainData3: "",
|
||||
maintainTime: "",
|
||||
reVision: 0,
|
||||
stationCode: "",
|
||||
stationName: "",
|
||||
tenantId: "",
|
||||
updatedBy: "",
|
||||
updatedTime: ""
|
||||
updatedTime: "",
|
||||
},
|
||||
index:'',
|
||||
date:'',
|
||||
|
|
@ -102,7 +112,8 @@
|
|||
tag:'',
|
||||
hobby: [],
|
||||
checkbox1: [],
|
||||
reload:'true'
|
||||
reload:'true',
|
||||
phoneError: '', // 添加错误提示信息
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
|
@ -120,15 +131,14 @@
|
|||
for(var i=0;i<res.data.data.length;i++){
|
||||
this.arrays.push({
|
||||
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)
|
||||
console.log(this.array)
|
||||
}
|
||||
})
|
||||
},
|
||||
bindTextAreaBlur(e) {
|
||||
console.log("00",e.detail.value)
|
||||
this.details.maintainData1 = e.detail.value
|
||||
},
|
||||
// 维护内容
|
||||
|
|
@ -140,12 +150,10 @@
|
|||
text:res.data.data[i].maintainData1,
|
||||
value:res.data.data[i].id
|
||||
})
|
||||
console.log(this.hobby)
|
||||
}
|
||||
})
|
||||
},
|
||||
bindPickerChange: function(e) {
|
||||
console.log('picker发送选择改变,携带值为', e.detail.value)
|
||||
this.index = e.detail.value
|
||||
this.details.stationName = this.array[this.index]
|
||||
for(var i=0;i<this.arrays.length;i++){
|
||||
|
|
@ -153,10 +161,30 @@
|
|||
this.details.stationCode = this.arrays[i].value
|
||||
}
|
||||
}
|
||||
this.details.maintainData3 = this.arrays[this.index].add
|
||||
},
|
||||
bindDateChange: function(e) {
|
||||
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(){
|
||||
if(!this.details.stationName){
|
||||
|
|
@ -169,7 +197,7 @@
|
|||
}
|
||||
if(!this.details.maintainData1){
|
||||
uni.showToast({
|
||||
title: "请填写维护内容",
|
||||
title: "请填写监测情况",
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
|
|
@ -177,12 +205,29 @@
|
|||
}
|
||||
if(!this.details.maintainPerson){
|
||||
uni.showToast({
|
||||
title: "请输入运维人姓名",
|
||||
title: "请输入负责人姓名",
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
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: "请选择维护时间",
|
||||
|
|
@ -315,4 +360,14 @@
|
|||
text-align: center;
|
||||
color: #0472e3;
|
||||
}
|
||||
.error-text {
|
||||
color: #ff0000;
|
||||
font-size: 24rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
// 如果有错误,给输入框添加红色边框
|
||||
.form_item input:focus {
|
||||
border: 1rpx solid #ff0000;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -15,9 +15,15 @@
|
|||
</picker>
|
||||
</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_top">
|
||||
维护内容:
|
||||
检测情况:
|
||||
</view>
|
||||
<view class="form_bot">
|
||||
<uni-section type="line">
|
||||
|
|
@ -29,13 +35,8 @@
|
|||
</view>
|
||||
<view class="form_item">
|
||||
<view class="form_top">
|
||||
维护人:
|
||||
负责人:
|
||||
</view>
|
||||
<!-- <view class="form_bot" @click="tolist()">
|
||||
<view class="checkpeople">
|
||||
+ 选择维护人
|
||||
</view>
|
||||
</view> -->
|
||||
<input type="text" placeholder="请输入运维人姓名" v-model="details.maintainPerson">
|
||||
</view>
|
||||
<view class="form_item">
|
||||
|
|
@ -82,6 +83,7 @@
|
|||
itemId: "",
|
||||
maintainData1: "",
|
||||
maintainData2: "",
|
||||
maintainData3:"",
|
||||
maintainNote: "",
|
||||
maintainPerson: "",
|
||||
maintainTime: "",
|
||||
|
|
@ -91,7 +93,7 @@
|
|||
stationName: "",
|
||||
tenantId: "",
|
||||
updatedBy: "",
|
||||
updatedTime: ""
|
||||
updatedTime: "",
|
||||
},
|
||||
index:'',
|
||||
date:'',
|
||||
|
|
@ -119,10 +121,10 @@
|
|||
for(var i=0;i<res.data.data.length;i++){
|
||||
this.arrays.push({
|
||||
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)
|
||||
console.log(this.array)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
@ -135,12 +137,10 @@
|
|||
text:res.data.data[i].omName,
|
||||
value:res.data.data[i].id
|
||||
})
|
||||
console.log(this.hobby)
|
||||
}
|
||||
})
|
||||
},
|
||||
bindPickerChange: function(e) {
|
||||
console.log('picker发送选择改变,携带值为', e.detail.value)
|
||||
this.index = e.detail.value
|
||||
this.details.stationName = this.array[this.index]
|
||||
for(var i=0;i<this.arrays.length;i++){
|
||||
|
|
@ -148,12 +148,12 @@
|
|||
this.details.stationCode = this.arrays[i].value
|
||||
}
|
||||
}
|
||||
this.details.maintainData3 = this.arrays[this.index].add
|
||||
},
|
||||
bindDateChange: function(e) {
|
||||
this.details.maintainTime = e.detail.value
|
||||
},
|
||||
change1(e){
|
||||
console.log(e)
|
||||
this.details.itemId = e.detail.value
|
||||
},
|
||||
// 提交
|
||||
|
|
|
|||
|
|
@ -36,15 +36,23 @@
|
|||
<image src="../../static/dian.png" mode=""></image>
|
||||
</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="bot_item">
|
||||
<span class="nrbt">维护内容:</span>
|
||||
<span class="nrbt">监测情况:</span>
|
||||
{{item.maintainData1}}
|
||||
</view>
|
||||
<view class="bot_item">
|
||||
<span class="nrbt">维护人员:</span>
|
||||
<span class="nrbt">负责人员:</span>
|
||||
<span class="number">{{item.maintainPerson}}</span>
|
||||
</view>
|
||||
<view class="bot_item" v-if="item.maintainData2">
|
||||
<span class="nrbt">联系方式:</span>
|
||||
<span class="number">{{item.maintainData2}}</span>
|
||||
</view>
|
||||
<view class="bot_item">
|
||||
<span class="nrbt">维护时间:</span>
|
||||
{{item.maintainTime}}
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@
|
|||
dictLabel:'监测站告警'
|
||||
},
|
||||
{
|
||||
dictLabel:'杀虫灯告警'
|
||||
dictLabel:'异常趋势图'
|
||||
}
|
||||
],
|
||||
isActive:0,
|
||||
|
|
|
|||
10
pages.json
10
pages.json
|
|
@ -109,7 +109,7 @@
|
|||
{
|
||||
"path": "pages/Site/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "监测站点",
|
||||
"navigationBarTitleText": "站点管理",
|
||||
"navigationStyle": "default",
|
||||
"navigationBarBackgroundColor":"#0F6EFF"
|
||||
}
|
||||
|
|
@ -117,7 +117,7 @@
|
|||
{
|
||||
"path": "pages/Site/detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "监测站点",
|
||||
"navigationBarTitleText": "站点管理",
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarBackgroundColor":"#0F6EFF"
|
||||
}
|
||||
|
|
@ -125,7 +125,7 @@
|
|||
{
|
||||
"path": "pages/Site/sjdetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "监测站点",
|
||||
"navigationBarTitleText": "站点管理",
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarBackgroundColor":"#0F6EFF"
|
||||
}
|
||||
|
|
@ -188,7 +188,7 @@
|
|||
{
|
||||
"path": "pages/analysis/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "数据分析",
|
||||
"navigationBarTitleText": "统计分析",
|
||||
"navigationStyle": "default",
|
||||
"navigationBarBackgroundColor":"#0F6EFF"
|
||||
}
|
||||
|
|
@ -204,7 +204,7 @@
|
|||
{
|
||||
"path": "pages/sjdyj/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "设备告警",
|
||||
"navigationBarTitleText": "预警信息",
|
||||
"navigationStyle": "default",
|
||||
"navigationBarBackgroundColor":"#0F6EFF"
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue