Commit f7125f68 by 前端

更新sass+代码

1 parent eadbc3db
...@@ -20,9 +20,9 @@ const getVehicleBrandTop5Monthly = params => { ...@@ -20,9 +20,9 @@ const getVehicleBrandTop5Monthly = params => {
} }
// 获取商品统计——整体品类排名 // 获取商品统计——整体品类排名
const getAllGoodsDistribution = params => { // const getAllGoodsDistribution = params => {
return window.$HTTP.get('CrowdFunding/getAllGoodsDistribution', params) // return window.$HTTP.get('CrowdFunding/getAllGoodsDistribution', params)
} // }
// 活动统计_整体车型排名 // 活动统计_整体车型排名
const getVehicleBrandRanking = params => { const getVehicleBrandRanking = params => {
...@@ -34,12 +34,24 @@ const getOrderMonthlyTrend = params => { ...@@ -34,12 +34,24 @@ const getOrderMonthlyTrend = params => {
return window.$HTTP.get('CrowdFunding/getOrderMonthlyTrend', params) return window.$HTTP.get('CrowdFunding/getOrderMonthlyTrend', params)
} }
// 滚动接口
const getGoodsOrderinfoMonthly = params => {
return window.$HTTP.get('/CrowdFunding/getGoodsMonthlyRanking', params)
}
const getAllGoodsDistribution = params => {
return window.$HTTP.get('/CrowdFunding/getVehicleBrandRanking', params)
}
export default { export default {
getTotal, getTotal,
getGoodsTop5Monthly, getGoodsTop5Monthly,
getMonth, getMonth,
getVehicleBrandTop5Monthly, getVehicleBrandTop5Monthly,
getAllGoodsDistribution, // getAllGoodsDistribution,
getVehicleBrandRanking, getVehicleBrandRanking,
getOrderMonthlyTrend getOrderMonthlyTrend,
// getGoodsOrderinfoMonthly,
getAllGoodsDistribution,
getGoodsOrderinfoMonthly
} }
...@@ -29,6 +29,15 @@ const getTop10Coupon = params => { ...@@ -29,6 +29,15 @@ const getTop10Coupon = params => {
const getOrderMonthlyTrend = params => { const getOrderMonthlyTrend = params => {
return window.$HTTP.get('ExpandedGold/getOrderMonthlyTrend', params) return window.$HTTP.get('ExpandedGold/getOrderMonthlyTrend', params)
} }
// 滚动接口
const getGoodsOrderinfoMonthly = params => {
return window.$HTTP.get('/ExpandedGold/getActivitiesMonthlyRanking', params)
}
const getAllGoodsDistribution = params => {
return window.$HTTP.get('/ExpandedGold/getTop10Coupon', params)
}
export default { export default {
getTotal, getTotal,
getMonth, getMonth,
...@@ -36,5 +45,7 @@ export default { ...@@ -36,5 +45,7 @@ export default {
getTop5CouponMonthly, getTop5CouponMonthly,
getActivitiesMonthly, getActivitiesMonthly,
getTop10Coupon, getTop10Coupon,
getOrderMonthlyTrend getOrderMonthlyTrend,
getGoodsOrderinfoMonthly,
getAllGoodsDistribution
} }
...@@ -64,7 +64,7 @@ export default { ...@@ -64,7 +64,7 @@ export default {
watch: { watch: {
list: { list: {
handler(newVal) { handler(newVal) {
if (newVal.length > 0) { if (newVal && newVal.length > 0) {
this.initData() this.initData()
this.$nextTick(() => { this.$nextTick(() => {
this.draw() this.draw()
...@@ -183,7 +183,7 @@ export default { ...@@ -183,7 +183,7 @@ export default {
}, },
//高亮 //高亮
pieActive() { pieActive() {
const dataLen = this.option.series[0].data.length const dataLen = this.option.series[0].data?.length
this.currentIndex = (this.currentIndex + 1) % dataLen this.currentIndex = (this.currentIndex + 1) % dataLen
this.highlightPie() this.highlightPie()
this.emitEvent(this.viewData[this.currentIndex]) this.emitEvent(this.viewData[this.currentIndex])
......
...@@ -35,11 +35,11 @@ ...@@ -35,11 +35,11 @@
<div class='content-wrap'> <div class='content-wrap'>
<div class='business-content'> <div class='business-content'>
<div class='content-title'>订单量</div> <div class='content-title'>订单量</div>
<div class='content-num'>{{ everyBusinessOrder.orderNum11 }}</div> <div class='content-num'>{{ toThousands(everyBusinessOrder.orderNum11) }}</div>
</div> </div>
<div class='business-content'> <div class='business-content'>
<div class='content-title'>产值</div> <div class='content-title'>产值</div>
<div class='content-num'>{{ everyBusinessOrder.outputValue11 }}</div> <div class='content-num'>{{ toThousands(everyBusinessOrder.outputValue11) }}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -51,11 +51,11 @@ ...@@ -51,11 +51,11 @@
<div class='content-wrap'> <div class='content-wrap'>
<div class='business-content'> <div class='business-content'>
<div class='content-title'>订单量</div> <div class='content-title'>订单量</div>
<div class='content-num'>{{ everyBusinessOrder.orderNum12 }}</div> <div class='content-num'>{{ toThousands(everyBusinessOrder.orderNum12) }}</div>
</div> </div>
<div class='business-content'> <div class='business-content'>
<div class='content-title'>产值</div> <div class='content-title'>产值</div>
<div class='content-num'>{{ everyBusinessOrder.outputValue12 }}</div> <div class='content-num'>{{ toThousands(everyBusinessOrder.outputValue12) }}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -67,11 +67,11 @@ ...@@ -67,11 +67,11 @@
<div class='content-wrap'> <div class='content-wrap'>
<div class='business-content'> <div class='business-content'>
<div class='content-title'>订单量</div> <div class='content-title'>订单量</div>
<div class='content-num'>{{ everyBusinessOrder.orderNum13 }}</div> <div class='content-num'>{{ toThousands(everyBusinessOrder.orderNum13) }}</div>
</div> </div>
<div class='business-content'> <div class='business-content'>
<div class='content-title'>产值</div> <div class='content-title'>产值</div>
<div class='content-num'>{{ everyBusinessOrder.outputValue13 }}</div> <div class='content-num'>{{ toThousands(everyBusinessOrder.outputValue13) }}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -83,11 +83,11 @@ ...@@ -83,11 +83,11 @@
<div class='content-wrap'> <div class='content-wrap'>
<div class='business-content'> <div class='business-content'>
<div class='content-title'>订单量</div> <div class='content-title'>订单量</div>
<div class='content-num'>{{ everyBusinessOrder.orderNum21 }}</div> <div class='content-num'>{{ toThousands(everyBusinessOrder.orderNum21) }}</div>
</div> </div>
<div class='business-content'> <div class='business-content'>
<div class='content-title'>产值</div> <div class='content-title'>产值</div>
<div class='content-num'>{{ everyBusinessOrder.outputValue21 }}</div> <div class='content-num'>{{ toThousands(everyBusinessOrder.outputValue21) }}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -148,7 +148,14 @@ export default { ...@@ -148,7 +148,14 @@ export default {
// }) // })
}, },
methods: { methods: {
toThousands(n) {
// return (num || 0).toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
return n && n.toString().replace(/\d+/, function(m) {
return m.replace(/(\d)(?=(\d{3})+$)/g, function(y) {
return y + ','
})
})
},
getEveryBusinessOrder() { getEveryBusinessOrder() {
this.api.springbudAtion.getEveryBusinessOrder().then(res => { this.api.springbudAtion.getEveryBusinessOrder().then(res => {
if (res.code == 0) { if (res.code == 0) {
......
...@@ -86,8 +86,6 @@ export default { ...@@ -86,8 +86,6 @@ export default {
}) })
}, },
changeTitles() { changeTitles() {
console.log('???????')
console.log(!this.titleClick)
this.titleClick = !this.titleClick this.titleClick = !this.titleClick
}, },
goPage(val) { goPage(val) {
......
...@@ -124,7 +124,6 @@ export default { ...@@ -124,7 +124,6 @@ export default {
}, },
// 鼠标移入时停止滚动 // 鼠标移入时停止滚动
mouseenter() { mouseenter() {
console.log(this.timer2)
clearInterval(this.timer2) clearInterval(this.timer2)
}, },
// 鼠标移开继续滚动 // 鼠标移开继续滚动
......
...@@ -17,7 +17,6 @@ export default { ...@@ -17,7 +17,6 @@ export default {
methods: { methods: {
getClientData() { getClientData() {
console.log(22)
this.api.customer.getEnterpriseDistribution().then(res => { this.api.customer.getEnterpriseDistribution().then(res => {
if (res.code == 0) { if (res.code == 0) {
res.data.dataList.forEach(item => { res.data.dataList.forEach(item => {
......
...@@ -34,7 +34,6 @@ export default { ...@@ -34,7 +34,6 @@ export default {
}, },
mounted() { mounted() {
this.$bus.$on('totalRank', data => { this.$bus.$on('totalRank', data => {
console.log(data)
this.totalNumData = data.datalist this.totalNumData = data.datalist
}) })
}, },
......
...@@ -311,7 +311,7 @@ export default { ...@@ -311,7 +311,7 @@ export default {
} }
} }
this.api.map.getMerchantInProgressThisMonth(params).then(res=>{ this.api.map.getMerchantInProgressThisMonth(params).then(res=>{
}) })
}, },
methods: { methods: {
...@@ -369,7 +369,6 @@ export default { ...@@ -369,7 +369,6 @@ export default {
borderWidth: 1, borderWidth: 1,
padding: 0, padding: 0,
formatter: function (params) { formatter: function (params) {
console.log(params)
let name = params.name let name = params.name
var str = `<div style = "background:url( ${require("@/assets/images/province.png")}) no-repeat; var str = `<div style = "background:url( ${require("@/assets/images/province.png")}) no-repeat;
width:20vw;height:28vh;background-size:cover"> width:20vw;height:28vh;background-size:cover">
......
<template> <template>
<div class='content'> <div class='content'>
<select-container></select-container> <select-container></select-container>
<conversion-plus-content v-if='isShowConversion'></conversion-plus-content> <!-- v-if='isShowConversion'-->
<expanded-gold-content v-else></expanded-gold-content> <conversion-plus-content ></conversion-plus-content>
<!-- <expanded-gold-content v-else></expanded-gold-content>-->
</div> </div>
</template> </template>
...@@ -10,24 +11,24 @@ ...@@ -10,24 +11,24 @@
import SelectContainer from 'views/sassPlus/componts/selectContainer' import SelectContainer from 'views/sassPlus/componts/selectContainer'
import ConversionPlusContent from 'views/sassPlus/conversionPlus/conversionPlusContent' import ConversionPlusContent from 'views/sassPlus/conversionPlus/conversionPlusContent'
import ExpandedGoldContent from 'views/sassPlus/expandedGold/expandedGoldContent' // import ExpandedGoldContent from 'views/sassPlus/expandedGold/expandedGoldContent'
export default { export default {
// name: 'sassPlusContent', // name: 'sassPlusContent',
components: { components: {
ExpandedGoldContent, // ExpandedGoldContent,
ConversionPlusContent, ConversionPlusContent,
SelectContainer SelectContainer
}, },
data() { data() {
return { return {
isShowConversion: true // isShowConversion: true
} }
}, },
mounted() { mounted() {
this.$bus.$on('changeBussiness', data => { // this.$bus.$on('changeBussiness', data => {
this.isShowConversion = data.bussinessType == 'transWork' || data.bussinessType == 'noWorries' // this.isShowConversion = data.bussinessType == 'transWork' || data.bussinessType == 'noWorries'
}) // })
} }
} }
</script> </script>
......
<template> <template>
<div class='select-Container'> <div class='select-Container'>
<SelectCpn :selectName="'业务筛选:'" :selectArr='businessList' :selectType="'business'"></SelectCpn> <SelectCpn :selectName="'业务筛选:'" :selectArr='businessList' :selectType="'business'"></SelectCpn>
<SelectCpn v-if='isShowSystem' :selectName="'系统筛选:'" :selectArr='systemList' :selectType="'system'"></SelectCpn> <!-- <SelectCpn v-if='isShowSystem' :selectName="'系统筛选:'" :selectArr='systemList' :selectType="'system'"></SelectCpn>-->
<SelectCpn <SelectCpn
:selectName="'月份筛选:'" :selectName="'月份筛选:'"
:selectArr='monthList' :selectArr='monthList'
...@@ -26,10 +26,10 @@ export default { ...@@ -26,10 +26,10 @@ export default {
{ label: '1.3众筹', value: 'crowdFunding' }, { label: '1.3众筹', value: 'crowdFunding' },
{ label: '2.1车损无忧', value: 'noWorries' } { label: '2.1车损无忧', value: 'noWorries' }
], ],
systemList: [ // systemList: [
{ label: '广联', value: 'gl' }, // { label: '广联', value: 'gl' },
{ label: '广汇', value: 'gh' } // { label: '广汇', value: 'gh' }
], // ],
monthList: [], monthList: [],
isShowSystem: false isShowSystem: false
} }
...@@ -42,9 +42,9 @@ export default { ...@@ -42,9 +42,9 @@ export default {
}, },
mounted() { mounted() {
this.$bus.$on('changeBussiness', data => { // this.$bus.$on('changeBussiness', data => {
this.isShowSystem = data.bussinessType == 'expandedGold' || data.bussinessType =='crowdFunding' // this.isShowSystem = data.bussinessType == 'expandedGold' || data.bussinessType =='crowdFunding'
}) // })
} }
} }
</script> </script>
......
...@@ -70,16 +70,17 @@ export default { ...@@ -70,16 +70,17 @@ export default {
if (this.selectArr.length) { if (this.selectArr.length) {
this.selStr = this.selectArr[0][this.valName] this.selStr = this.selectArr[0][this.valName]
} }
this.$bus.$on('changeBussiness', data => { // this.$bus.$on('changeBussiness', data => {
const { bussinessType } = data // const { bussinessType } = data
this.showFirstSelStaus = bussinessType == 'expandedGold' || bussinessType == 'crowdFunding' // this.showFirstSelStaus = bussinessType == 'expandedGold' || bussinessType == 'crowdFunding'
}) // })
}, },
methods: { methods: {
selectBtn(type) { selectBtn(type) {
switch (type) { switch (type) {
case 'business': case 'business':
// eslint-disable-next-line no-case-declarations
let title let title
this.selectArr.forEach(item => { this.selectArr.forEach(item => {
if (item.value == this.selStr) { if (item.value == this.selStr) {
...@@ -88,9 +89,9 @@ export default { ...@@ -88,9 +89,9 @@ export default {
}) })
this.$bus.$emit('changeBussiness', { bussinessTitle: title + '业务', bussinessType: this.selStr }) this.$bus.$emit('changeBussiness', { bussinessTitle: title + '业务', bussinessType: this.selStr })
break break
case 'system': // case 'system':
this.$bus.$emit('changeSystem', { systemType: this.selStr }) // this.$bus.$emit('changeSystem', { systemType: this.selStr })
break // break
case 'months': case 'months':
this.$bus.$emit('changeMonths', { month: this.selStr }) this.$bus.$emit('changeMonths', { month: this.selStr })
break break
......
<template> <template>
<div class='category-distribution'> <div class='category-distribution'>
<view-sub-title title='商品品类订单数前10' /> <view-sub-title :title='diffsTitle[bussinessType]' />
<bar-chart domId='analyseChart' boxHeight='14.54vh' :analysisList='allGoodsDistribution'></bar-chart> <bar-chart
class='barChartStyle'
:labelName='labelName'
domId='analyseChart'
boxHeight='14.54vh'
:analysisList='allGoodsDistribution'></bar-chart>
</div> </div>
</template> </template>
...@@ -10,6 +15,14 @@ export default { ...@@ -10,6 +15,14 @@ export default {
name: 'CategoryDistribution', name: 'CategoryDistribution',
data() { data() {
return { return {
diffsTitle: {
'transWork': '商品品类订单数前10',
'expandedGold': '订单量排名优惠券前10',
'crowdFunding': '整体车型排名前10',
'noWorries': '商品品类订单数前10'
},
labelName: '',
bussinessType: '',
chart: { chart: {
id: 'glproduct', id: 'glproduct',
keys: ['goodsName', 'totalNum'] keys: ['goodsName', 'totalNum']
...@@ -20,6 +33,8 @@ export default { ...@@ -20,6 +33,8 @@ export default {
}, },
mounted() { mounted() {
this.$bus.$on('allGoodsDistribution', data => { this.$bus.$on('allGoodsDistribution', data => {
this.bussinessType = data.bussinessType
this.labelName = data.bussinessType === 'expandedGold' ? 'couponName' : data.bussinessType === 'crowdFunding' ? 'vehicleBrand' : 'goodsName'
this.allGoodsDistribution = data.allGoodsDistribution this.allGoodsDistribution = data.allGoodsDistribution
}) })
} }
...@@ -27,5 +42,7 @@ export default { ...@@ -27,5 +42,7 @@ export default {
</script> </script>
<style scoped> <style scoped>
.barChartStyle {
margin-top: 3vh;
}
</style> </style>
<template> <template>
<div class='conversion-left'> <div class='conversion-left'>
<view-sub-title title='各类商品每月订单数' /> <view-sub-title :title='diffsTitle[copyBussinessType]' />
<div class='component'> <div class='component'>
<div class='titles'> <div class='titles'>
<span>订单月份</span> <span>订单月份</span>
<span>商品名称</span> <span>{{ copyBussinessType == 'expandedGold' ? '活动名称' : '商品名称' }}</span>
<span>订单数</span> <span>订单数</span>
</div> </div>
<div <div
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
@mouseleave="currentIndex = ''" @mouseleave="currentIndex = ''"
@mouseenter='mouseenterList(item,index)'> @mouseenter='mouseenterList(item,index)'>
<div>{{ item.statMonth }}</div> <div>{{ item.statMonth }}</div>
<div>{{ item.goodsName }}</div> <div>{{ item[diffsGoodsName[copyBussinessType]] }}</div>
<div>{{ item.orderNum }}</div> <div>{{ item[diffsNum[copyBussinessType]] }}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -37,6 +37,24 @@ export default { ...@@ -37,6 +37,24 @@ export default {
name: 'ConversionLeft', name: 'ConversionLeft',
data() { data() {
return { return {
diffsTitle: {
'transWork': '各类商品每月订单数',
'expandedGold': '各活动场次订单量',
'crowdFunding': '各月各商品订单量排名',
'noWorries': '各类商品每月订单数'
},
diffsGoodsName: {
'transWork': 'goodsName',
'expandedGold': 'activityName',
'crowdFunding': 'goodsName',
'noWorries': 'goodsName'
},
diffsNum:{
'transWork': 'orderNum',
'expandedGold': 'totalNum',
'crowdFunding': 'totalNum',
'noWorries': 'totalNum'
},
totalCount: 10000, // 总数 totalCount: 10000, // 总数
scrollContentHeight: 0, // 滚动内容的高度 scrollContentHeight: 0, // 滚动内容的高度
scrollBoxHeight: 0, // 滚动父级盒子的高度 scrollBoxHeight: 0, // 滚动父级盒子的高度
...@@ -102,7 +120,6 @@ export default { ...@@ -102,7 +120,6 @@ export default {
this.scrollBoxHeight = this.$refs.forwardContent ? this.$refs.forwardScrollBox.getBoundingClientRect().height : '' this.scrollBoxHeight = this.$refs.forwardContent ? this.$refs.forwardScrollBox.getBoundingClientRect().height : ''
// 可以滚动的高度 // 可以滚动的高度
this.scrollableHeight = this.scrollContentHeight - this.scrollBoxHeight this.scrollableHeight = this.scrollContentHeight - this.scrollBoxHeight
console.log('内容高度', this.scrollContentHeight, '盒子高度', this.scrollBoxHeight, '可以滚动的高度', this.scrollableHeight)
this.autoScroll() this.autoScroll()
}, },
// 自动滚动 // 自动滚动
...@@ -156,7 +173,7 @@ export default { ...@@ -156,7 +173,7 @@ export default {
//display: flex; //display: flex;
//justify-content: space-between; //justify-content: space-between;
display: grid; display: grid;
grid-template-columns:30% 40% 30%; grid-template-columns:28% 54% 18%;
font-size: 0.9vw; font-size: 0.9vw;
} }
...@@ -166,7 +183,7 @@ export default { ...@@ -166,7 +183,7 @@ export default {
.list_dv { .list_dv {
width: 100%; width: 100%;
height:77vh; height: 77vh;
overflow-y: auto; overflow-y: auto;
font-size: 0.6vw; font-size: 0.6vw;
color: #d4eaf6; color: #d4eaf6;
...@@ -180,14 +197,18 @@ export default { ...@@ -180,14 +197,18 @@ export default {
.dataList { .dataList {
display: grid; display: grid;
grid-template-columns: 30% 40% 30%; grid-template-columns: 28% 54% 18%;
cursor: pointer; cursor: pointer;
//div{ div{
// width: 100%; width: 100%;
// &:nth-child(2){ &:nth-child(2){
// width: 70px; width: 93%;
// } overflow: hidden; //超出隐藏
//} white-space: nowrap; //不折行
text-overflow: ellipsis; //溢出显示省略号
}
}
} }
.selectMerchant { .selectMerchant {
......
...@@ -5,19 +5,19 @@ ...@@ -5,19 +5,19 @@
<div class='business-top flex'> <div class='business-top flex'>
<div class='business-border'> <div class='business-border'>
<div class='business-title'>订单总数</div> <div class='business-title'>订单总数</div>
<div class='business-number'>{{ orderList.totalNum }}</div> <div class='business-number'>{{ toThousands(orderList.totalNum) }}</div>
</div> </div>
<div class='business-border'> <div class='business-border'>
<div class='business-title'>今年新增</div> <div class='business-title'>今年新增</div>
<div class='business-number'>{{ orderList.thisyear }}</div> <div class='business-number'>{{ toThousands(orderList.thisyear) }}</div>
</div> </div>
<div class='business-border'> <div class='business-border'>
<div class='business-title'>订单总金额</div> <div class='business-title'>订单总金额</div>
<div class='business-number'>{{ orderList.totalMoney }}</div> <div class='business-number'>{{ toThousands(orderList.totalMoney) }}</div>
</div> </div>
<div class='business-border' v-if='orderList.activityTimes'> <div class='business-border' v-if='orderList.activityTimes'>
<div class='business-title'>活动总数</div> <div class='business-title'>活动总数</div>
<div class='business-number'>{{ orderList.activityTimes }}</div> <div class='business-number'>{{ toThousands(orderList.activityTimes) }}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -39,7 +39,16 @@ export default { ...@@ -39,7 +39,16 @@ export default {
}) })
}, },
methods: {} methods: {
toThousands(n) {
// return (num || 0).toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
return n && n.toString().replace(/\d+/, function(m) {
return m.replace(/(\d)(?=(\d{3})+$)/g, function(y) {
return y + ','
})
})
}
}
} }
</script> </script>
d d
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!