Commit cb8efaca authored by 罗超's avatar 罗超

调整

parent 1f8b4d2b
......@@ -132,8 +132,8 @@
data.showPopu=status==1
},
goSet(){
let url='/pages/setComments/teacher-commit?courseId='+data.currentCourseId;
//let url='/pages/setComments/setComments?CourseId='+data.currentCourseId+'&CourseName='+data.CourseName;
//let url='/pages/setComments/teacher-commit?courseId='+data.currentCourseId;
let url='/pages/setComments/setComments?CourseId='+data.currentCourseId+'&CourseName='+data.CourseName;
uni.navigateTo({
url:url
......
......@@ -89,10 +89,7 @@
},
setup() {
let {
refs
} = getCurrentInstance();
let {
proxy
proxy,refs
} = getCurrentInstance();
let data = reactive({
Msg: {
......
......@@ -20,12 +20,17 @@
<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 title="选择模板" v-if="msg.UseTemplate" :value="showTemplateStr" is-link @click="showTemplate=true" />
</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 style="margin:32rpx;">
<van-button type="danger" :loading="saveLoading" round block @click="saveHandler">立即生成</van-button>
</view>
</view>
<van-popup :z-index="1000" :show="showStus" :round="true" position="bottom" custom-style="height: 70vh" @close="closepopup">
<studentsPopu :courseStuList="StuList" @getdata="getChosenStus"></studentsPopu>
......@@ -33,7 +38,13 @@
<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>
<van-action-sheet
:show="showTemplate"
:actions="actions"
@close="closeAction"
@select="selectAction"
description="选择使用的评语模板"
/>
</page-meta>
</template>
<script>
......@@ -57,6 +68,7 @@
title: '手动创建评语'
})
let data = reactive({
actions: [{name:'第一次评论',type:1},{name:'第二次评论',type:2},{name:'第三次评论',type:3}],
msg:{
Title:'',
StuId:'',
......@@ -73,11 +85,31 @@
showWorks:false,
homeWorks:[],
chosenHomeWork:[],
showTemplate:[],
showTemplate:false,
showTemplateStr:'请选择',
saveLoading:false
});
let methods = {
saveHandler(){
if(data.saveLoading) return
data.saveLoading=true
//验证数据
uni.showLoading()
//调用接口
//状态性显示
},
closeAction(){
data.showTemplate=false
},
selectAction(e){
let x=e.detail
data.msg.TemplateId=x.type
data.showTemplateStr=x.name
},
changeTitle({detail}){
data.msg.Title=detail
},
......@@ -99,11 +131,11 @@
let tempStr=""
data.chosenStus.forEach((x,i)=>{
if(i<3){
tempStr=`${tempStr}${StuName}`
tempStr=`${tempStr}${x.StuName}`
}
})
data.showStusStr=tempStr.substring(1,tempStr.length-1)
data.showStusStr+=data.chosenStus.length>3?`等{data.chosenStus.length}人`:""
data.showStusStr+=data.chosenStus.length>3?`等${data.chosenStus.length}人`:""
}
}else{
data.showStusStr='请选择'
......@@ -123,7 +155,7 @@
console.log("res", res);
if (res) {
data.StuList = res.Data;
data.showStusStr=data.StuList.length>0?`请选择`:'暂无可选学员'
data.showStusStr=data.StuList.length>0?`全班(${data.StuList.length}人)`:'暂无可选学员'
}
uni.hideLoading()
})
......
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