Commit b0bc3b08 by huyue

Merge branch 'SAAS+V4.49.0-0121' of http://192.168.3.233:8090/saas_plus/dj-car-l…

…ife-system into SAAS+V4.49.0-0121
2 parents 09afd824 57f48fe9
...@@ -146,7 +146,13 @@ export function getProductOutputtrend (data) { ...@@ -146,7 +146,13 @@ export function getProductOutputtrend (data) {
data.method = 'dj.riskmanage.api.productefficiency.outputtrend' data.method = 'dj.riskmanage.api.productefficiency.outputtrend'
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
/**
* 店效盯防-门店详情-品销指标-获取员工列表
*/
export function getProductStaffList (data) {
data.method = 'dj.riskmanage.api.productefficiency.getstafflist'
return request(data, RequestMethods.POST)
}
/** /**
* 店效盯防-门店详情-人效指标-产值分析-获取产品列表 * 店效盯防-门店详情-人效指标-产值分析-获取产品列表
......
...@@ -143,8 +143,8 @@ export default { ...@@ -143,8 +143,8 @@ export default {
params.endDate = endDate params.endDate = endDate
// this.$emit('search', { // this.$emit('search', {
// allYear: false, // allYear: false,
// startDate: '2024-01-20', // startDate: '2024-10-01',
// endDate: '2024-02-20' // endDate: '2024-12-31'
// }) // })
this.$emit('search', params) this.$emit('search', params)
}, },
......
...@@ -18,6 +18,7 @@ import SearchBox from '../SearchBox' ...@@ -18,6 +18,7 @@ import SearchBox from '../SearchBox'
import * as echarts from 'echarts' import * as echarts from 'echarts'
import { getMerchantOutputDetail } from '@api/earlyWarningManager' import { getMerchantOutputDetail } from '@api/earlyWarningManager'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import {tooltipConfig} from '../chartConfig'
export default { export default {
components: { components: {
SearchBox SearchBox
...@@ -42,7 +43,6 @@ export default { ...@@ -42,7 +43,6 @@ export default {
async getBoardData (params) { async getBoardData (params) {
this.searchTime = params this.searchTime = params
this.getMerchantOutputDetail() this.getMerchantOutputDetail()
console.log(params)
}, },
async getMerchantOutputDetail () { async getMerchantOutputDetail () {
...@@ -53,7 +53,6 @@ export default { ...@@ -53,7 +53,6 @@ export default {
queryType, queryType,
...searchTime ...searchTime
}) })
console.log(res, '===========')
this.chart = echarts.init(document.getElementById(this.pageData.pageId)) this.chart = echarts.init(document.getElementById(this.pageData.pageId))
this.drawChart(res, queryType) this.drawChart(res, queryType)
...@@ -76,21 +75,7 @@ export default { ...@@ -76,21 +75,7 @@ export default {
}) })
let option = { let option = {
tooltip: { tooltip: {
trigger: 'axis', ...tooltipConfig,
position: function (point, params, dom, rect, size) { // 解决tooltip在最右侧时部分被遮挡
let obj = {};
if (point[0] > size.viewSize[0] / 2) { // 鼠标位置位于echarts容器的一半位置右侧时,提示框显示在左侧
obj['left'] = point[0] - size.contentSize[0] - 20;
} else {
obj['right'] = size.viewSize[0] - size.contentSize[0] * 2;
}
if (point[1] > size.viewSize[1] / 2) { // 鼠标位置位于echarts容器的一半位置下侧时,提示框显示在上侧
obj['top'] = point[1] - size.contentSize[1] - 20;
} else {
obj['bottom'] = size.viewSize[1] - size.contentSize[1] * 2;
}
return obj;
},
formatter: params => { formatter: params => {
let [item] = params let [item] = params
if (!item) return if (!item) return
...@@ -112,18 +97,28 @@ export default { ...@@ -112,18 +97,28 @@ export default {
}, },
grid: { grid: {
left: '80', left: '80',
right: '60' right: '60',
bottom: '80'
}, },
xAxis: { xAxis: {
type: 'time', type: 'time',
boundaryGap: false, boundaryGap: false,
splitLine: {
show: false
},
axisLabel: { axisLabel: {
showMaxLabel: true showMaxLabel: true,
formatter: function (value, index) {
return dayjs(value).format('MM/DD')
}
} }
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
boundaryGap: [0, '100%'] boundaryGap: [0, '100%'],
axisLine: {
show: false
}
}, },
dataZoom: [ dataZoom: [
{ {
...@@ -140,7 +135,10 @@ export default { ...@@ -140,7 +135,10 @@ export default {
{ {
type: 'line', type: 'line',
symbol: 'none', symbol: 'none',
data: data data: data,
lineStyle: {
color: '#185EFE'
}
} }
] ]
}; };
...@@ -176,7 +174,7 @@ export default { ...@@ -176,7 +174,7 @@ export default {
width: 6px; width: 6px;
height: 6px; height: 6px;
border: 1px solid #ffffff; border: 1px solid #ffffff;
background: #185efe; background: #2a58ad;
display: block; display: block;
border-radius: 100%; border-radius: 100%;
} }
......
export const tooltipConfig = {
trigger: 'axis',
borderColor: '#fff',
backgroundColor: '#fff',
padding:8,
textStyle: {
color: '#656565',
fontSize: 12
},
extraCssText: 'box-shadow: 0 2px 8px 0 #00000026;',
// position: function (point, params, dom, rect, size) { // 解决tooltip在最右侧时部分被遮挡
// let obj = {};
// if (point[0] > size.viewSize[0] / 2) { // 鼠标位置位于echarts容器的一半位置右侧时,提示框显示在左侧
// obj['left'] = point[0] - size.contentSize[0] - 20;
// } else {
// obj['right'] = size.viewSize[0] - size.contentSize[0] * 2;
// }
// if (point[1] > size.viewSize[1] / 2) { // 鼠标位置位于echarts容器的一半位置下侧时,提示框显示在上侧
// obj['top'] = point[1] - size.contentSize[1] - 20;
// } else {
// obj['bottom'] = size.viewSize[1] - size.contentSize[1] * 2;
// }
// return obj;
// }
}
\ No newline at end of file \ No newline at end of file
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
v-if="i.isNewemployee" v-if="i.isNewemployee"
>新人</div> >新人</div>
<div class="name-box"> <div class="name-box">
<div class="name text-hide">{{i.staffName}}</div> <div class="name text-hide">{{i.staffName || '-'}}</div>
<div class="join">{{i.entryTime}}入职</div> <div class="join">{{i.entryTime}}入职</div>
</div> </div>
<template v-for="(e,eind) in stageList"> <template v-for="(e,eind) in stageList">
...@@ -83,6 +83,7 @@ export default { ...@@ -83,6 +83,7 @@ export default {
}, },
methods: { methods: {
async getData () { async getData () {
this.staffList = []
let { businessType, merchantId } = this.pageData let { businessType, merchantId } = this.pageData
const res = await getPersonStaffWarning({ const res = await getPersonStaffWarning({
...this.searchTime, ...this.searchTime,
...@@ -90,7 +91,6 @@ export default { ...@@ -90,7 +91,6 @@ export default {
businessType businessType
}) })
if (res && res.length) { if (res && res.length) {
res.map(e => e.entryTime ? dayjs(e.entryTime).format('YYYY-MM') : '-')
this.staffList = this.chunkArray(res) this.staffList = this.chunkArray(res)
} }
}, },
...@@ -188,7 +188,7 @@ export default { ...@@ -188,7 +188,7 @@ export default {
font-size: 14px; font-size: 14px;
} }
.stage-value { .stage-value {
color: #185efe; color: #2A58AD;
font-size: 14px; font-size: 14px;
font-weight: 700; font-weight: 700;
margin-left: 4px; margin-left: 4px;
......
...@@ -155,7 +155,6 @@ export default { ...@@ -155,7 +155,6 @@ export default {
optionLabel: 'confValue', optionLabel: 'confValue',
optionsName: 'ruleTypeOpt', optionsName: 'ruleTypeOpt',
changeAttr: (value, targetItem) => { changeAttr: (value, targetItem) => {
console.log('value', value)
this.baseData.warningItemsOpt = [] this.baseData.warningItemsOpt = []
if (value) { if (value) {
var warningItems = this.baseData.ruleTypeOpt.find(item => item.confId == value).items var warningItems = this.baseData.ruleTypeOpt.find(item => item.confId == value).items
...@@ -377,7 +376,6 @@ export default { ...@@ -377,7 +376,6 @@ export default {
beforeSearchFn () { beforeSearchFn () {
return new Promise(resolve => { return new Promise(resolve => {
console.log('this.searchForm.warnCycle', this.searchForm.warnCycle)
if (this.searchForm.warnCycle) { if (this.searchForm.warnCycle) {
this.searchForm.warningStartDate = Util.dateFormate(this.searchForm.warnCycle[0], 'YYYY-MM-DD') this.searchForm.warningStartDate = Util.dateFormate(this.searchForm.warnCycle[0], 'YYYY-MM-DD')
this.searchForm.warningEndDate = Util.dateFormate(this.searchForm.warnCycle[1], 'YYYY-MM-DD') this.searchForm.warningEndDate = Util.dateFormate(this.searchForm.warnCycle[1], 'YYYY-MM-DD')
...@@ -481,7 +479,6 @@ export default { ...@@ -481,7 +479,6 @@ export default {
}, },
handleDetail (row) { handleDetail (row) {
console.log(row)
this.recordInfo = row this.recordInfo = row
this.detailVisible = true this.detailVisible = true
}, },
...@@ -504,7 +501,6 @@ export default { ...@@ -504,7 +501,6 @@ export default {
monitorType: 1 monitorType: 1
}) })
this.showFormData[0].optionList = res || [] this.showFormData[0].optionList = res || []
console.log(res, '预警驻店人员')
} }
} }
} }
......
...@@ -96,6 +96,7 @@ import { getPersonBaseInfo, getPersonOutputtrend, getPersonGoodsList, getPersonS ...@@ -96,6 +96,7 @@ import { getPersonBaseInfo, getPersonOutputtrend, getPersonGoodsList, getPersonS
const colorList = ['#43cf7c', '#185efe', '#FF8D1A', '#5850FF'] const colorList = ['#43cf7c', '#185efe', '#FF8D1A', '#5850FF']
import onShowMixin from '../onShowMixin' import onShowMixin from '../onShowMixin'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { tooltipConfig } from '../../chartConfig'
export default { export default {
mixins: [onShowMixin], mixins: [onShowMixin],
name: '', name: '',
...@@ -140,15 +141,14 @@ export default { ...@@ -140,15 +141,14 @@ export default {
}, },
methods: { methods: {
async getData () { async getData () {
this.form = this.$options.data.call(this).form
this.getPersonGoodsList() this.getPersonGoodsList()
this.getPersonStaffList() this.getPersonStaffList()
this.form = this.$options.data.call(this).form
this.getPageData() this.getPageData()
}, },
async getPageData () { async getPageData () {
try { try {
this.requestParams = await this.setRequestParams() this.requestParams = await this.setRequestParams()
this.getPersonBaseInfo()
this.getPersonOutputtrend() this.getPersonOutputtrend()
} catch (error) { } catch (error) {
if (error) this.$message.error(error) if (error) this.$message.error(error)
...@@ -193,16 +193,27 @@ export default { ...@@ -193,16 +193,27 @@ export default {
} }
}, },
async getPersonBaseInfo () { async getPersonBaseInfo (list) {
const res = await getPersonBaseInfo({ const res = await getPersonBaseInfo({
...this.searchTime, ...this.searchTime,
...this.requestParams ...this.requestParams
}) }),
staffCardList = []
list.map(i => {
let [staffTrendDTOItem] = i.staffTrendDTOList
res.map(e => { res.map(e => {
e.entryTime = e.entryTime ? dayjs(e.entryTime).format('YYYY-MM') : '-' console.log(staffTrendDTOItem, e)
e.selected = true if (staffTrendDTOItem.staffId === e.staffid) {
staffCardList.push({
selected: true,
...e
})
}
})
}) })
this.staffCardList = res console.log(staffCardList)
this.staffCardList = staffCardList
}, },
async getPersonOutputtrend () { async getPersonOutputtrend () {
const res = await getPersonOutputtrend({ const res = await getPersonOutputtrend({
...@@ -211,9 +222,11 @@ export default { ...@@ -211,9 +222,11 @@ export default {
}) })
this.emptyStatus = false this.emptyStatus = false
this.$nextTick(() => { this.$nextTick(() => {
this.getPersonBaseInfo(res)
if (!this.chart) this.chart = echarts.init(document.getElementById(this.pageId)) if (!this.chart) this.chart = echarts.init(document.getElementById(this.pageId))
this.drawChart(res) this.drawChart(res)
}) })
}, },
drawChart (list) { drawChart (list) {
this.chart.clear() this.chart.clear()
...@@ -223,7 +236,7 @@ export default { ...@@ -223,7 +236,7 @@ export default {
let [item] = e.staffTrendDTOList, let [item] = e.staffTrendDTOList,
name = item.staffId, name = item.staffId,
data = e.staffTrendDTOList.map(i => { data = e.staffTrendDTOList.map(i => {
return [i.statDate, i.output || 0] return [dayjs(i.statDate).format("YYYY-MM-DD"), i.output || 0]
}) })
legendNames.push(name) legendNames.push(name)
seriesData.push({ seriesData.push({
...@@ -244,30 +257,22 @@ export default { ...@@ -244,30 +257,22 @@ export default {
left: 20 left: 20
}, },
tooltip: { tooltip: {
trigger: 'axis', ...tooltipConfig,
position: function (point, params, dom, rect, size) { // 解决tooltip在最右侧时部分被遮挡
let obj = {};
if (point[0] > size.viewSize[0] / 2) { // 鼠标位置位于echarts容器的一半位置右侧时,提示框显示在左侧
obj['left'] = point[0] - size.contentSize[0] - 20;
} else {
obj['right'] = size.viewSize[0] - size.contentSize[0] * 2;
}
if (point[1] > size.viewSize[1] / 2) { // 鼠标位置位于echarts容器的一半位置下侧时,提示框显示在上侧
obj['top'] = point[1] - size.contentSize[1] - 20;
} else {
obj['bottom'] = size.viewSize[1] - size.contentSize[1] * 2;
}
return obj;
},
formatter: params => { formatter: params => {
if (!list.length) return if (!params.length) return
let [item] = params, let [item] = params,
{ dataIndex, axisValue } = item, { dataIndex, axisValue } = item,
str = `${dayjs(axisValue).format('YYYY-MM-DD')}` str = `${dayjs(axisValue).format('YYYY-MM-DD')}`
list.map((i, index) => { list.map(i => {
let { output, atv, ordernum, zhuanhuanlv } = i.staffTrendDTOList[dataIndex] params.map(k => {
if (i.staffTrendDTOList[dataIndex].staffId == k.seriesName) k.origin_data = i.staffTrendDTOList[dataIndex]
})
})
console.log(params)
params.map(i => {
let { output, atv, ordernum, zhuanhuanlv } = i.origin_data
str += `<div class="tooltips"> str += `<div class="tooltips">
<i class="circle" style="background-color:${params[index].color}"></i>产值:${output?.toLocaleString() || 0}<br> <i class="circle" style="background-color:${i.color}"></i>产值:${output?.toLocaleString() || 0}<br>
客单价:${atv?.toLocaleString() || 0}<br> 客单价:${atv?.toLocaleString() || 0}<br>
订单数:${ordernum || 0}单<br> 订单数:${ordernum || 0}单<br>
转化率:${zhuanhuanlv || 0}%</div>` 转化率:${zhuanhuanlv || 0}%</div>`
...@@ -296,12 +301,21 @@ export default { ...@@ -296,12 +301,21 @@ export default {
xAxis: { xAxis: {
type: 'time', type: 'time',
boundaryGap: false, boundaryGap: false,
axisLabel:{ splitLine: {
showMaxLabel:true show: false
},
axisLabel: {
showMaxLabel: true,
formatter: function (value, index) {
return dayjs(value).format('MM/DD')
}
} }
}, },
yAxis: { yAxis: {
type: 'value' type: 'value',
axisLine: {
show: false
}
}, },
series: seriesData series: seriesData
}; };
......
...@@ -25,10 +25,31 @@ ...@@ -25,10 +25,31 @@
v-if="i.isNewemployee" v-if="i.isNewemployee"
>新人</div> >新人</div>
<div class="name-box"> <div class="name-box">
<div class="name text-hide">{{i.staffName}}</div> <div class="name text-hide">{{i.staffName || '-'}}</div>
<div class="join">{{i.entryTime}}入职</div> <div class="join">{{i.entryTime}}入职</div>
</div> </div>
<template v-for="(e,eind) in infoList">
<div
class="info-box"
:key="eind"
>
<template v-for="k in e">
<div
class="info-item"
:key="`${eind}_${k.key}`"
>
<div class="info-label">{{k.label}}</div>
<div class="info-value">{{i[k.key] || 0}}</div>
<div :class="['info-percent',`${percentColor(i[k.percentSJ])}`]">
环比<span>{{i[k.percent] ? formatted(i[k.percent]) : '-'}}</span>
<template v-if="i[k.percent] && i[k.percent] != '-'">
<div :class="['icon',`${percentClass(i[k.percentSJ])}`]"></div>
</template>
</div>
</div>
</template>
</div>
</template>
</div> </div>
</template> </template>
</el-carousel-item> </el-carousel-item>
...@@ -61,12 +82,50 @@ export default { ...@@ -61,12 +82,50 @@ export default {
data () { data () {
return { return {
staffList: [], staffList: [],
infoList: [
[
{
label: '接待数',
key: 'receptionNum',
percent: 'receptionNumhb',
percentSJ: 'receptionNumhbsj'
},
{
label: '成交数',
key: 'succeedNum',
percent: 'succeedNumhb',
percentSJ: 'succeedNumhbsj'
},
{
label: '转化率',
key: 'zhuanhuanlv',
percent: 'zhuanhuanlvhb',
percentSJ: 'zhuanhuanlvhbsj'
}
],
[
{
label: '质检平均分',
key: 'avgzj',
percent: 'avgzjhb',
percentSJ: 'avgzjhbsj'
},
{
label: '攻防平均分',
key: 'avggf',
percent: 'avggfhb',
percentSJ: 'avggfhbsj'
},
]
]
} }
}, },
mounted () { mounted () {
}, },
methods: { methods: {
async getData () { async getData () {
this.staffList = []
let { businessType, merchantId } = this.pageData let { businessType, merchantId } = this.pageData
const res = await getPersonStaffReception({ const res = await getPersonStaffReception({
...this.searchTime, ...this.searchTime,
...@@ -74,7 +133,6 @@ export default { ...@@ -74,7 +133,6 @@ export default {
businessType businessType
}) })
if (res && res.length) { if (res && res.length) {
res.map(e => e.entryTime ? dayjs(e.entryTime).format('YYYY-MM') : '-')
this.staffList = this.chunkArray(res) this.staffList = this.chunkArray(res)
} }
}, },
...@@ -86,6 +144,29 @@ export default { ...@@ -86,6 +144,29 @@ export default {
} }
return result; return result;
}, },
formatted (num) {
return num != '-' ? num + '%' : '-'
},
percentClass (num) {
if (num > 0) {
return 'el-icon-caret-top'
} else if (num == 0) {
return 'minus'
} else if (num < 0) {
return 'el-icon-caret-bottom'
} else {
return ''
}
},
percentColor (num) {
if (num > 0) {
return 'red'
} else if (num < 0) {
return 'green'
} else {
return ''
}
}
} }
} }
</script> </script>
...@@ -148,6 +229,27 @@ export default { ...@@ -148,6 +229,27 @@ export default {
margin-left: 8px; margin-left: 8px;
} }
} }
.info-box {
display: flex;
align-items: center;
justify-content: space-between;
padding-top: 24px;
.info-label,
.info-percent {
color: #20202080;
font-size: 12px;
line-height: 15px;
display: flex;
align-items: center;
}
.info-value {
color: #202020;
font-size: 16px;
font-weight: 700;
line-height: 19px;
margin: 8px 0;
}
}
} }
} }
} }
...@@ -160,5 +262,23 @@ export default { ...@@ -160,5 +262,23 @@ export default {
font-weight: 500; font-weight: 500;
} }
} }
.green {
span,
.icon {
color: #43cf7c;
}
}
.red {
span,
.icon {
color: #eb4e4e;
}
}
.minus {
width: 7.5px;
height: 2.5px;
border-radius: 0.6px;
background: #20202080;
}
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -10,13 +10,13 @@ ...@@ -10,13 +10,13 @@
<el-select <el-select
class="select" class="select"
v-model="form.staffIds" v-model="form.staffIds"
@change="change" @change="getProductOutputtrend"
> >
<el-option <el-option
v-for="item in staffList" v-for="item in staffList"
:key="item.value" :key="item.staffid"
:label="item.name" :label="item.staffName"
:value="item.value" :value="item.staffid"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -31,14 +31,17 @@ ...@@ -31,14 +31,17 @@
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import * as echarts from 'echarts' import * as echarts from 'echarts'
import { getProductOutputtrend } from '@api/earlyWarningManager' import { getProductOutputtrend, getProductStaffList } from '@api/earlyWarningManager'
import onShowMixin from '../onShowMixin' import onShowMixin from '../onShowMixin'
import { tooltipConfig } from '../../chartConfig'
export default { export default {
mixins: [onShowMixin], mixins: [onShowMixin],
name: '', name: '',
data () { data () {
return { return {
form: {}, form: {
staffIds: ''
},
staffList: [] staffList: []
} }
}, },
...@@ -47,30 +50,62 @@ export default { ...@@ -47,30 +50,62 @@ export default {
}, },
methods: { methods: {
async getData () { async getData () {
this.form = this.$options.data.call(this).form
this.getProductOutputtrend()
this.getProductStaffList()
},
async getProductStaffList () {
let { businessType, merchantId } = this.pageData let { businessType, merchantId } = this.pageData
const res = await getProductOutputtrend({ const res = await getProductStaffList({
merchantId, merchantId,
businessType, businessType,
...this.searchTime ...this.searchTime
}) })
console.log(res) this.staffList = res || []
this.drawChart()
}, },
change () { async getProductOutputtrend () {
this.getData() let { businessType, merchantId } = this.pageData
const res = await getProductOutputtrend({
merchantId,
businessType,
...this.form,
...this.searchTime
})
this.$nextTick(() => {
if (!this.chart) this.chart = echarts.init(document.getElementById(this.pageId))
this.drawChart(res)
})
}, },
drawChart () { drawChart (list) {
const dataCount = 20; this.chart.clear()
const data = generateData(dataCount); let categoryData = [],
valueData = []
list.map(e => {
categoryData.push(e.goodsname)
valueData.push(e.output || 0)
})
let data = {
categoryData,
valueData
}
let option = { let option = {
title: { title: {
text: '销售额趋势', text: '销售额趋势',
left: 20 left: 20
}, },
tooltip: { tooltip: {
trigger: 'axis', ...tooltipConfig,
axisPointer: { formatter: params => {
type: 'shadow' let [item] = params
if (!item) return
let { dataIndex, axisValue } = item,
{ output, atv, ordernum } = list[dataIndex]
return `
${axisValue}<br>
<div class="tooltips">
<i class="circle"></i>产值:${output?.toLocaleString() || 0}<br>
客单价:${atv?.toLocaleString() || 0}<br>
订单数:${ordernum || 0}单`;
} }
}, },
grid: { grid: {
...@@ -102,6 +137,9 @@ export default { ...@@ -102,6 +137,9 @@ export default {
yAxis: { yAxis: {
splitArea: { splitArea: {
show: false show: false
},
axisLine: {
show: false
} }
}, },
series: [ series: [
...@@ -112,32 +150,6 @@ export default { ...@@ -112,32 +150,6 @@ export default {
} }
] ]
}; };
function generateData (count) {
let baseValue = Math.random() * 1000;
let time = +new Date(2011, 0, 1);
let smallBaseValue;
function next (idx) {
smallBaseValue =
idx % 30 === 0
? Math.random() * 700
: smallBaseValue + Math.random() * 500 - 250;
baseValue += Math.random() * 20 - 10;
return Math.max(0, Math.round(baseValue + smallBaseValue) + 3000);
}
const categoryData = [];
const valueData = [];
for (let i = 0; i < count; i++) {
categoryData.push(
echarts.format.formatTime('yyyy-MM-dd\nhh:mm:ss', time, false)
);
valueData.push(next(i).toFixed(2));
time += 1000;
}
return {
categoryData: categoryData,
valueData: valueData
};
}
option && this.chart.setOption(option) option && this.chart.setOption(option)
} }
...@@ -155,6 +167,21 @@ export default { ...@@ -155,6 +167,21 @@ export default {
.line-chart { .line-chart {
width: 100%; width: 100%;
height: 348px; height: 348px;
::v-deep.tooltips {
padding-left: 20px;
position: relative;
}
::v-deep.circle {
position: absolute;
top: 7px;
left: 6px;
width: 6px;
height: 6px;
border: 1px solid #ffffff;
background: #2a58ad;
display: block;
border-radius: 100%;
}
} }
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import * as echarts from 'echarts' import * as echarts from 'echarts'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import {tooltipConfig} from '../../chartConfig'
export default { export default {
name: '', name: '',
props: { props: {
...@@ -52,21 +53,7 @@ export default { ...@@ -52,21 +53,7 @@ export default {
}) })
let option = { let option = {
tooltip: { tooltip: {
trigger: 'axis', ...tooltipConfig,
position: function (point, params, dom, rect, size) { // 解决tooltip在最右侧时部分被遮挡
let obj = {};
if (point[0] > size.viewSize[0] / 2) { // 鼠标位置位于echarts容器的一半位置右侧时,提示框显示在左侧
obj['left'] = point[0] - size.contentSize[0] - 20;
} else {
obj['right'] = size.viewSize[0] - size.contentSize[0] * 2;
}
if (point[1] > size.viewSize[1] / 2) { // 鼠标位置位于echarts容器的一半位置下侧时,提示框显示在上侧
obj['top'] = point[1] - size.contentSize[1] - 20;
} else {
obj['bottom'] = size.viewSize[1] - size.contentSize[1] * 2;
}
return obj;
},
formatter: params => { formatter: params => {
let [item] = params let [item] = params
if (!item) return if (!item) return
...@@ -82,18 +69,28 @@ export default { ...@@ -82,18 +69,28 @@ export default {
}, },
grid: { grid: {
left: '70', left: '70',
right: '50' right: '50',
bottom: '80'
}, },
xAxis: { xAxis: {
type: 'time', type: 'time',
boundaryGap: false, boundaryGap: false,
splitLine: {
show: false
},
axisLabel: { axisLabel: {
showMaxLabel: true showMaxLabel: true,
formatter: function (value) {
return dayjs(value).format('MM/DD')
}
} }
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
boundaryGap: [0, '100%'] boundaryGap: [0, '100%'],
axisLine: {
show: false
}
}, },
series: [ series: [
{ {
...@@ -112,7 +109,10 @@ export default { ...@@ -112,7 +109,10 @@ export default {
} }
]) ])
}, },
data: data data: data,
lineStyle: {
color: '#185EFE'
}
} }
] ]
}; };
......
...@@ -98,7 +98,6 @@ export default { ...@@ -98,7 +98,6 @@ export default {
Object.keys(res).map(key => { Object.keys(res).map(key => {
if (res[key] == null) res[key] = '-' if (res[key] == null) res[key] = '-'
}) })
console.log(res)
this.boardData = res this.boardData = res
} }
} }
......
...@@ -56,7 +56,7 @@ export default { ...@@ -56,7 +56,7 @@ export default {
} }
.item-active { .item-active {
background-color: #fff; background-color: #fff;
color: #185efe; color: #2A58AD;
border-radius: 3px; border-radius: 3px;
} }
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</div> </div>
<div class="text flex"> <div class="text flex">
<div class="merchant-id">{{baseInfo.merchantId}}</div> <div class="merchant-id">{{baseInfo.merchantId}}</div>
<div class="year">{{baseInfo.startBusiness}}展业</div> <div class="year">{{baseInfo.startBusiness}}</div>
<div class="supervision-name flex"> <div class="supervision-name flex">
<div class="supervision-icon"></div> <div class="supervision-icon"></div>
{{baseInfo.supervisionName}} {{baseInfo.supervisionName}}
...@@ -163,7 +163,7 @@ export default { ...@@ -163,7 +163,7 @@ export default {
endDate = dayjs().startOf('month').format("YYYY-MM-DD"), endDate = dayjs().startOf('month').format("YYYY-MM-DD"),
supervisionName = [] supervisionName = []
getMerchantBaseInfo({ merchantId, businessType, startDate, endDate }).then(res => { getMerchantBaseInfo({ merchantId, businessType, startDate, endDate }).then(res => {
res.startBusiness = dayjs(res.startBusiness).format("YYYY-MM") res.startBusiness = res.startBusiness ? `${dayjs(res.startBusiness).format("YYYY-MM")}展业` : '-'
res.supervisionList.map(item => { res.supervisionList.map(item => {
supervisionName.push(item.supervisionName) supervisionName.push(item.supervisionName)
}) })
...@@ -257,7 +257,7 @@ export default { ...@@ -257,7 +257,7 @@ export default {
} }
.active { .active {
background: #fff; background: #fff;
color: #185efe; color: #2A58AD;
} }
} }
} }
...@@ -271,7 +271,7 @@ export default { ...@@ -271,7 +271,7 @@ export default {
background-size: 100% 100%; background-size: 100% 100%;
} }
.info { .info {
width: 36%; width: 45%;
.merchant-name { .merchant-name {
color: #1d2129; color: #1d2129;
font-size: 16px; font-size: 16px;
...@@ -305,7 +305,7 @@ export default { ...@@ -305,7 +305,7 @@ export default {
opacity: 1; opacity: 1;
background: #e8f3ff; background: #e8f3ff;
padding: 0 8px; padding: 0 8px;
color: #185efe; color: #2A58AD;
font-size: 12px; font-size: 12px;
margin-right: 16px; margin-right: 16px;
flex-shrink: 0; flex-shrink: 0;
......
...@@ -125,7 +125,7 @@ export default { ...@@ -125,7 +125,7 @@ export default {
// data.merchantId = 44211895 // data.merchantId = 44211895
// data.merchantId = 44210895 // data.merchantId = 44210895
// data.merchantId = 44209510 // data.merchantId = 44209510
// data.businessType = 2 // data.businessType = 4
let id = data.pageId, let id = data.pageId,
windowList = [...this.tab, ...this.dropdownList], windowList = [...this.tab, ...this.dropdownList],
......
...@@ -2,9 +2,7 @@ ...@@ -2,9 +2,7 @@
<template> <template>
<baseDialog :dialog-config="dialogConfig" <baseDialog :dialog-config="dialogConfig"
:is-show.sync="dialogShow" :is-show.sync="dialogShow"
:config="{ :config="config"
appendToBody: true
}"
class="accountDailog" class="accountDailog"
@handleClick="handleAddConfirm"> @handleClick="handleAddConfirm">
<div class="add-dialog"> <div class="add-dialog">
...@@ -60,6 +58,12 @@ export default { ...@@ -60,6 +58,12 @@ export default {
name: 'HandleDialog', name: 'HandleDialog',
data() { data() {
return { return {
config: {
appendToBody: true,
isShowFooter: true,
confirm_name: '确定',
cancel_name: '取消'
},
pickerOption: { pickerOption: {
afterPickerOptions_timeChoose: afterPickerOptions_timeChoose afterPickerOptions_timeChoose: afterPickerOptions_timeChoose
}, },
......
<!-- 预警处理 --> <!-- 预警处理 -->
<template> <template>
<baseDialog :dialog-config="dialogConfig" <baseDialog
:dialog-config="dialogConfig"
:is-show.sync="dialogShow" :is-show.sync="dialogShow"
:config="{ :config="config"
appendToBody: true
}"
class="accountDailog" class="accountDailog"
@handleClick="handleAddConfirm"> @handleClick="handleAddConfirm"
>
<div class="add-dialog"> <div class="add-dialog">
<glsx-combi-form class="edit-form-container" <glsx-combi-form
class="edit-form-container"
ref="editFormRef" ref="editFormRef"
label-width="150px" label-width="150px"
default-width="400px" default-width="400px"
:form-ref="handleFormRef" :form-ref="handleFormRef"
:form-obj="infoForm" :form-obj="infoForm"
:form-data="editFormData" :form-data="editFormData"
:form-rules="formRules"> :form-rules="formRules"
<div slot="followStatusHtml" >
<div
slot="followStatusHtml"
slot-scope="scope" slot-scope="scope"
style="width:400px"> style="width:400px"
<el-radio-group v-model="infoForm.followStatus" >
@change="followStatusChange"> <el-radio-group
<el-radio v-for="item in baseData.followStatusOptions" v-model="infoForm.followStatus"
:label="item.confId">{{ item.confValue }}</el-radio> @change="followStatusChange"
>
<el-radio
v-for="item in baseData.followStatusOptions"
:label="item.confId"
>{{ item.confValue }}</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<div slot="nextFollowerTimeHtml" <div
slot="nextFollowerTimeHtml"
slot-scope="scope" slot-scope="scope"
style="width:400px"> style="width:400px"
<el-date-picker v-model="infoForm.nextFollowerTime" >
<el-date-picker
v-model="infoForm.nextFollowerTime"
type="datetime" type="datetime"
format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm"
value-format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm"
popper-class="no-atTheMoment" popper-class="no-atTheMoment"
placeholder="选择日期时间" placeholder="选择日期时间"
:picker-options="pickerOption['afterPickerOptions_timeChoose']"> :picker-options="pickerOption['afterPickerOptions_timeChoose']"
>
</el-date-picker> </el-date-picker>
</div> </div>
</glsx-combi-form> </glsx-combi-form>
<div class="div-title">跟进记录</div> <div class="div-title">跟进记录</div>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table ref="recordTable" <d2-table
ref="recordTable"
:has-page="false" :has-page="false"
:table-data="tableData" :table-data="tableData"
:search-form="searchFormSearch" :search-form="searchFormSearch"
:table-params="tableParams"> :table-params="tableParams"
>
</d2-table> </d2-table>
</div> </div>
</div> </div>
...@@ -58,8 +72,14 @@ import { findMerchantStaffList } from '@api/index' ...@@ -58,8 +72,14 @@ import { findMerchantStaffList } from '@api/index'
import { afterPickerOptions_timeChoose } from '@/common/format' import { afterPickerOptions_timeChoose } from '@/common/format'
export default { export default {
name: 'HandleDialog', name: 'HandleDialog',
data() { data () {
return { return {
config: {
appendToBody: true,
isShowFooter: true,
confirm_name: '确定',
cancel_name: '取消'
},
pickerOption: { pickerOption: {
afterPickerOptions_timeChoose: afterPickerOptions_timeChoose afterPickerOptions_timeChoose: afterPickerOptions_timeChoose
}, },
...@@ -188,16 +208,16 @@ export default { ...@@ -188,16 +208,16 @@ export default {
}, },
computed: { computed: {
dialogShow: { dialogShow: {
get() { get () {
return this.visible return this.visible
}, },
set(newVal) { set (newVal) {
this.$emit('dialogClose', { flag: newVal, attrName: 'visible' }) this.$emit('dialogClose', { flag: newVal, attrName: 'visible' })
} }
} }
}, },
mounted() { mounted () {
this.findMerchantStaffList() this.findMerchantStaffList()
if (this.paramsObj.status) { if (this.paramsObj.status) {
this.infoForm.followStatus = this.paramsObj.status this.infoForm.followStatus = this.paramsObj.status
...@@ -208,7 +228,7 @@ export default { ...@@ -208,7 +228,7 @@ export default {
}, },
methods: { methods: {
getOptionsList(formName, hasAll = true, refreshSigle) { getOptionsList (formName, hasAll = true, refreshSigle) {
if (refreshSigle) { if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle) var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle) var index = this[formName].findIndex(k => k.name == refreshSigle)
...@@ -234,7 +254,7 @@ export default { ...@@ -234,7 +254,7 @@ export default {
} }
}, },
showOrHideAttr(formName, label, isHide) { showOrHideAttr (formName, label, isHide) {
const idx = this[formName].findIndex(item => item.label == label) const idx = this[formName].findIndex(item => item.label == label)
console.log('idx', idx) console.log('idx', idx)
console.log('this[formName][idx].isHide', this[formName][idx].isHide) console.log('this[formName][idx].isHide', this[formName][idx].isHide)
...@@ -242,7 +262,7 @@ export default { ...@@ -242,7 +262,7 @@ export default {
}, },
// 获取全部员工 过滤出服务商负责人可选数据 // 获取全部员工 过滤出服务商负责人可选数据
findMerchantStaffList() { findMerchantStaffList () {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
findMerchantStaffList({ merchantId: -1 }).then(res => { findMerchantStaffList({ merchantId: -1 }).then(res => {
// 服务商负责人(根据角色名过滤) // 服务商负责人(根据角色名过滤)
...@@ -261,7 +281,7 @@ export default { ...@@ -261,7 +281,7 @@ export default {
}) })
}, },
followStatusChange(val) { followStatusChange (val) {
console.log('val', val) console.log('val', val)
if (val == 1) { if (val == 1) {
this.showOrHideAttr('editFormData', '下次跟进人', false) this.showOrHideAttr('editFormData', '下次跟进人', false)
...@@ -275,7 +295,7 @@ export default { ...@@ -275,7 +295,7 @@ export default {
} }
}, },
handleAddConfirm() { handleAddConfirm () {
this.$refs.editFormRef.$refs[this.handleFormRef].validate(valid => { this.$refs.editFormRef.$refs[this.handleFormRef].validate(valid => {
if (valid) { if (valid) {
var params = deepClone(this.infoForm) var params = deepClone(this.infoForm)
...@@ -294,11 +314,11 @@ export default { ...@@ -294,11 +314,11 @@ export default {
}, },
// 找到在formList的位置,通过name来匹配 // 找到在formList的位置,通过name来匹配
findFormIdx(name) { findFormIdx (name) {
return this.editFormData.findIndex(item => item.name === name) return this.editFormData.findIndex(item => item.name === name)
}, },
getList() { getList () {
var params = { msgId: this.paramsObj.id } var params = { msgId: this.paramsObj.id }
findByMsgId(params).then(res => { findByMsgId(params).then(res => {
this.tableData = res this.tableData = res
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
<div v-if="detailInfo && detailInfo.goodsTypeGroupRules"> <div v-if="detailInfo && detailInfo.goodsTypeGroupRules">
<div class="type"> <div class="type">
<template v-for="(item, index) in detailInfo.goodsTypeGroupRules"> <template v-for="(item, index) in detailInfo.goodsTypeGroupRules">
<div class="btn" :key="index + 'type'" v-if="item.groupType == 1" :class="{ act: activeType == index, isRed: effectDateType != 2 && (filterIsRed(item, 1) || filterIsRed(item)) }" <div class="btn" :key="index + 'type'" v-if="item.groupType == 1" :class="{ act: activeType == index, isRed: (filterIsRed(item, 1) || filterIsRed(item)) }"
@click="handleType(index)">全部分类</div> @click="handleType(index)">全部分类</div>
<div class="btn" :key="index + 'type'" v-if="item.groupType == 2" :class="{ act: activeType == index, isRed: effectDateType != 2 && (filterIsRed(item, 1) || filterIsRed(item)) }" <div class="btn" :key="index + 'type'" v-if="item.groupType == 2" :class="{ act: activeType == index, isRed: (filterIsRed(item, 1) || filterIsRed(item)) }"
@click="handleType(index)">特殊品类{{ index }}</div> @click="handleType(index)">特殊品类{{ index }}</div>
</template> </template>
</div> </div>
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
<div> <div>
<div class="type"> <div class="type">
<template v-for="(item, index) in items"> <template v-for="(item, index) in items">
<div class="btn" :key="index + 'type'" v-if="item.groupType == 1" :class="{ act: activeType == index, isRed: effectDateType != 2 && (filterIsRed(item, 1) || filterIsRed(item)) }" <div class="btn" :key="index + 'type'" v-if="item.groupType == 1" :class="{ act: activeType == index, isRed: (filterIsRed(item, 1) || filterIsRed(item)) }"
@click="handleType(index)">全部分类</div> @click="handleType(index)">全部分类</div>
<div class="btn" :key="index + 'type'" v-if="item.groupType == 2" :class="{ act: activeType == index, isRed: effectDateType != 2 && (filterIsRed(item, 1) || filterIsRed(item)) }" <div class="btn" :key="index + 'type'" v-if="item.groupType == 2" :class="{ act: activeType == index, isRed: (filterIsRed(item, 1) || filterIsRed(item)) }"
@click="handleType(index)">特殊品类{{ index }}</div> @click="handleType(index)">特殊品类{{ index }}</div>
</template> </template>
</div> </div>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!