Commit 8fdc3370 by 李长胜

客户数据概览banner图按钮加上map热点区域

1 parent 78970ca6
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
<div class="bannerWrapBox" v-if="isHasCustomerCountBanner"> <div class="bannerWrapBox" v-if="isHasCustomerCountBanner">
<!-- <img src="@/assets/clientDetail/defaultAvator.png" class="inTimeBtn" alt="" /> --> <!-- <img src="@/assets/clientDetail/defaultAvator.png" class="inTimeBtn" alt="" /> -->
<img class="bannerWrap" usemap="#planetmap" src="@/assets/clientDataOverview/companyBanner.png" alt="" /> <img class="bannerWrap" usemap="#planetmap" src="@/assets/clientDataOverview/companyBanner.png" alt="" />
<map name="planetmap" id="planetmap" style="cursor: pointer;"> <map name="planetmap" id="planetmap" style="cursor: pointer">
<!-- 0-200m onclick="getCorePhoth('1')" --> <!-- href="https://www.baidu.com" -->
<area shape="rect" coords="849,97,933,121" href="https://www.baidu.com" target="_blank" /> <area shape="rect" coords="849,97,933,121" @click="goNextPage" target="_blank" />
</map> </map>
</div> </div>
<h3 class="pageSubTitle">客户分层</h3> <h3 class="pageSubTitle">客户分层</h3>
...@@ -147,8 +147,8 @@ ...@@ -147,8 +147,8 @@
<template v-if="isShowBarMap"> <template v-if="isShowBarMap">
<span class="timeDuring">{{ allMapList[0].dateTime }}~{{ allMapList[allMapList.length - 1].dateTime }}</span> <span class="timeDuring">{{ allMapList[0].dateTime }}~{{ allMapList[allMapList.length - 1].dateTime }}</span>
<span class="lastest">近{{ timeGap }}天</span> <span class="lastest">近{{ timeGap }}天</span>
<button class="btn30 optionBtn" @click="clickThirty">近30天</button> <button class="btn30 optionBtn" :class="{ activeDayIcon: this.timeGap == 30 }" @click="clickThirty">近30天</button>
<button class="btn7 optionBtn" @click="clickSeven">近7天</button> <button class="btn7 optionBtn" :class="{ activeDayIcon: this.timeGap == 7 }" @click="clickSeven">近7天</button>
<div class="clientAddTrend"> <div class="clientAddTrend">
<div class="one1"> <div class="one1">
<span>区间统计:</span> <span>区间统计:</span>
...@@ -187,7 +187,8 @@ ...@@ -187,7 +187,8 @@
</template> </template>
<script> <script>
// import $ from 'jquery' import $ from 'jquery'
import { rwdImageMaps } from './jquery.rwdImageMaps.js'
import { getDataOverview, getDataOverviewBarMap } from '@/api/modules/clientDataOverview' import { getDataOverview, getDataOverviewBarMap } from '@/api/modules/clientDataOverview'
import { getLoginCount } from '@/api/modules/loginCount' import { getLoginCount } from '@/api/modules/loginCount'
import pieEchart from '@/components/echarts/pieEchart' import pieEchart from '@/components/echarts/pieEchart'
...@@ -266,12 +267,6 @@ export default { ...@@ -266,12 +267,6 @@ export default {
mounted() { mounted() {
document.body.style.overflow = 'hidden' document.body.style.overflow = 'hidden'
// this.$nextTick(()=>{
// $(document).ready(function (e) {
// console.log('....')
// $('img[usemap]').rwdImageMaps();
// });
// })
}, },
computed: { computed: {
isEmptyObj() { isEmptyObj() {
...@@ -314,8 +309,8 @@ export default { ...@@ -314,8 +309,8 @@ export default {
} }
}, 1000) }, 1000)
//要引流企微魔方 //要引流企微魔方
this.getDataOverviewFun() // this.getDataOverviewFun()
this.getDataOverviewBarMapFun() // this.getDataOverviewBarMapFun()
}, },
//引流企微按钮暂时效果 //引流企微按钮暂时效果
toGuideCompanyWechat() { toGuideCompanyWechat() {
...@@ -417,6 +412,9 @@ export default { ...@@ -417,6 +412,9 @@ export default {
this.isHasCustomerCountBanner = false this.isHasCustomerCountBanner = false
} else { } else {
this.isHasCustomerCountBanner = true this.isHasCustomerCountBanner = true
this.$nextTick(() => {
$('img[usemap]').rwdImageMaps()
})
} }
console.log(this.isHasCustomerCountBanner, 'true/fasle') console.log(this.isHasCustomerCountBanner, 'true/fasle')
this.$set(this.titles[0], 'num', res.newCarCustomerCount) this.$set(this.titles[0], 'num', res.newCarCustomerCount)
...@@ -1012,11 +1010,11 @@ export default { ...@@ -1012,11 +1010,11 @@ export default {
border: 1px solid $borderBlue; border: 1px solid $borderBlue;
color: $btnBlue; color: $btnBlue;
} }
&:focus { }
.activeDayIcon {
border: 1px solid $borderBlue; border: 1px solid $borderBlue;
color: $btnBlue; color: $btnBlue;
} }
} }
}
} }
</style> </style>
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
* http://mattstow.com * http://mattstow.com
* Licensed under the MIT license * Licensed under the MIT license
*/ */
import $ from 'jquery'
import jQuery from 'jquery'
;(function($) { ;(function($) {
$.fn.rwdImageMaps = function() { $.fn.rwdImageMaps = function() {
var $img = this; var $img = this;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!