Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
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
罗超
confucius
Commits
b8d0f02a
Commit
b8d0f02a
authored
Dec 01, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
0db23d9b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
16 deletions
+70
-16
sysuser.vue
src/pages/school/sysuser.vue
+70
-16
No files found.
src/pages/school/sysuser.vue
View file @
b8d0f02a
...
...
@@ -7,15 +7,23 @@
label=
"员工姓名/账号"
/>
</div>
<div
class=
"col-3"
>
<q-select
@
input=
"resetSearch"
clearable
filled
stack-label
option-value=
"SId"
option-label=
"SName"
v-model=
"schoolTemp"
ref=
"School_Id"
:options=
"schoolList"
label=
"所属校区"
:dense=
"false"
/>
<q-select
filled
stack-label
@
input=
"resetSearch(),getDepartList(msg.School_Id)"
option-value=
"SId"
option-label=
"SName"
v-model=
"msg.School_Id"
ref=
"School_Id"
:options=
"schoolList"
label=
"所属校区"
:dense=
"false"
class=
"col-6 q-pb-lg q-pr-lg"
emit-value
map-options
/>
</div>
<div
class=
"col-3"
>
<selectTree
:treeData=
'DeptList'
:defaultArray=
"returnString"
nodeKey=
"DeptId"
:multiple=
"false"
labelKey=
"DeptName"
childrenKey=
"ChildList"
tipText=
"选择部门"
@
getChild=
"getChild"
classStr=
"col-6 q-pr-lg q-pb-lg"
></selectTree>
</div>
<div
class=
"col-3"
>
<q-select
filled
stack-label
@
input=
"resetSearch"
option-value=
"PostId"
option-label=
"PostName"
v-model=
"msg.Post_Id"
ref=
"Post_Id"
:options=
"PostList"
label=
"岗位"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
</div>
<div
class=
"col-3"
>
<q-input
@
input=
"resetSearch"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.MTel"
label=
"电话"
/>
</div>
</div>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
class=
"q-mr-md"
icon=
"add"
label=
"新增管理者"
@
click=
"EditManager(null)"
/>
...
...
@@ -25,7 +33,7 @@
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-right-column-table sticky-tow-column-table"
separator=
"none"
title=
"员工管理"
:data=
"data"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:body-cell-
Employee
Icon=
"props"
>
<template
v-slot:body-cell-
User
Icon=
"props"
>
<q-td
auto-width
:props=
"props"
>
<q-avatar
size=
"md"
v-if=
"props.value"
>
<img
:src=
"props.value"
/>
...
...
@@ -82,22 +90,27 @@
import
{
resetPassword
}
from
'../../api/users/user.js'
import
{
getChildDepartment
}
from
'../../api/system/dept.js'
import
{
getChildDepartment
,
getDeptTree
}
from
'../../api/system/dept.js'
import
managerForm
from
'../../components/school/manager/manager-form'
import
selectTree
from
'../../components/common/select-tree'
export
default
{
meta
:
{
title
:
"后台用户管理"
},
components
:
{
managerForm
,
selectTree
},
data
()
{
return
{
currentUrl
:
""
,
columns
:
[{
name
:
'
Employee
Icon'
,
name
:
'
User
Icon'
,
label
:
''
,
field
:
'
Employee
Icon'
,
field
:
'
User
Icon'
,
align
:
'left'
,
},
{
...
...
@@ -195,9 +208,12 @@
schoolTemp
:
""
,
pageCount
:
0
,
managerOption
:
null
,
schoolList
:
[],
schoolList
:
[],
//校区数组
DeptList
:[],
// 部门下拉
isShowManagerForm
:
false
,
resetLoading
:
false
resetLoading
:
false
,
returnString
:
[],
//默认岗位
PostList
:[],
//岗位
}
},
mounted
()
{
...
...
@@ -208,11 +224,11 @@
methods
:
{
resetSearch
()
{
this
.
msg
.
pageIndex
=
1
;
if
(
this
.
schoolTemp
)
{
this
.
msg
.
School_Id
=
this
.
schoolTemp
.
SId
}
else
{
this
.
msg
.
School_Id
=
0
}
//
if (this.schoolTemp) {
//
this.msg.School_Id = this.schoolTemp.SId
//
} else {
//
this.msg.School_Id = 0
//
}
this
.
getManager
()
},
//创建账号
...
...
@@ -316,6 +332,12 @@
getSchool
()
{
getSchoolDropdown
({}).
then
(
res
=>
{
this
.
schoolList
=
res
.
Data
;
var
obj
=
{
SName
:
'全部'
,
SId
:
0
}
this
.
schoolList
.
unshift
(
obj
);
console
.
log
(
res
,
'学校'
);
})
},
getManager
()
{
...
...
@@ -348,6 +370,38 @@
},
closeStuForm
()
{
this
.
isShowManagerForm
=
false
;
},
getChild
(
deptArray
)
{
var
tempStr
=
""
;
if
(
deptArray
&&
deptArray
!=
''
)
{
tempStr
=
deptArray
;
}
this
.
msg
.
Dept_Id
=
tempStr
;
this
.
queryPostList
(
this
.
objOption
.
Dept_Id
);
},
//获取部门下拉数据
getDepartList
(
id
){
let
msg
=
{
School_Id
:
id
}
getDeptTree
(
msg
).
then
(
res
=>
{
console
.
log
(
res
,
'部门数据'
);
if
(
res
.
Code
==
1
)
{
this
.
DeptList
=
res
.
Data
;
}
})
},
//获取岗位
queryPostList
(){
this
.
PostList
=
[];
var
postMsg
=
{
RB_Dept_Id
:
deptId
,
};
getPostList
(
postMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
PostList
=
res
.
Data
;
}
})
}
},
}
...
...
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