Commit ad01a0b8 by 李伟康

commit 盯防

1 parent f69449e0
<template>
<div class="behavior-layout">
<el-carousel
:autoplay="false"
indicator-position="none"
:loop="false"
class="staff-list"
:height="'209px'"
arrow="always"
>
<template v-for="(i,index) in staffList">
<el-carousel-item
:key="index"
class="staff-flex"
>
<template v-for="(i,ind) in i">
<div
:key="ind"
class="staff-item"
>
<div class="new">新人</div>
<div class="name-box">
<div class="name">恒河猴</div>
<div class="join">2024.11入职</div>
</div>
</div>
</template>
</el-carousel-item>
</template>
</el-carousel>
<div class="table">
<div class="table-title">行为预警明细</div>
<behavior-table />
</div>
</div>
</template>
<script type='text/ecmascript-6'>
import BehaviorTable from './BehaviorTable.vue'
export default {
components: {
BehaviorTable
},
name: '',
data () {
return {
staffList: [
new Array(4).fill(1),
new Array(3).fill(1)
],
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.behavior-layout {
.staff-list {
padding: 0 20px;
::v-deep.el-carousel__arrow {
width: 30px;
height: 30px;
background: #fff;
color: #333;
opacity: 1;
box-shadow: 0 2px 6px 0 #10101014;
}
::v-deep.el-carousel__arrow--left {
left: 0;
// &::after {
// position: absolute;
// left: 0;
// top: 50%;
// transform: translateY(-50%);
// content: '';
// width: 17px;
// height: 209px;
// border-radius: 8px;
// opacity: 1;
// background: linear-gradient(to left, #20202000 0%, #20202026 100%);
// }
}
::v-deep.el-carousel__arrow--right {
right: 0;
}
.staff-flex {
display: flex;
gap: 0 16px;
.staff-item {
width: 25%;
height: 100%;
background: #fafafa;
border-radius: 4px;
position: relative;
padding: 20px;
box-sizing: border-box;
.new {
position: absolute;
width: 40px;
height: 20px;
background: #e8ffea;
top: 20px;
right: 20px;
font-size: 12px;
color: #00b42a;
line-height: 20px;
text-align: center;
}
.name-box {
display: flex;
align-items: flex-end;
.name {
max-width: 120px;
color: inherit;
font-size: 20px;
font-weight: 700;
line-height: 29px;
}
.join {
color: #20202080;
font-size: 12px;
line-height: 15px;
margin-left: 8px;
}
}
}
}
}
.table {
box-sizing: border-box;
padding: 32px 20px 0;
&-title {
color: #000000d9;
font-size: 14px;
font-weight: 500;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -49,40 +49,300 @@ ...@@ -49,40 +49,300 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="staff-box"> <div class="staff-box">
<div <template v-for="(item,index) in staffCardList">
class="staff-card" <div
v-for="item in staffCardList" :class="['staff-card',`card-${index}`]"
:key="item.value" :key="item.value"
> @click="legendToggleSelect(index)"
</div> >
<div class="new">新人</div>
<div class="name-box">
<div class="name">恒河猴</div>
<div class="join">2024.11入职</div>
</div>
<div class="info">
<template v-for="i in infoList">
<div
:key="i.key"
class="info-item"
>
<div class="info-label">{{i.label}}</div>
<div class="info-value">{{i.key}}</div>
<div class="info-percent flex">
环比
</div>
</div>
</template>
</div>
</div>
</template>
</div>
<div
:id="pageId"
class="line-chart"
>
</div> </div>
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import * as echarts from 'echarts'
const colorList = ['#43cf7c', '#185efe', '#FF8D1A', '#5850FF']
export default { export default {
name: '', name: '',
props: {
pageId: {
type: String,
default: ''
},
show: Boolean
},
data () { data () {
return { return {
packageList: [], packageList: [],
goodsList: [], goodsList: [],
staffList: [], staffList: [],
form:{ form: {
package: '', package: '',
goods: '', goods: '',
staffId: [] staffId: []
}, },
staffCardList:new Array(5) infoList: [
{
label: '产值(元)',
key: '1',
percent: '5'
},
{
label: '转化率',
key: '2',
percent: '5'
},
{
label: '客单价(元)',
key: '3',
percent: '5'
},
{
label: '订单数',
key: '4',
percent: '5'
}
],
staffCardList: new Array(4).fill(1),
chart: null,
option: null
}
},
watch: {
show (val) {
if (val) {
this.chart = echarts.init(document.getElementById(this.pageId))
this.drawChart()
}
} }
}, },
mounted () { mounted () {
}, },
methods: { methods: {
drawChart () {
let option = {
title: {
text: '产值趋势',
left: 20
},
tooltip: {
trigger: 'axis'
},
legend: {
data: ['Email', 'Union Ads', 'Video Ads', 'Direct'],
show: false
},
grid: {
left: 52,
right: 36,
bottom: 80
// containLabel: true
},
dataZoom: [
{
type: 'inside'
},
{
type: 'slider'
}
],
xAxis: {
type: 'category',
boundaryGap: false,
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [
{
name: 'Email',
type: 'line',
stack: 'Total',
data: [120, 132, 101, 134, 90, 230, 210],
lineStyle: {
color: colorList[0]
},
itemStyle: {
color: colorList[0],
}
},
{
name: 'Union Ads',
type: 'line',
stack: 'Total',
data: [220, 182, 191, 234, 290, 330, 310],
lineStyle: {
color: colorList[1]
},
itemStyle: {
color: colorList[1],
}
},
{
name: 'Video Ads',
type: 'line',
stack: 'Total',
data: [150, 232, 201, 154, 190, 330, 410],
lineStyle: {
color: colorList[2]
},
itemStyle: {
color: colorList[2],
}
},
{
name: 'Direct',
type: 'line',
stack: 'Total',
data: [320, 332, 301, 334, 390, 330, 320],
lineStyle: {
color: colorList[3]
},
itemStyle: {
color: colorList[3],
borderColor: colorList[3]
}
},
]
};
this.chart.on('legendselectchanged', function (params) {
let { name, selected } = params
})
option && this.chart.setOption(option)
this.option = option
},
legendToggleSelect (index) {
this.chart.dispatchAction({
type: 'legendToggleSelect',
name: this.option.legend.data[index]
})
}
} }
} }
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
.output-container { .output-container {
padding-bottom: 60px;
.flex {
display: flex;
align-items: center;
}
.staff-box {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 0 15px;
padding: 0 20px 20px;
.staff-card {
position: relative;
height: 247px;
background: #fafafa;
box-sizing: border-box;
border-radius: 4px;
border: 1px solid #fafafa;
padding: 20px;
color: #202020;
cursor: pointer;
.new {
position: absolute;
width: 40px;
height: 20px;
background: #e8ffea;
top: 20px;
right: 20px;
font-size: 12px;
color: #00b42a;
line-height: 20px;
text-align: center;
}
.name-box {
display: flex;
align-items: flex-end;
.name {
max-width: 120px;
color: inherit;
font-size: 20px;
font-weight: 700;
line-height: 29px;
}
.join {
color: #20202080;
font-size: 12px;
line-height: 15px;
margin-left: 8px;
}
}
.info {
display: flex;
flex-wrap: wrap;
&-item {
width: 50%;
padding-top: 24px;
color: #202020;
}
&-label,
&-percent {
opacity: 0.5;
font-size: 12px;
line-height: 15px;
}
&-value {
font-size: 16px;
font-weight: 700;
line-height: 19px;
margin: 8px 0;
}
&-percent {
}
}
}
.card-0 {
border-color: #43cf7c;
color: #43cf7c;
}
.card-1 {
border-color: #185efe;
color: #185efe;
}
.card-2 {
border-color: #ff8d1a;
color: #ff8d1a;
}
.card-3 {
border-color: #5850ff;
color: #5850ff;
}
}
.line-chart {
width: 100%;
height: 387px;
}
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="behavior-layout">
<el-carousel
:autoplay="false"
indicator-position="none"
:loop="false"
class="staff-list"
:height="'253px'"
arrow="always"
>
<template v-for="(i,index) in staffList">
<el-carousel-item
:key="index"
class="staff-flex"
>
<template v-for="(i,ind) in i">
<div
:key="ind"
class="staff-item"
>
<div class="new">新人</div>
<div class="name-box">
<div class="name">恒河猴</div>
<div class="join">2024.11入职</div>
</div>
</div>
</template>
</el-carousel-item>
</template>
</el-carousel>
<div class="table">
<div class="table-title">接待明细</div>
<reception-table />
</div>
</div>
</template>
<script type='text/ecmascript-6'>
import ReceptionTable from './ReceptionTable.vue'
export default {
components: {
ReceptionTable
},
name: '',
data () {
return {
staffList: [
new Array(4).fill(1),
new Array(3).fill(1)
],
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.behavior-layout {
.staff-list {
padding: 0 20px;
::v-deep.el-carousel__arrow {
width: 30px;
height: 30px;
background: #fff;
color: #333;
opacity: 1;
box-shadow: 0 2px 6px 0 #10101014;
}
::v-deep.el-carousel__arrow--left {
left: 0;
}
::v-deep.el-carousel__arrow--right {
right: 0;
}
.staff-flex {
display: flex;
gap: 0 16px;
.staff-item {
width: 25%;
height: 100%;
background: #fafafa;
border-radius: 4px;
position: relative;
padding: 20px;
box-sizing: border-box;
.new {
position: absolute;
width: 40px;
height: 20px;
background: #e8ffea;
top: 20px;
right: 20px;
font-size: 12px;
color: #00b42a;
line-height: 20px;
text-align: center;
}
.name-box {
display: flex;
align-items: flex-end;
.name {
max-width: 120px;
color: inherit;
font-size: 20px;
font-weight: 700;
line-height: 29px;
}
.join {
color: #20202080;
font-size: 12px;
line-height: 15px;
margin-left: 8px;
}
}
}
}
}
.table {
box-sizing: border-box;
padding: 32px 20px 0;
&-title {
color: #000000d9;
font-size: 14px;
font-weight: 500;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -20,10 +20,15 @@ ...@@ -20,10 +20,15 @@
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import Tab from '../Tab' import Tab from '../Tab'
import Output from './Output.vue' import Output from './Output.vue'
import Behavior from './Behavior.vue'
import Reception from './Reception.vue'
export default { export default {
components: { components: {
Tab, Tab,
Output Output,
Behavior,
Reception
}, },
props: { props: {
pageId: { pageId: {
...@@ -49,19 +54,19 @@ export default { ...@@ -49,19 +54,19 @@ export default {
}, },
{ {
label: '行为分析', label: '行为分析',
componentName: 'OutputLine', componentName: 'Behavior',
id: '2', id: '2',
}, },
{ {
label: '接待分析', label: '接待分析',
componentName: 'OutputLine', componentName: 'Reception',
id: '3', id: '3',
}, },
{ // {
label: '人员变动', // label: '人员变动',
componentName: 'OutputLine', // componentName: 'OutputLine',
id: '4', // id: '4',
}, // },
] ]
} }
}, },
......
...@@ -52,10 +52,12 @@ export default { ...@@ -52,10 +52,12 @@ export default {
color: #666666; color: #666666;
cursor: pointer; cursor: pointer;
user-select: none; user-select: none;
transition: all .15s;
} }
.item-active { .item-active {
background-color: #fff; background-color: #fff;
color: #185efe; color: #185efe;
border-radius: 3px;
} }
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -21,7 +21,10 @@ ...@@ -21,7 +21,10 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<search-box @search="setTimeData" /> <search-box
class="search-box"
@search="setTimeData"
/>
</div> </div>
<div class="board-content"> <div class="board-content">
<div class="left-board flex-box"> <div class="left-board flex-box">
...@@ -123,7 +126,7 @@ export default { ...@@ -123,7 +126,7 @@ export default {
percent: 'touchNumRatio', percent: 'touchNumRatio',
}, },
], ],
timeObject:{} timeObject: {}
} }
}, },
mounted () { mounted () {
...@@ -170,10 +173,19 @@ export default { ...@@ -170,10 +173,19 @@ export default {
.board-search-box { .board-search-box {
display: flex; display: flex;
align-items: center; align-items: center;
::v-deep.el-form-item__content {
height: 32px;
}
.el-form-item--small.el-form-item { .el-form-item--small.el-form-item {
margin: 0 !important; margin: 0 !important;
::v-deep.el-input {
height: 32px !important;
}
} }
} }
.search-box {
flex: 1;
}
.board-content { .board-content {
padding: 0 20px 20px; padding: 0 20px 20px;
display: flex; display: flex;
......
...@@ -134,7 +134,7 @@ export default { ...@@ -134,7 +134,7 @@ export default {
watch: { watch: {
businessType (n) { businessType (n) {
this.handleSearch() this.handleSearch()
} },
}, },
created () { created () {
}, },
......
<template> <template>
<div> <div>
<baseDialog :is-show.sync="dialogShow" <baseDialog
:config="dialogConfig.setting" :is-show.sync="dialogShow"
:dialog-config="dialogConfig.config" :config="dialogConfig.setting"
@closeDialog="handleDetailClose" :dialog-config="dialogConfig.config"
class="detail-content-warn"> @closeDialog="handleDetailClose"
class="detail-content-warn"
>
<div v-loading="loading"> <div v-loading="loading">
<div class="form_div"> <div class="form_div">
<div class="div-title">员工信息</div> <div class="div-title">员工信息</div>
<el-form class="edit-sub-block" <el-form
label-width="150px" class="edit-sub-block"
:inline="true"> label-width="150px"
:inline="true"
>
<div class="itemDiv"> <div class="itemDiv">
<el-form-item label="员工姓名:" <el-form-item
class="halfItem"> label="员工姓名:"
class="halfItem"
>
{{ paramsObj.staffName ? paramsObj.staffName : "-" }} {{ paramsObj.staffName ? paramsObj.staffName : "-" }}
</el-form-item> </el-form-item>
<el-form-item label="手机号:" <el-form-item
class="halfItem"> label="手机号:"
class="halfItem"
>
{{ paramsObj.staffPhone {{ paramsObj.staffPhone
? paramsObj.staffPhone ? paramsObj.staffPhone
: "-" }} : "-" }}
</el-form-item> </el-form-item>
</div> </div>
<div class="itemDiv"> <div class="itemDiv">
<el-form-item label="所属门店:" <el-form-item
class="halfItem"> label="所属门店:"
class="halfItem"
>
{{ paramsObj.merchantName4s ? paramsObj.merchantName4s : "-" }} {{ paramsObj.merchantName4s ? paramsObj.merchantName4s : "-" }}
</el-form-item> </el-form-item>
<el-form-item label="所属业务:" <el-form-item
class="halfItem"> label="所属业务:"
class="halfItem"
>
{{ {{
paramsObj.bussinessTypeName ? paramsObj.bussinessTypeName : "-" paramsObj.bussinessTypeName ? paramsObj.bussinessTypeName : "-"
}} }}
</el-form-item> </el-form-item>
</div> </div>
<div class="itemDiv"> <div class="itemDiv">
<el-form-item label="所属督导:" <el-form-item
class="halfItem" label="所属督导:"
:title="paramsObj.supervisor"> class="halfItem"
:title="paramsObj.supervisor"
>
{{ paramsObj.supervisor ? (paramsObj.supervisor.length > 15 ? (paramsObj.supervisor.slice(0, 15) + '...') : paramsObj.supervisor) : '' }} {{ paramsObj.supervisor ? (paramsObj.supervisor.length > 15 ? (paramsObj.supervisor.slice(0, 15) + '...') : paramsObj.supervisor) : '' }}
</el-form-item> </el-form-item>
<el-form-item label="所属销售:" <el-form-item
class="halfItem" label="所属销售:"
:title="paramsObj.salesperson"> class="halfItem"
:title="paramsObj.salesperson"
>
{{ paramsObj.salesperson ? (paramsObj.salesperson.length > 15 ? (paramsObj.salesperson.slice(0, 15) + '...') : paramsObj.salesperson) : '' }} {{ paramsObj.salesperson ? (paramsObj.salesperson.length > 15 ? (paramsObj.salesperson.slice(0, 15) + '...') : paramsObj.salesperson) : '' }}
</el-form-item> </el-form-item>
</div> </div>
<div class="itemDiv"> <div class="itemDiv">
<el-form-item label="盯防负责人:" <el-form-item
class="halfItem" label="盯防负责人:"
:title="paramsObj.storePerson"> class="halfItem"
:title="paramsObj.storePerson"
>
{{ paramsObj.storePerson ? (paramsObj.storePerson.length > 15 ? (paramsObj.storePerson.slice(0, 15) + '...') : paramsObj.storePerson) : '' }} {{ paramsObj.storePerson ? (paramsObj.storePerson.length > 15 ? (paramsObj.storePerson.slice(0, 15) + '...') : paramsObj.storePerson) : '' }}
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
<div class="div-title">预警信息</div> <div class="div-title">预警信息</div>
<el-form class="edit-sub-block" <el-form
label-width="150px" class="edit-sub-block"
:inline="true"> label-width="150px"
:inline="true"
>
<div class="itemDiv"> <div class="itemDiv">
<el-form-item label="预警类型:" <el-form-item
class="halfItem"> label="预警类型:"
class="halfItem"
>
{{ paramsObj.ruleType ? paramsObj.ruleType : "-" }} {{ paramsObj.ruleType ? paramsObj.ruleType : "-" }}
</el-form-item> </el-form-item>
<el-form-item label="预警事项:" <el-form-item
class="halfItem"> label="预警事项:"
class="halfItem"
>
{{ {{
paramsObj.rule ? paramsObj.rule : "-" paramsObj.rule ? paramsObj.rule : "-"
}} }}
</el-form-item> </el-form-item>
</div> </div>
<div class="itemDiv"> <div class="itemDiv">
<el-form-item label="预警周期:" <el-form-item
class="halfItem"> label="预警周期:"
class="halfItem"
>
{{ cycleShow ? cycleShow : "-" }} {{ cycleShow ? cycleShow : "-" }}
</el-form-item> </el-form-item>
<el-form-item label="优先级:" <el-form-item
class="halfItem"> label="优先级:"
class="halfItem"
>
{{ {{
paramsObj.priorityLevel ? priorityShowText[paramsObj.priorityLevel] : "-" paramsObj.priorityLevel ? priorityShowText[paramsObj.priorityLevel] : "-"
}} }}
</el-form-item> </el-form-item>
</div> </div>
<div class="itemDiv"> <div class="itemDiv">
<el-form-item label="预警阶段:" <el-form-item
class="halfItem"> label="预警阶段:"
class="halfItem"
>
{{ paramsObj.stageName ? paramsObj.stageName : "-" }} {{ paramsObj.stageName ? paramsObj.stageName : "-" }}
</el-form-item> </el-form-item>
<el-form-item label="创建时间:" <el-form-item
class="halfItem"> label="创建时间:"
class="halfItem"
>
{{ {{
createTimeShow ? createTimeShow : "-" createTimeShow ? createTimeShow : "-"
}} }}
...@@ -98,12 +130,14 @@ ...@@ -98,12 +130,14 @@
</el-form> </el-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
:has-page="false" ref="recordTable"
:table-data="tableData" :has-page="false"
:search-form="searchFormSearch" :table-data="tableData"
:table-params="tableParams" :search-form="searchFormSearch"
:before-search-fn="beforeSearchFn"> :table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
</d2-table> </d2-table>
</div> </div>
</div> </div>
...@@ -133,26 +167,26 @@ export default { ...@@ -133,26 +167,26 @@ export default {
}, },
computed: { computed: {
dialogShow: { dialogShow: {
get() { get () {
return this.visible return this.visible
}, },
set(val) { set (val) {
this.$emit("update:visible", val) this.$emit("update:visible", val)
} }
} }
}, },
mounted() { mounted () {
this.dataProcess() this.dataProcess()
this.getList() this.getList()
this.loading = true this.loading = true
}, },
data() { data () {
return { return {
dialogConfig: { dialogConfig: {
setting: { setting: {
showClose: true, showClose: true,
appendToBody: false, appendToBody: true,
btnList: [] btnList: [],
}, },
config: { config: {
title: "详细信息", title: "详细信息",
...@@ -218,21 +252,21 @@ export default { ...@@ -218,21 +252,21 @@ export default {
} }
}, },
methods: { methods: {
beforeSearchFn() { beforeSearchFn () {
return new Promise(resolve => { return new Promise(resolve => {
this.searchForm.msgId = this.paramsObj.id this.searchForm.msgId = this.paramsObj.id
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
resolve() resolve()
}) })
}, },
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
this.loading = false this.loading = false
}) })
}, },
dataProcess() { dataProcess () {
if (this.paramsObj) { if (this.paramsObj) {
if (this.paramsObj.starDate) { if (this.paramsObj.starDate) {
this.cycleShow += Util.dateFormate(this.paramsObj.starDate, 'YYYY-MM-DD') this.cycleShow += Util.dateFormate(this.paramsObj.starDate, 'YYYY-MM-DD')
...@@ -247,7 +281,7 @@ export default { ...@@ -247,7 +281,7 @@ export default {
} }
} }
}, },
handleDetailClose() { handleDetailClose () {
this.dialogShow = false this.dialogShow = false
} }
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
<template> <template>
<baseDialog :dialog-config="dialogConfig" <baseDialog :dialog-config="dialogConfig"
:is-show.sync="dialogShow" :is-show.sync="dialogShow"
:config="{
appendToBody: true
}"
class="accountDailog" class="accountDailog"
@handleClick="handleAddConfirm"> @handleClick="handleAddConfirm">
<div class="add-dialog"> <div class="add-dialog">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!