Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-cr20g
Project
Project
Details
Activity
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
Administrator
dsk-cr20g
Commits
a5eb5a82
Commit
a5eb5a82
authored
Jun 15, 2023
by
danfuman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
b1917da8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
89 additions
and
8 deletions
+89
-8
index.vue
dsk-operate-ui/src/views/macro/economies/index.vue
+89
-8
No files found.
dsk-operate-ui/src/views/macro/economies/index.vue
View file @
a5eb5a82
...
@@ -7,7 +7,11 @@
...
@@ -7,7 +7,11 @@
<el-tab-pane
label=
"产业结构"
name=
"third"
></el-tab-pane>
<el-tab-pane
label=
"产业结构"
name=
"third"
></el-tab-pane>
<el-tab-pane
label=
"地区经济对比"
name=
"four"
></el-tab-pane>
<el-tab-pane
label=
"地区经济对比"
name=
"four"
></el-tab-pane>
</el-tabs>
</el-tabs>
<div
class=
"location"
><i
class=
"el-icon-location"
></i>
{{
province
}}
</div>
<div
class=
"location"
>
<span><i
class=
"el-icon-location"
></i>
{{
province
}}
</span>
<el-cascader
ref=
"address"
class=
"cascader-region"
popper-class=
'cascader-region-addd'
@
input=
"addressListbtn"
v-model=
"address"
:options=
"addressList"
:props=
"props"
collapse-tags
></el-cascader>
</div>
</div>
</div>
<RegionalEconomy
v-if=
"activeName === 'first' && province"
:dataQuery=
"dataQuery"
></RegionalEconomy>
<RegionalEconomy
v-if=
"activeName === 'first' && province"
:dataQuery=
"dataQuery"
></RegionalEconomy>
<LocalEconomy
v-if=
"activeName === 'second' && province"
:dataQuery=
"dataQuery"
></LocalEconomy>
<LocalEconomy
v-if=
"activeName === 'second' && province"
:dataQuery=
"dataQuery"
></LocalEconomy>
...
@@ -22,6 +26,7 @@
...
@@ -22,6 +26,7 @@
import
Comparison
from
'./component/comparison'
import
Comparison
from
'./component/comparison'
import
IndustrialStructure
from
'./component/industrialStructure'
import
IndustrialStructure
from
'./component/industrialStructure'
import
{
location
}
from
'@/api/macro/macro'
import
{
location
}
from
'@/api/macro/macro'
import
dataRegion
from
'@/assets/json/dataRegion'
export
default
{
export
default
{
name
:
'Economies'
,
name
:
'Economies'
,
components
:
{
components
:
{
...
@@ -34,7 +39,14 @@ export default {
...
@@ -34,7 +39,14 @@ export default {
return
{
return
{
activeName
:
'first'
,
activeName
:
'first'
,
dataQuery
:{},
dataQuery
:{},
province
:
''
province
:
''
,
props
:
{
value
:
'id'
,
label
:
'label'
,
checkStrictly
:
true
},
addressList
:
[],
address
:
''
}
}
},
},
created
()
{
created
()
{
...
@@ -47,11 +59,11 @@ export default {
...
@@ -47,11 +59,11 @@ export default {
this
.
dataQuery
.
province
=
this
.
province
this
.
dataQuery
.
province
=
this
.
province
}
}
})
})
console
.
log
(
this
.
dataQuery
)
if
(
this
.
dataQuery
.
activeName
){
if
(
this
.
dataQuery
.
activeName
){
this
.
activeName
=
this
.
dataQuery
.
activeName
;
this
.
activeName
=
this
.
dataQuery
.
activeName
;
}
}
this
.
dataRegion
()
// let name = sessionStorage.getItem('currentTab')
// let name = sessionStorage.getItem('currentTab')
// if (name != "undefined" && name){
// if (name != "undefined" && name){
// this.activeName = name;
// this.activeName = name;
...
@@ -64,6 +76,64 @@ export default {
...
@@ -64,6 +76,64 @@ export default {
this
.
activeName
=
'four'
this
.
activeName
=
'four'
}
}
// sessionStorage.setItem('currentTab', this.activeName)
// sessionStorage.setItem('currentTab', this.activeName)
},
//地区
async
dataRegion
()
{
// await axios.post("https://files.jiansheku.com/file/json/common/dataRegion.json", {}, {
// headers: {
// 'Content-Type': 'application/json'
// }
// }).then(res => {
// if (res.data.code == 200) {
// console.log(res.data.data)
// }
// })
var
str
=
[];
for
(
let
x
=
0
;
x
<
3
;
x
++
)
{
for
(
let
i
=
0
;
i
<
dataRegion
.
length
;
i
++
)
{
if
(
dataRegion
[
i
].
regionLevel
==
x
+
1
&&
x
+
1
==
1
)
{
str
.
push
({
'id'
:
dataRegion
[
i
].
id
,
"label"
:
dataRegion
[
i
].
regionName
,
"short"
:
dataRegion
[
i
].
short
,
"value"
:
dataRegion
[
i
].
parentId
,
"children"
:
[]
});
}
else
if
(
dataRegion
[
i
].
regionLevel
==
x
+
1
&&
x
+
1
==
2
)
{
for
(
let
j
=
0
;
j
<
str
.
length
;
j
++
)
{
if
(
str
[
j
].
id
==
dataRegion
[
i
].
parentId
)
{
str
[
j
].
children
.
push
({
'id'
:
dataRegion
[
i
].
id
,
"label"
:
dataRegion
[
i
].
regionName
,
"short"
:
dataRegion
[
i
].
short
,
"value"
:
dataRegion
[
i
].
parentId
,
"children"
:
[]
});
}
}
}
else
if
(
dataRegion
[
i
].
regionLevel
==
x
+
1
&&
x
+
1
==
3
)
{
for
(
let
j
=
0
;
j
<
str
.
length
;
j
++
)
{
for
(
let
k
=
0
;
k
<
str
[
j
].
children
.
length
;
k
++
)
{
if
(
str
[
j
].
children
[
k
].
id
==
dataRegion
[
i
].
parentId
)
{
str
[
j
].
children
[
k
].
children
.
push
({
'id'
:
dataRegion
[
i
].
id
,
"label"
:
dataRegion
[
i
].
regionName
,
"short"
:
dataRegion
[
i
].
short
,
"value"
:
dataRegion
[
i
].
parentId
// "children":[]
});
}
}
}
}
}
}
this
.
addressList
=
str
;
},
addressListbtn
()
{
let
nodesObj
=
this
.
$refs
.
address
.
getCheckedNodes
();
console
.
log
(
nodesObj
)
console
.
log
(
this
.
address
)
}
}
}
}
}
}
...
@@ -101,12 +171,23 @@ export default {
...
@@ -101,12 +171,23 @@ export default {
}
}
}
}
.location
{
.location
{
position
:
relative
;
span
{
font-size
:
14px
;
font-size
:
14px
;
cursor
:
pointer
;
color
:
#0081FF
;
color
:
#0081FF
;
i
{
i
{
margin-right
:
6px
;
margin-right
:
6px
;
font-size
:
16px
;
font-size
:
16px
;
}
}
}
}
.cascader-region
{
position
:
absolute
;
left
:
0
;
top
:
-6px
;
opacity
:
0
;
line-height
:
22px
;
}
}
}
}
</
style
>
</
style
>
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