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
89e6db88
Commit
89e6db88
authored
Sep 24, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
2b3d2c85
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
101 additions
and
137 deletions
+101
-137
feedback-form.vue
src/components/teacher/feedback-form.vue
+72
-112
feedBackList.vue
src/pages/teacher/feedBackList.vue
+29
-25
No files found.
src/components/teacher/feedback-form.vue
View file @
89e6db88
...
...
@@ -8,72 +8,75 @@
>
<q-card
style=
"width: 600px"
>
<q-card-section>
<div
class=
"text-h6"
>
{{
objOption
.
Id
==
0
?
"新增"
:
"修改"
}}
</div>
<div
class=
"text-h6"
>
{{
dataList
.
some
((
e
)
=>
e
.
FeedBackId
>
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
v-for=
"(item, index) in dataList"
:key=
"index"
>
<div
class=
"row wrap"
style=
"margin: 20px 0 10px 0"
>
{{
item
.
GuestName
}}
:
</div>
<div
class=
"row wrap"
>
<q-select
filled
stack-label
class=
"col-6 q-pr-lg q-pb-lg"
v-model=
"item.Score"
:options=
"ScoreOpts"
emit-value
map-options
label=
"评分"
/>
</div>
<div
class=
"row"
>
<q-input
v-model=
"item.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=
"item.PhotoList && item.PhotoList.length > 0"
v-for=
"(item1, index1) in item.PhotoList"
:key=
"index1"
>
<div
class=
"ItemImgDiv"
>
<q-img
:src=
"item1"
spinner-color=
"white"
style=
"height: 100%; height: 100%"
/>
<q-btn
size=
"7px"
@
click=
"deleteItemImg(index, index1)"
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=
"
(file) =>
{
return uploadFile(file, index);
}
"
:show-file-list="false"
>
<i
class=
"el-icon-plus avatar-uploader-icon"
></i>
</el-upload>
</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>
...
...
@@ -107,64 +110,20 @@ export default {
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
],
dataList
:
[],
};
},
mounted
()
{
this
.
initData
()
;
this
.
dataList
=
this
.
arr
;
},
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"
);
...
...
@@ -173,7 +132,7 @@ export default {
//保存
saveData
()
{
this
.
saveLoading
=
true
;
setFeedBack
(
this
.
objOption
)
setFeedBack
(
this
.
arr
)
.
then
((
res
)
=>
{
this
.
saveLoading
=
false
;
this
.
$q
.
notify
({
...
...
@@ -190,13 +149,14 @@ export default {
this
.
saveLoading
=
false
;
});
},
uploadFile
(
files
)
{
uploadFile
(
files
,
index
)
{
console
.
log
(
files
,
index
,
this
.
dataList
);
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
);
this
.
dataList
[
index
]
.
PhotoList
.
push
(
res
.
FileUrl
);
}
});
}
else
{
...
...
@@ -209,8 +169,8 @@ export default {
}
},
//删除图片
deleteItemImg
(
index
)
{
this
.
objOption
.
PhotoList
.
splice
(
index
,
1
);
deleteItemImg
(
index
,
index1
)
{
this
.
dataList
[
index
].
PhotoList
.
splice
(
index1
,
1
);
},
},
};
...
...
src/pages/teacher/feedBackList.vue
View file @
89e6db88
...
...
@@ -8,40 +8,46 @@
separator=
"none"
:data=
"tableData"
:columns=
"columns"
row-key=
"
FeedBack
Id"
row-key=
"
OrderGuest
Id"
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"
/>
<q-btn
color=
"accent"
size=
"sm"
:label=
"selected.some((e) => e.FeedBackId > 0) ? '修改' : '新增'"
@
click=
"showForm"
:disabled=
"selected.length === 0"
/>
</
template
>
<
template
v-slot:body-cell-Score=
"props"
>
<
!-- <
template v-slot:body-cell-Score="props">
<q-td auto-width :props="props">
<q-rating
v-model=
"props.Score"
v-model="props.
row.
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"
>
</template>
-->
<
!-- <
template v-slot:body-cell-optioned="props">
<q-td>
<q-btn
size="xs"
color="accent"
label=
"修改
"
:label="props.row.FeedBackId > 0 ? '修改' : '新增'
"
@click="Edit(props.row, props.rowIndex)"
/>
</q-td>
</
template
>
</template>
-->
<
template
v-slot:bottom
>
</
template
>
</q-table>
<feedback-form
v-if=
"isShowForm"
:save-obj=
"ObjOption"
:arr=
"
tableData
"
:arr=
"
selected
"
@
close=
"closeSaveForm"
@
success=
"refreshPage"
>
...
...
@@ -92,13 +98,13 @@ export default {
{
name
:
" CreateTimeStr"
,
label
:
"上课时间"
,
field
:
"
CreateTimeStr"
,
field
:
"CreateTimeStr"
,
align
:
"left"
,
},
{
name
:
" Score"
,
label
:
"评分"
,
field
:
"
Score"
,
field
:
"Score"
,
align
:
"left"
,
},
{
...
...
@@ -107,12 +113,12 @@ export default {
field
:
"Comment"
,
align
:
"left"
,
},
{
name
:
"optioned"
,
label
:
"操作"
,
field
:
"optioned"
,
align
:
"left"
,
},
//
{
//
name: "optioned",
//
label: "操作",
//
field: "optioned",
//
align: "left",
//
},
],
tableData
:
[],
isShowForm
:
false
,
...
...
@@ -130,12 +136,12 @@ export default {
},
//修改
Edit
(
obj
,
index
)
{
if
(
obj
)
{
this
.
ObjOption
=
obj
;
this
.
ObjOption
.
index
=
index
;
}
else
{
this
.
ObjOption
=
null
;
}
//
if (obj) {
//
this.ObjOption = obj;
//
this.ObjOption.index = index;
//
} else {
//
this.ObjOption = null;
//
}
this
.
isShowForm
=
true
;
},
//关闭弹窗
...
...
@@ -144,8 +150,6 @@ export default {
},
//刷新页面
refreshPage
()
{
if
(
!
this
.
ObjOption
)
{
}
this
.
getData
();
},
showForm
()
{
...
...
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