Commit 82e4b0fc authored by 杨梦雪's avatar 杨梦雪

多形式报名

parent 1f75c2f5
...@@ -35,6 +35,10 @@ ...@@ -35,6 +35,10 @@
} }
::v-deep .multiform .el-form-item__label {
font-size: 15px !important;
}
::v-deep .el-form-item { ::v-deep .el-form-item {
margin-bottom: 20px; margin-bottom: 20px;
height: 70px; height: 70px;
......
...@@ -2,7 +2,31 @@ ...@@ -2,7 +2,31 @@
<!--底部--> <!--底部-->
<div class="confirm"> <div class="confirm">
<div class="title">{{ info.name }}报名须知</div> <div class="title">{{ info.name }}报名须知</div>
<el-form
ref="referRef"
:model="referForm"
label-position="top"
class="checkForm"
:rules="referInfoRules"
>
<el-form-item v-if="is_multiform == 1"
label="活动形式"
prop="multiform"
class="multiform"
style="height: 100%"
:rules="
is_multiform == 1 ? referInfoRules.multiform : [{ required: false }]
"
>
<el-radio-group ref="multiform" v-model="referForm.multiform">
<div v-for="item in multiform" :key="item.id">
<el-radio :label="item.id.toString()">{{item.parent_name}}</el-radio>
</div>
</el-radio-group>
</el-form-item>
</el-form>
<div v-html="info.exam_instructions"></div> <div v-html="info.exam_instructions"></div>
<!-- <p> <!-- <p>
南开大学是教育部直属重点综合性大学,是敬爱的周恩来总理的母校。新中国成立以来,学校发展始终得到党和国家的亲切关怀。毛泽东主席题写校名、亲临视察;周恩来总理三回母校指导;邓小平同志会见数学大师陈省身,批示成立南开数学研究所;江泽民同志、胡锦涛同志先后视察南开。特别是党的十八大以来,习近平总书记多次对南开的发展给予肯定,并对相关工作回信和勉励,更在百年校庆之际亲临南开视察。 南开大学是教育部直属重点综合性大学,是敬爱的周恩来总理的母校。新中国成立以来,学校发展始终得到党和国家的亲切关怀。毛泽东主席题写校名、亲临视察;周恩来总理三回母校指导;邓小平同志会见数学大师陈省身,批示成立南开数学研究所;江泽民同志、胡锦涛同志先后视察南开。特别是党的十八大以来,习近平总书记多次对南开的发展给予肯定,并对相关工作回信和勉励,更在百年校庆之际亲临南开视察。
...@@ -27,26 +51,59 @@ ...@@ -27,26 +51,59 @@
</template> </template>
<script> <script>
/* eslint-disable */ /* eslint-disable */
import Cookie from "js-cookie"; import Cookie from "js-cookie";
import { setSignShould } from "r/index/signUp"; import {setSignShould} from "r/index/signUp";
import { getCam } from "r/index/login"; import {getCam} from "r/index/login";
export default {
export default {
name: "Confirm", name: "Confirm",
// props: { statusNum: [String, Number] }, //进度参数 // props: { statusNum: [String, Number] }, //进度参数
data() { data() {
return { return {
checked: false, checked: false,
info: {}, info: {},
}; referForm: {multiform: null,},
//是否开启多形式报名
is_multiform: 0,
multiform: [],
referInfoRules: {
multiform: [{required: true, message: '请选择活动形式', trigger: 'change'}],
}
}
}, },
created() { created() {
this.getCams(); this.getCams();
}, const code = this.$store.state.indexIdentity;
//是否开启多形式报名
this.is_multiform = this.$store.state.isMultiform;
if (this.is_multiform == 1) {
this.multiform = JSON.parse(window.localStorage.getItem("multiform" + code));
}
let multiform_id = window.localStorage.getItem("multiform_id" + code);
if (multiform_id && multiform_id !== null) {
console.log(multiform_id)
this.referForm.multiform = multiform_id;
console.log(this.referForm.multiform)
}
}
,
methods: { methods: {
next() { next() {
// console.log(this.checked); // console.log(this.checked);
setSignShould({}).then((res) => { this.$refs["referRef"].validate((valid, object) => {
if (!valid) {
this.scrollView(object);
return false;
}
let _this = this;
let obj = {};
//是否选择活动形式
if (this.is_multiform == 1) {
obj.multiform_id = _this.referForm.multiform;
}
setSignShould(obj).then((res) => {
// console.log(res, "setSignShould"); // console.log(res, "setSignShould");
if (res.data.code !== 200) return this.$message.error(res.data.message); if (res.data.code !== 200) return this.$message.error(res.data.message);
this.$emit("getstatus", res.data.status); this.$emit("getstatus", res.data.status);
...@@ -54,7 +111,11 @@ export default { ...@@ -54,7 +111,11 @@ export default {
// let code = this.$store.state.indexIdentity; // let code = this.$store.state.indexIdentity;
// this.$router.push("/signUp/invitation?code="+code); // this.$router.push("/signUp/invitation?code="+code);
}); });
},
})
}
,
getCams() { getCams() {
getCam(this.$store.state.indexIdentity).then((res) => { getCam(this.$store.state.indexIdentity).then((res) => {
// console.log(res, "res"); // console.log(res, "res");
...@@ -64,21 +125,27 @@ export default { ...@@ -64,21 +125,27 @@ export default {
// this.$message.success(res.data.message); // this.$message.success(res.data.message);
this.info = res.data; this.info = res.data;
}); });
}, }
}, ,
}; }
,
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "a/scss/btn"; @import "a/scss/btn";
.btn {
.btn {
padding-bottom: 34px !important; padding-bottom: 34px !important;
} }
.confirm {
.confirm {
padding: 0 50px 60px; padding: 0 50px 60px;
.line { .line {
border-bottom: 1px solid #d4d0d4; border-bottom: 1px solid #d4d0d4;
} }
.title { .title {
font-size: 20px; font-size: 20px;
font-weight: 600; font-weight: 600;
...@@ -87,6 +154,7 @@ export default { ...@@ -87,6 +154,7 @@ export default {
text-align: center; text-align: center;
margin: 0 0 24px 0; margin: 0 0 24px 0;
} }
p { p {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
...@@ -99,9 +167,73 @@ export default { ...@@ -99,9 +167,73 @@ export default {
margin-top: 42px; margin-top: 42px;
} }
::v-deep .multiform .el-form-item__label {
font-size: 15px !important;
}
::v-deep .el-form-item {
margin-bottom: 20px;
height: 70px;
.el-form-item__label {
height: 32px;
line-height: 32px;
font-size: 12px;
font-family: PingFang SC;
font-weight: 500;
color: #12141c;
}
&.no_label .el-form-item__label:before {
content: "" !important;
}
.el-form-item__content {
// 圆
.el-radio-group {
.el-radio {
.el-radio__label {
color: #656872;
}
.el-radio__input {
.el-radio__inner {
width: 20px;
height: 20px;
line-height: 20px;
border-radius: 50%;
&:hover {
border-color: var(--color);
}
}
&.is-checked {
.el-radio__inner {
background: #ffffff !important;
border-color: var(--color);
&::after {
width: 7.5px;
height: 7.5px;
background: var(--color) !important;
}
}
}
}
}
}
}
}
::v-deep .el-checkbox__inner:hover { ::v-deep .el-checkbox__inner:hover {
border-color: var(--color); border-color: var(--color);
} }
::v-deep .el-checkbox__input.is-checked { ::v-deep .el-checkbox__input.is-checked {
.el-checkbox__inner { .el-checkbox__inner {
background-color: var(--color); background-color: var(--color);
...@@ -112,5 +244,5 @@ export default { ...@@ -112,5 +244,5 @@ export default {
color: var(--color); color: var(--color);
} }
} }
} }
</style> </style>
...@@ -1008,7 +1008,6 @@ ...@@ -1008,7 +1008,6 @@
gender: [ gender: [
{required: true, message: "性别不能为空!", trigger: "change"}, {required: true, message: "性别不能为空!", trigger: "change"},
], ],
id_card: [ id_card: [
// { required: true, message: "身份证号不能为空!", trigger: "blur" }, // { required: true, message: "身份证号不能为空!", trigger: "blur" },
{validator: validator.validateid_card, trigger: "blur"}, {validator: validator.validateid_card, trigger: "blur"},
...@@ -1352,7 +1351,7 @@ ...@@ -1352,7 +1351,7 @@
this.configJson = this.$store.state.configJson; this.configJson = this.$store.state.configJson;
if (this.configJson.jiguanCity == 1 || this.configJson.school == 1) { if (this.configJson.jiguanCity == 1 || this.configJson.school == 1) {
this.getProAndCity(); this.getProAndCity();
} };
}, },
watch: { watch: {
referForm(val) { referForm(val) {
...@@ -1475,7 +1474,6 @@ ...@@ -1475,7 +1474,6 @@
referForm[k] = info[k]; referForm[k] = info[k];
} }
this.referForm = referForm; this.referForm = referForm;
// this.referForm.clothesSize = referForm.clothes_size;
if (res.data.info.jiguan_province && res.data.info.jiguan_city) { if (res.data.info.jiguan_province && res.data.info.jiguan_city) {
this.referForm.jiguan_code = this.referForm.jiguan_code =
res.data.info.jiguan_province.toString() + res.data.info.jiguan_province.toString() +
......
...@@ -157,6 +157,11 @@ function checkCam(code, cb) { ...@@ -157,6 +157,11 @@ function checkCam(code, cb) {
if (res.data.config_json != null) { if (res.data.config_json != null) {
store.state.configJson = res.data.config_json; store.state.configJson = res.data.config_json;
} }
//是否开启多形式报名
if (res.data.is_multiform != null) {
store.state.isMultiform = res.data.is_multiform;
}
window.localStorage.setItem("multiform" + code, JSON.stringify(res.data.multiform));
cb && cb(true); cb && cb(true);
}).catch(() => { }).catch(() => {
......
...@@ -408,6 +408,9 @@ ...@@ -408,6 +408,9 @@
"[]" "[]"
); );
} }
//多活動形式
window.localStorage.setItem("multiform_id" + code, res.data.multiform_id);
}); });
}, },
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment