|
|
@ -69,7 +69,7 @@ |
|
|
|
<text style="font-size: 32rpx; font-weight:550">点检状态</text> |
|
|
|
<text style="font-size: 30rpx; color: #9e9e9e;">(单选)</text> |
|
|
|
</view> |
|
|
|
<u-radio-group v-if="isRefresh" v-model="item.SelectName" @change="radioGroupChange(item)"> |
|
|
|
<u-radio-group v-if="isRefresh&&isRefreshType2" v-model="item.SelectName" @change="radioGroupChange(item)"> |
|
|
|
<view class="uni-flex" style="width: 50%; margin-left: 0rpx;" |
|
|
|
v-for="(radio, index) in dataInputList" :key="index"> |
|
|
|
<view class="uni-flex " style="margin-top: 10rpx; justify-content: flex-start;"> |
|
|
@ -81,7 +81,7 @@ |
|
|
|
</u-radio-group> |
|
|
|
</view> |
|
|
|
<input class="input" v-if="item.putMachine.length==1" style="margin-left: 50rpx;" |
|
|
|
:placeholder="item.putMachine[0].Name" v-model="item.SelectName" /> |
|
|
|
type="digit" placeholder="" v-model="item.SelectName" @input="inputType2" /> |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
@ -109,7 +109,7 @@ |
|
|
|
|
|
|
|
</view> |
|
|
|
<view class=""> |
|
|
|
<view class="" style="margin-left: 50rpx;"> |
|
|
|
<view class="" style="margin-left: 50rpx;" v-if="item.Methond!='压力表示数范围2.5bar~4.5bar'"> |
|
|
|
<view class=""> |
|
|
|
<text style="font-size: 32rpx; font-weight:550">点检状态</text> |
|
|
|
<text style="font-size: 30rpx; color: #9e9e9e;">(单选)</text> |
|
|
@ -130,20 +130,23 @@ |
|
|
|
<!-- <input class="input" style="margin-left: 50rpx;" :placeholder="item.placeholder" |
|
|
|
v-model="item.SelectName" /> --> |
|
|
|
<view class="" style="margin-left: 50rpx;"> |
|
|
|
<text style="font-size: 32rpx; margin: 10rpx;">{{item.putMachine[0].Name}}</text> |
|
|
|
<text style="font-size: 32rpx; margin: 10rpx;">{{item.putMachine[0].Name}}({{item.putMachine[0].Limit}}~{{item.putMachine[0].Floor}})</text> |
|
|
|
<input class="input" @input="inputMain(item)" type="number" |
|
|
|
:placeholder="item.putMachine[0].Name" v-model="item.putMachine[0].SelectName" /> |
|
|
|
placeholder="" v-model="item.putMachine[0].SelectName" /> |
|
|
|
</view> |
|
|
|
<view class="" style="margin-left: 50rpx;"> |
|
|
|
<text style="font-size: 32rpx; margin: 10rpx;">{{item.putMachine[1].Name}}</text> |
|
|
|
<text style="font-size: 32rpx; margin: 10rpx;">{{item.putMachine[1].Name}}({{item.putMachine[1].Limit}}~{{item.putMachine[1].Floor}})</text> |
|
|
|
<input class="input" @input="inputMinor(item)" type="number" |
|
|
|
:placeholder="item.putMachine[1].Name" v-model="item.putMachine[1].SelectName" /> |
|
|
|
placeholder="" v-model="item.putMachine[1].SelectName" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="" |
|
|
|
style="width: 100%;background-color: gray;height: 2rpx; margin-top: 15rpx;margin-bottom: 15rpx;" /> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="" v-else-if="item.Type=='5'"> |
|
|
|
<view class="" v-else-if="item.Type=='4'"> |
|
|
|
|
|
|
|
<view class="flex uni-row" style="padding-left: 10rpx; border-bottom: #9e9e9e;"> |
|
|
|
<view class="" style="margin-top: 3rpx;"> |
|
|
|
<text class="colorRed">*</text> |
|
|
@ -240,6 +243,7 @@ |
|
|
|
current: 0, |
|
|
|
isRefresh: true, |
|
|
|
isRefreshType3: true, |
|
|
|
isRefreshType2: true, |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
@ -274,6 +278,13 @@ |
|
|
|
this.reload3() |
|
|
|
}, |
|
|
|
|
|
|
|
inputType2(item){ |
|
|
|
// if(item.length==0){ |
|
|
|
|
|
|
|
// } |
|
|
|
this.reload2() |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
submit(callBack) { |
|
|
|
try { |
|
|
@ -307,10 +318,11 @@ |
|
|
|
var hint = hintIndex + ".点检内容 : " + item.Content; |
|
|
|
throw new Error(hint) |
|
|
|
} else { |
|
|
|
if (!this.isWithinInterval(item.putMachine[0].SelectName, item.putMachine[0].Limit, item |
|
|
|
if (!this.isWithinInterval(item.putMachine[0].SelectName, item.putMachine[0].Limit, |
|
|
|
item |
|
|
|
.putMachine[0] |
|
|
|
.Floor)) { |
|
|
|
var hint = hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.SelectName + |
|
|
|
var hint = hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.putMachine[0].SelectName + |
|
|
|
"】不在【" + item.putMachine[0].Limit + "】和【" + item.putMachine[0].Floor + "】之间" |
|
|
|
throw new Error(hint) |
|
|
|
} |
|
|
@ -320,18 +332,21 @@ |
|
|
|
var hint = hintIndex + ".点检内容 : " + item.Content; |
|
|
|
throw new Error(hint) |
|
|
|
} else { |
|
|
|
if (!this.isWithinInterval(item.putMachine[1].SelectName, item.putMachine[1].Limit, item |
|
|
|
if (!this.isWithinInterval(item.putMachine[1].SelectName, item.putMachine[1].Limit, |
|
|
|
item |
|
|
|
.putMachine[1] |
|
|
|
.Floor)) { |
|
|
|
var hint = hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.SelectName + |
|
|
|
var hint = hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.putMachine[1].SelectName + |
|
|
|
"】不在【" + item.putMachine[1].Limit + "】和【" + item.putMachine[1].Floor + "】之间" |
|
|
|
throw new Error(hint) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}else {if (!this.isExitList(item.SelectName)) { |
|
|
|
if (!this.isWithinInterval(item.putMachine[0].SelectName, item.putMachine[0].Limit, item |
|
|
|
} else { |
|
|
|
if (!this.isExitList(item.SelectName)) { |
|
|
|
if (!this.isWithinInterval(item.putMachine[0].SelectName, item.putMachine[0].Limit, |
|
|
|
item |
|
|
|
.putMachine[0] |
|
|
|
.Floor)) { |
|
|
|
var hint = hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.SelectName + |
|
|
@ -339,16 +354,21 @@ |
|
|
|
throw new Error(hint) |
|
|
|
} |
|
|
|
|
|
|
|
if (!this.isWithinInterval(item.putMachine[1].SelectName, item.putMachine[1].Limit, item |
|
|
|
if (!this.isWithinInterval(item.putMachine[1].SelectName, item.putMachine[1].Limit, |
|
|
|
item |
|
|
|
.putMachine[1] |
|
|
|
.Floor)) { |
|
|
|
var hint = hintIndex + ".点检内容 : " + item.Content + "输入数量【" + item.SelectName + |
|
|
|
"】不在【" + item.putMachine[1].Limit + "】和【" + item.putMachine[1].Floor + "】之间" |
|
|
|
throw new Error(hint) |
|
|
|
} |
|
|
|
}} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}else if(item.Type == 4){ |
|
|
|
if (item.SelectName == "") { |
|
|
|
var hint = hintIndex + ".点检内容 : " + item.Content; |
|
|
|
throw new Error(hint) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -379,125 +399,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
submitss(callBack) { |
|
|
|
var isCheckPass = true |
|
|
|
for (var i = 0; i < this.formData.length; i++) { |
|
|
|
var item = this.formData[i]; |
|
|
|
var hintIndex = i + 1 |
|
|
|
|
|
|
|
if (item.Type == 1) { |
|
|
|
if (item.SelectName == "") { |
|
|
|
this.showHint(hintIndex + ".点检内容 : " + item.Content, item.placeholder) |
|
|
|
isCheckPass = false; |
|
|
|
break |
|
|
|
} |
|
|
|
} else if (item.Type == 2) { |
|
|
|
|
|
|
|
} else |
|
|
|
|
|
|
|
if (item.Type == 3) { |
|
|
|
if (item.SelectName == "") { |
|
|
|
this.showHint(hintIndex + ".点检内容 : " + item.Content, item.inputLow.placeholder) |
|
|
|
isCheckPass = false; |
|
|
|
break |
|
|
|
} else { |
|
|
|
if (!this.isWithinInterval(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 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (item.inputHigh.name == "") { |
|
|
|
this.showHint(hintIndex + ".点检内容 : " + item.Content, item.inputHigh.placeholder) |
|
|
|
isCheckPass = false; |
|
|
|
break |
|
|
|
} else { |
|
|
|
if (!this.isWithinInterval(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 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} else if (item.Type == 2) { |
|
|
|
if (item.SelectName == "") { |
|
|
|
this.showHint(hintIndex + ".点检内容 : " + item.Content, item.placeholder) |
|
|
|
isCheckPass = false; |
|
|
|
break |
|
|
|
} else { |
|
|
|
if (!this.isExitList(item.SelectName)) { |
|
|
|
if (item.putMachine.length > 0) { |
|
|
|
for (var i = 0; i < item.putMachine.length; i++) { |
|
|
|
var temp = item.putMachine[i] |
|
|
|
if (item.SelectName == "") { |
|
|
|
this.showHint(hintIndex + ".点检内容 : " + item.Content, temp.Name) |
|
|
|
isCheckPass = false; |
|
|
|
break |
|
|
|
} |
|
|
|
|
|
|
|
if (!this.isWithinInterval(item.SelectName, temp.Limit, temp.Floor)) { |
|
|
|
this.showHint(hintIndex + ".点检内容 : " + item.Content, "输入数量【" + item |
|
|
|
.SelectName + |
|
|
|
"】不在【" + temp.Limit + "】和【" + temp.Floor + "】之间") |
|
|
|
isCheckPass = false; |
|
|
|
break |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
if (!this.isWithinInterval(item.SelectName, item.Limit, item.Floor)) { |
|
|
|
this.showHint(hintIndex + ".点检内容 : " + item.Content, "输入数量【" + item |
|
|
|
.SelectName + |
|
|
|
"】不在【" + item.Limit + "】和【" + item.Floor + "】之间") |
|
|
|
isCheckPass = false; |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} else if (item.type == "groupSelect") { |
|
|
|
if (item.SelectName == "") { |
|
|
|
this.showHint(hintIndex + ".点检内容 : " + item.Content, item.placeholder) |
|
|
|
isCheckPass = false; |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (isCheckPass) { |
|
|
|
this.formData.forEach(res => { |
|
|
|
if (res.SelectName.includes("班")) { |
|
|
|
var value = this.dataClassList.filter(item => item.name == res.SelectName) |
|
|
|
if (value.length > 0) { |
|
|
|
res.SelectValue = value[0].value |
|
|
|
} else { |
|
|
|
res.SelectValue = "" |
|
|
|
} |
|
|
|
} else { |
|
|
|
var value = this.dataList.filter(item => item.name == res.SelectName) |
|
|
|
if (value.length > 0) { |
|
|
|
res.SelectValue = value[0].value |
|
|
|
} else { |
|
|
|
res.SelectValue = "" |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
callBack(this.formData) |
|
|
|
|
|
|
|
// this.$emit("submit",this.formData) |
|
|
|
console.log("通过", this.formData) |
|
|
|
} else { |
|
|
|
console.log("失败") |
|
|
|
} |
|
|
|
}, |
|
|
|
isWithinInterval(num, lower, upper) { |
|
|
|
var num = Number(num); |
|
|
|
var lower = Number(lower); |
|
|
@ -528,23 +430,20 @@ |
|
|
|
reset() { |
|
|
|
for (var i = 0; i < this.formData.length; i++) { |
|
|
|
var item = this.formData[i]; |
|
|
|
if (item.type == "inputRange") { |
|
|
|
item.inputLow.name = ""; |
|
|
|
item.inputHigh.name = "" |
|
|
|
} else if (item.type == "inputAndSelect") { |
|
|
|
if (item.putMachine) { |
|
|
|
item.putMachine.name = "" |
|
|
|
item.putMachine.value = "" |
|
|
|
} |
|
|
|
if (item.minor) { |
|
|
|
item.minor.name = "" |
|
|
|
item.minor.value = "" |
|
|
|
} |
|
|
|
if(item.Type == "1"){ |
|
|
|
item.SelectName = "" |
|
|
|
item.value = "" |
|
|
|
} else { |
|
|
|
item.SelectValue= "" |
|
|
|
}else if(item.Type == "2"){ |
|
|
|
item.SelectName = "" |
|
|
|
item.value = "" |
|
|
|
item.SelectValue= "" |
|
|
|
}else if(item.Type == "3"){ |
|
|
|
item.putMachine.forEach(res=>{ |
|
|
|
res.SelectName="" |
|
|
|
res.SelectValue="" |
|
|
|
}) |
|
|
|
}else if(item.Type == "4"){ |
|
|
|
item.SelectName = "" |
|
|
|
item.SelectValue= "" |
|
|
|
} |
|
|
|
} |
|
|
|
// var testList =deepCopyData(this.dataList) |
|
|
@ -563,12 +462,19 @@ |
|
|
|
this.isRefresh = true |
|
|
|
this.isRefreshType3 = true |
|
|
|
}) |
|
|
|
this.$forceUpdate() |
|
|
|
}, |
|
|
|
reload3() { |
|
|
|
this.isRefreshType3 = false |
|
|
|
this.$nextTick(() => { |
|
|
|
this.isRefreshType3 = true |
|
|
|
}) |
|
|
|
}, |
|
|
|
reload2() { |
|
|
|
this.isRefreshType2 = false |
|
|
|
this.$nextTick(() => { |
|
|
|
this.isRefreshType2 = true |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|