Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
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 5438b8e4
authored
May 05, 2023
by
姜鹏凯
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
组织架构搜索优化、门店活码统计下载调整
1 parent
8045178b
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
196 additions
and
161 deletions
linkwe-pc/src/api/drainageCode/store.js
linkwe-pc/src/components/SelectUser.vue
linkwe-pc/src/components/SelectWeUser.vue
linkwe-pc/src/views/drainageCode/store/guide_code_analyse.vue
linkwe-pc/src/views/drainageCode/store/store_code_analyse.vue
linkwe-pc/src/api/drainageCode/store.js
View file @
5438b8e
...
@@ -152,7 +152,8 @@ export function getTableInGuideCode(params) {
...
@@ -152,7 +152,8 @@ export function getTableInGuideCode(params) {
export
function
getTableGuideCodeExport
(
params
)
{
export
function
getTableGuideCodeExport
(
params
)
{
return
request
({
return
request
({
url
:
service
+
'/exportCountShopGuideReport'
,
url
:
service
+
'/exportCountShopGuideReport'
,
params
params
,
responseType
:
'blob'
})
})
}
}
...
@@ -168,6 +169,7 @@ export function getTableInStoreCode(params) {
...
@@ -168,6 +169,7 @@ export function getTableInStoreCode(params) {
export
function
getTableStoreCodeExport
(
params
)
{
export
function
getTableStoreCodeExport
(
params
)
{
return
request
({
return
request
({
url
:
service
+
'/exportCountStoreGroupReport'
,
url
:
service
+
'/exportCountStoreGroupReport'
,
params
params
,
responseType
:
'blob'
})
})
}
}
linkwe-pc/src/components/SelectUser.vue
View file @
5438b8e
<
script
>
<
script
>
import
{
getDeptTree
,
getDeptUser
}
from
'@/api/organization'
import
{
getDeptTree
,
getDeptUser
}
from
'@/api/organization'
export
default
{
export
default
{
name
:
'SelectUser'
,
name
:
'SelectUser'
,
components
:
{},
components
:
{},
props
:
{
props
:
{
isWechat
:
{
isWechat
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
true
,
default
:
true
},
},
// 添加标签显隐
// 添加标签显隐
visible
:
{
visible
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
,
default
:
false
},
},
title
:
{
title
:
{
type
:
String
,
type
:
String
,
default
:
'组织架构'
,
default
:
'组织架构'
},
},
// 是否 只选择叶子节点(人员节点)/禁止选择父节点(部门节点)
// 是否 只选择叶子节点(人员节点)/禁止选择父节点(部门节点)
isOnlyLeaf
:
{
isOnlyLeaf
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
true
,
default
:
true
},
},
// 是否单选
// 是否单选
isSigleSelect
:
{
isSigleSelect
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
,
default
:
false
},
},
// 默认选中的节点
// 默认选中的节点
defaultValues
:
{
defaultValues
:
{
...
@@ -34,14 +34,14 @@ export default {
...
@@ -34,14 +34,14 @@ export default {
// 必须含有userId和name属性
// 必须含有userId和name属性
validator
(
val
)
{
validator
(
val
)
{
return
val
.
every
((
e
)
=>
e
.
userId
&&
e
.
name
)
return
val
.
every
((
e
)
=>
e
.
userId
&&
e
.
name
)
},
}
},
},
// 禁止选中的节点
// 禁止选中的节点
disabledValues
:
{
disabledValues
:
{
type
:
Array
,
type
:
Array
,
default
:
()
=>
[],
default
:
()
=>
[]
},
},
destroyOnClose
:
Boolean
,
destroyOnClose
:
Boolean
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -52,7 +52,7 @@ export default {
...
@@ -52,7 +52,7 @@ export default {
keywords
:
''
,
keywords
:
''
,
searchResult
:
[],
searchResult
:
[],
searchState
:
false
,
searchState
:
false
,
checked
:
[],
checked
:
[]
}
}
},
},
watch
:
{
watch
:
{
...
@@ -72,7 +72,7 @@ export default {
...
@@ -72,7 +72,7 @@ export default {
},
},
Pvisible
(
val
)
{
Pvisible
(
val
)
{
val
&&
this
.
$refs
.
tree
&&
this
.
$refs
.
tree
.
setCheckedKeys
(
this
.
defaultValues
.
map
((
e
)
=>
e
.
userId
||
e
.
id
))
val
&&
this
.
$refs
.
tree
&&
this
.
$refs
.
tree
.
setCheckedKeys
(
this
.
defaultValues
.
map
((
e
)
=>
e
.
userId
||
e
.
id
))
},
}
},
},
computed
:
{
computed
:
{
Pvisible
:
{
Pvisible
:
{
...
@@ -81,7 +81,7 @@ export default {
...
@@ -81,7 +81,7 @@ export default {
},
},
set
(
val
)
{
set
(
val
)
{
this
.
$emit
(
'update:visible'
,
val
)
this
.
$emit
(
'update:visible'
,
val
)
},
}
},
},
defaultProps
()
{
defaultProps
()
{
let
that
=
this
let
that
=
this
...
@@ -93,9 +93,9 @@ export default {
...
@@ -93,9 +93,9 @@ export default {
},
},
isLeaf
(
data
,
node
)
{
isLeaf
(
data
,
node
)
{
return
!
data
.
id
return
!
data
.
id
},
}
}
},
}
}
},
},
created
()
{},
created
()
{},
mounted
()
{},
mounted
()
{},
...
@@ -114,8 +114,8 @@ export default {
...
@@ -114,8 +114,8 @@ export default {
return
dd
.
userId
return
dd
.
userId
})
})
getDeptUser
({
getDeptUser
({
deptId
:
this
.
deptId
,
//
deptId: this.deptId,
userName
:
this
.
keywords
,
userName
:
this
.
keywords
}).
then
((
res
)
=>
{
}).
then
((
res
)
=>
{
this
.
searchResult
=
this
.
handleUser
(
res
.
rows
)
this
.
searchResult
=
this
.
handleUser
(
res
.
rows
)
})
})
...
@@ -246,13 +246,13 @@ export default {
...
@@ -246,13 +246,13 @@ export default {
index
>
-
1
&&
this
.
userList
.
splice
(
index
,
1
)
index
>
-
1
&&
this
.
userList
.
splice
(
index
,
1
)
let
order
=
this
.
defaultValues
.
findIndex
((
i
)
=>
i
.
userId
===
key
)
let
order
=
this
.
defaultValues
.
findIndex
((
i
)
=>
i
.
userId
===
key
)
order
>
-
1
&&
this
.
defaultValues
.
slice
().
splice
(
order
,
1
)
order
>
-
1
&&
this
.
defaultValues
.
slice
().
splice
(
order
,
1
)
},
}
},
}
}
}
</
script
>
</
script
>
<
template
>
<
template
>
<el-dialog
:title=
"title"
:visible
.
sync=
"Pvisible"
:close-on-click-modal=
"false"
:destroy-on-close=
"destroyOnClose"
>
<el-dialog
:title=
"title"
:visible
.
sync=
"Pvisible"
:close-on-click-modal=
"false"
:destroy-on-close=
"destroyOnClose"
>
<el-row
:gutter=
"20"
style=
"min-height: 400px"
>
<el-row
:gutter=
"20"
style=
"min-height: 400px
;
"
>
<el-col
:span=
"12"
:xs=
"24"
>
<el-col
:span=
"12"
:xs=
"24"
>
<div
class=
"head-container"
>
<div
class=
"head-container"
>
<div
class=
"search-input"
>
<div
class=
"search-input"
>
...
@@ -262,7 +262,8 @@ export default {
...
@@ -262,7 +262,8 @@ export default {
@
keyup
.
enter
.
native=
"setSearch"
@
keyup
.
enter
.
native=
"setSearch"
placeholder=
"请输入员工名称"
placeholder=
"请输入员工名称"
clearable
clearable
@
change=
"setChange"
>
@
change=
"setChange"
>
<el-button
slot=
"append"
icon=
"el-icon-search"
@
click=
"setSearch"
></el-button>
<el-button
slot=
"append"
icon=
"el-icon-search"
@
click=
"setSearch"
></el-button>
</el-input>
</el-input>
</div>
</div>
...
@@ -270,9 +271,7 @@ export default {
...
@@ -270,9 +271,7 @@ export default {
<el-checkbox-group
v-model=
"checked"
>
<el-checkbox-group
v-model=
"checked"
>
<el-row
v-for=
"(item, index) in searchResult"
:key=
"index"
>
<el-row
v-for=
"(item, index) in searchResult"
:key=
"index"
>
<el-checkbox
:label=
"item.userId"
:key=
"index"
@
change=
"setSelectChange($event, index)"
>
<el-checkbox
:label=
"item.userId"
:key=
"index"
@
change=
"setSelectChange($event, index)"
>
<div>
<div>
{{
item
.
name
}}
-
{{
item
.
userDepts
[
0
].
deptName
}}
</div>
{{
item
.
name
}}
</div>
</el-checkbox>
</el-checkbox>
</el-row>
</el-row>
</el-checkbox-group>
</el-checkbox-group>
...
@@ -290,7 +289,8 @@ export default {
...
@@ -290,7 +289,8 @@ export default {
:load=
"loadNode"
:load=
"loadNode"
:props=
"defaultProps"
:props=
"defaultProps"
:check-strictly=
"isOnlyLeaf"
:check-strictly=
"isOnlyLeaf"
@
check-change=
"handleCheckChange"
></el-tree>
@
check-change=
"handleCheckChange"
></el-tree>
</div>
</div>
</transition>
</transition>
</div>
</div>
...
@@ -312,32 +312,32 @@ export default {
...
@@ -312,32 +312,32 @@ export default {
</
template
>
</
template
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.content
{
.content
{
min-height
:
400px
;
min-height
:
400px
;
}
}
.search-input
{
.search-input
{
margin-top
:
5px
;
margin-top
:
5px
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
}
}
.user-list
{
.user-list
{
.el-row
{
.el-row
{
line-height
:
26px
;
line-height
:
26px
;
}
}
}
}
.search-list
{
.search-list
{
margin-top
:
20px
;
margin-top
:
20px
;
padding
:
0
10px
;
padding
:
0
10px
;
}
}
.fade-enter-active
{
.fade-enter-active
{
transition
:
opacity
0.5s
;
transition
:
opacity
0.5s
;
}
}
.fade-enter
{
.fade-enter
{
opacity
:
0
;
opacity
:
0
;
}
}
.fade-leave-active
{
.fade-leave-active
{
transition
:
opacity
0.5s
;
transition
:
opacity
0.5s
;
}
}
.fade-leave-to
{
.fade-leave-to
{
opacity
:
0
;
opacity
:
0
;
}
}
</
style
>
</
style
>
linkwe-pc/src/components/SelectWeUser.vue
View file @
5438b8e
<
script
>
<
script
>
import
{
getDeptTree
,
getDeptUser
}
from
'@/api/organization'
import
{
getDeptTree
,
getDeptUser
}
from
'@/api/organization'
export
default
{
export
default
{
name
:
'SelectWeUser'
,
name
:
'SelectWeUser'
,
components
:
{},
components
:
{},
props
:
{
props
:
{
// 添加标签显隐
// 添加标签显隐
visible
:
{
visible
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
,
default
:
false
},
},
title
:
{
title
:
{
type
:
String
,
type
:
String
,
default
:
'组织架构'
,
default
:
'组织架构'
},
},
// 是否 只选择叶子节点(人员节点)/禁止选择父节点(部门节点)
// 是否 只选择叶子节点(人员节点)/禁止选择父节点(部门节点)
isOnlyLeaf
:
{
isOnlyLeaf
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
true
,
default
:
true
},
},
// 是否单选
// 是否单选
isSigleSelect
:
{
isSigleSelect
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
,
default
:
false
},
},
// 默认选中的节点
// 默认选中的节点
defaultValues
:
{
defaultValues
:
{
...
@@ -30,14 +30,14 @@ export default {
...
@@ -30,14 +30,14 @@ export default {
// 必须含有userId和name属性
// 必须含有userId和name属性
validator
(
val
)
{
validator
(
val
)
{
return
val
.
every
((
e
)
=>
e
.
userId
&&
e
.
name
)
return
val
.
every
((
e
)
=>
e
.
userId
&&
e
.
name
)
},
}
},
},
// 禁止选中的节点
// 禁止选中的节点
disabledValues
:
{
disabledValues
:
{
type
:
Array
,
type
:
Array
,
default
:
()
=>
[],
default
:
()
=>
[]
},
},
destroyOnClose
:
Boolean
,
destroyOnClose
:
Boolean
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -48,7 +48,7 @@ export default {
...
@@ -48,7 +48,7 @@ export default {
keywords
:
''
,
keywords
:
''
,
searchResult
:
[],
searchResult
:
[],
searchState
:
false
,
searchState
:
false
,
checked
:
[],
checked
:
[]
}
}
},
},
watch
:
{
watch
:
{
...
@@ -67,7 +67,7 @@ export default {
...
@@ -67,7 +67,7 @@ export default {
this
.
userList
=
checkedUserList
this
.
userList
=
checkedUserList
}
}
},
},
immediate
:
true
,
immediate
:
true
},
},
Pvisible
(
val
)
{
Pvisible
(
val
)
{
val
&&
this
.
$refs
.
tree
&&
this
.
$refs
.
tree
.
setCheckedKeys
(
this
.
defaultValues
.
map
((
e
)
=>
e
.
userId
||
e
.
id
))
val
&&
this
.
$refs
.
tree
&&
this
.
$refs
.
tree
.
setCheckedKeys
(
this
.
defaultValues
.
map
((
e
)
=>
e
.
userId
||
e
.
id
))
...
@@ -76,7 +76,7 @@ export default {
...
@@ -76,7 +76,7 @@ export default {
this
.
$refs
.
tree
&&
this
.
$refs
.
tree
.
setCheckedKeys
(
this
.
defaultValues
.
map
((
e
)
=>
e
.
userId
||
e
.
id
))
this
.
$refs
.
tree
&&
this
.
$refs
.
tree
.
setCheckedKeys
(
this
.
defaultValues
.
map
((
e
)
=>
e
.
userId
||
e
.
id
))
},
300
)
},
300
)
}
}
},
}
},
},
computed
:
{
computed
:
{
Pvisible
:
{
Pvisible
:
{
...
@@ -85,7 +85,7 @@ export default {
...
@@ -85,7 +85,7 @@ export default {
},
},
set
(
val
)
{
set
(
val
)
{
this
.
$emit
(
'update:visible'
,
val
)
this
.
$emit
(
'update:visible'
,
val
)
},
}
},
},
defaultProps
()
{
defaultProps
()
{
let
that
=
this
let
that
=
this
...
@@ -97,9 +97,9 @@ export default {
...
@@ -97,9 +97,9 @@ export default {
},
},
isLeaf
(
data
,
node
)
{
isLeaf
(
data
,
node
)
{
return
!
data
.
id
return
!
data
.
id
},
}
}
},
}
}
},
},
created
()
{},
created
()
{},
mounted
()
{},
mounted
()
{},
...
@@ -118,8 +118,8 @@ export default {
...
@@ -118,8 +118,8 @@ export default {
return
dd
.
userId
return
dd
.
userId
})
})
getDeptUser
({
getDeptUser
({
deptId
:
this
.
deptId
,
//
deptId: this.deptId,
userName
:
this
.
keywords
,
userName
:
this
.
keywords
}).
then
((
res
)
=>
{
}).
then
((
res
)
=>
{
this
.
searchResult
=
this
.
handleName
(
res
.
rows
)
this
.
searchResult
=
this
.
handleName
(
res
.
rows
)
})
})
...
@@ -247,9 +247,9 @@ export default {
...
@@ -247,9 +247,9 @@ export default {
index
>
-
1
&&
this
.
userList
.
splice
(
index
,
1
)
index
>
-
1
&&
this
.
userList
.
splice
(
index
,
1
)
let
order
=
this
.
defaultValues
.
findIndex
((
i
)
=>
i
.
userId
===
key
)
let
order
=
this
.
defaultValues
.
findIndex
((
i
)
=>
i
.
userId
===
key
)
order
>
-
1
&&
this
.
defaultValues
.
slice
().
splice
(
order
,
1
)
order
>
-
1
&&
this
.
defaultValues
.
slice
().
splice
(
order
,
1
)
},
}
},
}
}
}
</
script
>
</
script
>
<
template
>
<
template
>
<el-dialog
<el-dialog
...
@@ -257,7 +257,8 @@ export default {
...
@@ -257,7 +257,8 @@ export default {
:title=
"title"
:title=
"title"
:visible
.
sync=
"Pvisible"
:visible
.
sync=
"Pvisible"
:close-on-click-modal=
"false"
:close-on-click-modal=
"false"
:destroy-on-close=
"destroyOnClose"
>
:destroy-on-close=
"destroyOnClose"
>
<el-row
:gutter=
"20"
class=
"content"
>
<el-row
:gutter=
"20"
class=
"content"
>
<el-col
:span=
"12"
:xs=
"24"
>
<el-col
:span=
"12"
:xs=
"24"
>
<div
class=
"search-input"
>
<div
class=
"search-input"
>
...
@@ -267,7 +268,8 @@ export default {
...
@@ -267,7 +268,8 @@ export default {
@
keyup
.
enter
.
native=
"setSearch"
@
keyup
.
enter
.
native=
"setSearch"
placeholder=
"请输入员工名称"
placeholder=
"请输入员工名称"
clearable
clearable
@
change=
"setChange"
>
@
change=
"setChange"
>
<el-button
slot=
"append"
icon=
"el-icon-search"
@
click=
"setSearch"
></el-button>
<el-button
slot=
"append"
icon=
"el-icon-search"
@
click=
"setSearch"
></el-button>
</el-input>
</el-input>
</div>
</div>
...
@@ -275,9 +277,7 @@ export default {
...
@@ -275,9 +277,7 @@ export default {
<el-checkbox-group
v-model=
"checked"
>
<el-checkbox-group
v-model=
"checked"
>
<el-row
v-for=
"(item, index) in searchResult"
:key=
"index"
>
<el-row
v-for=
"(item, index) in searchResult"
:key=
"index"
>
<el-checkbox
:label=
"item.userId"
:key=
"index"
@
change=
"setSelectChange($event, index)"
>
<el-checkbox
:label=
"item.userId"
:key=
"index"
@
change=
"setSelectChange($event, index)"
>
<div>
<div>
{{
item
.
name
}}
-
{{
item
.
userDepts
[
0
].
deptName
}}
</div>
{{
item
.
name
}}
</div>
</el-checkbox>
</el-checkbox>
</el-row>
</el-row>
</el-checkbox-group>
</el-checkbox-group>
...
@@ -295,7 +295,8 @@ export default {
...
@@ -295,7 +295,8 @@ export default {
:load=
"loadNode"
:load=
"loadNode"
:props=
"defaultProps"
:props=
"defaultProps"
:check-strictly=
"isOnlyLeaf"
:check-strictly=
"isOnlyLeaf"
@
check-change=
"handleCheckChange"
></el-tree>
@
check-change=
"handleCheckChange"
></el-tree>
</div>
</div>
</transition>
</transition>
</el-col>
</el-col>
...
@@ -316,32 +317,32 @@ export default {
...
@@ -316,32 +317,32 @@ export default {
</
template
>
</
template
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.content
{
.content
{
min-height
:
400px
;
min-height
:
400px
;
}
}
.search-input
{
.search-input
{
margin-top
:
5px
;
margin-top
:
5px
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
}
}
.user-list
{
.user-list
{
.el-row
{
.el-row
{
line-height
:
26px
;
line-height
:
26px
;
}
}
}
}
.search-list
{
.search-list
{
margin-top
:
20px
;
margin-top
:
20px
;
padding
:
0
10px
;
padding
:
0
10px
;
}
}
.fade-enter-active
{
.fade-enter-active
{
transition
:
opacity
0.5s
;
transition
:
opacity
0.5s
;
}
}
.fade-enter
{
.fade-enter
{
opacity
:
0
;
opacity
:
0
;
}
}
.fade-leave-active
{
.fade-leave-active
{
transition
:
opacity
0.5s
;
transition
:
opacity
0.5s
;
}
}
.fade-leave-to
{
.fade-leave-to
{
opacity
:
0
;
opacity
:
0
;
}
}
</
style
>
</
style
>
linkwe-pc/src/views/drainageCode/store/guide_code_analyse.vue
View file @
5438b8e
...
@@ -5,13 +5,13 @@
...
@@ -5,13 +5,13 @@
<div
class=
"g-card-title"
>
数据趋势
</div>
<div
class=
"g-card-title"
>
数据趋势
</div>
<div
class=
"mid-action"
>
<div
class=
"mid-action"
>
<search-title
:showMore=
"true"
@
search=
"getLineData"
></search-title>
<search-title
:showMore=
"true"
@
search=
"getLineData"
></search-title>
<chart-line
style=
"height: 300px"
:legend=
"legend"
:xData=
"xdata"
:series=
"series"
></chart-line>
<chart-line
style=
"height: 300px
;
"
:legend=
"legend"
:xData=
"xdata"
:series=
"series"
></chart-line>
</div>
</div>
</div>
</div>
<div
class=
"g-card"
>
<div
class=
"g-card"
>
<div
class=
"g-card-title"
>
门店新增客户Top10
</div>
<div
class=
"g-card-title"
>
门店新增客户Top10
</div>
<search-title
@
search=
"getTop10Fn"
></search-title>
<search-title
@
search=
"getTop10Fn"
></search-title>
<chart-bar
style=
"height: 300px"
:xData=
"bar"
:series=
"value"
:legend=
"barLegend"
></chart-bar>
<chart-bar
style=
"height: 300px
;
"
:xData=
"bar"
:series=
"value"
:legend=
"barLegend"
></chart-bar>
</div>
</div>
<div
class=
"g-card"
>
<div
class=
"g-card"
>
<div
class=
"g-card-title"
>
数据报表
</div>
<div
class=
"g-card-title"
>
数据报表
</div>
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
<search-title
:showMore=
"true"
@
search=
"getTableFn"
></search-title>
<search-title
:showMore=
"true"
@
search=
"getTableFn"
></search-title>
<el-button
type=
"primary"
size=
"mini"
@
click=
"exportFn"
v-loading=
"exportLoading"
>
导出Excel
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"exportFn"
v-loading=
"exportLoading"
>
导出Excel
</el-button>
</div>
</div>
<el-table
v-loading=
"loading"
:data=
"tableList"
style=
"width: 100%"
>
<el-table
v-loading=
"loading"
:data=
"tableList"
style=
"width: 100%
;
"
>
<el-table-column
label=
"日期"
align=
"center"
min-width=
"100"
prop=
"createTime"
show-overflow-tooltip
/>
<el-table-column
label=
"日期"
align=
"center"
min-width=
"100"
prop=
"createTime"
show-overflow-tooltip
/>
<el-table-column
label=
"所属地区"
align=
"center"
min-width=
"100"
prop=
"area"
show-overflow-tooltip
/>
<el-table-column
label=
"所属地区"
align=
"center"
min-width=
"100"
prop=
"area"
show-overflow-tooltip
/>
<el-table-column
<el-table-column
...
@@ -27,31 +27,36 @@
...
@@ -27,31 +27,36 @@
align=
"center"
align=
"center"
prop=
"storeName"
prop=
"storeName"
min-width=
"100"
min-width=
"100"
show-overflow-tooltip
></el-table-column>
show-overflow-tooltip
></el-table-column>
<el-table-column
<el-table-column
label=
"点击/扫码总次数"
label=
"点击/扫码总次数"
align=
"center"
align=
"center"
prop=
"totalScannNumber"
prop=
"totalScannNumber"
min-width=
"100"
min-width=
"100"
show-overflow-tooltip
></el-table-column>
show-overflow-tooltip
></el-table-column>
<el-table-column
<el-table-column
label=
"新增客户总数"
label=
"新增客户总数"
align=
"center"
align=
"center"
prop=
"customerTotalNumber"
prop=
"customerTotalNumber"
min-width=
"100"
min-width=
"100"
show-overflow-tooltip
></el-table-column>
show-overflow-tooltip
></el-table-column>
<el-table-column
<el-table-column
label=
"今日点击/扫码总数"
label=
"今日点击/扫码总数"
align=
"center"
align=
"center"
prop=
"tdScannNumber"
prop=
"tdScannNumber"
min-width=
"100"
min-width=
"100"
show-overflow-tooltip
></el-table-column>
show-overflow-tooltip
></el-table-column>
<el-table-column
<el-table-column
label=
"今日新增客户数"
label=
"今日新增客户数"
align=
"center"
align=
"center"
prop=
"tdCustomerNumber"
prop=
"tdCustomerNumber"
min-width=
"100"
min-width=
"100"
show-overflow-tooltip
></el-table-column>
show-overflow-tooltip
></el-table-column>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"180"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"180"
class-name=
"small-padding fixed-width"
>
<template
slot-scope=
"
{ row }">
<template
slot-scope=
"
{ row }">
<el-button
<el-button
...
@@ -60,10 +65,11 @@
...
@@ -60,10 +65,11 @@
$router.push(
{
$router.push(
{
path: 'detail',
path: 'detail',
query: {
query: {
id: row.storeCodeId
,
id: row.storeCodeId
}
,
}
})
})
">
"
>
详情
详情
</el-button>
</el-button>
</
template
>
</
template
>
...
@@ -74,30 +80,31 @@
...
@@ -74,30 +80,31 @@
:total=
"total"
:total=
"total"
:page
.
sync=
"query.pageNum"
:page
.
sync=
"query.pageNum"
:limit
.
sync=
"query.pageSize"
:limit
.
sync=
"query.pageSize"
@
pagination=
"getTableChangeSize()"
/>
@
pagination=
"getTableChangeSize()"
/>
<!-- </div> -->
<!-- </div> -->
</div>
</div>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
ChartBar
from
'@/components/ChartBar.vue'
import
ChartBar
from
'@/components/ChartBar.vue'
import
ChartLine
from
'@/components/ChartLine.vue'
import
ChartLine
from
'@/components/ChartLine.vue'
import
SearchTitle
from
'../components/SearchTitleInStore.vue'
import
SearchTitle
from
'../components/SearchTitleInStore.vue'
import
{
import
{
getGuideCodeTab
,
getGuideCodeTab
,
getLineDataGuideCode
,
getLineDataGuideCode
,
getBarTop10GuideCode
,
getBarTop10GuideCode
,
getTableInGuideCode
,
getTableInGuideCode
,
getTableGuideCodeExport
,
getTableGuideCodeExport
}
from
'@/api/drainageCode/store'
}
from
'@/api/drainageCode/store'
import
{
download
}
from
'@/utils/common'
import
{
download
}
from
'@/utils/common'
export
default
{
export
default
{
name
:
'guide-code-statistics'
,
name
:
'guide-code-statistics'
,
components
:
{
components
:
{
SearchTitle
,
SearchTitle
,
ChartLine
,
ChartLine
,
ChartBar
,
ChartBar
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -111,40 +118,40 @@ export default {
...
@@ -111,40 +118,40 @@ export default {
title
:
'点击/扫码总次数'
,
title
:
'点击/扫码总次数'
,
tips
:
'进入门店导购码页面的总人数(去重)'
,
tips
:
'进入门店导购码页面的总人数(去重)'
,
value
:
0
,
value
:
0
,
noArrow
:
true
,
noArrow
:
true
},
},
{
{
title
:
'新增客户总人数'
,
title
:
'新增客户总人数'
,
tips
:
'成功添加门店导购的客户数(去重)'
,
tips
:
'成功添加门店导购的客户数(去重)'
,
value
:
0
,
value
:
0
,
noArrow
:
true
,
noArrow
:
true
},
},
{
{
title
:
'今日点击/扫码次数'
,
title
:
'今日点击/扫码次数'
,
tips
:
'今日进入门店导购码页面的总人数(去重)'
,
tips
:
'今日进入门店导购码页面的总人数(去重)'
,
value
:
0
,
value
:
0
,
title1
:
'较前日'
,
title1
:
'较前日'
,
value1
:
0
,
value1
:
0
},
},
{
{
title
:
'今日新增客户数'
,
title
:
'今日新增客户数'
,
tips
:
'今日成功添加门店导购的客户数(去重)'
,
tips
:
'今日成功添加门店导购的客户数(去重)'
,
value
:
0
,
value
:
0
,
title1
:
'较前日'
,
title1
:
'较前日'
,
value1
:
0
,
value1
:
0
},
}
],
],
total
:
0
,
total
:
0
,
query
:
{
query
:
{
pageSize
:
10
,
pageSize
:
10
,
pageNum
:
1
,
pageNum
:
1
},
},
tableList
:
[],
tableList
:
[],
loading
:
false
,
loading
:
false
,
searchData
:
{},
searchData
:
{},
bar
:
[],
bar
:
[],
value
:
[],
value
:
[],
tableSearch
:
{},
tableSearch
:
{}
}
}
},
},
methods
:
{
methods
:
{
...
@@ -152,14 +159,22 @@ export default {
...
@@ -152,14 +159,22 @@ export default {
this
.
$confirm
(
'确认导出吗?'
,
'提示'
,
{
this
.
$confirm
(
'确认导出吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
type
:
'warning'
})
})
.
then
(()
=>
{
.
then
(()
=>
{
this
.
exportLoading
=
true
this
.
exportLoading
=
true
return
getTableGuideCodeExport
(
Object
.
assign
({},
this
.
query
,
this
.
tableSearch
))
return
getTableGuideCodeExport
(
Object
.
assign
({},
this
.
query
,
this
.
tableSearch
))
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
download
(
res
.
data
)
if
(
res
!=
null
)
{
let
blob
=
new
Blob
([
res
],
{
type
:
'application/vnd.ms-excel'
})
let
url
=
window
.
URL
.
createObjectURL
(
blob
)
const
link
=
document
.
createElement
(
'a'
)
// 创建a标签
link
.
href
=
url
link
.
download
=
'数据报表.xlsx'
//指定下载文件名
link
.
click
()
URL
.
revokeObjectURL
(
url
)
// 释放内存
}
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
console
.
error
(
error
)
console
.
error
(
error
)
...
@@ -224,23 +239,23 @@ export default {
...
@@ -224,23 +239,23 @@ export default {
this
.
total
=
Number
(
res
.
total
)
this
.
total
=
Number
(
res
.
total
)
this
.
loading
=
false
this
.
loading
=
false
})
})
},
}
},
},
created
()
{
created
()
{
this
.
getTabTotalFn
()
this
.
getTabTotalFn
()
// this.getTop5Fn()
// this.getTop5Fn()
},
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.total-list
{
.total-list
{
.item
{
.item
{
padding
:
10px
;
padding
:
10px
;
background-color
:
#fff
;
background-color
:
#fff
;
}
}
}
}
.data-content
{
.data-content
{
margin-top
:
10px
;
margin-top
:
10px
;
.chart-content
{
.chart-content
{
margin-top
:
10px
;
margin-top
:
10px
;
...
@@ -261,5 +276,5 @@ export default {
...
@@ -261,5 +276,5 @@ export default {
.table-content
{
.table-content
{
margin-top
:
10px
;
margin-top
:
10px
;
}
}
}
}
</
style
>
</
style
>
linkwe-pc/src/views/drainageCode/store/store_code_analyse.vue
View file @
5438b8e
...
@@ -4,12 +4,12 @@
...
@@ -4,12 +4,12 @@
<div
class=
"g-card"
>
<div
class=
"g-card"
>
<div
class=
"g-card-title"
>
数据趋势
</div>
<div
class=
"g-card-title"
>
数据趋势
</div>
<search-title
:showMore=
"true"
@
search=
"getLineData"
></search-title>
<search-title
:showMore=
"true"
@
search=
"getLineData"
></search-title>
<chart-line
style=
"height: 300px"
:legend=
"legend"
:xData=
"xdata"
:series=
"series"
></chart-line>
<chart-line
style=
"height: 300px
;
"
:legend=
"legend"
:xData=
"xdata"
:series=
"series"
></chart-line>
</div>
</div>
<div
class=
"g-card"
>
<div
class=
"g-card"
>
<div
class=
"g-card-title"
>
门店新增客户Top10
</div>
<div
class=
"g-card-title"
>
门店新增客户Top10
</div>
<search-title
@
search=
"getTop10Fn"
></search-title>
<search-title
@
search=
"getTop10Fn"
></search-title>
<chart-bar
style=
"height: 300px"
:xData=
"bar"
:series=
"value"
:legend=
"barLegend"
></chart-bar>
<chart-bar
style=
"height: 300px
;
"
:xData=
"bar"
:series=
"value"
:legend=
"barLegend"
></chart-bar>
</div>
</div>
<div
class=
"g-card"
>
<div
class=
"g-card"
>
<div
class=
"g-card-title"
>
数据报表
</div>
<div
class=
"g-card-title"
>
数据报表
</div>
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<search-title
:showMore=
"true"
@
search=
"getTableFn"
></search-title>
<search-title
:showMore=
"true"
@
search=
"getTableFn"
></search-title>
<el-button
type=
"primary"
size=
"mini"
@
click=
"exportFn"
v-loading=
"exportLoading"
>
导出Excel
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"exportFn"
v-loading=
"exportLoading"
>
导出Excel
</el-button>
</div>
</div>
<el-table
v-loading=
"loading"
:data=
"tableList"
style=
"width: 100%"
>
<el-table
v-loading=
"loading"
:data=
"tableList"
style=
"width: 100%
;
"
>
<el-table-column
label=
"日期"
align=
"center"
min-width=
"100"
prop=
"createTime"
show-overflow-tooltip
/>
<el-table-column
label=
"日期"
align=
"center"
min-width=
"100"
prop=
"createTime"
show-overflow-tooltip
/>
<el-table-column
label=
"所属地区"
align=
"center"
min-width=
"100"
prop=
"area"
show-overflow-tooltip
/>
<el-table-column
label=
"所属地区"
align=
"center"
min-width=
"100"
prop=
"area"
show-overflow-tooltip
/>
<el-table-column
<el-table-column
...
@@ -25,43 +25,50 @@
...
@@ -25,43 +25,50 @@
align=
"center"
align=
"center"
prop=
"storeName"
prop=
"storeName"
min-width=
"100"
min-width=
"100"
show-overflow-tooltip
></el-table-column>
show-overflow-tooltip
></el-table-column>
<el-table-column
<el-table-column
label=
"点击/扫码总次数"
label=
"点击/扫码总次数"
align=
"center"
align=
"center"
prop=
"totalStoreGroupScannNumber"
prop=
"totalStoreGroupScannNumber"
min-width=
"100"
min-width=
"100"
show-overflow-tooltip
></el-table-column>
show-overflow-tooltip
></el-table-column>
<el-table-column
<el-table-column
label=
"进群总客户数"
label=
"进群总客户数"
align=
"center"
align=
"center"
prop=
"totalJoinGroupMemberNumber"
prop=
"totalJoinGroupMemberNumber"
min-width=
"100"
min-width=
"100"
show-overflow-tooltip
></el-table-column>
show-overflow-tooltip
></el-table-column>
<el-table-column
<el-table-column
label=
"退群总客户数"
label=
"退群总客户数"
align=
"center"
align=
"center"
prop=
"totalExitGroupMemberNumber"
prop=
"totalExitGroupMemberNumber"
min-width=
"100"
min-width=
"100"
show-overflow-tooltip
></el-table-column>
show-overflow-tooltip
></el-table-column>
<el-table-column
<el-table-column
label=
"今日点击/扫码总次数"
label=
"今日点击/扫码总次数"
align=
"center"
align=
"center"
prop=
"tdStoreGroupScannNumber"
prop=
"tdStoreGroupScannNumber"
min-width=
"120"
min-width=
"120"
show-overflow-tooltip
></el-table-column>
show-overflow-tooltip
></el-table-column>
<el-table-column
<el-table-column
label=
"今日进群客户数"
label=
"今日进群客户数"
align=
"center"
align=
"center"
prop=
"tdJoinGroupMemberNumber"
prop=
"tdJoinGroupMemberNumber"
min-width=
"100"
min-width=
"100"
show-overflow-tooltip
></el-table-column>
show-overflow-tooltip
></el-table-column>
<el-table-column
<el-table-column
label=
"今日退群客户数"
label=
"今日退群客户数"
align=
"center"
align=
"center"
prop=
"tdExitGroupMemberNumber"
prop=
"tdExitGroupMemberNumber"
min-width=
"100"
min-width=
"100"
show-overflow-tooltip
></el-table-column>
show-overflow-tooltip
></el-table-column>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"180"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"180"
class-name=
"small-padding fixed-width"
>
<template
slot-scope=
"
{ row }">
<template
slot-scope=
"
{ row }">
<el-button
<el-button
...
@@ -70,10 +77,11 @@
...
@@ -70,10 +77,11 @@
$router.push(
{
$router.push(
{
path: 'detail',
path: 'detail',
query: {
query: {
id: row.storeCodeId
,
id: row.storeCodeId
}
,
}
})
})
">
"
>
详情
详情
</el-button>
</el-button>
</
template
>
</
template
>
...
@@ -84,30 +92,31 @@
...
@@ -84,30 +92,31 @@
:total=
"total"
:total=
"total"
:page
.
sync=
"query.pageNum"
:page
.
sync=
"query.pageNum"
:limit
.
sync=
"query.pageSize"
:limit
.
sync=
"query.pageSize"
@
pagination=
"getTableChangeSize()"
/>
@
pagination=
"getTableChangeSize()"
/>
<!-- </div> -->
<!-- </div> -->
</div>
</div>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
ChartBar
from
'@/components/ChartBar.vue'
import
ChartBar
from
'@/components/ChartBar.vue'
import
ChartLine
from
'@/components/ChartLine.vue'
import
ChartLine
from
'@/components/ChartLine.vue'
import
SearchTitle
from
'../components/SearchTitleInStore.vue'
import
SearchTitle
from
'../components/SearchTitleInStore.vue'
import
{
import
{
getStoreCodeTab
,
getStoreCodeTab
,
getLineDataStoreCode
,
getLineDataStoreCode
,
getBarTop10StoreCode
,
getBarTop10StoreCode
,
getTableInStoreCode
,
getTableInStoreCode
,
getTableGuideCodeExport
,
getTableStoreCodeExport
}
from
'@/api/drainageCode/store'
}
from
'@/api/drainageCode/store'
import
{
download
}
from
'@/utils/common'
import
{
download
}
from
'@/utils/common'
export
default
{
export
default
{
name
:
'store-code-statistics'
,
name
:
'store-code-statistics'
,
components
:
{
components
:
{
SearchTitle
,
SearchTitle
,
ChartLine
,
ChartLine
,
ChartBar
,
ChartBar
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -121,53 +130,53 @@ export default {
...
@@ -121,53 +130,53 @@ export default {
title
:
'点击/扫码总次数'
,
title
:
'点击/扫码总次数'
,
tips
:
'进入门店群码页面的总人数(去重)'
,
tips
:
'进入门店群码页面的总人数(去重)'
,
value
:
0
,
value
:
0
,
noArrow
:
true
,
noArrow
:
true
},
},
{
{
title
:
'进群总客户数'
,
title
:
'进群总客户数'
,
tips
:
'成功添加门店客户群的客户数(去重)'
,
tips
:
'成功添加门店客户群的客户数(去重)'
,
value
:
0
,
value
:
0
,
noArrow
:
true
,
noArrow
:
true
},
},
{
{
title
:
'退群总客户数'
,
title
:
'退群总客户数'
,
tips
:
'退出门店客户群的客户数(去重)'
,
tips
:
'退出门店客户群的客户数(去重)'
,
value
:
0
,
value
:
0
,
noArrow
:
true
,
noArrow
:
true
},
},
{
{
title
:
'今日点击/扫码次数'
,
title
:
'今日点击/扫码次数'
,
tips
:
'今日进入门店群码页面的总人数(去重)'
,
tips
:
'今日进入门店群码页面的总人数(去重)'
,
value
:
0
,
value
:
0
,
title1
:
'较前日'
,
title1
:
'较前日'
,
value1
:
0
,
value1
:
0
},
},
{
{
title
:
'今日进群客户数'
,
title
:
'今日进群客户数'
,
tips
:
'今日成功添加门店客户群的客户数(去重)'
,
tips
:
'今日成功添加门店客户群的客户数(去重)'
,
value
:
0
,
value
:
0
,
title1
:
'较前日'
,
title1
:
'较前日'
,
value1
:
0
,
value1
:
0
},
},
{
{
title
:
'今日退群客户数'
,
title
:
'今日退群客户数'
,
tips
:
'今日退出门店客户群的客户数(去重)'
,
tips
:
'今日退出门店客户群的客户数(去重)'
,
value
:
0
,
value
:
0
,
title1
:
'较前日'
,
title1
:
'较前日'
,
value1
:
0
,
value1
:
0
},
}
],
],
total
:
0
,
total
:
0
,
query
:
{
query
:
{
pageSize
:
10
,
pageSize
:
10
,
pageNum
:
1
,
pageNum
:
1
},
},
tableList
:
[],
tableList
:
[],
loading
:
false
,
loading
:
false
,
searchData
:
{},
searchData
:
{},
bar
:
[],
bar
:
[],
value
:
[],
value
:
[],
tableSearch
:
{},
tableSearch
:
{}
}
}
},
},
methods
:
{
methods
:
{
...
@@ -175,14 +184,22 @@ export default {
...
@@ -175,14 +184,22 @@ export default {
this
.
$confirm
(
'确认导出吗?'
,
'提示'
,
{
this
.
$confirm
(
'确认导出吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
type
:
'warning'
})
})
.
then
(()
=>
{
.
then
(()
=>
{
this
.
exportLoading
=
true
this
.
exportLoading
=
true
return
getTableGuid
eCodeExport
(
Object
.
assign
({},
this
.
query
,
this
.
tableSearch
))
return
getTableStor
eCodeExport
(
Object
.
assign
({},
this
.
query
,
this
.
tableSearch
))
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
download
(
res
.
data
)
if
(
res
!=
null
)
{
let
blob
=
new
Blob
([
res
],
{
type
:
'application/vnd.ms-excel'
})
let
url
=
window
.
URL
.
createObjectURL
(
blob
)
const
link
=
document
.
createElement
(
'a'
)
// 创建a标签
link
.
href
=
url
link
.
download
=
'数据报表.xlsx'
//指定下载文件名
link
.
click
()
URL
.
revokeObjectURL
(
url
)
// 释放内存
}
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
console
.
error
(
error
)
console
.
error
(
error
)
...
@@ -252,12 +269,12 @@ export default {
...
@@ -252,12 +269,12 @@ export default {
this
.
total
=
Number
(
res
.
total
)
this
.
total
=
Number
(
res
.
total
)
this
.
loading
=
false
this
.
loading
=
false
})
})
},
}
},
},
created
()
{
created
()
{
this
.
getTabTotalFn
()
this
.
getTabTotalFn
()
// this.getTop5Fn()
// this.getTop5Fn()
},
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
<
style
lang=
"scss"
scoped
></
style
>
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