|
|
@ -22,21 +22,24 @@ |
|
|
|
</view> |
|
|
|
<view class=""> |
|
|
|
<view class="" style="margin-left: 50rpx;"> |
|
|
|
<view class=""> |
|
|
|
<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> |
|
|
|
<u-radio-group v-if="isRefresh" v-model="item.name" @change="radioGroupChange(item)"> |
|
|
|
<view class="uni-flex" style="width: 50%; margin-left: 0rpx;" |
|
|
|
v-for="(radio, index) in dataList" :key="index" @change="radioChange"> |
|
|
|
v-for="(radio, index) in dataList" :key="index"> |
|
|
|
<view class="uni-flex " style="margin-top: 10rpx; justify-content: flex-start;"> |
|
|
|
<u-radio :name="radio.name"> |
|
|
|
<u-radio :name="radio.name" @change="radioChange(radio)"> |
|
|
|
{{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" /> |
|
|
|
<input class="input" disabled style="margin-left: 50rpx;" :placeholder="item.placeholder" |
|
|
|
v-model="item.name" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
@ -61,21 +64,23 @@ |
|
|
|
|
|
|
|
<view class=""> |
|
|
|
<view class="" style="margin-left: 50rpx;"> |
|
|
|
<view class=""> |
|
|
|
<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> |
|
|
|
<u-radio-group v-if="isRefresh" v-model="item.name" @change="radioGroupChange(item)"> |
|
|
|
<view class="uni-flex" style="width: 50%; margin-left: 0rpx;" |
|
|
|
v-for="(radio, index) in dataList" :key="index" @change="radioChange"> |
|
|
|
v-for="(radio, index) in dataInputList" :key="index"> |
|
|
|
<view class="uni-flex " style="margin-top: 10rpx; justify-content: flex-start;"> |
|
|
|
<u-radio :name="radio.name"> |
|
|
|
<u-radio :name="radio.name" @change="radioChange(radio)"> |
|
|
|
{{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" /> |
|
|
|
<input class="input" style="margin-left: 50rpx;" :placeholder="item.placeholder" |
|
|
|
v-model="item.name" /> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="" v-if="item.main"> |
|
|
@ -109,19 +114,19 @@ |
|
|
|
<view class=""> |
|
|
|
<view class="" style="margin-left: 50rpx;"> |
|
|
|
<view style="font-size: 30rpx; color: #9e9e9e;">(单选)</view> |
|
|
|
<u-radio-group v-model="item.name" @change="radioGroupChange"> |
|
|
|
<u-radio-group v-if="isRefresh" v-model="item.name" @change="radioGroupChange(item)"> |
|
|
|
<view class="uni-flex" style="width: 50%; margin-left: 0rpx;" |
|
|
|
v-for="(radio, index) in dataClassList" :key="index" @change="radioChange"> |
|
|
|
v-for="(radio, index) in dataClassList" :key="index"> |
|
|
|
<view class="uni-flex " style="margin-top: 10rpx; justify-content: flex-start;"> |
|
|
|
<u-radio :name="radio.name"> |
|
|
|
<u-radio :name="radio.name" @change="radioChange(radio)"> |
|
|
|
{{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" /> |
|
|
|
<input class="input" :disabled="false" style="margin-left: 50rpx;" :placeholder="item.placeholder" |
|
|
|
v-model="item.name" /> |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
@ -165,7 +170,9 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import showModal from '../../mycomponents/common/showModal.vue' |
|
|
|
|
|
|
|
import { |
|
|
|
deepCopyData |
|
|
|
} from "@/common/basic.js" |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
@ -200,55 +207,44 @@ |
|
|
|
name: "停机状态", |
|
|
|
} |
|
|
|
], |
|
|
|
dataInputList: [{ |
|
|
|
value: 4, |
|
|
|
name: "停机状态", |
|
|
|
}], |
|
|
|
dataClassList: [{ |
|
|
|
value: 1, |
|
|
|
name: "白班", |
|
|
|
name: "三班", |
|
|
|
}, |
|
|
|
{ |
|
|
|
value: 2, |
|
|
|
name: "二班", |
|
|
|
name: "白班", |
|
|
|
}, |
|
|
|
{ |
|
|
|
value: 3, |
|
|
|
name: "三班", |
|
|
|
name: "二班", |
|
|
|
} |
|
|
|
], |
|
|
|
|
|
|
|
// formData: [{ |
|
|
|
// content: "检查各个管路及接头", |
|
|
|
// methond: "目视野无液体渗出", |
|
|
|
// placeholder: "请输入类型1", |
|
|
|
// name: '', |
|
|
|
// value:"", |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// content: "电机检查", |
|
|
|
// methond: "倾听无异响", |
|
|
|
// placeholder: "请输入类型2", |
|
|
|
// name: '', |
|
|
|
// value:"", |
|
|
|
// }], |
|
|
|
selectStateItem: {}, |
|
|
|
selectClassItem: {}, |
|
|
|
testName: null, |
|
|
|
current: 0, |
|
|
|
isRefresh: true |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
radioChange(e) { |
|
|
|
console.log(e) |
|
|
|
radioChange(radio) { |
|
|
|
console.log("radioChange") |
|
|
|
}, |
|
|
|
radioGroupChange(item) { |
|
|
|
console.log("radioGroupChange", item) |
|
|
|
// for (let i = 0; i < this.dataList.length; i++) { |
|
|
|
// if (this.dataList[i].value === evt.detail.value) { |
|
|
|
// if (this.dataList[i].name === item.name) { |
|
|
|
// this.current = i; |
|
|
|
// break; |
|
|
|
// } |
|
|
|
// } |
|
|
|
}, |
|
|
|
radioGroupChange(e) { |
|
|
|
console.log(e) |
|
|
|
}, |
|
|
|
inputMain(item) { |
|
|
|
item.name = item.minor.name + "~" + item.main.name; |
|
|
|
if (item.minor.name == "" && item.main.name == "") { |
|
|
@ -309,11 +305,7 @@ |
|
|
|
} 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) |
|
|
@ -323,14 +315,20 @@ |
|
|
|
|
|
|
|
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 + "】之间") |
|
|
|
.name + "】不在" + item.minor.hint) |
|
|
|
isCheckPass = false; |
|
|
|
break |
|
|
|
} |
|
|
|
|
|
|
|
if (item.main.name == "") { |
|
|
|
this.showHint(hintIndex + ".点检内容 : " + item.content, item.main.placeholder) |
|
|
|
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 + "】之间") |
|
|
|
"】不在" + item.main.hint) |
|
|
|
isCheckPass = false; |
|
|
|
break |
|
|
|
} |
|
|
@ -354,7 +352,6 @@ |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
if (isCheckPass) { |
|
|
|
callBack(this.formData) |
|
|
@ -409,10 +406,21 @@ |
|
|
|
item.name = "" |
|
|
|
item.value = "" |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
// var testList =deepCopyData(this.dataList) |
|
|
|
// this.dataList =[]; |
|
|
|
// this.dataList=testList |
|
|
|
this.reload(); |
|
|
|
this.$emit("reset", this.formData) |
|
|
|
console.log(this.formData) |
|
|
|
|
|
|
|
console.log("重置", this.formData) |
|
|
|
} |
|
|
|
, |
|
|
|
reload(){ |
|
|
|
this.isRefresh = false |
|
|
|
this.$nextTick(() => { |
|
|
|
this.isRefresh = true |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|