Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
project-prototype
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
耿迪迪
project-prototype
Commits
918cdd60
Commit
918cdd60
authored
Nov 24, 2021
by
耿迪迪
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://111.61.77.35:15/gengdidi/project-prototype
parents
aa2d07a7
ef560896
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
4 deletions
+21
-4
package.json
projectname-web/package.json
+3
-2
user.js
projectname-web/src/store/modules/user.js
+9
-1
index.vue
projectname-web/src/views/index.vue
+4
-0
index.vue
projectname-web/src/views/system/setting/index.vue
+4
-0
vue.config.js
projectname-web/vue.config.js
+1
-1
No files found.
projectname-web/package.json
View file @
918cdd60
...
...
@@ -36,7 +36,7 @@
"@riophae/vue-treeselect"
:
"0.4.0"
,
"axios"
:
"0.21.0"
,
"clipboard"
:
"2.0.6"
,
"core-js"
:
"
3.8
.1"
,
"core-js"
:
"
^3.19
.1"
,
"echarts"
:
"4.9.0"
,
"element-ui"
:
"2.15.0"
,
"file-saver"
:
"2.0.4"
,
...
...
@@ -80,5 +80,6 @@
"browserslist"
:
[
"> 1%"
,
"last 2 versions"
]
],
"main"
:
"index.js"
}
projectname-web/src/store/modules/user.js
View file @
918cdd60
...
...
@@ -7,7 +7,8 @@ const user = {
name
:
''
,
avatar
:
''
,
roles
:
[],
permissions
:
[]
permissions
:
[],
systemSetting
:{},
},
mutations
:
{
...
...
@@ -25,6 +26,9 @@ const user = {
},
SET_PERMISSIONS
:
(
state
,
permissions
)
=>
{
state
.
permissions
=
permissions
},
SET_SYSTEMSETTING
:
(
state
,
systemSetting
)
=>
{
state
.
systemSetting
=
systemSetting
}
},
...
...
@@ -52,6 +56,7 @@ const user = {
getInfo
().
then
(
res
=>
{
const
user
=
res
.
user
const
avatar
=
user
.
avatar
==
""
?
require
(
"@/assets/images/profile.jpg"
)
:
process
.
env
.
VUE_APP_BASE_API
+
user
.
avatar
;
console
.
log
(
"getInfo"
)
if
(
res
.
roles
&&
res
.
roles
.
length
>
0
)
{
// 验证返回的roles是否是一个非空数组
commit
(
'SET_ROLES'
,
res
.
roles
)
commit
(
'SET_PERMISSIONS'
,
res
.
permissions
)
...
...
@@ -60,6 +65,9 @@ const user = {
}
commit
(
'SET_NAME'
,
user
.
userName
)
commit
(
'SET_AVATAR'
,
avatar
)
// 默认配置
commit
(
'SET_SYSTEMSETTING'
,
res
.
systemSetting
)
console
.
log
(
res
.
systemSetting
)
resolve
(
res
)
}).
catch
(
error
=>
{
reject
(
error
)
...
...
projectname-web/src/views/index.vue
View file @
918cdd60
...
...
@@ -569,6 +569,10 @@ export default {
version
:
"3.5.0"
,
};
},
created
(){
// 默认配置
console
.
log
(
this
.
$store
.
state
.
settings
)
},
methods
:
{
goTarget
(
href
)
{
window
.
open
(
href
,
"_blank"
);
...
...
projectname-web/src/views/system/setting/index.vue
View file @
918cdd60
...
...
@@ -297,6 +297,7 @@ export default {
return
delSetting
(
systemIds
);
}).
then
(()
=>
{
this
.
getList
();
this
.
refreshSystemSetting
();
this
.
msgSuccess
(
"删除成功"
);
//刷新运行参数缓存
this
.
refreshSystemSetting
();
...
...
@@ -322,6 +323,9 @@ export default {
console
.
log
(
response
,
"fdsfsdfdsfd"
)
if
(
response
.
code
!=
200
){
this
.
message
(
"运行参数缓存刷新失败,请重新刷新缓存!"
);
}
else
{
this
.
$store
.
commit
(
"SET_SYSTEMSETTING"
,
response
.
data
)
console
.
log
(
this
.
$store
.
state
.
user
.
systemSetting
)
}
});
}
...
...
projectname-web/vue.config.js
View file @
918cdd60
...
...
@@ -34,7 +34,7 @@ module.exports = {
proxy
:
{
// detail: https://cli.vuejs.org/config/#devserver-proxy
[
process
.
env
.
VUE_APP_BASE_API
]:
{
target
:
`http://
localhost
:8080`
,
target
:
`http://
192.168.2.28
:8080`
,
changeOrigin
:
true
,
pathRewrite
:
{
[
'^'
+
process
.
env
.
VUE_APP_BASE_API
]:
''
...
...
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