Commit f574b783 by liudx

添加提示信息

parent fbbb74de
......@@ -17,7 +17,7 @@
</a-select>
</template>
<template #addonAfter>
<div @click="onsearch">
<div @click="onsearch">
<img
style="padding-right: 5px"
src="@/static/home/index/icon-search.png"
......@@ -150,7 +150,7 @@
<!-- 公司列表结果 -->
<div class="company_con_right">
<h2>
推荐<span class="result_count">{{ total }}</span
推荐<span class="result_count">{{ total ? total : 0 }}</span
>条相关结果
<!-- 筛选的标签展示 -->
<div class="filter">
......@@ -230,8 +230,22 @@
</div>
</div>
</div>
<div style="height: 50%" v-if="search_word">
<a-empty
style="margin-top: 15%"
:description="'您的搜索词太宽泛,建议更换一下搜索词'"
/>
</div>
<div style="height: 50%" v-if="total==0">
<a-empty
style="margin-top: 15%"
:description="'暂无数据'"
/>
</div>
<br />
<a-pagination
v-if="(!search_word)"
v-model:current="currentPage"
@change="onChange"
:total="total"
......@@ -261,7 +275,7 @@ export default {
name: "company",
data() {
return {
timer:null,
timer: null,
search_result_show: false,
zh_CN,
search_result: [],
......@@ -292,6 +306,7 @@ export default {
},
filter: [],
companylist: [],
search_word: false,
};
},
components: {},
......@@ -338,6 +353,7 @@ export default {
enterpriseList({ ...params }).then((res) => {
if (res.code == 0) {
this.companylist = res.data.list;
this.search_word = res.data.search_word;
this.total = res.data.total;
} else {
}
......@@ -429,6 +445,7 @@ export default {
enterpriseSelect({ ...params }).then((res) => {
if (res.code == 0) {
this.companylist = res.data.list;
this.search_word = res.data.search_word;
this.total = res.data.total;
}
});
......@@ -573,9 +590,10 @@ export default {
});
},
onsearch() {
this.currentPage = 1;
this.search_result_show = false;
this.keyword ? (this.filter = [this.keyword]) : (this.filter = []);
this.getCompanyList(this.keyword);
this.search_result_show = false;
},
//联想搜索
onInput() {
......
......@@ -112,7 +112,7 @@
<!-- 专利表格结果 -->
<div class="patent_con_right">
<h2>
推荐<span>{{ total }}</span
推荐<span>{{ total?total:0 }}</span
>条相关结果
<!-- 筛选的标签展示 -->
<div class="filter">
......@@ -127,6 +127,7 @@
:data-source="patentdata"
:pagination="false"
:customRow="rowClick"
v-if="!search_word"
>
<template #bodyCell="{ column, text }">
<template v-if="column.dataIndex === 'name'">
......@@ -137,10 +138,14 @@
</template>
</template>
</a-table>
<div style="height: 50%;" v-else>
<a-empty style="margin-top: 15%;" :description="'您的搜索词太宽泛,建议更换一下搜索词'" />
</div>
<br />
<a-pagination
v-model:current="currentPage"
@change="onChange"
v-if="!search_word"
:total="total"
:showSizeChanger="false"
/>
......@@ -225,6 +230,7 @@ export default {
patentdata: [],
filter: [],
total: 0,
search_word:false
};
},
components: {},
......@@ -242,6 +248,7 @@ export default {
patents({ ...params }).then((res) => {
if (res.code == 0) {
this.patentdata = res.data.list;
this.search_word = res.data.search_word
this.total = res.data.total;
} else {
message.error(res.data.msg);
......@@ -249,9 +256,11 @@ export default {
});
},
onsearch() {
this.currentPage = 1;
this.search_result_show = false;
this.keyword ? (this.filter = [this.keyword]) : (this.filter = []);
this.getList(this.keyword);
this.search_result_show = false;
},
//改变页码
onChange() {
......@@ -277,7 +286,8 @@ export default {
};
patentselect({ ...params }).then((res) => {
if (res.code == 0) {
this.patentdata = res.data.list;
this.patentdata = res.data.list
this.search_word = res.data.search_word
this.total = res.data.total;
}
});
......@@ -374,7 +384,6 @@ export default {
},
//联想搜索
onInput() {
console.log(11111111111111);
patentLenovo({ keyword: this.keyword }).then((res) => {
if (res.code == 0) {
this.search_result_show = true;
......@@ -390,8 +399,6 @@ export default {
},
//
onFocus() {
console.log(2222222222222);
if (this.keyword) {
patentLenovo({ keyword: this.keyword }).then((res) => {
if (res.code == 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment