Commit a970b4b2 by 胡悦

提交

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