Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
intel_promotion_manage
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
intel_promotion_manage
Commits
fe00ad4f
Commit
fe00ad4f
authored
Jun 11, 2024
by
刘怀志
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
banner暂存
parent
0ea16ebb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
9 deletions
+29
-9
dashboard.js
src/api/dashboard.js
+10
-0
dashboard.js
src/views/dashboard/index/dashboard.js
+19
-9
No files found.
src/api/dashboard.js
0 → 100644
View file @
fe00ad4f
import
request
from
'@/utils/request'
import
Qs
from
'qs'
export
function
statistics
(
query
)
{
return
request
({
url
:
'/sysunit/statistics'
,
method
:
'get'
,
params
:
query
})
}
src/views/dashboard/index/dashboard.js
View file @
fe00ad4f
...
...
@@ -17,6 +17,7 @@ import 'echarts/lib/component/dataset'
import
'echarts/map/js/world'
import
'zrender/lib/svg/svg'
import
{
listAllShop
}
from
'@/api/sysUnit'
import
{
statistics
}
from
'@/api/dashboard'
export
default
{
name
:
'dashboard'
,
...
...
@@ -222,9 +223,11 @@ export default {
'deptId'
])
},
created
()
{
async
created
()
{
this
.
fetchData
()
this
.
getDeptList
()
await
this
.
getDeptList
()
this
.
roleFunction
()
this
.
getTableData
()
},
mounted
()
{
// 绑定echart图表跟随窗口大小自动缩放
...
...
@@ -238,13 +241,15 @@ export default {
},
methods
:
{
getDeptList
()
{
listAllShop
().
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
deptList
=
res
.
data
this
.
company
=
this
.
deptList
[
0
].
businessId
this
.
companyName
=
this
.
deptList
[
0
].
unitName
this
.
roleFunction
()
}
return
new
Promise
(
resolve
=>
{
listAllShop
().
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
deptList
=
res
.
data
this
.
company
=
this
.
deptList
[
0
].
businessId
this
.
companyName
=
this
.
deptList
[
0
].
unitName
resolve
()
}
})
})
},
fetchData
()
{
...
...
@@ -260,6 +265,11 @@ export default {
}
})
}
},
getTableData
()
{
statistics
({
businessId
:
this
.
company
}).
then
(
res
=>
{
console
.
log
(
'getTableData'
,
res
)
})
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment