Commit a99c9a8b authored by 罗超's avatar 罗超

1

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