Commit e564b053 authored by youjie's avatar youjie

Merge branch 'master' of http://gitlab.oytour.com/youjie/thinkapp

parents 8feb3f06 ea0a030e
<template>
<view class="commentDetailsList-box">
<view class="commentDetailsList-add" @click="goAdd">
<van-icon name="plus" /><text>增加评论</text> </view>
<view class="index-student-information">
<view class="commentDetailsList-content">
<view class="commentDetailsList-list" v-for="(item,index) in CourseCommentTimesList" :key="index">
<!-- <view class="commentDetailsList-cross" @click="deleteRules">
<van-icon name="plus" />
<text>增加评论</text>
</view>
<view class="index-student-information">
<view class="commentDetailsList-content">
<view class="commentDetailsList-list" v-for="(item,index) in CourseCommentTimesList" :key="index">
<!-- <view class="commentDetailsList-cross" @click="deleteRules">
<van-icon name="cross" />
</view> -->
<view class="commentDetailsList-img flex">
<view>{{item.StuName}}</view>
<view class="flex">
<text>{{item.ShowTypeStr}}</text>
<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 class="Wire"></view>
</view>
<view class="commentDetailsList-comment">
{{item.Info}}
</view>
</view>
</view>
<view class="noData">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653902791000_806.png" mode="widthFix"></image>
<view>暂无评论规则数据</view>
</view>
</view>
<template v-show="show">
<commentDetailsPopu ref="getcommentPopup" @change="changeData"></commentDetailsPopu>
</template>
<view class="commentDetailsList-img flex">
<view>{{item.StuName}}</view>
<view class="flex">
<text>{{item.ShowTypeStr}}</text>
<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 class="Wire"></view>
</view>
<view class="commentDetailsList-comment">
{{item.Info}}
</view>
</view>
</view>
<view class="noData">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653902791000_806.png" mode="widthFix"></image>
<view>暂无评论规则数据</view>
</view>
</view>
<template v-show="show">
<commentDetailsPopu ref="getcommentPopup" @change="changeData"></commentDetailsPopu>
</template>
</view>
</template>
<script>
import commentDetailsPopu from '@/components/setComments/commentDetailsPopu'
import commentDetailsPopu from '@/components/setComments/commentDetailsPopu'
import {
ref,
ref,
reactive,
toRefs,
onMounted,
......@@ -46,62 +47,66 @@
} from "vue";
import navbar from '../../components/navbar.vue'
export default {
props: ["CourseCommentTimesList"],
props: ["CourseCommentTimesList", "qMsg"],
emits: ['refreshData'],
components: {
navbar,
commentDetailsPopu
commentDetailsPopu
},
setup(props, context) {
let { refs } = getCurrentInstance();
let {
refs
} = getCurrentInstance();
let {
proxy
} = getCurrentInstance();
let data = reactive({
dataList: [],
show:false
show: false
});
let methods = {
goAdd(){
uni.navigateTo({
url: '/pages/setComments/addComment'
goAdd() {
let url = '/pages/setComments/addComment?CourseId=' + this.qMsg.CourseId + "&CommentTimes=" + this.qMsg.CommentTimes;
console.log("url", url);
uni.navigateTo({
url: url
})
},
},
back() {
uni.navigateBack({
delta: 1
})
},
addRules(){//添加规则
data.show = true
refs.getcommentPopup.$vm.showFun()
},
editRules(item){//编辑规则
data.show = true
refs.getcommentPopup.$vm.showFun(item)
},
deleteRules (){//删除规则
uni.showModal({
title: '提示',
content: '将删除该评价,是否继续',
success: function (res) {
if (res.confirm) {
console.log('---')
} else if (res.cancel) {
uni.showToast({
title:'已取消',
icon:'none',
duration: 500
})
}
}
});
},
addRules() { //添加规则
data.show = true
refs.getcommentPopup.$vm.showFun()
},
editRules(item) { //编辑规则
data.show = true
refs.getcommentPopup.$vm.showFun(item)
},
deleteRules() { //删除规则
uni.showModal({
title: '提示',
content: '将删除该评价,是否继续',
success: function(res) {
if (res.confirm) {
console.log('---')
} else if (res.cancel) {
uni.showToast({
title: '已取消',
icon: 'none',
duration: 500
})
}
}
});
},
clickOptionsShow(item) {
item.optionsShow = !item.optionsShow;
},
//实在评价可见性
clickoptions(item,subItem) {
clickoptions(item, subItem) {
let showTypeMsg = {
CourseId: item.CourseId,
Times: item.Times,
......@@ -109,24 +114,23 @@
};
proxy.$request("/Teacher/SetStuCommentShowTypeByTimes", showTypeMsg).then(res => {
if (res) {
}
})
item.optionsShow = false;
//调用父组件方法
context.emit('refreshData');
},
//刷新数据
changeData()
{
changeData() {
//调用父组件方法
context.emit('refreshData');
}
};
//监听属性数组
watch(() => props["CourseCommentTimesList"], (newValue, oldValue) => {
if (newValue != oldValue && newValue && newValue.length > 0) {
data.dataList = newValue;
}
......@@ -139,12 +143,12 @@
};
},
onLoad(option) {
},
};
</script>
<style scoped>
.noData {
.noData {
text-align: center;
flex: 1;
width: 100%;
......
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