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
4dacfa85
Commit
4dacfa85
authored
Apr 29, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
bc5b44c3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
15 deletions
+41
-15
classstu-form.vue
src/components/course/classstu-form.vue
+41
-15
No files found.
src/components/course/classstu-form.vue
View file @
4dacfa85
...
@@ -33,8 +33,19 @@
...
@@ -33,8 +33,19 @@
<div
style=
"margin:10px 0 15px 0;"
>
邀请新学员
</div>
<div
style=
"margin:10px 0 15px 0;"
>
邀请新学员
</div>
</div>
</div>
<div
class=
"drop_NameDown"
>
<div
class=
"drop_NameDown"
>
<q-select
dense
standout
filled
v-model=
"checkedStudent"
:options=
"InvitationOptions"
<!--
<q-select
dense
standout=
"bg-primary text-white"
v-model=
"checkedStudent"
:options=
"InvitationList"
@
filter=
"filterInvitaFn"
emit-value
map-options
input-debounce=
"0"
use-input
option-value=
"StuId"
option-label=
"StuName"
label=
"选择学员"
/>
@
filter=
"filterCourseFn"
use-input
option-value=
"StuId"
option-label=
"StuName"
label=
"选择学员"
/>
-->
<q-select
filled
stack-label
use-input
input-debounce=
"0"
option-value=
"StuId"
option-label=
"StuName"
v-model=
"checkedStudent"
:options=
"InvitationList"
label=
"选择学员"
:dense=
"false"
emit-value
map-options
@
filter=
"filterFn"
>
<template
v-slot:no-option
>
<q-item>
<q-item-section
class=
"text-grey"
>
未找到相关数据
</q-item-section>
</q-item>
</
template
>
</q-select>
</div>
</div>
<q-card-actions
align=
"right"
class=
"bg-white"
style=
"margin-top:20px;"
>
<q-card-actions
align=
"right"
class=
"bg-white"
style=
"margin-top:20px;"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"ishowInvit=false"
/>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"ishowInvit=false"
/>
...
@@ -147,8 +158,8 @@
...
@@ -147,8 +158,8 @@
StudentId
:
0
StudentId
:
0
},
},
InvitationList
:
[],
//学员下拉数据
InvitationList
:
[],
//学员下拉数据
AllInvitationList
:
[],
checkedStudent
:
''
,
//选择学员
checkedStudent
:
''
,
//选择学员
InvitationOptions
:[]
}
}
},
},
created
()
{
created
()
{
...
@@ -159,14 +170,19 @@
...
@@ -159,14 +170,19 @@
this
.
getStudentList
();
this
.
getStudentList
();
},
},
methods
:
{
methods
:
{
filterInvitaFn
(
val
,
update
,
abort
)
{
//筛选员工
filterFn
(
val
,
update
)
{
update
(()
=>
{
update
(()
=>
{
this
.
InvitationOptions
=
this
.
InvitationList
.
filter
(
if
(
val
===
''
)
{
v
=>
v
.
StuName
.
indexOf
(
val
)
>
-
1
this
.
InvitationList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
AllInvitationList
))
);
}
else
{
});
const
needle
=
val
.
toLowerCase
()
this
.
InvitationList
=
this
.
AllInvitationList
.
filter
(
v
=>
v
.
StuName
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
)
}
})
},
},
//获取学员信息
//获取学员信息
getStudentData
()
{
getStudentData
()
{
this
.
studentList
=
[];
this
.
studentList
=
[];
...
@@ -228,8 +244,12 @@
...
@@ -228,8 +244,12 @@
};
};
GetStudentList
({}).
then
(
res
=>
{
GetStudentList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
this
.
InvitationList
=
res
.
Data
;
var
jsonData
=
res
.
Data
;
this
.
InvitationOptions
=
this
.
InvitationList
;
if
(
jsonData
&&
jsonData
.
length
>
0
)
{
this
.
AllInvitationList
=
JSON
.
parse
(
JSON
.
stringify
(
jsonData
));
this
.
InvitationList
=
JSON
.
parse
(
JSON
.
stringify
(
jsonData
));
}
console
.
log
(
"this.InvitationList"
,
this
.
InvitationList
);
}
}
})
})
},
},
...
@@ -243,12 +263,18 @@
...
@@ -243,12 +263,18 @@
})
})
return
;
return
;
}
else
{
}
else
{
let
checkedStuObj
=
{};
this
.
InvitationList
.
forEach
(
x
=>
{
if
(
x
.
StuId
==
this
.
checkedStudent
){
checkedStuObj
=
x
;
}
})
this
.
invitationMsg
.
ClassId
=
this
.
setingObj
.
ClassId
;
this
.
invitationMsg
.
ClassId
=
this
.
setingObj
.
ClassId
;
this
.
invitationMsg
.
GuestName
=
this
.
checkedStudent
.
StuName
;
this
.
invitationMsg
.
GuestName
=
checkedStuObj
.
StuName
;
this
.
invitationMsg
.
Sex
=
this
.
checkedStudent
.
StuSex
;
this
.
invitationMsg
.
Sex
=
checkedStuObj
.
StuSex
;
this
.
invitationMsg
.
Mobile
=
this
.
checkedStudent
.
StuTel
;
this
.
invitationMsg
.
Mobile
=
checkedStuObj
.
StuTel
;
this
.
invitationMsg
.
BirthDay
=
this
.
checkedStudent
.
StuBirthStr
;
this
.
invitationMsg
.
BirthDay
=
checkedStuObj
.
StuBirthStr
;
this
.
invitationMsg
.
StudentId
=
this
.
checkedStudent
.
StuId
;
this
.
invitationMsg
.
StudentId
=
checkedStuObj
.
StuId
;
this
.
invitationMsg
.
School_Id
=
this
.
setingObj
.
School_Id
;
this
.
invitationMsg
.
School_Id
=
this
.
setingObj
.
School_Id
;
AddClassStudent
(
this
.
invitationMsg
).
then
(
res
=>
{
AddClassStudent
(
this
.
invitationMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
...
...
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