Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
Project
Project
Details
Activity
Releases
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
周远喜
mes-ui
Commits
53c49730
Commit
53c49730
authored
Sep 30, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
index
parent
e887cd17
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
index.vue
pages/system/config/index.vue
+1
-1
index.js
store/index.js
+10
-3
No files found.
pages/system/config/index.vue
View file @
53c49730
...
...
@@ -149,7 +149,7 @@ export default {
store
,
params
})
{
await
store
.
dispatch
(
'loadSiteConfig'
)
// 加载
数据字典
await
store
.
dispatch
(
'loadSiteConfig'
)
// 加载
默认数据
},
mounted
()
{},
methods
:
{
...
...
store/index.js
View file @
53c49730
...
...
@@ -13,6 +13,7 @@ export const state = () => ({
siteConfig
:
{},
defaultConfig
:
{},
configId
:
null
,
configSaveStatu
:
0
,
})
export
const
getters
=
{
dictionaryByKey
:
(
state
)
=>
(
key
)
=>
{
...
...
@@ -65,6 +66,9 @@ export const mutations = {
},
setConfigId
(
state
,
id
)
{
state
.
configId
=
id
;
},
setConfigSaveStatu
(
state
,
val
)
{
state
.
configSaveStatu
=
val
;
}
}
...
...
@@ -104,11 +108,12 @@ export const actions = {
})
{
let
params
=
{
pageSize
:
2
,
sortBy
:
"id"
,
conditions
:
[{
"fieldName"
:
"component"
,
"fieldValue"
:
"defaultConfig,tenantConfig_"
+
util
.
cookies
.
get
(
'tenantCode'
),
"conditionalType"
:
"In"
,
}
,
]
}]
}
let
{
result
...
...
@@ -139,17 +144,19 @@ export const actions = {
note
:
"配置信息"
}
await
Api
.
post
(
`
${
systemUrl
}
/config/update`
,
params
);
}
else
{
config
.
tenantCode
=
util
.
cookies
.
get
(
'tenantCode'
)
let
configStr
=
JSON
.
stringify
(
config
);
let
params
=
{
page
:
"config"
,
component
:
"
defaultConfig
"
+
config
.
tenantCode
,
component
:
"
tenantConfig_
"
+
config
.
tenantCode
,
key
:
config
.
tenantCode
,
content
:
configStr
,
note
:
"配置信息"
}
await
Api
.
post
(
`
${
systemUrl
}
/config/create`
,
params
);
await
Api
.
post
(
`
${
systemUrl
}
/config/create`
,
params
);
}
}
}
...
...
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