|
@ -1,14 +1,53 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<view class="" v-for="(item, index) in formData" :key="index"> |
|
|
<view class="" v-for="(item, index) in formData" :key="index"> |
|
|
<view class="" v-if="item.type=='inputAndSelect'"> |
|
|
<view class="" v-if="item.type=='stateSelect'"> |
|
|
<view class="flex uni-row " style=" padding-left: 10rpx; border-bottom: #9e9e9e;"> |
|
|
<view class="flex uni-row " style=" padding-left: 10rpx; border-bottom: #9e9e9e;"> |
|
|
<view class=" " style="margin-top: 3rpx;"> |
|
|
<view class=" " style="margin-top: 3rpx;"> |
|
|
<text class="colorRed">*</text> |
|
|
<text class="colorRed">*</text> |
|
|
<text class="num" style="font-size: 32rpx;">{{ index + 1 }}.</text> |
|
|
<text class="num" style="font-size: 32rpx;">{{ index + 1 }}.</text> |
|
|
</view> |
|
|
</view> |
|
|
<view class="uni-flex uni-column"> |
|
|
<view class="uni-flex uni-column"> |
|
|
|
|
|
|
|
|
|
|
|
<view class="position"> |
|
|
|
|
|
点检部位 : {{ item.position }} |
|
|
|
|
|
</view> |
|
|
<view class="content"> |
|
|
<view class="content"> |
|
|
|
|
|
点检内容 : {{ item.content }} |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="methond" style="margin-bottom: 10rpx;"> |
|
|
|
|
|
点检方法 : {{item.methond}} |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class=""> |
|
|
|
|
|
<view class="" style="margin-left: 50rpx;"> |
|
|
|
|
|
<text style="font-size: 32rpx; font-weight:550">点检状态</text> |
|
|
|
|
|
<text style="font-size: 30rpx; color: #9e9e9e;">(单选)</text> |
|
|
|
|
|
<u-radio-group v-model="item.name" @change="radioGroupChange"> |
|
|
|
|
|
<view class="uni-flex" style="width: 50%; margin-left: 0rpx;" |
|
|
|
|
|
v-for="(radio, index) in dataList" :key="index" @change="radioChange"> |
|
|
|
|
|
<view class="uni-flex " style="margin-top: 10rpx; justify-content: flex-start;"> |
|
|
|
|
|
<u-radio :name="radio.name"> |
|
|
|
|
|
{{radio.name}} |
|
|
|
|
|
</u-radio> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</u-radio-group> |
|
|
|
|
|
</view> |
|
|
|
|
|
<input class="input" :disabled="false" style="margin-left: 50rpx;" |
|
|
|
|
|
:placeholder="item.placeholder" v-model="item.name" /> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="" v-else-if="item.type=='inputAndSelect'"> |
|
|
|
|
|
<view class="flex uni-row " style=" padding-left: 10rpx; border-bottom: #9e9e9e;"> |
|
|
|
|
|
<view class=" " style="margin-top: 3rpx;"> |
|
|
|
|
|
<text class="colorRed">*</text> |
|
|
|
|
|
<text class="num" style="font-size: 32rpx;">{{ index + 1 }}.</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="uni-flex uni-column"> |
|
|
|
|
|
<view class="position"> |
|
|
点检部位 : {{ item.position }} |
|
|
点检部位 : {{ item.position }} |
|
|
</view> |
|
|
</view> |
|
|
<view class="content"> |
|
|
<view class="content"> |
|
@ -19,38 +58,72 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="flex uni-row uni-center align-center"> |
|
|
|
|
|
<input class="input" style="margin-left: 50rpx;" :placeholder="item.placeholder" |
|
|
<view class=""> |
|
|
v-model="item.name" /> |
|
|
<view class="" style="margin-left: 50rpx;"> |
|
|
<view class=""> |
|
|
<text style="font-size: 32rpx; font-weight:550">点检状态</text> |
|
|
<!-- <image src="../../static/icons/arrow_down.svg" style="width: 50rpx; height: 50rpx;"></image> --> |
|
|
<text style="font-size: 30rpx; color: #9e9e9e;">(单选)</text> |
|
|
<button type="primary" size="mini" @click="select(item)">选择</button> |
|
|
<u-radio-group v-model="item.name" @change="radioGroupChange"> |
|
|
|
|
|
<view class="uni-flex" style="width: 50%; margin-left: 0rpx;" |
|
|
|
|
|
v-for="(radio, index) in dataList" :key="index" @change="radioChange"> |
|
|
|
|
|
<view class="uni-flex " style="margin-top: 10rpx; justify-content: flex-start;"> |
|
|
|
|
|
<u-radio :name="radio.name"> |
|
|
|
|
|
{{radio.name}} |
|
|
|
|
|
</u-radio> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</u-radio-group> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<input class="input" :disabled="false" style="margin-left: 50rpx;" |
|
|
|
|
|
:placeholder="item.placeholder" v-model="item.name" /> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="" v-if="item.main"> |
|
|
|
|
|
<view class="" style="margin-left: 50rpx;"> |
|
|
|
|
|
<text style="font-size: 32rpx; margin: 10rpx;">{{item.minor.hint}}</text> |
|
|
|
|
|
<input class="input" @input="inputMinor(item)" type="number" |
|
|
|
|
|
:placeholder="item.minor.placeholder" v-model="item.minor.name" /> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="" style="margin-left: 50rpx;"> |
|
|
|
|
|
<text style="font-size: 32rpx; margin: 10rpx;">{{item.main.hint}}</text> |
|
|
|
|
|
<input class="input" @input="inputMain(item)" type="number" :placeholder="item.main.placeholder" |
|
|
|
|
|
v-model="item.main.name" /> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="" v-else-if="item.type=='select'"> |
|
|
<view class="" v-else-if="item.type=='groupSelect'"> |
|
|
<view class="flex uni-row" style="padding-left: 10rpx; border-bottom: #9e9e9e;"> |
|
|
<view class="flex uni-row" style="padding-left: 10rpx; border-bottom: #9e9e9e;"> |
|
|
<view class="" style="margin-top: 3rpx;"> |
|
|
<view class="" style="margin-top: 3rpx;"> |
|
|
<text class="colorRed">*</text> |
|
|
<text class="colorRed">*</text> |
|
|
<text class="num" style="font-size: 32rpx;">{{ index + 1 }}.</text> |
|
|
<text class="num" style="font-size: 32rpx;">{{ index + 1 }}.</text> |
|
|
</view> |
|
|
</view> |
|
|
<view class="" style="display: flex;flex-direction: column;"> |
|
|
<view class="" style="display: flex;flex-direction: column;"> |
|
|
<view class="content"> |
|
|
<view class="position"> |
|
|
{{ item.content }} |
|
|
{{ item.content }} |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="flex uni-row uni-center align-center"> |
|
|
|
|
|
<input class="input" style="margin-left: 50rpx;" disabled :placeholder="item.placeholder" |
|
|
<view class=""> |
|
|
v-model="item.name" /> |
|
|
<view class="" style="margin-left: 50rpx;"> |
|
|
<view class=""> |
|
|
<view style="font-size: 30rpx; color: #9e9e9e;">(单选)</view> |
|
|
<!-- <image src="../../static/icons/arrow_down.svg" style="width: 50rpx; height: 50rpx;"></image> --> |
|
|
<u-radio-group v-model="item.name" @change="radioGroupChange"> |
|
|
<button type="primary" size="mini" @click="selectClass(item)">选择</button> |
|
|
<view class="uni-flex" style="width: 50%; margin-left: 0rpx;" |
|
|
|
|
|
v-for="(radio, index) in dataClassList" :key="index" @change="radioChange"> |
|
|
|
|
|
<view class="uni-flex " style="margin-top: 10rpx; justify-content: flex-start;"> |
|
|
|
|
|
<u-radio :name="radio.name"> |
|
|
|
|
|
{{radio.name}} |
|
|
|
|
|
</u-radio> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</u-radio-group> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<input class="input" :disabled="false" style="margin-left: 50rpx;" |
|
|
|
|
|
:placeholder="item.placeholder" v-model="item.name" /> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
<view class="" v-else-if="item.type=='inputRange'"> |
|
|
<view class="" v-else-if="item.type=='inputRange'"> |
|
|
<view class="flex uni-row " style="padding-left: 10rpx; border-bottom: #9e9e9e;"> |
|
|
<view class="flex uni-row " style="padding-left: 10rpx; border-bottom: #9e9e9e;"> |
|
@ -59,7 +132,7 @@ |
|
|
<text class="num" style="font-size: 32rpx;">{{ index + 1 }}.</text> |
|
|
<text class="num" style="font-size: 32rpx;">{{ index + 1 }}.</text> |
|
|
</view> |
|
|
</view> |
|
|
<view class="uni-flex uni-column"> |
|
|
<view class="uni-flex uni-column"> |
|
|
<view class="content"> |
|
|
<view class="position"> |
|
|
点检部位 : {{ item.position }} |
|
|
点检部位 : {{ item.position }} |
|
|
</view> |
|
|
</view> |
|
|
<view class="content"> |
|
|
<view class="content"> |
|
@ -75,31 +148,28 @@ |
|
|
<view class="" style="margin-left: 50rpx;"> |
|
|
<view class="" style="margin-left: 50rpx;"> |
|
|
<text style="font-size: 32rpx; margin: 10rpx;">{{item.inputLow.placeholder}}</text> |
|
|
<text style="font-size: 32rpx; margin: 10rpx;">{{item.inputLow.placeholder}}</text> |
|
|
<input class="input" type="number" :placeholder="item.inputLow.placeholder" |
|
|
<input class="input" type="number" :placeholder="item.inputLow.placeholder" |
|
|
v-model="item.inputLow.name" /> |
|
|
v-model="item.inputLow.name" /> |
|
|
</view> |
|
|
</view> |
|
|
<view class="" style="margin-left: 50rpx;"> |
|
|
<view class="" style="margin-left: 50rpx;"> |
|
|
<text style="font-size: 32rpx; margin: 10rpx;">{{item.inputHigh.placeholder}}</text> |
|
|
<text style="font-size: 32rpx; margin: 10rpx;">{{item.inputHigh.placeholder}}</text> |
|
|
<input class="input" type="number" :placeholder="item.inputHigh.placeholder" |
|
|
<input class="input" type="number" :placeholder="item.inputHigh.placeholder" |
|
|
v-model="item.inputHigh.name" /> |
|
|
v-model="item.inputHigh.name" /> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
<selectPopup :dataList="dataList2" ref="selectPopup2" title="选择班次" @select="getSelect2"></selectPopup> |
|
|
<showModal ref="comMessage"></showModal> |
|
|
|
|
|
|
|
|
<selectPopup :dataList="dataList" ref="selectPopup" title="选择点检状态" @select="getSelect"></selectPopup> |
|
|
|
|
|
<u-top-tips ref="uTips"></u-top-tips> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import selectPopup from "./selectPopup.vue" |
|
|
import showModal from '../../mycomponents/common/showModal.vue' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
components: { |
|
|
components: { |
|
|
selectPopup |
|
|
showModal |
|
|
}, |
|
|
}, |
|
|
props: { |
|
|
props: { |
|
|
formData: { |
|
|
formData: { |
|
@ -112,6 +182,7 @@ |
|
|
deviceCode: "", |
|
|
deviceCode: "", |
|
|
deviceName: "", |
|
|
deviceName: "", |
|
|
class: "", |
|
|
class: "", |
|
|
|
|
|
value: '', |
|
|
dataList: [{ |
|
|
dataList: [{ |
|
|
value: 1, |
|
|
value: 1, |
|
|
name: "状态良好", |
|
|
name: "状态良好", |
|
@ -129,7 +200,7 @@ |
|
|
name: "停机状态", |
|
|
name: "停机状态", |
|
|
} |
|
|
} |
|
|
], |
|
|
], |
|
|
dataList2: [{ |
|
|
dataClassList: [{ |
|
|
value: 1, |
|
|
value: 1, |
|
|
name: "白班", |
|
|
name: "白班", |
|
|
}, |
|
|
}, |
|
@ -158,61 +229,128 @@ |
|
|
// value:"", |
|
|
// value:"", |
|
|
// }], |
|
|
// }], |
|
|
selectStateItem: {}, |
|
|
selectStateItem: {}, |
|
|
selectClassItem: {} |
|
|
selectClassItem: {}, |
|
|
|
|
|
current: 0, |
|
|
|
|
|
|
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
select(item) { |
|
|
radioChange(e) { |
|
|
this.selectStateItem = item |
|
|
console.log(e) |
|
|
this.$refs.selectPopup.showPopup() |
|
|
// for (let i = 0; i < this.dataList.length; i++) { |
|
|
|
|
|
// if (this.dataList[i].value === evt.detail.value) { |
|
|
|
|
|
// this.current = i; |
|
|
|
|
|
// break; |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
}, |
|
|
}, |
|
|
selectClass(item) { |
|
|
radioGroupChange(e) { |
|
|
this.selectClassItem = item |
|
|
console.log(e) |
|
|
this.$refs.selectPopup2.showPopup() |
|
|
|
|
|
}, |
|
|
}, |
|
|
getSelect2(item) { |
|
|
inputMain(item) { |
|
|
this.selectClassItem.name = item.name |
|
|
item.name = item.minor.name + "~" + item.main.name; |
|
|
this.selectClassItem.value = item.value |
|
|
if (item.minor.name == "" && item.main.name == "") { |
|
|
console.log(item) |
|
|
item.name = "" |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
getSelect(item) { |
|
|
inputMinor(item) { |
|
|
this.selectStateItem.name = item.name |
|
|
item.name = item.minor.name + "~" + item.main.name; |
|
|
this.selectStateItem.value = item.value |
|
|
if (item.minor.name == "" && item.main.name == "") { |
|
|
console.log(item) |
|
|
item.name = "" |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
submit(callBack) { |
|
|
submit(callBack) { |
|
|
var isCheckPass = true |
|
|
var isCheckPass = true |
|
|
for (var i = 0; i < this.formData.length; i++) { |
|
|
for (var i = 0; i < this.formData.length; i++) { |
|
|
var item = this.formData[i]; |
|
|
var item = this.formData[i]; |
|
|
|
|
|
var hintIndex = i + 1 |
|
|
if (item.type == "inputRange") { |
|
|
if (item.type == "inputRange") { |
|
|
if(item.inputLow.name == ""){ |
|
|
if (item.inputLow.name == "") { |
|
|
this.showHint("点检内容 : " + item.content, item.inputLow.placeholder) |
|
|
this.showHint(hintIndex + ".点检内容 : " + item.content, item.inputLow.placeholder) |
|
|
|
|
|
isCheckPass = false; |
|
|
break |
|
|
break |
|
|
}else { |
|
|
} else { |
|
|
if(!this.isWithinInterval(item.inputLow.name,item.inputLow.lower,item.inputLow.upper)){ |
|
|
if (!this.isWithinInterval(item.inputLow.name, item.inputLow.lower, item.inputLow.upper)) { |
|
|
this.showHint("点检内容 : " + item.content, "最低压 : 输入数量【"+item.inputLow.name+"】不在【"+item.inputLow.lower+"】和【"+item.inputLow.upper+"】之间") |
|
|
this.showHint(hintIndex + ".点检内容 : " + item.content, "最低压 : 输入数量【" + item.inputLow.name + |
|
|
|
|
|
"】不在【" + item.inputLow.lower + "】和【" + item.inputLow.upper + "】之间") |
|
|
|
|
|
isCheckPass = false; |
|
|
break |
|
|
break |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if(item.inputHigh.name == ""){ |
|
|
if (item.inputHigh.name == "") { |
|
|
this.showHint("点检内容 : " + item.content, item.inputHigh.placeholder) |
|
|
this.showHint(hintIndex + ".点检内容 : " + item.content, item.inputHigh.placeholder) |
|
|
|
|
|
isCheckPass = false; |
|
|
break |
|
|
break |
|
|
}else { |
|
|
} else { |
|
|
if(!this.isWithinInterval(item.inputHigh.name,item.inputHigh.lower,item.inputHigh.upper)){ |
|
|
if (!this.isWithinInterval(item.inputHigh.name, item.inputHigh.lower, item.inputHigh.upper)) { |
|
|
this.showHint("点检内容 : " + item.content, "最高压 : 输入数量【"+item.inputHigh.name+"】不在【"+item.inputHigh.lower+"】和【"+item.inputHigh.upper+"】之间") |
|
|
this.showHint(hintIndex + ".点检内容 : " + item.content, "最高压 : 输入数量【" + item.inputHigh.name + |
|
|
|
|
|
"】不在【" + item.inputHigh.lower + "】和【" + item.inputHigh.upper + "】之间") |
|
|
|
|
|
isCheckPass = false; |
|
|
break |
|
|
break |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} else { |
|
|
} else if (item.type == "stateSelect") { |
|
|
|
|
|
if (item.name == "") { |
|
|
|
|
|
this.showHint(hintIndex + ".点检内容 : " + item.content, item.placeholder) |
|
|
|
|
|
isCheckPass = false; |
|
|
|
|
|
break |
|
|
|
|
|
} |
|
|
|
|
|
} else if (item.type == "inputAndSelect") { |
|
|
|
|
|
if (item.name == "") { |
|
|
|
|
|
this.showHint(hintIndex + ".点检内容 : " + item.content, item.placeholder) |
|
|
|
|
|
isCheckPass = false; |
|
|
|
|
|
break |
|
|
|
|
|
} else { |
|
|
|
|
|
if (!this.isExitList(item.name)) { |
|
|
|
|
|
if (item.main) { |
|
|
|
|
|
if (item.main.name == "") { |
|
|
|
|
|
this.showHint(hintIndex + ".点检内容 : " + item.content, item.main.placeholder) |
|
|
|
|
|
isCheckPass = false; |
|
|
|
|
|
break |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (item.minor.name == "") { |
|
|
|
|
|
this.showHint(hintIndex + ".点检内容 : " + item.content, item.minor.placeholder) |
|
|
|
|
|
isCheckPass = false; |
|
|
|
|
|
break |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!this.isWithinInterval(item.minor.name, item.minor.lower, item.minor.upper)) { |
|
|
|
|
|
this.showHint(hintIndex + ".点检内容 : " + item.content, "输入数量【" + item.minor |
|
|
|
|
|
.name + "】不在【" + item.minor.lower + "】和【" + item.minor.upper + "】之间") |
|
|
|
|
|
isCheckPass = false; |
|
|
|
|
|
break |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!this.isWithinInterval(item.main.name, item.main.lower, item.main.upper)) { |
|
|
|
|
|
this.showHint(hintIndex + ".点检内容 : " + item.content, "输入数量【" + item.main.name + |
|
|
|
|
|
"】不在【" + item.main.lower + "】和【" + item.main.upper + "】之间") |
|
|
|
|
|
isCheckPass = false; |
|
|
|
|
|
break |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
if (!this.isWithinInterval(item.name, item.lower, item.upper)) { |
|
|
|
|
|
this.showHint(hintIndex + ".点检内容 : " + item.content, "输入数量【" + item.name + |
|
|
|
|
|
"】不在【" + item.lower + "】和【" + item.upper + "】之间") |
|
|
|
|
|
isCheckPass = false; |
|
|
|
|
|
break |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
} else if (item.type == "groupSelect") { |
|
|
if (item.name == "") { |
|
|
if (item.name == "") { |
|
|
this.showHint("点检内容 : " + item.content, item.placeholder) |
|
|
this.showHint(hintIndex + ".点检内容 : " + item.content, item.placeholder) |
|
|
|
|
|
isCheckPass = false; |
|
|
break |
|
|
break |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -221,27 +359,53 @@ |
|
|
if (isCheckPass) { |
|
|
if (isCheckPass) { |
|
|
callBack(this.formData) |
|
|
callBack(this.formData) |
|
|
// this.$emit("submit",this.formData) |
|
|
// this.$emit("submit",this.formData) |
|
|
console.log(this.formData) |
|
|
console.log("通过", this.formData) |
|
|
} else { |
|
|
} else { |
|
|
console.log(this.formData) |
|
|
console.log("失败") |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
isWithinInterval(num, lower, upper){ |
|
|
isWithinInterval(num, lower, upper) { |
|
|
|
|
|
if (!this.isNumber(num)) { |
|
|
|
|
|
return true; |
|
|
|
|
|
} |
|
|
return num >= lower && num <= upper; |
|
|
return num >= lower && num <= upper; |
|
|
}, |
|
|
}, |
|
|
|
|
|
isExitList(name) { |
|
|
|
|
|
var isExit = this.dataList.filter(res => res.name == name) |
|
|
|
|
|
if(isExit.length==0){ |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
return true; |
|
|
|
|
|
}, |
|
|
showHint(title, hint) { |
|
|
showHint(title, hint) { |
|
|
uni.showModal({ |
|
|
// uni.showModal({ |
|
|
title: title, |
|
|
// title: title, |
|
|
content: hint |
|
|
// content: hint |
|
|
}) |
|
|
// }) |
|
|
|
|
|
this.$refs.comMessage.showMessage(title, hint) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
isNumber(val) { |
|
|
|
|
|
return !isNaN(parseFloat(val)) && isFinite(val); |
|
|
}, |
|
|
}, |
|
|
reset() { |
|
|
reset() { |
|
|
for (var i = 0; i < this.formData.length; i++) { |
|
|
for (var i = 0; i < this.formData.length; i++) { |
|
|
var item = this.formData[i]; |
|
|
var item = this.formData[i]; |
|
|
if(item.type=="inputRange"){ |
|
|
if (item.type == "inputRange") { |
|
|
item.inputLow.name=""; |
|
|
item.inputLow.name = ""; |
|
|
item.inputHigh.name="" |
|
|
item.inputHigh.name = "" |
|
|
}else { |
|
|
} else if (item.type == "inputAndSelect") { |
|
|
|
|
|
if (item.main) { |
|
|
|
|
|
item.main.name = "" |
|
|
|
|
|
item.main.value = "" |
|
|
|
|
|
} |
|
|
|
|
|
if (item.minor) { |
|
|
|
|
|
item.minor.name = "" |
|
|
|
|
|
item.minor.value = "" |
|
|
|
|
|
} |
|
|
|
|
|
item.name = "" |
|
|
|
|
|
item.value = "" |
|
|
|
|
|
} else { |
|
|
item.name = "" |
|
|
item.name = "" |
|
|
item.value = "" |
|
|
item.value = "" |
|
|
} |
|
|
} |
|
@ -262,8 +426,13 @@ |
|
|
font-size: 30rpx; |
|
|
font-size: 30rpx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.position { |
|
|
|
|
|
font-size: 32rpx; |
|
|
|
|
|
font-weight: bold; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.content { |
|
|
.content { |
|
|
font-size: 33rpx; |
|
|
font-size: 32rpx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.methond { |
|
|
.methond { |
|
|