Browse Source

首页改造完成

master
unknown 11 months ago
parent
commit
b5b234efe3
  1. BIN
      src/assets/images/swiperLeft.png
  2. BIN
      src/assets/images/swiperRight.png
  3. 18
      src/assets/styles/base.css
  4. BIN
      src/assets/zlxcimgs/andriod.png
  5. BIN
      src/assets/zlxcimgs/home_image_banner@2x.png
  6. BIN
      src/assets/zlxcimgs/ios.png
  7. 12
      src/components/Foot.vue
  8. 77
      src/components/dstributiondMap.vue
  9. 1
      src/components/foot.scss
  10. 72
      src/components/swiper.vue
  11. 118
      src/components/swiperCoach.vue
  12. 134
      src/components/swiperSchool.vue
  13. 1
      src/main.js
  14. 2
      src/views/drivingMap/index.vue
  15. 66
      src/views/home/index.scss
  16. 95
      src/views/home/index.vue

BIN
src/assets/images/swiperLeft.png

After

Width: 35  |  Height: 63  |  Size: 723 B

BIN
src/assets/images/swiperRight.png

After

Width: 35  |  Height: 63  |  Size: 715 B

18
src/assets/styles/base.css

@ -0,0 +1,18 @@
.towRowTxt {
-webkit-line-clamp: 2;
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
word-wrap: break-word;
text-overflow: ellipsis;
white-space: normal;
}
.oneRowTxt {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

BIN
src/assets/zlxcimgs/andriod.png

After

Width: 21  |  Height: 24  |  Size: 775 B

BIN
src/assets/zlxcimgs/home_image_banner@2x.png

Before

Width: 3840  |  Height: 794  |  Size: 444 KiB

After

Width: 1919  |  Height: 571  |  Size: 2.0 MiB

BIN
src/assets/zlxcimgs/ios.png

After

Width: 18  |  Height: 22  |  Size: 582 B

12
src/components/Foot.vue

@ -4,15 +4,15 @@
<div class="connect-we"> <div class="connect-we">
<div class="caption">联系我们</div> <div class="caption">联系我们</div>
<ul class="message"> <ul class="message">
<li class="msg-li">地址浙江省洛阳市上城区丁兰街道临丁路1190号8楼808</li>
<li class="msg-li">电话0571-56606030</li>
<li class="msg-li">E-Mailhelijun@jaxc.cn</li>
<li class="msg-li">地址xxxxx</li>
<li class="msg-li">电话xxxxx</li>
<li class="msg-li">E-Mailxxxxx</li>
</ul> </ul>
</div> </div>
<div class="connect-we"> <div class="connect-we">
<div class="caption">相关站点</div> <div class="caption">相关站点</div>
<ul class="message"> <ul class="message">
<li class="msg-li" style="width: 359px;"><a class="connect-a" href="http://tb.hangzhou.gov.cn/" target="_blank">杭州交通信息网</a>
<li class="msg-li" style="width: 359px;"><a class="connect-a" href="http://tb.hangzhou.gov.cn/" target="_blank">洛阳交通信息网</a>
<!-- <a class="connect-a" href="http://www.hangzhou.gov.cn/art/2015/11/12/art_1256490_2698.html" target="_blank">洛阳市机动车服务管理局</a> --> <!-- <a class="connect-a" href="http://www.hangzhou.gov.cn/art/2015/11/12/art_1256490_2698.html" target="_blank">洛阳市机动车服务管理局</a> -->
</li> </li>
<!-- <li class="msg-li"><a class="connect-a" href="http://zhejiang.weizhangwang.com/" target="_blank">浙江交通违章查询</a> </li> --> <!-- <li class="msg-li"><a class="connect-a" href="http://zhejiang.weizhangwang.com/" target="_blank">浙江交通违章查询</a> </li> -->
@ -41,9 +41,9 @@
<span class="a-first" target="_bank" href="javascript:void(0);">技术支持杭州钧安科技有限公司</span><br v-if="$store.getters.mobile"/> <span class="a-first" target="_bank" href="javascript:void(0);">技术支持杭州钧安科技有限公司</span><br v-if="$store.getters.mobile"/>
<span class="row"> <span class="row">
<img src="../assets/images/beian.png" alt=""> <img src="../assets/images/beian.png" alt="">
<a href="https://beian.mps.gov.cn/#/query/webSearch?code=33010602013393" target="_bank">浙公网安备33010602013393</a>
<a href="https://beian.mps.gov.cn/#/query/webSearch?code=33010602013393" target="_bank">浙公网安备xxxx</a>
</span> </span>
<a target="_bank" href="https://beian.miit.gov.cn"> 浙ICP备2023051155-1</a>
<a target="_bank" href="https://beian.miit.gov.cn"> 浙ICP备xxxx-1</a>
</div> </div>
</div> </div>
</div> </div>

77
src/components/dstributiondMap.vue

@ -22,7 +22,7 @@ import { ScatterChart } from "echarts/charts";
echarts.use([ScatterChart]); echarts.use([ScatterChart]);
// () // ()
import mapJson from "../assets/luoyang.json"; import mapJson from "../assets/luoyang.json";
const regions = [
let regions = [
// //
{ {
name: "老城区", // name: "老城区", //
@ -148,6 +148,9 @@ const regions = [
normal: { normal: {
areaColor: "#FBE5F1", areaColor: "#FBE5F1",
}, },
emphasis: {
areaColor: "#F7F77A",
}
}, },
}, },
@ -185,63 +188,30 @@ export default {
geo: { geo: {
// //
show: true, show: true,
map: "hangzhou",
map: "louyang",
label: { label: {
normal: { normal: {
show: true, // show: true, //
textStyle: {
color: "#333", //
fontSize: 12, //
}
}, },
emphasis: { emphasis: {
show: false, show: false,
}, },
}, },
roam: false, roam: false,
itemStyle: { itemStyle: {
normal: { normal: {
borderWidth: 2,
borderColor: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 2,
colorStops: [{
offset: 0, color: 'rgba(100,100,100, 0.6)' // 0%
}, {
offset: 1, color: 'rgba(242,242,242, 0.1)' // 100%
}],
global: false // false
}, //
areaColor: "#F4F4F8", //
label: {
show: true,
textStyle: {
color: "#6495ED", //
fontSize: 20, //
},
},
// borderWidth: 1,
borderColor: '#fff', //
}, },
emphasis: { emphasis: {
// //
borderWidth: 1, borderWidth: 1,
borderColor: 'rgba(234,229,229,0.7)',
color: {
type: 'radial',
x: 0.6,
y: 0.6,
r: 1,
colorStops: [{
offset: 0, color: '#CBCBD8' // 0%
}, {
offset: 1, color: 'rgba(251,251,253, 0.4)' // 100%
}],
global: false // false
},
label: {
show: true,
textStyle: {
color: "#000",
},
},
borderColor: '#fff',
}, },
}, },
regions: regions, regions: regions,
@ -268,7 +238,12 @@ export default {
}, },
}, },
mounted() { mounted() {
regions = regions.map((item)=>{
this.$set(item.itemStyle, 'emphasis', {areaColor : '#F7F77A'})
return item
})
this.initCharts(); this.initCharts();
}, },
beforeDestroy() { beforeDestroy() {
if (!this.dismapchart) { if (!this.dismapchart) {
@ -299,11 +274,12 @@ export default {
let mapDom = this.$refs.dismapchart; let mapDom = this.$refs.dismapchart;
this.dismapchart = echarts.init(mapDom); this.dismapchart = echarts.init(mapDom);
// //
echarts.registerMap("hangzhou", mapJson, {});
echarts.registerMap("louyang", mapJson, {});
let myOption = { let myOption = {
// echarts // echarts
tooltip: { tooltip: {
trigger: "item", trigger: "item",
}, },
geo: this.geo, geo: this.geo,
series: [ series: [
@ -315,7 +291,7 @@ export default {
formatter: (p) => { formatter: (p) => {
let dataCon = p.data; let dataCon = p.data;
let txtCon = dataCon.name; let txtCon = dataCon.name;
return "";
return txtCon+':'+ dataCon.num;
}, },
}, },
name: "", name: "",
@ -324,13 +300,11 @@ export default {
symbolSize: 40, symbolSize: 40,
coordinateSystem: "geo", coordinateSystem: "geo",
data: this.convertData(this.sanData), data: this.convertData(this.sanData),
// showEffectOn: "emphasis",
showEffectOn: "emphasis",
rippleEffect: { rippleEffect: {
brushType: "stroke", brushType: "stroke",
}, },
emphasis: {
areaColor: "#EC9D4B", //
},
hoverAnimation: true, hoverAnimation: true,
label: { label: {
normal: { normal: {
@ -349,10 +323,6 @@ export default {
normal: { normal: {
color: "#FEC006", color: "#FEC006",
}, },
emphasis: {
label: { show: true },
areaColor: "#749f83", //
},
}, },
}, },
], ],
@ -362,7 +332,6 @@ export default {
window.addEventListener("resize", this.dismapchart.resize); window.addEventListener("resize", this.dismapchart.resize);
// //
this.dismapchart.on("click", function (params) { this.dismapchart.on("click", function (params) {
console.log("click", params);
// if (params.value) { // if (params.value) {
// centerPoint = params.value; // centerPoint = params.value;
// } else { // } else {

1
src/components/foot.scss

@ -21,6 +21,7 @@
background: #E3E3E4; background: #E3E3E4;
border-radius: 10px; border-radius: 10px;
margin-right: 20px; margin-right: 20px;
min-width: 400px;
.caption{ .caption{
font-size: 22px; font-size: 22px;
font-weight: 600; font-weight: 600;

72
src/components/swiper.vue

@ -46,6 +46,21 @@
<el-input class="search-input" v-model="drivingSchool" placeholder="请输入您要搜索的驾校" @change="tabSearchInput"></el-input> <el-input class="search-input" v-model="drivingSchool" placeholder="请输入您要搜索的驾校" @change="tabSearchInput"></el-input>
<div class="btn" @click="tabSearchInput">搜索</div> <div class="btn" @click="tabSearchInput">搜索</div>
</div> </div>
<div class="downLoad">
<div class="qrCode">
<img src="../assets/zlxcimgs/category_icon01@2x.png" alt="">
</div>
<div class="phoneType">
<div class="typeItem">
<div class="icon"><img src="../assets/zlxcimgs/ios.png" alt=""></div>
<div class="txt">ios</div>
</div>
<div class="typeItem">
<div class="icon"><img src="../assets/zlxcimgs/andriod.png" alt=""></div>
<div class="txt">andriod</div>
</div>
</div>
</div>
</div> </div>
</div> </div>
</template> </template>
@ -120,18 +135,18 @@ export default {
.swiper-area{ .swiper-area{
width: 100vw; width: 100vw;
min-width: 1400px; min-width: 1400px;
height: 397px;
height: 571px;
position: relative; position: relative;
top: 0; top: 0;
left: 0; left: 0;
/deep/ .swiper-container-autoheight, .swiper-container-autoheight .swiper-slide{
height: 397px;
/deep/ .swiper-container-autoheight, .swiper-container-autoheight .swiper-slide, .banner-item{
height: 571px;
} }
.swiper-search{ .swiper-search{
width: 40%; width: 40%;
position: absolute; position: absolute;
top: 18%; top: 18%;
left: 14%;
right: 10%;
z-index: 999; z-index: 999;
.search-title{ .search-title{
display: flex; display: flex;
@ -186,4 +201,53 @@ export default {
} }
} }
} }
.downLoad {
display: flex;
align-items: center;
padding-top: 30px;
.qrCode {
width: 114px;
height: 114px;
padding: 6px;
background: rgba(255,255,255,0.6);
img {
display: block;
width: 100%;
height: 100%;
}
}
.phoneType {
padding-left: 20px;
display: flex;
flex-direction: column;
justify-content: center;
.typeItem {
display: flex;
align-items: center;
// justify-content: center;
width: 106px;
height: 30px;
border-radius: 6px;
margin-bottom: 10px;
background: #fff;
.icon {
width: 20px;
height: 20px;
margin: 0 10px;
img {
display: block;
width: 100%;
height: 100%;
}
}
.txt {
font-size: 16px;
color: #333;
}
}
}
}
</style> </style>

118
src/components/swiperCoach.vue

@ -0,0 +1,118 @@
<template>
<div>
<div class="swiper-container">
<swiper :options="swiperOption" ref="myswiper">
<swiper-slide v-for="(item, index) in swiperCoachlList" :key="index" >
<div class="swiper-slide_inner">
<div class="cover">
<img :src="item.image" alt="">
<div class="text">
<div class="txt oneRowTxt">{{ item.coachName }} <span style="margin-left: 10px;">{{ item.teachModel }}</span></div>
<div class="txt oneRowTxt">{{ item.schoolName }}</div>
</div>
</div>
</div>
</swiper-slide>
<!-- <div class="swiper-pagination" slot="pagination"></div> -->
</swiper>
<div class="swiper-button-prev "></div>
<div class="swiper-button-next"></div>
</div>
</div>
</template>
<script>
import { swiper, swiperSlide } from 'vue-awesome-swiper'
export default {
components: { swiper, swiperSlide },
props: ['swiperCoachlList'],
data() {
return {
swiperOption: {
loop: false,
autoplay: 3000,
speed: 1000,
slidesPerView: 5,
spaceBetween: 10,
paginationClickable: true,
pagination: {
el: '.swiper-pagination',
clickable: true
},
navigation: {
nextEl: '.swiper-button-prev',
prevEl: '.swiper-button-next'
}
},
}
},
monted() {
}
}
</script>
<style lang="scss" scoped>
.swiper-slide_inner {
width: 232px;
height: 314px;
border: 1px solid rgba(148, 148, 148, 0.4);
box-sizing: border-box;
// overflow: hidden;
.cover {
width: 100%;
background: #f6f6f6;
height: 100%;
position: relative;
img {
width: 100%;
height: 100%;
display: block;
}
.text {
padding: 20px 0 0 20px;
box-sizing: border-box;
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 96px;
z-index: 99;
background: rgba(236,157,75, 0.7);
.txt {
font-size: 18px;
color: #fff;
&:first-child {
margin-bottom: 10px;
}
}
}
}
}
.swiper-button-prev {
background: url('../assets/images/swiperLeft.png');
background-size: 27px 44px;
margin-left: 20px;
}
.swiper-button-next {
background: url('../assets/images/swiperRight.png');
background-size: 27px 44px;
margin-right: 20px;
}
</style>

134
src/components/swiperSchool.vue

@ -0,0 +1,134 @@
<template>
<div>
<div class="swiper-container">
<swiper :options="swiperOption" ref="myswiper">
<swiper-slide v-for="(item, index) in swiperSchoolList" :key="index" class="slide1">
<div class="swiper-slide_inner">
<div class="cover">
<img :src="item.chargeBulletinBoard" alt="">
</div>
<div class="text">
<div class="txt oneRowTxt">{{ item.schoolName}}</div>
<div class="txt oneRowTxt">{{ item.commonPhone }}</div>
</div>
</div>
</swiper-slide>
<!-- <div class="swiper-pagination" slot="pagination"></div> -->
</swiper>
<div class="swiper-button-prev2"></div>
<div class="swiper-button-next2"></div>
<!-- <div class="swiper-button-prev2" slot="button-prev"> </div> -->
<!-- <div class="swiper-button-next2" slot="button-next"> </div> -->
</div>
</div>
</template>
<script>
// import { swiper, swiperSlide } from 'vue-awesome-swiper'
export default {
// components: { swiper, swiperSlide },
props: ['swiperSchoolList'],
data() {
return {
swiperOption: {
loop: true,
autoplay: 3000,
slidesPerView: 'auto',
speed: 600,
slidesPerView: 4,
spaceBetween: 16,
// prevButton: '.swiper-button-prev2',
// nextButton: '.swiper-button-next2',
// pagination: '.swiper-pagination',
paginationClickable: true,
navigation: {
prevEl: '.swiper-button-prev2',
nextEl: '.swiper-button-next2'
}
},
}
},
monted() {
}
}
</script>
<style lang="scss" scoped>
.slide1 {
transition: .2s;
&:hover {
transform: scale(1.05);
}
}
.swiper-container {
padding: 20px 0;
height: 351px;
}
.swiper-slide_inner {
width: 280px;
height: 313px;
// box-shadow: 0px 0px 3px 0px rgba(148, 148, 148, 0.6);
border: 1px solid rgba(148, 148, 148, 0.6);
box-sizing: border-box;
// overflow: hidden;
.cover {
width: 100%;
background: #f6f6f6;
height: 220px;
img {
width: 100%;
height: 100%;
display: block;
}
}
.text {
padding: 20px 0 0 20px;
// border: 1px solid #949494;
box-sizing: border-box;
// border-top: none;
.txt {
font-size: 18px;
color: #333;
&:first-child {
margin-bottom: 10px;
}
}
}
}
.swiper-button-prev2 {
background: url('../assets/images/swiperLeft.png') no-repeat;
background-size: 27px 44px;
position: absolute;
top: 50%;
width: 27px;
height: 44px;
margin-top: -22px;
left: 30px;
// margin-left: 20px;
z-index: 10;
cursor: pointer;
}
.swiper-button-next2 {
background: url('../assets/images/swiperRight.png')no-repeat;
background-size: 27px 44px;
position: absolute;
top: 50%;
width: 27px;
height: 44px;
right: 30px;
// margin-right: 20px;
margin-top: -22px;
z-index: 10;
cursor: pointer;
}
</style>

1
src/main.js

@ -12,6 +12,7 @@ import 'element-ui/lib/theme-chalk/index.css'
import 'swiper/dist/css/swiper.css' import 'swiper/dist/css/swiper.css'
import directive from '@/utils/directives' import directive from '@/utils/directives'
import '@/assets/styles/element-variables.scss' import '@/assets/styles/element-variables.scss'
import '@/assets/styles/base.css'
import 'normalize.css/normalize.css' import 'normalize.css/normalize.css'
import animated from 'animate.css' import animated from 'animate.css'

2
src/views/drivingMap/index.vue

@ -60,7 +60,7 @@ export default {
return { return {
markers: [], markers: [],
map:{ map:{
center: {lng:120.219375416, lat:30.2592444615},//'',120.219375416,30.2592444615
center: {lng:112.477298, lat: 34.682945},//'',
zoom: 12, zoom: 12,
width:'100vw', width:'100vw',
height:'700px' height:'700px'

66
src/views/home/index.scss

@ -39,7 +39,7 @@
position: relative; position: relative;
&::after{ &::after{
content: ""; content: "";
width: 2px;
width: 1px;
height: 59px; height: 59px;
background: #CACACA; background: #CACACA;
position: absolute; position: absolute;
@ -56,7 +56,7 @@
.total-info{ .total-info{
.info-num{ .info-num{
display: inline-block; display: inline-block;
font-size: 60px;
font-size: 50px;
color: #333333; color: #333333;
margin-right: 4px; margin-right: 4px;
} }
@ -258,38 +258,50 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.list-li{
flex-wrap: wrap;
box-sizing: border-box;
.list-li1 {
width: 50%;
padding: 26px 20px ;
display: flex; display: flex;
flex-direction: column;
justify-content: space-between;
width: 382px;
height: 198px;
box-shadow: -1px 1px 13px 1px rgba(50, 50, 50, 0.14);
padding: 26px 18px 28px;
align-items: center;
box-sizing: border-box; box-sizing: border-box;
transition: all .35s ease-in;
-moz-transition: all .35s ease-in;
-webkit-transition: all .35s ease-in;
border-radius: 6px;
&:hover{
background: #4497F8;
transform:translateY(-8px);
.li-info{
color: #ffffff;
margin-bottom: 20px;
.li-time {
width: 83px;
height: 83px;
background: #EC9D4B;
border-radius: 50%;
font-size: 20px;
color: #fff;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex-shrink: 0;
.year {
} }
.li-time{
color: #ffffff;
.date {
} }
} }
.li-info{
.li-info {
width: 0;
flex: 1;
padding-left: 22px;
.title {
font-size: 24px;
color: #333;
margin-bottom: 14px;
}
.text {
font-size: 20px; font-size: 20px;
font-weight: 500;
color: #333333;
line-height: 30px;
color: #999;
} }
.li-time{
font-size: 15px;
color: #999999;
} }
} }
} }

95
src/views/home/index.vue

@ -1,6 +1,6 @@
<template> <template>
<div class="home"> <div class="home">
<my-swiper :bannerList="bannerList"></my-swiper>
<my-swiper :bannerList="bannerList" :pagination="false"></my-swiper>
<div class="home-evaluate"> <div class="home-evaluate">
<div class="home-title">驾培行业服务综合评价</div> <div class="home-title">驾培行业服务综合评价</div>
<div class="evaluate" v-if="homeEvaluate"> <div class="evaluate" v-if="homeEvaluate">
@ -30,7 +30,7 @@
<div class="total-info"> <div class="total-info">
<p class="info-num">{{homeEvaluate.avg}}</p> <p class="info-num">{{homeEvaluate.avg}}</p>
<p class="info-name"></p> <p class="info-name"></p>
<el-rate class="info-rate" v-model="homeEvaluate.avg" disabled text-color="#ff9900" score-template="{score}"></el-rate>
<!-- <el-rate class="info-rate" v-model="homeEvaluate.avg" disabled text-color="#ff9900" score-template="{score}"></el-rate> -->
</div> </div>
</div> </div>
</div> </div>
@ -103,6 +103,21 @@
</div> </div>
<div class="home-layout"> <div class="home-layout">
<div class="home-link"> <div class="home-link">
<p class="title-main">驾校风采</p>
</div>
<swiperSchool :swiperSchoolList="swiperSchoolList" key="2"/>
</div>
<div class="home-layout">
<div class="home-link">
<p class="title-main">明星教练</p>
</div>
<swiperCoach :swiperCoachlList="swiperCoachlList" key="1"/>
</div>
<div class="home-layout">
<div class="home-link">
<p class="title-main">行业动态</p> <p class="title-main">行业动态</p>
<router-link <router-link
tag="div" tag="div"
@ -119,9 +134,17 @@
<div class="home-module"> <div class="home-module">
<div class="module-center" v-if="dataSheetList.length > 0"> <div class="module-center" v-if="dataSheetList.length > 0">
<ul class="about-list"> <ul class="about-list">
<li class="list-li" v-for="item in dataSheetList" :key="item.industryDynamicId" @click="tapJumpDetail(item.industryDynamicId)">
<p class="li-info">{{item.title}}</p>
<p class="li-time">{{item.createDate}}</p>
<li class="list-li1" v-for="item in dataSheetList" :key="item.industryDynamicId" @click="tapJumpDetail(item.industryDynamicId)">
<div class="li-time">
<!-- {{item.createDate}} -->
<div class="year">{{ item.year }}</div>
<div class="date">{{ item.day }}</div>
</div>
<div class="li-info">
<!-- {{item.title}} -->
<div class="title oneRowTxt">{{item.title}}</div>
<div class="text towRowTxt" >{{ item.content }}</div>
</div>
</li> </li>
</ul> </ul>
</div> </div>
@ -242,17 +265,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="home-layout">
<div class="home-title">
<p class="title-main">学员报名缴费全流程</p>
</div>
<div class="home-module" @click="tabJumpDownload">
<img
class="module-img"
src="../../assets/zlxcimgs/home_image_liucheng@2x.png"
>
</div>
</div>
<div class="home-layout"> <div class="home-layout">
<div class="home-link"> <div class="home-link">
<p class="title-main">体检网点</p> <p class="title-main">体检网点</p>
@ -322,6 +335,8 @@
<script> <script>
import DstributiondMap from '@/components/dstributiondMap' import DstributiondMap from '@/components/dstributiondMap'
import swiperSchool from '@/components/swiperSchool'
import swiperCoach from '@/components/swiperCoach'
// //
import BaiduMap from 'vue-baidu-map/components/map/Map.vue' import BaiduMap from 'vue-baidu-map/components/map/Map.vue'
import BmMarkerClusterer from 'vue-baidu-map/components/extra/MarkerClusterer' import BmMarkerClusterer from 'vue-baidu-map/components/extra/MarkerClusterer'
@ -329,7 +344,9 @@ import BmMarker from 'vue-baidu-map/components/overlays/Marker'
import BmLabel from 'vue-baidu-map/components/overlays/Label' import BmLabel from 'vue-baidu-map/components/overlays/Label'
import BmInfoWindow from 'vue-baidu-map/components/overlays/InfoWindow' import BmInfoWindow from 'vue-baidu-map/components/overlays/InfoWindow'
import { queryIndexCollectList, queryGetHospitalList, queryIndexSchoolGroupList, querySimpleIndustryDynamics, queryHomeEvaluate } from '@/api/herbalMedicine'
import { queryIndexCollectList, queryGetHospitalList, queryIndexSchoolGroupList, querySimpleIndustryDynamics, queryHomeEvaluate, queryTrainingSchoolList, queryQueryList } from '@/api/herbalMedicine'
import { formatTime } from '@/utils/common.js' import { formatTime } from '@/utils/common.js'
export default { export default {
@ -340,9 +357,15 @@ export default {
BmMarkerClusterer, BmMarkerClusterer,
BmMarker, BmMarker,
BmLabel, BmLabel,
BmInfoWindow
BmInfoWindow,
swiperSchool,
swiperCoach
}, },
created () { created () {
//
this.getQueryQueryList()
//
this.getQueryTrainingSchoolList()
// //
this.queryIndexCollectList() this.queryIndexCollectList()
this.censusListRequest = setInterval(() => { this.censusListRequest = setInterval(() => {
@ -391,6 +414,8 @@ export default {
// info: '' // info: ''
// } // }
], ],
swiperSchoolList: [],//
swiperCoachlList: [], //
score: 4.5, score: 4.5,
map:{ map:{
center: {lng:120.219375416, lat:30.2592444615},//'',120.219375416,30.2592444615 center: {lng:120.219375416, lat:30.2592444615},//'',120.219375416,30.2592444615
@ -404,6 +429,33 @@ export default {
} }
}, },
methods: { methods: {
//
getQueryQueryList () {
queryQueryList({
pageIndex: 1,
pageSize: 50,
}).then(res => {
if (res.data.length > 0) {
this.swiperCoachlList = res.data
} else {
this.showMessage('未找到结果', "error");
}
})
},
//
getQueryTrainingSchoolList () {
queryTrainingSchoolList({
isPublish: 1,
pageIndex: 1,
pagesize: 50,
}).then(res => {
if (res.data.length > 0) {
this.swiperSchoolList = res.data
} else {
this.showMessage('未找到结果', "error");
}
})
},
// //
queryIndexCollectList () { queryIndexCollectList () {
queryIndexCollectList({}).then(res => { queryIndexCollectList({}).then(res => {
@ -452,7 +504,12 @@ export default {
}).then(res => { }).then(res => {
if (res.data.list.length > 0) { if (res.data.list.length > 0) {
res.data.list.forEach(ele => { res.data.list.forEach(ele => {
ele.createDate = formatTime(ele.createDate)
let data = new Date(ele.createDate);
const year = data.getFullYear()
const month = data.getMonth() + 1
const day = data.getDate()
ele.year = year
ele.day = month.toString().padStart(2,'0') +'/'+ day.toString().padStart(2,'0')
}) })
this.dataSheetList = res.data.list this.dataSheetList = res.data.list
} }

Loading…
Cancel
Save