Commit a99c9a8b authored by 罗超's avatar 罗超

1

parent bf45f4f7
......@@ -470,8 +470,12 @@
</div>
<div class="row" style="margin-top: 20px;align-items: center">
<q-input filled v-model="plmsg.Comment" label="写下你想评价的内容" type="textarea" style="flex:1" />
<img src="../../assets/images/course/fasong.png" alt=""
style="width: 35px;height: 35px;margin-left: 20px;cursor:pointer;" @click="btnpl()">
<q-btn round flat :loading="saveLoading" style="width: 50px;height: 50px;margin-left: 20px;cursor:pointer;" @click="btnpl()">
<template slot="default">
<img src="../../assets/images/course/fasong.png" style="width: 100%;height: 100%;" alt=""/>
</template>
</q-btn>
</div>
</div>
......@@ -497,7 +501,7 @@
name: "prepareclassDetails",
data() {
return {
loginId:0,
loginId: 0,
contentStyle: {},
contentActiveStyle: {},
thumbStyle: {
......@@ -514,14 +518,14 @@
},
Dloading: false,
plmsg: {
LessonCommentId:0,
LessonCommentId: 0,
Comment: '',
Score: 5,
LessonPlanId: 0,
ClassId: 0,
ClassPlanId: 0,
TeacherId: 0,
ClassDate:"",
ClassDate: "",
},
data: {},
CommentList: [],
......@@ -529,7 +533,7 @@
scoreMsg: {
ClassPlanId: 0,
ClassId: 0,
ClassDate:"",
ClassDate: "",
},
Score: 0,
nowDate: '', //现在时间
......@@ -549,12 +553,13 @@
'font-weight': 'bold',
'letter-spacing': '.005em',
'padding-left': '0'
}
},
saveLoading:false
}
},
created() {
let data=JSON.parse(localStorage.getItem("loginUserInfo"))
this.loginId=data.data.Id
let data = JSON.parse(localStorage.getItem("loginUserInfo"))
this.loginId = data.data.Id
},
mounted() {
this.msg.ClassId = this.$route.query.ClassId ? this.$route.query.ClassId : 0;
......@@ -578,7 +583,7 @@
this.isShowBtn = false;
}
this.getList() //备课内容
var today = new Date();
var y = today.getFullYear();
......@@ -631,8 +636,8 @@
this.ImgList = this.data.LessonPlanList[0].ProjectPicList;
// this.isShowBtn=false
}
this.plmsg.ClassDate=res.Data.ClassStartTime
this.scoreMsg.ClassDate=res.Data.ClassStartTime
this.plmsg.ClassDate = res.Data.ClassStartTime
this.scoreMsg.ClassDate = res.Data.ClassStartTime
this.getCommentList() //评价
this.getUserComment();
}
......@@ -642,7 +647,7 @@
getLessonCommentList({
ClassId: this.msg.ClassId,
ClassPlanId: this.msg.ClassPlanId,
ClassDate:this.plmsg.ClassDate,
ClassDate: this.plmsg.ClassDate,
}).then(res => {
if (res.Code == 1) {
this.CommentList = res.Data
......@@ -668,8 +673,9 @@
})
return
}
this.saveLoading=true
setLessonComment(this.plmsg).then(res => {
this.saveLoading=false
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
......@@ -680,13 +686,15 @@
})
this.plmsg.Score = 5;
this.plmsg.Comment = '';
this.plmsg.LessonCommentId=0;
this.plmsg.LessonCommentId = 0;
this.getUserComment()
this.getCommentList()
if (this.data.TotalScore === 0) {
this.getList()
}
}
}).catch(err=>{
this.saveLoading=false
})
},
saveOrderInfo() {
......@@ -753,16 +761,15 @@
})
}
})
}).onCancel(() => {
});
}).onCancel(() => {});
},
//修改评论
modifyComment(item){
modifyComment(item) {
console.log(item)
this.plmsg.LessonCommentId=item.LessonCommentId
this.plmsg.Comment=item.Comment
this.plmsg.Score=item.Score
this.Score=item.Score
this.plmsg.LessonCommentId = item.LessonCommentId
this.plmsg.Comment = item.Comment
this.plmsg.Score = item.Score
this.Score = item.Score
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment