Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 751a0a30
authored
Feb 21, 2025
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit 盯防
1 parent
7da28ed7
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
143 additions
and
131 deletions
src/api/earlyWarningManager.js
src/views/earlyWarningManager/shopGuard/components/PointerConfig.vue
src/views/earlyWarningManager/shopGuard/components/boardDetail/index.vue
src/views/earlyWarningManager/shopGuard/components/dataMore/dataGroup.vue
src/views/earlyWarningManager/shopGuard/components/dataMore/dataList.vue
src/views/earlyWarningManager/shopGuard/components/dataMore/index.vue
src/views/earlyWarningManager/shopGuard/components/dataMore/merchantList.vue
src/views/earlyWarningManager/shopGuard/components/shopDetail/index.vue
src/views/earlyWarningManager/shopGuard/indexControl.vue
src/api/earlyWarningManager.js
View file @
751a0a3
...
...
@@ -222,4 +222,28 @@ export function getKpiMetric (data) {
export
function
updateKpiMetric
(
data
)
{
data
.
method
=
'dj.riskmanage.api.kpiMetric.updateKpiMetric'
return
request
(
data
,
RequestMethods
.
POST
)
}
/**
* 店效盯防-更多看板-数据指标
*/
export
function
getBoardList
(
data
)
{
data
.
method
=
'dj.api.smartcarlife.risk.manage.notice.board.items.detail'
return
request
(
data
,
RequestMethods
.
POST
)
}
/**
* 店效盯防-更多看板-门店列表
*/
export
function
getBoardMerchantList
(
data
)
{
data
.
method
=
'dj.api.smartcarlife.risk.manage.notice.board.merchant.list'
return
request
(
data
,
RequestMethods
.
POST
)
}
/**
* 店效盯防-指标详情(趋势图)
*/
export
function
getBoardDetail
(
data
)
{
data
.
method
=
'dj.api.smartcarlife.risk.manage.code.detail.list'
return
request
(
data
,
RequestMethods
.
POST
)
}
\ No newline at end of file
src/views/earlyWarningManager/shopGuard/components/PointerConfig.vue
View file @
751a0a3
...
...
@@ -6,7 +6,10 @@
class=
"dialog"
@
handleClick=
"handleClick"
>
<div
class=
"dialog-content"
>
<div
class=
"dialog-content"
v-loading=
"loading"
>
<div
class=
"search-box"
>
<div
class=
"label"
>
指标名称:
</div>
<el-input
...
...
@@ -14,11 +17,13 @@
size=
"small"
maxlength=
"10"
v-model=
"searchValue"
clearable
></el-input>
<el-button
class=
"btn"
type=
"primary"
size=
"small"
@
click=
"getDataConfig"
>
查询
</el-button>
</div>
<el-table
...
...
@@ -33,6 +38,7 @@
class-name=
"draggable-icon"
width=
"40"
align=
"center"
v-if=
"!searchFlag"
>
<div
class=
"icon"
></div>
</el-table-column>
...
...
@@ -40,6 +46,7 @@
type=
"index"
width=
"60"
align=
"center"
v-if=
"!searchFlag"
>
</el-table-column>
<template
v-for=
"(item,index) in tableParams.tableColumns"
>
...
...
@@ -52,29 +59,7 @@
:key=
"index"
>
<template
slot-scope=
"scope"
>
<div
v-if=
"item.addHtml"
class=
"input-box"
>
<template
v-if=
"scope.row.isEdit"
>
<el-input
v-model=
"scope.row[item.addHtml]"
:maxlength=
"item.maxlength"
:placeholder=
"item.placeholder"
:ref=
"`$
{scope.row.id}`"
size="mini"
:class="scope.row.className"
@blur="handleInput($event, scope.row, item)"
>
</el-input>
</
template
>
<
template
v-else
>
{{
scope
.
row
[
item
.
addHtml
]?
scope
.
row
[
item
.
addHtml
].
toLocaleString
()
:
''
}}
</
template
>
<
template
v-if=
"item.unit"
>
<div
class=
"unit"
>
{{
item
.
unit
}}
</div>
</
template
>
</div>
<
template
v-else-if=
"item.formatter"
>
<template
v-if=
"item.formatter"
>
<span
v-if=
"item.html"
v-html=
"item.formatter(scope.row)"
...
...
@@ -99,7 +84,7 @@
@
click=
"hide(scope)"
:key=
"btnKey"
>
{{
scope
.
row
.
hiddenFlag
==
1
?
'显示'
:
'隐藏'
}}
</el-button>
<template
v-if=
"tableData.length > 1"
>
<template
v-if=
"tableData.length > 1
&& !searchFlag
"
>
<span
class=
"icon el-icon-top"
@
click=
"changeSort(scope.$index,0)"
...
...
@@ -125,11 +110,13 @@ import { getKpiMetric, updateKpiMetric } from '@/api/earlyWarningManager'
export
default
{
name
:
''
,
props
:
{
show
:
Boolean
show
:
Boolean
,
scope
:
Number
},
data
()
{
return
{
btnKey
:
Date
.
now
(),
loading
:
true
,
searchValue
:
''
,
dialogShow
:
false
,
dialogConfig
:
{
...
...
@@ -146,79 +133,31 @@ export default {
width
:
"1080px"
}
},
tableData
:
[
{
id
:
1
,
businessType
:
4
,
outputTarget
:
'1'
,
grossProfit
:
''
,
grossMargin
:
''
},
{
id
:
2
,
businessType
:
3
,
outputTarget
:
'2'
,
grossProfit
:
''
,
grossMargin
:
''
},
{
id
:
3
,
businessType
:
2
,
outputTarget
:
'3'
,
grossProfit
:
''
,
grossMargin
:
''
}
],
tableData
:
[],
tableParams
:
{
tableOption
:
{
width
:
'100'
},
tableColumns
:
[
{
label
:
'业务类型'
,
minWidth
:
110
,
formatter
:
(
cellValue
)
=>
{
return
{
2
:
'轻改'
,
3
:
'权益'
,
4
:
'延保'
}[
cellValue
.
businessType
]
},
},
{
label
:
'产值目标'
,
addHtml
:
'outputTarget'
,
minWidth
:
135
,
maxlength
:
10
,
placeholder
:
'请输入'
,
max
:
9999999999
},
{
label
:
'毛利润'
,
addHtml
:
'grossProfit'
,
minWidth
:
135
,
maxlength
:
10
,
placeholder
:
'请输入'
,
max
:
9999999999
prop
:
'name'
},
{
label
:
'毛利润率'
,
addHtml
:
'grossMargin'
,
unit
:
'%'
,
minWidth
:
135
,
maxlength
:
5
,
placeholder
:
'请输入'
,
max
:
100
,
decimals
:
true
prop
:
'definition'
},
]
},
searchFlag
:
false
}
},
watch
:
{
show
(
n
)
{
this
.
dialogShow
=
n
if
(
n
)
{
this
.
tableData
=
[]
this
.
searchValue
=
''
this
.
init
()
}
},
...
...
@@ -238,32 +177,51 @@ export default {
this
.
getDataConfig
()
},
async
getDataConfig
()
{
const
{
searchValue
,
uuid
}
=
this
,
res
=
await
getKpiMetric
({
name
:
searchValue
,
uuid
})
console
.
log
(
res
,
'==='
)
this
.
$nextTick
(()
=>
{
let
el
=
this
.
$refs
.
table
.
$el
.
querySelector
(
`.el-table__body-wrapper > table > tbody`
)
try
{
const
{
searchValue
,
uuid
,
scope
}
=
this
,
res
=
await
getKpiMetric
({
scope
,
name
:
searchValue
,
uuid
})
this
.
searchFlag
=
searchValue
?
true
:
false
this
.
tableData
=
res
||
[]
console
.
log
(
res
,
'==='
)
this
.
loading
=
false
this
.
$nextTick
(()
=>
{
new
sortablejs
(
el
,
{
handle
:
'.draggable-icon'
,
ghostClass
:
"sortable-drag"
,
onEnd
:
(
e
)
=>
{
const
{
oldIndex
,
newIndex
}
=
e
this
.
changeSort
(
oldIndex
,
newIndex
)
}
let
el
=
this
.
$refs
.
table
.
$el
.
querySelector
(
`.el-table__body-wrapper > table > tbody`
)
this
.
$nextTick
(()
=>
{
new
sortablejs
(
el
,
{
handle
:
'.draggable-icon'
,
ghostClass
:
"sortable-drag"
,
onEnd
:
(
e
)
=>
{
const
{
oldIndex
,
newIndex
}
=
e
this
.
changeSort
(
oldIndex
,
newIndex
)
}
})
})
})
})
}
catch
(
error
)
{
this
.
loading
=
false
}
},
async
handleClick
()
{
try
{
let
userKpiMetricAddRequestDTOS
=
[]
let
userKpiMetricAddRequestDTOS
=
[],
{
scope
,
tableData
,
uuid
,
searchFlag
}
=
this
tableData
.
map
((
e
,
index
)
=>
{
userKpiMetricAddRequestDTOS
.
push
({
id
:
e
.
id
,
loginUuid
:
uuid
,
sort
:
searchFlag
?
e
.
defaultSortOrder
:
index
+
1
,
hiddenFlag
:
e
.
hiddenFlag
})
})
console
.
log
(
userKpiMetricAddRequestDTOS
,
'-------'
)
const
res
=
await
updateKpiMetric
({
userKpiMetricAddRequestDTOS
userKpiMetricAddRequestDTOS
,
scope
})
if
(
res
)
{
this
.
$message
.
success
(
'保存成功'
)
...
...
@@ -287,8 +245,13 @@ export default {
<
style
scoped
lang=
'scss'
>
.dialog
{
::v-deep.el-dialog__body
{
max-height
:
60vh
!important
;
overflow-y
:
auto
;
}
&
-content
{
padding
:
5px
0
;
//
padding
:
5px
0
;
.search-box
{
display
:
flex
;
align-items
:
center
;
...
...
src/views/earlyWarningManager/shopGuard/components/boardDetail/index.vue
View file @
751a0a3
...
...
@@ -28,7 +28,7 @@
<
script
type
=
'text/ecmascript-6'
>
import
SearchBox
from
'../SearchBox'
import
*
as
echarts
from
'echarts'
import
{
getMerchantOutputDetail
}
from
'@api/earlyWarningManager'
import
{
getMerchantOutputDetail
,
getBoardDetail
}
from
'@api/earlyWarningManager'
import
dayjs
from
'dayjs'
import
{
tooltipConfig
,
xAxisConfig
,
dataZoomSliderConfig
}
from
'../chartConfig'
...
...
@@ -54,13 +54,16 @@ export default {
computed
:
{
businessType
()
{
return
this
.
pageData
.
businessType
}
,
queryType
()
{
return
this
.
pageData
.
queryType
}
}
,
watch
:
{
businessType
:
{
handler
(
newVal
)
{
if
(
this
.
show
)
{
if
(
newVal
&&
this
.
initStatus
)
this
.
get
MerchantOutputDetail
()
if
(
newVal
&&
this
.
initStatus
)
this
.
get
Data
()
}
else
this
.
initStatus
=
false
}
}
...
...
@@ -71,20 +74,28 @@ export default {
methods
:
{
async
getBoardData
(
params
)
{
this
.
searchTime
=
params
this
.
get
MerchantOutputDetail
()
this
.
get
Data
()
this
.
initStatus
=
true
}
,
async
getMerchantOutputDetail
()
{
let
{
queryType
}
=
this
.
pageData
,
{
searchTime
,
businessType
}
=
this
const
res
=
await
getMerchantOutputDetail
({
businessType
,
queryType
,
...
searchTime
}
)
async
getData
()
{
let
{
searchTime
,
businessType
,
queryType
}
=
this
this
.
chart
=
echarts
.
init
(
document
.
getElementById
(
this
.
pageData
.
pageId
))
this
.
drawChart
(
res
,
queryType
)
if
(
queryType
)
{
const
res
=
await
getMerchantOutputDetail
({
businessType
,
queryType
,
...
searchTime
}
)
this
.
drawChart
(
res
,
queryType
)
}
else
{
const
{
merchantId
}
=
this
.
pageData
,
res
=
await
getBoardDetail
({
businessType
,
merchantId
,
...
searchTime
}
)
console
.
log
(
res
,
'lll'
)
}
}
,
drawChart
(
list
,
queryType
)
{
this
.
chart
.
clear
()
...
...
src/views/earlyWarningManager/shopGuard/components/dataMore/dataGroup.vue
View file @
751a0a3
...
...
@@ -32,6 +32,7 @@
</div>
<pointer-config
:show
.
sync=
"dialogShow"
:scope=
"1"
@
update=
"$emit('update')"
/>
</div>
...
...
src/views/earlyWarningManager/shopGuard/components/dataMore/dataList.vue
View file @
751a0a3
...
...
@@ -22,6 +22,8 @@
<
script
type=
'text/ecmascript-6'
>
import
onShowMixin
from
'./onShowMixin'
import
BoardItem
from
'../shopGuardIndex/BoardItem'
import
{
getBoardList
}
from
'@api/earlyWarningManager'
export
default
{
mixins
:
[
onShowMixin
],
components
:
{
...
...
@@ -67,16 +69,22 @@ export default {
mounted
()
{
},
methods
:
{
search
()
{
console
.
log
(
this
.
searchForm
,
'list'
)
async
search
()
{
this
.
boardList
.
map
((
e
,
index
)
=>
{
e
.
componentName
=
'boardDetail'
e
.
pageId
=
`board-
${
index
}
`
e
.
pageId
=
`
data-
board-
${
index
}
`
e
.
tabTitle
=
`
${
e
.
name
}
详情`
})
return
const
res
=
await
getBoardList
({
...
this
.
searchForm
})
console
.
log
(
res
)
},
openWindow
(
e
)
{
let
{
businessType
}
=
this
.
searchForm
console
.
log
(
e
)
this
.
$emit
(
'openWindow'
,
{
...
e
,
businessType
...
...
src/views/earlyWarningManager/shopGuard/components/dataMore/index.vue
View file @
751a0a3
...
...
@@ -7,7 +7,7 @@
:form-data=
"showFormData"
label-width=
"100px"
>
<template
slot=
"
time
"
>
<template
slot=
"
dateGroup
"
>
<search-box
ref=
"timeRef"
class=
"search-box"
...
...
@@ -60,8 +60,8 @@ export default {
loading
:
false
,
searchForm
:
{
businessType
:
4
,
business
Nature
:
''
,
carBrand
:
''
,
business
ScenarioList
:
[]
,
secondBrandIdList
:
[]
,
merchantRange
:
1
,
// merchantId: '',
...
...
@@ -84,7 +84,7 @@ export default {
},
{
label
:
'业务性质'
,
name
:
'business
Nature
'
,
name
:
'business
ScenarioList
'
,
type
:
'select'
,
multiple
:
true
,
isClear
:
true
,
...
...
@@ -100,17 +100,15 @@ export default {
optionLabel
:
'confName'
,
},
{
addHtml
:
'
time
'
addHtml
:
'
dateGroup
'
},
{
label
:
'主营品牌'
,
name
:
'
carBrand
'
,
name
:
'
secondBrandIdList
'
,
type
:
'select'
,
multiple
:
true
,
isClear
:
true
,
optionList
:
[
{
value
:
2
,
name
:
'轻改'
},
{
value
:
3
,
name
:
'权益'
},
{
value
:
4
,
name
:
'延保'
},
],
optionId
:
'value'
,
optionLabel
:
'name'
,
...
...
src/views/earlyWarningManager/shopGuard/components/dataMore/merchantList.vue
View file @
751a0a3
...
...
@@ -30,7 +30,7 @@
<
script
type=
'text/ecmascript-6'
>
import
onShowMixin
from
'./onShowMixin'
import
{
warningMsgDetailListWithPage
}
from
'@api/earlyWarningManager'
import
{
getBoardMerchantList
}
from
'@api/earlyWarningManager'
export
default
{
mixins
:
[
onShowMixin
],
...
...
@@ -100,19 +100,23 @@ export default {
},
{
label
:
'产值'
,
width
:
'150'
,
prop
:
"startTime"
prop
:
"startTime"
,
sortable
:
true
},
{
label
:
'订单数'
,
width
:
'150'
,
prop
:
"endTime"
prop
:
"endTime"
,
sortable
:
true
},
{
label
:
'客单价'
,
width
:
'130'
,
prop
:
"seconds"
,
sortable
:
true
},
{
label
:
'渗透率'
,
prop
:
"axbOpenFlag"
,
width
:
130
,
sortable
:
true
,
formatter
(
row
)
{
return
row
.
axbOpenFlag
?
"是"
:
"否"
}
...
...
@@ -120,6 +124,7 @@ export default {
{
label
:
'触客转化率'
,
prop
:
"isFinishFlag"
,
sortable
:
true
,
width
:
130
,
formatter
(
row
)
{
return
row
.
finishFlag
?
"是"
:
"否"
...
...
@@ -133,9 +138,10 @@ export default {
},
methods
:
{
async
search
()
{
const
{
total
,
list
}
=
await
warningMsgDetailListWithPage
({
return
const
{
total
,
list
}
=
await
getBoardMerchantList
({
...
this
.
page
,
monitorType
:
2
,
// 预警数据 1.员工 2.门店
...
this
.
searchForm
})
this
.
tableData
=
list
this
.
tableTotal
=
total
...
...
src/views/earlyWarningManager/shopGuard/components/shopDetail/index.vue
View file @
751a0a3
...
...
@@ -101,6 +101,7 @@
></quality-detail>
<pointer-config
:show.sync="
dialogShow
"
:scope="
2
"
@update="
$emit
(
'update'
)
"
/>
<
/div
>
...
...
src/views/earlyWarningManager/shopGuard/indexControl.vue
View file @
751a0a3
...
...
@@ -124,7 +124,7 @@ export default {
}
else
this
.
$router
.
go
(
-
1
)
},
openWindow
(
data
)
{
//
console.log(data)
console
.
log
(
data
)
// data.merchantId = 44211895
// data.merchantId = 44210895
// data.merchantId = 44209510
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment