|
@@ -34,7 +34,22 @@
|
|
|
title="查看互评"
|
|
|
footer-hide
|
|
|
width="600px">
|
|
|
-
|
|
|
+
|
|
|
+ </Modal>
|
|
|
+
|
|
|
+ <!-- 下载附件弹窗 -->
|
|
|
+ <Modal v-model="downloadModal"
|
|
|
+ class-name="score-modal component-hw-table"
|
|
|
+ title="作业附件"
|
|
|
+ footer-hide
|
|
|
+ width="600px">
|
|
|
+ <!--<div class="file-list-wrap">
|
|
|
+ <div v-for="(item,index) in currentFileList" :key="index">
|
|
|
+ <a :href="item.blobUrl">{{ item.fileName }}</a>
|
|
|
+ </div>
|
|
|
+ </div>-->
|
|
|
+ <Table border size='small' ref="selection2" :columns="fileColumns" :data="currentFileList" stripe></Table>
|
|
|
+
|
|
|
</Modal>
|
|
|
|
|
|
|
|
@@ -42,19 +57,43 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
export default {
|
|
|
- props:['studentsList'],
|
|
|
+ props: ['studentsList'],
|
|
|
data() {
|
|
|
return {
|
|
|
setScoreModal: false,
|
|
|
- mutualEvaluationModal:false,
|
|
|
+ downloadModal:false,
|
|
|
+ mutualEvaluationModal: false,
|
|
|
+ userInfo: this.$store.state.userInfo,
|
|
|
+ currentStudent: null,
|
|
|
+ currentHw: null,
|
|
|
currentScore: 100,
|
|
|
currentComment: '',
|
|
|
+ currentFileList:[],
|
|
|
usedCommentList: [
|
|
|
'表现很好,继续保持',
|
|
|
'仍有很大进步空间',
|
|
|
'粗心比较多,一定注意',
|
|
|
'下次一定要注意预习'
|
|
|
],
|
|
|
+ fileColumns: [
|
|
|
+ {
|
|
|
+ type: 'selection',
|
|
|
+ width: 60,
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '文件名',
|
|
|
+ key: 'fileName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '大小',
|
|
|
+ width: 100,
|
|
|
+ key: 'size',
|
|
|
+ render: (h, params) => {
|
|
|
+ return h('span',this.$tools.bytesToSize(params.row.size))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
columns: [
|
|
|
{
|
|
|
type: 'selection',
|
|
@@ -63,12 +102,13 @@
|
|
|
},
|
|
|
{
|
|
|
title: '姓名',
|
|
|
+ width: 100,
|
|
|
key: 'name'
|
|
|
},
|
|
|
{
|
|
|
title: '班级',
|
|
|
render: (h, params) => {
|
|
|
- return h('span',params.row.classroom.name)
|
|
|
+ return h('span', params.row.classroom.name)
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -77,53 +117,63 @@
|
|
|
},
|
|
|
{
|
|
|
title: '是否提交',
|
|
|
- width:100,
|
|
|
render: (h, params) => {
|
|
|
- return h('span',params.row.submissionBool ? '是' : '否')
|
|
|
+ return h('span', params.row.submissionBool ? '是' : '否')
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
title: '提交时间',
|
|
|
key: 'submitTime',
|
|
|
+ width: 180,
|
|
|
render: (h, params) => {
|
|
|
- return h('span',params.row.submissionBool ? params.row.submissionTime : '-')
|
|
|
+ return h('span', params.row.submissionBool ? this.$tools.formatTime(params.row.submissionTime) : '-')
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
title: '分数',
|
|
|
key: 'score',
|
|
|
- width:80
|
|
|
+ width: 80
|
|
|
},
|
|
|
{
|
|
|
title: '操作',
|
|
|
key: '',
|
|
|
- width:200,
|
|
|
+ width: 150,
|
|
|
render: (h, params) => {
|
|
|
let that = this
|
|
|
return h('div',
|
|
|
{
|
|
|
domProps: {
|
|
|
- className:'table-tools-icon'
|
|
|
+ className: 'table-tools-icon'
|
|
|
}
|
|
|
- },[
|
|
|
+ }, [
|
|
|
h('Icon', {
|
|
|
props: {
|
|
|
type: 'ios-cloud-download-outline',
|
|
|
},
|
|
|
domProps: {
|
|
|
- title:'下载作业'
|
|
|
- }
|
|
|
+ title: '下载作业'
|
|
|
+ },
|
|
|
+ on: {
|
|
|
+ click: function () {
|
|
|
+ that.downloadModal = true
|
|
|
+ that.currentFileList = params.row.content[0].resource
|
|
|
+ }
|
|
|
+ },
|
|
|
}),
|
|
|
h('Icon', {
|
|
|
props: {
|
|
|
type: 'ios-create-outline'
|
|
|
},
|
|
|
domProps: {
|
|
|
- title:'打分'
|
|
|
+ title: '打分'
|
|
|
},
|
|
|
on: {
|
|
|
- click: function() {
|
|
|
+ click: function () {
|
|
|
+ that.currentStudent = params.row
|
|
|
+ that.currentScore = params.row.score
|
|
|
+ that.currentComment = params.row.comments[0].comment
|
|
|
that.setScoreModal = true
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
}),
|
|
@@ -132,7 +182,7 @@
|
|
|
type: 'ios-chatbubbles-outline'
|
|
|
},
|
|
|
domProps: {
|
|
|
- title:'查看互评'
|
|
|
+ title: '查看互评'
|
|
|
},
|
|
|
on: {
|
|
|
click: function () {
|
|
@@ -170,9 +220,62 @@
|
|
|
if (!this.currentComment || !this.currentScore) {
|
|
|
this.$Message.warning('请填写完整!')
|
|
|
} else {
|
|
|
- this.$Message.success('点评成功!')
|
|
|
- this.setScoreModal = false
|
|
|
+ let scoreParams = {
|
|
|
+ id: this.currentStudent.id,
|
|
|
+ homeWorkId: this.currentStudent.homeWorkId,
|
|
|
+ score: this.currentScore
|
|
|
+ }
|
|
|
+
|
|
|
+ let commentParams = {
|
|
|
+ id: this.currentStudent.id,
|
|
|
+ homeWorkId: this.currentStudent.homeWorkId,
|
|
|
+ fromId: this.userInfo.TEAMModelId,
|
|
|
+ identity: '0',
|
|
|
+ comment: this.currentComment
|
|
|
+ }
|
|
|
+
|
|
|
+ /* 同时发送评分以及评语请求 */
|
|
|
+ Promise.all([this.onApiScore(scoreParams), this.onApiComment(commentParams)]).then(res => {
|
|
|
+ this.$set(this.tableData, 0, res[0])
|
|
|
+ this.$Message.success('点评成功!')
|
|
|
+ this.setScoreModal = false
|
|
|
+ }).catch(err => {
|
|
|
+ console.log(err)
|
|
|
+ })
|
|
|
+
|
|
|
}
|
|
|
+ },
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 老师评分请求接口
|
|
|
+ * @param params
|
|
|
+ */
|
|
|
+ onApiScore(params) {
|
|
|
+ return new Promise((r, j) => {
|
|
|
+ this.$api.learnActivity.SetScore(params).then(res => {
|
|
|
+ if (!res.error && res.result.data) {
|
|
|
+ r(res.result.data)
|
|
|
+ } else {
|
|
|
+ j(500)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 老师评语请求接口
|
|
|
+ * @param params
|
|
|
+ */
|
|
|
+ onApiComment(params) {
|
|
|
+ return new Promise((r, j) => {
|
|
|
+ this.$api.learnActivity.SetComment(params).then(res => {
|
|
|
+ if (!res.error && res.result.data) {
|
|
|
+ r(res.result.data)
|
|
|
+ } else {
|
|
|
+ j(500)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
watch: {
|