Commit 0649ce31 by 前端

Merge branch 'v3.19.0' into 'master'

V3.19.0

See merge request !15
2 parents 40f7dbd9 d63a2c0d
...@@ -284,6 +284,56 @@ const viewData = params => { ...@@ -284,6 +284,56 @@ const viewData = params => {
sign: true sign: true
}) })
} }
//增值业务分析-精品升级-产值趋势
const tendency = params => {
params.method = 'scrm.api.boutiquecoupon.rop.router.twoCityTale'
params.routerMethod = 'dj.api.smartcarlife.goodsOrderProfitAllocation.shop.merchant.tendency'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
//获取销售额、订单统计、业务占比信息
const analysisOrder = params => {
params.method = 'marketing.api.analysis.order'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//门店精品升级、众筹、精品升级12个月产值趋势图
const activityOutputTrend = params => {
params.method = 'marketing.api.activity.activityOutputTrend'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//客户群
const queryCrowdTree = params => {
params.method = 'scrm.api.datahub.user.queryCrowdTree'
return http({
url: 'rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
const queryLabelCount = params => {
params.method = 'scrm.api.datahub.labelgroup.queryLabelCount'
return http({
url: 'rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
export default { export default {
getChart, getChart,
...@@ -312,5 +362,10 @@ export default { ...@@ -312,5 +362,10 @@ export default {
isOpenSmartcarlife, isOpenSmartcarlife,
serviceBillOpen, serviceBillOpen,
serviceBillStat, serviceBillStat,
viewData viewData,
tendency,
analysisOrder,
queryCrowdTree,
activityOutputTrend,
queryLabelCount
} }
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-07 16:54:06
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-09-27 12:11:28
* @FilePath: \scrm-micro-journey\src\api\modules\journeyConfig.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { http_sop } from '@/main'
//查询模板实例客户分页列表
const getCustomersList = params => {
return http_sop({
url: `process/sop/api/sopInsts/customers`,
method: 'get',
data: params,
sign: false
})
}
//旅程列表
const byGroupIdSop = params => {
return http_sop({
url: 'process/sop/api/sopInsts/byGroupId',
method: 'get',
data: params,
sign: false
})
}
//旅程列表详情
const getInstIdDetail = params => {
return http_sop({
url: 'process/sop/api/sopInsts/' + params.instId,
method: 'get',
// data: params,
sign: false
})
}
//旅程列表详情
const statistic = params => {
return http_sop({
url: 'process/sop/api/sopInsts/customer/statistic',
method: 'get',
data: params,
sign: false
})
}
export default { getCustomersList, byGroupIdSop, getInstIdDetail, statistic }
...@@ -144,6 +144,7 @@ img { ...@@ -144,6 +144,7 @@ img {
.flex-row-between { .flex-row-between {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center;
} }
.glsx-table .line-ellipsis { .glsx-table .line-ellipsis {
display: inline; display: inline;
......

1.12 KB | W: | H:

1.92 KB | W: | H:

src/assets/img/home/step3_i.png
src/assets/img/home/step3_i.png
src/assets/img/home/step3_i.png
src/assets/img/home/step3_i.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* @version: 1.0.0 * @version: 1.0.0
* @Author: limin * @Author: limin
* @Date: 2021-09-06 10:10:44 * @Date: 2021-09-06 10:10:44
* @LastEditors: 前端 qianduan01@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-15 15:24:20 * @LastEditTime: 2023-09-14 14:43:54
* @FilePath: \scrm\scrm-sub-blog\src\components\index.js * @FilePath: \scrm\scrm-sub-blog\src\components\index.js
*/ */
import Vue from 'vue' import Vue from 'vue'
...@@ -13,7 +13,9 @@ import _button from '@/components/glsx-button/index' ...@@ -13,7 +13,9 @@ import _button from '@/components/glsx-button/index'
import glsxTable from '@/components/glsx-table/index.vue' import glsxTable from '@/components/glsx-table/index.vue'
import glsxPreview from '@/components/preview/index.vue' import glsxPreview from '@/components/preview/index.vue'
import glsxCombiForm from '@/components/glsx-combi-form/index.vue' import glsxCombiForm from '@/components/glsx-combi-form/index.vue'
import linechart from '@/components/lineChart/index'
Vue.component('glsx-button', _button) Vue.component('glsx-button', _button)
Vue.component('glsx-preview', glsxPreview) Vue.component('glsx-preview', glsxPreview)
Vue.component('glsx-combi-form', glsxCombiForm) Vue.component('glsx-combi-form', glsxCombiForm)
Vue.component('line-chart', linechart)
// Vue.component('glsx-table', glsxTable) // Vue.component('glsx-table', glsxTable)
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-14 14:07:44
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-10-16 16:39:39
* @FilePath: \scrm-micro-home\src\components\lineChart\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="line-box">
<div :id="domId" class="line-chart"></div>
</div>
</template>
<script>
import * as echarts from 'echarts'
import getLineOptions from '../options'
export default {
name: 'lineChart',
props: {
domId: {
type: String,
default: 'line-chart'
},
lineList: {
type: [Object, Array],
default: () => {}
},
functionStr: {
type: String,
default: 'getLineOptions'
}
},
data() {
return {
lineOptions: [],
timer: null
}
},
watch: {
lineList: {
handler() {
this.lineOptions = getLineOptions[this.functionStr](this.lineList)
this.chartBindEvent()
},
deep: true
}
},
mounted() {
this.lineDom = document.getElementById(this.domId)
this[this.domId] = echarts.init(this.lineDom)
window.addEventListener('resize', this[this.domId].resize)
},
beforeDestroy() {
window.removeEventListener('resize', this[this.domId].resize)
},
methods: {
chartBindEvent() {
this[this.domId].setOption(this.lineOptions)
this.$nextTick(() => {
this[this.domId].resize()
})
}
}
}
</script>
<style lang="scss" scoped>
.line-box {
width: 100%;
height: 100%;
color: #ffffff;
.line-chart {
height: calc(100% - 10px);
}
}
</style>
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-14 14:08:14
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-10-12 14:58:59
* @FilePath: \scrm-micro-home\src\components\options.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import * as echarts from 'echarts'
import util from '@/utils/util'
function getLineOptions(obj) {
const { color, lineList } = obj
// const statDate = dataList.map(item => item.statDate)
const dataList = lineList.map(item => +item.ordinateValue || +item.output || 0)
console.log(dataList, 'dataList')
// 定义颜色渐变
var gradientColors = [
{
offset: 0, // 渐变起始位置
color: color[0] // 渐变起始颜色
},
{
offset: 1, // 渐变结束位置
color: color[1] // 渐变结束颜色
}
]
const num = dataList.map((item, index) => {
return {
value: item,
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, gradientColors) // 设置渐变色
}
}
}
})
console.log(num)
var options = {
xAxis: {
type: 'category',
axisLabel: {
show: false // 隐藏 y 轴坐标标签
},
axisTick: {
show: false // 隐藏 y 轴刻度线
},
data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
},
grid: {
bottom: 0,
top: 0
},
yAxis: {
type: 'value',
axisLabel: {
show: false // 隐藏 y 轴坐标标签
},
splitLine: false,
axisTick: {
show: false // 隐藏 y 轴刻度线
}
},
series: [
{
barWidth: '50%', // 柱条宽度
data: num,
// itemStyle: {
// normal: {
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, gradientColors) // 设置渐变色
// }
// },
type: 'bar'
}
]
}
return options
}
function getLineOddOptions(obj) {
const { color, lineList } = obj
console.log(obj)
// const statDate = dataList.map(item => item.statDate)
const dataList = lineList.map(item => item.saleAmount)
const dataX = lineList.map(item => item.aggregateTime)
// 定义颜色渐变
var gradientColors1 = [
{
offset: 0, // 渐变起始位置
color: color[0] // 渐变起始颜色
},
{
offset: 1, // 渐变结束位置
color: color[1] // 渐变结束颜色
}
]
var gradientColors2 = [
{
offset: 0, // 渐变起始位置
color: color[2] // 渐变起始颜色
},
{
offset: 1, // 渐变结束位置
color: color[3] // 渐变结束颜色
}
]
const num = dataList.map((item, index) => {
return {
value: item
// itemStyle: {
// normal: {
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, index % 2 == 0 ? gradientColors1 : gradientColors2) // 设置渐变色
// }
// }
}
})
var options = {
xAxis: {
type: 'category',
// axisLabel: {
// show: false // 隐藏 y 轴坐标标签
// },
axisTick: {
show: false // 隐藏 y 轴刻度线
},
data: dataX
},
tooltip: {
trigger: 'axis', // 设置触发类型为坐标轴轴线触发
axisPointer: {
type: 'line' // 设置指示器类型为直线
},
formatter: function(params) {
const value = params[0].value
return `销售额<br><b>¥${util.formatNumber(value)}</b>`
}
},
grid: {
bottom: '10%',
top: '8%'
},
// 其他配置项...
dataZoom: [
{
type: 'slider', // 显示滑动条
xAxisIndex: 0, // 指定水平拖动的 x 轴索引
start: 0, // 初始的数据窗口范围的起始位置
end: 100 // 初始的数据窗口范围的结束位置
// dataBackground: {
// lineStyle: {
// width: 10, // 滑动柱的宽度
// color: '#ff0000' // 滑动柱的颜色
// }
// }
}
],
yAxis: {
type: 'value',
axisLabel: {
formatter: function(value) {
if (value === 0) {
return ''
} else {
return value
}
}
}
},
series: [
{
barWidth: '35%', // 柱条宽度
data: num,
// itemStyle: {
// normal: {
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, gradientColors) // 设置渐变色
// }
// },
type: 'line',
areaStyle: {
color: 'rgba(211, 208, 255, 1)' // 设置面积颜色和透明度
}
}
]
}
return options
}
function getPieOptions(obj) {
console.log(obj, 888)
const color = obj.map(item => item.color)
const dataList = obj.map(item => {
return {
value: item.saleAmount
}
})
var options = {
color,
series: [
{
name: '',
type: 'pie',
// center: ['50%', '53%'],
radius: ['60%', '80%'],
label: {
show: false, // 不显示标签
position: 'center'
},
emphasis: {
scale: true, // 不放大扇区,
label: {
show: true,
formatter: function(params) {
return '{a|销售额}\n{b|¥' + util.formatNumber(params.value) + '}'
},
rich: {
a: {
fontSize: 12,
lineHeight: 24
},
b: {
fontSize: 20,
lineHeight: 30
}
}
}
},
labelLine: {
show: false // 不显示标签引导线
},
data: dataList
}
]
}
return options
}
export default { getLineOptions, getLineOddOptions, getPieOptions }
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: limin * @Author: limin
* @Date: 2021-08-13 14:12:11 * @Date: 2021-08-13 14:12:11
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-20 10:49:23 * @LastEditTime: 2023-09-26 11:38:56
* @FilePath: \scrm\scrm-sub-blog\src\main.js * @FilePath: \scrm\scrm-sub-blog\src\main.js
*/ */
import Vue from 'vue' import Vue from 'vue'
...@@ -20,6 +20,7 @@ Vue.prototype.defaultLabelWidth = '154px' ...@@ -20,6 +20,7 @@ Vue.prototype.defaultLabelWidth = '154px'
start() start()
export { bootstrap, mount, unmount } from '@/setup' export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params) export const http = params => Vue.prototype.$http(params)
export const http_sop = params => Vue.prototype.$http_sop(params)
export const http_common = params => Vue.prototype.$http_common(params) export const http_common = params => Vue.prototype.$http_common(params)
export const http_merchant = params => Vue.prototype.$http_merchant(params) export const http_merchant = params => Vue.prototype.$http_merchant(params)
export const http_gpt = params => Vue.prototype.$http_gpt(params) export const http_gpt = params => Vue.prototype.$http_gpt(params)
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-07-22 18:15:13 * @Date: 2022-07-22 18:15:13
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-13 12:04:30 * @LastEditTime: 2023-09-27 12:11:47
* @FilePath: \scrm-micro-home\src\setup\qiankun.js * @FilePath: \scrm-micro-home\src\setup\qiankun.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -28,13 +28,14 @@ let routes = [] ...@@ -28,13 +28,14 @@ let routes = []
let router = null let router = null
let instance = null let instance = null
export async function bootstrap({ name, id, history, common, messenger, globalState, routerBase }) { export async function bootstrap({ name, id, history, common, messenger, globalState, routerBase }) {
const { response, request, sign, secret, request_common, request_merchant, request_gpt, sign_common, scene, cavansObj } = await fetchConfig(common) const { response, request, sign, secret, request_common, response_sop, request_merchant, request_gpt, request_sop, sign_common, scene, cavansObj } = await fetchConfig(common)
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
Vue.prototype.$common = common Vue.prototype.$common = common
Vue.prototype.cavansObj = cavansObj Vue.prototype.cavansObj = cavansObj
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_sop = new common.Http({ response: response_sop, request: request_sop, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token, 'Content-Type': 'application/json' } })
Vue.prototype.$http_merchant = new common.Http({ response, request: request_merchant, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http_merchant = new common.Http({ response, request: request_merchant, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_gpt = new common.Http({ response, request: request_gpt, sign, secret, alert: ElementUI.Message.error }) Vue.prototype.$http_gpt = new common.Http({ response, request: request_gpt, sign, secret, alert: ElementUI.Message.error })
Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } }) Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
......
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-16 17:13:33
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-09-26 14:55:34
* @FilePath: \scrm-micro-home\src\store\modules\marketing.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
export default {
namespaced: true,
state: {
journey_num: 0
},
mutations: {
// 设置客户信息
SET_JOURNEY_NUM(state, data) {
state.journey_num = data
}
}
}
...@@ -67,6 +67,67 @@ util.getPrevMonth = function() { ...@@ -67,6 +67,67 @@ util.getPrevMonth = function() {
} }
return year + '年' + month + '月' return year + '年' + month + '月'
} }
util.getDays = function() {
// 获取Date()对象
let date = new Date()
// 获取当前事件的年份转为字符串
let year = date.getFullYear().toString()
// 获取月份,注意:月份默认从0开始,所以要+1
let month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : (date.getMonth() + 1).toString()
// 获取天,
let day = date
.getDate()
.toString()
.padStart(2, 0)
// 获取时
let hour = date
.getHours()
.toString()
.padStart(2, 0)
// 获取分
let minute = date
.getMinutes()
.toString()
.padStart(2, 0)
// 获取秒
let second = date
.getSeconds()
.toString()
.padStart(2, 0)
// 拼接时间
// 例如:1号:00:00:00,当日:当前时间
// 举例:2022-09-01 00:00:00 2022-09-29 13:39:29
let begin = year + '-' + month + '-01' + ' 00:00:00' // 当月第一天
let end = year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second // 当天
return [begin, end]
}
util.getMonth = function() {
// 获取Date()对象
let date = new Date()
// 获取当前事件的年份转为字符串
let year = date.getFullYear().toString()
// 获取月份,注意:月份默认从0开始,所以要+1
let month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : (date.getMonth() + 1).toString()
// 获取天,
let day = date.getDate() < 10 ? '0' + date.getDate().toString : date.getDate().toString()
// 获取时
let hour = date.getHours().toString()
// 获取分
let minute = date.getMinutes().toString()
// 获取秒
let second = date.getSeconds().toString()
// 拼接时间
// 例如:1号:00:00:00,当日:当前时间
// 举例:2022-09-01 00:00:00 2022-09-29 13:39:29
let begin = year + '-' + month + '-01' + ' 00:00:00' // 当月第一天
let end = year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second // 当天
console.log(begin)
console.log(end)
}
util.getCurrentMonthLast = function(date) { util.getCurrentMonthLast = function(date) {
var endDate = new Date(date) var endDate = new Date(date)
var month = endDate.getMonth() var month = endDate.getMonth()
...@@ -120,6 +181,23 @@ util.limitPrice = (newValue, oldValue, intergerDigit, pointDigit, minValue, maxV ...@@ -120,6 +181,23 @@ util.limitPrice = (newValue, oldValue, intergerDigit, pointDigit, minValue, maxV
return newValue ? oldValue : '' return newValue ? oldValue : ''
} }
} }
/**
* 正则表过式:数字三位加逗号,保留两位小数
* @param {Number} num 数据
* @param {Number} pointNum 小数点位数
*/
util.formatNumber = function(num, pointNum = 2) {
if ((!num && num !== 0) || num == '-') return '--'
let arr = (typeof num == 'string' ? parseFloat(num) : num).toFixed(pointNum).split('.')
// 方式一
let regExp = arr[0].replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
// 方式二
let regExp1 = arr[0].replace(/(?=(?!\b)(\d{3})+$)/g, '$&,')
return arr[1] === undefined ? regExp : `${regExp}.${arr[1]}`.replace(/(?<=\.\d*)0+$|\.0*$/, '')
}
util.isShowBtn = function(value, permissions) { util.isShowBtn = function(value, permissions) {
let isShowStatus = false let isShowStatus = false
const menu = JSON.parse(sessionStorage['SCRM_BASE_MENULIST']) const menu = JSON.parse(sessionStorage['SCRM_BASE_MENULIST'])
......
...@@ -88,7 +88,7 @@ export default { ...@@ -88,7 +88,7 @@ export default {
} }
] ]
} }
myChart.clear(); myChart.clear()
option && myChart.setOption(option) option && myChart.setOption(option)
} }
} }
......
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-14 10:26:24
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-10-16 16:33:32
* @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" v-if="chartList.length">
<div class="analysis-head">
增值业务分析
</div>
<div class="analysis-body">
<div class="analysis-item" v-for="(item, index) in chartList" :key="index">
<analysis-line :analysisData="item">
<line-chart :lineList="item" :domId="'analysis' + index"></line-chart>
</analysis-line>
</div>
</div>
</div>
</template>
<script>
import analysisLine from './AnalysisLine'
import util from '@/utils/util'
export default {
components: {
analysisLine
},
data() {
return {
chartList: [
{
title: '轻改业务-精品升级',
backgroundColor: 'linear-gradient(179deg, #F5F7FF 1%, #F9FBFF 100%)',
color: ['#A29EFF', '#5850FF'],
url: '/appreciation/inSale/upgrade',
isShow: () => util.isShowBtn('/inSale/upgrade', null),
value: 0,
isFlag: true,
lineList: []
},
{
title: '轻改业务-售后众筹',
backgroundColor: 'linear-gradient(179deg, #EFF8FF 1%, #F4FAFF 1%, #F6FCFF 100%)',
color: ['#83D8FF', '#0087FA'],
url: '/store/orderManage/index?order=4',
isShow: () => util.isShowBtn('/orderManage/index', null),
value: 154.9,
isFlag: true,
lineList: []
},
{
title: '保险业务-会员权益升级',
backgroundColor: 'linear-gradient(179deg, #FFF8F0 1%, #FFFCF9 100%)',
color: ['#FFCF8D', '#FF8D0A'],
url: '/appreciation/beforeSale/checkSet',
isShow: () => util.isShowBtn('/beforeSale/checkSet', null),
value: 101.5,
isFlag: true,
lineList: []
}
]
}
},
mounted() {
this.getLineList()
},
methods: {
//产值、柱状图数据
async getLineList() {
const res = await Promise.all([this.$apis.home.tendency({}), this.$apis.home.activityOutputTrend({ merchantId: this.$globalState.session.merchantId })])
const output = {
...res[0],
...res[1]
}
console.log(res, 'res')
const mapData = {
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 = output[mapData[index][2]]
})
this.chartList = this.chartList.filter(i => i.isFlag)
console.log(this.chartList)
}
}
}
</script>
<style lang="scss" scoped>
.analysis-main {
background: #fff;
margin-top: 16px;
.analysis-head {
font-size: 24px;
color: #333333;
padding-left: 20px;
height: 65px;
line-height: 65px;
border-bottom: 1px solid #f0f0fb;
}
.analysis-body {
padding: 16px 20px;
display: grid;
grid-template-columns: repeat(3, 32.66%);
column-gap: 1%;
}
}
</style>
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-14 11:21:38
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-10-13 10:53:12
* @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
-->
<template>
<div class="analysis-border" :style="{ 'background-image': analysisData.backgroundColor }">
<div class="analysis-border-title">{{ analysisData.title }}</div>
<div class="analysis-border-num flex">
累计增量产值
<span>¥{{ analysisData.value | formatNumber }}</span>
<span class="jump-btn" @click="jumpDetail" v-if="analysisData.isShow()">查看明细</span>
<span class="jump-btn" v-else>暂无权限</span>
</div>
<div class="analysis-border-line">
<slot />
</div>
</div>
</template>
<script>
import util from '@/utils/util'
export default {
props: {
analysisData: {
type: Object,
default: () => {}
}
},
data() {
return {}
},
filters: {
formatNumber(val) {
return util.formatNumber(val)
}
},
methods: {
jumpDetail() {
this.$history.push(this.analysisData.url)
}
}
}
</script>
<style lang="scss" scoped>
.analysis-border {
padding: 16px 20px;
&-title {
font-size: 16px;
color: #333333;
}
&-num {
font-size: 14px;
color: #666666;
margin: 10px 0px;
span {
color: #2cca74;
margin-left: 10px;
}
.jump-btn {
font-size: 14px;
color: #5850ff;
margin-left: auto;
cursor: pointer;
}
}
&-line {
height: 104px;
}
}
</style>
<template>
<div class="analysis-main" v-if="journeyList.length">
<div class="analysis-head">
客户旅程分析
</div>
<div class="analysis-body">
<div class="analysis-item" v-for="(item, index) in journeyList" :key="index">
<div class="analysis-item-head">
<img :src="require(`@/assets/img/home/icon-${index + 1}.png`)" />
<span>{{ item.instName }}</span>
<a @click="handleJump(item, 'journey/index')" v-if="item.instStatus == 1 && isShow('/journey/index')">查看使用情况</a>
<a @click="handleJump(item, 'journeyConfig/config')" v-if="item.instStatus == 0 && isShow('/journeyConfig/config')">去使用</a>
<div :class="{ 'analysis-item-status': true, 'is-disable': item.instStatus != 1 }">
<i :class="`${getStatusValue(item, 'icon')}`"></i>
<span>{{ getStatusValue(item, 'label') }}</span>
</div>
</div>
<div class="analysis-process">
<div class="analysis-process-item" v-for="(p, i) in item.journeyItem" :key="i" :style="{ height: item.instStatus === 1 ? '92px' : '72px' }">
<div class="analysis-process-title">{{ p.label }}</div>
<div class="analysis-process-task" v-if="item.instStatus == 1">当前客户:{{ p.customerList.length }}</div>
<div class="analysis-process-task">SOP任务:{{ p.nodes.length }}</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
const STATUS = [
{ label: '已启用', value: 1, icon: 'el-icon-check' },
{ label: '未启用', value: 0, icon: 'el-icon-close' },
{ label: '已禁用', value: -1, icon: 'el-icon-remove-outline' }
]
import { mapMutations } from 'vuex'
import util from '@/utils/util'
export default {
data() {
return {
journeyList: [],
journeyList2: [
{
id: 1,
title: '续保客户旅程1',
status: 1,
journeyItem: [
{
label: '待跟进',
process: 1
},
{
label: '有意向',
process: 2
},
{
label: '可报价',
process: 3
},
{
label: '已成交',
process: 4
},
{
label: '战败',
process: 5
}
]
},
{
id: 2,
title: '续保客户旅程2',
status: 2,
journeyItem: [
{
label: '待跟进',
process: 1
},
{
label: '有意向',
process: 2
},
{
label: '可报价',
process: 3
},
{
label: '已成交',
process: 4
},
{
label: '战败',
process: 5
}
]
}
]
}
},
mounted() {
this.byGroupIdSop()
},
methods: {
...mapMutations('journey', ['SET_JOURNEY_NUM']),
isShow(url) {
return util.isShowBtn(url, null)
},
async byGroupIdSop() {
const res = await this.$apis.journey.byGroupIdSop({ groupId: this.$globalState.session.merchantId, pageNumber: 1, pageSize: 1000 })
const journeyList = res.list || []
this.SET_JOURNEY_NUM(journeyList.length)
journeyList.forEach(item => {
const stages = JSON.parse(item.instParam).stages
item.journeyItem = []
let process = 0
for (let k in stages) {
process++
item.journeyItem.push({
customerList: [],
nodes: [],
label: stages[k].value,
process
})
}
})
const journeyList1 = journeyList.filter(item => item.instStatus == 1) //已启用
const journeyList2 = journeyList.filter(item => item.instStatus == 0) //未启用
let [enable, unenable] = [...journeyList1, ...journeyList2]
const customerList = await Promise.all([this.$apis.journey.getCustomersList({ sopJourneyId: enable.instId, pageSize: 10000, pageNumber: 1 }), unenable ? this.$apis.journey.getCustomersList({ sopJourneyId: unenable.instId }) : {}])
const nodes = await Promise.all([this.$apis.journey.getInstIdDetail({ instId: enable.instId }), unenable ? this.$apis.journey.getInstIdDetail({ instId: unenable.instId }) : {}])
if (enable)
enable.journeyItem.forEach(i => {
customerList[0].list.forEach(v => {
if (i.label == v.sopJourneyStage) {
i.customerList.push(v)
}
})
nodes[0].nodes.forEach(v => {
if (i.label == (v.nodeParam && JSON.parse(v.nodeParam).stage)) {
i.nodes.push(v)
}
})
})
if (unenable)
unenable.journeyItem.forEach(i => {
customerList[1].list.forEach(v => {
if (i.label == v.sopJourneyStage) {
i.customerList.push(v)
}
})
nodes[1].nodes.forEach(v => {
if (i.label == (v.nodeParam && JSON.parse(v.nodeParam).stage)) {
i.nodes.push(v)
}
})
})
this.journeyList = [enable, unenable].filter(item => item)
console.log(this.journeyList)
},
//状态值映射
getStatusValue(val, prop) {
return STATUS.find(item => item.value == val.instStatus)[prop]
},
handleJump(item, path) {
this.$history.push(`/scene/${path}?title=${item.instName}-续保旅程&instId=${item.instId}`)
}
}
}
</script>
<style lang="scss" scoped>
.analysis-main {
background: #fff;
.analysis-head {
font-size: 24px;
color: #333333;
padding-left: 20px;
height: 65px;
line-height: 65px;
border-bottom: 1px solid #f0f0fb;
}
.analysis-body {
padding: 16px 20px;
.analysis-item {
border: 1px solid #f0f0fb;
border-radius: 4px;
&-head {
display: flex;
align-items: center;
height: 50px;
padding-left: 16px;
border-bottom: 1px solid #f0f0fb;
img {
width: 30px;
height: 30px;
}
> span {
font-size: 16px;
color: #333333;
margin: 0px 10px;
}
a {
font-size: 14px;
color: #5850ff;
cursor: pointer;
}
.analysis-item-status {
display: flex;
justify-content: center;
align-items: center;
margin-left: auto;
width: 84px;
height: 28px;
background-image: linear-gradient(108deg, #2cca74 0%, #16ced2 100%);
border-radius: 2px 0 0 2px;
color: #ffffff;
font-size: 14px;
&.is-disable {
background-image: linear-gradient(108deg, #acacca 0%, #c9bcd0 100%);
}
i {
margin-right: 4px;
&.el-icon-remove-outline {
transform: rotate(180deg);
}
}
}
}
.analysis-process {
padding: 20px;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
column-gap: 16px;
&-item {
margin-top: 20px;
background-image: linear-gradient(270deg, #ffffff 0%, #f7f7fe 100%, #f9f9fd 100%);
height: 72px;
border-left: 1px solid #5850ff;
position: relative;
padding: 20px;
box-sizing: border-box;
&::before {
position: absolute;
content: '';
width: 12px;
height: 12px;
left: -6px;
top: -20px;
background: url('../../../assets/img/home/circel-i.png');
z-index: 10;
}
&::after {
position: absolute;
content: '';
width: calc(100% + 16px);
height: 1px;
left: 0px;
top: -14px;
background: #e6e6ff;
}
.analysis-process-title {
font-size: 14px;
color: #333333;
}
.analysis-process-task {
font-size: 14px;
color: #666666;
margin-top: 8px;
}
}
}
}
}
}
</style>
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-14 10:26:58
* @LastEditors: yangming yangming@didihu.com.cn
* @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
-->
<template>
<div class="analysis-main">
<div class="analysis-head">
微店经营分析
</div>
<div class="analysis-body">
<div class="analysis-bar flex ">
<div class="analysis-bar-left">
<div class="analysis-bar-wrap">
<div class="warp-desc">总销售额</div>
<div class="warp-num">{{ orderDetail.totalSaleAmount | formatNumber }}</div>
<div class="warp-price">
本月销售额
<span>¥{{ orderDetail.saleAmount | formatNumber }}</span>
</div>
<img src="@/assets/img/home/money-icon.png" />
</div>
<div class="analysis-bar-wrap">
<div class="warp-desc">总订单数</div>
<div class="warp-num">{{ orderDetail.totalOrderCount | formatNumber }}</div>
<div class="warp-price">
本月订单数
<span>{{ orderDetail.orderCount }}</span>
</div>
<img src="@/assets/img/home/order-icon.png" />
</div>
</div>
<div class="analysis-bar-right">
<div class="flex-row-between">
<div class="chart-title">销售额趋势</div>
<div class="chart-time">
<el-radio-group v-model="dateValue" size="small">
<el-radio-button label="day">本月</el-radio-button>
<el-radio-button label="month">全年</el-radio-button>
</el-radio-group>
<el-date-picker class="chart-time-picker" @change="dateChange" v-model="timeValue" size="small" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</div>
</div>
<line-chart :lineList="lineList" domId="store1" functionStr="getLineOddOptions"></line-chart>
</div>
</div>
<div class="analysis-circle">
<div class="analysis-circle-title">业务占比分析</div>
<div class="flex" v-if="!emptyStatus">
<div class="analysis-circle-left">
<line-chart :lineList="orderList" domId="order1" functionStr="getPieOptions"></line-chart>
</div>
<div class="analysis-circle-right">
<div class="chart-item" v-for="(item, index) in orderList" :key="index">
<div class="chart-item-1">
<i :style="{ background: item.color }"></i>
{{ item.label }}
</div>
<div class="chart-item-2">
<img src="@/assets/img/home/pie-arrow.png" />
</div>
<div class="chart-item-3">占比 {{ item.radio }}%</div>
<div class="chart-item-4">销售额 ¥{{ item.saleAmount | formatNumber }}</div>
<div class="chart-item-4">订单数:{{ item.orderCount }}</div>
</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>
</template>
<script>
import util from '@/utils/util'
import * as dayjs from 'dayjs'
export default {
data() {
return {
dateValue: null,
lineList: {
title: '精改业务-精品升级',
backgroundColor: 'linear-gradient(179deg, #F5F7FF 1%, #F9FBFF 100%);',
color: ['#98B8FF', '#5850FF', '#83D8FF', '#0087FA'],
lineList: []
},
timeValue: [],
emptyStatus: true,
orderDetail: {},
orderList: [
{ label: '商城', color: '#5850FF', orderSource: 1, saleAmount: 0, orderCount: 0, radio: 0 },
{ label: '直播', color: '#50CEFB', orderSource: 2, saleAmount: 0, orderCount: 0, radio: 0 },
{ label: '秒杀', color: '#BACEFD', orderSource: 3, saleAmount: 0, orderCount: 0, radio: 0 },
{ label: '众筹', color: '#87F2E3', orderSource: 4, saleAmount: 0, orderCount: 0, radio: 0 },
{ label: '优惠套餐', color: '#B1E7FC', orderSource: 8, saleAmount: 0, orderCount: 0, radio: 0 },
{ label: '膨胀金', color: '#C7CBD2', orderSource: 5, saleAmount: 0, orderCount: 0, radio: 0 }
]
}
},
filters: {
formatNumber(val) {
return util.formatNumber(val) || 0
}
},
watch: {
dateValue(val) {
if (val) {
this.storeData(val)
}
}
},
mounted() {
const start = new Date()
this.timeValue = [start.setTime(start.getTime() - 3600 * 1000 * 24 * 14), new Date()]
this.init(this.timeValue)
},
methods: {
init(date) {
this.getLineList({
startTime: dayjs(date[0]).format('YYYY-MM-DD') + ' 00:00:00',
endTime: dayjs(date[1]).format('YYYY-MM-DD') + ' 23:59:59'
})
},
dateChange(val, isReset = true) {
const params = {
startTime: dayjs(val[0]).format('YYYY-MM-DD') + ' 00:00:00',
endTime: dayjs(val[1]).format('YYYY-MM-DD') + ' 23:59:59',
aggregateType: this.dateValue
}
this.getLineList(params)
if (isReset) this.dateValue = null
},
//选择本月/本年
storeData(name) {
let startTime, endTime
let now = new Date()
let nowMonth = now.getMonth()
let nowYear = now.getFullYear()
this.currentTime = name
switch (name) {
case 'day':
startTime = new Date(nowYear, nowMonth, 1)
endTime = new Date()
// endTime = new Date(nowYear, nowMonth + 1, 0)
break
case 'month':
startTime = new Date(nowYear, 0, 1)
endTime = new Date()
// endTime = new Date(nowYear, 11, 31)
break
}
this.timeValue = [startTime, endTime]
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)
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
})
}
}
}
</script>
<style lang="scss" scoped>
.analysis-main {
background: #fff;
margin-top: 16px;
.analysis-head {
font-size: 24px;
color: #333333;
padding-left: 20px;
height: 65px;
line-height: 65px;
border-bottom: 1px solid #f0f0fb;
}
.analysis-body {
padding: 16px 20px;
.analysis-bar-left {
width: 280px;
.analysis-bar-wrap {
width: 280px;
height: 147px;
background-image: linear-gradient(179deg, #ecefff 0%, #f7faff 79%);
border-radius: 4px;
padding: 20px 24px;
box-sizing: border-box;
position: relative;
.warp-desc {
font-size: 14px;
color: #666666;
}
img {
width: 110px;
height: 147px;
position: absolute;
right: 0px;
top: 0px;
z-index: 10;
}
.warp-num {
color: #333333;
font-size: 26px;
line-height: 38px;
font-weight: 600;
margin-top: 15px;
}
.warp-price {
font-size: 14px;
color: #666666;
margin-top: 26px;
span {
color: #2cca74;
margin-left: 10px;
}
}
&:first-child {
margin-bottom: 16px;
}
}
}
.analysis-bar-right {
flex: 1;
border: 1px solid #f0f0fb;
border-radius: 4px;
padding: 20px;
margin-left: 20px;
height: 310px;
box-sizing: border-box;
overflow: hidden;
.chart-title {
font-size: 16px;
color: #333333;
text-align: center;
}
.chart-time {
display: flex;
justify-content: center;
&-picker {
margin-left: 10px;
}
}
}
.analysis-circle {
margin-top: 16px;
padding: 16px 20px;
border: 1px solid #f0f0fb;
border-radius: 4px;
height: 262px;
.analysis-circle-title {
font-size: 16px;
color: #333333;
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;
}
&-right {
flex: 1;
.chart-item {
display: grid;
grid-template-columns: 20% 20% 20% 20% 20%;
margin-top: 22px;
font-size: 14px;
color: #666666;
&-1 {
color: #333333;
i {
display: inline-block;
width: 8px;
border-radius: 50%;
height: 8px;
margin-right: 8px;
}
}
&-2 {
img {
width: 31.5px;
}
}
}
}
}
}
}
</style>
<template>
<div class="scrm-main">
<div class="info-border">
<div class="info-title">
企业信息 <span v-if="info.merchantModelName">{{$globalState.session.accountLevel == 4?'门店':'集团' }}</span>
</div>
<div class="merchant-info">
<p>
<span>所属企业:</span
><span class="text-hide-2">{{ info.parentName ? info.parentName : "- -" }}</span>
</p>
<p>
<span>所属门店:</span
><span class="text-hide-2">{{ info.merchantName ? info.merchantName : "- -" }}</span>
</p>
<p>
<span>关联企微:</span
><span><span class="text-hide-2">{{ info.entmicroName ? info.entmicroName : "- -" }}</span>
<span class="info-succ-btn" v-if="info.entmicroName">已授权</span></span>
</p>
<p>
<span>企微成员:</span
><span>{{ info.entMicroEmployeeCount ? info.entMicroEmployeeCount : "- -" }}</span>
</p>
</div>
</div>
<div class="info-border consult-box">
<div class="info-title scrm-textCenter">嘀加企微管家</div>
<div class="info-title scrm-textCenter">专属顾问</div>
<div class="info-content">
<div class="info-qrcode">
<div class="info-qrcode-image">
<img src="@/assets/img/qrcode.png" alt="" />
</div>
<div class="info-qrcode-desc">扫码添加您的专属顾问</div>
</div>
<div class="info-consult-icon">
<i class="el-icon-chat-dot-round"> </i><span>联系客服</span>
</div>
<div class="info-time">
<span>工作时间:9:00-18:00</span>
</div>
</div>
</div>
<div class="info-border">
<div class="info-title">赢销学院</div>
<div class="info-content">
<p><span>子账户的注册和管理</span><span>>></span></p>
<p><span>老客户引流企微操作流程</span><span>>></span></p>
<p><span>企微授权流程</span><span>>></span></p>
<p><span>权益裂变操作流程</span><span>>></span></p>
<p><span>优惠券营销使用手册</span><span>>></span></p>
</div>
<div class="info-more">了解更多</div>
</div>
<div class="info-border">
<div class="info-title">版本更新</div>
<div class="info-content">
<div class="info-content-title">2021年7月20日更新</div>
<div class="info-content-desc">1、新增赢销微店2.0</div>
<div class="info-content-desc">2、新增赢销微店2.0</div>
</div>
<div class="info-more">了解更多</div>
</div>
</div>
</template>
<script>
export default {
name: "enterpriseInformation",
data() {
return {
info: {},
};
},
methods: {
getInfo() {
this.$apis.home.findMerchantInfoByMerchantNo({}).then((res) => {
this.info = res;
});
},
},
mounted() {
this.getInfo();
},
};
</script>
<style scoped lang="scss">
.info-border {
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
margin-bottom: 20px;
padding: 20px;
box-sizing: border-box;
.info-title {
font-size: 20px;
font-weight: 600;
color: #333333;
line-height: 24px;
letter-spacing: 1px;
span {
display: inline-block;
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 20px;
padding: 0px 5px;
border-radius: 2px;
vertical-align: top;
border: 1px solid #5850ff;
}
}
}
.merchant-info {
margin: 20px 0px 6px;
p {
display: flex;
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
margin-bottom: 10px;
.info-succ-btn {
display: inline-block;
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 20px;
padding: 0px 5px;
border-radius: 2px;
vertical-align: top;
border: 1px solid #5850ff;
}
span {
&:first-child {
min-width: 70px;
}
}
}
}
.info-content {
margin: 20px 0px 6px;
&-title {
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
}
&-desc {
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 20px;
}
p {
display: flex;
justify-content: space-between;
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
margin-bottom: 10px;
span {
color: #666666;
&:first-child {
display: inline-block;
width: 170px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
}
.info-more {
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 20px;
letter-spacing: 1px;
cursor: pointer;
}
.info-qrcode {
text-align: center;
}
.info-qrcode-image {
height: 100px;
width: 100px;
margin: 0 auto;
}
.info-qrcode-desc {
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
line-height: 24px;
margin: 10px 0px;
}
.info-time {
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
margin-top: 5px;
}
.info-consult-icon {
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 26px;
letter-spacing: 1px;
text-align: center;
i {
font-size: 20px;
color: #fe911a;
vertical-align: middle;
margin-right: 5px;
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class="home-data-container" v-loading="loading"> <div class="home-data-container" v-loading="loading">
<div class="home-data-item"> <div class="home-data-item">
<div class="arrow-icon"><img src="@/assets/img/home/arrow1.png" alt="" /></div>
<div class="step-title">阶段一:数据导入</div> <div class="step-title">阶段一:数据导入</div>
<div class="background-f7 step-border-1"> <div class="background-f7 step-border-1">
<div class="step-icon"><img src="@/assets/img/home/up.png" alt="" /></div> <div class="step-icon"><img src="@/assets/img/home/up.png" alt="" /></div>
...@@ -11,7 +10,7 @@ ...@@ -11,7 +10,7 @@
<label>人</label> <label>人</label>
</div> </div>
<div class="step-title-h2" v-else>请上传数据</div> <div class="step-title-h2" v-else>请上传数据</div>
<div class="base-download" @click="jumpUrl('/drainage/square/index')" v-if="!cgacarUrl"> <div class="base-download" @click="jumpUrl('/custom/square/index')" v-if="!cgacarUrl">
<i class="el-icon-upload"></i> <i class="el-icon-upload"></i>
{{ purchaseCustomerCount ? '点击更新' : '上传文件' }} {{ purchaseCustomerCount ? '点击更新' : '上传文件' }}
</div> </div>
...@@ -37,8 +36,6 @@ ...@@ -37,8 +36,6 @@
<div class="step-title">阶段二:基盘客户识别及分群</div> <div class="step-title">阶段二:基盘客户识别及分群</div>
<div class="step-panel-2"> <div class="step-panel-2">
<div class="background-f7 step-border-2"> <div class="background-f7 step-border-2">
<div class="arrow-icon"><img src="@/assets/img/home/arrow2.png" alt="" /></div>
<div class="base-container" :style="`background-image: url(${require('@/assets/img/home/circle.png')})`"> <div class="base-container" :style="`background-image: url(${require('@/assets/img/home/circle.png')})`">
<div class="base-box" :style="`background-image: url(${require('@/assets/img/home/square.png')})`"> <div class="base-box" :style="`background-image: url(${require('@/assets/img/home/square.png')})`">
<div class="base-panel"> <div class="base-panel">
...@@ -63,32 +60,61 @@ ...@@ -63,32 +60,61 @@
</div> </div>
</div> </div>
<div class="background-f7 step-border-3"> <div class="background-f7 step-border-3">
<div class="arrow-icon"><img src="@/assets/img/home/arrow3.png" alt="" /></div> <div class="flex">
<div>
<div class="step-icon"><img src="@/assets/img/home/step2_i.png" alt="" /></div> <div class="step-icon"><img src="@/assets/img/home/step2_i.png" alt="" /></div>
<div class="step-title-h2">人群标签</div> <div class="step-title-h2 number">
{{ labelCount }}
<span>个</span>
</div>
<div class="step-title-h3 text-center">标签数</div>
<div class="step-operation" @click="jumpUrl('/custom/crowdManage/index')">
<label>标签管理</label>
</div>
</div>
<div>
<div class="step-icon"><img src="@/assets/img/home/step3_i.png" alt="" /></div>
<div class="step-title-h2 number">
{{ crowdTotal }}
<span>个</span>
</div>
<div class="step-title-h3 text-center">人群数</div>
<div class="step-operation" @click="jumpUrl('/custom/crowdManage/index')"> <div class="step-operation" @click="jumpUrl('/custom/crowdManage/index')">
<label>人群管理</label> <label>人群管理</label>
<img src="@/assets/img/home/forward.png" alt="" />
</div> </div>
<div class="step-operation" @click="jumpUrl('/custom/tagsManage/index')"> </div>
<label>标签管理</label>
<img src="@/assets/img/home/forward.png" alt="" />
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="home-data-item"> <div class="home-data-item">
<div class="step-title">阶段三:精准营销</div> <div class="step-title">阶段三:客户旅程匹配</div>
<div class="background-f7 step-border-4"> <div class="background-f7 step-border-4">
<div class="step-icon"><img src="@/assets/img/home/step3_i.png" alt="" /></div> <div class="step-icon"><img src="@/assets/img/home/step4_i.png" alt="" /></div>
<div class="step-title-h2">精准营销</div> <div class="step-title-h2 number">
<div class="step-operation" @click="jumpUrl('/marketing/friendGroup/index')"> {{ journey_num }}
<label>朋友圈营销</label> <span>个</span>
<img src="@/assets/img/home/forward.png" alt="" /> </div>
<div class="step-title-h3 text-center">客户旅程数</div>
<div class="step-operation" @click="jumpUrl('/scene/journeyConfig/index')" v-if="isShow('/journeyConfig/index')">
<label>旅程配置</label>
</div>
<div class="step-operation" v-else>
<label>旅程配置</label>
</div> </div>
<div class="step-operation" @click="jumpUrl('/marketing/customerTransform/index')"> </div>
<label>群发助手</label> </div>
<img src="@/assets/img/home/forward.png" alt="" /> <div class="home-data-item">
<div class="step-title">阶段四:自动化营销</div>
<div class="background-f7 step-border-4">
<div class="step-icon"><img src="@/assets/img/home/step5_i.png" alt="" /></div>
<div class="step-title-h2">sop自动化营销</div>
<div class="step-module">
<div class="step-module-item">客户群发</div>
<div class="step-module-item">客户朋友圈</div>
<div class="step-module-item">AI外呼</div>
<div class="step-module-item">短信</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -96,11 +122,14 @@ ...@@ -96,11 +122,14 @@
</template> </template>
<script> <script>
import { mapActions } from 'vuex' import util from '@/utils/util'
import { mapActions, mapState } from 'vuex'
export default { export default {
name: 'homeStep', name: 'homeStep',
data() { data() {
return { return {
crowdTotal: 0,
labelCount: 0,
cgacarUrl: false, cgacarUrl: false,
loading: false, loading: false,
customerCount: 0, customerCount: 0,
...@@ -113,11 +142,17 @@ export default { ...@@ -113,11 +142,17 @@ export default {
entmicroAddCustomerCountPercent: 0 entmicroAddCustomerCountPercent: 0
} }
}, },
computed: {
...mapState('journey', ['journey_num'])
},
methods: { methods: {
...mapActions('marketing', ['setCustomDetail']), ...mapActions('marketing', ['setCustomDetail']),
jumpUrl(url) { jumpUrl(url) {
this.$history.push(url) this.$history.push(url)
}, },
isShow(url) {
return util.isShowBtn(url, null)
},
viewData() { viewData() {
this.loading = true this.loading = true
this.$apis.home.viewData({}).then(res => { this.$apis.home.viewData({}).then(res => {
...@@ -134,10 +169,48 @@ export default { ...@@ -134,10 +169,48 @@ export default {
this.entmicroAddCustomerCountPercent = customerCount ? ((100 * this.entmicroAddCustomerCount) / customerCount).toFixed(2) : 0 this.entmicroAddCustomerCountPercent = customerCount ? ((100 * this.entmicroAddCustomerCount) / customerCount).toFixed(2) : 0
} }
}) })
},
//标签数
queryLabelCount() {
this.$apis.home
.queryLabelCount({
labelStatReq: {
shopId: this.$globalState.session.merchantId,
edition: 1
}
})
.then(res => {
const { bizLabelCount = 0, rcLabelCount = 0, traLabelCount = 0 } = res || {}
this.labelCount = bizLabelCount + rcLabelCount + traLabelCount
})
},
//人群数
async queryCrowdTree() {
const res = await Promise.all([
this.$apis.home.queryCrowdTree({
req: {
pageSize: 1,
pageNum: 1,
crowdType: 2,
merchantId: this.$globalState.session.merchantId
}
}),
this.$apis.home.queryCrowdTree({
req: {
pageSize: 1,
pageNum: 1,
crowdType: 1,
merchantId: this.$globalState.session.merchantId
}
})
])
this.crowdTotal = res.reduce((prev, cur) => prev + cur.total, 0)
} }
}, },
mounted() { mounted() {
this.viewData() this.viewData()
this.queryCrowdTree()
this.queryLabelCount()
if (/cgacar/.test(location.host)) { if (/cgacar/.test(location.host)) {
this.cgacarUrl = true this.cgacarUrl = true
} }
...@@ -154,11 +227,16 @@ export default { ...@@ -154,11 +227,16 @@ export default {
display: flex; display: flex;
.home-data-item { .home-data-item {
background: #ffffff; background: #ffffff;
padding: 16px; padding: 16px 8px;
margin-right: 16px; margin-right: 16px;
width: 20%; width: 12vw;
box-sizing: border-box;
position: relative; position: relative;
&:nth-child(3) { &::nth-child(3) {
width: 176px;
}
&:nth-child(4) {
width: 13vw;
margin-right: 0px; margin-right: 0px;
} }
.step-icon { .step-icon {
...@@ -187,7 +265,7 @@ export default { ...@@ -187,7 +265,7 @@ export default {
} }
.step-border-1 { .step-border-1 {
margin-top: 16px; margin-top: 16px;
padding: 10px 16px; padding: 8px 16px;
position: relative; position: relative;
.step-icon { .step-icon {
position: absolute; position: absolute;
...@@ -202,13 +280,17 @@ export default { ...@@ -202,13 +280,17 @@ export default {
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
line-height: 20px; line-height: 20px;
&.text-center {
text-align: center;
}
} }
.step-title-h2 { .step-title-h2 {
font-size: 18px; font-size: 18px;
font-weight: 600; font-weight: 600;
color: #333333; color: #333333;
line-height: 25px; line-height: 30px;
margin: 6px 0px 10px; height: 30px;
margin: 6px 0px;
&.text-number { &.text-number {
font-size: 26px; font-size: 26px;
label { label {
...@@ -220,8 +302,8 @@ export default { ...@@ -220,8 +302,8 @@ export default {
.base-download { .base-download {
cursor: pointer; cursor: pointer;
width: 104px; width: 104px;
height: 32px; height: 27px;
line-height: 32px; line-height: 27px;
background: #2cca74; background: #2cca74;
border-radius: 3px; border-radius: 3px;
text-align: center; text-align: center;
...@@ -238,7 +320,7 @@ export default { ...@@ -238,7 +320,7 @@ export default {
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
line-height: 18px; line-height: 18px;
margin-top: 20px; margin-top: 15px;
img { img {
width: 14px; width: 14px;
height: 15px; height: 15px;
...@@ -248,7 +330,7 @@ export default { ...@@ -248,7 +330,7 @@ export default {
.step-panel-2 { .step-panel-2 {
display: flex; display: flex;
.step-border-2 { .step-border-2 {
width: 60%; flex: 1;
margin-top: 16px; margin-top: 16px;
margin-right: 16px; margin-right: 16px;
display: flex; display: flex;
...@@ -322,7 +404,6 @@ export default { ...@@ -322,7 +404,6 @@ export default {
} }
} }
.step-border-3 { .step-border-3 {
flex: 1;
position: relative; position: relative;
.arrow-icon { .arrow-icon {
position: absolute; position: absolute;
...@@ -341,12 +422,40 @@ export default { ...@@ -341,12 +422,40 @@ export default {
padding: 30px 0px 20px; padding: 30px 0px 20px;
.step-title-h2 { .step-title-h2 {
font-size: 18px; font-size: 18px;
color: #111111; color: #333;
letter-spacing: 0; letter-spacing: 0;
text-align: center; text-align: center;
line-height: 28px; line-height: 28px;
font-weight: 600; font-weight: 600;
margin: 4px 0px; margin: 4px 0px;
&.number {
font-size: 26px;
}
span {
font-size: 14px;
}
}
.step-title-h3 {
margin-top: 12px;
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 20px;
}
.step-module {
display: grid;
grid-template-columns: 48% 48%;
gap: 8px 4%;
padding: 8px;
font-size: 14px;
&-item {
height: 26px;
background: #f2f2ff;
border: 1px solid #dfdff9;
border-radius: 4px;
line-height: 26px;
text-align: center;
}
} }
.step-operation { .step-operation {
background: #5850ff; background: #5850ff;
...@@ -375,4 +484,9 @@ export default { ...@@ -375,4 +484,9 @@ export default {
} }
} }
} }
@media screen and (max-width: 1500px) {
.step-title {
font-size: 13px !important;
}
}
</style> </style>
<template>
<div class="report-home">
HOME
<glsx-button type="danger" @click="test()" class="test555" id="1211" mode="link">权限按钮测试</glsx-button>
<glsx-button type="success" size="small" @click="test()" id="1211" class="test">权限按钮测试2</glsx-button>
<el-button class="test" @click="test()">东方网分</el-button>
</div>
</template>
<script>
export default {
name: 'home',
data() {
return {
permissions: [1211]
}
},
methods: {
test() {
console.log('点击了按钮')
this.$messenger.send({ from: 11, message: '11111' })
}
}
}
</script>
<template>
<div class="add-chart">
<linechart :echartId="echartId1"></linechart>
<linechart :echartId="echartId2"></linechart>
</div>
</template>
<script>
import * as echarts from 'echarts';
import linechart from "./linechart";
export default {
name: 'sameAddEchart',
components: {
linechart,
},
data() {
return {
permissions: [1211],
echartId1: "addEchartId1",
echartId2: "addEchartId2",
echartId3: "addrEchartId3",
echartId4: "addEchartId4",
}
},
methods: {
test() {
console.log('点击了按钮')
this.$messenger.send({ from: 11, message: '11111' })
}
},
mounted() {
}
};
</script>
<style>
#echarts2 {
height: 300px;
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -5,13 +5,14 @@ ...@@ -5,13 +5,14 @@
<div class="home-banner-right" :style="`background-image: url(${require('@/assets/img/home/banner-right.png')})`"></div> <div class="home-banner-right" :style="`background-image: url(${require('@/assets/img/home/banner-right.png')})`"></div>
<div class="home-banner-text"> <div class="home-banner-text">
<div class="banner-title">企微管家SCRM · 快速上手</div> <div class="banner-title">企微管家SCRM · 快速上手</div>
<div class="banner-content">汽车行业私域流量数字化营销平台</div> <div class="banner-content">私域流量数字化营销平台,一套帮您变现的服务系统</div>
<div class="banner-content">一套帮您变现的服务系统</div>
</div> </div>
</div> </div>
<component :is="'home-step'"></component> <component :is="'home-step'"></component>
<component :is="'scene-subscription'"></component> <component :is="'journey'"></component>
<div class="home-use-container scrm-box-f"> <component :is="'microStore'"></component>
<component :is="'addValue'"></component>
<!-- <div class="home-use-container scrm-box-f">
<div class="home-use-title">客户线上化的场景推荐</div> <div class="home-use-title">客户线上化的场景推荐</div>
<div class="home-use-box"> <div class="home-use-box">
<div class="home-use-item"> <div class="home-use-item">
...@@ -72,18 +73,22 @@ ...@@ -72,18 +73,22 @@
<div class="use-operation" v-else>尚未该订阅服务</div> <div class="use-operation" v-else>尚未该订阅服务</div>
</div> </div>
</div> </div>
</div> </div> -->
</div> </div>
</template> </template>
<script> <script>
import homeStep from './components/home-step.vue' import homeStep from './components/home-step.vue'
import sceneSubscription from './components/scene-subscription' import journey from './components/Journey.vue'
import addValue from './components/AddValue'
import microStore from './components/MicroStore'
export default { export default {
name: 'home', name: 'home',
components: { components: {
homeStep, homeStep,
sceneSubscription addValue,
microStore,
journey
}, },
data() { data() {
return { return {
...@@ -109,7 +114,7 @@ export default { ...@@ -109,7 +114,7 @@ export default {
background: linear-gradient(to right, #6695ff, #655eff); background: linear-gradient(to right, #6695ff, #655eff);
width: 100%; width: 100%;
height: 166px; height: 166px;
padding-top: 24px; padding-top: 38px;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
.home-banner-left { .home-banner-left {
......
...@@ -78,7 +78,7 @@ export default { ...@@ -78,7 +78,7 @@ export default {
}, },
methods: { methods: {
jumpSqure() { jumpSqure() {
this.$history.push('/drainage/square/index') this.$history.push('/custom/square/index')
}, },
getEntmicroRadio(value) { getEntmicroRadio(value) {
this.entmicroCountRadio = value this.entmicroCountRadio = value
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!