diff --git a/src/views/modules/shequ/chaxun.vue b/src/views/modules/shequ/chaxun.vue
index 045f3f271..a2ad530b7 100644
--- a/src/views/modules/shequ/chaxun.vue
+++ b/src/views/modules/shequ/chaxun.vue
@@ -44,19 +44,37 @@
{{ smatrFlag ? "关闭智能查询" : "智能查询" }}
-->
+
-
+ 导出
+
+
{
+ let fileName = window.decodeURI(
+ res.headers["content-disposition"].split(";")[1].split("=")[1]
+ );
+ console.log("filename", fileName);
+ let blob = new Blob([res.data], {
+ type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+ });
+ var url = window.URL.createObjectURL(blob);
+ var aLink = document.createElement("a");
+ aLink.style.display = "none";
+ aLink.href = url;
+ aLink.setAttribute("download", fileName);
+ document.body.appendChild(aLink);
+ aLink.click();
+ document.body.removeChild(aLink); //下载完成移除元素
+ window.URL.revokeObjectURL(url); //释放掉blob对象
+ })
+ .catch((err) => {
+ return this.$message.error("网络错误");
+ });
+ },
+ handelClickTag(label){
+ this.searchData.searchKey = label;
+ this.handleClickSearchBtn();
+ },
+ async getHotResidentSearch(){
+ let url = '/actual/base/residentBaseInfo/hotResidentSearch'
+ let {code,data,msg} = await requestPost(url)
+ if(code === 0){
+ this.hotTagList = data
+ }else{
+ console.log(msg);
+ }
+ },
+ async getHotHouseSearch(){
+ let url = '/actual/base/communityHouse/hotHouseSearch'
+ let {code,data,msg} = await requestPost(url)
+ if(code === 0){
+ this.hotTagList = data
+ }else{
+ console.log(msg);
+ }
+ },
firstSearch() {
this.searchData.searchKey = localStorage.getItem("homeSearchKey") || "";
this.searchData.type = localStorage.getItem("homeSearchType") || "";
@@ -636,7 +706,6 @@ export default {
}
},
- getApiData() {},
async getSearchJumin() {
// "/actual/base/residentBaseInfo/communitySearch" 普通查询
@@ -719,11 +788,13 @@ export default {
this.getRulesList();
},
handelClickTab(type) {
- console.log(type);
+ if(type === 'jumin'){
+ this.getHotResidentSearch()
+ }else{
+ this.getHotHouseSearch()
+ }
this.searchData.type = type;
-
this.handleClickSearchBtn();
- // this.searchData.searchKey = ''
},
dialogCancle() {
this.showSmatrForm = false;
@@ -782,7 +853,7 @@ export default {
.m-search {
box-sizing: border-box;
- padding: 40px 80px;
+ padding: 20px 80px;
margin-bottom: 16px;
background-size: 100%;
@@ -947,4 +1018,7 @@ export default {
margin: 15px auto 0;
}
}
+.header_btn{
+ margin-bottom: 10px;
+}