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
58c38b34
Commit
58c38b34
authored
Dec 01, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
10a48aff
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
146 additions
and
13 deletions
+146
-13
index.js
src/api/school/index.js
+24
-0
manager-form.vue
src/components/school/manager/manager-form.vue
+122
-13
No files found.
src/api/school/index.js
View file @
58c38b34
...
...
@@ -367,3 +367,27 @@ export function createManagerAccount(data) {
data
})
}
/**
* 获取学历列表
*
*/
export
function
getEducation
(
data
){
return
request
({
url
:
'/User/GetEducationList'
,
method
:
'post'
,
data
});
}
/**
* 获取在职状态
*
*/
export
function
GetLeaveStatus
(
data
){
return
request
({
url
:
'/User/GetLeaveStatus'
,
method
:
'post'
,
data
});
}
\ No newline at end of file
src/components/school/manager/manager-form.vue
View file @
58c38b34
...
...
@@ -7,23 +7,79 @@
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<div
class=
"text-caption q-mb-md q-px-xs text-grey-6"
>
基本资料
</div>
<div
class=
"row wrap"
>
<q-select
filled
stack-label
option-value=
"SId"
@
input=
"queryDeptTree(objOption.School_Id)"
option-label=
"SName"
v-model=
"objOption.School_Id"
ref=
"School_Id"
:options=
"schoolList"
label=
"所属校区"
:dense=
"false"
class=
"col-6 q-pb-lg q-pr-lg"
emit-value
map-options
/>
<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>
<q-select
filled
stack-label
option-value=
"PostId"
option-label=
"PostName"
v-model=
"objOption.Post_Id"
ref=
"Post_Id"
:options=
"PostList"
label=
"岗位"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.MName"
ref=
"MName"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"管理者名称"
:rules=
"[val => !!val || '请填写管理者姓名']"
/>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.IDCard"
ref=
"IDCard"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"身份证号"
:rules=
"[val => !!val || '身份证号']"
/>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
ref=
"ID"
v-model=
"objOption.Sex"
:options=
"SexList"
label=
"性别"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
v-model=
"objOption.Education"
ref=
"Education"
:options=
"EducationList"
label=
"学历"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
<q-input
type=
"tel"
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"objOption.MTel"
ref=
"MTel"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"联系电话"
:rules=
"[val => !!val || '请填写管理者联系电话']"
/>
<selectTree
v-if=
"DeptList&&DeptList.length>0"
: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>
<q-select
filled
stack-label
option-value=
"PostId"
option-label=
"PostName"
v-model=
"objOption.Post_Id"
ref=
"Post_Id"
:options=
"PostList"
label=
"岗位"
:dense=
"false"
class=
"col-6 q-pb-lg q-pb-lg"
emit-value
<q-input
filled
v-model=
"objOption.EntryTime"
class=
"col-6 q-pr-lg q-pb-lg"
mask=
"date"
label=
"入职时间"
>
<template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy1"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"objOption.EntryTime"
@
input=
"() => $refs.qDateProxy1.hide()"
/>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
<q-input
filled
v-model=
"objOption.LeaveTime"
class=
"col-6 q-pr-lg q-pb-lg"
mask=
"date"
label=
"离职时间"
>
<
template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy2"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"objOption.LeaveTime"
@
input=
"() => $refs.qDateProxy2.hide()"
/>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
<q-input
filled
v-model=
"objOption.BirthDate"
class=
"col-6 q-pr-lg q-pb-lg"
mask=
"date"
label=
"生日"
>
<
template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy3"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"objOption.BirthDate"
@
input=
"() => $refs.qDateProxy3.hide()"
/>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.Address"
ref=
"Address"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"地址"
:rules=
"[val => !!val || '地址']"
/>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.Account"
ref=
"Account"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"账号"
:rules=
"[val => !!val || '账号']"
/>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.Password"
ref=
"Password"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"密码"
:rules=
"[val => !!val || '密码']"
/>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
v-model=
"objOption.LeaveStatus"
ref=
"Education"
:options=
"LeaveStatusList"
label=
"在职状态"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
<div
class=
"col-6 q-pb-lg"
>
<div
class=
"col-6 q-pb-lg"
style=
"margin-top:20px;"
>
<q-uploader
style=
"display: inline-block;max-height: 320px;max-width: 100%; background-repeat:no-repeat"
:style=
"{'background-image':'url(' + objOption.MHead + ')'}"
max-files=
"1"
hide-upload-btn
@
rejected=
"onRejected"
label=
"管理者头像"
:max-file-size=
"512*1024"
accept=
".jpg, image/*"
auto-upload
:factory=
"uploadFile"
no-thumbnails
>
</q-uploader>
</div>
<q-toggle
size=
"md"
label=
"是否是老师"
color=
"primary"
:false-value=
"1"
:true-value=
"0"
v-model=
"objOption.Isteacher"
/>
</div>
</q-card-section>
<q-separator
/>
...
...
@@ -39,7 +95,9 @@
import
{
getSchoolDropdown
,
saveManager
,
queryManagerInfo
queryManagerInfo
,
getEducation
,
GetLeaveStatus
}
from
'../../../api/school/index'
//部门
import
{
...
...
@@ -76,6 +134,18 @@
RoleAuth
:
""
,
//角色
Dept_Id
:
0
,
//部门编号
Post_Id
:
0
,
//岗位编号
IDCard
:
''
,
//身份证
Sex
:
0
,
//性别(0-男,1-女)
Education
:
0
,
//学历
EntryTime
:
''
,
//入职时间
LeaveTime
:
''
,
//离职时间
BirthDate
:
''
,
//生日、
Address
:
''
,
//地址
LeaveStatus
:
0
,
//在职状态
Account
:
''
,
//账号
Password
:
''
,
//密码
Isteacher
:
1
,
// 是否是老师
},
optionTitle
:
""
,
schoolList
:
[],
...
...
@@ -83,15 +153,28 @@
DeptList
:
[],
//部门列表
PostList
:
[],
//岗位列表
returnString
:
[],
//默认岗位
SexList
:
[{
//性别
Id
:
0
,
Name
:
'男'
},
{
Id
:
1
,
Name
:
'女'
}],
EducationList
:
[],
//学历数组
LeaveStatusList
:[],
//在职状态
}
},
created
()
{
this
.
queryDeptTree
();
this
.
queryPostList
();
this
.
queryDeptTree
(
0
);
this
.
queryPostList
(
0
);
this
.
getSchool
();
this
.
getEducationList
();
this
.
getLeaveState
();
},
mounted
()
{
this
.
initObj
();
},
methods
:
{
getChild
(
deptArray
)
{
...
...
@@ -100,20 +183,24 @@
tempStr
=
deptArray
;
}
this
.
objOption
.
Dept_Id
=
tempStr
;
this
.
queryPostList
(
this
.
objOption
.
Dept_Id
);
},
//获取部门结构树
queryDeptTree
()
{
getDeptTree
({}).
then
(
res
=>
{
queryDeptTree
(
id
)
{
let
msg
=
{
School_Id
:
id
}
getDeptTree
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
DeptList
=
res
.
Data
;
}
})
},
//获取岗位列表
queryPostList
()
{
queryPostList
(
deptId
)
{
this
.
PostList
=
[];
var
postMsg
=
{
RB_Dept_Id
:
0
,
RB_Dept_Id
:
deptId
,
};
if
(
this
.
objOption
.
Dept_Id
)
{
postMsg
.
RB_Dept_Id
=
this
.
objOption
.
Dept_Id
;
...
...
@@ -151,6 +238,11 @@
getSchool
()
{
getSchoolDropdown
({}).
then
(
res
=>
{
this
.
schoolList
=
res
.
Data
;
var
obj
=
{
SName
:
'全部'
,
SId
:
0
}
this
.
schoolList
.
unshift
(
obj
);
this
.
$forceUpdate
();
})
},
...
...
@@ -199,6 +291,23 @@
this
.
saveLoading
=
false
})
},
//获取学历数据
getEducationList
()
{
getEducation
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
EducationList
=
res
.
Data
;
}
})
},
//获取在职状态
getLeaveState
(){
GetLeaveStatus
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
LeaveStatusList
=
res
.
Data
;
}
})
}
},
watch
:
{
"objOption.Dept_Id"
:
function
(
val
)
{
...
...
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