|
@@ -0,0 +1,408 @@
|
|
|
+<template>
|
|
|
+ <div class="main">
|
|
|
+ <el-form
|
|
|
+ label-position="left"
|
|
|
+ :model="ruleForm"
|
|
|
+ :rules="rules"
|
|
|
+ ref="ruleForm"
|
|
|
+ label-width="250px"
|
|
|
+ >
|
|
|
+ <el-form-item label="咋联系你呢" prop="phone">
|
|
|
+ <el-input v-model="ruleForm.phone" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="你得有一米八吧" prop="height" label-width="240px">
|
|
|
+ <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">
|
|
|
+ <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">
|
|
|
+ <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">
|
|
|
+ <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">
|
|
|
+ <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">
|
|
|
+ <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">
|
|
|
+ <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">
|
|
|
+ <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">
|
|
|
+ <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">
|
|
|
+ <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">
|
|
|
+ <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">
|
|
|
+ <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="controlTime"
|
|
|
+ >
|
|
|
+ <el-checkbox-group v-model="ruleForm.controlTime">
|
|
|
+ <el-checkbox
|
|
|
+ v-for="(item, i) in controlTime"
|
|
|
+ :key="i"
|
|
|
+ :label="item"
|
|
|
+ ></el-checkbox>
|
|
|
+ </el-checkbox-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ label="卖命主旋律(多选)"
|
|
|
+ prop="workStatus"
|
|
|
+ class="workStatus"
|
|
|
+ >
|
|
|
+ <el-checkbox-group v-model="ruleForm.workStatus">
|
|
|
+ <el-checkbox
|
|
|
+ v-for="(item, i) in workStatus"
|
|
|
+ :key="i"
|
|
|
+ :label="item"
|
|
|
+ ></el-checkbox>
|
|
|
+ </el-checkbox-group>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="submitForm('ruleForm')"
|
|
|
+ >立即创建</el-button
|
|
|
+ >
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+// import tabbaar from '../components/tabbar'
|
|
|
+import { getForm ,getPersonInfo} 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: [], //跟父母一起住
|
|
|
+ controlTime: ["43355654", "15gf11", "1df11"], //空闲时间
|
|
|
+ workStatus: ["0000", "1111", "保护壳"], //工作状态
|
|
|
+ companyNature: [], //公司性质
|
|
|
+ company: [], //公司名
|
|
|
+ parents: [], //父母状态
|
|
|
+ fatherWork: [], //
|
|
|
+ matherWork: [],
|
|
|
+ parentAssets: [], //父母资产
|
|
|
+ composition: [], //兄弟姐妹
|
|
|
+ motionState: [], //星座
|
|
|
+ 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: "", //兄弟姐妹
|
|
|
+ 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",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+
|
|
|
+ },
|
|
|
+ };
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ 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) {
|
|
|
+ console.log(result);
|
|
|
+ this.assetHouse = result.options
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async getAssetHouseArea() {
|
|
|
+ const result = await getForm({ type: "he_asset_house_area" });
|
|
|
+ if (result.code == 0) {
|
|
|
+ console.log(result);
|
|
|
+ this.assetHouseArea = result.options
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async getAssetCar() {
|
|
|
+ const result = await getForm({ type: "he_asset_car" });
|
|
|
+ if (result.code == 0) {
|
|
|
+ console.log(result);
|
|
|
+ this.assetCar = result.options
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ async getPersonInfo(){
|
|
|
+ const result = await getPersonInfo();
|
|
|
+ console.log(result.info,'222')
|
|
|
+ if (result.info.height) {
|
|
|
+ this.ruleForm=result.info
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //监测房产
|
|
|
+ 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((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ alert('submit!');
|
|
|
+ } 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.getAssetCar();
|
|
|
+ this.getPersonInfo();
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style scoped>
|
|
|
+.main {
|
|
|
+ width: 90%;
|
|
|
+ margin: auto 5%;
|
|
|
+}
|
|
|
+/deep/.controlTime .el-form-item__label {
|
|
|
+ width: 100% !important;
|
|
|
+}
|
|
|
+/deep/.controlTime .el-form-item__content {
|
|
|
+ margin-left: 0 !important;
|
|
|
+}
|
|
|
+/deep/.workStatus .el-form-item__label {
|
|
|
+ width: 100% !important;
|
|
|
+}
|
|
|
+/deep/.workStatus .el-form-item__content {
|
|
|
+ margin-left: 0 !important;
|
|
|
+}
|
|
|
+/deep/.el-input__inner {
|
|
|
+ border: 0 !important;
|
|
|
+}
|
|
|
+/deep/.el-form-item__error {
|
|
|
+ margin-left: -250px;
|
|
|
+}
|
|
|
+</style>
|