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
5fc7b594
Commit
5fc7b594
authored
Aug 21, 2023
by
huangjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*
parent
d2dad6d9
Changes
23
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
975 additions
and
69 deletions
+975
-69
config.js
dsk-operate-ui/src/api/system/config.js
+13
-0
dept.js
dsk-operate-ui/src/api/system/dept.js
+1
-1
type.js
dsk-operate-ui/src/api/system/dict/type.js
+1
-1
oss.js
dsk-operate-ui/src/api/system/oss.js
+27
-0
ossConfig.js
dsk-operate-ui/src/api/system/ossConfig.js
+58
-0
user.js
dsk-operate-ui/src/store/modules/user.js
+6
-6
login.vue
dsk-operate-ui/src/views/login.vue
+3
-3
index.vue
dsk-operate-ui/src/views/system/config/index.vue
+2
-1
data.vue
dsk-operate-ui/src/views/system/dict/data.vue
+1
-1
index.vue
dsk-operate-ui/src/views/system/dict/index.vue
+3
-2
index.vue
dsk-operate-ui/src/views/system/menu/index.vue
+4
-4
index.vue
dsk-operate-ui/src/views/system/notice/index.vue
+1
-1
config.vue
dsk-operate-ui/src/views/system/oss/config.vue
+402
-0
index.vue
dsk-operate-ui/src/views/system/oss/index.vue
+413
-0
authUser.vue
dsk-operate-ui/src/views/system/role/authUser.vue
+1
-1
index.vue
dsk-operate-ui/src/views/system/role/index.vue
+8
-6
authRole.vue
dsk-operate-ui/src/views/system/user/authRole.vue
+4
-4
index.vue
dsk-operate-ui/src/views/system/user/index.vue
+9
-8
index.vue
dsk-operate-ui/src/views/system/user/profile/index.vue
+3
-3
resetPwd.vue
dsk-operate-ui/src/views/system/user/profile/resetPwd.vue
+1
-10
userAvatar.vue
dsk-operate-ui/src/views/system/user/profile/userAvatar.vue
+10
-11
userInfo.vue
dsk-operate-ui/src/views/system/user/profile/userInfo.vue
+1
-1
vue.config.js
dsk-operate-ui/vue.config.js
+3
-5
No files found.
dsk-operate-ui/src/api/system/config.js
View file @
5fc7b594
...
@@ -43,6 +43,18 @@ export function updateConfig(data) {
...
@@ -43,6 +43,18 @@ export function updateConfig(data) {
})
})
}
}
// 修改参数配置
export
function
updateConfigByKey
(
key
,
value
)
{
return
request
({
url
:
'/system/config/updateByKey'
,
method
:
'put'
,
data
:
{
configKey
:
key
,
configValue
:
value
}
})
}
// 删除参数配置
// 删除参数配置
export
function
delConfig
(
configId
)
{
export
function
delConfig
(
configId
)
{
return
request
({
return
request
({
...
@@ -58,3 +70,4 @@ export function refreshCache() {
...
@@ -58,3 +70,4 @@ export function refreshCache() {
method
:
'delete'
method
:
'delete'
})
})
}
}
dsk-operate-ui/src/api/system/dept.js
View file @
5fc7b594
dsk-operate-ui/src/api/system/dict/type.js
View file @
5fc7b594
dsk-operate-ui/src/api/system/oss.js
0 → 100644
View file @
5fc7b594
import
request
from
'@/utils/request'
// 查询OSS对象存储列表
export
function
listOss
(
query
)
{
return
request
({
url
:
'/system/oss/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询OSS对象基于id串
export
function
listByIds
(
ossId
)
{
return
request
({
url
:
'/system/oss/listByIds/'
+
ossId
,
method
:
'get'
})
}
// 删除OSS对象存储
export
function
delOss
(
ossId
)
{
return
request
({
url
:
'/system/oss/'
+
ossId
,
method
:
'delete'
})
}
dsk-operate-ui/src/api/system/ossConfig.js
0 → 100644
View file @
5fc7b594
import
request
from
'@/utils/request'
// 查询对象存储配置列表
export
function
listOssConfig
(
query
)
{
return
request
({
url
:
'/system/oss/config/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询对象存储配置详细
export
function
getOssConfig
(
ossConfigId
)
{
return
request
({
url
:
'/system/oss/config/'
+
ossConfigId
,
method
:
'get'
})
}
// 新增对象存储配置
export
function
addOssConfig
(
data
)
{
return
request
({
url
:
'/system/oss/config'
,
method
:
'post'
,
data
:
data
})
}
// 修改对象存储配置
export
function
updateOssConfig
(
data
)
{
return
request
({
url
:
'/system/oss/config'
,
method
:
'put'
,
data
:
data
})
}
// 删除对象存储配置
export
function
delOssConfig
(
ossConfigId
)
{
return
request
({
url
:
'/system/oss/config/'
+
ossConfigId
,
method
:
'delete'
})
}
// 对象存储状态修改
export
function
changeOssConfigStatus
(
ossConfigId
,
status
,
configKey
)
{
const
data
=
{
ossConfigId
,
status
,
configKey
}
return
request
({
url
:
'/system/oss/config/changeStatus'
,
method
:
'put'
,
data
:
data
})
}
dsk-operate-ui/src/store/modules/user.js
View file @
5fc7b594
...
@@ -41,8 +41,8 @@ const user = {
...
@@ -41,8 +41,8 @@ const user = {
const
uuid
=
userInfo
.
uuid
const
uuid
=
userInfo
.
uuid
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
login
(
username
,
password
,
code
,
uuid
).
then
(
res
=>
{
login
(
username
,
password
,
code
,
uuid
).
then
(
res
=>
{
setToken
(
res
.
token
)
setToken
(
res
.
data
.
token
)
commit
(
'SET_TOKEN'
,
res
.
token
)
commit
(
'SET_TOKEN'
,
res
.
data
.
token
)
resolve
()
resolve
()
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
reject
(
error
)
reject
(
error
)
...
@@ -54,11 +54,11 @@ const user = {
...
@@ -54,11 +54,11 @@ const user = {
GetInfo
({
commit
,
state
})
{
GetInfo
({
commit
,
state
})
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
getInfo
().
then
(
res
=>
{
getInfo
().
then
(
res
=>
{
const
user
=
res
.
user
const
user
=
res
.
data
.
user
const
avatar
=
user
.
avatar
?
process
.
env
.
VUE_APP_BASE_API
+
user
.
avatar
:
''
;
const
avatar
=
user
.
avatar
?
process
.
env
.
VUE_APP_BASE_API
+
user
.
avatar
:
''
;
if
(
res
.
roles
&&
res
.
roles
.
length
>
0
)
{
// 验证返回的roles是否是一个非空数组
if
(
res
.
data
.
roles
&&
res
.
data
.
roles
.
length
>
0
)
{
// 验证返回的roles是否是一个非空数组
commit
(
'SET_ROLES'
,
res
.
roles
)
commit
(
'SET_ROLES'
,
res
.
data
.
roles
)
commit
(
'SET_PERMISSIONS'
,
res
.
permissions
)
commit
(
'SET_PERMISSIONS'
,
res
.
data
.
permissions
)
}
else
{
}
else
{
commit
(
'SET_ROLES'
,
[
'ROLE_DEFAULT'
])
commit
(
'SET_ROLES'
,
[
'ROLE_DEFAULT'
])
}
}
...
...
dsk-operate-ui/src/views/login.vue
View file @
5fc7b594
...
@@ -112,10 +112,10 @@ export default {
...
@@ -112,10 +112,10 @@ export default {
methods
:
{
methods
:
{
getCode
()
{
getCode
()
{
getCodeImg
().
then
(
res
=>
{
getCodeImg
().
then
(
res
=>
{
this
.
captchaEnabled
=
res
.
captchaEnabled
===
undefined
?
true
:
res
.
captchaEnabled
;
this
.
captchaEnabled
=
res
.
data
.
captchaEnabled
===
undefined
?
true
:
res
.
data
.
captchaEnabled
;
if
(
this
.
captchaEnabled
)
{
if
(
this
.
captchaEnabled
)
{
this
.
codeUrl
=
"data:image/gif;base64,"
+
res
.
img
;
this
.
codeUrl
=
"data:image/gif;base64,"
+
res
.
data
.
img
;
this
.
loginForm
.
uuid
=
res
.
uuid
;
this
.
loginForm
.
uuid
=
res
.
data
.
uuid
;
}
}
});
});
},
},
...
...
dsk-operate-ui/src/views/system/config/index.vue
View file @
5fc7b594
...
@@ -33,11 +33,12 @@
...
@@ -33,11 +33,12 @@
<el-date-picker
<el-date-picker
v-model=
"dateRange"
v-model=
"dateRange"
style=
"width: 240px"
style=
"width: 240px"
value-format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd
HH:mm:ss
"
type=
"daterange"
type=
"daterange"
range-separator=
"-"
range-separator=
"-"
start-placeholder=
"开始日期"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
end-placeholder=
"结束日期"
:default-time=
"['00:00:00', '23:59:59']"
></el-date-picker>
></el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
...
...
dsk-operate-ui/src/views/system/dict/data.vue
View file @
5fc7b594
dsk-operate-ui/src/views/system/dict/index.vue
View file @
5fc7b594
...
@@ -38,11 +38,12 @@
...
@@ -38,11 +38,12 @@
<el-date-picker
<el-date-picker
v-model=
"dateRange"
v-model=
"dateRange"
style=
"width: 240px"
style=
"width: 240px"
value-format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd
HH:mm:ss
"
type=
"daterange"
type=
"daterange"
range-separator=
"-"
range-separator=
"-"
start-placeholder=
"开始日期"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
end-placeholder=
"结束日期"
:default-time=
"['00:00:00', '23:59:59']"
></el-date-picker>
></el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
...
...
dsk-operate-ui/src/views/system/menu/index.vue
View file @
5fc7b594
...
@@ -135,7 +135,7 @@
...
@@ -135,7 +135,7 @@
@
show=
"$refs['iconSelect'].reset()"
@
show=
"$refs['iconSelect'].reset()"
>
>
<IconSelect
ref=
"iconSelect"
@
selected=
"selected"
:active-icon=
"form.icon"
/>
<IconSelect
ref=
"iconSelect"
@
selected=
"selected"
:active-icon=
"form.icon"
/>
<el-input
slot=
"reference"
v-model=
"form.icon"
placeholder=
"点击选择图标"
>
<el-input
slot=
"reference"
v-model=
"form.icon"
placeholder=
"点击选择图标"
readonly
>
<svg-icon
<svg-icon
v-if=
"form.icon"
v-if=
"form.icon"
slot=
"prefix"
slot=
"prefix"
...
@@ -197,7 +197,7 @@
...
@@ -197,7 +197,7 @@
<el-form-item
prop=
"perms"
>
<el-form-item
prop=
"perms"
>
<el-input
v-model=
"form.perms"
placeholder=
"请输入权限标识"
maxlength=
"100"
/>
<el-input
v-model=
"form.perms"
placeholder=
"请输入权限标识"
maxlength=
"100"
/>
<span
slot=
"label"
>
<span
slot=
"label"
>
<el-tooltip
content=
"控制器中定义的权限字符,如:@
PreAuthorize(`@ss.hasPermi('system:user:list')`
)"
placement=
"top"
>
<el-tooltip
content=
"控制器中定义的权限字符,如:@
SaCheckPermission('system:user:list'
)"
placement=
"top"
>
<i
class=
"el-icon-question"
></i>
<i
class=
"el-icon-question"
></i>
</el-tooltip>
</el-tooltip>
权限字符
权限字符
...
@@ -205,8 +205,8 @@
...
@@ -205,8 +205,8 @@
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
v-if=
"form.menuType == 'C'"
>
<el-col
:span=
"12"
v-if=
"form.menuType == 'C'"
>
<el-form-item
prop=
"query"
>
<el-form-item
prop=
"query
Param
"
>
<el-input
v-model=
"form.query"
placeholder=
"请输入路由参数"
maxlength=
"255"
/>
<el-input
v-model=
"form.query
Param
"
placeholder=
"请输入路由参数"
maxlength=
"255"
/>
<span
slot=
"label"
>
<span
slot=
"label"
>
<el-tooltip
content=
'访问路由的默认传递参数,如:`{"id": 1, "name": "ry"}`'
placement=
"top"
>
<el-tooltip
content=
'访问路由的默认传递参数,如:`{"id": 1, "name": "ry"}`'
placement=
"top"
>
<i
class=
"el-icon-question"
></i>
<i
class=
"el-icon-question"
></i>
...
...
dsk-operate-ui/src/views/system/notice/index.vue
View file @
5fc7b594
dsk-operate-ui/src/views/system/oss/config.vue
0 → 100644
View file @
5fc7b594
This diff is collapsed.
Click to expand it.
dsk-operate-ui/src/views/system/oss/index.vue
0 → 100644
View file @
5fc7b594
This diff is collapsed.
Click to expand it.
dsk-operate-ui/src/views/system/role/authUser.vue
View file @
5fc7b594
dsk-operate-ui/src/views/system/role/index.vue
View file @
5fc7b594
...
@@ -38,11 +38,12 @@
...
@@ -38,11 +38,12 @@
<el-date-picker
<el-date-picker
v-model=
"dateRange"
v-model=
"dateRange"
style=
"width: 240px"
style=
"width: 240px"
value-format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd
HH:mm:ss
"
type=
"daterange"
type=
"daterange"
range-separator=
"-"
range-separator=
"-"
start-placeholder=
"开始日期"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
end-placeholder=
"结束日期"
:default-time=
"['00:00:00', '23:59:59']"
></el-date-picker>
></el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
...
@@ -382,14 +383,14 @@ export default {
...
@@ -382,14 +383,14 @@ export default {
/** 根据角色ID查询菜单树结构 */
/** 根据角色ID查询菜单树结构 */
getRoleMenuTreeselect
(
roleId
)
{
getRoleMenuTreeselect
(
roleId
)
{
return
roleMenuTreeselect
(
roleId
).
then
(
response
=>
{
return
roleMenuTreeselect
(
roleId
).
then
(
response
=>
{
this
.
menuOptions
=
response
.
menus
;
this
.
menuOptions
=
response
.
data
.
menus
;
return
response
;
return
response
;
});
});
},
},
/** 根据角色ID查询部门树结构 */
/** 根据角色ID查询部门树结构 */
getDeptTree
(
roleId
)
{
getDeptTree
(
roleId
)
{
return
deptTreeSelect
(
roleId
).
then
(
response
=>
{
return
deptTreeSelect
(
roleId
).
then
(
response
=>
{
this
.
deptOptions
=
response
.
depts
;
this
.
deptOptions
=
response
.
d
ata
.
d
epts
;
return
response
;
return
response
;
});
});
},
},
...
@@ -514,7 +515,7 @@ export default {
...
@@ -514,7 +515,7 @@ export default {
this
.
open
=
true
;
this
.
open
=
true
;
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
roleMenu
.
then
(
res
=>
{
roleMenu
.
then
(
res
=>
{
let
checkedKeys
=
res
.
checkedKeys
let
checkedKeys
=
res
.
data
.
checkedKeys
checkedKeys
.
forEach
((
v
)
=>
{
checkedKeys
.
forEach
((
v
)
=>
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
menu
.
setChecked
(
v
,
true
,
false
);
this
.
$refs
.
menu
.
setChecked
(
v
,
true
,
false
);
...
@@ -540,7 +541,7 @@ export default {
...
@@ -540,7 +541,7 @@ export default {
this
.
openDataScope
=
true
;
this
.
openDataScope
=
true
;
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
deptTreeSelect
.
then
(
res
=>
{
deptTreeSelect
.
then
(
res
=>
{
this
.
$refs
.
dept
.
setCheckedKeys
(
res
.
checkedKeys
);
this
.
$refs
.
dept
.
setCheckedKeys
(
res
.
data
.
checkedKeys
);
});
});
});
});
this
.
title
=
"分配数据权限"
;
this
.
title
=
"分配数据权限"
;
...
@@ -603,3 +604,4 @@ export default {
...
@@ -603,3 +604,4 @@ export default {
}
}
};
};
</
script
>
</
script
>
dsk-operate-ui/src/views/system/user/authRole.vue
View file @
5fc7b594
...
@@ -71,8 +71,8 @@ export default {
...
@@ -71,8 +71,8 @@ export default {
if
(
userId
)
{
if
(
userId
)
{
this
.
loading
=
true
;
this
.
loading
=
true
;
getAuthRole
(
userId
).
then
((
response
)
=>
{
getAuthRole
(
userId
).
then
((
response
)
=>
{
this
.
form
=
response
.
user
;
this
.
form
=
response
.
data
.
user
;
this
.
roles
=
response
.
roles
;
this
.
roles
=
response
.
data
.
roles
;
this
.
total
=
this
.
roles
.
length
;
this
.
total
=
this
.
roles
.
length
;
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
roles
.
forEach
((
row
)
=>
{
this
.
roles
.
forEach
((
row
)
=>
{
...
...
dsk-operate-ui/src/views/system/user/index.vue
View file @
5fc7b594
...
@@ -67,11 +67,12 @@
...
@@ -67,11 +67,12 @@
<el-date-picker
<el-date-picker
v-model=
"dateRange"
v-model=
"dateRange"
style=
"width: 240px"
style=
"width: 240px"
value-format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd
HH:mm:ss
"
type=
"daterange"
type=
"daterange"
range-separator=
"-"
range-separator=
"-"
start-placeholder=
"开始日期"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
end-placeholder=
"结束日期"
:default-time=
"['00:00:00', '23:59:59']"
></el-date-picker>
></el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
...
@@ -562,8 +563,8 @@ export default {
...
@@ -562,8 +563,8 @@ export default {
handleAdd
()
{
handleAdd
()
{
this
.
reset
();
this
.
reset
();
getUser
().
then
(
response
=>
{
getUser
().
then
(
response
=>
{
this
.
postOptions
=
response
.
posts
;
this
.
postOptions
=
response
.
data
.
posts
;
this
.
roleOptions
=
response
.
roles
;
this
.
roleOptions
=
response
.
data
.
roles
;
this
.
open
=
true
;
this
.
open
=
true
;
this
.
title
=
"添加用户"
;
this
.
title
=
"添加用户"
;
this
.
form
.
password
=
this
.
initPassword
;
this
.
form
.
password
=
this
.
initPassword
;
...
@@ -574,11 +575,11 @@ export default {
...
@@ -574,11 +575,11 @@ export default {
this
.
reset
();
this
.
reset
();
const
userId
=
row
.
userId
||
this
.
ids
;
const
userId
=
row
.
userId
||
this
.
ids
;
getUser
(
userId
).
then
(
response
=>
{
getUser
(
userId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
form
=
response
.
data
.
user
;
this
.
postOptions
=
response
.
posts
;
this
.
postOptions
=
response
.
data
.
posts
;
this
.
roleOptions
=
response
.
roles
;
this
.
roleOptions
=
response
.
data
.
roles
;
this
.
$set
(
this
.
form
,
"postIds"
,
response
.
postIds
);
this
.
$set
(
this
.
form
,
"postIds"
,
response
.
data
.
postIds
);
this
.
$set
(
this
.
form
,
"roleIds"
,
response
.
roleIds
);
this
.
$set
(
this
.
form
,
"roleIds"
,
response
.
data
.
roleIds
);
this
.
open
=
true
;
this
.
open
=
true
;
this
.
title
=
"修改用户"
;
this
.
title
=
"修改用户"
;
this
.
form
.
password
=
""
;
this
.
form
.
password
=
""
;
...
...
dsk-operate-ui/src/views/system/user/profile/index.vue
View file @
5fc7b594
...
@@ -81,9 +81,9 @@ export default {
...
@@ -81,9 +81,9 @@ export default {
methods
:
{
methods
:
{
getUser
()
{
getUser
()
{
getUserProfile
().
then
(
response
=>
{
getUserProfile
().
then
(
response
=>
{
this
.
user
=
response
.
data
;
this
.
user
=
response
.
data
.
user
;
this
.
roleGroup
=
response
.
roleGroup
;
this
.
roleGroup
=
response
.
data
.
roleGroup
;
this
.
postGroup
=
response
.
postGroup
;
this
.
postGroup
=
response
.
data
.
postGroup
;
});
});
}
}
}
}
...
...
dsk-operate-ui/src/views/system/user/profile/resetPwd.vue
View file @
5fc7b594
...
@@ -18,8 +18,6 @@
...
@@ -18,8 +18,6 @@
<
script
>
<
script
>
import
{
updateUserPwd
}
from
"@/api/system/user"
;
import
{
updateUserPwd
}
from
"@/api/system/user"
;
import
{
removeToken
}
from
"@/utils/auth"
;
import
store
from
"@/store"
;
export
default
{
export
default
{
data
()
{
data
()
{
...
@@ -57,14 +55,7 @@ export default {
...
@@ -57,14 +55,7 @@ export default {
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
updateUserPwd
(
this
.
user
.
oldPassword
,
this
.
user
.
newPassword
).
then
(
response
=>
{
updateUserPwd
(
this
.
user
.
oldPassword
,
this
.
user
.
newPassword
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
)
this
.
$modal
.
msgSuccess
(
"修改成功"
);
store
.
commit
(
'SET_TOKEN'
,
''
)
store
.
commit
(
'SET_ROLES'
,
[])
store
.
commit
(
'SET_PERMISSIONS'
,
[])
removeToken
()
setTimeout
(
function
()
{
location
.
href
=
'/index'
},
2000
)
});
});
}
}
});
});
...
...
dsk-operate-ui/src/views/system/user/profile/userAvatar.vue
View file @
5fc7b594
<
template
>
<
template
>
<div>
<div>
<div
class=
"user-info-head"
@
click=
"editCropper()"
>
<div
class=
"user-info-head"
@
click=
"editCropper()"
><img
v-bind:src=
"options.img"
title=
"点击上传头像"
class=
"img-circle img-lg"
/></div>
<img
v-bind:src=
"options.img"
title=
"点击上传头像"
class=
"img-circle img-lg"
v-if=
"options.img"
/>
<span
class=
"userInfo-avatar"
v-else
>
{{
options
.
name
&&
options
.
name
.
slice
(
0
,
1
).
toUpperCase
()
}}
</span>
</div>
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"800px"
append-to-body
@
opened=
"modalOpened"
@
close=
"closeDialog"
>
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"800px"
append-to-body
@
opened=
"modalOpened"
@
close=
"closeDialog"
>
<el-row>
<el-row>
<el-col
:xs=
"24"
:md=
"12"
:style=
"
{height: '350px'}">
<el-col
:xs=
"24"
:md=
"12"
:style=
"
{height: '350px'}">
...
@@ -78,13 +75,13 @@ export default {
...
@@ -78,13 +75,13 @@ export default {
// 弹出层标题
// 弹出层标题
title
:
"修改头像"
,
title
:
"修改头像"
,
options
:
{
options
:
{
name
:
store
.
getters
.
name
,
//用户名称
img
:
store
.
getters
.
avatar
,
//裁剪图片的地址
img
:
store
.
getters
.
avatar
,
//裁剪图片的地址
autoCrop
:
true
,
// 是否默认生成截图框
autoCrop
:
true
,
// 是否默认生成截图框
autoCropWidth
:
200
,
// 默认生成截图框宽度
autoCropWidth
:
200
,
// 默认生成截图框宽度
autoCropHeight
:
200
,
// 默认生成截图框高度
autoCropHeight
:
200
,
// 默认生成截图框高度
fixedBox
:
true
,
// 固定截图框大小 不允许改变
fixedBox
:
true
,
// 固定截图框大小 不允许改变
outputType
:
"png"
// 默认生成截图为PNG格式
outputType
:
"png"
,
// 默认生成截图为PNG格式
filename
:
''
},
},
previews
:
{},
previews
:
{},
resizeHandler
:
null
resizeHandler
:
null
...
@@ -93,7 +90,7 @@ export default {
...
@@ -93,7 +90,7 @@ export default {
methods
:
{
methods
:
{
// 编辑头像
// 编辑头像
editCropper
()
{
editCropper
()
{
//
this.open = true;
this
.
open
=
true
;
},
},
// 打开弹出层结束时的回调
// 打开弹出层结束时的回调
modalOpened
()
{
modalOpened
()
{
...
@@ -134,6 +131,7 @@ export default {
...
@@ -134,6 +131,7 @@ export default {
reader
.
readAsDataURL
(
file
);
reader
.
readAsDataURL
(
file
);
reader
.
onload
=
()
=>
{
reader
.
onload
=
()
=>
{
this
.
options
.
img
=
reader
.
result
;
this
.
options
.
img
=
reader
.
result
;
this
.
options
.
filename
=
file
.
name
;
};
};
}
}
},
},
...
@@ -141,10 +139,11 @@ export default {
...
@@ -141,10 +139,11 @@ export default {
uploadImg
()
{
uploadImg
()
{
this
.
$refs
.
cropper
.
getCropBlob
(
data
=>
{
this
.
$refs
.
cropper
.
getCropBlob
(
data
=>
{
let
formData
=
new
FormData
();
let
formData
=
new
FormData
();
formData
.
append
(
"avatarfile"
,
data
);
console
.
log
(
this
.
options
.
filename
)
formData
.
append
(
"avatarfile"
,
data
,
this
.
options
.
filename
);
uploadAvatar
(
formData
).
then
(
response
=>
{
uploadAvatar
(
formData
).
then
(
response
=>
{
this
.
open
=
false
;
this
.
open
=
false
;
this
.
options
.
img
=
process
.
env
.
VUE_APP_BASE_API
+
response
.
imgUrl
;
this
.
options
.
img
=
response
.
data
.
imgUrl
;
store
.
commit
(
'SET_AVATAR'
,
this
.
options
.
img
);
store
.
commit
(
'SET_AVATAR'
,
this
.
options
.
img
);
this
.
$modal
.
msgSuccess
(
"修改成功"
);
this
.
$modal
.
msgSuccess
(
"修改成功"
);
this
.
visible
=
false
;
this
.
visible
=
false
;
...
@@ -171,7 +170,7 @@ export default {
...
@@ -171,7 +170,7 @@ export default {
height
:
120px
;
height
:
120px
;
}
}
/*
.user-info-head:hover:after {
.user-info-head
:hover:after
{
content
:
'+'
;
content
:
'+'
;
position
:
absolute
;
position
:
absolute
;
left
:
0
;
left
:
0
;
...
@@ -187,5 +186,5 @@ export default {
...
@@ -187,5 +186,5 @@ export default {
cursor
:
pointer
;
cursor
:
pointer
;
line-height
:
110px
;
line-height
:
110px
;
border-radius
:
50%
;
border-radius
:
50%
;
}
*/
}
</
style
>
</
style
>
dsk-operate-ui/src/views/system/user/profile/userInfo.vue
View file @
5fc7b594
dsk-operate-ui/vue.config.js
View file @
5fc7b594
...
@@ -34,11 +34,9 @@ module.exports = {
...
@@ -34,11 +34,9 @@ module.exports = {
proxy
:
{
proxy
:
{
// detail: https://cli.vuejs.org/config/#devserver-proxy
// detail: https://cli.vuejs.org/config/#devserver-proxy
[
process
.
env
.
VUE_APP_BASE_API
]:
{
[
process
.
env
.
VUE_APP_BASE_API
]:
{
target
:
`http://47.104.91.229:9099/prod-api`
,
// target: `http://47.104.91.229:9099/prod-api`,
// target: `http://122.9.160.122:9011`,
target
:
`http://192.168.0.165:8080`
,
//施
// target: `http://192.168.60.126:9011`,
// target: `http://139.9.157.49:9099`,//测试
// target: `http://192.168.60.126:9098`,
// target: `http://192.168.0.165:8080`,
changeOrigin
:
true
,
changeOrigin
:
true
,
pathRewrite
:
{
pathRewrite
:
{
[
'^'
+
process
.
env
.
VUE_APP_BASE_API
]:
''
[
'^'
+
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