Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
gh
/
data-view
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 3d1be4e6
authored
Jun 28, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
c9ab2b56
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
12 deletions
src/api/index.js
src/api/modules/sales.js
src/views/salesData/flow.vue
src/api/index.js
View file @
3d1be4e
...
...
@@ -3,10 +3,16 @@
* @version: 1.0.0
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors:
limin
* @LastEditTime: 202
1-06-17 18:23:27
* @LastEditors:
huyue
* @LastEditTime: 202
2-06-28 15:12:48
*/
import
wwbenchApi
from
'./wwbenchApi'
export
{
wwbenchApi
,
}
\ No newline at end of file
const
modulesFiles
=
require
.
context
(
'./modules'
,
true
,
/
\.
js$/
)
const
modules
=
modulesFiles
.
keys
().
reduce
((
modules
,
modulePath
)
=>
{
const
moduleName
=
modulePath
.
replace
(
/^
\.\/(
.*
)\.\w
+$/
,
'$1'
)
const
value
=
modulesFiles
(
modulePath
)
console
.
log
(
moduleName
)
modules
[
moduleName
]
=
value
.
default
return
modules
},
{})
console
.
log
(
modules
)
export
default
modules
src/api/modules/sales.js
0 → 100644
View file @
3d1be4e
/*
* @Description: 获取品牌销售相关信息
* @Author: huyue
* @Date: 2022-06-28 14:58:30
* @LastEditors: huyue
* @LastEditTime: 2022-06-28 16:28:23
*/
import
Request
from
'../request'
const
request
=
new
Request
()
const
getSales
=
params
=>
{
return
request
.
get
(
'brand/sale'
,
params
)
}
export
default
{
getSales
}
src/views/salesData/flow.vue
View file @
3d1be4e
...
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-06-23 15:05:21
* @LastEditors: huyue
* @LastEditTime: 2022-06-2
7 18:30:09
* @LastEditTime: 2022-06-2
8 16:26:00
-->
<
template
>
<div
class=
"flow-box"
>
...
...
@@ -73,8 +73,26 @@ export default {
},
mounted
()
{
this
.
getChart
()
this
.
init
()
},
methods
:
{
init
()
{
const
params
=
{
req
:
{
corporateGroupName
:
'集团1'
,
queryItem
:
'infosource'
,
queryTime
:
'2022-06-23'
,
queryType
:
0
}
}
this
.
api
.
sales
.
getSales
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
code
===
'0'
)
{
const
{
data
:
data
}
=
res
console
.
log
(
JSON
.
parse
(
data
.
data
[
0
].
typeNum
))
}
})
},
getChart
()
{
var
chartDom
=
document
.
getElementById
(
'flow'
)
var
myChart
=
echarts
.
init
(
chartDom
)
...
...
@@ -147,14 +165,14 @@ export default {
padding
:
0
8px
1vh
;
box-sizing
:
border-box
;
.flow-left
{
padding-bottom
:
1
vh
;
padding-bottom
:
0.9
vh
;
width
:
50%
;
}
.flow-right
{
flex
:
1
;
color
:
#fff
;
font-size
:
10px
;
padding
:
1vh
8px
1
vh
20px
;
padding
:
1vh
0
0.9
vh
20px
;
.ranking-title
{
display
:
flex
;
width
:
100%
;
...
...
@@ -168,7 +186,7 @@ export default {
width
:
50%
;
text-align
:
center
;
background-color
:
#353535
;
line-height
:
2
0px
;
line-height
:
2
.4vh
;
}
}
.ranking-content
{
...
...
@@ -178,8 +196,8 @@ export default {
display
:
flex
;
width
:
100%
;
align-items
:
center
;
line-height
:
2.
2
vh
;
height
:
2.
2
vh
;
line-height
:
2.
1
vh
;
height
:
2.
1
vh
;
.ranking-name
{
width
:
calc
(
100%
-
33%
-
28px
);
}
...
...
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