This commit is contained in:
77
2024-04-27 18:14:53 +08:00
parent 50dd6f854f
commit 6cdb644ee2
4 changed files with 73 additions and 48 deletions

View File

@@ -158,44 +158,40 @@
<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="择偶条件-年龄">
<span v-if="!info.userInfo.filterAge">不限</span>
<span v-if="info.userInfo.filterAge">{{info.userInfo.filterAge}}</span>
<span v-if="info.userInfo.filterAge == '0'">不限</span>
<span v-if="info.userInfo.filterAge != '0'">{{info.userInfo.filterAge}}</span>
</el-descriptions-item>
<el-descriptions-item label="择偶条件-身高">
<span v-if="!info.userInfo.filterHeight">不限</span>
<span v-if="info.userInfo.filterHeight">{{info.userInfo.filterHeight}}</span>
<span v-if="info.userInfo.filterHeight == '0'">不限</span>
<span v-if="info.userInfo.filterHeight != '0'">{{info.userInfo.filterHeight}}</span>
</el-descriptions-item>
<el-descriptions-item label="择偶条件-体型">
<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="&"/>
<span v-if="info.userInfo.filterSomatotype == '0'">不限</span>
<cai-dict-tag v-if="info.userInfo.filterSomatotype != '0'" :options="userSomatotypeList" :value="info.userInfo.filterSomatotype" empty-value="-" split-value="&"/>
</el-descriptions-item>
<el-descriptions-item label="择偶条件-婚况">
<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="&"/>
<span v-if="info.userInfo.filterMarriage == '0'">不限</span>
<cai-dict-tag v-if="info.userInfo.filterMarriage != '0'" :options="userMarriageList" :value="info.userInfo.filterMarriage" empty-value="-" split-value="&"/>
</el-descriptions-item>
<el-descriptions-item label="择偶条件-学历">
<span v-if="!info.userInfo.filterEducation">不限</span>
<cai-dict-tag v-if="info.userInfo.filterEducation" :options="userEducationList" :value="info.userInfo.filterEducation" empty-value="-" split-value="&" />
</el-descriptions-item>
<el-descriptions-item label="择偶条件-地区">
<span v-if="!info.userInfo.filterResidence">不限</span>
<span v-if="info.userInfo.filterResidence">{{info.userInfo.filterResidence}}</span>
<span v-if="info.userInfo.filterEducation == '0'">不限</span>
<cai-dict-tag v-if="info.userInfo.filterEducation != '0'" :options="userEducationList" :value="info.userInfo.filterEducation" empty-value="-" split-value="&" />
</el-descriptions-item>
<!-- <el-descriptions-item label="择偶条件-地区">
<span v-if="!info.userInfo.filterResidence == '0'">不限</span>
<span v-if="info.userInfo.filterResidence != '0'">{{info.userInfo.filterResidence}}</span>
</el-descriptions-item>-->
<el-descriptions-item label="择偶条件-年收入">
<span v-if="!info.userInfo.filterAnnualIncome">不限</span>
<cai-dict-tag v-if="info.userInfo.filterAnnualIncome" :options="userAnnualIncomeList" :value="info.userInfo.filterAnnualIncome" />
<cai-dict-tag :options="userFilterAnnualIncomeList" :value="info.userInfo.filterAnnualIncome" />
</el-descriptions-item>
<el-descriptions-item label="择偶条件-小孩情况">
<span v-if="!info.userInfo.filterChildStatus">不限</span>
<cai-dict-tag v-if="info.userInfo.filterChildStatus" :options="userFilterChildStatusList" :value="info.userInfo.filterChildStatus" />
<cai-dict-tag :options="userFilterChildStatusList" :value="info.userInfo.filterChildStatus" />
</el-descriptions-item>
<el-descriptions-item label="择偶条件-住房情况">
<span v-if="!info.userInfo.filterHousingStatus">不限</span>
<cai-dict-tag v-if="info.userInfo.filterHousingStatus" :options="userFilterHouseStatusList" :value="info.userInfo.filterHousingStatus" />
<cai-dict-tag :options="userFilterHouseStatusList" :value="info.userInfo.filterHousingStatus" />
</el-descriptions-item>
<el-descriptions-item label="择偶条件-购车情况">
<span v-if="!info.userInfo.filterCarStatus">不限</span>
<cai-dict-tag v-if="info.userInfo.filterCarStatus" :options="userFilterCarStatusList" :value="info.userInfo.filterCarStatus" />
<cai-dict-tag :options="userFilterCarStatusList" :value="info.userInfo.filterCarStatus" />
</el-descriptions-item>
</el-descriptions>
</el-collapse-item>
@@ -241,7 +237,11 @@ import {
userDrinkStatusList,
userEducationList,
userFamilyBackgroundList,
userFamilyRankingList, userFilterCarStatusList, userFilterChildStatusList, userFilterHouseStatusList,
userFamilyRankingList,
userFilterAnnualIncomeList,
userFilterCarStatusList,
userFilterChildStatusList,
userFilterHouseStatusList,
userFindTagList,
userForPersonalsList,
userHousingStatusList,
@@ -271,6 +271,7 @@ export default {
userFindTagList,appUserTypeList,
videoStatusList,onlineStatusList,memberTypeList,
userFilterCarStatusList,userFilterChildStatusList,userFilterHouseStatusList,
userFilterAnnualIncomeList,
booleanList,
activeName:['base','account','userAlbums'],
CS: {

View File

@@ -177,50 +177,56 @@
<el-table-column label="择偶条件" align="center" >
<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>
<span v-if="scope.row.filterAge == '0'">不限</span>
<span v-if="scope.row.filterAge != '0'" >{{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>
<span v-if="scope.row.filterHeight == '0'">不限</span>
<span v-if="scope.row.filterHeight != '0'" >{{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="&"/>
<span v-if="scope.row.filterSomatotype == '0'">不限</span>
<cai-dict-tag v-if="scope.row.filterSomatotype != '0'" :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="&"/>
<span v-if="scope.row.filterMarriage == '0'">不限</span>
<cai-dict-tag v-if="scope.row.filterMarriage != '0'" :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="&" />
<span v-if="scope.row.filterEducation == '0'">不限</span>
<cai-dict-tag v-if="scope.row.filterEducation != '0'" :options="userEducationList" :value="scope.row.filterEducation" empty-value="不限" split-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="不限" />
<span v-if="scope.row.filterAnnualIncome == '0'">不限</span>
<cai-dict-tag v-if="scope.row.filterAnnualIncome != '0'" :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="userFilterChildStatusList" :value="scope.row.filterChildStatus" empty-value="不限"/>
<span v-if="scope.row.filterChildStatus == '0'">不限</span>
<cai-dict-tag v-if="scope.row.filterChildStatus != '0'" :options="userFilterChildStatusList" :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="userFilterHouseStatusList" :value="scope.row.filterHousingStatus" empty-value="不限" />
<span v-if="scope.row.filterHousingStatus == '0'">不限</span>
<cai-dict-tag v-if="scope.row.filterHousingStatus != '0'" :options="userFilterHouseStatusList" :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="userFilterCarStatusList" :value="scope.row.filterCarStatus" empty-value="不限" />
<span v-if="scope.row.filterCarStatus == '0'">不限</span>
<cai-dict-tag v-if="scope.row.filterCarStatus != '0'" :options="userFilterCarStatusList" :value="scope.row.filterCarStatus" empty-value="不限" />
</template>
</el-table-column>
</el-table-column>

View File

@@ -99,7 +99,7 @@
<el-form-item label="年收入" prop="filterAnnualIncome">
<el-select v-model="form.filterAnnualIncome" clearable size="small" style="width: 95%">
<el-option
v-for="dict in userAnnualIncomeList"
v-for="dict in userFilterAnnualIncomeList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@@ -170,7 +170,11 @@ import {
userDrinkStatusList,
userEducationList,
userFamilyBackgroundList,
userFamilyRankingList, userFilterCarStatusList, userFilterChildStatusList, userFilterHouseStatusList,
userFamilyRankingList,
userFilterAnnualIncomeList,
userFilterCarStatusList,
userFilterChildStatusList,
userFilterHouseStatusList,
userFindTagList,
userForPersonalsList,
userHousingStatusList,
@@ -195,7 +199,7 @@ export default {
data() {
return {
genderList,userStatusList,finishStatusList,userSomatotypeList,userZodiacList,userSignList,
userEducationList,userCompanyNatureList,userAnnualIncomeList,userForPersonalsList,
userEducationList,userCompanyNatureList,userFilterAnnualIncomeList,userForPersonalsList,
userHousingStatusList,userCarStatusList,userSmokeStatusList,userMarriageList,
userDrinkStatusList,userChildStatusList,userFamilyBackgroundList,userFamilyRankingList,
userLoveAtDistanceList,userWhenMarriageList,userWantChildList,userLiveAtParentList,
@@ -242,21 +246,21 @@ export default {
this.form.id = response.data.id;
this.form.mobile = row.mobile;
this.form.nickname = row.nickname;
if(response.data.filterAge){
if(response.data.filterAge != '0'){
this.form.ageBx = false
this.form.ageFilter = response.data.filterAge.split('-')
}else{
this.form.ageBx = true
this.form.ageFilter = undefined
}
if(response.data.filterHeight){
if(response.data.filterHeight != '0'){
this.form.heightBx = false
this.form.heightFilter = response.data.filterHeight.split('-')
}else{
this.form.heightBx = true
this.form.heightFilter = undefined
}
if(response.data.filterSomatotype){
if(response.data.filterSomatotype != '0'){
this.form.somatotypeFilterBx = false
console.log(response.data.filterSomatotype.split('&'))
this.form.somatotypeFilter = response.data.filterSomatotype.split('&').map(i => parseInt(i))
@@ -264,14 +268,14 @@ export default {
this.form.somatotypeFilterBx = true
this.form.somatotypeFilter = undefined
}
if(response.data.filterMarriage){
if(response.data.filterMarriage != '0'){
this.form.marriageFilterBx = false
this.form.marriageFilter = response.data.filterMarriage.split('&').map(i => parseInt(i))
}else{
this.form.marriageFilterBx = true
this.form.marriageFilter = undefined
}
if(response.data.filterEducation){
if(response.data.filterEducation != '0'){
this.form.filterEducationBx = false
this.form.filterEducation = response.data.filterEducation.split('&').map(i => parseInt(i))
}else{
@@ -288,11 +292,11 @@ export default {
submitForm(){
updateUserInfoFilter({
id: this.form.id,
filterAge : this.form.ageBx ? "" : this.form.ageFilter.join("-"),
filterHeight : this.form.heightBx ? "" : this.form.heightFilter.join("-"),
filterSomatotype : this.form.somatotypeFilterBx ? "" : this.form.somatotypeFilter.join("&"),
filterMarriage : this.form.marriageFilterBx ? "" : this.form.marriageFilter.join("&"),
filterEducation: this.form.filterEducationBx ? "" : this.form.filterEducation.join("&"),
filterAge : this.form.ageBx ? "0" : this.form.ageFilter.join("-"),
filterHeight : this.form.heightBx ? "0" : this.form.heightFilter.join("-"),
filterSomatotype : this.form.somatotypeFilterBx ? "0" : this.form.somatotypeFilter.join("&"),
filterMarriage : this.form.marriageFilterBx ? "0" : this.form.marriageFilter.join("&"),
filterEducation: this.form.filterEducationBx ? "0" : this.form.filterEducation.join("&"),
filterAnnualIncome: this.form.filterAnnualIncome,
filterChildStatus: this.form.filterChildStatus,
filterHousingStatus: this.form.filterHousingStatus,