|
@@ -1,696 +0,0 @@
|
|
|
-<template>
|
|
|
- <div class="main">
|
|
|
- <el-form
|
|
|
- label-position="left"
|
|
|
- :model="ruleForm"
|
|
|
- :rules="rules"
|
|
|
- ref="ruleForm"
|
|
|
- label-width="210px"
|
|
|
- >
|
|
|
- <el-form-item label="咋联系你呢" prop="phone" class="error_info">
|
|
|
- <el-input v-model="ruleForm.phone" placeholder="请输入"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="你得有一米八吧" prop="height" class="error_info">
|
|
|
- <el-select v-model="ruleForm.height" placeholder="未选择">
|
|
|
- <el-option
|
|
|
- v-for="(item, i) in height"
|
|
|
- :key="i"
|
|
|
- :label="item.dictLabel"
|
|
|
- :value="item.dictValue"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="你咋那么瘦呢" prop="weight" class="error_info">
|
|
|
- <el-select v-model="ruleForm.weight" placeholder="未选择">
|
|
|
- <el-option
|
|
|
- v-for="(item, i) in weight"
|
|
|
- :key="i"
|
|
|
- :label="item.dictLabel"
|
|
|
- :value="item.dictValue"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item
|
|
|
- label="当初没选清华北大是你不想吗"
|
|
|
- prop="education"
|
|
|
- label-width="210px"
|
|
|
- class="education_error"
|
|
|
- >
|
|
|
- <el-select v-model="ruleForm.education" placeholder="未选择">
|
|
|
- <el-option
|
|
|
- v-for="(item, i) in education"
|
|
|
- :key="i"
|
|
|
- :label="item.dictLabel"
|
|
|
- :value="item.dictValue"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="一月能挣多少米" prop="income" class="error_info">
|
|
|
- <el-select v-model="ruleForm.income" placeholder="未选择">
|
|
|
- <el-option
|
|
|
- v-for="(item, i) in income"
|
|
|
- :key="i"
|
|
|
- :label="item.dictLabel"
|
|
|
- :value="item.dictValue"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="关于小红本本" prop="marriage" class="error_info">
|
|
|
- <el-select v-model="ruleForm.marriage" placeholder="未选择">
|
|
|
- <el-option
|
|
|
- v-for="(item, i) in marriage"
|
|
|
- :key="i"
|
|
|
- :label="item.dictLabel"
|
|
|
- :value="item.dictValue"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="亲生的小祖宗" prop="children" class="error_info">
|
|
|
- <el-select v-model="ruleForm.children" placeholder="未选择">
|
|
|
- <el-option
|
|
|
- v-for="(item, i) in children"
|
|
|
- :key="i"
|
|
|
- :label="item.dictLabel"
|
|
|
- :value="item.dictValue"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item
|
|
|
- label="这些年没少攒吧(房)"
|
|
|
- prop="assetHouse"
|
|
|
- class="error_info"
|
|
|
- >
|
|
|
- <el-select
|
|
|
- v-model="ruleForm.assetHouse"
|
|
|
- placeholder="未选择"
|
|
|
- @change="assetHouseChange"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="(item, i) in assetHouse"
|
|
|
- :key="i"
|
|
|
- :label="item.dictLabel"
|
|
|
- :value="item.dictValue"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item
|
|
|
- v-if="assetHouse.dictValue == '2' || assetHouseShow"
|
|
|
- label="房屋面积"
|
|
|
- prop="assetHouseArea"
|
|
|
- class="error_info"
|
|
|
- >
|
|
|
- <el-select v-model="ruleForm.assetHouseArea" placeholder="未选择">
|
|
|
- <el-option
|
|
|
- v-for="(item, i) in assetHouseArea"
|
|
|
- :key="i"
|
|
|
- :label="item.dictLabel"
|
|
|
- :value="item.dictValue"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item
|
|
|
- v-if="assetHouse.dictValue == '2' || assetHouseShow"
|
|
|
- label="有无房贷"
|
|
|
- prop="assetHouseLoan"
|
|
|
- class="error_info"
|
|
|
- >
|
|
|
- <el-select v-model="ruleForm.assetHouseLoan" placeholder="未选择">
|
|
|
- <el-option
|
|
|
- v-for="(item, i) in assetHouseLoan"
|
|
|
- :key="i"
|
|
|
- :label="item.dictLabel"
|
|
|
- :value="item.dictValue"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item
|
|
|
- label="这些年没少攒吧(车)"
|
|
|
- prop="assetCar"
|
|
|
- class="error_info"
|
|
|
- >
|
|
|
- <el-select
|
|
|
- v-model="ruleForm.assetCar"
|
|
|
- placeholder="未选择"
|
|
|
- @change="assetCarChange"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="(item, i) in assetCar"
|
|
|
- :key="i"
|
|
|
- :label="item.dictLabel"
|
|
|
- :value="item.dictValue"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item
|
|
|
- v-if="assetCar.dictValue == '2' || assetCarShow"
|
|
|
- label="车辆价值"
|
|
|
- prop="assetCarValue"
|
|
|
- class="error_info"
|
|
|
- >
|
|
|
- <el-select v-model="ruleForm.assetCarValue" placeholder="未选择">
|
|
|
- <el-option
|
|
|
- v-for="(item, i) in assetCarValue"
|
|
|
- :key="i"
|
|
|
- :label="item.dictLabel"
|
|
|
- :value="item.dictValue"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item
|
|
|
- v-if="assetCar.dictValue == '2' || assetCarShow"
|
|
|
- label="车贷情况"
|
|
|
- prop="assetCarLoan"
|
|
|
- class="error_info"
|
|
|
- >
|
|
|
- <el-select v-model="ruleForm.assetCarLoan" placeholder="未选择">
|
|
|
- <el-option
|
|
|
- v-for="(item, i) in assetCarLoan"
|
|
|
- :key="i"
|
|
|
- :label="item.dictLabel"
|
|
|
- :value="item.dictValue"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <el-form-item
|
|
|
- label="啥时候方便我给你介绍个对象(多选)"
|
|
|
- prop="controlTime"
|
|
|
- class="checkbox"
|
|
|
- >
|
|
|
- <el-checkbox-group v-model="ruleForm.controlTime">
|
|
|
- <el-checkbox
|
|
|
- v-for="item in controlTime"
|
|
|
- :key="item.dictValue"
|
|
|
- :label="item.dictValue"
|
|
|
- >{{ item.dictLabel }}</el-checkbox
|
|
|
- >
|
|
|
- </el-checkbox-group>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="卖命主旋律(多选)" prop="workStatus" class="checkbox">
|
|
|
- <el-checkbox-group v-model="ruleForm.workStatus">
|
|
|
- <el-checkbox
|
|
|
- v-for="item in workStatus"
|
|
|
- :key="item.dictValue"
|
|
|
- :label="item.dictValue"
|
|
|
- >{{ item.dictLabel }}</el-checkbox
|
|
|
- >
|
|
|
- </el-checkbox-group>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="卖命主阵地" prop="companyNature" class="error_info">
|
|
|
- <el-select v-model="ruleForm.companyNature" placeholder="未选择">
|
|
|
- <el-option
|
|
|
- v-for="(item, i) in companyNature"
|
|
|
- :key="i"
|
|
|
- :label="item.dictLabel"
|
|
|
- :value="item.dictValue"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="具体卖命单位" prop="company" class="error_info">
|
|
|
- <el-input v-model="ruleForm.company" placeholder="请输入"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="爹妈情况" prop="parents" class="error_info">
|
|
|
- <el-select v-model="ruleForm.parents" placeholder="未选择">
|
|
|
- <el-option
|
|
|
- v-for="(item, i) in parents"
|
|
|
- :key="i"
|
|
|
- :label="item.dictLabel"
|
|
|
- :value="item.dictValue"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="和父母一起住没" prop="isCommon" class="error_info">
|
|
|
- <el-select v-model="ruleForm.isCommon" placeholder="未选择">
|
|
|
- <el-option
|
|
|
- v-for="(item, i) in isCommon"
|
|
|
- :key="i"
|
|
|
- :label="item.dictLabel"
|
|
|
- :value="item.dictValue"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="爸比在哪高就" prop="fatherWork" class="error_info">
|
|
|
- <el-select v-model="ruleForm.fatherWork" placeholder="未选择">
|
|
|
- <el-option
|
|
|
- v-for="(item, i) in fatherWork"
|
|
|
- :key="i"
|
|
|
- :label="item.dictLabel"
|
|
|
- :value="item.dictValue"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="那么妈咪呢" prop="matherWork" class="error_info">
|
|
|
- <el-select v-model="ruleForm.matherWork" placeholder="未选择">
|
|
|
- <el-option
|
|
|
- v-for="(item, i) in matherWork"
|
|
|
- :key="i"
|
|
|
- :label="item.dictLabel"
|
|
|
- :value="item.dictValue"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="爹妈有工资没" prop="parentAssets" class="error_info">
|
|
|
- <el-select v-model="ruleForm.parentAssets" placeholder="未选择">
|
|
|
- <el-option
|
|
|
- v-for="(item, i) in parentAssets"
|
|
|
- :key="i"
|
|
|
- :label="item.dictLabel"
|
|
|
- :value="item.dictValue"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item
|
|
|
- label="家里有跟你争宠的没(多选)"
|
|
|
- prop="composition"
|
|
|
- class="checkbox"
|
|
|
- >
|
|
|
- <el-checkbox-group v-model="ruleForm.composition">
|
|
|
- <el-checkbox
|
|
|
- v-for="item in composition"
|
|
|
- :key="item.dictValue"
|
|
|
- :label="item.dictValue"
|
|
|
- >{{ item.dictLabel }}</el-checkbox
|
|
|
- >
|
|
|
- </el-checkbox-group>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="你这身材可以呀" prop="sports" class="error_info">
|
|
|
- <el-select v-model="ruleForm.sports" placeholder="未选择">
|
|
|
- <el-option
|
|
|
- v-for="(item, i) in sports"
|
|
|
- :key="i"
|
|
|
- :label="item.dictLabel"
|
|
|
- :value="item.dictValue"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="喜欢铜鼓点啥(多选)" prop="hobby" class="checkbox">
|
|
|
- <el-checkbox-group v-model="ruleForm.hobby">
|
|
|
- <el-checkbox
|
|
|
- v-for="item in hobby"
|
|
|
- :key="item.dictValue"
|
|
|
- :label="item.dictValue"
|
|
|
- >{{ item.dictLabel }}</el-checkbox
|
|
|
- >
|
|
|
- </el-checkbox-group>
|
|
|
- </el-form-item>
|
|
|
- <!-- <el-form-item> -->
|
|
|
- <el-button
|
|
|
- class="confirm_button"
|
|
|
- type="primary"
|
|
|
- @click="submitForm('ruleForm')"
|
|
|
- >确认</el-button
|
|
|
- >
|
|
|
- <!-- </el-form-item> -->
|
|
|
- </el-form>
|
|
|
- </div>
|
|
|
-</template>
|
|
|
-
|
|
|
-<script>
|
|
|
-// import tabbaar from '../components/tabbar'
|
|
|
-import { getForm, getPersonInfo, postPersonInfo } from "../api";
|
|
|
-export default {
|
|
|
- name: "Home",
|
|
|
- components: {},
|
|
|
- data() {
|
|
|
- return {
|
|
|
- assetHouseShow: false,
|
|
|
- assetCarShow: false,
|
|
|
- phone: [], //手机号
|
|
|
- height: [], //身高
|
|
|
- weight: [], //体重
|
|
|
- education: [], //学历
|
|
|
- income: [], //收入
|
|
|
- marriage: [], //婚姻状况
|
|
|
- children: [], //子女
|
|
|
- assetHouse: [], //房
|
|
|
- assetHouseArea: [], //房屋面积
|
|
|
- assetHouseLoan: [], //贷款
|
|
|
- assetCar: [], //车
|
|
|
- assetCarValue: [], //车多钱
|
|
|
- assetCarLoan: [], //车贷款
|
|
|
- isCommon: [
|
|
|
- { dictLabel: "没有", dictValue: "0" },
|
|
|
- { dictLabel: "一起", dictValue: "1" },
|
|
|
- ], //跟父母一起住
|
|
|
- controlTime: [], //空闲时间
|
|
|
- workStatus: [], //工作状态
|
|
|
- companyNature: [], //公司性质
|
|
|
- company: [], //公司名
|
|
|
- parents: [], //父母状态
|
|
|
- fatherWork: [], //
|
|
|
- matherWork: [],
|
|
|
- parentAssets: [], //父母资产
|
|
|
- composition: [], //兄弟姐妹
|
|
|
- motionState: [], //星座
|
|
|
- sports: "", //运动情况
|
|
|
- hobby: [], //爱好
|
|
|
- ruleForm: {
|
|
|
- phone: "", //手机号
|
|
|
- height: "", //身高
|
|
|
- weight: "", //体重
|
|
|
- education: "", //学历
|
|
|
- income: "", //收入
|
|
|
- marriage: "", //婚姻状况
|
|
|
- children: "", //子女
|
|
|
- assetHouse: "", //房
|
|
|
- assetHouseArea: "", //房屋面积
|
|
|
- assetHouseLoan: "", //贷款
|
|
|
- assetCar: "", //车
|
|
|
- assetCarValue: "", //车多钱
|
|
|
- assetCarLoan: "", //车贷款
|
|
|
- isCommon: [], //跟父母一起住
|
|
|
- controlTime: [], //空闲时间
|
|
|
- workStatus: [], //工作状态
|
|
|
- companyNature: "", //公司性质
|
|
|
- company: "", //公司名
|
|
|
- parents: "", //父母状态
|
|
|
- fatherWork: "", //
|
|
|
- matherWork: "",
|
|
|
- parentAssets: "", //父母资产
|
|
|
- composition: [], //兄弟姐妹
|
|
|
- sports: "", //运动情况
|
|
|
- motionState: "", //星座
|
|
|
- hobby: [], //爱好
|
|
|
- },
|
|
|
- rules: {
|
|
|
- phone: [{ required: true, message: "请输入", trigger: "blur" }],
|
|
|
- height: [{ required: true, message: "请选择", trigger: "change" }],
|
|
|
- weight: [{ required: true, message: "请选择", trigger: "change" }],
|
|
|
- education: [{ required: true, message: "请选择", trigger: "change" }],
|
|
|
- income: [{ required: true, message: "请选择", trigger: "change" }],
|
|
|
- marriage: [{ required: true, message: "请选择", trigger: "change" }],
|
|
|
- children: [{ required: true, message: "请选择", trigger: "change" }],
|
|
|
- assetHouse: [{ required: true, message: "请选择", trigger: "change" }],
|
|
|
- assetHouseArea: [
|
|
|
- { required: true, message: "请选择", trigger: "change" },
|
|
|
- ],
|
|
|
- assetHouseLoan: [
|
|
|
- { required: true, message: "请选择", trigger: "change" },
|
|
|
- ],
|
|
|
- assetCar: [{ required: true, message: "请选择", trigger: "change" }],
|
|
|
- assetCarValue: [
|
|
|
- { required: true, message: "请选择", trigger: "change" },
|
|
|
- ],
|
|
|
- assetCarLoan: [
|
|
|
- { required: true, message: "请选择", trigger: "change" },
|
|
|
- ],
|
|
|
- controlTime: [
|
|
|
- {
|
|
|
- type: "array",
|
|
|
- required: true,
|
|
|
- message: "请至少选择一个",
|
|
|
- trigger: "change",
|
|
|
- },
|
|
|
- ],
|
|
|
- workStatus: [
|
|
|
- {
|
|
|
- type: "array",
|
|
|
- required: true,
|
|
|
- message: "请至少选择一个",
|
|
|
- trigger: "change",
|
|
|
- },
|
|
|
- ],
|
|
|
- companyNature: [
|
|
|
- { required: true, message: "请选择", trigger: "change" },
|
|
|
- ],
|
|
|
- company: [{ required: true, message: "请输入", trigger: "blur" }],
|
|
|
- parents: [{ required: true, message: "请选择", trigger: "change" }],
|
|
|
- isCommon: [{ required: true, message: "请选择", trigger: "change" }],
|
|
|
- fatherWork: [{ required: true, message: "请选择", trigger: "change" }],
|
|
|
- matherWork: [{ required: true, message: "请选择", trigger: "change" }],
|
|
|
- parentAssets: [
|
|
|
- { required: true, message: "请选择", trigger: "change" },
|
|
|
- ],
|
|
|
- composition: [
|
|
|
- {
|
|
|
- type: "array",
|
|
|
- required: true,
|
|
|
- message: "请至少选择一个",
|
|
|
- trigger: "change",
|
|
|
- },
|
|
|
- ],
|
|
|
- sports: [{ required: true, message: "请选择", trigger: "change" }],
|
|
|
- hobby: [
|
|
|
- {
|
|
|
- type: "array",
|
|
|
- required: true,
|
|
|
- message: "请至少选择一个",
|
|
|
- trigger: "change",
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- };
|
|
|
- },
|
|
|
- methods: {
|
|
|
- //获取是否填写过
|
|
|
- async getPersonInfo() {
|
|
|
- const result = await getPersonInfo();
|
|
|
- console.log(result.info, "222");
|
|
|
- if (result.info.height) {
|
|
|
- this.ruleForm = result.info;
|
|
|
- this.ruleForm.hobby = result.info.hobby.split(",");
|
|
|
- this.ruleForm.controlTime = result.info.controlTime.split(",");
|
|
|
- this.ruleForm.workStatus = result.info.workStatus.split(",");
|
|
|
- this.ruleForm.composition = result.info.composition.split(",");
|
|
|
- }
|
|
|
- },
|
|
|
- async getHeight() {
|
|
|
- const result = await getForm({ type: "he_body_height" });
|
|
|
- if (result.code == 0) {
|
|
|
- this.height = result.options;
|
|
|
- }
|
|
|
- },
|
|
|
- async getWeight() {
|
|
|
- const result = await getForm({ type: "he_body_weight" });
|
|
|
- if (result.code == 0) {
|
|
|
- this.weight = result.options;
|
|
|
- }
|
|
|
- },
|
|
|
- async getEducation() {
|
|
|
- const result = await getForm({ type: "he_education" });
|
|
|
- if (result.code == 0) {
|
|
|
- this.education = result.options;
|
|
|
- }
|
|
|
- },
|
|
|
- async getIncome() {
|
|
|
- const result = await getForm({ type: "he_income" });
|
|
|
- if (result.code == 0) {
|
|
|
- this.income = result.options;
|
|
|
- }
|
|
|
- },
|
|
|
- async getMarriage() {
|
|
|
- const result = await getForm({ type: "he_marriage" });
|
|
|
- if (result.code == 0) {
|
|
|
- this.marriage = result.options;
|
|
|
- }
|
|
|
- },
|
|
|
- async getChildren() {
|
|
|
- const result = await getForm({ type: "he_children" });
|
|
|
- if (result.code == 0) {
|
|
|
- this.children = result.options;
|
|
|
- }
|
|
|
- },
|
|
|
- async getAssetHouse() {
|
|
|
- const result = await getForm({ type: "he_asset_house" });
|
|
|
- if (result.code == 0) {
|
|
|
- this.assetHouse = result.options;
|
|
|
- }
|
|
|
- },
|
|
|
- async getAssetHouseArea() {
|
|
|
- const result = await getForm({ type: "he_asset_house_area" });
|
|
|
- if (result.code == 0) {
|
|
|
- this.assetHouseArea = result.options;
|
|
|
- }
|
|
|
- },
|
|
|
- async getAssetHouseLoan() {
|
|
|
- const result = await getForm({ type: "he_asset_house_loan" });
|
|
|
- if (result.code == 0) {
|
|
|
- this.assetHouseLoan = result.options;
|
|
|
- }
|
|
|
- },
|
|
|
- async getAssetCar() {
|
|
|
- const result = await getForm({ type: "he_asset_car" });
|
|
|
- if (result.code == 0) {
|
|
|
- this.assetCar = result.options;
|
|
|
- }
|
|
|
- },
|
|
|
- async getAssetCarValue() {
|
|
|
- const result = await getForm({ type: "he_asset_car_value" });
|
|
|
- if (result.code == 0) {
|
|
|
- this.assetCarValue = result.options;
|
|
|
- }
|
|
|
- },
|
|
|
- async getAssetCarLoan() {
|
|
|
- const result = await getForm({ type: "he_asset_car_loan" });
|
|
|
- if (result.code == 0) {
|
|
|
- this.assetCarLoan = result.options;
|
|
|
- }
|
|
|
- },
|
|
|
- async getControlTime() {
|
|
|
- const result = await getForm({ type: "he_control_time" });
|
|
|
- if (result.code == 0) {
|
|
|
- this.controlTime = result.options;
|
|
|
- }
|
|
|
- },
|
|
|
- async getWorkStatus() {
|
|
|
- const result = await getForm({ type: "he_work_status" });
|
|
|
- if (result.code == 0) {
|
|
|
- this.workStatus = result.options;
|
|
|
- }
|
|
|
- },
|
|
|
- async getCompanyNature() {
|
|
|
- const result = await getForm({ type: "he_company_nature" });
|
|
|
- if (result.code == 0) {
|
|
|
- this.companyNature = result.options;
|
|
|
- this.fatherWork = result.options;
|
|
|
- this.matherWork = result.options;
|
|
|
- }
|
|
|
- },
|
|
|
- async getParents() {
|
|
|
- const result = await getForm({ type: "he_parents" });
|
|
|
- if (result.code == 0) {
|
|
|
- this.parents = result.options;
|
|
|
- }
|
|
|
- },
|
|
|
- async getParentAssets() {
|
|
|
- const result = await getForm({ type: "he_parent_assets" });
|
|
|
- if (result.code == 0) {
|
|
|
- this.parentAssets = result.options;
|
|
|
- }
|
|
|
- },
|
|
|
- async getComposition() {
|
|
|
- const result = await getForm({ type: "he_composition" });
|
|
|
- if (result.code == 0) {
|
|
|
- this.composition = result.options;
|
|
|
- }
|
|
|
- },
|
|
|
- async getSports() {
|
|
|
- const result = await getForm({ type: "he_sports" });
|
|
|
- if (result.code == 0) {
|
|
|
- this.sports = result.options;
|
|
|
- }
|
|
|
- },
|
|
|
- async getHobby() {
|
|
|
- const result = await getForm({ type: "he_hobby" });
|
|
|
- if (result.code == 0) {
|
|
|
- this.hobby = result.options;
|
|
|
- }
|
|
|
- },
|
|
|
- //监测房产改变
|
|
|
- assetHouseChange(val) {
|
|
|
- if (val == 2) {
|
|
|
- this.assetHouseShow = true;
|
|
|
- } else {
|
|
|
- this.assetHouseShow = false;
|
|
|
- }
|
|
|
- },
|
|
|
- //监测车产改变
|
|
|
- assetCarChange(val) {
|
|
|
- if (val == 2) {
|
|
|
- this.assetCarShow = true;
|
|
|
- } else {
|
|
|
- this.assetCarShow = false;
|
|
|
- }
|
|
|
- },
|
|
|
- submitForm(formName) {
|
|
|
- this.$refs[formName].validate(async (valid) => {
|
|
|
- if (valid) {
|
|
|
- console.log(this.ruleForm);
|
|
|
- const submitList = this.ruleForm;
|
|
|
- submitList.controlTime = submitList.controlTime.join(",");
|
|
|
- submitList.workStatus = submitList.workStatus.join(",");
|
|
|
- submitList.composition = submitList.composition.join(",");
|
|
|
- submitList.hobby = submitList.hobby.join(",");
|
|
|
- console.log(submitList, "submitList");
|
|
|
- const res = await postPersonInfo(submitList);
|
|
|
- console.log(res, "提交返回结果");
|
|
|
- if (res.code == 0) {
|
|
|
- this.$message.success("提交成功");
|
|
|
- } else {
|
|
|
- this.$message.error(res.msg);
|
|
|
- }
|
|
|
- } else {
|
|
|
- console.log("error submit!!");
|
|
|
- return false;
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- this.getHeight();
|
|
|
- this.getWeight();
|
|
|
- this.getEducation();
|
|
|
- this.getIncome();
|
|
|
- this.getMarriage();
|
|
|
- this.getChildren();
|
|
|
- this.getAssetHouse();
|
|
|
- this.getAssetHouseArea();
|
|
|
- this.getAssetHouseLoan();
|
|
|
- this.getAssetCar();
|
|
|
- this.getAssetCarValue();
|
|
|
- this.getAssetCarLoan();
|
|
|
- this.getControlTime();
|
|
|
- this.getWorkStatus();
|
|
|
- this.getCompanyNature();
|
|
|
- this.getParents();
|
|
|
- this.getParentAssets();
|
|
|
- this.getComposition();
|
|
|
- this.getSports();
|
|
|
- this.getHobby();
|
|
|
- this.getPersonInfo();
|
|
|
- },
|
|
|
-};
|
|
|
-</script>
|
|
|
-<style scoped>
|
|
|
-.main {
|
|
|
- width: 90%;
|
|
|
- margin: auto 5%;
|
|
|
- text-align: left;
|
|
|
-}
|
|
|
-/deep/.checkbox .el-form-item__label {
|
|
|
- width: 100% !important;
|
|
|
-}
|
|
|
-/deep/.checkbox .el-form-item__content {
|
|
|
- margin-left: 0 !important;
|
|
|
-}
|
|
|
-/deep/.el-input__inner {
|
|
|
- border: 0 !important;
|
|
|
- text-align: right;
|
|
|
- padding-left: 0;
|
|
|
-}
|
|
|
-/deep/.error_info .el-form-item__error {
|
|
|
- margin-left: -200px;
|
|
|
-}
|
|
|
-/deep/.education_error .el-form-item__error {
|
|
|
- margin-left: -210px;
|
|
|
-}
|
|
|
-/deep/.el-checkbox__input {
|
|
|
- display: none;
|
|
|
-}
|
|
|
-/deep/.el-checkbox__label {
|
|
|
- border-radius: 15px;
|
|
|
- border: 1px solid #dcdfe6;
|
|
|
- padding: 5px 12px 4px;
|
|
|
-}
|
|
|
-/deep/.el-checkbox__input.is-checked + .el-checkbox__label {
|
|
|
- background: linear-gradient(to right, #bc65ff, #8973ff);
|
|
|
- color: #fff;
|
|
|
- border: 1px solid #dcdfe6;
|
|
|
- padding: 5px 12px 4px;
|
|
|
-}
|
|
|
-.confirm_button {
|
|
|
- font-size: 18px;
|
|
|
- background: linear-gradient(to right, #bc65ff, #8973ff);
|
|
|
- color: #fff;
|
|
|
- border: none;
|
|
|
- padding: 15px 30px;
|
|
|
- width: 80%;
|
|
|
- margin: 10px 10% 40px;
|
|
|
- border-radius: 25px;
|
|
|
-}
|
|
|
-/* @media (min-device-width : 375px) and (max-device-width : 667px) and (-webkit-min-device-pixel-ratio : 2){
|
|
|
-
|
|
|
-.elForm .el-form-item__label{width: 190px;}
|
|
|
-
|
|
|
-} */
|
|
|
-</style>
|