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
6f0a6329
Commit
6f0a6329
authored
May 12, 2022
by
zhengke
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/luochao/confucius
parents
96bed70e
dbf06a39
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
373 additions
and
387 deletions
+373
-387
student-from.vue
src/components/activity/student-from.vue
+106
-28
student-Assit.vue
src/components/school/student/student-Assit.vue
+267
-359
No files found.
src/components/activity/student-from.vue
View file @
6f0a6329
...
@@ -8,18 +8,62 @@
...
@@ -8,18 +8,62 @@
right
:
-5px
;
right
:
-5px
;
top
:
-5px
;
top
:
-5px
;
}
}
.activityStuForm
.selectClass
{
width
:
1026px
;
border
:
1px
dashed
#E1E1E5
;
padding-top
:
12px
;
border-radius
:
4px
;
padding
:
12px
4px
0
4px
;
margin-top
:
5px
;
}
.activityStuForm
.selectClass
span
{
display
:
inline-block
;
background
:
#F2F5FA
;
padding
:
0
10px
;
height
:
26px
;
line-height
:
26px
;
border-radius
:
14px
;
color
:
#181E33
;
margin-left
:
10px
;
margin-bottom
:
12px
;
position
:
relative
;
font-size
:
12px
;
cursor
:
pointer
;
}
.activityStuForm
.selectClass
span
i
{
position
:
absolute
;
right
:
-8px
;
top
:
-10px
;
display
:
none
;
color
:
gray
;
cursor
:
pointer
;
}
.activityStuForm
.selectClass
span
:hover
i
{
display
:
block
;
}
</
style
>
</
style
>
<
template
>
<
template
>
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
transition-hide=
"scale"
>
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width: 500px;max-width:500px;"
>
<q-card
style=
"width: 500px;max-width:500px;"
class=
"activityStuForm"
>
<q-card-section>
<q-card-section>
<div
class=
"text-h6"
>
{{
addMsg
.
I
D
==
0
?
'选择学员'
:
'修改学员'
}}
</div>
<div
class=
"text-h6"
>
{{
addMsg
.
I
d
==
0
?
'选择学员'
:
'修改学员'
}}
</div>
</q-card-section>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<div
class=
"row wrap"
>
<div
class=
"row wrap"
>
<q-select
filled
stack-label
clearable
use-input
option-value=
"Id"
option-label=
"AccountName"
<q-btn
color=
"accent"
size=
"sm"
@
click=
"showClassStu"
class=
"q-mr-md"
label=
"选择学员"
v-if=
"addMsg.Id==0"
/>
v-model=
"addMsg.GuestId"
:options=
"filterstudentList"
@
filter=
"filterStudentFn"
label=
"学员编号"
ref=
"GuestId"
<br
/>
:rules=
"[val => !!val || '请选择学员']"
class=
"col-12 q-pb-lg"
emit-value
map-options
/>
<div
class=
"selectClass"
v-if=
"addMsg.GuestIdList&&addMsg.GuestIdList.length>0"
>
<span
v-for=
"(item,index) in addMsg.GuestIdList"
:key=
"index"
style=
"padding-left:5px;"
>
{{
item
.
GuestName
}}
<i
class=
"iconfont icon-shanchu1"
@
click=
"delStudentName(index)"
v-if=
"addMsg.Id==0"
></i>
</span>
</div>
</div>
<div
class=
"row wrap"
style=
"margin-top:10px;"
>
<div
class=
"col-12 q-pb-lg"
>
<div
class=
"col-12 q-pb-lg"
>
<q-input
filled
v-model=
"addMsg.StartTime"
mask=
"####-##-## ##:##:##"
ref=
"StartTime"
label=
"开始时间"
<q-input
filled
v-model=
"addMsg.StartTime"
mask=
"####-##-## ##:##:##"
ref=
"StartTime"
label=
"开始时间"
:rules=
"[val => !!val || '请选择开始时间']"
>
:rules=
"[val => !!val || '请选择开始时间']"
>
...
@@ -61,6 +105,9 @@
...
@@ -61,6 +105,9 @@
@
click=
"saveActive"
/>
@
click=
"saveActive"
/>
</q-card-actions>
</q-card-actions>
</q-card>
</q-card>
<classstutreeForm
v-if=
"isShowClassStu"
:sendStudent=
"sendStudent"
@
close=
"closeClassStuForm"
@
success=
"getClassStuList"
>
</classstutreeForm>
</q-dialog>
</q-dialog>
</template>
</template>
<
script
>
<
script
>
...
@@ -69,6 +116,7 @@
...
@@ -69,6 +116,7 @@
getActivitySurveyGuestModule
,
getActivitySurveyGuestModule
,
getAccountStudentList
getAccountStudentList
}
from
'../../api/studentmsg/index'
}
from
'../../api/studentmsg/index'
import
classstutreeForm
from
'../exam/classstutree-form'
export
default
{
export
default
{
props
:
{
props
:
{
saveObj
:
{
saveObj
:
{
...
@@ -80,17 +128,23 @@
...
@@ -80,17 +128,23 @@
default
:
null
default
:
null
}
}
},
},
components
:
{
classstutreeForm
,
},
data
()
{
data
()
{
return
{
return
{
persistent
:
true
,
persistent
:
true
,
addMsg
:
{
addMsg
:
{
Id
:
0
,
//新增传0
Id
:
0
,
//新增传0
GuestType
:
2
,
//客户类型(1-小程序用户,2-学员用户)
GuestType
:
2
,
//客户类型(1-小程序用户,2-学员用户)
GuestIdList
:
[],
//学员编号
GuestId
:
''
,
//学员编号
GuestId
:
''
,
//学员编号
StartTime
:
""
,
//开始时间
StartTime
:
""
,
//开始时间
EndTime
:
""
,
//结束时间
EndTime
:
""
,
//结束时间
SurveyId
:
0
//意见调查表编号
SurveyId
:
0
//意见调查表编号
},
},
isShowClassStu
:
false
,
//是否显示学员弹窗
sendStudent
:
[],
//已选择的学员信息
saveLoading
:
false
,
saveLoading
:
false
,
studentAccountList
:
[],
studentAccountList
:
[],
filterstudentList
:
[],
filterstudentList
:
[],
...
@@ -101,6 +155,31 @@
...
@@ -101,6 +155,31 @@
this
.
initObj
();
this
.
initObj
();
},
},
methods
:
{
methods
:
{
//选择学员
showClassStu
()
{
this
.
isShowClassStu
=
true
;
},
//刷新页面
getClassStuList
(
array
)
{
this
.
addMsg
.
GuestIdList
=
[];
if
(
array
&&
array
.
length
>
0
)
{
array
.
forEach
(
item
=>
{
this
.
addMsg
.
GuestIdList
.
push
({
GuestId
:
item
.
Account_Id
,
GuestName
:
item
.
Name
,
});
})
}
this
.
isShowClassStu
=
false
;
},
//删除学员
delStudentName
(
index
)
{
this
.
addMsg
.
GuestIdList
.
splice
(
index
,
1
);
},
//关闭选择学员弹窗
closeClassStuForm
()
{
this
.
isShowClassStu
=
false
;
},
//初始化表单
//初始化表单
initObj
()
{
initObj
()
{
this
.
addMsg
.
SurveyId
=
this
.
ID
this
.
addMsg
.
SurveyId
=
this
.
ID
...
@@ -113,12 +192,14 @@
...
@@ -113,12 +192,14 @@
this
.
addMsg
.
GuestId
=
tempData
.
GuestId
;
this
.
addMsg
.
GuestId
=
tempData
.
GuestId
;
this
.
addMsg
.
StartTime
=
tempData
.
StartTime
;
this
.
addMsg
.
StartTime
=
tempData
.
StartTime
;
this
.
addMsg
.
EndTime
=
tempData
.
EndTime
;
this
.
addMsg
.
EndTime
=
tempData
.
EndTime
;
this
.
addMsg
.
GuestIdList
=
tempData
.
GuestIdList
;
})
})
}
else
{
}
else
{
this
.
addMsg
.
Id
=
0
;
this
.
addMsg
.
Id
=
0
;
this
.
addMsg
.
GuestId
=
''
;
this
.
addMsg
.
GuestId
=
''
;
this
.
addMsg
.
StartTime
=
''
;
this
.
addMsg
.
StartTime
=
''
;
this
.
addMsg
.
EndTime
=
''
;
this
.
addMsg
.
EndTime
=
''
;
this
.
addMsg
.
GuestIdList
=
[];
}
}
},
},
//意见调查开始时间
//意见调查开始时间
...
@@ -142,11 +223,8 @@
...
@@ -142,11 +223,8 @@
},
},
//保存数据
//保存数据
saveActive
()
{
saveActive
()
{
this
.
$refs
.
GuestId
.
validate
();
this
.
$refs
.
StartTime
.
validate
();
this
.
$refs
.
StartTime
.
validate
();
this
.
$refs
.
EndTime
.
validate
();
this
.
$refs
.
EndTime
.
validate
();
//&& !this.$refs.StartTime.hasError && !this.$refs.EndTime.hasError
if
(
!
this
.
$refs
.
GuestId
.
hasError
)
{
setActivitySurveyGuest
(
this
.
addMsg
).
then
(
res
=>
{
setActivitySurveyGuest
(
this
.
addMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
this
.
$q
.
notify
({
...
@@ -166,7 +244,7 @@
...
@@ -166,7 +244,7 @@
})
})
}
}
})
})
}
},
},
// 学生编号
// 学生编号
studentAccount
()
{
studentAccount
()
{
...
...
src/components/school/student/student-Assit.vue
View file @
6f0a6329
<
style
>
<
style
>
.delAssist
{
.delAssist
{
position
:
absolute
;
position
:
absolute
;
right
:
-16px
;
right
:
-16px
;
top
:
-12px
;
top
:
-12px
;
...
@@ -12,129 +12,61 @@
...
@@ -12,129 +12,61 @@
text-align
:
center
;
text-align
:
center
;
line-height
:
20px
;
line-height
:
20px
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.studentAssitTable
{
.studentAssitTable
{
width
:
100%
;
width
:
100%
;
text-align
:
center
;
text-align
:
center
;
}
}
.studentAssitTable
td
{
.studentAssitTable
td
{
height
:
40px
;
height
:
40px
;
line-height
:
40px
;
line-height
:
40px
;
border
:
1px
solid
#f2f2f2
;
border
:
1px
solid
#f2f2f2
;
}
}
.studentAssitTable
th
{
.studentAssitTable
th
{
height
:
40px
;
height
:
40px
;
background-color
:
#f2f2f2
;
background-color
:
#f2f2f2
;
}
}
</
style
>
</
style
>
<
template
>
<
template
>
<div>
<div>
<!--课程顾问 或有教师权限-->
<!--课程顾问 或有教师权限-->
<template
<template
v-if=
"
v-if=
"
userInfo.IsCourseConsultant == 1 ||
userInfo.IsCourseConsultant == 1 ||
isHaveTeacherEdit ||
isHaveTeacherEdit ||
isHaveXueManager
isHaveXueManager
"
"
>
>
<q-btn
label=
"新增"
color=
"accent q-mb-lg"
size=
"sm"
@
click=
"isShowAdd = true"
/>
<q-btn
label=
"新增"
color=
"accent q-mb-lg"
size=
"sm"
@
click=
"isShowAdd = true"
/>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<span
class=
"text-grey-4"
>
抱歉,你没有权限邀请其他服务人员
</span>
<span
class=
"text-grey-4"
>
抱歉,你没有权限邀请其他服务人员
</span>
</
template
>
</
template
>
<q-btn
<q-btn
label=
"取消"
style=
"margin-left:20px;"
v-if=
"isShowAdd"
flat
color=
"grey-10 q-mb-lg"
size=
"sm"
label=
"取消"
@
click=
"isShowAdd = false"
/>
style=
"margin-left:20px;"
v-if=
"isShowAdd"
flat
color=
"grey-10 q-mb-lg"
size=
"sm"
@
click=
"isShowAdd = false"
/>
<
template
v-if=
"isShowAdd"
>
<
template
v-if=
"isShowAdd"
>
<div
class=
"row wrap"
>
<div
class=
"row wrap"
>
<q-select
<q-select
filled
stack-label
option-label=
"Name"
@
input=
"changeData"
v-model=
"AssitMsg.AssistType"
filled
option-value=
"Id"
:options=
"AssistDropList"
label=
"角色"
dense
use-input
class=
"col-6 q-pb-lg q-pr-lg"
stack-label
emit-value
map-options
/>
option-label=
"Name"
<q-select
filled
dense
v-if=
"AssitMsg.AssistType == 2"
v-model=
"AssitMsg.AssistId"
:options=
"RoleListData"
@
input=
"changeData"
option-label=
"EmployeeName"
class=
"col-6 q-pb-lg"
option-value=
"Id"
emit-value
use-input
map-options
/>
v-model=
"AssitMsg.AssistType"
<q-select
filled
dense
v-else-if=
"AssitMsg.AssistType == 4"
v-model=
"AssitMsg.AssistId"
:options=
"TeacherList"
option-value=
"Id"
option-label=
"EmployeeName"
class=
"col-6 q-pb-lg"
option-value=
"Id"
emit-value
use-input
map-options
/>
:options=
"AssistDropList"
<q-select
filled
dense
v-else
v-model=
"AssitMsg.AssistId"
@
filter=
"filterEmployee"
use-input
label=
"角色"
:options=
"myEmployeeList"
option-label=
"EmployeeName"
class=
"col-6 q-pb-lg"
option-value=
"Id"
emit-value
dense
map-options
/>
use-input
class=
"col-6 q-pb-lg q-pr-lg"
emit-value
map-options
/>
<q-select
filled
dense
v-if=
"AssitMsg.AssistType == 2"
v-model=
"AssitMsg.AssistId"
:options=
"RoleListData"
option-label=
"EmployeeName"
class=
"col-6 q-pb-lg"
option-value=
"Id"
emit-value
use-input
map-options
/>
<q-select
filled
dense
v-else-if=
"AssitMsg.AssistType == 4"
v-model=
"AssitMsg.AssistId"
:options=
"TeacherList"
option-label=
"EmployeeName"
class=
"col-6 q-pb-lg"
option-value=
"Id"
emit-value
use-input
map-options
/>
<q-select
filled
dense
v-else
v-model=
"AssitMsg.AssistId"
@
filter=
"filterEmployee"
use-input
:options=
"myEmployeeList"
option-label=
"EmployeeName"
class=
"col-6 q-pb-lg"
option-value=
"Id"
emit-value
map-options
/>
<i
class=
"iconfont icon-close delAssist"
></i>
<i
class=
"iconfont icon-close delAssist"
></i>
</div>
</div>
<div
class=
"row wrap"
style=
"margin-bottom:10px;float:right;"
>
<div
class=
"row wrap"
style=
"margin-bottom:10px;float:right;"
>
<q-btn
<q-btn
label=
"保存"
color=
"accent q-mb-lg"
size=
"md"
@
click=
"saveAssit()"
/>
label=
"保存"
color=
"accent q-mb-lg"
size=
"md"
@
click=
"saveAssit()"
/>
</div>
</div>
</
template
>
</
template
>
<div
v-if=
"dataList.length > 0"
>
<div
v-if=
"dataList.length > 0"
>
<table
<table
class=
"studentAssitTable"
style=
"border:1px solid #f2f2f2;border-collapse:collapse;"
cellspacing=
"0"
class=
"studentAssitTable"
cellpadding=
"0"
>
style=
"border:1px solid #f2f2f2;border-collapse:collapse;"
cellspacing=
"0"
cellpadding=
"0"
>
<tr>
<tr>
<th
style=
"width:180px;"
>
角色
</th>
<th
style=
"width:180px;"
>
角色
</th>
<th
style=
"width:180px;"
>
人员
</th>
<th
style=
"width:180px;"
>
人员
</th>
...
@@ -144,57 +76,25 @@
...
@@ -144,57 +76,25 @@
<td>
{{ item.AssistTypeName }}
</td>
<td>
{{ item.AssistTypeName }}
</td>
<td>
{{ item.AssistName }}
</td>
<td>
{{ item.AssistName }}
</td>
<td>
<td>
<
template
<
template
v-if=
"
v-if=
"
userInfo.IsCourseConsultant == 1 ||
userInfo.IsCourseConsultant == 1 ||
isHaveTeacherEdit ||
isHaveTeacherEdit ||
isHaveXueManager
isHaveXueManager
"
"
>
>
<div
v-if=
"
<div
v-if=
"
userInfo.IsCourseConsultant == 1 &&
userInfo.IsCourseConsultant == 1 &&
(item.AssistType == 2 || item.AssistType == 3)
(item.AssistType == 2 || item.AssistType == 3 || item.AssistType == 5)
"
"
>
>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"修改"
<q-btn
@
click=
"getEditInfo(item)"
></q-btn>
flat
<q-btn
flat
size=
"xs"
icon=
"delete"
color=
"negative"
style=
"font-weight:400"
label=
"删除"
size=
"xs"
@
click=
"deleteAssits(item.Id)"
/>
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"修改"
@
click=
"getEditInfo(item)"
></q-btn>
<q-btn
flat
size=
"xs"
icon=
"delete"
color=
"negative"
style=
"font-weight:400"
label=
"删除"
@
click=
"deleteAssits(item.Id)"
/>
</div>
</div>
<div
v-if=
"isHaveTeacherEdit && item.AssistType == 4"
>
<div
v-if=
"isHaveTeacherEdit && item.AssistType == 4"
>
<q-btn
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"修改"
flat
@
click=
"getEditInfo(item)"
></q-btn>
size=
"xs"
<q-btn
flat
size=
"xs"
icon=
"delete"
color=
"negative"
style=
"font-weight:400"
label=
"删除"
icon=
"edit"
@
click=
"deleteAssits(item.Id)"
/>
color=
"accent"
style=
"font-weight:400"
label=
"修改"
@
click=
"getEditInfo(item)"
></q-btn>
<q-btn
flat
size=
"xs"
icon=
"delete"
color=
"negative"
style=
"font-weight:400"
label=
"删除"
@
click=
"deleteAssits(item.Id)"
/>
</div>
</div>
</
template
>
</
template
>
</td>
</td>
...
@@ -204,16 +104,20 @@
...
@@ -204,16 +104,20 @@
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
import
{
GetAssistTypeList
,
GetAssistTypeList
,
SetStudentAssist
,
SetStudentAssist
,
GetStudentAssistList
,
GetStudentAssistList
,
RemoveStudentAssist
RemoveStudentAssist
}
from
"../../../api/sale/sale"
;
}
from
"../../../api/sale/sale"
;
import
{
queryEmployee
}
from
"../../../api/users/user"
;
import
{
import
{
mapState
}
from
"vuex"
;
queryEmployee
}
from
"../../../api/users/user"
;
import
{
mapState
}
from
"vuex"
;
export
default
{
export
default
{
meta
:
{
meta
:
{
title
:
""
title
:
""
},
},
...
@@ -287,24 +191,28 @@ export default {
...
@@ -287,24 +191,28 @@ export default {
this
.
AssistDropList
=
[];
this
.
AssistDropList
=
[];
GetAssistTypeList
({}).
then
(
res
=>
{
GetAssistTypeList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
let
template
=
res
.
Data
;
let
tempData
=
res
.
Data
;
template
.
forEach
(
x
=>
{
if
(
this
.
userInfo
.
IsCourseConsultant
==
1
)
{
if
(
this
.
userInfo
.
IsCourseConsultant
==
1
)
{
if
(
x
.
Id
!=
1
)
{
tempData
.
forEach
(
x
=>
{
if
(
x
.
Id
==
2
||
x
.
Id
==
3
||
x
.
Id
==
5
)
{
this
.
AssistDropList
.
push
(
x
);
this
.
AssistDropList
.
push
(
x
);
}
}
if
(
x
.
Id
==
4
&&
this
.
isHaveTeacherEdit
)
{
if
(
x
.
Id
==
4
)
{
if
(
this
.
isHaveTeacherEdit
)
{
this
.
AssistDropList
.
push
(
x
);
this
.
AssistDropList
.
push
(
x
);
}
}
}
else
if
(
this
.
userInfo
.
IsCourseConsultant
==
0
)
{
}
});
}
else
{
tempData
.
forEach
(
x
=>
{
if
(
this
.
isHaveTeacherEdit
)
{
if
(
this
.
isHaveTeacherEdit
)
{
if
(
x
.
Id
==
4
)
{
if
(
x
.
Id
==
4
)
{
this
.
AssistDropList
.
push
(
x
);
this
.
AssistDropList
.
push
(
x
);
}
}
}
}
}
});
});
}
}
}
});
});
},
},
changeData
()
{
changeData
()
{
...
@@ -362,8 +270,8 @@ export default {
...
@@ -362,8 +270,8 @@ export default {
},
},
clearMsg
()
{
clearMsg
()
{
this
.
AssitMsg
.
Id
=
0
;
this
.
AssitMsg
.
Id
=
0
;
this
.
AssitMsg
.
AssistId
=
1
;
this
.
AssitMsg
.
AssistId
=
0
;
this
.
AssitMsg
.
AssistType
=
1
;
this
.
AssitMsg
.
AssistType
=
0
;
},
},
//获取数据
//获取数据
getList
()
{
getList
()
{
...
@@ -418,5 +326,5 @@ export default {
...
@@ -418,5 +326,5 @@ export default {
this
.
isShowAdd
=
true
;
this
.
isShowAdd
=
true
;
}
}
}
}
};
};
</
script
>
</
script
>
\ No newline at end of file
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