| <!-- 暂无数据 --> | |||||
| <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> |
| </div> | </div> | ||||
| </section> | </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> | </div> | ||||
| </section> | </section> | ||||
| import { getOwnerIntermediaryList, getCompanyList } from "@api/company"; | import { getOwnerIntermediaryList, getCompanyList } from "@api/company"; | ||||
| import { handlePageNation } from "@mixin/pageNationMixin"; | import { handlePageNation } from "@mixin/pageNationMixin"; | ||||
| import { mapState } from "vuex"; | import { mapState } from "vuex"; | ||||
| import EmptyData from "@/components/EmptyData.vue"; | |||||
| export default { | export default { | ||||
| //import引入的组件需要注入到对象中才能使用 | //import引入的组件需要注入到对象中才能使用 | ||||
| components: { Nav, Footer, CompanyItem, Pagination, SearchInput }, | |||||
| components: { Nav, Footer, CompanyItem, Pagination, SearchInput, EmptyData }, | |||||
| mixins: [handlePageNation], | mixins: [handlePageNation], | ||||
| data() { | data() { | ||||
| //这里存放数据 | //这里存放数据 | ||||
| ownerIndustry: "", // 所属行业 | ownerIndustry: "", // 所属行业 | ||||
| }, | }, | ||||
| total: 0, | total: 0, | ||||
| dataList: [], | |||||
| dataList: null, | |||||
| industryList: [], | industryList: [], | ||||
| }; | }; | ||||
| }, | }, |
| </span> | </span> | ||||
| </div> | </div> | ||||
| <search-box @search-data="searchData"></search-box> | <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> | <question-list :list="dataList"></question-list> | ||||
| <div class="pagination_box"> | <div class="pagination_box"> | ||||
| <Pagination | <Pagination | ||||
| ></Pagination> | ></Pagination> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div v-else class="no_data"> | |||||
| <empty-data :ifShowDescription="true"></empty-data> | |||||
| </div> | |||||
| </div> | </div> | ||||
| </template> | </template> | ||||
| import SearchBox from "./components/SearchBox.vue"; | import SearchBox from "./components/SearchBox.vue"; | ||||
| import QuestionList from "./components/QuestionList.vue"; | import QuestionList from "./components/QuestionList.vue"; | ||||
| import Pagination from "@components/Pagination.vue"; | import Pagination from "@components/Pagination.vue"; | ||||
| import EmptyData from "@components/EmptyData.vue"; | |||||
| // import { getCompanyNewsList } from "@api/company"; | // import { getCompanyNewsList } from "@api/company"; | ||||
| import { handlePageNation } from "@mixin/pageNationMixin"; | import { handlePageNation } from "@mixin/pageNationMixin"; | ||||
| import { questionList } from "@mixin/questionMixin"; | import { questionList } from "@mixin/questionMixin"; | ||||
| export default { | export default { | ||||
| //import引入的组件需要注入到对象中才能使用 | //import引入的组件需要注入到对象中才能使用 | ||||
| components: { SearchBox, QuestionList, Pagination }, | |||||
| components: { SearchBox, QuestionList, Pagination, EmptyData }, | |||||
| mixins: [handlePageNation, questionList], | mixins: [handlePageNation, questionList], | ||||
| data() { | data() { | ||||
| //这里存放数据 | //这里存放数据 | ||||
| type: "", | type: "", | ||||
| }, | }, | ||||
| total: 0, | total: 0, | ||||
| dataList: [], | |||||
| dataList: null, | |||||
| }; | }; | ||||
| }, | }, | ||||
| //监听属性 类似于data概念 | //监听属性 类似于data概念 | ||||
| text-align: right; | text-align: right; | ||||
| } | } | ||||
| } | } | ||||
| .no_data { | |||||
| background: #f7fbff; | |||||
| } | |||||
| </style> | </style> |
| <search-box></search-box> | <search-box></search-box> | ||||
| <section class="detail_box"> | <section class="detail_box"> | ||||
| <div class="title_box">您搜索的关键词:{{ this.queryParams.search }}</div> | <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> | <question-list :list="dataList"></question-list> | ||||
| <div class="pagination_box"> | <div class="pagination_box"> | ||||
| <Pagination | <Pagination | ||||
| ></Pagination> | ></Pagination> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div v-else class="no_data"> | |||||
| <empty-data :ifShowDescription="true"></empty-data> | |||||
| </div> | |||||
| </section> | </section> | ||||
| </div> | </div> | ||||
| </template> | </template> | ||||
| import SearchBox from "./components/SearchBox.vue"; | import SearchBox from "./components/SearchBox.vue"; | ||||
| import Pagination from "@components/Pagination.vue"; | import Pagination from "@components/Pagination.vue"; | ||||
| import QuestionList from "./components/QuestionList.vue"; | import QuestionList from "./components/QuestionList.vue"; | ||||
| import EmptyData from "@components/EmptyData.vue"; | |||||
| import { handlePageNation } from "@mixin/pageNationMixin"; | import { handlePageNation } from "@mixin/pageNationMixin"; | ||||
| import { questionList } from "@mixin/questionMixin"; | import { questionList } from "@mixin/questionMixin"; | ||||
| export default { | export default { | ||||
| //import引入的组件需要注入到对象中才能使用 | //import引入的组件需要注入到对象中才能使用 | ||||
| components: { SearchBox, Pagination, QuestionList }, | |||||
| components: { SearchBox, Pagination, QuestionList, EmptyData }, | |||||
| mixins: [handlePageNation, questionList], | mixins: [handlePageNation, questionList], | ||||
| data() { | data() { | ||||
| //这里存放数据 | //这里存放数据 | ||||
| type: "", | type: "", | ||||
| }, | }, | ||||
| total: 0, | total: 0, | ||||
| dataList: [], | |||||
| dataList: null, | |||||
| }; | }; | ||||
| }, | }, | ||||
| //监听属性 类似于data概念 | //监听属性 类似于data概念 |
| proxy: { | proxy: { | ||||
| "/domain": { | "/domain": { | ||||
| // target: "http://localhost:80", | // 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, | changeOrigin: true, | ||||
| pathRewrite: { | pathRewrite: { | ||||
| "^/domain": "", | "^/domain": "", |