Commit c2d1977b by 杨明

fixed

1 parent d700d3be
......@@ -286,7 +286,7 @@ const viewData = params => {
}
//增值业务分析-精品升级-产值趋势
const tendency = params => {
params.method = 'scrm.api.boutiquecoupon.rop.router'
params.method = 'scrm.api.boutiquecoupon.rop.router.twoCityTale'
params.routerMethod = 'dj.api.smartcarlife.goodsOrderProfitAllocation.shop.merchant.tendency'
return http({
url: 'rop-scrm-boutiquecoupon/router',
......
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-14 14:07:44
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-10-10 09:54:42
* @LastEditTime: 2023-10-10 16:05:16
* @FilePath: \scrm-micro-home\src\components\lineChart\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -42,7 +42,6 @@ export default {
this.lineOptions = getLineOptions[this.functionStr](this.lineList)
this.chartBindEvent()
},
immediate: true,
deep: true
}
},
......@@ -51,7 +50,7 @@ export default {
this[this.domId] = echarts.init(this.lineDom)
window.addEventListener('resize', this[this.domId].resize)
},
beforeCreate() {
beforeDestroy() {
window.removeEventListener('resize', this[this.domId].resize)
},
methods: {
......
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-14 14:08:14
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-10-09 17:49:06
* @LastEditTime: 2023-10-10 10:29:53
* @FilePath: \scrm-micro-home\src\components\options.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -142,11 +142,26 @@ function getLineOddOptions(obj) {
type: 'slider', // 显示滑动条
xAxisIndex: 0, // 指定水平拖动的 x 轴索引
start: 0, // 初始的数据窗口范围的起始位置
end: 100 // 初始的数据窗口范围的结束位置
end: 100, // 初始的数据窗口范围的结束位置
dataBackground: {
lineStyle: {
width: 10, // 滑动柱的宽度
color: '#ff0000' // 滑动柱的颜色
}
}
}
],
yAxis: {
type: 'value'
type: 'value',
axisLabel: {
formatter: function(value) {
if (value === 0) {
return ''
} else {
return value
}
}
}
},
series: [
{
......
......@@ -2,12 +2,12 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-14 10:26:24
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-10-09 16:47:24
* @LastEditTime: 2023-10-10 15:59:19
* @FilePath: \scrm-micro-home\src\views\home\components\AddValue.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="analysis-main">
<div class="analysis-main" v-if="chartList.length">
<div class="analysis-head">
增值业务分析
</div>
......@@ -37,6 +37,7 @@ export default {
url: '/appreciation/inSale/upgrade',
isShow: () => util.isShowBtn('/inSale/upgrade', null),
value: 0,
isFlag: true,
lineList: []
},
{
......@@ -46,6 +47,7 @@ export default {
url: '/store/orderManage/index?order=4',
isShow: () => util.isShowBtn('/orderManage/index', null),
value: 154.9,
isFlag: true,
lineList: []
},
{
......@@ -55,6 +57,7 @@ export default {
url: '/appreciation/beforeSale/checkSet',
isShow: () => util.isShowBtn('/beforeSale/checkSet', null),
value: 101.5,
isFlag: true,
lineList: []
}
]
......@@ -73,15 +76,17 @@ export default {
}
console.log(res, 'res')
const mapData = {
0: ['totalShopProfitMoney', 'diagramList'],
0: ['totalShopProfitMoney', 'diagramList', 'isOpen'],
1: ['crowdfundingOutput', 'crowdfundingOutputTrend', 'crowdfundingFlag'],
2: ['membershipOutput', 'membershipOutputTrend', 'membershipFlag']
}
this.chartList.forEach((item, index) => {
item.value = output[mapData[index][0]]
item.lineList = output[mapData[index][1]]
// item.isFlag = list[0]
item.isFlag = output[mapData[index][2]]
})
this.chartList = this.chartList.filter(i => i.isFlag)
console.log(this.chartList)
}
}
}
......
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-14 11:21:38
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-10-08 14:14:10
* @LastEditTime: 2023-10-10 10:35:11
* @FilePath: \scrm-micro-home\src\views\home\components\AnalysisLine.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -11,7 +11,7 @@
<div class="analysis-border-title">{{ analysisData.title }}</div>
<div class="analysis-border-num flex">
累计增量产值
<span>{{ analysisData.value }}</span>
<span>{{ analysisData.value | formatNumber }}</span>
<span class="jump-btn" @click="jumpDetail" v-if="analysisData.isShow()">查看明细</span>
<span class="jump-btn" v-else>暂无权限</span>
</div>
......@@ -21,6 +21,7 @@
</div>
</template>
<script>
import util from '@/utils/util'
export default {
props: {
analysisData: {
......@@ -31,6 +32,11 @@ export default {
data() {
return {}
},
filters: {
formatNumber(val) {
return util.formatNumber(val)
}
},
methods: {
jumpDetail() {
this.$history.push(this.analysisData.url)
......
......@@ -8,8 +8,8 @@
<div class="analysis-item-head">
<img :src="require(`@/assets/img/home/icon-${index + 1}.png`)" />
<span>{{ item.instName }}</span>
<a @click="handleJump(item, 'index')" v-if="item.instStatus == 1">查看使用情况</a>
<a @click="handleJump(item, 'config')" v-else>去使用</a>
<a @click="handleJump(item, 'journey/index')" v-if="item.instStatus == 1">查看使用情况</a>
<a @click="handleJump(item, 'journeyConfig/config')" v-else>去使用</a>
<div :class="{ 'analysis-item-status': true, 'is-disable': item.instStatus != 1 }">
<i :class="`${getStatusValue(item, 'icon')}`"></i>
<span>{{ getStatusValue(item, 'label') }}</span>
......@@ -159,7 +159,7 @@ export default {
return STATUS.find(item => item.value == val.instStatus)[prop]
},
handleJump(item, path) {
this.$history.push(`/scene/journeyConfig/${path}?title=${item.instName}-续保旅程&instId=${item.instId}`)
this.$history.push(`/scene/${path}?title=${item.instName}-续保旅程&instId=${item.instId}`)
}
}
}
......
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-14 10:26:58
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-10-09 11:44:09
* @LastEditTime: 2023-10-10 13:46:15
* @FilePath: \scrm-micro-home\src\views\home\components\MicroStore.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -19,7 +19,7 @@
<div class="warp-num">{{ orderDetail.totalSaleAmount | formatNumber }}</div>
<div class="warp-price">
本月销售额
<span>{{ orderDetail.totalSaleAmount }}</span>
<span>¥{{ orderDetail.saleAmount | formatNumber }}</span>
</div>
<img src="@/assets/img/home/money-icon.png" />
</div>
......@@ -50,7 +50,7 @@
</div>
<div class="analysis-circle">
<div class="analysis-circle-title">业务占比分析</div>
<div class="flex">
<div class="flex" v-if="!emptyStatus">
<div class="analysis-circle-left">
<line-chart :lineList="orderList" domId="order1" functionStr="getPieOptions"></line-chart>
</div>
......@@ -69,6 +69,10 @@
</div>
</div>
</div>
<div v-else class="empty-panel">
<div class="empty-img"><img src="@/assets/img/home/empty.png" /></div>
<div class="empty-text">暂无数据</div>
</div>
</div>
</div>
</div>
......@@ -87,6 +91,7 @@ export default {
lineList: []
},
timeValue: [],
emptyStatus: true,
orderDetail: {},
orderList: [
{ label: '商城', color: '#5850FF', orderSource: 1, saleAmount: 0, orderCount: 0, radio: 0 },
......@@ -100,7 +105,7 @@ export default {
},
filters: {
formatNumber(val) {
return util.formatNumber(val)
return util.formatNumber(val) || 0
}
},
watch: {
......@@ -154,24 +159,32 @@ export default {
this.dateChange(this.timeValue, false)
},
getLineList(params) {
this.emptyStatus = false
this.$apis.home.analysisOrder(params).then(res => {
this.orderDetail = res || {}
this.lineList.lineList = res.trendData || []
if (this.dateValue == 'month') {
this.lineList.lineList.forEach(i => {
i.aggregateTime = i.aggregateTime.substring(0, 7)
})
}
const pieData = res.pieData || []
const saleAmount = pieData
.map(item => item.saleAmount)
.reduce((prev, cur) => {
return prev + cur
}, 0)
pieData.forEach(item => {
this.orderList.forEach(i => {
if (i.orderSource == item.orderSource) {
i.saleAmount = item.saleAmount
i.orderCount = item.orderCount
i.radio = ((100 * item.saleAmount) / saleAmount).toFixed(2)
}
if (pieData.length)
pieData.forEach(item => {
this.orderList.forEach(i => {
if (i.orderSource == item.orderSource) {
i.saleAmount = item.saleAmount
i.orderCount = item.orderCount
i.radio = ((100 * item.saleAmount) / saleAmount).toFixed(2)
}
})
})
})
else this.emptyStatus = true
})
}
}
......@@ -267,6 +280,16 @@ export default {
text-align: center;
margin-bottom: 20px;
}
.empty-panel {
text-align: center;
color: #999999;
font-size: 16px;
.empty-img {
width: 338px;
height: 142px;
margin: 20px auto;
}
}
&-left {
width: 360px;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!