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
f9cd4881
Commit
f9cd4881
authored
Sep 01, 2023
by
huangjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*
parent
5ae1a6dd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
11 deletions
+27
-11
Navbar.vue
dsk-operate-ui/src/layout/components/Navbar.vue
+1
-1
auth.js
dsk-operate-ui/src/utils/auth.js
+1
-1
index.vue
dsk-operate-ui/src/views/system/user/index.vue
+25
-9
No files found.
dsk-operate-ui/src/layout/components/Navbar.vue
View file @
f9cd4881
...
...
@@ -80,7 +80,7 @@ export default {
})
})
this
.
navbarWidth
=
`calc(100% -
${
this
.
offsetWidth
}
px)`
this
.
$refs
.
mydrodown
.
show
()
//
this.$refs.mydrodown.show()
this
.
getTetant
()
},
methods
:
{
...
...
dsk-operate-ui/src/utils/auth.js
View file @
f9cd4881
import
Cookies
from
'js-cookie'
const
TokenKey
=
'Admin-Token'
const
Tenantid
=
'Tenant
-I
d'
const
Tenantid
=
'Tenant
i
d'
export
function
getToken
()
{
return
Cookies
.
get
(
TokenKey
)
...
...
dsk-operate-ui/src/views/system/user/index.vue
View file @
f9cd4881
...
...
@@ -382,7 +382,7 @@
<
script
>
import
{
listUser
,
getUser
,
delUser
,
addUser
,
updateUser
,
resetUserPwd
,
changeUserStatus
,
deptTreeSelect
}
from
"@/api/system/user"
;
import
{
getToken
}
from
"@/utils/auth"
;
import
{
getToken
,
getTenantid
}
from
"@/utils/auth"
;
import
Treeselect
from
"@riophae/vue-treeselect"
;
import
"@riophae/vue-treeselect/dist/vue-treeselect.css"
;
...
...
@@ -458,7 +458,7 @@ export default {
// 是否更新已经存在的用户数据
updateSupport
:
0
,
// 设置上传的请求头部
headers
:
{
Authorization
:
"Bearer "
+
getToken
()
},
headers
:
{
Authorization
:
"Bearer "
+
getToken
()
,
Tenantid
:
getTenantid
()
},
// 上传的地址
url
:
process
.
env
.
VUE_APP_BASE_API
+
"/system/user/importData"
},
...
...
@@ -664,15 +664,27 @@ export default {
this
.
form
.
userName
=
this
.
form
.
phonenumber
if
(
this
.
form
.
userId
!=
undefined
)
{
updateUser
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
if
(
response
.
code
==
200
){
this
.
$modal
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
}
else
{
this
.
$modal
.
msgError
(
response
.
msg
);
this
.
open
=
false
;
this
.
getList
();
}
});
}
else
{
addUser
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
if
(
response
.
code
==
200
){
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
}
else
{
this
.
$modal
.
msgError
(
response
.
msg
);
this
.
open
=
false
;
this
.
getList
();
}
});
}
}
...
...
@@ -719,7 +731,11 @@ export default {
this
.
upload
.
open
=
false
;
this
.
upload
.
isUploading
=
false
;
this
.
$refs
.
upload
.
clearFiles
();
this
.
$alert
(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>"
+
response
.
msg
+
"</div>"
,
"导入结果"
,
{
dangerouslyUseHTMLString
:
true
});
if
(
response
.
code
==
200
){
this
.
$message
.
success
(
'导入成功!'
)
}
else
{
this
.
$alert
(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>"
+
response
.
msg
+
"</div>"
,
"导入结果"
,
{
dangerouslyUseHTMLString
:
true
});
}
this
.
getList
();
},
// 提交上传文件
...
...
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