Commit dcabb71f by 匡雅琴

Merge branch 'v1.0.0' of http://192.168.3.233:8090/h5/glsk-data-view-pd into v1.0.0

2 parents 9912c480 8cf204ae
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2023-07-05 10:35:43
* @LastEditors: huyue
* @LastEditTime: 2023-07-13 17:33:27
* @LastEditTime: 2023-07-14 10:57:28
-->
<template>
<div class="view-date">统计年份:
......
......@@ -4,13 +4,14 @@
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: huyue
* @LastEditTime: 2023-07-13 17:31:56
* @LastEditTime: 2023-07-14 11:07:55
*/
const state = {
reportParams: {
reportType: 0 // 月表0,日表1
},
solarYear: '2023'
solarYear: '2023',
solarTime: ''
}
const mutations = {
SET_PAGE_META(state, meta) {
......@@ -18,6 +19,9 @@ const mutations = {
},
SET_SOLAR_YEAR(state, meta) {
state.solarYear = meta
},
SET_SOLAR_TIME(state, meta) {
state.solarTime = meta
}
}
const actions = {
......@@ -27,6 +31,9 @@ const actions = {
},
setSolarYear({ commit }, year) {
commit('SET_SOLAR_YEAR', year)
},
setSolarTime({ commit }, time) {
commit('SET_SOLAR_TIME', time)
}
}
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2023-07-05 10:35:43
* @LastEditors: huyue
* @LastEditTime: 2023-07-14 10:29:24
* @LastEditTime: 2023-07-14 10:57:38
-->
<template>
<div class="left">
......@@ -22,6 +22,7 @@ import PurchaseTrends from './PurchaseTrends.vue'
import MerchantTrends from './MerchantTrends.vue'
import StorageContent from './StorageContent.vue'
import { changeMixin } from '@/mixins'
import { mapActions } from 'vuex'
export default {
name: 'ContentLeft',
components: {
......@@ -86,6 +87,7 @@ export default {
mounted() {
},
methods: {
...mapActions(['setSolarTime']),
init() {
this.getSolarList()
},
......@@ -94,6 +96,8 @@ export default {
const _dataList = _data.data.dataList[0]
console.log(_dataList)
this.$bus.$emit('businessstarttime', _dataList.businessstarttime)
this.setSolarTime(_dataList.businessstarttime)
console.log(this.$store.state.app)
this.solarList.forEach(item => {
item.value = _dataList[item.valueName]
item.bottomValue = _dataList[item.bottemName]
......
......@@ -6,7 +6,7 @@
</template>
<template #content>
<div class="solar-detail-content">
<view-date></view-date>
<view-date :businessTime="businessTime" @yearValue="yearValue"></view-date>
<StatisticsBox class="statistic-box" :list="solarDetailList"></StatisticsBox>
<!-- 采购趋势 -->
<div class="tendency-box">
......@@ -49,6 +49,7 @@
<script>
import { changeMixin } from '@/mixins'
import RightViewContent from '../home/solar/RightViewContent.vue'
import { mapActions } from 'vuex'
export default {
name: 'SolarDetail',
mixins: [changeMixin],
......@@ -148,14 +149,17 @@ export default {
name: 'averprice',
hasIcon: '均价¥'
}
]
],
businessTime: ''
}
},
created() {},
methods: {
...mapActions(['setSolarYear']),
init() {
console.log(this.$route.params, '999')
this.merchantList = this.$route.params.merchantList
this.businessTime = this.$store.state.app.solarTime
const { merchantid, merchantname } = this.$route.params.currentMerchant
this.tabName = merchantname
this.getMerchantGoodsRatio(merchantid)
......@@ -203,6 +207,10 @@ export default {
console.log(this.dataList)
this.$refs.purchaseTrend.drawBarLine()
})
},
// 切换年份
yearValue(val) {
this.setSolarYear(val)
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!