Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
N
nse-ui
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
吴超
nse-ui
Commits
32dc9cfc
Commit
32dc9cfc
authored
Aug 22, 2025
by
周海峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户组
parent
723e4652
全部展开
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
236 行增加
和
90 行删除
+236
-90
src/api/safetyManagement/groupConfig.js
+52
-0
src/views/safetyManagement/groupConfig/edit.vue
+0
-0
src/views/safetyManagement/groupConfig/index.vue
+184
-90
src/views/safetyManagement/roleConfig/edit.vue.new
+0
-0
没有找到文件。
src/api/safetyManagement/groupConfig.js
View file @
32dc9cfc
...
@@ -14,3 +14,55 @@ export function queryAll(query) {
...
@@ -14,3 +14,55 @@ export function queryAll(query) {
params
:
query
params
:
query
})
})
}
}
export
function
query
(
data
)
{
return
request
({
url
:
'/console/usergroup/query'
,
method
:
'post'
,
data
:
data
})
}
export
function
initEdit
(
data
)
{
return
request
({
url
:
'/console/usergroup/initEdit'
,
method
:
'post'
,
data
:
data
})
}
export
function
add
(
data
)
{
return
request
({
url
:
'/console/usergroup/add'
,
method
:
'post'
,
data
:
data
})
}
export
function
modify
(
data
)
{
return
request
({
url
:
'/console/usergroup/modify'
,
method
:
'post'
,
data
:
data
})
}
export
function
del
(
data
)
{
return
request
({
url
:
'/console/usergroup/del'
,
method
:
'post'
,
data
:
data
})
}
export
function
checkNameExit
(
query
)
{
return
request
({
url
:
'/console/usergroup/checkNameExit'
,
method
:
'get'
,
params
:
query
})
}
src/views/safetyManagement/groupConfig/edit.vue
View file @
32dc9cfc
差异被折叠。
点击展开。
src/views/safetyManagement/groupConfig/index.vue
View file @
32dc9cfc
...
@@ -11,10 +11,10 @@
...
@@ -11,10 +11,10 @@
<el-form
:inline=
"true"
:model=
"searchForm"
class=
"search-form"
>
<el-form
:inline=
"true"
:model=
"searchForm"
class=
"search-form"
>
<div
class=
"left-area"
>
<div
class=
"left-area"
>
<el-form-item
label=
"用户组名:"
>
<el-form-item
label=
"用户组名:"
>
<el-input
v-model=
"searchForm.groupname"
placeholder=
"请输入用户组名"
></el-input>
<el-input
v-model=
"searchForm.groupname"
clearable
placeholder=
"请输入用户组名"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"备注:"
>
<el-form-item
label=
"备注:"
>
<el-input
v-model=
"searchForm.remark"
placeholder=
"请输入备注"
></el-input>
<el-input
v-model=
"searchForm.remark"
clearable
placeholder=
"请输入备注"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"Search"
@
click=
"handleSearch"
>
搜索
</el-button>
<el-button
type=
"primary"
icon=
"Search"
@
click=
"handleSearch"
>
搜索
</el-button>
...
@@ -29,24 +29,36 @@
...
@@ -29,24 +29,36 @@
<!-- 用户列表 -->
<!-- 用户列表 -->
<div
class=
"user-list"
>
<div
class=
"user-list"
>
<div
class=
"user-grid"
>
<div
class=
"user-grid"
>
<div
v-for=
"(user, index) in userList"
:key=
"index"
class=
"user-card"
>
<div
v-for=
"(user, index) in groupList"
:key=
"index"
class=
"user-card"
>
<div
class=
"card-left-bar"
></div>
<div
class=
"user-info"
>
<div
class=
"user-info"
>
<div
class=
"avatar"
>
<el-avatar
:size=
"50"
icon=
"User"
></el-avatar>
</div>
<div
class=
"info"
>
<div
class=
"info"
>
<div
class=
"name"
>
{{
user
.
groupname
}}
</div>
<div
class=
"name"
>
{{
user
.
groupname
}}
</div>
<div
class=
"remark"
>
备注:
{{
user
.
remark
}}
</div>
<div
class=
"remark"
>
<el-icon><Edit
/></el-icon>
备注
{{
user
.
remark
}}
</div>
</div>
<div
class=
"avatar"
>
<el-avatar
:size=
"80"
icon=
"UserFilled"
style=
"background: #f6f8fa; color: #d3d8e0;"
/>
</div>
</div>
<div
class=
"card-divider"
></div>
<div
class=
"card-bottom"
>
<div>
<el-icon><Clock
/></el-icon>
{{
user
.
createtime
||
''
}}
</div>
<el-icon
class=
"lock"
><Lock
/></el-icon>
</div>
</div>
<!-- 遮罩层和操作按钮 -->
<div
class=
"hover-mask"
>
<div
class=
"hover-mask"
>
<div
class=
"operation-buttons"
>
<div
class=
"operation-buttons"
>
<div
class=
"operation-btn"
@
click=
"handleDelete(user)"
>
<div
class=
"operation-btn"
@
click=
"handleDelete(user)"
>
<i
class=
"el-icon-delete"
></i
>
<el-icon><Delete
/></el-icon
>
<span>
删除
</span>
<span>
删除
</span>
</div>
</div>
<div
class=
"operation-btn"
@
click=
"handleEdit(user)"
>
<div
class=
"operation-btn"
@
click=
"handleEdit(user)"
>
<i
class=
"el-icon-edit"
></i
>
<el-icon><FolderOpened
/></el-icon
>
<span>
编辑
</span>
<span>
编辑
</span>
</div>
</div>
</div>
</div>
...
@@ -54,11 +66,12 @@
...
@@ -54,11 +66,12 @@
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 分页 -->
<!-- 分页 -->
<div
class=
"pagination"
>
<div
class=
"pagination"
>
<div
class=
"pagination-info"
>
共有记录 1条,每页显示 8条,共 1页
</div>
<div
class=
"pagination-info"
>
共有记录
{{
total
}}
条,每页显示
{{
pageSize
}}
条,共
{{
Math
.
ceil
(
total
/
pageSize
)
||
1
}}
页
</div>
<el-pagination
<el-pagination
background
background
layout=
"prev, pager, next, jumper"
layout=
"prev, pager, next, jumper"
...
@@ -78,72 +91,85 @@
...
@@ -78,72 +91,85 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
setup
>
import
{
ref
,
reactive
,
onMounted
}
from
'vue'
import
{
ElMessageBox
}
from
'element-plus'
import
GroupEdit
from
'./edit.vue'
import
GroupEdit
from
'./edit.vue'
import
{
query
,
del
}
from
'@/api/safetyManagement/groupConfig.js'
export
default
{
const
searchForm
=
reactive
({
name
:
'GroupConfig'
,
components
:
{
GroupEdit
},
data
()
{
return
{
searchForm
:
{
name
:
''
,
name
:
''
,
groupname
:
''
,
groupname
:
''
,
remark
:
''
remark
:
''
},
})
userList
:
[
const
groupList
=
ref
(
[
{
{
realname
:
'admin'
,
// realname: 'admin',
groupname
:
'admin'
,
// groupname: 'admin',
remark
:
''
// remark: ''
}
])
const
total
=
ref
(
1
)
const
currentPage
=
ref
(
1
)
const
pageSize
=
ref
(
8
)
const
editVisible
=
ref
(
false
)
const
editData
=
ref
(
null
)
const
getList
=
async
()
=>
{
try
{
const
res
=
await
query
({
groupname
:
searchForm
.
groupname
,
remark
:
searchForm
.
remark
,
page
:
currentPage
.
value
,
rows
:
pageSize
.
value
})
if
(
res
.
code
===
'POP_00014'
)
{
groupList
.
value
=
res
.
data
.
list
||
[]
total
.
value
=
res
.
data
.
total
||
0
}
}
catch
(
error
)
{
console
.
error
(
'获取用户组列表失败'
,
error
)
}
}
],
}
total
:
1
,
currentPage
:
1
,
const
handleSearch
=
()
=>
{
pageSize
:
8
,
currentPage
.
value
=
1
editVisible
:
false
,
getList
()
editData
:
null
}
}
const
handleAdd
=
()
=>
{
},
editData
.
value
=
null
methods
:
{
editVisible
.
value
=
true
handleSearch
()
{
}
// 实现搜索逻辑
const
handlePageChange
=
(
page
)
=>
{
},
currentPage
.
value
=
page
handleAdd
()
{
getList
()
// 打开新增用户弹窗
}
this
.
editData
=
null
const
handleDelete
=
async
(
row
)
=>
{
this
.
editVisible
=
true
ElMessageBox
.
confirm
(
'确认删除该用户组吗?'
,
'提示'
,
{
},
handlePageChange
(
page
)
{
// 实现分页逻辑
},
handleDelete
(
row
)
{
// 实现删除用户逻辑
this
.
$confirm
(
'确认删除该用户组吗?'
,
'提示'
,
{
type
:
'warning'
type
:
'warning'
}).
then
(
()
=>
{
}).
then
(
async
()
=>
{
// 调用删除接口
// 调用删除接口
console
.
log
(
'删除用户组'
,
row
)
try
{
}).
catch
(()
=>
{})
const
res
=
await
del
({
groupid
:
row
.
id
})
},
if
(
res
.
code
===
'POP_00014'
)
{
handleEdit
(
row
)
{
getList
()
// 打开编辑用户弹窗
this
.
editData
=
{
...
row
}
this
.
editVisible
=
true
},
handleEditSuccess
()
{
// 编辑成功后的回调
this
.
editVisible
=
false
// 刷新列表数据
this
.
getList
()
},
getList
()
{
// 获取用户列表数据
}
}
}
catch
(
error
)
{
console
.
error
(
'删除用户组失败'
,
error
)
}
}
}).
catch
(()
=>
{})
}
const
handleEdit
=
(
row
)
=>
{
editData
.
value
=
{
...
row
}
editVisible
.
value
=
true
}
const
handleEditSuccess
=
()
=>
{
editVisible
.
value
=
false
getList
()
}
}
onMounted
(()
=>
{
getList
()
})
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
@@ -202,37 +228,105 @@ export default {
...
@@ -202,37 +228,105 @@ export default {
.user-card
{
.user-card
{
background
:
#fff
;
background
:
#fff
;
border-radius
:
8
px
;
border-radius
:
12
px
;
box-shadow
:
0
2px
12px
0
rgba
(
0
,
0
,
0
,
0.
1
);
box-shadow
:
0
2px
12px
0
rgba
(
0
,
0
,
0
,
0.
04
);
overflow
:
hidden
;
overflow
:
hidden
;
position
:
relative
;
padding
:
0
;
border
:
none
;
transition
:
box-shadow
0.2s
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-between
;
&:hover
{
box-shadow
:
0
4px
24px
rgba
(
0
,
0
,
0
,
0.08
);
}
&
:hover
.hover-mask
{
display
:
flex
!important
;
}
}
.card-left-bar
{
position
:
absolute
;
left
:
0
;
top
:
24px
;
bottom
:
24px
;
width
:
8px
;
background
:
#409EFF
;
border-radius
:
4px
;
}
}
.user-info
{
.user-info
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
flex-start
;
padding
:
2
0
px
;
padding
:
2
4px
24px
0
24
px
;
position
:
relative
;
position
:
relative
;
height
:
auto
;
cursor
:
pointer
;
cursor
:
pointer
;
height
:
100%
;
.avatar
{
.avatar
{
margin-right
:
15px
;
margin-left
:
auto
;
margin-right
:
0
;
width
:
80px
;
height
:
80px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
}
.info
{
.info
{
flex
:
1
;
flex
:
1
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
flex-start
;
.name
{
.name
{
font-size
:
1
6
px
;
font-size
:
1
5
px
;
font-weight
:
bold
;
font-weight
:
600
;
margin-bottom
:
8px
;
color
:
#409EFF
;
color
:
#333
;
margin-bottom
:
12px
;
}
}
.groupname
,
.remark
{
.remark
{
font-size
:
12px
;
color
:
#666
;
color
:
#666
;
font-size
:
14px
;
margin-bottom
:
8px
;
margin-bottom
:
5px
;
display
:
flex
;
align-items
:
center
;
gap
:
6px
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
max-width
:
300px
;
}
}
}
.card-divider
{
height
:
2px
;
background
:
#f2f6fa
;
margin
:
12px
24px
0
24px
;
border-radius
:
1px
;
}
.card-bottom
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
padding
:
8px
24px
12px
24px
;
color
:
#909399
;
font-size
:
15px
;
.el-icon
{
margin-right
:
6px
;
}
.lock
{
font-size
:
18px
;
color
:
#bdbdbd
;
margin-left
:
8px
;
}
}
}
}
...
@@ -243,13 +337,16 @@ export default {
...
@@ -243,13 +337,16 @@ export default {
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
background-color
:
rgba
(
0
,
0
,
0
,
0.6
);
background-color
:
rgba
(
0
,
0
,
0
,
0.6
);
display
:
none
;
display
:
none
!important
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
z-index
:
2
;
.operation-buttons
{
.operation-buttons
{
display
:
flex
;
display
:
flex
;
gap
:
30px
;
gap
:
80px
;
justify-content
:
center
;
align-items
:
center
;
.operation-btn
{
.operation-btn
{
display
:
flex
;
display
:
flex
;
...
@@ -257,14 +354,18 @@ export default {
...
@@ -257,14 +354,18 @@ export default {
align-items
:
center
;
align-items
:
center
;
color
:
white
;
color
:
white
;
cursor
:
pointer
;
cursor
:
pointer
;
background
:
none
;
border-radius
:
0
;
padding
:
0
;
box-shadow
:
none
;
transition
:
color
0.2s
;
i
{
i
{
font-size
:
24px
;
margin-bottom
:
8px
;
margin-bottom
:
8px
;
}
}
span
{
span
{
font-size
:
14px
;
font-weight
:
500
;
}
}
&
:hover
{
&
:hover
{
...
@@ -274,13 +375,6 @@ export default {
...
@@ -274,13 +375,6 @@ export default {
}
}
}
}
&
:hover
{
.hover-mask
{
display
:
flex
;
}
}
}
.operation-time
{
.operation-time
{
color
:
#666
;
color
:
#666
;
i
{
i
{
...
...
src/views/safetyManagement/roleConfig/edit.vue.new
deleted
100644 → 0
View file @
723e4652
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论