init
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="用户类型" prop="userType">
|
||||
<el-select v-model="form.userType" clearable size="small" style="width: 95%">
|
||||
<el-form-item label="用户类型" prop="type">
|
||||
<el-select v-model="form.type" clearable size="small" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in appUserTypeList"
|
||||
:key="dict.value"
|
||||
@@ -208,7 +208,7 @@ export default {
|
||||
avatar: undefined,
|
||||
nickname: undefined,
|
||||
mobile: undefined,
|
||||
userType: undefined,
|
||||
type: undefined,
|
||||
},
|
||||
rules:{
|
||||
annualIncome: [
|
||||
@@ -250,7 +250,7 @@ export default {
|
||||
mobile: [
|
||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||
],
|
||||
userType: [
|
||||
type: [
|
||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="id" prop="id">
|
||||
<el-input
|
||||
v-model="queryParams.id"
|
||||
placeholder="请输入用户编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户编号" prop="usercode">
|
||||
<el-input
|
||||
v-model="queryParams.usercode"
|
||||
@@ -50,17 +42,6 @@
|
||||
v-hasPermi="['xq:user:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['xq:user:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
@@ -141,7 +122,8 @@
|
||||
|
||||
<bind-invite-dialog v-if="bindInviteDialogVisible" ref="bindInviteDialog" @refreshDataList="getList" />
|
||||
<user-info-dialog v-if="userInfoDialogVisible" ref="userInfoDialog" />
|
||||
<add-user-dialog v-if="addUserDialogVisible" ref="addUserDialog" />
|
||||
<add-user-dialog v-if="addUserDialogVisible" ref="addUserDialog" @refreshDataList="getList" />
|
||||
<update-user-dialog v-if="updateUserDialogVisible" ref="updateUserDialog" @refreshDataList="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -161,16 +143,18 @@ import { appUserTypeList, genderList, userStatusList } from '@/constant/statusMa
|
||||
import BindInviteDialog from '@/views/xq/user/bind-invite-dialog.vue'
|
||||
import UserInfoDialog from '@/views/xq/user/user-info-dialog.vue'
|
||||
import AddUserDialog from '@/views/xq/user/add-user-dialog.vue'
|
||||
import UpdateUserDialog from '@/views/xq/user/update-user-dialog.vue'
|
||||
|
||||
export default {
|
||||
name: "User",
|
||||
components: { BindInviteDialog,UserInfoDialog,AddUserDialog},
|
||||
components: { BindInviteDialog,UserInfoDialog,AddUserDialog,UpdateUserDialog},
|
||||
data() {
|
||||
return {
|
||||
userStatusList,genderList,appUserTypeList,
|
||||
bindInviteDialogVisible: false,
|
||||
userInfoDialogVisible: false,
|
||||
addUserDialogVisible: false,
|
||||
updateUserDialogVisible: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
@@ -234,7 +218,10 @@ export default {
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
|
||||
this.updateUserDialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.updateUserDialog.init(row)
|
||||
})
|
||||
},
|
||||
handleInfo(row) {
|
||||
this.userInfoDialogVisible = true
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<el-dialog title="新增用户" :close-on-click-modal="false" :visible.sync="open" width="800px" append-to-body>
|
||||
<el-dialog title="修改用户" :close-on-click-modal="false" :visible.sync="open" width="800px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="用户类型" prop="userType">
|
||||
<el-select v-model="form.userType" clearable size="small" style="width: 95%">
|
||||
<el-form-item label="用户类型" prop="cardNumAuth">
|
||||
<el-select v-model="form.cardNumAuth" clearable size="small" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in appUserTypeList"
|
||||
:key="dict.value"
|
||||
@@ -208,7 +208,7 @@ export default {
|
||||
avatar: undefined,
|
||||
nickname: undefined,
|
||||
mobile: undefined,
|
||||
userType: undefined,
|
||||
type: undefined,
|
||||
},
|
||||
rules:{
|
||||
annualIncome: [
|
||||
@@ -250,7 +250,7 @@ export default {
|
||||
mobile: [
|
||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||
],
|
||||
userType: [
|
||||
type: [
|
||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
@@ -281,7 +281,7 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['form'].resetFields();
|
||||
getUser(row.id).then(response => {
|
||||
this.areaOption = response.data
|
||||
this.form = response.data
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
@@ -155,34 +155,44 @@
|
||||
<el-collapse-item title="择偶条件" name="filter">
|
||||
<el-descriptions :contentStyle="CS" :label-style="LS " class="margin-top" :column="3" size="medium" border>
|
||||
<el-descriptions-item label="择偶条件-年龄">
|
||||
{{info.userInfo.filterAge}}
|
||||
<span v-if="!info.userInfo.filterAge">不限</span>
|
||||
<span v-if="info.userInfo.filterAge">{{info.userInfo.filterAge}}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="择偶条件-身高">
|
||||
{{info.userInfo.filterHeight}}
|
||||
<span v-if="!info.userInfo.filterHeight">不限</span>
|
||||
<span v-if="info.userInfo.filterHeight">{{info.userInfo.filterHeight}}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="择偶条件-体型">
|
||||
<cai-dict-tag :options="userSomatotypeList" :value="info.userInfo.filterSomatotype" empty-value="-" split-value="&"/>
|
||||
<span v-if="!info.userInfo.filterSomatotype">不限</span>
|
||||
<cai-dict-tag v-if="info.userInfo.filterSomatotype" :options="userSomatotypeList" :value="info.userInfo.filterSomatotype" empty-value="-" split-value="&"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="择偶条件-婚况">
|
||||
<cai-dict-tag :options="userMarriageList" :value="info.userInfo.filterMarriage" empty-value="-" split-value="&"/>
|
||||
<span v-if="!info.userInfo.filterMarriage">不限</span>
|
||||
<cai-dict-tag v-if="info.userInfo.filterMarriage" :options="userMarriageList" :value="info.userInfo.filterMarriage" empty-value="-" split-value="&"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="择偶条件-学历">
|
||||
<cai-dict-tag :options="userEducationList" :value="info.userInfo.filterEducation" />
|
||||
<span v-if="!info.userInfo.filterEducation">不限</span>
|
||||
<cai-dict-tag v-if="info.userInfo.filterEducation" :options="userEducationList" :value="info.userInfo.filterEducation" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="择偶条件-地区">
|
||||
{{info.userInfo.filterResidence}}
|
||||
<span v-if="!info.userInfo.filterResidence">不限</span>
|
||||
<span v-if="info.userInfo.filterResidence">{{info.userInfo.filterResidence}}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="择偶条件-年收入">
|
||||
<cai-dict-tag :options="userAnnualIncomeList" :value="info.userInfo.filterAnnualIncome" />
|
||||
<span v-if="!info.userInfo.filterAnnualIncome">不限</span>
|
||||
<cai-dict-tag v-if="info.userInfo.filterAnnualIncome" :options="userAnnualIncomeList" :value="info.userInfo.filterAnnualIncome" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="择偶条件-小孩情况">
|
||||
<cai-dict-tag :options="userChildStatusList" :value="info.userInfo.filterChildStatus" />
|
||||
<span v-if="!info.userInfo.filterChildStatus">不限</span>
|
||||
<cai-dict-tag v-if="info.userInfo.filterChildStatus" :options="userChildStatusList" :value="info.userInfo.filterChildStatus" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="择偶条件-住房情况">
|
||||
<cai-dict-tag :options="userHousingStatusList" :value="info.userInfo.filterHousingStatus" />
|
||||
<span v-if="!info.userInfo.filterHousingStatus">不限</span>
|
||||
<cai-dict-tag v-if="info.userInfo.filterHousingStatus" :options="userHousingStatusList" :value="info.userInfo.filterHousingStatus" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="择偶条件-购车情况">
|
||||
<cai-dict-tag :options="userCarStatusList" :value="info.userInfo.filterCarStatus" />
|
||||
<span v-if="!info.userInfo.filterCarStatus">不限</span>
|
||||
<cai-dict-tag v-if="info.userInfo.filterCarStatus" :options="userCarStatusList" :value="info.userInfo.filterCarStatus" />
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-collapse-item>
|
||||
|
||||
@@ -3,26 +3,26 @@
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="用户编号" prop="usercode">
|
||||
<el-input
|
||||
v-model="queryParams.usercode"
|
||||
placeholder="请输入用户编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
v-model="queryParams.usercode"
|
||||
placeholder="请输入用户编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="昵称" prop="nickname">
|
||||
<el-input
|
||||
v-model="queryParams.nickname"
|
||||
placeholder="请输入昵称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
v-model="queryParams.nickname"
|
||||
placeholder="请输入昵称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="mobile">
|
||||
<el-input
|
||||
v-model="queryParams.mobile"
|
||||
placeholder="请输入手机号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
v-model="queryParams.mobile"
|
||||
placeholder="请输入手机号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@@ -31,86 +31,77 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['xq:userAuth:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="userAuthList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="用户编号" align="center" prop="usercode" />
|
||||
<el-table-column label="用户编号" align="center" prop="usercode"/>
|
||||
<el-table-column label="昵称" align="center" prop="nickname" show-overflow-tooltip/>
|
||||
<el-table-column label="手机号" align="center" prop="mobile" width="100"/>
|
||||
<el-table-column label="头像" align="center" prop="avatar" >
|
||||
<el-table-column label="头像" align="center" prop="avatar">
|
||||
<template v-slot="scope">
|
||||
<image-avatar :src="scope.row.avatar"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实名认证" align="center" prop="cardNumAuth" >
|
||||
<el-table-column label="认证情况" align="center" prop="alreadyAuthNum">
|
||||
<template v-slot="scope">
|
||||
<cai-dict-tag :options="userAuthStatusList" :value="scope.row.cardNumAuth" />
|
||||
{{scope.row.alreadyAuthNum}}/8
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实名认证" align="center" prop="cardNumAuth">
|
||||
<template v-slot="scope">
|
||||
<cai-dict-tag :options="userAuthStatusList" :value="scope.row.cardNumAuth"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="手机认证" align="center" prop="phoneAuth">
|
||||
<template v-slot="scope">
|
||||
<cai-dict-tag :options="userAuthStatusList" :value="scope.row.phoneAuth" />
|
||||
<cai-dict-tag :options="userAuthStatusList" :value="scope.row.phoneAuth"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单身认证" align="center" prop="singlePersonAuth" >
|
||||
<el-table-column label="单身认证" align="center" prop="singlePersonAuth">
|
||||
<template v-slot="scope">
|
||||
<cai-dict-tag :options="userAuthStatusList" :value="scope.row.singlePersonAuth" />
|
||||
<cai-dict-tag :options="userAuthStatusList" :value="scope.row.singlePersonAuth"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="学历认证" align="center" prop="educationAuth" >
|
||||
<el-table-column label="学历认证" align="center" prop="educationAuth">
|
||||
<template v-slot="scope">
|
||||
<cai-dict-tag :options="userAuthStatusList" :value="scope.row.educationAuth" />
|
||||
<cai-dict-tag :options="userAuthStatusList" :value="scope.row.educationAuth"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工作认证" align="center" prop="jobAuth" >
|
||||
<el-table-column label="工作认证" align="center" prop="jobAuth">
|
||||
<template v-slot="scope">
|
||||
<cai-dict-tag :options="userAuthStatusList" :value="scope.row.jobAuth" />
|
||||
<cai-dict-tag :options="userAuthStatusList" :value="scope.row.jobAuth"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="车辆认证" align="center" prop="carAuth" >
|
||||
<el-table-column label="车辆认证" align="center" prop="carAuth">
|
||||
<template v-slot="scope">
|
||||
<cai-dict-tag :options="userAuthStatusList" :value="scope.row.carAuth" />
|
||||
<cai-dict-tag :options="userAuthStatusList" :value="scope.row.carAuth"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="房子认证" align="center" prop="houseAuth" >
|
||||
<el-table-column label="房子认证" align="center" prop="houseAuth">
|
||||
<template v-slot="scope">
|
||||
<cai-dict-tag :options="userAuthStatusList" :value="scope.row.houseAuth" />
|
||||
<cai-dict-tag :options="userAuthStatusList" :value="scope.row.houseAuth"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="婚况认证" align="center" prop="marriageAuth" >
|
||||
<el-table-column label="婚况认证" align="center" prop="marriageAuth">
|
||||
<template v-slot="scope">
|
||||
<cai-dict-tag :options="userAuthStatusList" :value="scope.row.marriageAuth" />
|
||||
<cai-dict-tag :options="userAuthStatusList" :value="scope.row.marriageAuth"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-info"
|
||||
@click="handleInfo(scope.row)"
|
||||
>详情</el-button>
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-info"
|
||||
@click="handleInfo(scope.row)"
|
||||
>详情
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['xq:userAuth:edit']"
|
||||
>修改</el-button>
|
||||
>修改
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -123,18 +114,25 @@
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<user-auth-info-dialog v-if="userAuthInfoDialogVisible" ref="userAuthInfoDialog"/>
|
||||
<update-user-auth-dialog v-if="updateUserAuthDialogVisible" ref="updateUserAuthDialog" @refreshDataList="getList"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listUserAuth } from '@/api/xq/userAuth'
|
||||
import { userAuthStatusList } from '@/constant/statusMap'
|
||||
import UserAuthInfoDialog from '@/views/xq/userAuth/user-auth-info-dialog.vue'
|
||||
import UpdateUserAuthDialog from '@/views/xq/userAuth/update-user-auth-dialog.vue'
|
||||
|
||||
export default {
|
||||
name: "UserAuth",
|
||||
name: 'UserAuth',
|
||||
components: { UserAuthInfoDialog, UpdateUserAuthDialog },
|
||||
data() {
|
||||
return {
|
||||
userAuthStatusList,
|
||||
userAuthInfoDialogVisible: false,
|
||||
updateUserAuthDialogVisible: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
@@ -155,39 +153,52 @@ export default {
|
||||
pageSize: 10,
|
||||
nickname: undefined,
|
||||
usercode: undefined,
|
||||
mobile: undefined,
|
||||
},
|
||||
};
|
||||
mobile: undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
/** 查询用户认证管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.loading = true
|
||||
listUserAuth(this.queryParams).then(response => {
|
||||
this.userAuthList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
this.userAuthList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.updateUserAuthDialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.updateUserAuthDialog.init(row)
|
||||
})
|
||||
},
|
||||
handleInfo(row) {
|
||||
this.userAuthInfoDialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.userAuthInfoDialog.init(row)
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
211
src/views/xq/userAuth/update-user-auth-dialog.vue
Normal file
211
src/views/xq/userAuth/update-user-auth-dialog.vue
Normal file
@@ -0,0 +1,211 @@
|
||||
<template>
|
||||
<el-dialog title="修改用户认证" :close-on-click-modal="false" :visible.sync="open" width="800px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="用户编号" prop="usercode">
|
||||
<el-input disabled v-model="form.usercode"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户手机" prop="mobile">
|
||||
<el-input disabled v-model="form.mobile"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="实名认证" prop="cardNumAuth">
|
||||
<el-select v-model="form.cardNumAuth" clearable size="small" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in userAuthStatusList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单身认证" prop="singlePersonAuth">
|
||||
<el-select v-model="form.singlePersonAuth" clearable size="small" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in userAuthStatusList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="学历认证" prop="educationAuth">
|
||||
<el-select v-model="form.educationAuth" clearable size="small" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in userAuthStatusList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="工作认证" prop="jobAuth">
|
||||
<el-select v-model="form.jobAuth" clearable size="small" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in userAuthStatusList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆认证" prop="carAuth">
|
||||
<el-select v-model="form.carAuth" clearable size="small" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in userAuthStatusList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="房子认证" prop="houseAuth">
|
||||
<el-select v-model="form.houseAuth" clearable size="small" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in userAuthStatusList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="婚况认证" prop="marriageAuth">
|
||||
<el-select v-model="form.marriageAuth" clearable size="small" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in userAuthStatusList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="open = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
appUserTypeList,
|
||||
booleanList,
|
||||
finishStatusList,
|
||||
genderList,
|
||||
memberTypeList,
|
||||
onlineStatusList,
|
||||
professionList,
|
||||
userAnnualIncomeList, userAuthStatusList,
|
||||
userCarStatusList,
|
||||
userChildStatusList,
|
||||
userCompanyNatureList,
|
||||
userDrinkStatusList,
|
||||
userEducationList,
|
||||
userFamilyBackgroundList,
|
||||
userFamilyRankingList,
|
||||
userFindTagList,
|
||||
userForPersonalsList,
|
||||
userHousingStatusList,
|
||||
userLiveAtParentList,
|
||||
userLoveAtDistanceList,
|
||||
userMarriageList,
|
||||
userSignList,
|
||||
userSmokeStatusList,
|
||||
userSomatotypeList,
|
||||
userStatusList,
|
||||
userWantChildList,
|
||||
userWhenMarriageList,
|
||||
userZodiacList,
|
||||
videoStatusList
|
||||
} from '@/constant/statusMap'
|
||||
import Treeselect from '@riophae/vue-treeselect'
|
||||
import { getTreeAreaCode } from '@/api/xq/areaCode'
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import { addBanner } from '@/api/xq/banner'
|
||||
import { addUser, getUser, updateUser } from '@/api/xq/user'
|
||||
import { getUserAuth, updateUserAuth } from '@/api/xq/userAuth'
|
||||
|
||||
export default {
|
||||
name: "UserInfo",
|
||||
components: { Treeselect },
|
||||
data() {
|
||||
return {
|
||||
userAuthStatusList,
|
||||
booleanList,
|
||||
open:false,
|
||||
buttonLoading: false,
|
||||
form:{
|
||||
id: undefined,
|
||||
mobile: undefined,
|
||||
usercode: undefined,
|
||||
cardNumAuth: undefined,
|
||||
singlePersonAuth: undefined,
|
||||
educationAuth: undefined,
|
||||
jobAuth: undefined,
|
||||
carAuth: undefined,
|
||||
houseAuth: undefined,
|
||||
marriageAuth: undefined,
|
||||
},
|
||||
rules:{
|
||||
cardNumAuth: [
|
||||
{ required: true, message: "数据不能为空", trigger: "change" }
|
||||
],
|
||||
singlePersonAuth: [
|
||||
{ required: true, message: "数据不能为空", trigger: "change" }
|
||||
],
|
||||
educationAuth: [
|
||||
{ required: true, message: "数据不能为空", trigger: "change" }
|
||||
],
|
||||
jobAuth: [
|
||||
{ required: true, message: "数据不能为空", trigger: "change" }
|
||||
],
|
||||
carAuth: [
|
||||
{ required: true, message: "数据不能为空", trigger: "change" }
|
||||
],
|
||||
houseAuth: [
|
||||
{ required: true, message: "数据不能为空", trigger: "change" }
|
||||
],
|
||||
marriageAuth: [
|
||||
{ required: true, message: "数据不能为空", trigger: "change" }
|
||||
],
|
||||
},
|
||||
areaOption: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
normalizer(node){
|
||||
return {
|
||||
id: node.id,
|
||||
label: node.label,
|
||||
children: node.children && node.children.length > 0 ? node.children : 0,
|
||||
}
|
||||
},
|
||||
init(row){
|
||||
this.form.id = row.id
|
||||
this.open = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs['form'].resetFields();
|
||||
getUserAuth(row.id).then(response => {
|
||||
let userAuth = response.data.userAuth;
|
||||
let user = response.data.user;
|
||||
this.form = userAuth;
|
||||
this.form.nickname = user.nickname
|
||||
this.form.mobile = user.mobile
|
||||
this.form.usercode = user.usercode
|
||||
})
|
||||
})
|
||||
},
|
||||
submitForm(){
|
||||
updateUserAuth(this.form).then(data => {
|
||||
this.$modal.msgSuccess("新增用户成功");
|
||||
this.buttonLoading = false;
|
||||
this.open = false
|
||||
this.$emit('refreshDataList')
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
127
src/views/xq/userAuth/user-auth-info-dialog.vue
Normal file
127
src/views/xq/userAuth/user-auth-info-dialog.vue
Normal file
@@ -0,0 +1,127 @@
|
||||
<template>
|
||||
<el-dialog title="用户信息" :close-on-click-modal="false" :visible.sync="open" width="1200px" append-to-body>
|
||||
<el-descriptions :contentStyle="CS" :label-style="LS " class="margin-top" :column="3" size="medium" border>
|
||||
<el-descriptions-item label="编号">
|
||||
{{info.user.usercode}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="昵称">
|
||||
{{info.user.nickname}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="头像">
|
||||
<image-avatar :src="info.user.avatar" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="实名认证">
|
||||
<cai-dict-tag :options="userAuthStatusList" :value="info.userAuth.cardNumAuth" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="实名认证-信息" :span="2">
|
||||
<span v-if="info.userAuth.cardNumAuth !== 2">-</span>
|
||||
<span v-if="info.userAuth.cardNumAuth === 2">
|
||||
身份证:{{info.userAuth.cardNumName}}
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="手机认证">
|
||||
<cai-dict-tag :options="userAuthStatusList" :value="info.userAuth.phoneAuth" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="手机号" :span="2">
|
||||
{{info.user.mobile}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="单身认证">
|
||||
<cai-dict-tag :options="userAuthStatusList" :value="info.userAuth.singlePersonAuth" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="单身认证-信息" :span="2">
|
||||
<!-- <image-preview :src="user.userAuth.url" height="45px" width="45px" />-->
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="学历认证">
|
||||
<cai-dict-tag :options="userAuthStatusList" :value="info.userAuth.educationAuth" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="学历认证-信息" :span="2">
|
||||
<span v-if="info.userAuth.educationAuth !== 2">-</span>
|
||||
<image-preview v-if="info.userAuth.educationAuth === 2" :src="info.userAuth.educationPic" height="45px" width="45px" />
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="工作认证">
|
||||
<cai-dict-tag :options="userAuthStatusList" :value="info.userAuth.jobAuth" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="工作认证-信息" :span="2">
|
||||
<span v-if="info.userAuth.jobAuth !== 2">-</span>
|
||||
<image-preview v-if="info.userAuth.jobAuth === 2" :src="info.userAuth.jobPic" height="45px" width="45px" />
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="车辆认证">
|
||||
<cai-dict-tag :options="userAuthStatusList" :value="info.userAuth.carAuth" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="车辆认证-信息" :span="2">
|
||||
<span v-if="info.userAuth.carAuth !== 2">-</span>
|
||||
<image-preview v-if="info.userAuth.carAuth === 2" :src="info.userAuth.carPic" height="45px" width="45px" />
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="房子认证">
|
||||
<cai-dict-tag :options="userAuthStatusList" :value="info.userAuth.houseAuth" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="房子认证-信息" :span="2">
|
||||
<span v-if="info.userAuth.houseAuth !== 2">-</span>
|
||||
<image-preview v-if="info.userAuth.houseAuth === 2" :src="info.userAuth.housePic" height="45px" width="45px" />
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="婚况认证">
|
||||
<cai-dict-tag :options="userAuthStatusList" :value="info.userAuth.marriageAuth" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="婚况认证-信息" :span="2">
|
||||
<span v-if="info.userAuth.marriageAuth !== 2">-</span>
|
||||
<image-preview v-if="info.userAuth.marriageAuth === 2" :src="info.userAuth.marriagePic" height="45px" width="45px" />
|
||||
</el-descriptions-item>
|
||||
|
||||
</el-descriptions>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { userAuthStatusList } from '@/constant/statusMap'
|
||||
import { getUserAuth } from '@/api/xq/userAuth'
|
||||
|
||||
export default {
|
||||
name: "UserInfo",
|
||||
data() {
|
||||
return {
|
||||
userAuthStatusList,
|
||||
activeName:['base','account','userAlbums'],
|
||||
CS: {
|
||||
'text-align': 'center', //文本居中
|
||||
'min-width': '250px', //最小宽度
|
||||
'word-break': 'break-all' //过长时自动换行
|
||||
},
|
||||
LS: {
|
||||
// 'color': '#000',
|
||||
'text-align': 'center',
|
||||
// 'font-weight': '600',
|
||||
'height': '40px',
|
||||
// 'background-color': 'rgba(255, 97, 2, 0.1)',
|
||||
'min-width': '110px',
|
||||
'word-break': 'keep-all'
|
||||
},
|
||||
open:false,
|
||||
info:{},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
init(row){
|
||||
this.open = true;
|
||||
getUserAuth(row.id).then(response => {
|
||||
this.info = response.data;
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.el-row {
|
||||
margin-bottom: -15px;
|
||||
display: flex;
|
||||
flex-wrap: wrap
|
||||
}
|
||||
</style>
|
||||
@@ -47,7 +47,6 @@
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="userInfoList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="用户编号" align="center" prop="usercode" />
|
||||
<el-table-column label="昵称" align="center" prop="nickname" show-overflow-tooltip/>
|
||||
<el-table-column label="手机号" align="center" prop="mobile" width="100"/>
|
||||
@@ -176,42 +175,52 @@
|
||||
<el-table-column label="兴趣爱好" align="center" prop="hobbys" />
|
||||
</el-table-column>
|
||||
<el-table-column label="择偶条件" align="center" >
|
||||
<el-table-column label="年龄" align="center" prop="filterAge" />
|
||||
<el-table-column label="身高" align="center" prop="filterHeight" />
|
||||
<el-table-column label="年龄" align="center" prop="filterAge" >
|
||||
<template v-slot="scope">
|
||||
<span v-if="!scope.row.filterAge">不限</span>
|
||||
<span v-if="scope.row.filterAge">{{scope.row.filterAge}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="身高" align="center" prop="filterHeight" >
|
||||
<template v-slot="scope">
|
||||
<span v-if="!scope.row.filterHeight">不限</span>
|
||||
<span v-if="scope.row.filterHeight">{{scope.row.filterHeight}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="体型" align="center" prop="filterSomatotype" >
|
||||
<template v-slot="scope">
|
||||
<cai-dict-tag :options="userSomatotypeList" :value="scope.row.filterSomatotype" empty-value="-" split-value="&"/>
|
||||
<cai-dict-tag :options="userSomatotypeList" :value="scope.row.filterSomatotype" empty-value="不限" split-value="&"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="婚况" align="center" prop="filterMarriage" >
|
||||
<template v-slot="scope">
|
||||
<cai-dict-tag :options="userMarriageList" :value="scope.row.filterMarriage" empty-value="-" split-value="&"/>
|
||||
<cai-dict-tag :options="userMarriageList" :value="scope.row.filterMarriage" empty-value="不限" split-value="&"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="学历" align="center" prop="filterEducation" >
|
||||
<template v-slot="scope">
|
||||
<cai-dict-tag :options="userEducationList" :value="scope.row.filterEducation" empty-value="-" split-value="&"/>
|
||||
<cai-dict-tag :options="userEducationList" :value="scope.row.filterEducation" empty-value="不限" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="地区" align="center" prop="filterResidenceName" />-->
|
||||
<el-table-column label="年收入" align="center" prop="filterAnnualIncome" >
|
||||
<template v-slot="scope">
|
||||
<cai-dict-tag :options="userAnnualIncomeList" :value="scope.row.filterAnnualIncome" empty-value="-" split-value="&"/>
|
||||
<cai-dict-tag :options="userAnnualIncomeList" :value="scope.row.filterAnnualIncome" empty-value="不限" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="小孩情况" align="center" prop="filterChildStatus" >
|
||||
<template v-slot="scope">
|
||||
<cai-dict-tag :options="userChildStatusList" :value="scope.row.filterChildStatus" empty-value="-" split-value="&"/>
|
||||
<cai-dict-tag :options="userChildStatusList" :value="scope.row.filterChildStatus" empty-value="不限"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="住房情况" align="center" prop="filterHousingStatus" >
|
||||
<template v-slot="scope">
|
||||
<cai-dict-tag :options="userHousingStatusList" :value="scope.row.filterHousingStatus" empty-value="-" split-value="&"/>
|
||||
<cai-dict-tag :options="userHousingStatusList" :value="scope.row.filterHousingStatus" empty-value="不限" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="购车情况" align="center" prop="filterCarStatus" >
|
||||
<template v-slot="scope">
|
||||
<cai-dict-tag :options="userCarStatusList" :value="scope.row.filterCarStatus" empty-value="-" split-value="&"/>
|
||||
<cai-dict-tag :options="userCarStatusList" :value="scope.row.filterCarStatus" empty-value="不限" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
@@ -220,9 +229,13 @@
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-info"
|
||||
@click="handleInfo(scope.row)"
|
||||
>详情</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -234,21 +247,44 @@
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<user-info-dialog v-if="userInfoDialogVisible" ref="userInfoDialog" />
|
||||
<update-user-info-dialog v-if="updateUserInfoDialogVisible" ref="updateUserInfoDialog" @refreshDataList="getList" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listUserInfo, getUserInfo, delUserInfo, addUserInfo, updateUserInfo } from "@/api/xq/userInfo";
|
||||
import { listUserInfo } from '@/api/xq/userInfo'
|
||||
import {
|
||||
genderList, userCarStatusList, userChildStatusList, userCompanyNatureList, userDrinkStatusList,
|
||||
userEducationList, userFamilyBackgroundList, userFamilyRankingList, userForPersonalsList, userHousingStatusList,
|
||||
userLiveAtParentList, userLoveAtDistanceList, userSmokeStatusList,
|
||||
userSomatotypeList, userMarriageList, userAnnualIncomeList, userZodiacList,
|
||||
userWantChildList, userWhenMarriageList, userFindTagList, userSignList
|
||||
genderList,
|
||||
userAnnualIncomeList,
|
||||
userCarStatusList,
|
||||
userChildStatusList,
|
||||
userCompanyNatureList,
|
||||
userDrinkStatusList,
|
||||
userEducationList,
|
||||
userFamilyBackgroundList,
|
||||
userFamilyRankingList,
|
||||
userFindTagList,
|
||||
userForPersonalsList,
|
||||
userHousingStatusList,
|
||||
userLiveAtParentList,
|
||||
userLoveAtDistanceList,
|
||||
userMarriageList,
|
||||
userSignList,
|
||||
userSmokeStatusList,
|
||||
userSomatotypeList,
|
||||
userWantChildList,
|
||||
userWhenMarriageList,
|
||||
userZodiacList
|
||||
} from '@/constant/statusMap'
|
||||
import UserInfoDialog from '@/views/xq/user/user-info-dialog.vue'
|
||||
import UpdateUserInfoDialog from '@/views/xq/userInfo/update-user-info-dialog.vue'
|
||||
|
||||
export default {
|
||||
name: "UserInfo",
|
||||
components: { UpdateUserInfoDialog, UserInfoDialog },
|
||||
data() {
|
||||
return {
|
||||
genderList,userCarStatusList, userChildStatusList, userCompanyNatureList, userDrinkStatusList,
|
||||
@@ -256,6 +292,8 @@ export default {
|
||||
userLiveAtParentList, userLoveAtDistanceList, userSmokeStatusList,
|
||||
userSomatotypeList,userMarriageList,userAnnualIncomeList,userZodiacList,
|
||||
userWantChildList, userWhenMarriageList,userFindTagList,userSignList,
|
||||
updateUserInfoDialogVisible: false,
|
||||
userInfoDialogVisible: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
@@ -334,6 +372,18 @@ export default {
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
handleInfo(row) {
|
||||
this.userInfoDialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.userInfoDialog.init(row.userId)
|
||||
})
|
||||
},
|
||||
handleUpdate(row){
|
||||
this.updateUserInfoDialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.updateUserInfoDialog.init(row)
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
432
src/views/xq/userInfo/update-user-info-dialog.vue
Normal file
432
src/views/xq/userInfo/update-user-info-dialog.vue
Normal file
@@ -0,0 +1,432 @@
|
||||
<template>
|
||||
<el-dialog title="新增用户" :close-on-click-modal="false" :visible.sync="open" width="800px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="手机号" prop="mobile">
|
||||
<el-input v-model="form.mobile" maxlength="11" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="昵称" prop="nickname">
|
||||
<el-input v-model="form.nickname" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="职业" prop="profession">
|
||||
<el-select v-model="form.profession" clearable size="small" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in professionList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="年收入" prop="annualIncome">
|
||||
<el-select v-model="form.annualIncome" clearable size="small" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in userAnnualIncomeList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="体型" prop="somatotype">
|
||||
<el-select v-model="form.somatotype" clearable size="small" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in userSomatotypeList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="生肖" prop="zodiac">
|
||||
<el-select v-model="form.zodiac" clearable size="small" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in userZodiacList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="星座" prop="sign">
|
||||
<el-select v-model="form.sign" clearable size="small" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in userSignList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="公司性质" prop="companyNature">
|
||||
<el-select v-model="form.companyNature" clearable size="small" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in userCompanyNatureList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="为谁征婚" prop="forPersonals">
|
||||
<el-select v-model="form.forPersonals" clearable size="small" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in userForPersonalsList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="名族" prop="nation">
|
||||
<el-input v-model="form.nation"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="住房情况" prop="housingStatus">
|
||||
<el-select v-model="form.housingStatus" clearable size="small" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in userHousingStatusList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="购车情况" prop="carStatus">
|
||||
<el-select v-model="form.carStatus" clearable size="small" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in userCarStatusList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否吸烟" prop="smokeStatus">
|
||||
<el-select v-model="form.smokeStatus" clearable size="small" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in userSmokeStatusList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否喝酒" prop="drinkStatus">
|
||||
<el-select v-model="form.drinkStatus" clearable size="small" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in userDrinkStatusList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="有没有小孩" prop="childStatus">
|
||||
<el-select v-model="form.childStatus" clearable size="small" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in userChildStatusList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="家庭背景" prop="familyBackground">
|
||||
<el-select v-model="form.familyBackground" clearable size="small" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in userFamilyBackgroundList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否接受异地恋" prop="loveAtDistance">
|
||||
<el-select v-model="form.loveAtDistance" clearable size="small" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in userLoveAtDistanceList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="何时结婚" prop="whenMarriage">
|
||||
<el-select v-model="form.whenMarriage" clearable size="small" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in userWhenMarriageList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否要小孩" prop="wantChild">
|
||||
<el-select v-model="form.wantChild" clearable size="small" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in userWantChildList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="愿与对方父母同住" prop="liveAtParent">
|
||||
<el-select v-model="form.liveAtParent" clearable size="small" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in userLiveAtParentList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="毕业院校" prop="graduateSchool">
|
||||
<el-input v-model="form.graduateSchool" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="兴趣爱好" prop="hobbys">
|
||||
<el-input v-model="form.hobbys" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="自我描述" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" :rows="2"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="open = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
appUserTypeList,
|
||||
booleanList,
|
||||
finishStatusList,
|
||||
genderList,
|
||||
memberTypeList,
|
||||
onlineStatusList,
|
||||
professionList,
|
||||
userAnnualIncomeList,
|
||||
userCarStatusList,
|
||||
userChildStatusList,
|
||||
userCompanyNatureList,
|
||||
userDrinkStatusList,
|
||||
userEducationList,
|
||||
userFamilyBackgroundList,
|
||||
userFamilyRankingList,
|
||||
userFindTagList,
|
||||
userForPersonalsList,
|
||||
userHousingStatusList,
|
||||
userLiveAtParentList,
|
||||
userLoveAtDistanceList,
|
||||
userMarriageList,
|
||||
userSignList,
|
||||
userSmokeStatusList,
|
||||
userSomatotypeList,
|
||||
userStatusList,
|
||||
userWantChildList,
|
||||
userWhenMarriageList,
|
||||
userZodiacList,
|
||||
videoStatusList
|
||||
} from '@/constant/statusMap'
|
||||
import Treeselect from '@riophae/vue-treeselect'
|
||||
import { getTreeAreaCode } from '@/api/xq/areaCode'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import { updateUser } from '@/api/xq/user'
|
||||
import { getUserInfoUpdate, updateUserInfo } from '@/api/xq/userInfo'
|
||||
|
||||
export default {
|
||||
name: "UserInfo",
|
||||
components: { Treeselect },
|
||||
data() {
|
||||
return {
|
||||
genderList,userStatusList,finishStatusList,userSomatotypeList,userZodiacList,userSignList,
|
||||
userEducationList,userCompanyNatureList,userAnnualIncomeList,userForPersonalsList,
|
||||
userHousingStatusList,userCarStatusList,userSmokeStatusList,userMarriageList,
|
||||
userDrinkStatusList,userChildStatusList,userFamilyBackgroundList,userFamilyRankingList,
|
||||
userLoveAtDistanceList,userWhenMarriageList,userWantChildList,userLiveAtParentList,
|
||||
userFindTagList,appUserTypeList,professionList,
|
||||
videoStatusList,onlineStatusList,memberTypeList,
|
||||
booleanList,
|
||||
open:false,
|
||||
buttonLoading: false,
|
||||
form:{
|
||||
userId: undefined,
|
||||
nickname: undefined,
|
||||
profession: undefined,
|
||||
annualIncome: undefined,
|
||||
somatotype: undefined,
|
||||
zodiac: undefined,
|
||||
sign: undefined,
|
||||
companyNature: undefined,
|
||||
forPersonals: undefined,
|
||||
nation: undefined,
|
||||
housingStatus: undefined,
|
||||
carStatus: undefined,
|
||||
smokeStatus: undefined,
|
||||
drinkStatus: undefined,
|
||||
childStatus: undefined,
|
||||
familyBackground: undefined,
|
||||
loveAtDistance: undefined,
|
||||
whenMarriage: undefined,
|
||||
wantChild: undefined,
|
||||
liveAtParent: undefined,
|
||||
graduateSchool: undefined,
|
||||
hobbys: undefined,
|
||||
remark: undefined,
|
||||
},
|
||||
rules:{
|
||||
annualIncome: [
|
||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||
],
|
||||
profession: [
|
||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||
],
|
||||
marriage: [
|
||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||
],
|
||||
education: [
|
||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||
],
|
||||
addressCode: [
|
||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||
],
|
||||
residenceCode: [
|
||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||
],
|
||||
weight: [
|
||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||
],
|
||||
height: [
|
||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||
],
|
||||
birthday: [
|
||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||
],
|
||||
gender: [
|
||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||
],
|
||||
avatar: [
|
||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||
],
|
||||
nickname: [
|
||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||
],
|
||||
mobile: [
|
||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||
],
|
||||
type: [
|
||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
areaOption: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
getTreeAreaCode().then(response => {
|
||||
this.areaOption = response.data
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
normalizer(node){
|
||||
return {
|
||||
id: node.id,
|
||||
label: node.label,
|
||||
children: node.children && node.children.length > 0 ? node.children : 0,
|
||||
}
|
||||
},
|
||||
init(row){
|
||||
this.form.userId = row.userId
|
||||
this.open = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs['form'].resetFields();
|
||||
getUserInfoUpdate(row.userId).then(response => {
|
||||
this.form = response.data
|
||||
})
|
||||
})
|
||||
},
|
||||
submitForm(){
|
||||
updateUserInfo(this.form).then(data => {
|
||||
this.$modal.msgSuccess("修改用户信息成功");
|
||||
this.buttonLoading = false;
|
||||
this.open = false
|
||||
this.$emit('refreshDataList')
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user