Commit e2d0552f authored by 罗超's avatar 罗超

临时提交

parent 36d983b4
......@@ -174,7 +174,7 @@
queryTecherCourse(){
getTeacherCourse().then(r=>{
data.courses=r.Data
data.titleList[0].data=r.Data.AllCourseList
data.titleList[0].data=r.Data.AllCourseList.reverse()
data.titleList[1].data=r.Data.NotFinishList
data.titleList[2].data=r.Data.FinishList
data.currentCourse=r.Data.AllCourseList.length>0?r.Data.AllCourseList[0]:null
......
<template>
<view class="operation-box flex" style="height: 100%;flex-direction: column;">
<view style="font-size: 36rpx;font-weight:400;color:#282828;margin: 50rpx;">
选择参考作业
</view>
<view style="flex:1;height: 1px;overflow-y: auto;" v-if="workList && workList.length>0">
<view class="operation activeOne flex" style="align-items: center;" v-for="(item,index) in workList" :key="index">
<van-checkbox :value="item.checked" @change="onChangeSelect" :data-index="index"></van-checkbox>
<view class="operation-center-box" :class="[{'active':item.checked}]" style="flex:1;width:1px;margin-left:20rpx" @click="changeByBoxHandler(index)">
<view class="operation-center-line"></view>
<view class="operation-center flex">
<view class="operation-left">
<view class="operation-name">{{item.HomeWorkTitle}}</view>
<view class="operation-state flex">
<view class="operation-state-point"></view>
<view class="operation-state-text">{{item.Status==0?'未开始':(item.Status==1?'进行中':'已结束')}}</view>
</view>
</view>
<view class="operation-right flex">
<view class="homework-score flex">
<view class="homework-score-title">学生数</view>
<view class="homework-score-num flex">
{{item.StuNum}}
</view>
</view>
<view class="homework-score flex">
<view class="homework-score-title">已提交</view>
<view class="homework-score-num flex">
{{item.SubmitNum}}
</view>
</view>
<view class="homework-score flex">
<view class="homework-score-title">已批阅</view>
<view class="homework-score-num flex">
{{item.ReviewNum}}
</view>
</view>
<view class="homework-score flex">
<view class="homework-score-title">优 秀</view>
<view class="homework-score-num flex">
{{item.ExcellentNum}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="noData" v-else>
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653902791000_806.png" mode="widthFix"></image>
<view>暂无课程信息</view>
</view>
<view style="padding: 20rpx 50rpx;" v-if="workList && workList.length>0">
<van-button type="danger" round block @click="selectWorkHandler">确认选择</van-button>
</view>
</view>
</template>
<script>
import {
reactive,
toRefs,
onMounted,
getCurrentInstance,
inject,
watch
} from "vue";
export default {
props: {
dataList:[]
},
components: {},
emits:['selected'],
setup(props,ctx) {
let data = reactive({
workList: props.dataList
});
watch(
() => props.dataList,
(newValue, oldValue) => {
data.workList=newValue
}
)
let methods = {
onChangeSelect(e){
console.log(e,data.workList[e.target.dataset.index],data.workList[e.target.dataset.index].checked)
data.workList[e.target.dataset.index].checked=e.detail
},
changeByBoxHandler(i){
data.workList[i].checked=!data.workList[i].checked
},
selectWorkHandler(){
let temp=data.workList.filter(x=>{return x.checked==true});
ctx.emit('selected',temp)
}
}
return {
...toRefs(data),
...methods
};
}
};
</script>
<style scoped>
.operation-box .noData{
text-align: center;
flex:1;
width: 100%;
}
.operation-box .noData image{
width:200rpx;
margin-bottom: 40rpx;
}
.operation-box .noData view{
font-size: 24rpx;
color: #cecece;
text-align: center;
}
.homework-score-num view:last-child{
font-size: 23rpx;
margin-top: 25rpx;
}
.homework-score-num view:first-child{
margin-right: 10rpx;
font-size: 46rpx;
font-weight: 800;
}
.homework-score-num{
font-weight: 800;
font-style: italic;
font-size: 36rpx;
}
.homework-score-title{
font-size: 20rpx;
margin-bottom: 0rpx;
font-weight: 400;
letter-spacing: 1px;
margin-bottom: 15rpx;
}
.homework-score:last-child{
margin-right: 0rpx;
}
.homework-score{
margin-right: 16rpx;
flex-direction: column;
justify-content: center;
}
.operation-right{
height: 122rpx;
background: #FCEEEF;
padding: 23rpx 46rpx 15rpx 46rpx;
border-radius: 30rpx;
justify-content: space-between;
flex-shrink: 0;
margin-left: 11rpx;
color: #CE8086;
}
.operation.activeOne .operation-state-text{
color: #08be42;
}
.operation-state-text{
font-size: 20rpx;
letter-spacing: 2px;
}
.operation.activeOne .operation-state-point{
background: #08be42;
}
.operation-state-point{
width: 12rpx;
height: 12rpx;
border-radius: 50%;
margin-right: 9rpx;
margin-top: 11rpx;
}
.operation-state{
margin-top: 35rpx;
font-size: 20rpx;
}
.operation.activeOne .operation-name{
color: #282828;
}
.operation-name{
height: 70rpx;
font-size: 26rpx;
word-break: break-all;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
margin-top: 9rpx;
letter-spacing: 1px;
font-weight: bold;
}
.operation-left{
flex-grow: 1;
}
.operation-center{
justify-content: space-between;
}
.operation-center-line{
width: 4rpx;
height: 23rpx;
background: #282828;
position: absolute;
left: 0;
top: 46rpx;
}
.operation.activeOne .operation-center-box{
background: #FFFFFF;
}
.operation-center-box{
flex-grow: 1;
position: relative;
border-radius: 30rpx;
padding: 31rpx 40rpx 21rpx 22rpx;
margin-bottom: 50rpx;
box-shadow: 0px 6px 29px 0px rgba(76, 76, 76, 0.09);
border-radius: 30rpx;
}
.operation-center-box.active{
background-color: dodgerblue !important;
}
.operation-center-box.active .operation-center-line{
background: #FFF !important;
}
.operation-center-box.active .operation-state-text,
.operation-center-box.active .operation-name{
color: #FFF !important;
}
.operation{
margin: 0 50rpx;
}
.operation-box{
}
</style>
<template>
<view class="operation-box flex" style="height: 100%;flex-direction: column;">
<view style="font-size: 36rpx;font-weight:400;color:#282828;margin: 50rpx;">
选择参考作业
</view>
<view style="flex:1;height: 1px;overflow-y: auto;" v-if="workList && workList.length>0">
<view class="operation activeOne flex" style="align-items: center;" v-for="(item,index) in workList" :key="index">
<van-checkbox :value="item.checked" @change="onChangeSelect" :data-index="index"></van-checkbox>
<view class="operation-center-box" :class="[{'active':item.checked}]" style="flex:1;width:1px;margin-left:20rpx" @click="changeByBoxHandler(index)">
<view class="operation-center-line"></view>
<view class="operation-center flex">
<view class="operation-left">
<view class="operation-name">{{item.HomeWorkTitle}}</view>
<view class="operation-state flex">
<view class="operation-state-point"></view>
<view class="operation-state-text">{{item.Status==0?'未开始':(item.Status==1?'进行中':'已结束')}}</view>
</view>
</view>
<view class="operation-right flex">
<view class="homework-score flex">
<view class="homework-score-title">学生数</view>
<view class="homework-score-num flex">
{{item.StuNum}}
</view>
</view>
<view class="homework-score flex">
<view class="homework-score-title">已提交</view>
<view class="homework-score-num flex">
{{item.SubmitNum}}
</view>
</view>
<view class="homework-score flex">
<view class="homework-score-title">已批阅</view>
<view class="homework-score-num flex">
{{item.ReviewNum}}
</view>
</view>
<view class="homework-score flex">
<view class="homework-score-title">优 秀</view>
<view class="homework-score-num flex">
{{item.ExcellentNum}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="noData" v-else>
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653902791000_806.png" mode="widthFix"></image>
<view>暂无课程信息</view>
</view>
<view style="padding: 20rpx 50rpx;" v-if="workList && workList.length>0">
<van-button type="danger" round block @click="selectWorkHandler">确认选择</van-button>
</view>
</view>
</template>
<script>
import {
reactive,
toRefs,
onMounted,
getCurrentInstance,
inject,
watch
} from "vue";
export default {
props: {
dataList:[]
},
components: {},
emits:['selected'],
setup(props,ctx) {
let data = reactive({
workList: props.dataList
});
watch(
() => props.dataList,
(newValue, oldValue) => {
data.workList=newValue
}
)
let methods = {
onChangeSelect(e){
console.log(e,data.workList[e.target.dataset.index],data.workList[e.target.dataset.index].checked)
data.workList[e.target.dataset.index].checked=e.detail
},
changeByBoxHandler(i){
data.workList[i].checked=!data.workList[i].checked
},
selectWorkHandler(){
let temp=data.workList.filter(x=>{return x.checked==true});
ctx.emit('selected',temp)
}
}
return {
...toRefs(data),
...methods
};
}
};
</script>
<style scoped>
.operation-box .noData{
text-align: center;
flex:1;
width: 100%;
}
.operation-box .noData image{
width:200rpx;
margin-bottom: 40rpx;
}
.operation-box .noData view{
font-size: 24rpx;
color: #cecece;
text-align: center;
}
.homework-score-num view:last-child{
font-size: 23rpx;
margin-top: 25rpx;
}
.homework-score-num view:first-child{
margin-right: 10rpx;
font-size: 46rpx;
font-weight: 800;
}
.homework-score-num{
font-weight: 800;
font-style: italic;
font-size: 36rpx;
}
.homework-score-title{
font-size: 20rpx;
margin-bottom: 0rpx;
font-weight: 400;
letter-spacing: 1px;
margin-bottom: 15rpx;
}
.homework-score:last-child{
margin-right: 0rpx;
}
.homework-score{
margin-right: 16rpx;
flex-direction: column;
justify-content: center;
}
.operation-right{
height: 122rpx;
background: #FCEEEF;
padding: 23rpx 46rpx 15rpx 46rpx;
border-radius: 30rpx;
justify-content: space-between;
flex-shrink: 0;
margin-left: 11rpx;
color: #CE8086;
}
.operation.activeOne .operation-state-text{
color: #08be42;
}
.operation-state-text{
font-size: 20rpx;
letter-spacing: 2px;
}
.operation.activeOne .operation-state-point{
background: #08be42;
}
.operation-state-point{
width: 12rpx;
height: 12rpx;
border-radius: 50%;
margin-right: 9rpx;
margin-top: 11rpx;
}
.operation-state{
margin-top: 35rpx;
font-size: 20rpx;
}
.operation.activeOne .operation-name{
color: #282828;
}
.operation-name{
height: 70rpx;
font-size: 26rpx;
word-break: break-all;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
margin-top: 9rpx;
letter-spacing: 1px;
font-weight: bold;
}
.operation-left{
flex-grow: 1;
}
.operation-center{
justify-content: space-between;
}
.operation-center-line{
width: 4rpx;
height: 23rpx;
background: #282828;
position: absolute;
left: 0;
top: 46rpx;
}
.operation.activeOne .operation-center-box{
background: #FFFFFF;
}
.operation-center-box{
flex-grow: 1;
position: relative;
border-radius: 30rpx;
padding: 31rpx 40rpx 21rpx 22rpx;
margin-bottom: 50rpx;
box-shadow: 0px 6px 29px 0px rgba(76, 76, 76, 0.09);
border-radius: 30rpx;
}
.operation-center-box.active{
background-color: dodgerblue !important;
}
.operation-center-box.active .operation-center-line{
background: #FFF !important;
}
.operation-center-box.active .operation-state-text,
.operation-center-box.active .operation-name{
color: #FFF !important;
}
.operation{
margin: 0 50rpx;
}
.operation-box{
}
</style>
<template>
<view class="setComments-box">
<!-- <view class="setComments-add" @click="addComments">
<view class="setComments-add" @click="addComments">
<van-icon name="plus" /><text>创建评价</text>
</view> -->
</view>
<view class="index-student-information">
<view class="setComments-content-box" v-if="dataList.length>0">
<template v-for="(item,index) in dataList">
......@@ -57,7 +57,7 @@
} from "vue";
import navbar from '../../components/navbar.vue'
export default {
props: ["CourseCommentTimesList"],
props: ["CourseCommentTimesList","courseId"],
emits: ['refreshData'],
components: {
navbar,
......@@ -74,8 +74,9 @@
});
let methods = {
addComments(){
console.log(props.courseId)
uni.navigateTo({
url: '/pages/setComments/commentRulesList?show=' + true
url: '/pages/setComments/teacher-commit?courseId=' + props.courseId
})
},
showActionHandler(item){
......
......@@ -84,17 +84,17 @@
}
};
//监听属性数组
// watch(() => props["courseStuList"], (newValue, oldValue) => {
// if (newValue != oldValue && newValue && newValue.length > 0) {
// let addList = function(arr) {
// arr.forEach((item) => {item.state = false;})
// }
// addList(newValue);
// data.stuList = newValue;
// }
// }, {
// deep: true,
// });
watch(() => props["courseStuList"], (newValue, oldValue) => {
if (newValue != oldValue && newValue && newValue.length > 0) {
let addList = function(arr) {
arr.forEach((item) => {item.state = false;})
}
addList(newValue);
data.stuList = newValue;
}
}, {
deep: true,
});
let that = methods;
return {
...toRefs(data),
......
......@@ -66,6 +66,11 @@
"style": {
"navigationStyle": "custom"
}
},{
"path": "pages/setComments/teacher-commit"
// "style": {
// "navigationStyle": "custom"
// }
}
],
......
......@@ -145,16 +145,16 @@
},
onShareAppMessage() {
return {
title: "学情反馈信息",
title: "进阶思维学情反馈",
query: "/pages/index/index",
imageUrl: "",
imageUrl: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1654483222000_317.png",
};
},
onShareTimeline() {
return {
title: "学情反馈信息",
title: "进阶思维学情反馈",
query: "/pages/index/index",
imageUrl: "",
imageUrl: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1654483222000_317.png",
};
},
};
......
......@@ -131,7 +131,8 @@
data.showPopu=status==1
},
goSet(){
let url='/pages/setComments/setComments?CourseId='+data.currentCourseId;
//let url='/pages/setComments/setComments?CourseId='+data.currentCourseId;
let url='/pages/setComments/teacher-commit?courseId='+data.currentCourseId;
console.log("url",url);
uni.navigateTo({
url:url
......@@ -260,14 +261,14 @@
return {
title: "进阶思维学情反馈",
query: "/pages/index/index",
imageUrl: "",
imageUrl: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1654483222000_317.png",
};
},
onShareTimeline() {
return {
title: "进阶思维学情反馈",
query: "/pages/index/index",
imageUrl: "",
imageUrl: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1654483222000_317.png",
};
},
};
......
......@@ -30,7 +30,7 @@
</view>
</view>
</view>
<setComments :CourseCommentTimesList="courseTimeList" @refreshData="getCourseCommentTimes"></setComments>
<setComments v-if="Msg.CourseId!=''" :CourseCommentTimesList="courseTimeList" :courseId="Msg.CourseId" @refreshData="getCourseCommentTimes"></setComments>
</view>
</view>
......@@ -120,7 +120,7 @@
},
onLoad(option) {
this.Msg.CourseId = option.CourseId;
console.log(option)
},
onShow() {
this.getCourseRule();
......
<template>
<page-meta>
<view style="height: 100vh;background-color: #f5f5f5;">
<van-cell-group title="基本信息" inset>
<van-field
v-model="msg.Title"
placeholder="输入本次评价名称"
label="评语标题"
:border="false"
@change="changeTitle"
input-align="right"
/>
<van-cell title="参与学员" :value="showStusStr" is-link @click="showStus=StuList.length>0" />
</van-cell-group>
<van-cell-group title="生成参数" inset>
<van-cell title="参考作业" :value="showWorkStr" is-link @click="showWorks=homeWorks.length>0" />
<van-cell title="使用模板">
<view slot="">
<van-switch :checked="msg.UseTemplate" @change="changeCreateMethod" active-color="#C91727" inactive-color="#282828" size="24px" />
</view>
</van-cell>
<van-cell title="选择模板" v-if="msg.UseTemplate" :value="showWorkStr" is-link @click="showWorks=homeWorks.length>0" />
</van-cell-group>
<van-cell-group title="评语内容" inset v-if="!msg.UseTemplate">
<textarea placeholder="请填写评论内容" class="user-pingyu" v-model="msg.Info"></textarea>
</van-cell-group>
</view>
<van-popup :z-index="1000" :show="showStus" :round="true" position="bottom" custom-style="height: 70vh" @close="closepopup">
<studentsPopu :courseStuList="StuList" @getdata="getChosenStus"></studentsPopu>
</van-popup>
<van-popup :z-index="1000" :show="showWorks" :close-on-click-overlay="false" :round="true" position="bottom" custom-style="height: 70vh" @close="closepopupWork">
<operation :dataList="homeWorks" @selected="selectedWorkHandler"></operation>
</van-popup>
</page-meta>
</template>
<script>
import {
reactive,
toRefs,
onMounted,
getCurrentInstance,
inject
} from "vue";
import studentsPopu from '@/components/setComments/studentsPopu'
import operation from '@/components/setComments/operation'
export default {
props: {},
components: {studentsPopu,operation},
setup() {
let {
proxy
} = getCurrentInstance();
uni.setNavigationBarTitle({
title: '手动创建评语'
})
let data = reactive({
msg:{
Title:'',
StuId:'',
CourseId:0,
UseTemplate:true,
TemplateId:0,
Info:''
},
chosenStus:[],
StuList:[],
showStusStr:'全班',
showWorkStr:'请选择',
showStus:false,
showWorks:false,
homeWorks:[],
chosenHomeWork:[],
showTemplate:[],
showTemplateStr:'请选择',
});
let methods = {
changeTitle({detail}){
data.msg.Title=detail
},
closepopup(){
data.showStus=false
},
closepopupWork(){
data.showWorks=false
},
changeCreateMethod({detail}){
data.msg.UseTemplate=detail
},
getChosenStus(array) {
data.chosenStus = array
if(data.chosenStus && data.chosenStus.length>0){
if(data.chosenStus.length == data.StuList.length){
data.showStusStr=`全班(${data.StuList.length}人)`
}else{
let tempStr=""
data.chosenStus.forEach((x,i)=>{
if(i<3){
tempStr=`${tempStr}${StuName}`
}
})
data.showStusStr=tempStr.substring(1,tempStr.length-1)
data.showStusStr+=data.chosenStus.length>3?`等¥{data.chosenStus.length}人`:""
}
}else{
data.showStusStr='请选择'
}
data.msg.StuId=[]
array.forEach(x=>{
data.msg.StuId.push(x.StuId)
})
methods.closepopup()
},
getCourseStu() {
uni.showLoading()
let stuMsg = {
courseId: data.msg.CourseId
};
proxy.$request("/Teacher/GetCourseStu", stuMsg).then(res => {
console.log("res", res);
if (res) {
data.StuList = res.Data;
data.showStusStr=data.StuList.length>0?`请选择`:'暂无可选学员'
}
uni.hideLoading()
})
},
getCourseHomeWorkList(){
data.pageState = "loading";
proxy.$request("/Teacher/GetCourseHomeWork", {'courseId':data.msg.CourseId}).then(res => {
if(res){
res.Data.forEach(x=>{
x.checked=false
})
data.homeWorks = res.Data;
data.showWorkStr=data.homeWorks.length>0?`请选择`:'暂无可选作业'
}
})
},
selectedWorkHandler(arr){
data.chosenHomeWork=arr
data.showWorkStr=data.chosenHomeWork.length>0?`已选择${data.chosenHomeWork.length}个作业`:'请选择'
data.homeWorks.forEach(x=>{
x.checked=arr.find(y=>y.HomeWorkId==x.HomeWorkId)?true:false
})
methods.closepopupWork()
}
};
return {
...toRefs(data),
...methods
};
},
onLoad(option) {
console.log(option)
this.msg.CourseId = option.courseId;
this.getCourseStu()
this.getCourseHomeWorkList()
},
onShow() {
}
};
</script>
<style scoped>
.user-pingyu {
width: 100%;
font-size: 30rpx;
font-weight: 400;
color: #282828;
background: #FFF;
padding: 20rpx;
line-height: 48rpx;
}
</style>
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