Commit cb8efaca authored by 罗超's avatar 罗超

调整

parent 1f8b4d2b
...@@ -132,8 +132,8 @@ ...@@ -132,8 +132,8 @@
data.showPopu=status==1 data.showPopu=status==1
}, },
goSet(){ goSet(){
let url='/pages/setComments/teacher-commit?courseId='+data.currentCourseId; //let url='/pages/setComments/teacher-commit?courseId='+data.currentCourseId;
//let url='/pages/setComments/setComments?CourseId='+data.currentCourseId+'&CourseName='+data.CourseName; let url='/pages/setComments/setComments?CourseId='+data.currentCourseId+'&CourseName='+data.CourseName;
uni.navigateTo({ uni.navigateTo({
url:url url:url
......
...@@ -89,10 +89,7 @@ ...@@ -89,10 +89,7 @@
}, },
setup() { setup() {
let { let {
refs proxy,refs
} = getCurrentInstance();
let {
proxy
} = getCurrentInstance(); } = getCurrentInstance();
let data = reactive({ let data = reactive({
Msg: { Msg: {
......
...@@ -20,12 +20,17 @@ ...@@ -20,12 +20,17 @@
<van-switch :checked="msg.UseTemplate" @change="changeCreateMethod" active-color="#C91727" inactive-color="#282828" size="24px" /> <van-switch :checked="msg.UseTemplate" @change="changeCreateMethod" active-color="#C91727" inactive-color="#282828" size="24px" />
</view> </view>
</van-cell> </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>
<van-cell-group title="评语内容" inset v-if="!msg.UseTemplate"> <van-cell-group title="评语内容" inset v-if="!msg.UseTemplate">
<textarea placeholder="请填写评论内容" class="user-pingyu" v-model="msg.Info"></textarea> <textarea placeholder="请填写评论内容" class="user-pingyu" v-model="msg.Info"></textarea>
</van-cell-group> </van-cell-group>
<view style="margin:32rpx;">
<van-button type="danger" :loading="saveLoading" round block @click="saveHandler">立即生成</van-button>
</view>
</view> </view>
<van-popup :z-index="1000" :show="showStus" :round="true" position="bottom" custom-style="height: 70vh" @close="closepopup"> <van-popup :z-index="1000" :show="showStus" :round="true" position="bottom" custom-style="height: 70vh" @close="closepopup">
<studentsPopu :courseStuList="StuList" @getdata="getChosenStus"></studentsPopu> <studentsPopu :courseStuList="StuList" @getdata="getChosenStus"></studentsPopu>
...@@ -33,7 +38,13 @@ ...@@ -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"> <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> <operation :dataList="homeWorks" @selected="selectedWorkHandler"></operation>
</van-popup> </van-popup>
<van-action-sheet
:show="showTemplate"
:actions="actions"
@close="closeAction"
@select="selectAction"
description="选择使用的评语模板"
/>
</page-meta> </page-meta>
</template> </template>
<script> <script>
...@@ -57,6 +68,7 @@ ...@@ -57,6 +68,7 @@
title: '手动创建评语' title: '手动创建评语'
}) })
let data = reactive({ let data = reactive({
actions: [{name:'第一次评论',type:1},{name:'第二次评论',type:2},{name:'第三次评论',type:3}],
msg:{ msg:{
Title:'', Title:'',
StuId:'', StuId:'',
...@@ -73,11 +85,31 @@ ...@@ -73,11 +85,31 @@
showWorks:false, showWorks:false,
homeWorks:[], homeWorks:[],
chosenHomeWork:[], chosenHomeWork:[],
showTemplate:[], showTemplate:false,
showTemplateStr:'请选择', showTemplateStr:'请选择',
saveLoading:false
}); });
let methods = { 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}){ changeTitle({detail}){
data.msg.Title=detail data.msg.Title=detail
}, },
...@@ -99,11 +131,11 @@ ...@@ -99,11 +131,11 @@
let tempStr="" let tempStr=""
data.chosenStus.forEach((x,i)=>{ data.chosenStus.forEach((x,i)=>{
if(i<3){ if(i<3){
tempStr=`${tempStr}${StuName}` tempStr=`${tempStr}${x.StuName}`
} }
}) })
data.showStusStr=tempStr.substring(1,tempStr.length-1) 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{ }else{
data.showStusStr='请选择' data.showStusStr='请选择'
...@@ -123,7 +155,7 @@ ...@@ -123,7 +155,7 @@
console.log("res", res); console.log("res", res);
if (res) { if (res) {
data.StuList = res.Data; data.StuList = res.Data;
data.showStusStr=data.StuList.length>0?`请选择`:'暂无可选学员' data.showStusStr=data.StuList.length>0?`全班(${data.StuList.length}人)`:'暂无可选学员'
} }
uni.hideLoading() 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