Commit f7125f68 by 前端

更新sass+代码

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