Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
任超
/
js.CadastralSystem
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
058c15db
authored
2020-10-22 09:43:35 +0800
by
杨威
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
处理字典数据
1 parent
a0143fcf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
src/App.vue
src/store/index.js
src/App.vue
View file @
058c15d
...
...
@@ -5,14 +5,32 @@
</
template
>
<
script
>
import
{
getDdicByMC
}
from
"../src/api/common"
;
export
default
{
mounted
()
{
window
.
addEventListener
(
"unload"
,
this
.
saveState
);
this
.
getDic
();
},
methods
:
{
saveState
()
{
sessionStorage
.
setItem
(
"state"
,
JSON
.
stringify
(
this
.
$store
.
state
));
},
//请求字典数据
getDic
()
{
debugger
let
s
=
this
.
$store
.
state
;
s
.
zjzlList
=
s
.
zjzlList
.
length
==
0
?
this
.
getDicData
(
"证件种类"
)
:
s
.
zjzlList
;
s
.
gjList
=
s
.
gjList
.
length
==
0
?
this
.
getDicData
(
"国家和地区"
)
:
s
.
gjList
;
s
.
ssList
=
s
.
ssList
.
length
==
0
?
this
.
getDicData
(
"省市"
)
:
s
.
ssList
;
s
.
qlrlxList
=
s
.
qlrlxList
.
length
==
0
?
this
.
getDicData
(
"权利人类型"
)
:
s
.
qlrlxList
;
s
.
xbList
=
s
.
xbList
.
length
==
0
?
this
.
getDicData
(
"性别"
)
:
s
.
xbList
;
s
.
sshyList
=
s
.
sshyList
.
length
==
0
?
this
.
getDicData
(
"国民经济行业分类代码"
)
:
s
.
sshyList
;
},
getDicData
(
name
)
{
getDdicByMC
(
name
).
then
((
res
)
=>
{
return
res
.
result
;
});
},
},
};
</
script
>
...
...
src/store/index.js
View file @
058c15d
...
...
@@ -13,6 +13,12 @@ const store = new Vuex.Store({
xzqList
:
[],
djqList
:
[],
djzqList
:
[],
zjzlList
:[],
gjList
:[],
ssList
:[],
qlrlxList
:[],
xbList
:[],
sshyList
:[],
//创建自然幢时需要用到的临时存储信息
zrzbsm
:
''
,
xmmc
:
''
,
...
...
Please
register
or
sign in
to post a comment