|
|
@@ -126,7 +126,7 @@
|
|
|
<div class="flex-box">
|
|
|
<van-button type="default" plain @click="accredit" v-show="showGrantBtn">授权</van-button>
|
|
|
<van-button type="info" plain hairline @click="saveData">保存</van-button>
|
|
|
- <van-button type="info" :disabled="Boolean(!isSubmit)" @click="submitData">提交</van-button>
|
|
|
+ <van-button type="info" @click="submitData">提交</van-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -438,17 +438,23 @@ export default {
|
|
|
});
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+//:disabled="Boolean(!isSubmit)"
|
|
|
//提交数据
|
|
|
submitData() {
|
|
|
//验证必填项
|
|
|
let pointData = this.checkList.flatMap(v => v.pointList);
|
|
|
- let allNfcList = pointData.flatMap(v=>v.nfcList);
|
|
|
- let result = allNfcList.some(v=>v.status != 1);
|
|
|
- //some函数的用法
|
|
|
- if(result){
|
|
|
- this.$toast('请先扫描NFC标签');
|
|
|
- return;
|
|
|
+ let allNfcList = [];
|
|
|
+ pointData.forEach(v=>{
|
|
|
+ if(v.nfcList && v.nfcList.length > 0){
|
|
|
+ allNfcList.push(...v.nfcList)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if(allNfcList.length > 0){
|
|
|
+ let result = allNfcList.some(v=>v.status != 1);
|
|
|
+ if(result){
|
|
|
+ this.$toast('请先扫描NFC标签');
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
let arr = pointData.filter(v => {
|
|
|
if (v.status === 1) {
|
|
|
@@ -457,6 +463,7 @@ export default {
|
|
|
})
|
|
|
if (arr.length) return this.$toast(`${arr[0].itemName}:该信息不完整请填写`);
|
|
|
this.taskInfo.isSubmit = 1;
|
|
|
+ console.log(this.taskInfo,'taskInfo')
|
|
|
registerSubmit(this.taskInfo).then(res => {
|
|
|
this.$toast('提交成功')
|
|
|
this.$router.replace({
|