Commit 6b8d8300 authored by youjie's avatar youjie

no message

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