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
d5e87c97
Commit
d5e87c97
authored
Jul 20, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
56e662bf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
27 deletions
+27
-27
select-tree.vue
src/components/common/select-tree.vue
+14
-17
assistant-form.vue
src/components/school/assistant/assistant-form.vue
+13
-10
No files found.
src/components/common/select-tree.vue
View file @
d5e87c97
...
...
@@ -4,7 +4,7 @@
<template
v-if=
"multiple"
>
<q-select
filled
v-model=
"resultObj"
:options=
"selectList"
clearable
@
clear=
"clearData()"
:label=
"tipText"
:multiple=
"multiple"
emit-value
map-options
>
<template
v-slot:option=
"scope"
>
<template
v-slot:option=
"scope"
>
<q-item
v-if=
"scope.index==-1"
>
<q-item-section>
<q-tree
:nodes=
"treeData"
:node-key=
"nodeKey"
:label-key=
"labelKey"
:children-key=
"childrenKey"
...
...
@@ -117,23 +117,20 @@
this
.
setTreeCheckNode
()
},
//有默认值
defaultArray
:
{
handler
(
newValue
)
{
this
.
chooseTreeNodeArray
=
[];
if
(
this
.
defaultArray
&&
this
.
defaultArray
.
length
>
0
)
{
this
.
defaultArray
.
forEach
(
item
=>
{
if
(
item
!=
''
)
{
if
(
this
.
multiple
)
{
this
.
chooseTreeNodeArray
.
push
(
item
)
}
else
{
this
.
chooseTreeNodeArray
=
[
item
];
}
defaultArray
(
newValue
)
{
this
.
chooseTreeNodeArray
=
[];
if
(
this
.
defaultArray
&&
this
.
defaultArray
.
length
>
0
)
{
this
.
defaultArray
.
forEach
(
item
=>
{
if
(
item
!=
''
)
{
if
(
this
.
multiple
)
{
this
.
chooseTreeNodeArray
.
push
(
item
)
}
else
{
this
.
chooseTreeNodeArray
=
[
item
];
}
})
}
this
.
setTreeCheckNode
();
},
immediate
:
true
}
})
}
this
.
setTreeCheckNode
();
},
resultObj
(
val
)
{
var
resultStr
=
""
;
...
...
src/components/school/assistant/assistant-form.vue
View file @
d5e87c97
...
...
@@ -11,20 +11,20 @@
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
@
input=
"schoolChagne"
/>
map-options
@
input=
"schoolChagne"
/>
<q-input
type=
"tel"
filled
stack-label
maxlength=
"20"
: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
"
nodeKey=
"DeptId"
:multiple=
"false"
labelKey=
"DeptName"
childrenKey=
"ChildList"
tipText=
"选择部门"
@
getChild=
"getChild"
classStr=
"col-6 q-pr-lg q-pb-lg"
>
</selectTree>
<selectTree
:treeData=
'DeptList'
:defaultArray=
"returnString"
nodeKey=
"DeptId"
:multiple=
"false
"
labelKey=
"DeptName"
childrenKey=
"ChildList"
tipText=
"选择部门"
@
getChild=
"getChild"
classStr=
"col-6 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-p
b
-lg q-pb-lg"
emit-value
ref=
"Post_Id"
:options=
"PostList"
label=
"岗位"
:dense=
"false"
class=
"col-6 q-p
r
-lg q-pb-lg"
emit-value
map-options
/>
<div
class=
"col-6 q-pb-lg"
>
<q-uploader
style=
"display: inline-block;max-height: 320px;max-width: 100%; background-repeat:no-repeat"
:style=
"
{'background-image':'url(' + objOption.AssistIcon + ')'}" max-files="1" hide-upload-btn
@rejected="onRejected" label="助教头像"
accept=".jpg, image/*" auto-upload
:factory="uploadFile"
no-thumbnails>
@rejected="onRejected" label="助教头像"
accept=".jpg, image/*" auto-upload :factory="uploadFile"
no-thumbnails>
</q-uploader>
</div>
</div>
...
...
@@ -130,14 +130,17 @@
//获取部门结构树
queryDeptTree
()
{
var
msg
=
{
School_Id
:
0
School_Id
:
-
1
};
if
(
this
.
objOption
.
School_Id
&&
this
.
objOption
.
School_Id
!=
''
)
{
if
(
this
.
objOption
.
School_Id
!=
''
&&
this
.
objOption
.
School_Id
>=
0
)
{
msg
.
School_Id
=
this
.
objOption
.
School_Id
;
}
getDeptTree
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
DeptList
=
res
.
Data
;
if
(
this
.
objOption
.
Dept_Id
)
{
this
.
returnString
.
push
(
this
.
objOption
.
Dept_Id
.
toString
());
}
}
})
},
...
...
@@ -171,7 +174,7 @@
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
)
{
if
(
this
.
objOption
.
School_Id
>=
0
)
{
this
.
queryDeptTree
();
}
if
(
this
.
saveObj
.
Dept_Id
)
{
...
...
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