|
|
|
@ -1,6 +1,6 @@ |
|
|
|
|
<template> |
|
|
|
|
<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="contitle">北京关键科技股份有限公司&河南科技大学</view> |
|
|
|
@ -19,13 +19,13 @@ |
|
|
|
|
<!-- 表单 --> |
|
|
|
|
<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-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-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 v-for="(item, i) in it.value" :key="item" :name="item"> |
|
|
|
|
{{ item }} |
|
|
|
|
</u-radio> |
|
|
|
|
</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> |
|
|
|
|
|
|
|
|
@ -53,6 +53,7 @@ |
|
|
|
|
this.getformDe() |
|
|
|
|
}, |
|
|
|
|
onReady() { |
|
|
|
|
this.$refs.uForm.setRules(this.rules); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
getformDe() { |
|
|
|
@ -95,12 +96,21 @@ |
|
|
|
|
// 设置rules不生效,暂时先循环校验空值 |
|
|
|
|
this.detailForm.forEach(it => { |
|
|
|
|
if (!this.form[it.key]) { |
|
|
|
|
console.log("不完整"); |
|
|
|
|
return uni.showToast({ |
|
|
|
|
title: '请将报名表填写完整', |
|
|
|
|
icon: 'none' |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
const toggle = this.form.some(item=>{return toggle === ""}) |
|
|
|
|
if(toggle){ |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '请将报名表填写完整', |
|
|
|
|
icon: 'none' |
|
|
|
|
}) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
// 处理json数据 |
|
|
|
|
const newData = JSON.parse(JSON.stringify(this.detailForm)) |
|
|
|
|
newData.forEach((it) => { |
|
|
|
|