Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-operation-4
Overview
Overview
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
达摩4.0重构
haoban-operation-4
Commits
89674a18
Commit
89674a18
authored
Sep 16, 2020
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 接口联调
parent
fade0c9d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
create-dictionary.vue
src/views/dictionary/create-dictionary.vue
+14
-3
No files found.
src/views/dictionary/create-dictionary.vue
View file @
89674a18
...
...
@@ -20,8 +20,10 @@
<
script
>
import
fetch
from
'@/api/dictionary'
;
import
userApi
from
'@/api'
;
const
{
saveDict
,
dictDetail
}
=
fetch
;
const
{
getUserInfo
}
=
userApi
;
export
default
{
name
:
'CreateDictionary'
,
data
()
{
...
...
@@ -33,7 +35,9 @@ export default {
dictKey
:
''
,
dictDesc
:
''
,
dictContent
:
''
,
dictId
:
''
dictId
:
''
,
optUserId
:
''
,
optUserName
:
''
},
dictRule
:
{
dictName
:
[
{
required
:
true
,
message
:
'请输入字典名称'
,
trigger
:
'blur'
}
],
...
...
@@ -50,9 +54,16 @@ export default {
}
else
{
this
.
bread
.
push
({
name
:
'新建字典'
});;
}
this
.
getUserInfo
();
this
.
$emit
(
'updateBread'
,
this
.
bread
);
},
methods
:
{
getUserInfo
()
{
getUserInfo
().
then
(
res
=>
{
const
{
id
,
realName
}
=
res
.
result
;
Object
.
assign
(
this
.
dictData
,
{
optUserId
:
id
,
optUserName
:
realName
});
});
},
// 编辑字典时获取字典数据
getDictDetail
(
dictId
)
{
dictDetail
({
dictId
}).
then
(
res
=>
{
...
...
@@ -64,8 +75,8 @@ export default {
onSave
()
{
this
.
$refs
.
dictData
.
validate
(
vali
=>
{
if
(
!
vali
)
return
;
const
{
dictName
,
dictKey
,
dictDesc
,
dictContent
,
dictId
}
=
this
.
dictData
;
const
params
=
{
dictName
,
dictKey
,
dictDesc
,
dictContent
};
const
{
dictName
,
dictKey
,
dictDesc
,
dictContent
,
dictId
,
optUserId
,
optUserName
}
=
this
.
dictData
;
const
params
=
{
dictName
,
dictKey
,
dictDesc
,
dictContent
,
optUserId
,
optUserName
};
this
.
loading
=
true
;
if
(
dictId
)
{
Object
.
assign
(
params
,
{
dictId
});
...
...
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