This commit is contained in:
77
2024-04-20 23:00:05 +08:00
parent d8e131f7ab
commit 00382fabb0
11 changed files with 963 additions and 142 deletions

View File

@@ -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" }
],
},

View File

@@ -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

View File

@@ -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
})
})
},

View File

@@ -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>