Commit 3624fcbe authored by 罗超's avatar 罗超

调整

parent 0932f873
...@@ -174,9 +174,9 @@ ...@@ -174,9 +174,9 @@
queryTecherCourse(){ queryTecherCourse(){
getTeacherCourse().then(r=>{ getTeacherCourse().then(r=>{
data.courses=r.Data 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[1].data=r.Data.NotFinishList.reverse()
data.titleList[2].data=r.Data.FinishList data.titleList[2].data=r.Data.FinishList.reverse()
data.currentCourse=r.Data.AllCourseList.length>0?r.Data.AllCourseList[0]:null data.currentCourse=r.Data.AllCourseList.length>0?r.Data.AllCourseList[0]:null
console.log(data.currentCourse) console.log(data.currentCourse)
ctx.emit('change',data.currentCourse?data.currentCourse.courseId:0) ctx.emit('change',data.currentCourse?data.currentCourse.courseId:0)
......
...@@ -16,12 +16,7 @@ ...@@ -16,12 +16,7 @@
<view class="commentDetailsList-img-text"> <view class="commentDetailsList-img-text">
<view class="img-text" @click.stop="clickOptionsShow(item)"> <view class="img-text" @click.stop="clickOptionsShow(item)">
<text>{{item.ShowTypeStr}}</text> <text>{{item.ShowTypeStr}}</text>
<van-icon :name="item.optionsShow?'arrow-down':'arrow'" /> <van-icon name="arrow-down" />
</view>
<view v-if="item.optionsShow" class="Detailstype flex">
<text v-for="(subItem,index) in optionsList" :key="index" @click="clickoptions(item,subItem)">
{{subItem.text}}
</text>
</view> </view>
</view> </view>
<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" /> <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" />
...@@ -58,7 +53,7 @@ ...@@ -58,7 +53,7 @@
import navbar from '../../components/navbar.vue' import navbar from '../../components/navbar.vue'
export default { export default {
props: ["CourseCommentTimesList", "qMsg"], props: ["CourseCommentTimesList", "qMsg"],
emits: ['refreshData'], emits: ['refreshData','check-status'],
components: { components: {
navbar, navbar,
commentDetailsPopu commentDetailsPopu
...@@ -85,11 +80,8 @@ ...@@ -85,11 +80,8 @@
show: false show: false
}); });
let methods = { let methods = {
clickOptionsShow(item) { clickOptionsShow(item){
item.optionsShow = !item.optionsShow; context.emit('check-status',item)
},
clickoptions(item,subItem){
}, },
goAdd() { goAdd() {
let url = '/pages/setComments/addComment?CourseId=' + this.qMsg.CourseId + "&CommentTimes=" + this.qMsg.CommentTimes; let url = '/pages/setComments/addComment?CourseId=' + this.qMsg.CourseId + "&CommentTimes=" + this.qMsg.CommentTimes;
...@@ -128,27 +120,6 @@ ...@@ -128,27 +120,6 @@
} }
}); });
}, },
clickOptionsShow(item) {
item.optionsShow = !item.optionsShow;
},
//实在评价可见性
clickoptions(item, subItem) {
let showTypeMsg = {
CourseId: item.CourseId,
Times: item.Times,
ShowType: subItem.value
};
return
proxy.$request("/Teacher/SetStuCommentShowTypeByTimes", showTypeMsg).then(res => {
if (res) {
}
})
item.optionsShow = false;
//调用父组件方法
context.emit('refreshData');
},
//刷新数据 //刷新数据
changeData() { changeData() {
//调用父组件方法 //调用父组件方法
......
<template> <template>
<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" />
...@@ -8,11 +8,11 @@ ...@@ -8,11 +8,11 @@
<textarea placeholder="请填写评语内容" v-model="stuCommentObj.Info"></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>
</template> </template>
<script> <script>
import { import {
...@@ -59,16 +59,20 @@ ...@@ -59,16 +59,20 @@
data.show = false data.show = false
}, },
save() { save() {
uni.showLoading()
proxy.$request("/Teacher/SetStuCommentInfo", data.stuCommentObj).then(res => { proxy.$request("/Teacher/SetStuCommentInfo", data.stuCommentObj).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
ctx.emit("change");
data.show = false
}else{
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
duration: 500 duration: 2000,
title:'保存失败,请重试'
}); });
} }
uni.hideLoading()
}); });
ctx.emit("change");
data.show = false
} }
}; };
let that = methods; let that = methods;
...@@ -92,12 +96,12 @@ ...@@ -92,12 +96,12 @@
font-size: 30rpx; font-size: 30rpx;
line-height: 58rpx; line-height: 58rpx;
font-weight: 400; font-weight: 400;
height: 50vh;
color: #282828; color: #282828;
} }
.commentPopup-content { .commentPopup-content {
background: #F7F7F7; background: #F7F7F7;
border-radius: 30rpx; border-radius: 30rpx;
min-height: 152rpx;
padding: 37rpx 43rpx; padding: 37rpx 43rpx;
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<!-- <input v-model="ruleObj.Title" class="rulesPopup-name" placeholder="请输入本组自定义规则名称" /> --> <!-- <input v-model="ruleObj.Title" class="rulesPopup-name" placeholder="请输入本组自定义规则名称" /> -->
<view class="rulesPopup-RuleSettings"> <view class="rulesPopup-RuleSettings">
<view class="RuleSettings-title">规则设置</view> <view class="RuleSettings-title">规则设置</view>
<sRegionSlider :minValue="minValue" :maxValue="maxValue" :fillMinValue='rangeValue[0]' :fullValue='rangeValue[1]' :step="5" <sRegionSlider v-if="readyShow" :minValue="minValue" :maxValue="maxValue" :fillMinValue='rangeValue[0]' :fullValue='rangeValue[1]' :step="5"
@up="up" @down="down" @move="move" /> @up="up" @down="down" @move="move" />
</view> </view>
</view> </view>
...@@ -75,7 +75,8 @@ ...@@ -75,7 +75,8 @@
minValue:0, minValue:0,
maxValue:0, maxValue:0,
rangeValue:[0,100], rangeValue:[0,100],
rules:props.rules rules:props.rules,
readyShow:false
}); });
if(props.rule!=-1){ if(props.rule!=-1){
let tempRule=data.rules.CommentDetails[props.rule] let tempRule=data.rules.CommentDetails[props.rule]
...@@ -135,6 +136,7 @@ ...@@ -135,6 +136,7 @@
} }
}; };
let that = methods; let that = methods;
data.readyShow=true
return { return {
...toRefs(data), ...toRefs(data),
...methods ...methods
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<text class="setComments-title-left">{{item.Times}}次评价</text> <text class="setComments-title-left">{{item.Times}}次评价</text>
<view class="setComments-title-right"> <view class="setComments-title-right">
<view class="setComments-options flex"> <view class="setComments-options flex">
<view class="setComments-options-title flex" @click.stop="clickOptionsShow(item)"> <view class="setComments-options-title flex" @click.stop="showActionHandler(item)">
<view class="point"></view> <view class="point"></view>
<text>{{item.ShowTypeStr}}</text> <text>{{item.ShowTypeStr}}</text>
<van-icon :name="item.optionsShow?'arrow-down':'arrow'" /> <van-icon :name="item.optionsShow?'arrow-down':'arrow'" />
...@@ -37,6 +37,13 @@ ...@@ -37,6 +37,13 @@
<view>暂无评价规则数据</view> <view>暂无评价规则数据</view>
</view> </view>
</view> </view>
<van-action-sheet
:show="showAction"
:actions="actions"
@close="closeAction"
@select="selectAction"
description="修改本期评语的可见状态"
/>
</view> </view>
</template> </template>
<script> <script>
...@@ -60,56 +67,56 @@ ...@@ -60,56 +67,56 @@
proxy proxy
} = getCurrentInstance(); } = getCurrentInstance();
let data = reactive({ let data = reactive({
optionsList: [{ actions: [{name:'全部可见',type:1},{name:'全部不可见', color: '#ee0a24',type:3}],
text: '可见',
value: 1
},
{
text: '部分可见',
value: 2
},
{
text: '不可见',
value: 3
},
],
dataList: [], dataList: [],
showAction:false,
currentAction:null
}); });
let methods = { let methods = {
// back() {
// uni.navigateBack({
// delta: 1
// })
// },
addComments(){ addComments(){
uni.navigateTo({ uni.navigateTo({
url: '/pages/setComments/commentRulesList?show=' + true url: '/pages/setComments/commentRulesList?show=' + true
}) })
}, },
showActionHandler(item){
data.currentAction=item
data.showAction=true
},
closeAction(){
data.showAction=false
data.currentAction=null
},
selectAction(e){
let x=e.detail
methods.clickoptions(x.type)
},
goComment(item){ goComment(item){
uni.navigateTo({ uni.navigateTo({
url: '/pages/setComments/commentDetails?comment='+ encodeURIComponent(JSON.stringify(item)) url: '/pages/setComments/commentDetails?comment='+ encodeURIComponent(JSON.stringify(item))
}) })
}, },
clickOptionsShow(item) { // clickOptionsShow(item) {
item.optionsShow = !item.optionsShow; // item.optionsShow = !item.optionsShow;
}, // },
clickoptions(item,subItem) { clickoptions(type) {
let showTypeMsg = { let showTypeMsg = {
CourseId: item.CourseId, CourseId: data.currentAction.CourseId,
Times: item.Times, Times: data.currentAction.Times,
ShowType: subItem.value ShowType: type
}; };
proxy.$request("/Teacher/SetStuCommentShowTypeByTimes", showTypeMsg).then(res => { proxy.$request("/Teacher/SetStuCommentShowTypeByTimes", showTypeMsg).then(res => {
if (res) { if (res.Code==1) {
console.log(res)
context.emit('refreshData');
}else{
uni.showToast({
title:"设置失败,请重试",
duration:2000
})
} }
}) })
item.optionsShow = false;
//调用父组件方法
context.emit('refreshData');
} }
}; };
//监听属性数组 //监听属性数组
...@@ -125,10 +132,7 @@ ...@@ -125,10 +132,7 @@
...toRefs(data), ...toRefs(data),
...methods ...methods
}; };
}, }
onLoad(option) {
},
}; };
</script> </script>
<style scoped> <style scoped>
......
...@@ -315,7 +315,7 @@ export default { ...@@ -315,7 +315,7 @@ export default {
</script> </script>
<style scoped> <style>
.scale view{ .scale view{
width: 2rpx; width: 2rpx;
height: 7rpx; height: 7rpx;
......
...@@ -25,8 +25,14 @@ ...@@ -25,8 +25,14 @@
</view> </view>
</view> </view>
</view> </view>
<commentDetails :qMsg="Msg" :CourseCommentTimesList="courseTimeList" @refreshData="getStuCommentList"></commentDetails> <commentDetails :qMsg="Msg" @check-status="showActionHandler" :CourseCommentTimesList="courseTimeList" @refreshData="getStuCommentList"></commentDetails>
<van-action-sheet
:show="showAction"
:actions="actions"
@close="closeAction"
@select="selectAction"
description="修改本期评语的可见状态"
/>
</view> </view>
</view> </view>
...@@ -55,19 +61,9 @@ ...@@ -55,19 +61,9 @@
} = getCurrentInstance(); } = getCurrentInstance();
let data = reactive({ let data = reactive({
value: 1, value: 1,
optionsList: [{ actions: [{name:'可见',type:1},{name:'不可见', color: '#ee0a24',type:3}],
text: '部分可见', showAction:false,
value: 0 currentAction:null,
},
{
text: '可见不可见',
value: 1
},
{
text: '活动商品',
value: 2
},
],
radioList: [{ radioList: [{
name: '使用默认配置', name: '使用默认配置',
id: 1, id: 1,
...@@ -97,12 +93,43 @@ ...@@ -97,12 +93,43 @@
delta: 1 delta: 1
}) })
}, },
showActionHandler(item){
data.currentAction=item
data.showAction=true
},
closeAction(){
data.showAction=false
data.currentAction=null
},
selectAction(e){
let x=e.detail
methods.clickoptions(x.type)
},
//实在评价可见性
clickoptions(type) {
let showTypeMsg = {
ids: ''+data.currentAction.Id,
ShowType: type
};
proxy.$request("/Teacher/SetStuCommentShowTypeByTimes", showTypeMsg).then(res => {
if (res.Code==1) {
methods.getStuCommentList()
}else{
uni.showToast({
title:"设置失败,请重试",
duration:2000
})
}
})
},
//获取系统生成学员评价列表 //获取系统生成学员评价列表
getStuCommentList(){ getStuCommentList(){
uni.showLoading()
proxy.$request("/Teacher/GetStuCommentList", data.Msg).then(res => { proxy.$request("/Teacher/GetStuCommentList", data.Msg).then(res => {
if (res) { if (res) {
data.courseTimeList = res.Data; data.courseTimeList = res.Data;
} }
uni.hideLoading()
}) })
} }
}; };
......
...@@ -78,38 +78,37 @@ ...@@ -78,38 +78,37 @@
}); });
let methods = { let methods = {
backFirst() { backFirst() {
console.log('come in...')
console.log(getCurrentPages())
uni.navigateBack({ uni.navigateBack({
url:'/pages/index/workSituation', url:'/pages/index/workSituation',
delta: 1 delta: 1
}) })
}, },
radioChange(e) {
console.log("打印国家名称", e.target.value)
},
//获取课程评论次数列表 //获取课程评论次数列表
getCourseCommentTimes() { getCourseCommentTimes() {
uni.showLoading()
proxy.$request("/Teacher/GetCourseCommentTimes", data.Msg).then(res => { proxy.$request("/Teacher/GetCourseCommentTimes", data.Msg).then(res => {
if (res) { if (res) {
data.courseTimeList = res.Data; data.courseTimeList = res.Data;
} }
uni.hideLoading()
}) })
}, },
//获取课程评价规则信息 //获取课程评价规则信息
getCourseRule() { getCourseRule() {
uni.showLoading()
proxy.$request("/Teacher/GetCourseComment", data.Msg).then(res => { proxy.$request("/Teacher/GetCourseComment", data.Msg).then(res => {
if (res) { if (res) {
data.courseRule = res.Data; data.courseRule = res.Data;
} }
uni.hideLoading()
}) })
}, },
goRules() { goRules() {
console.log('come in 2 ....') console.log('come in 2 ....')
uni.navigateTo({ uni.navigateTo({
//url: '/pages/setComments/commentRulesList?CourseId=' + data.Msg.CourseId //url: '/pages/setComments/commentRulesList?CourseId=' + data.Msg.CourseId
url: '/pages/setComments/commentRulesList?show=' + false+'CourseId=' + data.Msg.CourseId url: '/pages/setComments/commentRulesList?show=' + false+'&CourseId=' + data.Msg.CourseId
}) })
} }
}; };
......
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