|
|
@ -1,6 +1,6 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<view class="boxsxx"> |
|
|
|
<view class="boxsxx"> |
|
|
|
<image src="http://image.bjkeyware.com/static/index/renliwb/627teacherbg.png" class="topbg" mode=""></image> |
|
|
|
<!-- <image src="http://image.bjkeyware.com/static/index/renliwb/627teacherbg.png" class="topbg" mode=""></image> --> |
|
|
|
|
|
|
|
|
|
|
|
<view class="tscontent"> |
|
|
|
<view class="tscontent"> |
|
|
|
<view class="contitle">北京关键科技股份有限公司&河南科技大学</view> |
|
|
|
<view class="contitle">北京关键科技股份有限公司&河南科技大学</view> |
|
|
@ -19,13 +19,13 @@ |
|
|
|
<!-- 表单 --> |
|
|
|
<!-- 表单 --> |
|
|
|
<u-form :model="form" ref="uForm" label-position="top" class="uformclass" :rules="rules"> |
|
|
|
<u-form :model="form" ref="uForm" label-position="top" class="uformclass" :rules="rules"> |
|
|
|
<u-form-item v-for="(it,index) in detailForm" :key="it.key" :label="`${index + 1}.${it[it.key]}`"> |
|
|
|
<u-form-item v-for="(it,index) in detailForm" :key="it.key" :label="`${index + 1}.${it[it.key]}`"> |
|
|
|
<u-input v-if="it.type == 'input'" border v-model="form[it.key]" /> |
|
|
|
<u-input v-if="it.type == 'input'" border v-model="form[it.key]" /> |
|
|
|
<u-radio-group v-if="it.type == 'radio'" wrap v-model="form[it.key]"> |
|
|
|
<u-radio-group v-if="it.type == 'radio'" wrap v-model="form[it.key]" > |
|
|
|
<u-radio v-for="(item, i) in it.value" :key="item" :name="item"> |
|
|
|
<u-radio v-for="(item, i) in it.value" :key="item" :name="item"> |
|
|
|
{{ item }} |
|
|
|
{{ item }} |
|
|
|
</u-radio> |
|
|
|
</u-radio> |
|
|
|
</u-radio-group> |
|
|
|
</u-radio-group> |
|
|
|
<u-input v-if="it.type == 'textarea'" type="textarea" border v-model="form[it.key]" /> |
|
|
|
<u-input v-if="it.type == 'textarea'" type="textarea" border v-model="form[it.key]" /> |
|
|
|
</u-form-item> |
|
|
|
</u-form-item> |
|
|
|
</u-form> |
|
|
|
</u-form> |
|
|
|
|
|
|
|
|
|
|
@ -53,6 +53,7 @@ |
|
|
|
this.getformDe() |
|
|
|
this.getformDe() |
|
|
|
}, |
|
|
|
}, |
|
|
|
onReady() { |
|
|
|
onReady() { |
|
|
|
|
|
|
|
this.$refs.uForm.setRules(this.rules); |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
getformDe() { |
|
|
|
getformDe() { |
|
|
@ -95,12 +96,21 @@ |
|
|
|
// 设置rules不生效,暂时先循环校验空值 |
|
|
|
// 设置rules不生效,暂时先循环校验空值 |
|
|
|
this.detailForm.forEach(it => { |
|
|
|
this.detailForm.forEach(it => { |
|
|
|
if (!this.form[it.key]) { |
|
|
|
if (!this.form[it.key]) { |
|
|
|
|
|
|
|
console.log("不完整"); |
|
|
|
return uni.showToast({ |
|
|
|
return uni.showToast({ |
|
|
|
title: '请将报名表填写完整', |
|
|
|
title: '请将报名表填写完整', |
|
|
|
icon: 'none' |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
const toggle = this.form.some(item=>{return toggle === ""}) |
|
|
|
|
|
|
|
if(toggle){ |
|
|
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
|
|
title: '请将报名表填写完整', |
|
|
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
// 处理json数据 |
|
|
|
// 处理json数据 |
|
|
|
const newData = JSON.parse(JSON.stringify(this.detailForm)) |
|
|
|
const newData = JSON.parse(JSON.stringify(this.detailForm)) |
|
|
|
newData.forEach((it) => { |
|
|
|
newData.forEach((it) => { |
|
|
|