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