Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
saas-manage
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chehuidong
saas-manage
Commits
c8c52399
Commit
c8c52399
authored
Feb 07, 2023
by
chehuidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
0d1fb809
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
197 additions
and
335 deletions
+197
-335
src/common/style/index.scss
+13
-0
src/views/home/HomeHeader.vue
+1
-5
src/views/home/navMenu.vue
+7
-6
src/views/system/users.vue
+176
-324
No files found.
src/common/style/index.scss
View file @
c8c52399
...
...
@@ -61,3 +61,15 @@
.el-dialog__body
{
padding
:
10px
;
}
.pagination
{
text-align
:
center
;
padding-top
:
10px
;
}
.icon-view
{
font-size
:
18px
;
cursor
:
pointer
;
}
.icon-view
+
.icon-view
{
margin-left
:
10px
;
}
\ No newline at end of file
src/views/home/HomeHeader.vue
View file @
c8c52399
...
...
@@ -6,14 +6,10 @@
<
script
>
import
pageTags
from
'./pageTags.vue'
import
{
mapState
}
from
'vuex'
export
default
{
components
:
{
pageTags
},
name
:
'HomeHeader'
,
computed
:
{
...
mapState
([
'userInfo'
]),
},
computed
:
{},
methods
:
{},
}
</
script
>
...
...
src/views/home/navMenu.vue
View file @
c8c52399
...
...
@@ -14,9 +14,9 @@
@
click
.
native=
"onClickMenus"
active-text-color=
"#ffd04b"
>
<template
v-for=
"
nav
in menuList"
>
<template
v-for=
"
(nav,index)
in menuList"
>
<el-menu-item
:key=
"
nav.id
"
:key=
"
index
"
v-if=
"nav.children.length === 0"
:index=
"nav.index"
>
...
...
@@ -25,15 +25,15 @@
<span
class=
"label"
>
{{
nav
.
label
}}
</span>
</
template
>
</el-menu-item>
<el-submenu
:key=
"
nav.id
"
v-else
:index=
"nav.index"
>
<el-submenu
:key=
"
index
"
v-else
:index=
"nav.index"
>
<
template
slot=
"title"
>
<i
:class=
"nav.icon"
></i>
<span
class=
"label"
>
{{
nav
.
label
}}
</span>
</
template
>
<el-menu-item
:index=
"subs.index"
v-for=
"
subs
in nav.children"
:key=
"
subs.id
"
v-for=
"
(subs, index)
in nav.children"
:key=
"
index
"
>
<
template
slot=
"title"
>
<i
:class=
"subs.icon"
></i>
...
...
@@ -59,7 +59,7 @@
</div>
</template>
<
script
>
import
{
mapGetters
}
from
'vuex'
import
{
mapGetters
,
mapState
}
from
'vuex'
import
{
logout
}
from
'@/common/api/login'
import
{
setToken
,
setUser
}
from
'@/utils/auth'
export
default
{
...
...
@@ -121,6 +121,7 @@ export default {
},
computed
:
{
...
mapGetters
(
'tags'
,
[
'currentTag'
]),
...
mapState
([
'userInfo'
]),
},
watch
:
{
currentTag
(
v
)
{
...
...
src/views/system/users.vue
View file @
c8c52399
<
template
>
<layout
:isleftshow=
"false"
class=
"row"
:rightStyle=
"
{ padding: '10px 10px 0' }"
:leftStyle="{ width: '60%', paddingTop: '10px' }"
>
<template
slot=
"page_left"
>
<el-form
:inline=
"true"
size=
"mini"
@
submit
.
native
.
prevent
@
keyup
.
enter
.
capture=
"search"
>
<el-form-item
label=
"用户名"
>
<el-input
style=
"width: 120px"
clearable
v-model=
"searchForm.employeeName"
placeholder=
"员工姓名/工号/登录名"
></el-input>
</el-form-item>
<el-form-item
label=
"功能角色"
>
<el-select
style=
"width: 120px"
clearable
filterable
v-model=
"searchForm.functionRoleId"
placeholder=
"请选择"
>
<el-option
v-for=
"item in funcRoleList"
:key=
"item.value"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"数据角色"
>
<el-select
style=
"width: 120px"
clearable
filterable
v-model=
"searchForm.dataRoleId"
placeholder=
"请选择"
>
<el-option
v-for=
"item in dataRoleList"
:key=
"item.value"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"启用状态"
>
<el-select
clearable
:class=
"
{
green: searchForm.enable === '1',
red: searchForm.enable === '0',
}"
v-model="searchForm.enable"
style="width: 120px"
placeholder="请选择"
>
<el-option
label=
"启用"
value=
"1"
></el-option>
<el-option
label=
"禁用"
value=
"0"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"平台"
>
<el-select
style=
"width: 120px"
v-model=
"searchForm.platForm"
clearable
placeholder=
"请选择"
filterable
>
<el-option
v-for=
"(item, index) in platforms"
:key=
"index"
:label=
"item.value"
:value=
"item.key"
></el-option>
</el-select>
</el-form-item>
<div
class=
"wraper"
>
<el-form
:inline=
"true"
size=
"mini"
@
submit
.
native
.
prevent
@
keyup
.
enter
.
capture=
"search"
>
<el-form-item
label=
"用户名"
>
<el-input
style=
"width: 120px"
clearable
v-model=
"searchForm.employeeName"
placeholder=
"用户名/姓名"
></el-input>
</el-form-item>
<el-form-item
label=
"功能角色"
>
<el-select
style=
"width: 120px"
clearable
filterable
v-model=
"searchForm.functionRoleId"
placeholder=
"请选择"
>
<el-option
v-for=
"item in funcRoleList"
:key=
"item.value"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"数据角色"
>
<el-select
style=
"width: 120px"
clearable
filterable
v-model=
"searchForm.dataRoleId"
placeholder=
"请选择"
>
<el-option
v-for=
"item in dataRoleList"
:key=
"item.value"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"启用状态"
>
<el-select
clearable
:class=
"
{
green: searchForm.enable === '1',
red: searchForm.enable === '0',
}"
v-model="searchForm.enable"
style="width: 120px"
placeholder="请选择"
>
<el-option
label=
"启用"
value=
"1"
></el-option>
<el-option
label=
"禁用"
value=
"0"
></el-option>
</el-select>
</el-form-item>
<el-form-item
v-if=
"roleShow('query_system_users')"
>
<el-button
native-type=
"submit"
type=
"primary"
@
click=
"search()"
icon=
"el-icon-search"
>
查询
</el-button>
</el-form-item>
<el-form-item
v-if=
"roleShow('add_system_users')"
>
<el-button
type=
"success"
@
click=
"addDialog(1)"
>
新增
</el-button
>
</el-form-item>
<el-form-item
v-if=
"roleShow('delete_system_users')"
<el-form-item>
<el-button
native-type=
"submit"
type=
"primary"
@
click=
"search()"
icon=
"el-icon-search"
>
<el-button
type=
"danger"
@
click=
"deleteSection()"
>
删除
</el-button
>
</el-form-item>
<!--
<el-form-item>
查询
</el-button>
</el-form-item>
<el-form-item>
<el-button
type=
"success"
@
click=
"addDialog(1)"
>
新增
</el-button
>
</el-form-item>
<el-form-item>
<el-button
type=
"danger"
@
click=
"deleteSection()"
>
删除
</el-button
>
</el-form-item>
<!--
<el-form-item>
<el-button
type=
"info"
@
click=
"addDialog(2)"
>
重置密码
</el-button>
</el-form-item>
-->
</el-form>
<div
class=
"table_wrap"
>
<table-vue
:sourceData=
"sourceData"
ref=
"multipleTable"
:selection=
"true"
:tableColumns=
"usersTableColumns"
@
currentChange=
"currentTabFn"
:rowClassName=
"cellClass"
@
selectionChange=
"selectionChange"
></table-vue>
</div>
<pagination
:setValue=
"setpaginationOptions"
:options=
"paginationOptions"
/>
</
template
>
<
template
slot=
"page_right"
>
<div
style=
"height: 37px"
></div>
</el-form>
<div
class=
"table_wrap"
>
<table-vue
:sourceData=
"details"
:tableColumns=
"tableColumns"
:sourceData=
"sourceData"
ref=
"multipleTable"
:selection=
"true"
:tableColumns=
"usersTableColumns"
@
currentChange=
"currentTabFn"
:rowClassName=
"cellClass"
@
selectionChange=
"selectionChange"
></table-vue>
</
template
>
</div>
<div
class=
"pagination"
>
<el-pagination
layout=
"sizes, total, prev, pager, next, jumper"
background
:total=
"total"
:page-size=
"pageSize"
:current-page=
"currentPage"
@
size-change=
"sizeChange"
@
current-change=
"onCurrentChange"
>
</el-pagination>
</div>
<!-- 弹出层 -->
<el-dialog
:close-on-click-modal=
"false"
...
...
@@ -150,63 +127,40 @@
ref=
"addcurrencyform"
>
<el-form-item
label=
"
员工姓名
"
prop=
"
employeeId
"
label=
"
登录账号
"
prop=
"
account
"
required
>
<el-select
:disabled=
"is_title == 2"
v-model=
"addcurrencyform.employeeId"
placeholder=
"请选择员工"
@
change=
"setempNo"
style=
"width: 164px"
filterable
>
<el-option
v-for=
"item in employee"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"员工工号"
>
<el-input
style=
"width: 164px"
disabled
v-model=
"addcurrencyform.empNumber"
v-model=
"addcurrencyform.account"
placeholder=
"请输入登录账号"
maxlength=
"30"
></el-input>
</el-form-item>
<el-form-item
label=
"登录账号"
prop=
"loginName"
required
>
<el-form-item
label=
"姓名"
prop=
""
required
>
<el-input
style=
"width: 164px"
v-model=
"addcurrencyform.
login
Name"
v-model=
"addcurrencyform.
real
Name"
placeholder=
"请输入登录账号"
maxlength=
"30"
></el-input>
</el-form-item>
<el-form-item
label=
"是否启用"
prop=
"enable"
>
<
el-select
style=
"width: 164px"
v-model=
"addcurrencyform.enable
"
placeholder=
"请选择
"
>
<el-option
label=
"是"
:value=
"true"
></el-option
>
<el-
option
<
div
style=
"width: 164px"
placeholder=
"请选择"
>
<el-radio
label=
"是
"
v-model=
"addcurrencyform.enable
"
:value=
"true"
></el-radio
>
<el-
radio
label=
"否"
v-model=
"addcurrencyform.enable"
:value=
"false"
></el-
option
>
</
el-select
>
></el-
radio
>
</
div
>
</el-form-item>
<el-form-item
label=
"功能角色"
prop=
"funcRoleIds"
required
>
<el-form-item
label=
"功能角色"
prop=
"funcRoleIds"
>
<el-select
style=
"width: 164px"
v-model=
"addcurrencyform.funcRoleIds"
...
...
@@ -242,29 +196,6 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"首页排名"
prop=
"platForm"
>
<el-select
style=
"width: 164px"
v-model=
"addcurrencyform.platForm"
placeholder=
"请选择"
clearable
filterable
>
<el-option
v-for=
"(item, index) in platforms"
:key=
"index"
:label=
"item.value"
:value=
"item.key"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"同步花费"
>
<el-switch
v-model=
"addcurrencyform.cost"
:active-value=
"true"
:inactive-value=
"false"
></el-switch>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
...
...
@@ -284,10 +215,9 @@
</el-button>
</span>
</el-dialog>
</
layout
>
</
div
>
</
template
>
<
script
>
import
{
getOptionData
}
from
'../../utils/commonUtil'
import
axios
from
'../../common/api/axios'
import
{
mapState
}
from
'vuex'
import
tableVue
from
'@/common/components/base/tableView.vue'
...
...
@@ -378,6 +308,9 @@ export default {
details
:
[],
roleOptions
:
[],
platforms
:
[],
total
:
0
,
pageSize
:
100
,
currentPage
:
1
,
}
},
created
()
{
...
...
@@ -411,8 +344,8 @@ export default {
return
[
{
label
:
'登录账户'
,
key
:
'
loginName
'
,
width
:
105
,
key
:
'
account
'
,
width
:
''
,
align
:
'left'
,
render
:
(
item
)
=>
(
<
span
>
...
...
@@ -424,120 +357,40 @@ export default {
:
'red'
,
}}
><
/i
>
{
item
.
loginName
}
{
item
.
account
}
<
/span
>
),
},
{
label
:
'
员工
姓名'
,
key
:
'
employee
Name'
,
width
:
60
,
label
:
'姓名'
,
key
:
'
real
Name'
,
width
:
''
,
},
{
label
:
'员工工号'
,
key
:
'empNumber'
,
width
:
60
},
{
label
:
'功能角色'
,
key
:
'functionNames'
},
{
label
:
'数据角色'
,
key
:
'dataNames'
},
{
label
:
'平台'
,
key
:
'platFormTxt'
},
{
label
:
'上次登录IP'
,
key
:
'lastIp'
},
{
label
:
'上次登录时间'
,
key
:
'lastLoginTime'
,
width
:
130
,
},
{
label
:
'同步花费'
,
width
:
60
,
key
:
'lastLoginTime'
,
render
:
(
item
)
=>
(
<
el
-
switch
value
=
{
item
.
cost
}
onInput
=
{(
v
)
=>
this
.
spentChange
(
v
,
item
)}
active
-
value
=
{
true
}
inactive
-
value
=
{
false
}
><
/el-switch
>
),
},
{
label
:
'锁定设备'
,
key
:
'enable'
,
width
:
60
,
render
:
(
item
)
=>
(
<
span
style
=
"cursor: pointer"
onClick
=
{()
=>
this
.
bindChange
(
item
)}
>
{
item
.
bindStatus
?
(
<
svg
t
=
"1616060540114"
class
=
"icon"
viewBox
=
"0 0 1024 1024"
version
=
"1.1"
xmlns
=
"http://www.w3.org/2000/svg"
p
-
id
=
"1989"
width
=
"20"
height
=
"20"
fill
=
"#1afa29"
>
<
path
d
=
"M800.421 436.525h-63.661v-148.673c0-124.507-100.762-225.757-224.732-225.757-123.98 0-224.857 101.25-224.857 225.766v148.662h-63.593c-30.667 0-55.532 24.952-55.532 55.752v407.048c0 30.848 24.865 55.82 55.532 55.82h576.9c30.667 0 55.465-24.97 55.465-55.82v-407.048c0-30.802-24.855-55.752-55.532-55.752zM543.203 706.409v88.88c-0.016 4.026-3.264 7.287-7.282 7.325h-47.733c-4.039-0.022-7.307-3.287-7.334-7.322v-88.882c-22.423-11.518-37.953-34.602-37.953-61.659 0-38.288 30.945-69.425 69.070-69.425 38.183 0 69.138 31.136 69.138 69.415 0.057 27.067-15.473 50.152-37.905 61.659zM650.514 436.525h-276.989v-144.986c0-76.691 62.196-139.146 138.552-139.146 76.366 0 138.447 62.454 138.447 139.146v144.986z"
p
-
id
=
"1990"
><
/path
>
<
/svg
>
)
:
(
<
svg
t
=
"1616061412578"
class
=
"icon"
viewBox
=
"0 0 1067 1024"
version
=
"1.1"
xmlns
=
"http://www.w3.org/2000/svg"
p
-
id
=
"2133"
width
=
"20"
height
=
"20"
>
<
path
d
=
"M116.587 440.171h564.044c29.993 0 54 24.755 54 55.687v408.335c0 30.931-24.007 55.687-54 55.687h-564.044c-30.003 0-54-24.755-54-55.687v-408.335c0-30.931 23.997-55.687 54-55.687zM368.607 712.397v86.618c0 6.187 5.997 6.187 5.997 6.187h48.003c6.007 0 6.007-6.187 6.007-6.187v-86.618c23.997-12.372 36-37.118 36-61.864 0-37.128-30.003-68.059-66.003-68.059s-66.013 30.931-66.013 68.049c0 30.941 12.003 49.5 36 61.872z"
p
-
id
=
"2134"
fill
=
"red"
><
/path
>
<
path
d
=
"M900.705 297.099c0-74.236-61.864-142.295-142.295-142.295-74.245 0-142.295 61.864-142.295 142.295v148.491h-80.431v-154.677c0-123.736 98.991-228.913 228.913-228.913 123.736 0 228.922 98.991 228.922 228.913v148.491h-86.618l-6.187-142.295z"
p
-
id
=
"2135"
fill
=
"red"
><
/path
>
<
/svg
>
)}
<
/span
>
),
},
{
label
:
'授权设备数量'
,
key
:
'authNum'
,
width
:
90
,
render
:
(
item
)
=>
item
.
authNum
<
0
?
0
:
item
.
authNum
,
},
{
label
:
'相关操作'
,
key
:
''
,
fixed
:
'right'
,
width
:
80
,
width
:
''
,
render
:
(
item
)
=>
(
<
div
>
{
item
.
loginName
!==
'admin'
&&
this
.
roleShow
(
'update_system_users'
)
&&
(
<
span
title
=
"编辑"
class
=
"icon-view icon-edit-view"
>
<
i
class
=
"el-icon-edit"
onClick
=
{(
e
)
=>
this
.
addDialog
(
2
,
item
,
e
)
}
><
/i
>
<
/span
>
)}
{
this
.
roleShow
(
'reset_password'
)
&&
(
{
item
.
loginName
!==
'admin'
&&
(
<
span
title
=
"编辑"
class
=
"icon-view icon-edit-view"
>
<
i
class
=
"el-icon-edit"
onClick
=
{(
e
)
=>
this
.
addDialog
(
2
,
item
,
e
)
}
><
/i
>
<
/span
>
)}
{
<
span
title
=
"重置密码"
class
=
"icon-view icon-tools-view"
...
...
@@ -547,7 +400,7 @@ export default {
onClick
=
{(
e
)
=>
this
.
resetPwd
(
e
,
item
)}
><
/i
>
<
/span
>
)
}
}
<
/div
>
),
},
...
...
@@ -570,20 +423,19 @@ export default {
render
:
(
item
)
=>
(
<
div
>
{
this
.
roleShow
(
'authorization'
)
&&
item
.
auditStatus
===
0
&&
(
<
span
class
=
"icon-view icon-tools-view"
title
=
"授权"
>
<
i
class
=
"el-icon-s-check"
onClick
=
{(
e
)
=>
this
.
authorization
(
item
,
e
)
}
><
/i
>
<
/span
>
)}
{
item
.
auditStatus
===
0
&&
(
<
span
class
=
"icon-view icon-tools-view"
title
=
"授权"
>
<
i
class
=
"el-icon-s-check"
onClick
=
{(
e
)
=>
this
.
authorization
(
item
,
e
)
}
><
/i
>
<
/span
>
)}
<
span
class
=
"icon-view icon-del-view"
title
=
"删除"
...
...
@@ -618,6 +470,8 @@ export default {
},
},
methods
:
{
onCurrentChange
()
{},
sizeChange
()
{},
spentChange
(
v
,
item
)
{
axios
.
post
(
'platform/user/update'
,
{
...
...
@@ -685,11 +539,6 @@ export default {
})
},
bindChange
(
row
)
{
if
(
!
this
.
roleShow
(
'lock_device'
))
{
this
.
$message
.
warning
(
'暂无操作权限'
)
return
}
axios
.
post
(
'platform/user/setBindingStatus'
,
{
bindStatus
:
!
row
.
bindStatus
,
...
...
@@ -721,9 +570,6 @@ export default {
// 修改新增
async
addDialog
(
i
,
v
=
null
,
e
)
{
e
&&
e
.
stopPropagation
()
console
.
log
(
'addDialog'
)
getOptionData
([
'employee'
])
if
(
i
===
2
)
{
if
(
v
)
this
.
formId
=
v
.
id
if
(
!
this
.
formId
)
{
...
...
@@ -857,12 +703,9 @@ export default {
this
.
dialogVisible
=
false
this
.
$alert
(
'添加成功
\
n
\
r 用户密码为:'
+
res
.
data
.
passWord
,
res
.
data
?.
passWord
||
''
,
)
// this.$message({
// message: "添加成功",
// type: "success"
// });
this
.
getList
(
this
.
currentPage
)
}
else
{
this
.
$alert
(
res
.
message
,
'错误提示'
,
{
...
...
@@ -917,6 +760,15 @@ export default {
}
</
script
>
<
style
scoped
>
.wraper
{
display
:
flex
;
flex-direction
:
column
;
height
:
100%
;
}
.table_wrap
{
flex
:
1
;
}
.circle
{
display
:
inline-block
;
height
:
10px
;
...
...
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