Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
Support
提交反馈
为 GitLab 提交贡献
登录
切换导航
H
HY占座系统
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
刘英杰
HY占座系统
提交
1f83b57d
提交
1f83b57d
编写于
12月 27, 2024
作者:
刘英杰
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
20241224 优化保存
上级
3de1f72a
流水线
#32224
已通过 ,包含阶段
in 1 minute 和 1 second
变更
5
流水线
1
展开全部
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
252 行增加
和
226 行删除
+252
-226
index.html
dist/index.html
+1
-1
app.77ac8b9c.js
dist/js/app.77ac8b9c.js
+1
-1
chunk-4b2a2114.183c6cfb.js
dist/js/chunk-4b2a2114.183c6cfb.js
+0
-1
chunk-4b2a2114.9b33fafa.js
dist/js/chunk-4b2a2114.9b33fafa.js
+1
-0
index.vue
src/pages/userManagement/index.vue
+249
-223
未找到文件。
dist/index.html
浏览文件 @
1f83b57d
<!DOCTYPE html>
<html><head><meta
charset=
utf-8
><meta
http-equiv=
X-UA-Compatible
content=
"IE=edge"
><meta
name=
viewport
content=
"width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"
><link
rel=
"shortcut icon"
href=
favicon.ico
><title>
自习室占座预约系统
</title><link
href=
css/chunk-vendors.cc1990b1.css
rel=
stylesheet
><link
href=
css/app.de53c9b8.css
rel=
stylesheet
></head><body><script
src=
https://mapapi.qq.com/web/mapComponents/geoLocation/v/geolocation.min.js
></script><script
src=
"https://map.qq.com/api/gljs?v=1.exp&libraries=service&key=IZXBZ-OTAWV-XU7PV-5FAAL-F6VXH-7XBQP"
></script><script
charset=
utf-8
src=
"https://map.qq.com/api/js?v=2.exp&key=ZNMBZ-NYOEO-WNMWL-SJF4C-MWKQT-KJB7W&libraries=drawing,geometry,place,convertor,visualization"
></script><script
src=
/a/manager/identify/identify.js
></script><noscript><strong>
请开启 JavaScript 功能来使用 自习室占座预约系统。
</strong></noscript><div
id=
app
></div><script
src=
js/chunk-vendors.0e2a893c.js
></script><script
src=
js/app.32cec4f6.js
></script></body></html>
<!DOCTYPE html>
<html><head><meta
charset=
utf-8
><meta
http-equiv=
X-UA-Compatible
content=
"IE=edge"
><meta
name=
viewport
content=
"width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"
><link
rel=
"shortcut icon"
href=
favicon.ico
><title>
自习室占座预约系统
</title><link
href=
css/chunk-vendors.cc1990b1.css
rel=
stylesheet
><link
href=
css/app.de53c9b8.css
rel=
stylesheet
></head><body><script
src=
https://mapapi.qq.com/web/mapComponents/geoLocation/v/geolocation.min.js
></script><script
src=
"https://map.qq.com/api/gljs?v=1.exp&libraries=service&key=IZXBZ-OTAWV-XU7PV-5FAAL-F6VXH-7XBQP"
></script><script
charset=
utf-8
src=
"https://map.qq.com/api/js?v=2.exp&key=ZNMBZ-NYOEO-WNMWL-SJF4C-MWKQT-KJB7W&libraries=drawing,geometry,place,convertor,visualization"
></script><script
src=
/a/manager/identify/identify.js
></script><noscript><strong>
请开启 JavaScript 功能来使用 自习室占座预约系统。
</strong></noscript><div
id=
app
></div><script
src=
js/chunk-vendors.0e2a893c.js
></script><script
src=
js/app.77ac8b9c.js
></script></body></html>
\ No newline at end of file
\ No newline at end of file
dist/js/app.
32cec4f6
.js
→
dist/js/app.
77ac8b9c
.js
浏览文件 @
1f83b57d
因为 它太大了无法显示 源差异 。您可以改为
查看blob
。
dist/js/chunk-4b2a2114.183c6cfb.js
已删除
100644 → 0
浏览文件 @
3de1f72a
此差异已折叠。
点击以展开。
dist/js/chunk-4b2a2114.9b33fafa.js
0 → 100644
浏览文件 @
1f83b57d
此差异已折叠。
点击以展开。
src/pages/userManagement/index.vue
浏览文件 @
1f83b57d
...
@@ -9,8 +9,14 @@
...
@@ -9,8 +9,14 @@
@
onSubmit=
"search"
@
onSubmit=
"search"
@
onReset=
"reset"
></SearchCondForm>
-->
@
onReset=
"reset"
></SearchCondForm>
-->
<Button
type=
"primary"
class=
"ivu-ml-8"
@
click=
"add"
><Icon
type=
"md-add"
/>
新增
</Button>
<Button
type=
"primary"
class=
"ivu-ml-8"
@
click=
"add('teacher')"
>
<Icon
type=
"md-add"
/>
新增教师
</Button>
<Button
type=
"primary"
class=
"ivu-ml-8"
@
click=
"add('student')"
>
<Icon
type=
"md-add"
/>
新增学生
</Button>
<!-- 数据table -->
<!-- 数据table -->
<CTable
<CTable
:tableColumns=
"tableColumns.filter(a => a.show)"
:tableColumns=
"tableColumns.filter(a => a.show)"
...
@@ -30,7 +36,7 @@
...
@@ -30,7 +36,7 @@
</
template
>
</
template
>
</CTable>
</CTable>
<!-- 新增修改Modal -->
<!-- 新增修改Modal
-分配教师用户权限
-->
<CEditModal
<CEditModal
ref=
"ceditmodal"
ref=
"ceditmodal"
v-model=
"editModalshow"
v-model=
"editModalshow"
...
@@ -42,51 +48,53 @@
...
@@ -42,51 +48,53 @@
@
getPeopleList=
"getPeopleList"
@
getPeopleList=
"getPeopleList"
@
onSubmit=
"modalSubmit"
>
@
onSubmit=
"modalSubmit"
>
</CEditModal>
</CEditModal>
</Card>
</Card>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
CTable
from
'
@/components/CTable.vue
'
import
CTable
from
'
@/components/CTable.vue
'
import
CEditModal
from
'
@/components/CEditModal.vue
'
import
CEditModal
from
'
@/components/CEditModal.vue
'
import
SearchCondForm
from
'
@/components/SearchCondForm.vue
'
import
SearchCondForm
from
'
@/components/SearchCondForm.vue
'
import
{
cloneDeep
}
from
'
lodash
'
import
{
cloneDeep
}
from
'
lodash
'
import
*
as
api
from
'
@/api/controller/index.js
'
import
*
as
api
from
'
@/api/controller/index.js
'
import
*
as
hooks
from
'
@/hook/index
'
import
*
as
hooks
from
'
@/hook/index
'
export
default
{
export
default
{
components
:
{
components
:
{
CTable
,
CTable
,
CEditModal
,
CEditModal
,
SearchCondForm
,
SearchCondForm
,
},
},
data
()
{
data
()
{
return
{
return
{
// 搜索项
// 搜索项
searchCondList
:
[
searchCondList
:
[
{
id
:
'
name
'
,
name
:
'
类型名称
'
,
type
:
'
input
'
,
show
:
true
,
optList
:
[]
},
{
id
:
'
name
'
,
name
:
'
类型名称
'
,
type
:
'
input
'
,
show
:
true
,
optList
:
[]
},
],
],
// 搜索条件
// 搜索条件
params
:
{
params
:
{
page_index
:
1
,
page_index
:
1
,
page_size
:
10
,
page_size
:
10
,
},
},
tableColumns
:[
tableColumns
:
[
{
type
:
'
index
'
,
title
:
'
序号
'
,
align
:
'
center
'
,
width
:
80
,
show
:
true
,
fixed
:
'
left
'
},
{
type
:
'
index
'
,
title
:
'
序号
'
,
align
:
'
center
'
,
width
:
80
,
show
:
true
,
fixed
:
'
left
'
},
{
key
:
'
card
'
,
title
:
'
卡号
'
,
align
:
'
center
'
,
minWidth
:
150
,
show
:
true
},
{
key
:
'
card
'
,
title
:
'
卡号
'
,
align
:
'
center
'
,
minWidth
:
150
,
show
:
true
},
{
key
:
'
name
'
,
title
:
'
名称
'
,
align
:
'
center
'
,
minWidth
:
150
,
show
:
true
},
{
key
:
'
name
'
,
title
:
'
名称
'
,
align
:
'
center
'
,
minWidth
:
150
,
show
:
true
},
{
key
:
'
role_name
'
,
title
:
'
角色
'
,
align
:
'
center
'
,
minWidth
:
150
,
show
:
true
},
{
key
:
'
role_name
'
,
title
:
'
角色
'
,
align
:
'
center
'
,
minWidth
:
150
,
show
:
true
},
{
key
:
'
place_id
'
,
title
:
'
场地id
'
,
align
:
'
center
'
,
minWidth
:
150
,
show
:
false
},
{
key
:
'
place_id
'
,
title
:
'
场地id
'
,
align
:
'
center
'
,
minWidth
:
150
,
show
:
false
},
// { key: 'is_enable', title: '启用', align: 'center', minWidth: 150, show: true },
// { key: 'is_enable', title: '启用', align: 'center', minWidth: 150, show: true },
{
slot
:
'
generalSwitch
'
,
title
:
'
启用
'
,
align
:
'
center
'
,
minWidth
:
80
,
show
:
true
},
{
slot
:
'
generalSwitch
'
,
title
:
'
启用
'
,
align
:
'
center
'
,
minWidth
:
80
,
show
:
true
},
{
slot
:
'
action
'
,
title
:
'
操作
'
,
align
:
'
center
'
,
minWidth
:
150
,
show
:
true
,
fixed
:
'
right
'
},
{
slot
:
'
action
'
,
title
:
'
操作
'
,
align
:
'
center
'
,
minWidth
:
150
,
show
:
true
,
fixed
:
'
right
'
},
],
],
tableLoading
:
false
,
tableLoading
:
false
,
tableData
:
[],
tableData
:
[],
tableSize
:
'
default
'
,
tableSize
:
'
default
'
,
tableFullscreen
:
false
,
tableFullscreen
:
false
,
dataCount
:
0
,
dataCount
:
0
,
...
@@ -96,10 +104,10 @@ export default {
...
@@ -96,10 +104,10 @@ export default {
editModalLoading
:
false
,
editModalLoading
:
false
,
// 新增编辑表单项
// 新增编辑表单项
formItem
:
[
formItem
:
[
{
id
:
'
cardName
'
,
name
:
'
用戶
'
,
type
:
'
select
'
,
disabled
:
false
,
require
:
false
,
optList
:
[]
},
{
id
:
'
cardName
'
,
name
:
'
用戶
'
,
type
:
'
select
'
,
disabled
:
false
,
require
:
false
,
optList
:
[]
},
{
id
:
'
role_id
'
,
name
:
'
角色
'
,
type
:
'
select
'
,
disabled
:
false
,
require
:
false
,
optList
:
[]
},
{
id
:
'
role_id
'
,
name
:
'
角色
'
,
type
:
'
select
'
,
disabled
:
false
,
require
:
false
,
optList
:
[]
},
// { id: 'place_id', name: '场地', type: 'multipleselect', disabled: false, require: false, optList: [] },
// { id: 'place_id', name: '场地', type: 'multipleselect', disabled: false, require: false, optList: [] },
{
id
:
'
is_enable
'
,
name
:
'
启用
'
,
type
:
'
switch
'
,
disabled
:
false
,
require
:
false
,
optList
:
[]
},
{
id
:
'
is_enable
'
,
name
:
'
启用
'
,
type
:
'
switch
'
,
disabled
:
false
,
require
:
false
,
optList
:
[]
},
],
],
defaultFormData
:
{
defaultFormData
:
{
"
role_id
"
:
""
,
"
role_id
"
:
""
,
...
@@ -110,6 +118,11 @@ export default {
...
@@ -110,6 +118,11 @@ export default {
"
is_del
"
:
0
,
"
is_del
"
:
0
,
},
},
addTeacherOrStudentFlag
:
1
,
//新增教师或学生 0=>学生。 1=>教师
// 角色
// 角色
roleList
:
[],
roleList
:
[],
...
@@ -122,8 +135,9 @@ export default {
...
@@ -122,8 +135,9 @@ export default {
return
this
.
tableData
.
slice
(
start
,
end
)
return
this
.
tableData
.
slice
(
start
,
end
)
},
},
},
},
created
(){},
created
()
{
mounted
(){
},
mounted
()
{
// 获取角色
// 获取角色
this
.
asc
.
getApiCommonGetRoleSelect
().
then
(
res
=>
{
this
.
asc
.
getApiCommonGetRoleSelect
().
then
(
res
=>
{
...
@@ -140,16 +154,16 @@ export default {
...
@@ -140,16 +154,16 @@ export default {
this
.
getData
()
this
.
getData
()
},
},
methods
:
{
methods
:
{
getPeopleList
(
keyword
=
''
)
{
getPeopleList
(
keyword
=
''
)
{
console
.
log
(
"
🚀🚀🚀,
"
,
keyword
)
console
.
log
(
"
🚀🚀🚀,
"
,
keyword
)
// 获取用戶信息
// 获取用戶信息
api
.
getApiCommonGetPersonByCondiction
({
user_type
:
1
,
keyword
:
keyword
}).
then
(
res
=>
{
api
.
getApiCommonGetPersonByCondiction
({
user_type
:
Number
(
this
.
addTeacherOrStudentFlag
),
keyword
:
keyword
}).
then
(
res
=>
{
let
arr
=
res
.
response
.
map
(
a
=>
{
let
arr
=
res
.
response
.
map
(
a
=>
{
return
{
return
{
...
a
,
...
a
,
label
:
a
.
name
+
'
-
'
+
a
.
card
,
label
:
a
.
name
+
'
-
'
+
a
.
card
,
value
:
a
.
name
+
'
-
'
+
a
.
card
,
value
:
a
.
name
+
'
-
'
+
a
.
card
,
}
}
})
})
this
.
formItem
[
this
.
formItem
.
findIndex
(
a
=>
a
.
id
===
'
cardName
'
)].
optList
=
arr
this
.
formItem
[
this
.
formItem
.
findIndex
(
a
=>
a
.
id
===
'
cardName
'
)].
optList
=
arr
...
@@ -174,7 +188,7 @@ export default {
...
@@ -174,7 +188,7 @@ export default {
this
.
onPageChange
(
1
)
this
.
onPageChange
(
1
)
},
},
// 查询列表
// 查询列表
getData
()
{
getData
()
{
this
.
tableLoading
=
true
this
.
tableLoading
=
true
this
.
asc
.
getApiRoleGetRolePowerList
().
then
(
res
=>
{
this
.
asc
.
getApiRoleGetRolePowerList
().
then
(
res
=>
{
// console.log('查询数据', res)
// console.log('查询数据', res)
...
@@ -187,35 +201,47 @@ export default {
...
@@ -187,35 +201,47 @@ export default {
// 改变开关
// 改变开关
switchChange
(
val
,
row
,
index
)
{
switchChange
(
val
,
row
,
index
)
{
//用户启用/禁用
//用户启用/禁用
hooks
.
myEncapsulationFunction
(()
=>
{
hooks
.
myEncapsulationFunction
(()
=>
{
return
this
.
asc
.
getApiRoleRolePowerEnable
({
id
:
row
.
id
,
is_enable
:
val
}).
then
(
res
=>
{
return
this
.
asc
.
getApiRoleRolePowerEnable
({
id
:
row
.
id
,
is_enable
:
val
}).
then
(
res
=>
{
if
(
res
.
code
===
1
)
this
.
getData
()
if
(
res
.
code
===
1
)
this
.
getData
()
return
res
return
res
})
})
})
})
},
},
// 新增
// 新增
add
(){
add
(
key
)
{
const
strategy
=
{
'
teacher
'
:()
=>
{
this
.
addTeacherOrStudentFlag
=
1
this
.
getPeopleList
()
},
'
student
'
:()
=>
{
this
.
addTeacherOrStudentFlag
=
0
this
.
getPeopleList
()
}
}
strategy
[
key
]()
this
.
editModalshow
=
true
this
.
editModalshow
=
true
this
.
formItem
.
find
(
a
=>
a
.
id
===
'
cardName
'
).
disabled
=
false
this
.
formItem
.
find
(
a
=>
a
.
id
===
'
cardName
'
).
disabled
=
false
this
.
$refs
.
ceditmodal
.
modalInit
(
'
add
'
,
this
.
defaultFormData
,
'
新增用户权限
'
)
this
.
$refs
.
ceditmodal
.
modalInit
(
'
add
'
,
this
.
defaultFormData
,
'
新增用户权限
'
)
},
},
// 编辑
// 编辑
async
rowEdit
(
row
)
{
async
rowEdit
(
row
)
{
// console.log('编辑行', row)
// console.log('编辑行', row)
this
.
editModalshow
=
true
this
.
editModalshow
=
true
this
.
editModalLoading
=
true
this
.
editModalLoading
=
true
await
new
Promise
((
resolve
,
reject
)
=>
{
await
new
Promise
((
resolve
,
reject
)
=>
{
this
.
asc
.
getApiCommonGetPersonByCondiction
({
user_type
:
1
,
keyword
:
row
.
card
}).
then
(
res
=>
{
this
.
asc
.
getApiCommonGetPersonByCondiction
({
user_type
:
row
.
is_tea
,
keyword
:
row
.
card
}).
then
(
res
=>
{
// console.log('场地', res)
// console.log('场地', res)
let
arr
=
res
.
response
.
map
(
a
=>
{
let
arr
=
res
.
response
.
map
(
a
=>
{
return
{
return
{
...
a
,
...
a
,
label
:
a
.
name
+
'
-
'
+
a
.
card
,
label
:
a
.
name
+
'
-
'
+
a
.
card
,
value
:
a
.
name
+
'
-
'
+
a
.
card
,
value
:
a
.
name
+
'
-
'
+
a
.
card
,
// value:a.name+','+a.card,
// value:a.name+','+a.card,
}
}
})
})
...
@@ -230,7 +256,7 @@ export default {
...
@@ -230,7 +256,7 @@ export default {
if
(
obj
.
place_id
)
{
if
(
obj
.
place_id
)
{
obj
.
place_id
=
obj
.
place_id
.
split
(
'
,
'
)
obj
.
place_id
=
obj
.
place_id
.
split
(
'
,
'
)
}
}
obj
.
cardName
=
obj
.
name
+
'
-
'
+
obj
.
card
obj
.
cardName
=
obj
.
name
+
'
-
'
+
obj
.
card
this
.
$refs
.
ceditmodal
.
modalInit
(
'
edit
'
,
obj
)
this
.
$refs
.
ceditmodal
.
modalInit
(
'
edit
'
,
obj
)
...
@@ -272,7 +298,7 @@ export default {
...
@@ -272,7 +298,7 @@ export default {
// 删除
// 删除
rowDelete
(
row
)
{
rowDelete
(
row
)
{
// console.log('删除', row);
// console.log('删除', row);
this
.
asc
.
getApiRoleRolePowerDel
({
id
:
row
.
id
,
is_del
:
1
}).
then
(
res
=>
{
this
.
asc
.
getApiRoleRolePowerDel
({
id
:
row
.
id
,
is_del
:
1
}).
then
(
res
=>
{
// console.log('删除行后', res)
// console.log('删除行后', res)
if
(
res
.
code
==
1
)
{
if
(
res
.
code
==
1
)
{
this
.
$Message
.
success
(
res
.
msg
)
this
.
$Message
.
success
(
res
.
msg
)
...
@@ -289,12 +315,12 @@ export default {
...
@@ -289,12 +315,12 @@ export default {
// this.getData()
// this.getData()
},
},
// 更改每页条数
// 更改每页条数
onPageSizeChange
(
val
)
{
onPageSizeChange
(
val
)
{
this
.
params
.
page_size
=
val
this
.
params
.
page_size
=
val
if
(
this
.
params
.
page_index
==
1
)
{
if
(
this
.
params
.
page_index
==
1
)
{
this
.
onPageChange
(
1
)
this
.
onPageChange
(
1
)
}
}
},
},
}
}
}
}
</
script
>
</
script
>
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录