@@ -0,0 +1,84 @@ | |||
<!-- 暂无数据 --> | |||
<template> | |||
<div class="empty_data_box"> | |||
<img :src="imageUrl" :style="imageStyle" /> | |||
<div | |||
v-if="ifShowDescription" | |||
:style="descriptionStyle ? descriptionStyle : defaultDesStyle" | |||
> | |||
{{ description }} | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等) | |||
//例如:import 《组件名称》 from '《组件路径》'; | |||
export default { | |||
props: { | |||
// 自定义显示图片的路径 | |||
imageUrl: { | |||
types: String, | |||
required: false, | |||
default: () => require("@/assets/image/common/empty_data.png"), | |||
}, | |||
// 自定义显示图片的样式 | |||
imageStyle: { | |||
types: Object, | |||
required: false, | |||
default: () => {}, | |||
}, | |||
// 是否显示文字描述 | |||
ifShowDescription: { | |||
types: Boolean, | |||
required: false, | |||
default: () => false, | |||
}, | |||
// 自定义描述内容 | |||
description: { | |||
types: String, | |||
required: false, | |||
default: () => "暂无数据", | |||
}, | |||
// 自定义描述内容样式 | |||
descriptionStyle: { | |||
types: Object, | |||
required: false, | |||
default: null, | |||
}, | |||
}, | |||
//import引入的组件需要注入到对象中才能使用 | |||
components: {}, | |||
data() { | |||
//这里存放数据 | |||
return { | |||
defaultDesStyle: { | |||
color: "#334a5f", | |||
"font-size": "14px", | |||
}, | |||
}; | |||
}, | |||
//监听属性 类似于data概念 | |||
computed: {}, | |||
//监控data中的数据变化 | |||
watch: {}, | |||
//方法集合 | |||
methods: {}, | |||
//生命周期 - 创建完成(可以访问当前this实例) | |||
created() {}, | |||
//生命周期 - 挂载完成(可以访问DOM元素) | |||
mounted() {}, | |||
}; | |||
</script> | |||
<style lang="scss" scoped> | |||
//@import url(); 引入公共css类 | |||
.empty_data_box { | |||
padding: 100px 0; | |||
@include flex(column, center, center, null); | |||
@include border-box; | |||
img { | |||
margin-bottom: 10px; | |||
} | |||
} | |||
</style> |
@@ -50,21 +50,26 @@ | |||
</div> | |||
</section> | |||
<section class="content_box"> | |||
<div v-loading="pageLoading"> | |||
<company-item | |||
v-for="item in dataList" | |||
:key="item.companyId" | |||
:companyInfo="item" | |||
></company-item> | |||
</div> | |||
<div class="pagination_box"> | |||
<Pagination | |||
:currentPage="queryParams.page" | |||
:total="total" | |||
@change-page="changePage" | |||
@change-page-size="changePageSize" | |||
></Pagination> | |||
<section class="content_box" v-loading="pageLoading"> | |||
<template v-if="dataList && dataList.length > 0"> | |||
<div> | |||
<company-item | |||
v-for="item in dataList" | |||
:key="item.companyId" | |||
:companyInfo="item" | |||
></company-item> | |||
</div> | |||
<div class="pagination_box"> | |||
<Pagination | |||
:currentPage="queryParams.page" | |||
:total="total" | |||
@change-page="changePage" | |||
@change-page-size="changePageSize" | |||
></Pagination> | |||
</div> | |||
</template> | |||
<div v-else> | |||
<empty-data :ifShowDescription="true"></empty-data> | |||
</div> | |||
</section> | |||
@@ -83,10 +88,11 @@ import SearchInput from "@views/park-information/components/SearchInput.vue"; | |||
import { getOwnerIntermediaryList, getCompanyList } from "@api/company"; | |||
import { handlePageNation } from "@mixin/pageNationMixin"; | |||
import { mapState } from "vuex"; | |||
import EmptyData from "@/components/EmptyData.vue"; | |||
export default { | |||
//import引入的组件需要注入到对象中才能使用 | |||
components: { Nav, Footer, CompanyItem, Pagination, SearchInput }, | |||
components: { Nav, Footer, CompanyItem, Pagination, SearchInput, EmptyData }, | |||
mixins: [handlePageNation], | |||
data() { | |||
//这里存放数据 | |||
@@ -118,7 +124,7 @@ export default { | |||
ownerIndustry: "", // 所属行业 | |||
}, | |||
total: 0, | |||
dataList: [], | |||
dataList: null, | |||
industryList: [], | |||
}; | |||
}, |
@@ -12,7 +12,8 @@ | |||
</span> | |||
</div> | |||
<search-box @search-data="searchData"></search-box> | |||
<div class="detail_box"> | |||
<div class="detail_box" v-if="dataList && dataList.length > 0"> | |||
<question-list :list="dataList"></question-list> | |||
<div class="pagination_box"> | |||
<Pagination | |||
@@ -23,6 +24,9 @@ | |||
></Pagination> | |||
</div> | |||
</div> | |||
<div v-else class="no_data"> | |||
<empty-data :ifShowDescription="true"></empty-data> | |||
</div> | |||
</div> | |||
</template> | |||
@@ -32,6 +36,7 @@ | |||
import SearchBox from "./components/SearchBox.vue"; | |||
import QuestionList from "./components/QuestionList.vue"; | |||
import Pagination from "@components/Pagination.vue"; | |||
import EmptyData from "@components/EmptyData.vue"; | |||
// import { getCompanyNewsList } from "@api/company"; | |||
import { handlePageNation } from "@mixin/pageNationMixin"; | |||
import { questionList } from "@mixin/questionMixin"; | |||
@@ -39,7 +44,7 @@ import { mapState } from "vuex"; | |||
export default { | |||
//import引入的组件需要注入到对象中才能使用 | |||
components: { SearchBox, QuestionList, Pagination }, | |||
components: { SearchBox, QuestionList, Pagination, EmptyData }, | |||
mixins: [handlePageNation, questionList], | |||
data() { | |||
//这里存放数据 | |||
@@ -54,7 +59,7 @@ export default { | |||
type: "", | |||
}, | |||
total: 0, | |||
dataList: [], | |||
dataList: null, | |||
}; | |||
}, | |||
//监听属性 类似于data概念 | |||
@@ -151,4 +156,7 @@ export default { | |||
text-align: right; | |||
} | |||
} | |||
.no_data { | |||
background: #f7fbff; | |||
} | |||
</style> |
@@ -4,7 +4,7 @@ | |||
<search-box></search-box> | |||
<section class="detail_box"> | |||
<div class="title_box">您搜索的关键词:{{ this.queryParams.search }}</div> | |||
<div class="question_box"> | |||
<div class="question_box" v-if="dataList && dataList.length > 0"> | |||
<question-list :list="dataList"></question-list> | |||
<div class="pagination_box"> | |||
<Pagination | |||
@@ -15,6 +15,9 @@ | |||
></Pagination> | |||
</div> | |||
</div> | |||
<div v-else class="no_data"> | |||
<empty-data :ifShowDescription="true"></empty-data> | |||
</div> | |||
</section> | |||
</div> | |||
</template> | |||
@@ -25,12 +28,13 @@ | |||
import SearchBox from "./components/SearchBox.vue"; | |||
import Pagination from "@components/Pagination.vue"; | |||
import QuestionList from "./components/QuestionList.vue"; | |||
import EmptyData from "@components/EmptyData.vue"; | |||
import { handlePageNation } from "@mixin/pageNationMixin"; | |||
import { questionList } from "@mixin/questionMixin"; | |||
export default { | |||
//import引入的组件需要注入到对象中才能使用 | |||
components: { SearchBox, Pagination, QuestionList }, | |||
components: { SearchBox, Pagination, QuestionList, EmptyData }, | |||
mixins: [handlePageNation, questionList], | |||
data() { | |||
//这里存放数据 | |||
@@ -43,7 +47,7 @@ export default { | |||
type: "", | |||
}, | |||
total: 0, | |||
dataList: [], | |||
dataList: null, | |||
}; | |||
}, | |||
//监听属性 类似于data概念 |
@@ -24,8 +24,8 @@ module.exports = { | |||
proxy: { | |||
"/domain": { | |||
// target: "http://localhost:80", | |||
// target: "http://192.168.18.236:18888/", | |||
target: "http://192.168.18.138:18888/", | |||
target: "http://192.168.18.236:18888/", | |||
// target: "http://192.168.18.138:18888/", | |||
changeOrigin: true, | |||
pathRewrite: { | |||
"^/domain": "", |