|
|
@ -3,25 +3,37 @@ |
|
|
|
<div class="m-box m-search"> |
|
|
|
<div class="wrap"> |
|
|
|
<div class="title"> |
|
|
|
<span>{{ smatrFlag ? '智能查询' : '社区查询' }}</span> |
|
|
|
<span>{{ smatrFlag ? "智能查询" : "社区查询" }}</span> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="tabs"> |
|
|
|
<div :class="searchData.type == 'jumin' ? 'z-on' : ''" @click="handelClickTab('jumin')"> |
|
|
|
<div |
|
|
|
:class="searchData.type == 'jumin' ? 'z-on' : ''" |
|
|
|
@click="handelClickTab('jumin')" |
|
|
|
> |
|
|
|
查居民 |
|
|
|
</div> |
|
|
|
<div :class="searchData.type == 'fangwu' ? 'z-on' : ''" @click="handelClickTab('fangwu')"> |
|
|
|
<div |
|
|
|
:class="searchData.type == 'fangwu' ? 'z-on' : ''" |
|
|
|
@click="handelClickTab('fangwu')" |
|
|
|
> |
|
|
|
查房屋 |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- --> |
|
|
|
<div class="search"> |
|
|
|
<div class="search-input"> |
|
|
|
<div class="input"> |
|
|
|
<input type="text" :placeholder="typePlaceholder[searchData.type]" v-model="searchData.searchKey" |
|
|
|
@keyup.enter="handleClickSearchBtn" /> |
|
|
|
<div class="close-btn" v-if="searchData.searchKey != ''" |
|
|
|
@click="searchData.searchKey = '', childrenRulesData = []"> |
|
|
|
<input |
|
|
|
type="text" |
|
|
|
:placeholder="typePlaceholder[searchData.type]" |
|
|
|
v-model="searchData.searchKey" |
|
|
|
@keyup.enter="handleClickSearchBtn" |
|
|
|
/> |
|
|
|
<div |
|
|
|
class="close-btn" |
|
|
|
v-if="searchData.searchKey != ''" |
|
|
|
@click="(searchData.searchKey = ''), (childrenRulesData = [])" |
|
|
|
> |
|
|
|
<img src="@/assets/img/shequ/close.png" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -29,62 +41,85 @@ |
|
|
|
</div> |
|
|
|
<div class="btn2" @click="handleClickSmartSearchBtn"> |
|
|
|
<img src="@/assets/images/index/i-search.png" /> |
|
|
|
{{ smatrFlag ? '关闭智能查询' : '智能查询' }} |
|
|
|
{{ smatrFlag ? "关闭智能查询" : "智能查询" }} |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
<p v-show="smatrFlag && searchStatus == 'ing'" class="rules_box"> |
|
|
|
已显示‘{{ searchData.type == 'fangwu' ? '房屋' : '居民' }}’状态为{{ searchData.searchKey }}的搜索结果。如不满足需求, <el-button |
|
|
|
type="text" @click="handleClickEditRules">请点击此处调整</el-button> |
|
|
|
已显示‘{{ searchData.type == "fangwu" ? "房屋" : "居民" }}’状态为{{ |
|
|
|
searchData.searchKey |
|
|
|
}}的搜索结果。如不满足需求, |
|
|
|
<el-button type="text" @click="handleClickEditRules" |
|
|
|
>请点击此处调整</el-button |
|
|
|
> |
|
|
|
</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="m-box" v-if="searchStatus == 'ing'"> |
|
|
|
<div class="m-tb" v-if="searchData.type == 'jumin' && |
|
|
|
<div |
|
|
|
class="m-tb" |
|
|
|
v-if=" |
|
|
|
searchData.type == 'jumin' && |
|
|
|
searchData.searchKey != '' && |
|
|
|
searchStatus == 'ing' |
|
|
|
"> |
|
|
|
" |
|
|
|
> |
|
|
|
<div class="tb"> |
|
|
|
<el-table class="m-table" v-loading="searchJumin.loading" :data="searchJumin.list" border style="width: 100%" |
|
|
|
:max-height="1000"> |
|
|
|
<el-table-column label="序号" type="index" align="center" width="50" /> |
|
|
|
<el-table-column v-for="item in searchJumin.header" :key="item.columnName" :prop="item.columnName" |
|
|
|
:label="item.label" align="center" :show-overflow-tooltip="true" :width="item.itemType === 'radio' ? computedWidth(item.label) : 180 |
|
|
|
"> |
|
|
|
<el-table |
|
|
|
class="m-table" |
|
|
|
v-loading="searchJumin.loading" |
|
|
|
:data="searchJumin.list" |
|
|
|
:height="maxTableHeight" |
|
|
|
border |
|
|
|
style="width: 100%" |
|
|
|
:max-height="1000" |
|
|
|
> |
|
|
|
<el-table-column |
|
|
|
label="序号" |
|
|
|
type="index" |
|
|
|
align="center" |
|
|
|
width="50" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
v-for="item in searchJumin.header" |
|
|
|
:key="item.columnName" |
|
|
|
:prop="item.columnName" |
|
|
|
:label="item.label" |
|
|
|
align="center" |
|
|
|
:show-overflow-tooltip="true" |
|
|
|
:width=" |
|
|
|
item.itemType === 'radio' ? computedWidth(item.label) : 180 |
|
|
|
" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ handleFilterSpan(scope.row, item) }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="居民分类" align="center" :show-overflow-tooltip="true"> |
|
|
|
<el-table-column |
|
|
|
label="居民分类" |
|
|
|
align="center" |
|
|
|
:show-overflow-tooltip="true" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template v-if="scope.row.categoryInfo"> |
|
|
|
{{ |
|
|
|
scope.row.categoryInfo.bereavedPersonFlag == |
|
|
|
1 |
|
|
|
scope.row.categoryInfo.bereavedPersonFlag == 1 |
|
|
|
? "特扶人员 " |
|
|
|
: "" |
|
|
|
}} |
|
|
|
{{ |
|
|
|
scope.row.categoryInfo.chronicDiseaseFlag == |
|
|
|
1 |
|
|
|
scope.row.categoryInfo.chronicDiseaseFlag == 1 |
|
|
|
? "慢病 " |
|
|
|
: "" |
|
|
|
}} |
|
|
|
{{ |
|
|
|
scope.row.categoryInfo.dementedFlag == 1 |
|
|
|
? "失智老人 " |
|
|
|
: "" |
|
|
|
scope.row.categoryInfo.dementedFlag == 1 ? "失智老人 " : "" |
|
|
|
}} |
|
|
|
{{ |
|
|
|
scope.row.categoryInfo.disabilityFlag == 1 |
|
|
|
? "残疾 " |
|
|
|
: "" |
|
|
|
scope.row.categoryInfo.disabilityFlag == 1 ? "残疾 " : "" |
|
|
|
}} |
|
|
|
{{ |
|
|
|
scope.row.categoryInfo.disabledFlag == 1 |
|
|
|
? "失能老人 " |
|
|
|
: "" |
|
|
|
scope.row.categoryInfo.disabledFlag == 1 ? "失能老人 " : "" |
|
|
|
}} |
|
|
|
{{ |
|
|
|
scope.row.categoryInfo.emptyNesterFlag == 1 |
|
|
@ -102,34 +137,22 @@ |
|
|
|
: "" |
|
|
|
}} |
|
|
|
{{ |
|
|
|
scope.row.categoryInfo.floatingFlag == 1 |
|
|
|
? "流动人口 " |
|
|
|
: "" |
|
|
|
scope.row.categoryInfo.floatingFlag == 1 ? "流动人口 " : "" |
|
|
|
}} |
|
|
|
{{ |
|
|
|
scope.row.categoryInfo.liveAloneFlag == 1 |
|
|
|
? "独居老人 " |
|
|
|
: "" |
|
|
|
scope.row.categoryInfo.liveAloneFlag == 1 ? "独居老人 " : "" |
|
|
|
}} |
|
|
|
{{ |
|
|
|
scope.row.categoryInfo.oldPeopleFlag == 1 |
|
|
|
? "老年人 " |
|
|
|
: "" |
|
|
|
scope.row.categoryInfo.oldPeopleFlag == 1 ? "老年人 " : "" |
|
|
|
}} |
|
|
|
{{ scope.row.categoryInfo.partyFlag == 1 ? "党员 " : "" }} |
|
|
|
{{ |
|
|
|
scope.row.categoryInfo.partyFlag == 1 |
|
|
|
? "党员 " |
|
|
|
: "" |
|
|
|
}} |
|
|
|
{{ |
|
|
|
scope.row.categoryInfo |
|
|
|
.petitionOfficerFlag == 1 |
|
|
|
scope.row.categoryInfo.petitionOfficerFlag == 1 |
|
|
|
? "信访人员 " |
|
|
|
: "" |
|
|
|
}} |
|
|
|
{{ |
|
|
|
scope.row.categoryInfo.seriousIllnessFlag == |
|
|
|
1 |
|
|
|
scope.row.categoryInfo.seriousIllnessFlag == 1 |
|
|
|
? "大病 " |
|
|
|
: "" |
|
|
|
}} |
|
|
@ -139,20 +162,13 @@ |
|
|
|
: "" |
|
|
|
}} |
|
|
|
{{ |
|
|
|
scope.row.categoryInfo |
|
|
|
.subsistenceAllowanceFlag == 1 |
|
|
|
scope.row.categoryInfo.subsistenceAllowanceFlag == 1 |
|
|
|
? "低保人员 " |
|
|
|
: "" |
|
|
|
}} |
|
|
|
{{ scope.row.categoryInfo.tenantFlag == 1 ? "租户 " : "" }} |
|
|
|
{{ |
|
|
|
scope.row.categoryInfo.tenantFlag == 1 |
|
|
|
? "租户 " |
|
|
|
: "" |
|
|
|
}} |
|
|
|
{{ |
|
|
|
scope.row.categoryInfo.unemployedFlag == 1 |
|
|
|
? "失业 " |
|
|
|
: "" |
|
|
|
scope.row.categoryInfo.unemployedFlag == 1 ? "失业 " : "" |
|
|
|
}} |
|
|
|
{{ |
|
|
|
scope.row.categoryInfo.unitedFrontFlag == 1 |
|
|
@ -160,51 +176,75 @@ |
|
|
|
: "" |
|
|
|
}} |
|
|
|
{{ |
|
|
|
scope.row.categoryInfo.veteranFlag == 1 |
|
|
|
? "退役军人 " |
|
|
|
: "" |
|
|
|
scope.row.categoryInfo.veteranFlag == 1 ? "退役军人 " : "" |
|
|
|
}} |
|
|
|
{{ |
|
|
|
scope.row.categoryInfo.volunteerFlag == 1 |
|
|
|
? "志愿者 " |
|
|
|
: "" |
|
|
|
scope.row.categoryInfo.volunteerFlag == 1 ? "志愿者 " : "" |
|
|
|
}} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="备注" align="center" :show-overflow-tooltip="true"> |
|
|
|
<el-table-column |
|
|
|
label="备注" |
|
|
|
align="center" |
|
|
|
:show-overflow-tooltip="true" |
|
|
|
> |
|
|
|
<template slot-scope="scope" label="备注"> |
|
|
|
{{ scope.row.remark }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
|
|
|
<el-table-column fixed="right" label="操作" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button class="f-fc" @click="handleWatchSearchJumin(scope.$index)" type="text" |
|
|
|
size="small">查看</el-button> |
|
|
|
<el-button |
|
|
|
class="f-fc" |
|
|
|
@click="handleWatchSearchJumin(scope.$index)" |
|
|
|
type="text" |
|
|
|
size="small" |
|
|
|
>查看</el-button |
|
|
|
> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
|
|
|
|
<div> |
|
|
|
<el-pagination @size-change="handleSizeChangeSearchJumin" @current-change="handleCurrentChangeSearchJumin" |
|
|
|
:current-page.sync="searchJumin.pageNo" :page-sizes="[20, 50, 100, 200]" |
|
|
|
:page-size="parseInt(searchJumin.pageSize)" layout="sizes, prev, pager, next, total" |
|
|
|
:total="searchJumin.total"> |
|
|
|
<el-pagination |
|
|
|
@size-change="handleSizeChangeSearchJumin" |
|
|
|
@current-change="handleCurrentChangeSearchJumin" |
|
|
|
:current-page.sync="searchJumin.pageNo" |
|
|
|
:page-sizes="[20, 50, 100, 200]" |
|
|
|
:page-size="parseInt(searchJumin.pageSize)" |
|
|
|
layout="sizes, prev, pager, next, total" |
|
|
|
:total="searchJumin.total" |
|
|
|
> |
|
|
|
</el-pagination> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="m-tb" v-if="searchData.type == 'fangwu' && |
|
|
|
<div |
|
|
|
class="m-tb" |
|
|
|
v-if=" |
|
|
|
searchData.type == 'fangwu' && |
|
|
|
searchData.searchKey != '' && |
|
|
|
searchStatus == 'ing' |
|
|
|
"> |
|
|
|
" |
|
|
|
> |
|
|
|
<div class="tb"> |
|
|
|
<el-table class="m-table" :data="searchFangwu.list" v-loading="searchFangwu.loading" border :max-height="1000" |
|
|
|
style="width: 100%"> |
|
|
|
<el-table-column label="序号" type="index" align="center" width="50" /> |
|
|
|
<el-table |
|
|
|
class="m-table" |
|
|
|
:data="searchFangwu.list" |
|
|
|
v-loading="searchFangwu.loading" |
|
|
|
border |
|
|
|
:max-height="1000" |
|
|
|
style="width: 100%" |
|
|
|
> |
|
|
|
<el-table-column |
|
|
|
label="序号" |
|
|
|
type="index" |
|
|
|
align="center" |
|
|
|
width="50" |
|
|
|
/> |
|
|
|
<el-table-column prop="houseName" label="房屋名称" width="120"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="quartersName" label="所属小区" width="160"> |
|
|
@ -224,30 +264,69 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="ownerIdCard" label="证件号" width="170"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" fixed="right" header-align="center" align="center" class="operate"> |
|
|
|
<el-table-column |
|
|
|
label="操作" |
|
|
|
fixed="right" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
class="operate" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button class="f-fc" type="text" size="small" |
|
|
|
@click="handleWatchSearchFangwu(scope.$index)">查看</el-button> |
|
|
|
<el-button |
|
|
|
class="f-fc" |
|
|
|
type="text" |
|
|
|
size="small" |
|
|
|
@click="handleWatchSearchFangwu(scope.$index)" |
|
|
|
>查看</el-button |
|
|
|
> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<div> |
|
|
|
<el-pagination @size-change="handleSizeChangeSearchFangwu" @current-change="handleCurrentChangeSearchFangwu" |
|
|
|
:current-page.sync="searchFangwu.pageNo" :page-sizes="[20, 50, 100, 200]" |
|
|
|
:page-size="parseInt(searchFangwu.pageSize)" layout="sizes, prev, pager, next" :total="searchFangwu.total"> |
|
|
|
<el-pagination |
|
|
|
@size-change="handleSizeChangeSearchFangwu" |
|
|
|
@current-change="handleCurrentChangeSearchFangwu" |
|
|
|
:current-page.sync="searchFangwu.pageNo" |
|
|
|
:page-sizes="[20, 50, 100, 200]" |
|
|
|
:page-size="parseInt(searchFangwu.pageSize)" |
|
|
|
layout="sizes, prev, pager, next" |
|
|
|
:total="searchFangwu.total" |
|
|
|
> |
|
|
|
</el-pagination> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<resi-info v-if="showedResiInfo && currentResiId" :resi-id="currentResiId" @close="showedResiInfo = false" /> |
|
|
|
<house-info v-if="showedHouseInfo && currentHouseId" :house-id="currentHouseId" @close="showedHouseInfo = false" /> |
|
|
|
|
|
|
|
<el-dialog v-if="showSmatrForm" :visible.sync="showSmatrForm" :append-to-body="true" :close-on-click-modal="false" |
|
|
|
:close-on-press-escape="false" :title="'修改条件'" width="880px" top="5vh" class="dialog-h" |
|
|
|
@closed="showSmatrForm = false"> |
|
|
|
<smatr-rules ref="smatr_rules_form" @dialogCancle="dialogCancle" @dialogOk="dialogOk" :rulesData="rulesData"> |
|
|
|
<resi-info |
|
|
|
v-if="showedResiInfo && currentResiId" |
|
|
|
:resi-id="currentResiId" |
|
|
|
@close="showedResiInfo = false" |
|
|
|
/> |
|
|
|
<house-info |
|
|
|
v-if="showedHouseInfo && currentHouseId" |
|
|
|
:house-id="currentHouseId" |
|
|
|
@close="showedHouseInfo = false" |
|
|
|
/> |
|
|
|
|
|
|
|
<el-dialog |
|
|
|
v-if="showSmatrForm" |
|
|
|
:visible.sync="showSmatrForm" |
|
|
|
:append-to-body="true" |
|
|
|
:close-on-click-modal="false" |
|
|
|
:close-on-press-escape="false" |
|
|
|
:title="'修改条件'" |
|
|
|
width="880px" |
|
|
|
top="5vh" |
|
|
|
class="dialog-h" |
|
|
|
@closed="showSmatrForm = false" |
|
|
|
> |
|
|
|
<smatr-rules |
|
|
|
ref="smatr_rules_form" |
|
|
|
@dialogCancle="dialogCancle" |
|
|
|
@dialogOk="dialogOk" |
|
|
|
:rulesData="rulesData" |
|
|
|
> |
|
|
|
</smatr-rules> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
@ -261,12 +340,12 @@ import getQueryPara from "dai-js/modules/getQueryPara"; |
|
|
|
import resiInfo from "@/views/modules/cpts/resi/info"; |
|
|
|
import houseInfo from "@/views/modules/cpts/house/info"; |
|
|
|
import smatrRules from "./cpts/smatr-rules.vue"; |
|
|
|
import { requestGet } from '../../../js/dai/request'; |
|
|
|
import { requestGet } from "../../../js/dai/request"; |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
resiInfo, |
|
|
|
houseInfo, |
|
|
|
smatrRules |
|
|
|
smatrRules, |
|
|
|
}, |
|
|
|
|
|
|
|
props: { |
|
|
@ -356,7 +435,6 @@ export default { |
|
|
|
width: 110, |
|
|
|
options: [], |
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
pageNo: 1, |
|
|
|
pageSize: window.localStorage.getItem("pageSize") || 20, |
|
|
@ -372,7 +450,6 @@ export default { |
|
|
|
list: [], |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 显示人员详情 |
|
|
|
showedResiInfo: false, |
|
|
|
|
|
|
@ -388,15 +465,16 @@ export default { |
|
|
|
showSmatrForm: false, |
|
|
|
rulesData: [], |
|
|
|
|
|
|
|
childrenRulesData: [] |
|
|
|
childrenRulesData: [], |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
maxTableHeight() { |
|
|
|
// return this.clientHeight - 450; |
|
|
|
return 420; |
|
|
|
return this.$store.state.inIframe |
|
|
|
? this.clientHeight - 540 + this.iframeHeigh |
|
|
|
: this.clientHeight - 540; |
|
|
|
}, |
|
|
|
...mapGetters(["clientHeight"]), |
|
|
|
...mapGetters(["clientHeight", "iframeHeight"]), |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
"searchData.searchKey": function (val) { |
|
|
@ -412,15 +490,17 @@ export default { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
firstSearch() { |
|
|
|
this.searchData.searchKey = localStorage.getItem('homeSearchKey') || '' |
|
|
|
this.searchData.type = localStorage.getItem('homeSearchType') || '' |
|
|
|
this.searchData.searchKey = localStorage.getItem("homeSearchKey") || ""; |
|
|
|
this.searchData.type = localStorage.getItem("homeSearchType") || ""; |
|
|
|
this.handleClickSearchBtn(); |
|
|
|
}, |
|
|
|
handleClickEditRules() { |
|
|
|
this.showSmatrForm = true |
|
|
|
this.showSmatrForm = true; |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.smatr_rules_form.initForm(this.rulesData.length == 0 ? this.childrenRulesData : this.rulesData) |
|
|
|
}) |
|
|
|
this.$refs.smatr_rules_form.initForm( |
|
|
|
this.rulesData.length == 0 ? this.childrenRulesData : this.rulesData |
|
|
|
); |
|
|
|
}); |
|
|
|
}, |
|
|
|
computedWidth(label) { |
|
|
|
const wd = 20 * label.length; |
|
|
@ -434,12 +514,12 @@ export default { |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
if (row.mobile != '' && row.mobile) { |
|
|
|
row.mobile = row.mobile.substr(0, 3) + '****' + row.mobile.substr(7, 4) |
|
|
|
} else if (row.mobile == '' || row.mobile == '--') { |
|
|
|
row.mobile = "" |
|
|
|
if (row.mobile != "" && row.mobile) { |
|
|
|
row.mobile = row.mobile.substr(0, 3) + "****" + row.mobile.substr(7, 4); |
|
|
|
} else if (row.mobile == "" || row.mobile == "--") { |
|
|
|
row.mobile = ""; |
|
|
|
} |
|
|
|
row.idNum = row.idNum.substr(0, 11) + '*****' + row.idNum.substr(16, 2) |
|
|
|
row.idNum = row.idNum.substr(0, 11) + "*****" + row.idNum.substr(16, 2); |
|
|
|
return _val || row[item.columnName]; |
|
|
|
}, |
|
|
|
|
|
|
@ -447,10 +527,10 @@ export default { |
|
|
|
const { |
|
|
|
searchData: { type, searchKey }, |
|
|
|
} = this; |
|
|
|
localStorage.setItem('homeSearchType', type) |
|
|
|
localStorage.setItem('homeSearchKey', searchKey) |
|
|
|
if (!searchKey) return |
|
|
|
if (!this.smatrFlag) this.childrenRulesData = [] |
|
|
|
localStorage.setItem("homeSearchType", type); |
|
|
|
localStorage.setItem("homeSearchKey", searchKey); |
|
|
|
if (!searchKey) return; |
|
|
|
if (!this.smatrFlag) this.childrenRulesData = []; |
|
|
|
|
|
|
|
if (type == "jumin") { |
|
|
|
this.searchJumin.pageNo = 1; |
|
|
@ -462,29 +542,34 @@ export default { |
|
|
|
this.getSearchFangwu(); |
|
|
|
} |
|
|
|
if (this.smatrFlag && this.childrenRulesData.length === 0) { |
|
|
|
this.getRulesList() |
|
|
|
this.getRulesList(); |
|
|
|
} |
|
|
|
this.searchStatus = "ing"; |
|
|
|
}, |
|
|
|
async getRulesList() { |
|
|
|
//MOCK http://127.0.0.1:4523/mock2/2515967/96358430 |
|
|
|
|
|
|
|
let url = 'http://127.0.0.1:4523/mock2/2515967/96358430' |
|
|
|
let par = { |
|
|
|
keyWord: this.searchData.searchKey, |
|
|
|
type: this.searchData.type |
|
|
|
} |
|
|
|
const { data, code, msg } = await requestGet(url, par) |
|
|
|
let url = "/actual/base/residentBaseInfo/residentSearchRules"; |
|
|
|
let formData = new FormData(); |
|
|
|
formData.append("searchKey", this.searchData.searchKey); |
|
|
|
formData.append("type", this.searchData.type); |
|
|
|
const { data, code, msg } = await requestPost(url, formData); |
|
|
|
if (code == 0) { |
|
|
|
this.rulesData = data |
|
|
|
this.rulesData = data; |
|
|
|
console.log(this.rulesData); |
|
|
|
} else { |
|
|
|
console.log(msg); |
|
|
|
} |
|
|
|
}, |
|
|
|
handleClickSmartSearchBtn() { |
|
|
|
this.smatrFlag = !this.smatrFlag |
|
|
|
this.searchData.searchKey = '' |
|
|
|
this.smatrFlag = !this.smatrFlag; |
|
|
|
if (!this.searchData.searchKey) return; |
|
|
|
if (this.searchData.type == "jumin") { |
|
|
|
this.getSearchJumin(); |
|
|
|
} else { |
|
|
|
this.getSearchFangwu(); |
|
|
|
} |
|
|
|
if (this.smatrFlag) { |
|
|
|
this.getRulesList(); |
|
|
|
} |
|
|
|
}, |
|
|
|
handleSizeChangeSearchJumin(val) { |
|
|
|
console.log(`每页 ${val} 条`); |
|
|
@ -523,22 +608,22 @@ export default { |
|
|
|
this.showedHouseInfo = true; |
|
|
|
}, |
|
|
|
|
|
|
|
getApiData() { }, |
|
|
|
getApiData() {}, |
|
|
|
|
|
|
|
async getSearchJumin() { |
|
|
|
const url = "/actual/base/residentBaseInfo/communitySearch"; |
|
|
|
let url = this.smatrFlag |
|
|
|
? "/actual/base/residentBaseInfo/residentSearch" |
|
|
|
: "/actual/base/residentBaseInfo/communitySearch"; |
|
|
|
const { |
|
|
|
searchData: { searchKey }, |
|
|
|
searchJumin: { pageSize, pageNo }, |
|
|
|
} = this; |
|
|
|
console.log(this.rulesData); |
|
|
|
console.log(this.childrenRulesData); |
|
|
|
this.searchJumin.loading = true; |
|
|
|
const { data, code, msg } = await requestPost(url, { |
|
|
|
searchKey, |
|
|
|
pageSize, |
|
|
|
pageNo, |
|
|
|
smartSearchRules: this.childrenRulesData || null |
|
|
|
smartSearchRules: this.childrenRulesData || null, |
|
|
|
}); |
|
|
|
this.searchJumin.loading = false; |
|
|
|
if (code === 0) { |
|
|
@ -551,6 +636,7 @@ export default { |
|
|
|
}) |
|
|
|
: []; |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
@ -565,7 +651,7 @@ export default { |
|
|
|
searchKey, |
|
|
|
pageSize, |
|
|
|
pageNo, |
|
|
|
smartSearchRules: this.childrenRulesData || null |
|
|
|
smartSearchRules: this.childrenRulesData || null, |
|
|
|
}); |
|
|
|
this.searchFangwu.loading = false; |
|
|
|
if (code === 0) { |
|
|
@ -601,27 +687,27 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
handelClickTab(type) { |
|
|
|
console.log(type) |
|
|
|
console.log(type); |
|
|
|
this.searchData.type = type; |
|
|
|
|
|
|
|
this.handleClickSearchBtn() |
|
|
|
this.handleClickSearchBtn(); |
|
|
|
// this.searchData.searchKey = '' |
|
|
|
}, |
|
|
|
dialogCancle() { |
|
|
|
this.showSmatrForm = false |
|
|
|
this.showSmatrForm = false; |
|
|
|
}, |
|
|
|
dialogOk(rulesData) { |
|
|
|
this.showSmatrForm = false |
|
|
|
this.rulesData = [] |
|
|
|
this.showSmatrForm = false; |
|
|
|
this.rulesData = []; |
|
|
|
if (rulesData) { |
|
|
|
this.childrenRulesData = rulesData || null |
|
|
|
this.handleClickSearchBtn() |
|
|
|
} |
|
|
|
this.childrenRulesData = rulesData || null; |
|
|
|
this.handleClickSearchBtn(); |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
destroyed() { |
|
|
|
localStorage.removeItem('homeSearchKey') |
|
|
|
localStorage.removeItem('homeSearchType') |
|
|
|
localStorage.removeItem("homeSearchKey"); |
|
|
|
localStorage.removeItem("homeSearchType"); |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
@ -684,7 +770,7 @@ export default { |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
|
|
|
|
>div { |
|
|
|
> div { |
|
|
|
position: relative; |
|
|
|
margin-right: 30px; |
|
|
|
width: 56px; |
|
|
|