样式修改
This commit is contained in:
parent
65c1a8d1c8
commit
a47eab0d42
|
|
@ -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 class="form_item">
|
||||||
</view>
|
<view class="form_top">
|
||||||
</view> -->
|
联系方式:
|
||||||
<input type="text" placeholder="请输入运维人姓名" v-model="details.maintainPerson">
|
</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>
|
||||||
|
|
@ -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
|
||||||
},
|
},
|
||||||
// 提交
|
// 提交
|
||||||
|
|
|
||||||
|
|
@ -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}}
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@
|
||||||
dictLabel:'监测站告警'
|
dictLabel:'监测站告警'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dictLabel:'杀虫灯告警'
|
dictLabel:'异常趋势图'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
isActive:0,
|
isActive:0,
|
||||||
|
|
|
||||||
10
pages.json
10
pages.json
|
|
@ -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"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue