Commit 6b8d8300 authored by youjie's avatar youjie

no message

parents dd4b752e fd1868b1
...@@ -4,22 +4,21 @@ ...@@ -4,22 +4,21 @@
<van-icon name="plus" /><text>增加评论</text> </view> <van-icon name="plus" /><text>增加评论</text> </view>
<view class="index-student-information"> <view class="index-student-information">
<view class="commentDetailsList-content"> <view class="commentDetailsList-content">
<view class="commentDetailsList-list"> <view class="commentDetailsList-list" v-for="(item,index) in CourseCommentTimesList" :key="index">
<view class="commentDetailsList-cross" @click="deleteRules"> <!-- <view class="commentDetailsList-cross" @click="deleteRules">
<van-icon name="cross" /> <van-icon name="cross" />
</view> </view> -->
<view class="commentDetailsList-img flex"> <view class="commentDetailsList-img flex">
<view>学员1</view> <view>{{item.StuName}}</view>
<view class="flex"> <view class="flex">
<text>可见</text> <text>{{item.ShowTypeStr}}</text>
<van-image @click="editRules" class="img" width="31rpx" height="30rpx" fit="cover" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653980151000_180.png" /> <van-image @click="editRules(item)" class="img" width="31rpx" height="30rpx" fit="cover" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653980151000_180.png" />
</view> </view>
<view class="Wire"></view> <view class="Wire"></view>
</view> </view>
<view class="commentDetailsList-comment"> <view class="commentDetailsList-comment">
这位学员很优秀,平时课上的问题都能积极回 {{item.Info}}
答,正确率非常高。这次考试得分也很高,希望再接再厉
</view> </view>
</view> </view>
</view> </view>
...@@ -28,7 +27,7 @@ ...@@ -28,7 +27,7 @@
<view>暂无评论规则数据</view> <view>暂无评论规则数据</view>
</view> </view>
</view> </view>
<commentDetailsPopu ref="getcommentPopup"></commentDetailsPopu> <commentDetailsPopu ref="getcommentPopup" @change="changeData"></commentDetailsPopu>
</view> </view>
</template> </template>
<script> <script>
...@@ -56,20 +55,6 @@ ...@@ -56,20 +55,6 @@
proxy proxy
} = getCurrentInstance(); } = getCurrentInstance();
let data = reactive({ let data = reactive({
optionsList: [{
text: '可见',
value: 1
},
{
text: '部分可见',
value: 2
},
{
text: '不可见',
value: 3
},
],
dataList: [], dataList: [],
show:false show:false
}); });
...@@ -88,9 +73,9 @@ ...@@ -88,9 +73,9 @@
data.show = true data.show = true
refs.getcommentPopup.$vm.showFun() refs.getcommentPopup.$vm.showFun()
}, },
editRules(){//编辑规则 editRules(item){//编辑规则
data.show = true data.show = true
refs.getcommentPopup.$vm.showFun() refs.getcommentPopup.$vm.showFun(item)
}, },
deleteRules (){//删除规则 deleteRules (){//删除规则
uni.showModal({ uni.showModal({
...@@ -113,7 +98,6 @@ ...@@ -113,7 +98,6 @@
item.optionsShow = !item.optionsShow; item.optionsShow = !item.optionsShow;
}, },
clickoptions(item,subItem) { clickoptions(item,subItem) {
let showTypeMsg = { let showTypeMsg = {
CourseId: item.CourseId, CourseId: item.CourseId,
Times: item.Times, Times: item.Times,
...@@ -126,6 +110,12 @@ ...@@ -126,6 +110,12 @@
}) })
item.optionsShow = false; item.optionsShow = false;
//调用父组件方法
context.emit('refreshData');
},
//刷新数据
changeData()
{
//调用父组件方法 //调用父组件方法
context.emit('refreshData'); context.emit('refreshData');
} }
...@@ -145,7 +135,7 @@ ...@@ -145,7 +135,7 @@
}; };
}, },
onLoad(option) { onLoad(option) {
}, },
}; };
</script> </script>
......
<template> <template>
<view class="commentPopup-box"> <view class="commentPopup-box">
<van-popup :show="show" :round="true" @close="closepopup"> <van-popup :show="show" :round="true" @close="closepopup">
<view class="commentPopup-box"> <view class="commentPopup-box">
<van-icon class="commentPopup-closure" name="cross" @click="closepopup"/> <van-icon class="commentPopup-closure" name="cross" @click="closepopup" />
<view class="commentPopup-title">修改评语</view> <view class="commentPopup-title">修改评语</view>
<view class="commentPopup-content"> <view class="commentPopup-content">
<textarea placeholder="请填写评语内容"></textarea> <textarea placeholder="请填写评语内容" v-model="stuCommentObj.Info"></textarea>
</view> </view>
<view class="commentPopup-save flex"> <view class="commentPopup-save flex">
<view @click="save">确认</view> <view @click="save">确认</view>
</view> </view>
</view> </view>
</van-popup> </van-popup>
</view> </view>
</template> </template>
<script> <script>
import { import {
ref,
reactive, reactive,
toRefs, toRefs,
onMounted, onMounted,
getCurrentInstance, getCurrentInstance,
inject, inject,
watch watch
} from "vue"; } from "vue";
import { uploadFile } from "@/utils/index"; import {
uploadFile
} from "@/utils/index";
export default { export default {
props: { props: {
}, },
components: {}, components: {},
setup(props,ctx) { emits: ['change'],
let { setup(props, ctx) {
// 双滑块模式时,值必须是数组
const value = ref([10, 50]);
let {
proxy proxy
} = getCurrentInstance(); } = getCurrentInstance();
let data = reactive({ let data = reactive({
show: false, show: false,
loading: false, loading: false,
stuCommentObj: {
Id: 0,
Info: ""
}
}); });
let methods = { let methods = {
showFun(){ showFun(item) {
data.show = true if (item) {
}, data.stuCommentObj.Id = item.Id;
closepopup(){ data.stuCommentObj.Info = item.Info;
data.show = false }
}, data.show = true
save(){ },
data.show = false closepopup() {
} data.show = false
}; },
save() {
proxy.$request("/Teacher/SetStuCommentInfo", data.stuCommentObj).then(res => {
if (res.Code == 1) {
uni.showToast({
icon: 'none',
duration: 500
});
}
});
ctx.emit("change");
data.show = false
}
};
let that = methods; let that = methods;
return { return {
...toRefs(data), ...toRefs(data),
...methods value,
...methods
}; };
}, },
onLoad(){ onLoad() {
}, },
onShow() { onShow() {
} }
}; };
</script> </script>
<style scoped> <style scoped>
.commentPopup-content{ .custom-button {
background: #F7F7F7; width: 26rpx;
border-radius: 30rpx; color: #fff;
min-height: 152rpx; font-size: 20rpx;
padding: 37rpx 43rpx; line-height: 36rpx;
} text-align: center;
.commentPopup-save view{ background-color: #ee0a24;
background: #C91727; border-radius: 100rpx;
font-size: 30rpx; }
font-weight: bold;
letter-spacing: 1rpx; .commentPopup-content {
width: 260rpx; background: #F7F7F7;
line-height: 88rpx; border-radius: 30rpx;
border-radius: 44rpx; min-height: 152rpx;
text-align: center; padding: 37rpx 43rpx;
color: #FFFFFF; }
}
.commentPopup-save{ .commentPopup-save view {
justify-content: center; background: #C91727;
margin-top: 40rpx; font-size: 30rpx;
} font-weight: bold;
.commentPopup-title{ letter-spacing: 1rpx;
width: 100%; width: 260rpx;
text-align: center; line-height: 88rpx;
font-size: 30rpx; border-radius: 44rpx;
font-weight: 500; text-align: center;
margin-bottom: 73rpx; color: #FFFFFF;
letter-spacing: 1rpx; }
}
.commentPopup-closure{ .commentPopup-save {
position: absolute; justify-content: center;
right: 31rpx; margin-top: 40rpx;
top: 31rpx; }
color: #282828;
font-size: 38rpx; .commentPopup-box .noData {
} text-align: center;
.commentPopup-box{ flex: 1;
position: relative; width: 100%;
width: 548rpx; }
padding: 48rpx 55rpx 60rpx 55rpx;
} .commentPopup-box .noData image {
width: 200rpx;
margin-bottom: 40rpx;
}
.commentPopup-box .noData view {
font-size: 24rpx;
color: #cecece;
text-align: center;
}
.commentPopup-name {
background-color: #F7F7F7;
text-align: center;
border: 1px solid #F7F7F7;
height: 88rpx;
line-height: 88rpx;
padding: 0 10rpx;
border-radius: 44rpx;
font-size: 30rpx;
letter-spacing: 1rpx;
}
.commentPopup-title {
width: 100%;
text-align: center;
font-size: 30rpx;
font-weight: 500;
margin-bottom: 73rpx;
letter-spacing: 1rpx;
}
.commentPopup-closure {
position: absolute;
right: 31rpx;
top: 31rpx;
color: #282828;
font-size: 38rpx;
}
.commentPopup-box {
position: relative;
width: 548rpx;
padding: 48rpx 55rpx 60rpx 55rpx;
}
.commentPopup-box {}
</style> </style>
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<view class="rulesPopup-RuleSettings"> <view class="rulesPopup-RuleSettings">
<text class="RuleSettings-title">规则设置</text> <text class="RuleSettings-title">规则设置</text>
<view class="RuleSettings-slider"> <view class="RuleSettings-slider">
<van-slider v-model="valueNum" :range="isRange" @change="onChange" /> <van-slider v-model="valueNum" range @change="onChange" />
</view> </view>
</view> </view>
</view> </view>
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
}, },
goComment(item){ goComment(item){
uni.navigateTo({ uni.navigateTo({
url: '/pages/setComments/commentDetails' url: '/pages/setComments/commentDetails?comment='+ encodeURIComponent(JSON.stringify(item))
}) })
}, },
clickOptionsShow(item) { clickOptionsShow(item) {
......
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
homeWorks:[], homeWorks:[],
exams:[], exams:[],
pageState: "more", pageState: "more",
currentCourseId:189666293, currentCourseId:45329247,
userData:{}, userData:{},
loading:false loading:false
}); });
...@@ -138,9 +138,9 @@ ...@@ -138,9 +138,9 @@
}, },
changeCourseHandler(id){ changeCourseHandler(id){
console.log(id,'........................') console.log(id,'........................')
data.Msg.courseId=189666293 data.Msg.courseId=45329247
data.OperationMsg.courseId=189666293 data.OperationMsg.courseId=45329247
data.currentCourseId=189666293 data.currentCourseId=45329247
methods.getCourseStuList() methods.getCourseStuList()
methods.getExamPageList() methods.getExamPageList()
methods.getCourseHomeWorkList() methods.getCourseHomeWorkList()
......
...@@ -10,22 +10,22 @@ ...@@ -10,22 +10,22 @@
<view class="commentDetails-index-setType flex"> <view class="commentDetails-index-setType flex">
<view class="commentDetails-setType-text flex"> <view class="commentDetails-setType-text flex">
<view> <view>
次评价 {{topData.Times}}次评价
</view> </view>
<view class="flex"> <view class="flex">
<text>部分可见</text> <text>{{topData.ShowTypeStr}}</text>
</view> </view>
</view> </view>
<view class="commentDetails-setType-time flex" @click="goRules"> <view class="commentDetails-setType-time flex">
<view> <view>
来源: 来源:{{topData.CreateTypeStr}}
</view> </view>
<view> <view>
时间: 时间:{{topData.CreateTime}}
</view> </view>
</view> </view>
</view> </view>
<commentDetails :CourseCommentTimesList="courseTimeList" @refreshData="getCourseCommentTimes"></commentDetails> <commentDetails :CourseCommentTimesList="courseTimeList" @refreshData="getStuCommentList"></commentDetails>
</view> </view>
...@@ -81,40 +81,29 @@ ...@@ -81,40 +81,29 @@
checked: '1', checked: '1',
Msg: { Msg: {
CourseId: '', CourseId: '',
CommentTimes:1
}, },
courseTimeList: [], //课程自动生成评论次数 courseTimeList: [],
courseRule: {}, //课程评价规则 topData:{
ShowTypeStr:"",
Times:1,
CreateTime:"",
CreateTypeStr:""
}
}); });
let methods = { let methods = {
back() { back() {
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}) })
},
radioChange(e) {
console.log("打印国家名称", e.target.value)
}, },
//获取课程评论次数列表 //获取系统生成学员评价列表
getCourseCommentTimes() { getStuCommentList(){
proxy.$request("/Teacher/GetCourseCommentTimes", data.Msg).then(res => { proxy.$request("/Teacher/GetStuCommentList", data.Msg).then(res => {
if (res) { if (res) {
data.courseTimeList = res.Data; data.courseTimeList = res.Data;
} }
}) })
},
//获取课程评价规则信息
getCourseRule() {
proxy.$request("/Teacher/GetCourseComment", data.Msg).then(res => {
if (res) {
data.courseRule = res.Data;
}
})
},
goRules() {
uni.navigateTo({
url: '/pages/setComments/commentRulesList?CourseId=' + data.Msg.CourseId
})
} }
}; };
...@@ -123,10 +112,15 @@ ...@@ -123,10 +112,15 @@
...methods ...methods
}; };
}, },
onLoad(option) { onLoad(options) {
this.Msg.CourseId = option.CourseId; let json=JSON.parse(decodeURIComponent(options.comment))
this.getCourseRule(); this.Msg.CourseId = json.CourseId;
this.getCourseCommentTimes(); this.topData.ShowTypeStr = json.ShowTypeStr;
this.topData.Times = json.Times;
this.topData.CreateTime = json.CreateTime;
this.topData.CreateTypeStr = json.CreateTypeStr;
this.Msg.CommentTimes = json.Times;
this.getStuCommentList();
}, },
}; };
......
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