Commit a970b4b2 by 胡悦

提交

1 parent e23bbd58
......@@ -26,6 +26,7 @@ export default {
},
mounted() {
this.myChart = echarts.init(document.getElementById('map'))
this.chartBindEvent()
},
methods: {
getOptions(data) {
......@@ -101,6 +102,12 @@ export default {
drawMap(data) {
this.mapOption = this.getOptions(data)
this.myChart.setOption(this.mapOption)
},
chartBindEvent() {
// resize
window.addEventListener('resize', () => {
this.myChart.resize()
})
}
}
}
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2023-07-19 17:18:33
* @LastEditors: huyue
* @LastEditTime: 2023-07-26 14:37:47
* @LastEditTime: 2023-07-26 18:02:36
-->
<template>
<div>
......@@ -59,7 +59,6 @@ export default {
}
this.dataList = []
const _data = await this.api.boutique.getSpringbudTrend(params)
console.log(_data)
const _dataList = _data.data.dataList
if (!_dataList.length) {
this.isEmpty = true
......
......@@ -3,73 +3,29 @@
* @Author: huyue
* @Date: 2023-07-05 10:35:43
* @LastEditors: huyue
* @LastEditTime: 2023-07-26 16:56:10
* @LastEditTime: 2023-07-26 17:47:01
-->
<template>
<div class="view-date">
<div>深圳嘀加服务商1 / 深圳嘀加服务商2</div>
<div class="businessTime">业务开始时间:{{businessTime ? new Date(businessTime).format('yyyy-MM-dd') : ''}}
<span class="view-tips">当前门店使用电子券发放,供货模式为嘀加供货</span>
<div>{{boutiqueDate.affiliation}}</div>
<div class="businessTime">业务开始时间:{{boutiqueDate.startTime}}
<span class="view-tips">当前门店使用{{boutiqueDate.isusedElec == '是' ? '电子券发放' :'系统券发放'}},供货模式为{{boutiqueDate.supplyMode}}</span>
</div>
</div>
</template>
<script type='text/ecmascript-6'>
// import datas from '@/utils/data'
import { mapActions } from 'vuex'
export default {
name: 'BoutiqueDetailDate',
props: {
businessTime: String,
yearList: {
type: Array,
default: () => []
},
channelList: {
type: Array,
default: () => []
},
defaultYear: String,
defaultChannel: String
boutiqueDate: Object
},
data() {
return {
isShow: false,
channelShow: false,
year: ''
}
},
mounted() {
const { defaultYear } = this
if (defaultYear) this.setBoutiqueYear(defaultYear)
},
methods: {
...mapActions(['setBoutiqueYear', 'setBoutiqueChannel']),
switchYear() {
this.isShow = !this.isShow
},
selectVal(val) {
this.setBoutiqueYear(val.value)
this.switchYear()
},
// 点击年份之外的内容关闭下拉框
clickOutside() {
this.isShow = false
},
// 展开关闭渠道下拉框
switchChannel() {
this.channelShow = !this.channelShow
},
// 点击渠道之外的内容关闭下拉框
clickChannelOutside() {
this.channelShow = false
},
// 选择渠道触发事件
selectChannelVal(value) {
console.log(value)
this.setBoutiqueChannel(value)
this.$emit('selectChannel', value)
this.switchChannel()
}
}
}
</script>
......@@ -106,7 +62,7 @@ export default {
}
}
.businessTime {
color: #536079;
color: #C9C9C9;
font-size: 14px;
margin-right: 0.97vw;
}
......
......@@ -87,6 +87,12 @@ export default {
console.log(this.merchantid);
const _data = await this.api.boutique.getMerchantOverview({ MerchantId: merchantid, year })
const _dataList = _data.data.dataList[0]
this.$bus.$emit('boutiqueDate', {
startTime: _dataList.startTime,
affiliation: _dataList.affiliation,
isusedElec: _dataList.isusedElec,
supplyMode: _dataList.supplyMode
})
if (_dataList) {
this.boutiqueDetailList.forEach(item => {
item.value = _dataList[item.valueName]
......
......@@ -6,7 +6,7 @@
</template>
<template #content>
<div class="solar-detail-content">
<BoutiqueDetailDate :defaultYear="defaultYear" :dataList="yearList" :businessTime="businessTime"></BoutiqueDetailDate>
<BoutiqueDetailDate :boutiqueDate="boutiqueDate"></BoutiqueDetailDate>
<div class="solar-detail-content-bottom">
<BoutiqueDetailLeft></BoutiqueDetailLeft>
<BoutiqueDetailRight></BoutiqueDetailRight>
......@@ -45,7 +45,8 @@ export default {
value: ''
}
],
businessTime: ''
businessTime: '',
boutiqueDate: {}
}
},
......@@ -61,6 +62,10 @@ export default {
})
this.init()
})
this.$bus.$on('boutiqueDate', data => {
console.log(data, '--==-=-=');
this.boutiqueDate = data
})
},
methods: {
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2023-07-05 10:35:43
* @LastEditors: huyue
* @LastEditTime: 2023-07-19 15:58:16
* @LastEditTime: 2023-07-26 17:40:58
-->
<template>
<div class="left">
......@@ -39,6 +39,7 @@ export default {
valueName: 'amounttotal',
value: '0',
unit: '¥',
unitType: 'left',
bottomLabel: '本月采购额:',
bottemName: 'amounttotalThismonth',
bottomValue: '0',
......@@ -49,6 +50,7 @@ export default {
valueName: 'amountshop',
value: '0',
unit: '¥',
unitType: 'left',
bottomLabel: '本月采购额:',
bottemName: 'amountshopThismonth',
bottomValue: '0',
......@@ -61,6 +63,7 @@ export default {
valueName: 'amountself',
value: '0',
unit: '¥',
unitType: 'left',
bottomLabel: '本月采购额:',
bottemName: 'amountselfThismonth',
bottomValue: '0',
......
......@@ -65,6 +65,7 @@ export default {
valueName: 'amounttotal',
value: '0',
unit: '¥',
unitType: 'left',
bottomLabel: '本月采购额',
bottemName: 'amounttotalThismonth',
bottomValue: '0',
......@@ -75,6 +76,7 @@ export default {
valueName: 'amountshop',
value: '0',
unit: '¥',
unitType: 'left',
bottomLabel: '本月采购额',
bottemName: 'amountshopThismonth',
bottomValue: '0',
......@@ -85,6 +87,7 @@ export default {
valueName: 'amountself',
value: '0',
unit: '¥',
unitType: 'left',
bottomLabel: '本月采购额',
bottemName: 'amountselfThismonth',
bottomValue: '0',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!