@@ -6,7 +6,6 @@ export const questionList = { | |||
this.pageLoading = true; | |||
getCompanyNewsList(this.queryParams) | |||
.then(res => { | |||
console.log(res.data); | |||
if (res.data.status == 0) { | |||
this.dataList = res.data.data.list; | |||
this.total = res.data.data.total; |
@@ -95,8 +95,9 @@ export default { | |||
} | |||
.is-active button::after, | |||
.el-carousel__indicator:hover button::after { | |||
opacity: 0.72; | |||
background: #0086e7; | |||
opacity: 0.72; | |||
background: #0086e7; | |||
} | |||
} | |||
</style> | |||
@@ -3,10 +3,13 @@ | |||
<Banner></Banner> | |||
<div> | |||
<park-introduce :navLists="indexTab" :parkInfo="parkInfo"></park-introduce> | |||
<!-- 产业导向和发展方向 --> | |||
<ParkCard :name="'industrialOrientation'" :data="industrialOrientation" /> | |||
<product :leadingIndustryArr="leadingIndustryArr"></product> | |||
<service></service> | |||
<advantage></advantage> | |||
<park-map :address="address"></park-map> | |||
<ParkCard :name="'surroundingFacilities'" :data="surroundingFacilities" /> | |||
<Footer></Footer> | |||
<slide-nav :navLists="indexTab"></slide-nav> | |||
</div> | |||
@@ -23,6 +26,7 @@ import ParkMap from "./ParkMap.vue"; | |||
import Footer from "@components/Footer.vue"; | |||
import SlideNav from "./SlideNav.vue"; | |||
import { getRegisterArea } from "@api/index"; | |||
import ParkCard from "./ParkCard.vue"; | |||
export default { | |||
metaInfo: { | |||
@@ -37,6 +41,7 @@ export default { | |||
ParkMap, | |||
Footer, | |||
SlideNav, | |||
ParkCard, | |||
}, | |||
data() { | |||
return { | |||
@@ -70,6 +75,10 @@ export default { | |||
parkInfo: null, | |||
leadingIndustryArr: [], | |||
address: null, | |||
// 产业导向和发展方向 | |||
industrialOrientation: null, | |||
// 周边配套 | |||
surroundingFacilities: null, | |||
}; | |||
}, | |||
computed: {}, | |||
@@ -80,21 +89,28 @@ export default { | |||
methods: { | |||
getRegisterArea() { | |||
getRegisterArea() | |||
.then(res => { | |||
console.log(res.data,'获取地图数据'); | |||
.then((res) => { | |||
// console.log(res.data, "获取地图数据"); | |||
if (res.data.status == 0) { | |||
this.parkInfo = res.data.data[0]; | |||
this.address = { | |||
lng: this.parkInfo.map.lng, | |||
lat: this.parkInfo.map.lat, | |||
}; | |||
this.leadingIndustryArr = this.parkInfo.leadingIndustryList; | |||
this.leadingIndustryArr = | |||
this.parkInfo.leadingIndustryList; | |||
this.industrialOrientation = | |||
this.parkInfo.industrialOrientation; | |||
this.surroundingFacilities = | |||
this.parkInfo.surroundingFacilities; | |||
} else { | |||
this.$message.error(`获取数据失败,请刷新重试!`); | |||
} | |||
}) | |||
.catch(err => { | |||
this.$message.error(`获取数据失败,失败原因${err},请刷新重试!`); | |||
.catch((err) => { | |||
this.$message.error( | |||
`获取数据失败,失败原因${err},请刷新重试!` | |||
); | |||
}); | |||
}, | |||
}, |
@@ -0,0 +1,97 @@ | |||
<template> | |||
<div class="park_card" :class="[name]" v-if="data"> | |||
<div class="card_title">{{ cardData[name] }}</div> | |||
<div class="card_content"> | |||
<div class="html_box"> | |||
<span v-html="floamtStr(data)"></span> | |||
</div> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
export default { | |||
props: { | |||
// 类型名称 | |||
name: { | |||
type: String, | |||
default: "", | |||
}, | |||
// 数据 | |||
data: { | |||
type: String, | |||
default: "", | |||
}, | |||
}, | |||
data() { | |||
return { | |||
cardData: { | |||
// 产业导向和发展方向 | |||
industrialOrientation: "产业导向和发展方向", | |||
// 周边配套 | |||
surroundingFacilities: "周边配套", | |||
}, | |||
}; | |||
}, | |||
methods: { | |||
floamtStr(str) { | |||
return str.replace(/\n/g, "<br/>"); | |||
}, | |||
}, | |||
}; | |||
</script> | |||
<style lang="scss" scoped> | |||
.park_card { | |||
@include size(100%, auto); | |||
@include flex(column, space-between, center, null); | |||
// | |||
padding-bottom: 100px; | |||
@include border-box; | |||
.card_title { | |||
@include font(36px, $color-white); | |||
padding: 60px 0 100px; | |||
@include border-box; | |||
} | |||
.card_content { | |||
width: 1200px; | |||
color: #fff; | |||
font-size: 36px; | |||
line-height: 50px; | |||
margin-top: 30px; | |||
} | |||
&.industrialOrientation { | |||
background: url("~@assets/image/index/bg_industrialOrientation.png") | |||
no-repeat; | |||
background-size: 100% 100%; | |||
} | |||
&.surroundingFacilities { | |||
background: url("~@assets/image/index/bg_surroundingFacilities.png") | |||
no-repeat; | |||
background-size: 100% 100%; | |||
.html_box { | |||
background: linear-gradient( | |||
90deg, | |||
rgba(60, 220, 234, 0.2) 0%, | |||
rgba(60, 220, 234, 0) 100% | |||
); | |||
border-radius: 8px; | |||
box-sizing: border-box; | |||
padding: 20px; | |||
} | |||
.card_title { | |||
padding-bottom: 40px; | |||
} | |||
.card_content { | |||
font-size: 16px; | |||
line-height: 30px; | |||
} | |||
} | |||
// &.surroundingFacilities .html_box { | |||
// background: linear-gradient(90deg, rgba(60, 220, 234, 0.2) 0%, rgba(60, 220, 234, 0) 100%); | |||
// border-radius: 8px; | |||
// } | |||
} | |||
</style> |
@@ -179,7 +179,6 @@ export default { | |||
this.serviceLoading = true; | |||
getParkServiceProduct(this.queryParams) | |||
.then(res => { | |||
console.log(res.data); | |||
if (res.data.status == 0) { | |||
this.tempList1 = res.data.data.list; | |||
this.lists = this.tempList1; | |||
@@ -197,7 +196,6 @@ export default { | |||
this.serviceLoading = true; | |||
getPropertyManage(this.queryParams) | |||
.then(res => { | |||
console.log(res.data); | |||
if (res.data.status == 0) { | |||
this.tempList2 = res.data.data.list; | |||
} else { |
@@ -1,18 +1,16 @@ | |||
<!-- 资讯列表页 --> | |||
<template> | |||
<div class=""> | |||
<div class> | |||
<div class="tab_box"> | |||
<span | |||
v-for="(item, index) in tabs" | |||
:class="['pointer', activeTab === index ? 'active' : '']" | |||
:key="item.itemId" | |||
@click="changeTab(index)" | |||
> | |||
{{ item.text }} | |||
</span> | |||
>{{ item.text }}</span> | |||
</div> | |||
<div v-loading="pageLoading" element-loading-text="数据加载中"> | |||
<search-box @search-data="searchData"></search-box> | |||
<search-box @search-data="searchData" :dropdownList="dropdownList"></search-box> | |||
<div class="detail_box" v-if="dataList && dataList.length > 0"> | |||
<question-list :list="dataList"></question-list> | |||
<div class="pagination_box"> | |||
@@ -58,9 +56,14 @@ export default { | |||
pageSize: 10, | |||
search: "", | |||
type: "", | |||
policyCategory: "", | |||
}, | |||
tempPolicyCategory: "", | |||
total: 0, | |||
dataList: null, | |||
// 下拉选项 | |||
tabDropdown: [], | |||
dropdownList: [], | |||
}; | |||
}, | |||
//监听属性 类似于data概念 | |||
@@ -74,7 +77,15 @@ export default { | |||
changeTab(index) { | |||
this.activeTab = index; | |||
this.queryParams.type = this.tabs[index].itemId; | |||
this.getData(); | |||
if (this.tabs[index].itemId == "012-0182fd1fe3aa2aaf") { | |||
this.dropdownList = this.$cloneDeep(this.tabDropdown); | |||
this.queryParams.policyCategory = this.tempPolicyCategory; | |||
} else { | |||
this.dropdownList = []; | |||
this.queryParams.policyCategory = ""; | |||
} | |||
}, | |||
// getData() { | |||
// this.pageLoading = true; | |||
@@ -95,7 +106,10 @@ export default { | |||
// }, | |||
//搜索 | |||
searchData(val) { | |||
this.queryParams.search = val; | |||
this.queryParams.search = val.searchInput; | |||
this.tempPolicyCategory = | |||
val.cutCommand == "all" ? "" : val.cutCommand; | |||
this.queryParams.policyCategory = this.tempPolicyCategory; | |||
this.queryParams.page = 1; | |||
this.getData(); | |||
}, | |||
@@ -114,6 +128,7 @@ export default { | |||
//生命周期 - 创建完成(可以访问当前this实例) | |||
created() { | |||
this.tabs = this.tabList.yuanquzixun_zixunleixing8; | |||
this.tabDropdown = this.tabList.yuanquzixun_chanyezhengcexiaolei; | |||
this.queryParams.type = this.tabs[0].itemId; | |||
this.getData(); | |||
}, |
@@ -3,7 +3,7 @@ | |||
<div class="search_box"> | |||
<img class="info_img" src="@assets/image/company/icon_info.png" alt="园区知识库" /> | |||
<span class="search_title">园区知识库</span> | |||
<search-input @search-data="searchData"></search-input> | |||
<search-input @search-data="searchData" :tagName="'question'" :dropdownList="dropdownList"></search-input> | |||
</div> | |||
</template> | |||
@@ -13,6 +13,11 @@ import SearchInput from "./SearchInput.vue"; | |||
//例如:import 《组件名称》 from '《组件路径》'; | |||
export default { | |||
props: { | |||
dropdownList: { | |||
type: Array, | |||
}, | |||
}, | |||
//import引入的组件需要注入到对象中才能使用 | |||
components: { SearchInput }, | |||
data() { | |||
@@ -26,12 +31,19 @@ export default { | |||
//方法集合 | |||
methods: { | |||
searchData(val) { | |||
this.$router.push({ | |||
path: "/park-information/question-search", | |||
query: { | |||
searchWord: val, | |||
}, | |||
}); | |||
if (val.cutCommand) { | |||
this.$emit("search-data", { | |||
searchInput: val.searchInput, | |||
cutCommand: val.cutCommand, | |||
}); | |||
} else { | |||
this.$router.push({ | |||
path: "/park-information/question-search", | |||
query: { | |||
searchWord: val.searchInput, | |||
}, | |||
}); | |||
} | |||
}, | |||
}, | |||
//生命周期 - 创建完成(可以访问当前this实例) |
@@ -1,6 +1,6 @@ | |||
<!-- --> | |||
<template> | |||
<div class="input_box"> | |||
<div class="input_box" :class="[tagName]"> | |||
<el-input | |||
placeholder="请输入搜索内容" | |||
v-model.trim="searchInput" | |||
@@ -9,6 +9,22 @@ | |||
@clear="clearKeyWord" | |||
> | |||
<div slot="prefix" class="icon_box"> | |||
<el-dropdown v-if="tagName=='question'" @command="handleCommand" trigger="click"> | |||
<span class="el-dropdown-link"> | |||
{{ getDropdownTitle() }} | |||
<i class="el-icon-arrow-down el-icon--right"></i> | |||
</span> | |||
<el-dropdown-menu slot="dropdown"> | |||
<el-dropdown-item command="all" :disabled="cutCommand == 'all'">全部</el-dropdown-item> | |||
<el-dropdown-item | |||
v-for="(item,inx) of dropdownList" | |||
:key="inx" | |||
:command="item.itemId" | |||
:disabled="cutCommand == item.itemId" | |||
>{{ item.text }}</el-dropdown-item> | |||
</el-dropdown-menu> | |||
</el-dropdown> | |||
<span class="shu" v-if="tagName=='question'">|</span> | |||
<img src="@assets/image/company/icon_search.png" alt="搜索" /> | |||
</div> | |||
<div slot="append" class="pointer" @click="searchByKeyword">搜索</div> | |||
@@ -21,12 +37,24 @@ | |||
//例如:import 《组件名称》 from '《组件路径》'; | |||
export default { | |||
props: { | |||
// 标签名字,用来切换样式 | |||
tagName: { | |||
type: String, | |||
default: "", | |||
}, | |||
dropdownList: { | |||
type: Array, | |||
default:()=>[], | |||
}, | |||
}, | |||
//import引入的组件需要注入到对象中才能使用 | |||
components: {}, | |||
data() { | |||
//这里存放数据 | |||
return { | |||
searchInput: "", | |||
cutCommand: "all", | |||
}; | |||
}, | |||
//监听属性 类似于data概念 | |||
@@ -35,12 +63,41 @@ export default { | |||
watch: {}, | |||
//方法集合 | |||
methods: { | |||
getDropdownTitle(){ | |||
let title = "全部"; | |||
this.dropdownList.forEach(el=>{ | |||
if(el.itemId == this.cutCommand){ | |||
title = el.text; | |||
} | |||
}) | |||
return title; | |||
}, | |||
handleCommand(command) { | |||
this.cutCommand = command; | |||
this.getDropdownTitle(); | |||
this.searchByKeyword(); | |||
}, | |||
searchByKeyword() { | |||
this.$emit("search-data", this.searchInput); | |||
if (this.tagName == "question") { | |||
this.$emit("search-data", { | |||
searchInput: this.searchInput, | |||
cutCommand: this.cutCommand, | |||
}); | |||
} else { | |||
this.$emit("search-data", this.searchInput); | |||
} | |||
}, | |||
clearKeyWord() { | |||
this.searchInput = ""; | |||
this.$emit("search-data", this.searchInput); | |||
this.cutCommand = "all"; | |||
if (this.tagName == "question") { | |||
this.$emit("search-data", { | |||
searchInput: this.searchInput, | |||
cutCommand: "all", | |||
}); | |||
} else { | |||
this.$emit("search-data", this.searchInput); | |||
} | |||
}, | |||
}, | |||
//生命周期 - 创建完成(可以访问当前this实例) | |||
@@ -88,5 +145,19 @@ export default { | |||
height: 100%; | |||
line-height: 60px; | |||
} | |||
&.question { | |||
.shu { | |||
margin: 0 20px; | |||
} | |||
::v-deep .el-input__prefix{ | |||
width: 176px; | |||
} | |||
::v-deep .el-input__inner { | |||
padding-left: 182px; | |||
} | |||
} | |||
.el-dropdown-link { | |||
cursor: pointer; | |||
} | |||
} | |||
</style> |
@@ -26,12 +26,12 @@ module.exports = { | |||
// target: "http://localhost:8089", | |||
// 测试环境 | |||
// target: "http://192.168.18.236:18888/", | |||
// 临时测试环境 | |||
// 线上测试环境 | |||
target: "http://park.test.hhrchina.com/", | |||
// 谢老师 | |||
// target: "http://192.168.18.138:18888/", | |||
// 阚老师 | |||
// target: "http://192.168.18.121:18888/", | |||
// target: "http://192.168.18.7:18888/", | |||
// 何老师 | |||
// target: "http://192.168.30.48:18888/", | |||
changeOrigin: true, |