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
cfc044ce
Commit
cfc044ce
authored
Apr 30, 2021
by
yangkaiyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除加的修改密码
parent
947c73c3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
210 deletions
+0
-210
Index.vue
src/views/map/components/user/Index.vue
+0
-16
ResetPassword.vue
src/views/map/components/user/ResetPassword.vue
+0
-193
user.js
src/vuex/modules/user.js
+0
-1
No files found.
src/views/map/components/user/Index.vue
View file @
cfc044ce
...
@@ -34,22 +34,6 @@
...
@@ -34,22 +34,6 @@
><hr
style=
"color: blue; border-style: dotted; color: #ccc"
><hr
style=
"color: blue; border-style: dotted; color: #ccc"
/></el-col>
/></el-col>
</el-row>
</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-row>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<el-button
<el-button
...
...
src/views/map/components/user/ResetPassword.vue
deleted
100644 → 0
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 @
cfc044ce
...
@@ -50,7 +50,6 @@ export const moduleUser = {
...
@@ -50,7 +50,6 @@ export const moduleUser = {
commandDialog
:
false
,
//命令下发
commandDialog
:
false
,
//命令下发
feedbackDialog
:
false
,
//意见反馈
feedbackDialog
:
false
,
//意见反馈
statisticsStopsDialog
:
false
,
//停留统计
statisticsStopsDialog
:
false
,
//停留统计
resetPassword
:
false
,
//修改密码
videoVisible
:
false
,
//工具栏视频看板
videoVisible
:
false
,
//工具栏视频看板
videoPlayBackDialog
:
false
,
//视频回放对话框
videoPlayBackDialog
:
false
,
//视频回放对话框
intercomDialog
:
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