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
5ab3940f
Commit
5ab3940f
authored
Sep 24, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
d4979ab2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
469 additions
and
7 deletions
+469
-7
index.js
src/api/teacher/index.js
+28
-4
feedback-form.vue
src/components/teacher/feedback-form.vue
+290
-0
feedBackList.vue
src/pages/teacher/feedBackList.vue
+151
-3
No files found.
src/api/teacher/index.js
View file @
5ab3940f
...
@@ -131,10 +131,10 @@ export function GetPaperPage(data) {
...
@@ -131,10 +131,10 @@ export function GetPaperPage(data) {
})
})
}
}
/**
/**
* 获取试卷分页列表
* 获取试卷分页列表
* @param {JSON参数} data
* @param {JSON参数} data
*/
*/
export
function
submitApproval
(
data
)
{
export
function
submitApproval
(
data
)
{
return
request
({
return
request
({
url
:
'/Exam/SubmitApproval'
,
url
:
'/Exam/SubmitApproval'
,
...
@@ -361,3 +361,27 @@ export function movePaperInfo(data) {
...
@@ -361,3 +361,27 @@ export function movePaperInfo(data) {
data
data
})
})
}
}
/**
* 获取上课反馈信息
* @param {*} data
*/
export
function
getFeedBackDetails
(
data
)
{
return
request
({
url
:
'/TeacherClass/GetFeedBackDetails'
,
method
:
'post'
,
data
})
}
/**
* 新增/修改上课反馈
* @param {*} data
*/
export
function
setFeedBack
(
data
)
{
return
request
({
url
:
'/TeacherClass/SetFeedBack'
,
method
:
'post'
,
data
})
}
\ No newline at end of file
src/components/teacher/feedback-form.vue
0 → 100644
View file @
5ab3940f
<
template
>
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width: 600px"
>
<q-card-section>
<div
class=
"text-h6"
>
{{
objOption
.
Id
==
0
?
"新增"
:
"修改"
}}
</div>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<div
class=
"text-caption q-mb-lg q-px-md text-grey-6"
>
课程反馈
</div>
<div
class=
"row wrap"
>
<!--
<q-input
filled
stack-label
maxlength=
"5"
:dense=
"false"
v-model
.
number=
"objOption.Score"
ref=
"MenuUrl"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"评分"
/>
-->
<q-select
filled
stack-label
class=
"col-6 q-pr-lg q-pb-lg"
v-model=
"objOption.Score"
:options=
"ScoreOpts"
emit-value
map-options
label=
"评分"
/>
</div>
<div
class=
"row"
>
<q-input
v-model=
"objOption.Comment"
filled
stack-label
type=
"textarea"
label=
"评语"
style=
"width: 100%"
/>
</div>
<div
class=
"row wrap"
style=
"padding-top: 20px"
>
<div
style=
"display: flex; flex-wrap: wrap"
>
<div
v-if=
"objOption.PhotoList && objOption.PhotoList.length > 0"
v-for=
"(item, index) in objOption.PhotoList"
>
<div
class=
"ItemImgDiv"
>
<q-img
:src=
"item"
spinner-color=
"white"
style=
"height: 100%; height: 100%"
/>
<q-btn
size=
"7px"
@
click=
"deleteItemImg(index)"
style=
"position: absolute; right: -5px; top: -5px"
round
color=
"red"
icon=
"iconfont icon-guanbi1"
/>
</div>
</div>
<el-upload
class=
"avatar-uploader addDutyMain"
action=
""
:before-upload=
"uploadFile"
:show-file-list=
"false"
>
<i
class=
"el-icon-plus avatar-uploader-icon"
></i>
</el-upload>
</div>
</div>
</q-card-section>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight: 400 !important"
@
click=
"closeSaveForm"
/>
<q-btn
label=
"立即提交"
color=
"accent q-px-md"
style=
"font-weight: 400 !important"
:loading=
"saveLoading"
@
click=
"saveData"
/>
</q-card-actions>
</q-card>
</q-dialog>
</
template
>
<
script
>
import
{
setFeedBack
}
from
"../../api/teacher"
;
import
{
UploadSelfFile
}
from
"../../api/common/common"
;
export
default
{
props
:
{
arr
:
{
type
:
Array
,
default
:
null
,
},
saveObj
:
{
type
:
Object
,
default
:
null
,
},
},
data
()
{
return
{
persistent
:
true
,
saveLoading
:
false
,
objOption
:
{
OrderGuestId
:
0
,
ClassTimeId
:
0
,
School_Id
:
0
,
Score
:
0
,
TeacherId
:
0
,
ClassPlanId
:
0
,
ClassId
:
0
,
Comment
:
""
,
PhotoList
:
[],
FeedBackId
:
0
,
},
rowindex
:
0
,
ScoreOpts
:
[
0
,
1
,
2
,
3
,
4
,
5
],
};
},
mounted
()
{
this
.
initData
();
},
methods
:
{
initData
()
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
ClassTimeId
>
0
)
{
this
.
rowindex
=
this
.
saveObj
.
index
;
this
.
objOption
.
FeedBackId
=
this
.
saveObj
.
FeedBackId
;
this
.
objOption
.
PhotoList
=
this
.
saveObj
.
PhotoList
;
this
.
objOption
.
Comment
=
this
.
saveObj
.
Comment
;
this
.
objOption
.
ClassId
=
this
.
saveObj
.
ClassId
;
this
.
objOption
.
ClassPlanId
=
this
.
saveObj
.
ClassPlanId
;
this
.
objOption
.
TeacherId
=
this
.
saveObj
.
Teacher_Id
;
this
.
objOption
.
Score
=
this
.
saveObj
.
Score
;
this
.
objOption
.
School_Id
=
this
.
saveObj
.
School_Id
;
this
.
objOption
.
ClassTimeId
=
this
.
saveObj
.
ClassTimeId
;
this
.
objOption
.
OrderGuestId
=
this
.
saveObj
.
OrderGuestId
;
}
else
{
this
.
objOption
.
FeedBackId
=
0
;
this
.
objOption
.
PhotoList
=
[];
this
.
objOption
.
Comment
=
""
;
this
.
objOption
.
ClassId
=
0
;
this
.
objOption
.
ClassPlanId
=
0
;
this
.
objOption
.
TeacherId
=
0
;
this
.
objOption
.
Score
=
0
;
this
.
objOption
.
School_Id
=
0
;
this
.
objOption
.
ClassTimeId
=
0
;
this
.
objOption
.
OrderGuestId
=
0
;
}
console
.
log
(
135
,
this
.
saveObj
);
console
.
log
(
136
,
this
.
objOption
);
},
//关闭弹窗
closeSaveForm
()
{
this
.
$emit
(
"close"
);
this
.
persistent
=
false
;
},
//保存
saveData
()
{
this
.
saveLoading
=
true
;
setFeedBack
(
this
.
objOption
)
.
then
((
res
)
=>
{
this
.
saveLoading
=
false
;
this
.
$q
.
notify
({
icon
:
"iconfont icon-chenggong"
,
color
:
"accent"
,
timeout
:
2000
,
message
:
"数据保存成功!"
,
position
:
"top"
,
});
this
.
$emit
(
"success"
);
this
.
closeSaveForm
();
})
.
catch
(()
=>
{
this
.
saveLoading
=
false
;
});
},
uploadFile
(
files
)
{
let
type
=
files
.
type
.
indexOf
(
"video"
)
!=
-
1
||
files
.
type
.
indexOf
(
"image"
)
!=
-
1
;
if
(
type
)
{
UploadSelfFile
(
"studentIcon"
,
files
,
(
res
)
=>
{
if
(
res
.
Code
==
1
)
{
this
.
objOption
.
PhotoList
.
push
(
res
.
FileUrl
);
}
});
}
else
{
this
.
$q
.
notify
({
type
:
"warning"
,
timeout
:
2000
,
message
:
"请上传图片或视频"
,
position
:
"top"
,
});
}
},
//删除图片
deleteItemImg
(
index
)
{
this
.
objOption
.
PhotoList
.
splice
(
index
,
1
);
},
},
};
</
script
>
<
style
>
.avatar-uploader
.el-upload
{
border-radius
:
6px
;
cursor
:
pointer
;
width
:
100%
;
height
:
100%
;
color
:
#8c939d
;
position
:
relative
;
overflow
:
hidden
;
}
.addDutyMain
{
display
:
inline-block
;
width
:
118px
;
height
:
118px
;
font-size
:
70px
;
border
:
1px
dashed
#d9d9d9
;
line-height
:
120px
;
}
.ItemImgDiv
{
width
:
118px
;
height
:
118px
;
position
:
relative
;
margin
:
0
10px
10px
0
;
display
:
inline-block
;
}
._delete_img
{
position
:
absolute
;
top
:
0px
;
height
:
82px
;
width
:
143px
;
line-height
:
34px
;
text-align
:
center
;
background-color
:
rgba
(
2
,
2
,
2
,
0.6
);
display
:
inherit
;
opacity
:
0
;
transition
:
all
linear
0.5s
;
}
._delete_img
i
.iconfont
{
display
:
inline-block
;
width
:
32px
;
height
:
32px
;
border-radius
:
50%
;
color
:
#e95252
!important
;
background-color
:
rgba
(
251
,
251
,
251
,
0.9
);
margin-top
:
26px
;
}
._upload_box
ul
li
{
float
:
left
;
height
:
82px
;
width
:
143px
;
padding
:
0px
20px
20px
0
;
text-align
:
center
;
position
:
relative
;
cursor
:
pointer
;
margin-right
:
10px
;
}
._upload_box
ul
li
img
{
height
:
82px
;
width
:
143px
;
}
._upload_box
ul
li
:hover
._delete_img
{
opacity
:
1
;
}
._upload_tips
{
font-size
:
12px
;
position
:
absolute
;
top
:
71%
;
width
:
100%
;
left
:
0
;
text-align
:
center
;
color
:
#949494
;
}
</
style
>
src/pages/teacher/feedBackList.vue
View file @
5ab3940f
<
template
>
<
template
>
<div></div>
<div
class=
"page-body"
>
<q-table
:pagination=
"tabMsg"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table sticky-right-column-table"
separator=
"none"
:data=
"tableData"
:columns=
"columns"
row-key=
"FeedBackId"
selection=
"multiple"
:selected
.
sync=
"selected"
>
<template
v-slot:top
>
<div
class=
"col-2 q-table__title"
>
课程反馈
</div>
<q-space></q-space>
<q-btn
color=
"accent"
size=
"sm"
label=
"新增"
@
click=
"showForm"
/>
</
template
>
<
template
v-slot:body-cell-Score=
"props"
>
<q-td
auto-width
:props=
"props"
>
<q-rating
v-model=
"props.Score"
size=
"3.5em"
icon=
"img:https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/rate.png"
/>
</q-td>
</
template
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td>
<q-btn
size=
"xs"
color=
"accent"
label=
"修改"
@
click=
"Edit(props.row, props.rowIndex)"
/>
</q-td>
</
template
>
<
template
v-slot:bottom
>
</
template
>
</q-table>
<feedback-form
v-if=
"isShowForm"
:save-obj=
"ObjOption"
:arr=
"tableData"
@
close=
"closeSaveForm"
@
success=
"refreshPage"
>
</feedback-form>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
getFeedBackDetails
}
from
"../../api/teacher"
;
import
feedbackForm
from
"../../components/teacher/feedback-form.vue"
;
export
default
{
export
default
{
components
:
{
feedbackForm
,
},
data
()
{
data
()
{
return
{};
return
{
tabMsg
:
{
rowsPerPage
:
0
,
},
msg
:
{
ID
:
0
,
},
columns
:
[
{
name
:
"GuestName"
,
label
:
"学生姓名"
,
field
:
"GuestName"
,
align
:
"left"
,
},
{
name
:
"Mobile"
,
label
:
"电话"
,
field
:
"Mobile"
,
align
:
"left"
,
},
{
name
:
"TeacherName"
,
label
:
"老师姓名"
,
field
:
"TeacherName"
,
align
:
"left"
,
},
{
name
:
"TeacherIcon"
,
label
:
"老师头像"
,
field
:
"TeacherIcon"
,
align
:
"left"
,
},
{
name
:
" CreateTimeStr"
,
label
:
"上课时间"
,
field
:
" CreateTimeStr"
,
align
:
"left"
,
},
{
name
:
" Score"
,
label
:
"评分"
,
field
:
" Score"
,
align
:
"left"
,
},
{
name
:
"Comment"
,
label
:
"评语"
,
field
:
"Comment"
,
align
:
"left"
,
},
{
name
:
"optioned"
,
label
:
"操作"
,
field
:
"optioned"
,
align
:
"left"
,
},
],
tableData
:
[],
isShowForm
:
false
,
ObjOption
:
{},
selected
:
[],
};
},
methods
:
{
getData
()
{
getFeedBackDetails
(
this
.
msg
).
then
((
res
)
=>
{
if
(
res
.
Code
===
1
)
{
this
.
tableData
=
res
.
Data
;
}
});
},
//修改
Edit
(
obj
,
index
)
{
if
(
obj
)
{
this
.
ObjOption
=
obj
;
this
.
ObjOption
.
index
=
index
;
}
else
{
this
.
ObjOption
=
null
;
}
this
.
isShowForm
=
true
;
},
//关闭弹窗
closeSaveForm
()
{
this
.
isShowForm
=
false
;
},
//刷新页面
refreshPage
()
{
if
(
!
this
.
ObjOption
)
{
}
this
.
getData
();
},
showForm
()
{
this
.
isShowForm
=
true
;
},
},
mounted
()
{
this
.
msg
.
ID
=
this
.
$route
.
query
.
id
;
this
.
getData
();
},
},
methods
:
{},
};
};
</
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