Commit c8276cea by 匡雅琴

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

2 parents 3c2471c1 6b2e6f81
......@@ -30,6 +30,7 @@
<!-- <div class="view-title user-select">嘀加智慧门店运营看板</div> -->
<div class="time">
<div class="top flex">
{{ weekList[week] }}
<div class="now">{{ now }}</div>
</div>
</div>
......@@ -64,8 +65,10 @@ export default {
return {
isShow: false,
merchantList: [],
weekList: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
firstTab: this.tabObject, // 存储第一个tab下的子菜单对象
now: new Date().format('yyyy-MM-dd hh:mm:ss'),
week: new Date().getDay(),
currentMenu: 'home', // 标记当前是哪个tab菜单
search: ''
}
......
......@@ -3,10 +3,10 @@
<div class="statistics-item" v-for="(item, index) in list" :key="index" :style="{'width': 100 / list.length + '%'}">
<div class="statistics-top">
<div class="statistics-name">{{item.name}}</div>
<div class="statistics-price">¥<span class="statistics-price-number">{{numAddSymbol(item.value)}}</span></div>
<div class="statistics-price"><span v-if="item.unit == '¥'">¥</span><span class="statistics-price-number">{{numAddSymbol(item.value)}}</span><span v-if="item.unit == '%'">%</span></div>
<div v-if="item.rate" class="statistics-top-rate">占比<span>{{item.rate}}</span></div>
</div>
<div class="statistics-bottom">
<div class="statistics-bottom" v-if="item.bottomLabel || item.bottomType">
<template v-if="item.bottomType == 'money'">
<span> {{item.bottomLabel}}</span>
<span>¥{{numAddSymbol(item.bottomValue)}}</span>
......@@ -14,6 +14,12 @@
<template v-else-if="item.bottomType == 'slot'">
<slot name="bottom"></slot>
</template>
<template v-else-if="item.bottomType == 'ratio'">
<div class="ratio">
<div class="ratio-left">{{item.ratioLeftLabel}}<span :class="item.ratioLeftValue > 0 ? 'positive' : 'negative'">{{item.ratioLeftValue}}%</span></div>
<div class="ratio-right">{{item.ratioRightLabel}}<span :class="item.ratioRightValue > 0 ? 'positive' : 'negative'">{{item.ratioRightValue}}%</span></div>
</div>
</template>
<template v-else>
<span>{{item.bottomLabel}}</span>
<span>{{numAddSymbol(item.bottomValue)}}</span>
......@@ -88,7 +94,7 @@ export default {
font-size: 14px;
height: 3.11vh;
&-number {
padding-left: 0.56vw;
padding: 0 0.56vw;
font-size: 20px;
color: #5894FF;
background-image:-webkit-linear-gradient(left,#24D8FF,#7787FF);
......@@ -104,6 +110,22 @@ export default {
border-top: 1px solid #2A3D72;
padding: 0.89vh 0.3vw 0;
margin-top: 0.89vh;
.ratio {
display: flex;
width: 100%;
justify-content: space-between;
.positive,
.negative{
display: inline-block;
margin-left: 0.28vw;
}
.positive {
color: #EB6001;
}
.negative {
color: #16E193;
}
}
}
}
</style>
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @LastEditors: huyue
* @LastEditTime: 2023-07-12 16:04:22
* @LastEditTime: 2023-07-19 10:49:44
* @FilePath: \dj-data-view\src\components\ViewTitle.vue
* @Description: 页面头部组件
-->
......@@ -27,6 +27,7 @@
<!-- <div class="view-title user-select">嘀加智慧门店运营看板</div> -->
<div class="time">
<div class="top flex">
{{ weekList[week] }}
<div class="now">{{ now }}</div>
</div>
</div>
......@@ -41,8 +42,10 @@ export default {
return {
isShow: false,
dataList: datas.DefaultData.businessList,
weekList: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
firstTab: '', // 存储第一个tab下的子菜单对象
now: new Date().format('yyyy-MM-dd hh:mm:ss'),
week: new Date().getDay(),
currentMenu: 'home' // 标记当前是哪个tab菜单
}
},
......
......@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: huyue
* @LastEditTime: 2023-07-14 11:07:55
* @LastEditTime: 2023-07-19 14:27:28
*/
const state = {
reportParams: {
......@@ -12,7 +12,10 @@ const state = {
},
solarYear: '',
solarTime: '',
merchantRankingList: []
merchantRankingList: [],
boutique: {
year: ''
}
}
const mutations = {
SET_PAGE_META(state, meta) {
......@@ -26,6 +29,9 @@ const mutations = {
},
SET_MERCHANT_LIST(state, meta) {
state.merchantRankingList = meta
},
SET_BOUTIQUE_YEAR(state, meta) {
state.boutique.year = meta
}
}
const actions = {
......@@ -40,8 +46,10 @@ const actions = {
commit('SET_SOLAR_TIME', time)
},
setMerchantRankingList({ commit }, list) {
console.log(list, '-----');
commit('SET_MERCHANT_LIST', list)
},
setBoutiqueYear({ commit }, year) {
commit('SET_BOUTIQUE_YEAR', year)
}
}
......
<!--
* @Description: 内容页面统计年份组件
* @Author: huyue
* @Date: 2023-07-05 10:35:43
* @LastEditors: huyue
* @LastEditTime: 2023-07-19 14:49:07
-->
<template>
<div class="view-date">
统计年份:
<div class="year-plugin">
<div class="year" @click.stop="switchYear">
{{$store.state.app.boutique.year ? $store.state.app.boutique.year : '全部'}}
<img class="arrow-down" src="@/assets/images/arrow-down.png" alt="">
</div>
<SelectBox :isShow="isShow" isObject :defaultValue="defaultYear" @clickOutside="clickOutside" :dataList="yearList" :boxWidth="'8.61vw'" @selectVal="selectVal"></SelectBox>
</div>
统计渠道:
<div class="year-plugin">
<div class="year" @click.stop="switchChannel">
全部渠道
<img class="arrow-down" src="@/assets/images/arrow-down.png" alt="">
</div>
<SelectBox :isShow="channelShow" isObject :defaultValue="defaultChannel" @clickOutside="clickChannelOutside" :dataList="channelList" :boxWidth="'8.61vw'" @selectVal="selectChannelVal"></SelectBox>
</div>
<span class="businessTime">
业务开始时间:{{businessTime ? new Date(businessTime).format('yyyy-MM-dd') : ''}}
</span>
</div>
</template>
<script type='text/ecmascript-6'>
// import datas from '@/utils/data'
import { mapActions } from 'vuex'
export default {
name: 'BoutiqueDate',
props: {
businessTime: String,
yearList: {
type: Array,
default: () => []
},
channelList: {
type: Array,
default: () => []
},
defaultYear: String,
defaultChannel: String
},
data() {
return {
isShow: false,
channelShow: false,
year: ''
}
},
mounted() {
const { defaultYear } = this
if (defaultYear) this.setBoutiqueYear(defaultYear)
},
methods: {
...mapActions(['setBoutiqueYear']),
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)
}
}
}
</script>
<style scoped lang='scss'>
.view-date {
display: flex;
align-items: center;
// width: 100%;
height: 6.67vh;
color: #C9C9C9;
font-size: 14px;
padding: 0 1.33vh;
background-color: #091C40;
margin-bottom: 1.78vh;
.year-plugin {
position: relative;
}
.year {
display: flex;
align-items: center;
justify-content: space-between;
width: 8.61vw;
height: 4vh;
padding: 0 0.56vw;
box-sizing: border-box;
background-image: linear-gradient(270deg, #6578FF 0%, #079FF1 100%);
margin-right: 0.56vw;
color: #FFFFFF;
.arrow-down {
width: 0.69vw;
height: 0.67vh;
}
}
}
.businessTime {
color: #536079;
font-size: 14px;
}
</style>
<!--
* @Description: 精品升级左边
* @Author: huyue
* @Date: 2023-07-04 13:55:35
* @LastEditors: huyue
* @LastEditTime: 2023-07-19 17:03:19
-->
<template>
<div class="left">
<BoutiqueDate :defaultYear="defaultYear" :yearList="yearList" :channelList="channelList" :businessTime="businessTime"></BoutiqueDate>
<StatisticsBox :list="boutiqueList.slice(0,4)"></StatisticsBox>
<StatisticsBox class="sencod-box" :list="boutiqueList.slice(4,9)"></StatisticsBox>
<Tab class="tab-box" :list="tabList" :width="19.17" @changeTab="changeTab"></Tab>
</div>
</template>
<script>
import BoutiqueDate from '../boutique/BoutiqueDate.vue'
export default {
name: 'BoutiqueLeft',
components: {
BoutiqueDate
},
data() {
return {
defaultYear: '',
businessTime: '',
yearList: [{
label: '全部',
value: ''
}, {
label: '2023',
value: '2023'
}],
channelList: [{
label: '全部渠道',
value: ''
}, {
label: '春蕾兴东',
value: '1'
}, {
label: '广汇渠道',
value: '2'
}],
boutiqueList: [
{
name: '总门店数',
valueName: 'amounttotal',
value: '2708',
bottomLabel: '上月新增门店数:',
bottemName: 'amounttotalThismonth',
bottomValue: '21'
},
{
name: '总产值',
valueName: 'amounttotal',
value: '1000000',
unit: '¥',
bottomType: 'ratio',
ratioLeftLabel: '月环比',
ratioLeftValue: '12',
ratioRightLabel: '年同比',
ratioRightValue: '-7'
},
{
name: '客单价',
valueName: 'amounttotal',
value: '1003',
unit: '¥',
bottomType: 'ratio',
ratioLeftLabel: '月环比',
ratioLeftValue: '12',
ratioRightLabel: '年同比',
ratioRightValue: '-7'
},
{
name: '总转化率',
valueName: 'amounttotal',
value: '58',
unit: '%',
bottomType: 'ratio',
ratioLeftLabel: '月环比',
ratioLeftValue: '12',
ratioRightLabel: '年同比',
ratioRightValue: '-7'
},
{
name: '在营门店数',
valueName: 'amounttotal',
value: '233'
},
{
name: '发放电子券门店',
valueName: 'amounttotal',
value: '233'
},
{
name: '嘀加供货门店',
valueName: 'amounttotal',
value: '233'
},
{
name: '停业门店',
valueName: 'amounttotal',
value: '233'
}
],
tabList: ['业务趋势', '区域门店数据']
}
},
mounted() { },
methods: {
changeTab(data) {
console.log(data)
this.activeName = data
}
}
}
</script>
<style lang="scss" scoped>
.left {
display: flex;
flex-direction: column;
width: 64.17vw;
}
.sencod-box {
margin-top: 1.78vh;
&.statistics {
height: 8vh;
}
}
.tab-box {
margin-top: 1.78vh;
}
</style>
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2023-07-04 13:55:35
* @LastEditors: huyue
* @LastEditTime: 2023-07-19 10:34:43
* @LastEditTime: 2023-07-19 14:23:51
-->
<template>
<div class="right">
......@@ -15,7 +15,7 @@
<script>
import './rightCompoments'
export default {
name: 'ContentRight',
name: 'BoutiqueRight',
data() {
return {
tabList: ['门店排行榜', '员工排行榜'],
......
<!--
* @Description:
* @Author: huyue
* @Date: 2023-07-04 13:55:35
* @LastEditors: huyue
* @LastEditTime: 2023-07-19 10:30:04
-->
<template>
<div class="left">afadf</div>
</template>
<script>
export default {
name: 'ContentLeft',
data() {
return {}
},
mounted() { },
methods: {
}
}
</script>
<style lang="scss" scoped>
.left {
display: flex;
flex-direction: column;
width: 64.17vw;
background: #091C40;
}
</style>
......@@ -59,7 +59,7 @@ export default {
},
data() {
return {
activeName: '1'
activeName: '2'
}
},
mounted() {
......
......@@ -3,25 +3,25 @@
* @Author: huyue
* @Date: 2023-07-04 13:55:35
* @LastEditors: huyue
* @LastEditTime: 2023-07-19 10:28:42
* @LastEditTime: 2023-07-19 14:22:46
-->
<template>
<div class="view-content">
<div class="content">
<ContentLeft></ContentLeft>
<ContentRight></ContentRight>
<BoutiqueLeft></BoutiqueLeft>
<BoutiqueRight></BoutiqueRight>
</div>
</div>
</template>
<script>
import ContentLeft from '../../boutique/ContentLeft'
import ContentRight from '../../boutique/ContentRight.vue'
import BoutiqueLeft from '../../boutique/BoutiqueLeft'
import BoutiqueRight from '../../boutique/BoutiqueRight.vue'
export default {
name: 'ViewBoutique',
components: {
ContentLeft,
ContentRight
BoutiqueLeft,
BoutiqueRight
},
data() {
return {}
......@@ -46,7 +46,7 @@ export default {
display: flex;
justify-content: space-between;
// padding: 1.78vh 0 0;
margin-top: 1.78vh;
// margin-top: 1.78vh;
}
</style>
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2023-07-04 13:56:33
* @LastEditors: huyue
* @LastEditTime: 2023-07-18 17:18:51
* @LastEditTime: 2023-07-19 14:47:48
-->
<template>
<div class="view-content">
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2023-07-05 10:35:43
* @LastEditors: huyue
* @LastEditTime: 2023-07-18 11:05:52
* @LastEditTime: 2023-07-19 15:58:16
-->
<template>
<div class="left">
......@@ -38,7 +38,8 @@ export default {
name: '总采购额',
valueName: 'amounttotal',
value: '0',
bottomLabel: '本月采购额',
unit: '¥',
bottomLabel: '本月采购额:',
bottemName: 'amounttotalThismonth',
bottomValue: '0',
bottomType: 'money'
......@@ -47,7 +48,8 @@ export default {
name: '商城采购额',
valueName: 'amountshop',
value: '0',
bottomLabel: '本月采购额',
unit: '¥',
bottomLabel: '本月采购额:',
bottemName: 'amountshopThismonth',
bottomValue: '0',
rate: '51%',
......@@ -58,7 +60,8 @@ export default {
name: '自采采购额',
valueName: 'amountself',
value: '0',
bottomLabel: '本月采购额',
unit: '¥',
bottomLabel: '本月采购额:',
bottemName: 'amountselfThismonth',
bottomValue: '0',
rate: '49%',
......@@ -69,7 +72,7 @@ export default {
name: '开通商户数',
valueName: 'opentotal',
value: '0',
bottomLabel: '本月开通商户数',
bottomLabel: '本月开通商户数:',
bottemName: 'openThismonth',
bottomValue: '0'
},
......@@ -77,7 +80,7 @@ export default {
name: '采购商户数',
valueName: 'buytotal',
value: '0',
bottomLabel: '本月采购商户数',
bottomLabel: '本月采购商户数:',
bottemName: 'buyThismonth',
bottomValue: '0'
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!