Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
lbs-gpsbd-web
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
yangkaiyi
lbs-gpsbd-web
Commits
947c73c3
Commit
947c73c3
authored
Apr 30, 2021
by
yangkaiyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代理、预留修改密码
parent
ece4f47f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
220 additions
and
10 deletions
+220
-10
dev.env.js
config/dev.env.js
+1
-1
index.js
config/index.js
+9
-9
Index.vue
src/views/map/components/user/Index.vue
+16
-0
ResetPassword.vue
src/views/map/components/user/ResetPassword.vue
+193
-0
user.js
src/vuex/modules/user.js
+1
-0
No files found.
config/dev.env.js
View file @
947c73c3
...
...
@@ -7,7 +7,7 @@ module.exports = merge(prodEnv, {
// BASE_API: '"https://demoapi.gpsbd.com"',
// WS_API: '"wss://demoapi.gpsbd.com"',
// WS_MEDIA:'"wss://media.gpsbd.com"'
BASE_API
:
'"
http://47.101.203.155:82
"'
,
BASE_API
:
'"
/proxy
"'
,
WS_API
:
'"ws://47.101.203.155:8082"'
,
WS_MEDIA
:
'"ws://47.101.203.155:8082"'
});
config/index.js
View file @
947c73c3
...
...
@@ -10,18 +10,18 @@ module.exports = {
assetsSubDirectory
:
"static"
,
assetsPublicPath
:
"/"
,
proxyTable
:
{
// "/localhost
": {
// target: "47.101.203.15
5",
//
changeOrigin: true,
//
pathRewrite: {
// // a: "localhost
"
//
}
//
}
"/proxy
"
:
{
target
:
"http://47.101.203.155:808
5"
,
changeOrigin
:
true
,
pathRewrite
:
{
"^/proxy"
:
"
"
}
}
},
// Various Dev Server settings
host
:
"
0.0.0.0
"
,
// can be overwritten by process.env.HOST
port
:
8
2
,
// can be overwritten by process.env.PORT, if port is in use, a free one will be determined
host
:
"
localhost
"
,
// can be overwritten by process.env.HOST
port
:
8
888
,
// can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser
:
true
,
errorOverlay
:
true
,
notifyOnErrors
:
false
,
...
...
src/views/map/components/user/Index.vue
View file @
947c73c3
...
...
@@ -34,6 +34,22 @@
><hr
style=
"color: blue; border-style: dotted; color: #ccc"
/></el-col>
</el-row>
<el-row>
<el-col
:span=
"24"
>
<el-button
type=
"primary"
size=
"small"
icon=
"fa fa-bars"
style=
"width: 100%"
@
click
.
native=
"
$store.dispatch('setVisblesFlag', [
{ key: 'resetPassword', value: true },
])
"
>
<font-awesome-icon
icon=
"lock"
/>
密码重置
</el-button
>
</el-col
><br
/><br
/>
</el-row>
<el-row>
<el-col
:span=
"24"
>
<el-button
...
...
src/views/map/components/user/ResetPassword.vue
0 → 100644
View file @
947c73c3
<
template
>
<el-dialog
:title=
"$t('map.user.group.title')"
width=
"40%"
:visible=
"$store.state.user.visibles.resetPassword"
:before-close=
"handleClose"
:lock-scroll=
"false"
>
<el-row
class=
"toolbar"
>
<el-col
:span=
"24"
>
<el-tag>
账号:
{{
userInfo
.
account
}}
</el-tag>
角色:
<el-tag
type=
"success"
v-for=
"(role, index) in roles"
:key=
"index"
>
{{
role
}}
</el-tag
>
<el-tag
type=
"warning"
>
电话:
{{
userInfo
.
phone
}}
</el-tag>
</el-col>
</el-row>
<el-tabs
v-model=
"activeName"
v-loading=
"loading"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"用户信息"
name=
"info"
>
<el-form
ref=
"form"
:model=
"userInfo"
label-width=
"80px"
style=
"margin: 20px; width: 40%; min-width: 400px"
>
<el-form-item
label=
"账号"
>
<el-input
v-model=
"userInfo.account"
disabled
></el-input>
</el-form-item>
<el-form-item
label=
"修改密码"
>
<el-switch
v-model=
"updatePass"
active-color=
"#13ce66"
inactive-color=
"#ff4949"
>
</el-switch>
</el-form-item>
<el-form-item
label=
"密码"
v-if=
"updatePass"
>
<el-input
v-model=
"userInfo.password"
></el-input>
</el-form-item>
<el-form-item
label=
"确认密码"
v-if=
"updatePass"
>
<el-input
v-model=
"userInfo.password2"
></el-input>
</el-form-item>
<el-form-item
label=
"电话"
>
<el-input
v-model=
"userInfo.phone"
></el-input>
</el-form-item>
<el-form-item
label=
"邮箱"
>
<el-input
v-model=
"userInfo.email"
></el-input>
</el-form-item>
<el-form-item
label=
"角色"
>
<el-checkbox-group
v-model=
"userInfo.roleIds"
>
<el-checkbox
v-for=
"(role, index) in $store.state.common.roles"
:key=
"index"
:label=
"role.id"
>
{{
role
.
name
}}
</el-checkbox
>
<!--
<el-radio
:label=
"2"
>
企业用户
</el-radio>
<el-radio
:label=
"5"
>
经销商
</el-radio>
<el-radio
:label=
"6"
disabled
>
运营商
</el-radio>
-->
</el-checkbox-group>
</el-form-item>
<el-form-item
label=
"注册时间"
>
<el-input
v-model=
"userInfo.time"
:disabled=
"true"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"save"
>
保存
</el-button>
<el-button
type=
"danger"
@
click=
"hanldDelete"
>
删除
</el-button>
</el-form-item>
</el-form>
</el-tab-pane>
<el-tab-pane
label=
"设备"
name=
"devices"
>
<TabDevices
:visible=
"currentTab == 'devices'"
:user=
"userInfo"
></TabDevices>
</el-tab-pane>
<el-tab-pane
label=
"下级用户"
name=
"users"
>
<TabUsers
:visible=
"currentTab == 'users'"
:user=
"userInfo"
></TabUsers>
</el-tab-pane>
</el-tabs>
</el-dialog>
</
template
>
<
script
>
import
{
getNodeUserInfo
,
updateUser
,
deleteUser
}
from
"@/api/api"
;
import
util
from
"@/utils/util"
;
export
default
{
data
()
{
return
{
updatePass
:
false
,
activeName
:
"info"
,
loading
:
false
,
userInfo
:
{
roleIds
:
[],
},
currentTab
:
""
,
// roles:{
// 1:'个人用户',
// 2:'企业用户',
// 5:'经销商'
// }
};
},
methods
:
{
handleClick
(
tab
,
event
)
{
this
.
currentTab
=
tab
.
name
;
},
getNodeUserInfo
(
id
)
{
getNodeUserInfo
(
id
).
then
((
data
)
=>
{
this
.
userInfo
=
data
;
this
.
userInfo
.
time
=
util
.
dateFormat
(
data
.
time
,
"YYYY-MM-DD HH:mm:ss"
);
});
},
save
()
{
this
.
$confirm
(
"确认是否更新用户的信息?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(()
=>
{
console
.
log
(
this
.
userInfo
);
//this.userInfo.roleIds = [this.userInfo.roleId]
//delete this.userInfo.roleId;
updateUser
(
this
.
userInfo
).
then
((
data
)
=>
{
this
.
$message
({
type
:
"success"
,
message
:
"更新成功!"
,
});
});
})
.
catch
(()
=>
{});
},
hanldDelete
()
{
this
.
$confirm
(
"确认是否删除此用户?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(()
=>
{
deleteUser
(
this
.
userInfo
.
id
).
then
((
data
)
=>
{
this
.
$message
({
type
:
"success"
,
message
:
"删除成功!"
,
});
window
.
location
.
reload
();
});
})
.
catch
(()
=>
{});
},
},
watch
:
{
"$store.state.distributor.selectUserId"
:
function
(
e
)
{
this
.
getNodeUserInfo
(
e
);
},
},
mounted
()
{
if
(
this
.
$store
.
state
.
distributor
.
selectUserId
==
0
)
{
this
.
$router
.
push
({
path
:
"/distributor/index"
});
}
else
{
this
.
getNodeUserInfo
(
this
.
$store
.
state
.
distributor
.
selectUserId
);
}
},
computed
:
{
roles
:
function
()
{
var
arr
=
[];
var
selfRoles
=
this
.
userInfo
.
roleIds
;
var
allRoles
=
this
.
$store
.
state
.
common
.
roles
;
for
(
var
i
=
0
;
i
<
selfRoles
.
length
;
i
++
)
{
for
(
var
j
=
0
;
j
<
allRoles
.
length
;
j
++
)
{
if
(
selfRoles
[
i
]
==
allRoles
[
j
].
id
)
{
arr
.
push
(
allRoles
[
j
].
name
);
break
;
}
}
}
return
arr
;
},
},
components
:
{
TabDevices
,
TabUsers
,
},
};
</
script
>
<
style
scoped
>
.userinfo-container
{
margin
:
30px
;
}
</
style
>
src/vuex/modules/user.js
View file @
947c73c3
...
...
@@ -50,6 +50,7 @@ export const moduleUser = {
commandDialog
:
false
,
//命令下发
feedbackDialog
:
false
,
//意见反馈
statisticsStopsDialog
:
false
,
//停留统计
resetPassword
:
false
,
//修改密码
videoVisible
:
false
,
//工具栏视频看板
videoPlayBackDialog
:
false
,
//视频回放对话框
intercomDialog
:
false
,
//对讲机对话框
...
...
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