Commit fd1868b1 authored by 黄奎's avatar 黄奎

页面修改

parent b04d6680
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<view>{{item.StuName}}</view> <view>{{item.StuName}}</view>
<view class="flex"> <view class="flex">
<text>{{item.ShowTypeStr}}</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>
...@@ -27,7 +27,7 @@ ...@@ -27,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>
...@@ -73,9 +73,9 @@ ...@@ -73,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({
...@@ -98,7 +98,6 @@ ...@@ -98,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,
...@@ -111,6 +110,12 @@ ...@@ -111,6 +110,12 @@
}) })
item.optionsShow = false; item.optionsShow = false;
//调用父组件方法
context.emit('refreshData');
},
//刷新数据
changeData()
{
//调用父组件方法 //调用父组件方法
context.emit('refreshData'); context.emit('refreshData');
} }
......
<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, 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'],
// 双滑块模式时,值必须是数组 setup(props, ctx) {
const value = ref([10, 50]); // 双滑块模式时,值必须是数组
let { const value = ref([10, 50]);
let {
proxy proxy
} = getCurrentInstance(); } = getCurrentInstance();
let data = reactive({ let data = reactive({
valueNum: ref([0, 0]), 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
onChange(value){ },
console.log(value) closepopup() {
// data.valueNum = value data.show = false
// console.log(data.valueNum) },
}, save() {
save(){ proxy.$request("/Teacher/SetStuCommentInfo", data.stuCommentObj).then(res => {
data.show = false 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),
value, value,
...methods ...methods
}; };
}, },
onLoad(){ onLoad() {
}, },
onShow() { onShow() {
} }
}; };
</script> </script>
<style scoped> <style scoped>
.custom-button { .custom-button {
width: 26rpx; width: 26rpx;
color: #fff; color: #fff;
font-size: 20rpx; font-size: 20rpx;
line-height: 36rpx; line-height: 36rpx;
text-align: center; text-align: center;
background-color: #ee0a24; background-color: #ee0a24;
border-radius: 100rpx; border-radius: 100rpx;
} }
.commentPopup-content{
background: #F7F7F7; .commentPopup-content {
border-radius: 30rpx; background: #F7F7F7;
min-height: 152rpx; border-radius: 30rpx;
padding: 37rpx 43rpx; min-height: 152rpx;
} padding: 37rpx 43rpx;
.commentPopup-save view{ }
background: #C91727;
font-size: 30rpx; .commentPopup-save view {
font-weight: bold; background: #C91727;
letter-spacing: 1rpx; font-size: 30rpx;
width: 260rpx; font-weight: bold;
line-height: 88rpx; letter-spacing: 1rpx;
border-radius: 44rpx; width: 260rpx;
text-align: center; line-height: 88rpx;
color: #FFFFFF; border-radius: 44rpx;
}
.commentPopup-save{
justify-content: center;
margin-top: 40rpx;
}
.commentPopup-box .noData{
text-align: center; text-align: center;
flex:1; color: #FFFFFF;
}
.commentPopup-save {
justify-content: center;
margin-top: 40rpx;
}
.commentPopup-box .noData {
text-align: center;
flex: 1;
width: 100%; width: 100%;
} }
.commentPopup-box .noData image{
width:200rpx; .commentPopup-box .noData image {
width: 200rpx;
margin-bottom: 40rpx; margin-bottom: 40rpx;
} }
.commentPopup-box .noData view{
.commentPopup-box .noData view {
font-size: 24rpx; font-size: 24rpx;
color: #cecece; color: #cecece;
text-align: center; text-align: center;
} }
.commentPopup-name{
background-color: #F7F7F7; .commentPopup-name {
text-align: center; background-color: #F7F7F7;
border: 1px solid #F7F7F7; text-align: center;
height: 88rpx; border: 1px solid #F7F7F7;
line-height: 88rpx; height: 88rpx;
padding: 0 10rpx; line-height: 88rpx;
border-radius: 44rpx; padding: 0 10rpx;
font-size: 30rpx; border-radius: 44rpx;
letter-spacing: 1rpx; font-size: 30rpx;
} letter-spacing: 1rpx;
.commentPopup-title{ }
width: 100%;
text-align: center; .commentPopup-title {
font-size: 30rpx; width: 100%;
font-weight: 500; text-align: center;
margin-bottom: 73rpx; font-size: 30rpx;
letter-spacing: 1rpx; font-weight: 500;
} margin-bottom: 73rpx;
.commentPopup-closure{ letter-spacing: 1rpx;
position: absolute; }
right: 31rpx;
top: 31rpx; .commentPopup-closure {
color: #282828; position: absolute;
font-size: 38rpx; right: 31rpx;
} top: 31rpx;
.commentPopup-box{ color: #282828;
position: relative; font-size: 38rpx;
width: 548rpx; }
padding: 48rpx 55rpx 60rpx 55rpx;
} .commentPopup-box {
.commentPopup-box{ position: relative;
width: 548rpx;
} padding: 48rpx 55rpx 60rpx 55rpx;
}
.commentPopup-box {}
</style> </style>
...@@ -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()
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</view> </view>
</view> </view>
</view> </view>
<commentDetails :CourseCommentTimesList="courseTimeList" @refreshData="getCourseCommentTimes"></commentDetails> <commentDetails :CourseCommentTimesList="courseTimeList" @refreshData="getStuCommentList"></commentDetails>
</view> </view>
...@@ -96,8 +96,8 @@ ...@@ -96,8 +96,8 @@
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}) })
}, },
//获取系统生成学员评价列表
getStuCommentList(){ getStuCommentList(){
proxy.$request("/Teacher/GetStuCommentList", data.Msg).then(res => { proxy.$request("/Teacher/GetStuCommentList", data.Msg).then(res => {
if (res) { if (res) {
......
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