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 0ebbcf2a
authored
Jun 30, 2022
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交代码
1 parent
3c378b32
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
20 deletions
src/api/modules/common.js
src/components/ViewControl.vue
src/api/modules/common.js
0 → 100644
View file @
0ebbcf2
import
Request
from
'../request'
var
request
=
new
Request
()
// window.$HTTP
export
default
{
/**获取品牌名称*/
getBrandList
()
{
return
request
.
get
(
'brand/getBrandName'
,
{
req
:
{
corporateGroupName
:
'集团1'
,
queryTime
:
'2022-06-23'
}
})
}
}
src/components/ViewControl.vue
View file @
0ebbcf2
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
:class=
"['options-item flex',
{'active':i.active}]"
:class=
"['options-item flex',
{'active':i.active}]"
:key="index"
:key="index"
@click="chooseBrand({i,index})"
@click="chooseBrand({i,index})"
>
{{
i
.
n
ame
}}
</div>
>
{{
i
.
brandN
ame
}}
</div>
</
template
>
</
template
>
</div>
</div>
</div>
</div>
...
@@ -43,19 +43,6 @@
...
@@ -43,19 +43,6 @@
</template>
</template>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
'text/ecmascript-6'
>
let
test
=
[{
name
:
'东风本田'
},
{
name
:
'别克'
},
{
name
:
'凯迪拉克'
},
{
name
:
'MINI'
},
{
name
:
'荣威'
},
{
name
:
'上海大众'
},
{
name
:
'沃尔沃'
},
{
name
:
'一汽丰田'
},
{
name
:
'平行进口'
},
{
name
:
'奥迪'
},
{
name
:
'广汽本田'
},
{
name
:
'比亚迪'
},
{
name
:
'奔驰'
},]
export
default
{
export
default
{
name
:
'ViewControl'
,
name
:
'ViewControl'
,
data
()
{
data
()
{
...
@@ -69,8 +56,18 @@ export default {
...
@@ -69,8 +56,18 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
test
.
map
(
e
=>
e
.
active
=
false
)
this
.
api
.
common
.
getBrandList
().
then
(({
code
,
data
})
=>
{
this
.
brands
=
test
let
brands
=
[]
if
(
code
==
0
)
{
data
.
dataList
.
map
(
e
=>
{
brands
.
push
({
brandName
:
e
,
active
:
false
})
})
}
this
.
brands
=
brands
})
},
},
methods
:
{
methods
:
{
change
(
index
,
item
)
{
change
(
index
,
item
)
{
...
@@ -80,7 +77,7 @@ export default {
...
@@ -80,7 +77,7 @@ export default {
this
.
tab
=
[
'广汇集团'
,
'品牌概览'
]
this
.
tab
=
[
'广汇集团'
,
'品牌概览'
]
}
else
{
}
else
{
if
(
!
item
)
return
if
(
!
item
)
return
this
.
tab
[
1
]
=
item
.
n
ame
this
.
tab
[
1
]
=
item
.
brandN
ame
}
}
this
.
tabIndex
=
index
this
.
tabIndex
=
index
this
.
emit
()
this
.
emit
()
...
@@ -97,7 +94,7 @@ export default {
...
@@ -97,7 +94,7 @@ export default {
reportType
:
reportIndex
==
0
?
1
:
0
//月表0,日表1
reportType
:
reportIndex
==
0
?
1
:
0
//月表0,日表1
}
}
if
(
tabIndex
==
1
)
brands
.
map
(
e
=>
{
if
(
tabIndex
==
1
)
brands
.
map
(
e
=>
{
if
(
e
.
active
)
params
.
brand
=
e
if
(
e
.
active
)
params
.
brand
Name
=
e
.
brandNam
e
})
})
this
.
$store
.
state
.
app
.
reportParams
=
params
this
.
$store
.
state
.
app
.
reportParams
=
params
},
},
...
@@ -166,7 +163,7 @@ export default {
...
@@ -166,7 +163,7 @@ export default {
top
:
4.1vh
;
top
:
4.1vh
;
right
:
0
;
right
:
0
;
width
:
50%
;
width
:
50%
;
height
:
30vh
;
max-
height
:
30vh
;
background
:
#383737
;
background
:
#383737
;
border
:
1px
solid
rgba
(
96
,
98
,
102
,
1
);
border
:
1px
solid
rgba
(
96
,
98
,
102
,
1
);
box-shadow
:
0px
3px
2px
1px
rgba
(
0
,
0
,
0
,
0.5
);
box-shadow
:
0px
3px
2px
1px
rgba
(
0
,
0
,
0
,
0.5
);
...
@@ -177,7 +174,7 @@ export default {
...
@@ -177,7 +174,7 @@ export default {
&:hover
{
&:hover
{
display
:
block
;
display
:
block
;
}
}
&
:hover
.brand
{
&
:hover
.brand
{
background-color
:
#096
;
background-color
:
#096
;
}
}
.options-item
{
.options-item
{
...
...
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