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
4e778044
Commit
4e778044
authored
Dec 11, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
ee2f9cc1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
118 additions
and
50 deletions
+118
-50
post.js
src/api/system/post.js
+11
-0
assistant-form.vue
src/components/school/assistant/assistant-form.vue
+38
-19
manager-form.vue
src/components/school/manager/manager-form.vue
+4
-4
teacher-form.vue
src/components/school/teacher/teacher-form.vue
+42
-18
dept.vue
src/pages/system/dept.vue
+23
-9
No files found.
src/api/system/post.js
View file @
4e778044
...
...
@@ -56,3 +56,14 @@ export function setPostStatusInfo(data) {
data
});
}
/**
* 获取部门岗位列表
*/
export
function
queryDeptPostList
(
data
)
{
return
request
({
url
:
'/User/GetDeptPostList'
,
method
:
'post'
,
data
});
}
src/components/school/assistant/assistant-form.vue
View file @
4e778044
...
...
@@ -11,7 +11,7 @@
class=
"col-6 q-pr-lg q-pb-lg"
label=
"助教名称"
:rules=
"[val => !!val || '请填写助教姓名']"
/>
<q-select
filled
stack-label
option-value=
"SId"
option-label=
"SName"
v-model=
"objOption.School_Id"
ref=
"School_Id"
:options=
"schoolList"
label=
"所属校区"
:dense=
"false"
class=
"col-6 q-pb-lg"
emit-value
map-options
:rules=
"[val => !!val || '请选择所属校区']"
@
input=
"
queryDeptTree(objOption.School_Id)
"
/>
map-options
:rules=
"[val => !!val || '请选择所属校区']"
@
input=
"
schoolChagne
"
/>
<q-input
type=
"tel"
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"objOption.AssistTel"
ref=
"AssistTel"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"联系电话"
:rules=
"[val => !!val || '请填写助教联系电话']"
/>
<selectTree
v-if=
"DeptList&&DeptList.length>0"
:treeData=
'DeptList'
:defaultArray=
"returnString"
...
...
@@ -55,7 +55,7 @@
}
from
'../../../api/system/dept'
//岗位
import
{
ge
tPostList
queryDep
tPostList
}
from
'../../../api/system/post'
import
extEditor
from
'../../common/ext-editor'
import
selectTree
from
'../../common/select-tree'
...
...
@@ -92,30 +92,50 @@
}
},
created
()
{
this
.
queryDeptTree
(
0
);
this
.
queryPostList
();
this
.
getSchool
();
},
mounted
()
{
this
.
initObj
()
},
methods
:
{
//学校改变
schoolChagne
()
{
this
.
objOption
.
Dept_Id
=
0
;
this
.
returnString
=
[
0
];
this
.
objOption
.
Post_Id
=
0
;
this
.
PostList
=
[];
this
.
queryDeptTree
();
},
//部门改变
deptChange
()
{
this
.
objOption
.
Post_Id
=
0
;
this
.
PostList
=
[];
},
getChild
(
deptArray
)
{
var
tempStr
=
""
;
if
(
deptArray
&&
deptArray
!=
''
)
{
tempStr
=
deptArray
;
}
this
.
objOption
.
Dept_Id
=
tempStr
;
if
(
this
.
saveObj
)
{
if
(
this
.
objOption
.
Dept_Id
!=
this
.
saveObj
.
Dept_Id
)
{
this
.
deptChange
();
this
.
queryPostList
();
}
}
else
{
this
.
deptChange
();
this
.
queryPostList
();
}
},
//获取部门结构树
queryDeptTree
(
schoolId
)
{
var
qM
sg
=
{
queryDeptTree
()
{
var
m
sg
=
{
School_Id
:
0
};
if
(
schoolId
)
{
qMsg
.
School_Id
=
school
Id
;
if
(
this
.
objOption
.
School_Id
&&
this
.
objOption
.
School_Id
!=
''
)
{
msg
.
School_Id
=
this
.
objOption
.
School_
Id
;
}
getDeptTree
(
qM
sg
).
then
(
res
=>
{
getDeptTree
(
m
sg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
DeptList
=
res
.
Data
;
}
...
...
@@ -123,16 +143,16 @@
},
//获取岗位列表
queryPostList
()
{
this
.
PostList
=
[];
var
postMsg
=
{
RB_Dept_Id
:
0
,
QDeptIds
:
""
,
};
if
(
this
.
objOption
.
Dept_Id
)
{
postMsg
.
RB_Dept_Id
=
this
.
objOption
.
Dept_Id
;
postMsg
.
QDeptIds
=
this
.
objOption
.
Dept_Id
;
}
ge
tPostList
(
postMsg
).
then
(
res
=>
{
queryDep
tPostList
(
postMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
PostList
=
res
.
Data
;
this
.
$forceUpdate
();
}
})
},
...
...
@@ -151,7 +171,11 @@
this
.
objOption
.
AssistIntro
=
this
.
saveObj
.
AssistIntro
;
this
.
objOption
.
Dept_Id
=
this
.
saveObj
.
Dept_Id
;
this
.
objOption
.
Post_Id
=
this
.
saveObj
.
Post_Id
;
if
(
this
.
objOption
.
School_Id
)
{
this
.
queryDeptTree
();
}
if
(
this
.
saveObj
.
Dept_Id
)
{
this
.
queryPostList
();
this
.
returnString
.
push
(
this
.
saveObj
.
Dept_Id
.
toString
());
}
}
else
{
...
...
@@ -187,7 +211,6 @@
this
.
$refs
.
School_Id
.
validate
()
this
.
$refs
.
AssistName
.
validate
()
this
.
$refs
.
AssistTel
.
validate
()
let
tempSchool
=
null
if
(
!
this
.
$refs
.
School_Id
.
hasError
&&
!
this
.
$refs
.
AssistName
.
hasError
&&
...
...
@@ -225,11 +248,7 @@
}
},
},
watch
:
{
"objOption.Dept_Id"
:
function
(
val
)
{
this
.
queryPostList
();
}
},
watch
:
{},
}
</
script
>
...
...
src/components/school/manager/manager-form.vue
View file @
4e778044
...
...
@@ -103,7 +103,7 @@
}
from
'../../../api/system/dept'
//岗位
import
{
ge
tPostList
queryDep
tPostList
}
from
'../../../api/system/post'
import
{
UploadSelfFile
,
...
...
@@ -210,12 +210,12 @@
queryPostList
(
deptId
)
{
this
.
PostList
=
[];
var
postMsg
=
{
RB_Dept_Id
:
deptId
,
QDeptIds
:
deptId
,
};
if
(
this
.
objOption
.
Dept_Id
)
{
postMsg
.
RB_Dept_Id
=
this
.
objOption
.
Dept_Id
;
postMsg
.
QDeptIds
=
this
.
objOption
.
Dept_Id
;
}
ge
tPostList
(
postMsg
).
then
(
res
=>
{
queryDep
tPostList
(
postMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
PostList
=
res
.
Data
;
}
...
...
src/components/school/teacher/teacher-form.vue
View file @
4e778044
...
...
@@ -11,7 +11,7 @@
class=
"col-6 q-pr-lg q-pb-lg"
label=
"教师名称"
:rules=
"[val => !!val || '请填写教师姓名']"
/>
<q-select
filled
stack-label
option-value=
"SId"
option-label=
"SName"
v-model=
"objOption.School_Id"
ref=
"School_Id"
:options=
"schoolList"
label=
"所属校区"
:dense=
"false"
class=
"col-6 q-pb-lg"
emit-value
map-options
:rules=
"[val => !!val || '请选择所属校区']"
/>
map-options
:rules=
"[val => !!val || '请选择所属校区']"
@
input=
"schoolChagne"
/>
<q-input
type=
"tel"
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"objOption.TeacherTel"
ref=
"TeacherTel"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"联系电话"
:rules=
"[val => !!val || '请填写教师联系电话']"
/>
<q-input
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"objOption.TeacherSay"
ref=
"TeacherSay"
...
...
@@ -89,7 +89,7 @@
}
from
'../../../api/system/dept'
//岗位
import
{
ge
tPostList
queryDep
tPostList
}
from
'../../../api/system/post'
import
extEditor
from
'../../common/ext-editor'
import
selectTree
from
'../../common/select-tree'
...
...
@@ -135,24 +135,50 @@
}
},
created
()
{
this
.
queryDeptTree
();
this
.
queryPostList
();
this
.
getSchool
()
},
mounted
()
{
this
.
initObj
()
},
methods
:
{
//学校改变
schoolChagne
()
{
this
.
objOption
.
Dept_Id
=
0
;
this
.
returnString
=
[
0
];
this
.
objOption
.
Post_Id
=
0
;
this
.
PostList
=
[];
this
.
queryDeptTree
();
},
//部门改变
deptChange
()
{
this
.
objOption
.
Post_Id
=
0
;
this
.
PostList
=
[];
},
getChild
(
deptArray
)
{
var
tempStr
=
""
;
if
(
deptArray
&&
deptArray
!=
''
)
{
tempStr
=
deptArray
;
}
this
.
objOption
.
Dept_Id
=
tempStr
;
if
(
this
.
saveObj
)
{
if
(
this
.
objOption
.
Dept_Id
!=
this
.
saveObj
.
Dept_Id
)
{
this
.
deptChange
();
this
.
queryPostList
();
}
}
else
{
this
.
deptChange
();
this
.
queryPostList
();
}
},
//获取部门结构树
queryDeptTree
()
{
getDeptTree
({}).
then
(
res
=>
{
var
msg
=
{
School_Id
:
0
};
if
(
this
.
objOption
.
School_Id
&&
this
.
objOption
.
School_Id
!=
''
)
{
msg
.
School_Id
=
this
.
objOption
.
School_Id
;
}
getDeptTree
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
DeptList
=
res
.
Data
;
}
...
...
@@ -160,16 +186,16 @@
},
//获取岗位列表
queryPostList
()
{
this
.
PostList
=
[];
var
postMsg
=
{
RB_Dept_Id
:
0
,
QDeptIds
:
""
,
};
if
(
this
.
objOption
.
Dept_Id
)
{
postMsg
.
RB_Dept_Id
=
this
.
objOption
.
Dept_Id
;
postMsg
.
QDeptIds
=
this
.
objOption
.
Dept_Id
;
}
ge
tPostList
(
postMsg
).
then
(
res
=>
{
queryDep
tPostList
(
postMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
PostList
=
res
.
Data
;
this
.
$forceUpdate
();
}
})
},
...
...
@@ -197,9 +223,12 @@
this
.
objOption
.
TeachTag
=
this
.
saveObj
.
TeachTag
;
this
.
objOption
.
Dept_Id
=
this
.
saveObj
.
Dept_Id
;
this
.
objOption
.
Post_Id
=
this
.
saveObj
.
Post_Id
;
if
(
this
.
saveObj
.
Dept_Id
)
{
this
.
returnString
.
push
(
this
.
saveObj
.
Dept_Id
.
toString
());
if
(
this
.
objOption
.
School_Id
)
{
this
.
queryDeptTree
();
}
if
(
this
.
saveObj
.
Dept_Id
)
{
this
.
queryPostList
();
this
.
returnString
.
push
(
this
.
saveObj
.
Dept_Id
.
toString
());
}
if
(
this
.
objOption
.
TeachTag
&&
this
.
objOption
.
TeachTag
.
length
>
0
)
{
this
.
tags
=
JSON
.
parse
(
this
.
objOption
.
TeachTag
)
...
...
@@ -276,7 +305,6 @@
this
.
closeSaveForm
()
}).
catch
(()
=>
{
this
.
saveLoading
=
false
})
}
else
{
this
.
$q
.
notify
({
...
...
@@ -291,11 +319,7 @@
}
},
},
watch
:
{
"objOption.Dept_Id"
:
function
(
val
)
{
this
.
queryPostList
();
}
},
watch
:
{},
}
</
script
>
...
...
src/pages/system/dept.vue
View file @
4e778044
...
...
@@ -3,9 +3,8 @@
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-col-gutter-md"
>
<div
class=
"col"
>
<selectSearch
:Data=
'schoolList'
optionValue=
"SId"
optionLabel=
"SName"
:densetype=
"false"
:vModel=
"msg.School_Id"
label=
"校区"
@
returnData=
"returnData"
:useInput=
"true"
:reactiveRules=
"false"
>
<selectSearch
:Data=
'schoolList'
optionValue=
"SId"
optionLabel=
"SName"
:densetype=
"false"
:vModel=
"msg.School_Id"
label=
"校区"
@
returnData=
"returnData"
:useInput=
"true"
:reactiveRules=
"false"
>
</selectSearch>
</div>
<div
class=
"col"
>
...
...
@@ -14,8 +13,8 @@
</div>
<div
class=
"col"
>
<q-select
@
input=
"resetSearch"
filled
stack-label
option-value=
"value"
option-label=
"label"
v-model=
"msg.DeptTier"
ref=
"DeptTier"
:options=
"DeptTierList"
label=
"部门层级"
:dense=
"false"
emit-value
map-options
clearable
@
clear=
"resetSearch"
/>
v-model=
"msg.DeptTier"
ref=
"DeptTier"
:options=
"DeptTierList"
label=
"部门层级"
:dense=
"false"
emit-value
map-options
clearable
@
clear=
"resetSearch"
/>
</div>
<div
class=
"col"
>
<selectTree
v-if=
"DeptTreeList&&DeptTreeList.length>0"
:treeData=
'DeptTreeList'
:defaultArray=
"returnString"
...
...
@@ -36,7 +35,8 @@
<q-space
/>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"新增部门"
@
click=
"EditDept(null)"
/>
<q-btn
color=
"secondary"
flat
size=
"sm"
icon=
"iconfont icon-zuzhijiagou"
label=
"组织机构图"
@
click=
"gotoRelation()"
/>
<q-btn
color=
"secondary"
flat
size=
"sm"
icon=
"iconfont icon-zuzhijiagou"
label=
"组织机构图"
@
click=
"gotoRelation()"
/>
</div>
</
template
>
<
template
v-slot:body-cell-Status=
"props"
>
...
...
@@ -50,6 +50,14 @@
{{
props
.
row
.
School_Id
>
0
?
props
.
row
.
SchoolName
:
'总部'
}}
</q-td>
</
template
>
<
template
v-slot:body-cell-DeptPostList=
"props"
>
<q-td
:props=
"props"
>
<template
v-if=
"props.row.DeptPostList&&props.row.DeptPostList.length>0"
v-for=
"(item,index) in props.row.DeptPostList"
>
<q-badge
:key=
"index"
color=
"red"
:label=
"item.PostName"
class=
"q-mr-xs"
/>
</
template
>
</q-td>
</template>
<
template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.pageIndex"
color=
"primary"
:max=
"pageCount"
:input=
"true"
@
input=
"changePage"
/>
...
...
@@ -123,6 +131,12 @@
field
:
'DeptTel'
,
align
:
'left'
},
{
name
:
'DeptPostList'
,
label
:
'绑定岗位'
,
field
:
'DeptPostList'
,
align
:
'left'
},
{
name
:
'DeptSort'
,
label
:
'排序'
,
...
...
@@ -251,7 +265,7 @@
this
.
loading
=
false
;
this
.
data
=
res
.
Data
.
PageData
;
this
.
pageCount
=
res
.
Data
.
PageCount
;
if
(
this
.
msg
.
DeptTier
==
"0"
)
{
this
.
msg
.
DeptTier
=
""
}
...
...
@@ -323,8 +337,8 @@
});
},
returnData
(
data
)
{
this
.
msg
.
School_Id
=
data
;
this
.
resetSearch
()
this
.
msg
.
School_Id
=
data
;
this
.
resetSearch
()
}
}
}
...
...
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