Commit 4c4778f1 authored by 黄奎's avatar 黄奎

页面修改

parent 8bc49d23
......@@ -55,7 +55,8 @@
toRefs,
onMounted,
getCurrentInstance,
inject
inject,
watch
} from "vue";
export default {
......@@ -64,7 +65,6 @@
},
components: {},
setup(props) {
let data = reactive({
dataList: props.dataList
});
......
<template>
<view class="setComments-box">
<view class="setComments-add"><van-icon name="plus" /><text>创建评价</text> </view>
<view class="index-student-information">
<view class="setComments-content-box">
<view class="setComments-content">
<view class="center-line"></view>
<view class="setComments-title flex">
<text class="setComments-title-left">第一次评价</text>
<view class="setComments-title-right">
<view class="setComments-options flex">
<view class="setComments-options-title flex" @click="clickOptionsShow">
<view class="point"></view>
<text>{{optionsObj.text?optionsObj.text:'选择'}}</text>
<van-icon :name="optionsShow?'arrow-down':'arrow'" />
</view>
<view v-if="optionsShow" class="setComments-options-text flex">
<text
v-for="(item,index) in optionsList"
:key="index"
@click="clickoptions(item)">
{{item.text}}
</text>
</view>
</view>
</view>
</view>
<view class="setComments-source flex">
<text>来源: 5555</text>
<view>时间:2022-05-30</view>
</view>
<view class="setComments-Evaluation">
<view>
<text>学员评价</text>
<text>评价规则</text>
</view>
</view>
</view>
</view>
</view>
<view class="setComments-add">
<van-icon name="plus" /><text>创建评价</text> </view>
<view class="index-student-information">
<view class="setComments-content-box">
<template v-for="(item,index) in dataList">
<view class="setComments-content">
<view class="center-line"></view>
<view class="setComments-title flex">
<text class="setComments-title-left">{{item.Times}}次评价</text>
<view class="setComments-title-right">
<view class="setComments-options flex">
<view class="setComments-options-title flex" @click="clickOptionsShow(item)">
<view class="point"></view>
<text>{{item.ShowTypeStr}}</text>
<van-icon :name="item.optionsShow?'arrow-down':'arrow'" />
</view>
<view v-if="item.optionsShow" class="setComments-options-text flex">
<text v-for="(subItem,index) in optionsList" :key="index" @click="clickoptions(item,subItem)">
{{subItem.text}}
</text>
</view>
</view>
</view>
</view>
<view class="setComments-source flex">
<text>来源:{{item.CreateTypeStr}}</text>
<view>时间:{{item.CreateTime}}</view>
</view>
</view>
</template>
</view>
</view>
</view>
</template>
<script>
......@@ -46,198 +41,229 @@
toRefs,
onMounted,
getCurrentInstance,
inject
inject,
watch
} from "vue";
import navbar from '../../components/navbar.vue'
export default {
props: {
},
props: ["CourseCommentTimesList"],
emits: ['refreshData'],
components: {
navbar,
},
setup() {
let {
},
setup(props, context) {
let {
proxy
} = getCurrentInstance();
let data = reactive({
optionsObj:{
text:'',
value:''
},
optionsShow:false,
optionsList:[
{ text: '部分可见', value: 0 },
{ text: '可见', value: 1 },
{ text: '不可见', value: 2 },
],
radioList:[
{name:'使用默认配置',id:1,checked:true},
{name:'自定义评价',id:2}
],
checked:'1',
obj:{},
Msg: {
HomeWorkId: '',
},
showPhone: false,
showLogin: true, //多次点击
HomeWorkId:'',
jobDetails: {},
dataList:[],
pageState:'more'
optionsList: [{
text: '可见',
value: 1
},
{
text: '部分可见',
value: 2
},
{
text: '不可见',
value: 3
},
],
dataList: [],
});
let methods = {
back(){
let methods = {
back() {
uni.navigateBack({
delta: 1
})
},
clickOptionsShow(){
data.optionsShow=!data.optionsShow
},
clickoptions(item){
data.optionsObj = item
data.optionsShow = false
}
}
},
clickOptionsShow(item) {
item.optionsShow = !item.optionsShow;
},
clickoptions(item,subItem) {
let showTypeMsg = {
CourseId: item.CourseId,
Times: item.Times,
ShowType: subItem.value
};
proxy.$request("/Teacher/SetStuCommentShowTypeByTimes", showTypeMsg).then(res => {
if (res) {
}
})
item.optionsShow = false;
//调用父组件方法
context.emit('refreshData');
}
};
//监听属性数组
watch(() => props["CourseCommentTimesList"], (newValue, oldValue) => {
if (newValue != oldValue && newValue && newValue.length > 0) {
data.dataList = newValue;
}
}, {
deep: true,
});
return {
...toRefs(data),
...methods
...methods
};
},
onLoad(option) {
this.Msg.HomeWorkId = option.HomeWorkId
},
onLoad(option) {
},
};
</script>
<style scoped>
.setComments-Evaluation view text:first-child{
border-right: 1px solid #E5E5E5;
padding: 0 16rpx 0 0;
}
.setComments-Evaluation view text:last-child{
margin-left: 16rpx;
}
.setComments-Evaluation view text{
display: inline-block;
letter-spacing: 1rpx;
}
.setComments-Evaluation view{
float: right;
margin-top: 25rpx;
margin-bottom: 27rpx;
font-size: 24rpx;
font-weight: 500;
color: #CE8086;
}
.setComments-Evaluation{
height: 85rpx;
border-top: 1rpx solid #E5E5E5;
}
.setComments-source{
font-size: 20rpx;
color: #C2BCBA;
font-weight: 500;
justify-content: space-between;
padding: 26rpx 0 25rpx 0;
}
.point{
width: 8rpx;
height: 8rpx;
background: #E64150;
border-radius: 50%;
}
.setComments-options-title,.setComments-options-text{
font-size: 24rpx;
font-weight: 500;
color: #CE8086;
text-align: center;
font-weight: bold;
}
.setComments-options-text text{
padding: 5rpx 0;
}
.setComments-options-text{
flex-direction: column;
margin-top: 10rpx;
position: absolute;
left: 0;
right: 0;
top: 35rpx;
background: #FCEEEF;
padding: 20rpx 0 20rpx 0;
border-radius: 0 0 25rpx 25rpx;
}
.setComments-options-title text{
margin-right: 10rpx;
margin-left: 10rpx;
}
.setComments-options-title{
justify-content: center;
align-items: center;
}
.setComments-options{
flex-grow: 1;
border-radius: 25rpx;
background: #FCEEEF;
flex-direction: column;
padding: 14rpx 17rpx 15rpx 17rpx;
letter-spacing: 1rpx;
position: relative;
}
.setComments-title-right{
width: 190rpx;
flex-shrink: 0;
}
.setComments-title-left{
letter-spacing: 1rpx;
flex-grow: 1;
color: #282828;
font-size: 26rpx;
font-weight: bold;
margin-right: 20rpx;
}
.center-line{
position: absolute;
left: 0;
top: 30rpx;
width: 4rpx;
height: 23rpx;
background: #282828;
}
.setComments-content{
position: relative;
background: #FFFFFF;
padding: 21rpx 27rpx 0 22rpx;
box-shadow: 0px 6px 29px 0px rgba(76, 76, 76, 0.09);
border-radius: 30px;
}
.setComments-content-box{
padding: 0 50rpx;
}
.setComments-add van-icon{
font-size: 25rpx;
margin-right: 20rpx;
}
.setComments-add{
width: 190rpx;
margin: auto;
border-radius: 27rpx;
border: 1rpx solid #FB6087;
color: #FB6087;
font-size: 24rpx;
letter-spacing: 1rpx;
padding: 10rpx 0;
margin-bottom: 47rpx;
text-align: center;
}
.index-student-information{
min-height: 800rpx;
.setComments-Evaluation view text:first-child {
border-right: 1px solid #E5E5E5;
padding: 0 16rpx 0 0;
}
.setComments-Evaluation view text:last-child {
margin-left: 16rpx;
}
.setComments-Evaluation view text {
display: inline-block;
letter-spacing: 1rpx;
}
.setComments-Evaluation view {
float: right;
margin-top: 25rpx;
margin-bottom: 27rpx;
font-size: 24rpx;
font-weight: 500;
color: #CE8086;
}
.setComments-Evaluation {
height: 85rpx;
border-top: 1rpx solid #E5E5E5;
}
.setComments-source {
font-size: 20rpx;
color: #C2BCBA;
font-weight: 500;
justify-content: space-between;
padding: 26rpx 0 25rpx 0;
}
.point {
width: 8rpx;
height: 8rpx;
background: #E64150;
border-radius: 50%;
}
.setComments-options-title,
.setComments-options-text {
font-size: 24rpx;
font-weight: 500;
color: #CE8086;
text-align: center;
font-weight: bold;
}
.setComments-options-text text {
padding: 5rpx 0;
}
.setComments-options-text {
flex-direction: column;
margin-top: 10rpx;
position: absolute;
left: 0;
right: 0;
top: 35rpx;
background: #FCEEEF;
padding: 20rpx 0 20rpx 0;
border-radius: 0 0 25rpx 25rpx;
}
.setComments-options-title text {
margin-right: 10rpx;
margin-left: 10rpx;
}
.setComments-options-title {
justify-content: center;
align-items: center;
}
.setComments-options {
flex-grow: 1;
border-radius: 25rpx;
background: #FCEEEF;
flex-direction: column;
padding: 14rpx 17rpx 15rpx 17rpx;
letter-spacing: 1rpx;
position: relative;
}
.setComments-title-right {
width: 190rpx;
flex-shrink: 0;
}
.setComments-title-left {
letter-spacing: 1rpx;
flex-grow: 1;
color: #282828;
font-size: 26rpx;
font-weight: bold;
margin-right: 20rpx;
}
.center-line {
position: absolute;
left: 0;
top: 30rpx;
width: 4rpx;
height: 23rpx;
background: #282828;
}
.setComments-content {
position: relative;
background: #FFFFFF;
padding: 21rpx 27rpx 0 22rpx;
box-shadow: 0px 6px 29px 0px rgba(76, 76, 76, 0.09);
border-radius: 30px;
}
.setComments-content-box {
padding: 0 50rpx;
}
.setComments-add van-icon {
font-size: 25rpx;
margin-right: 20rpx;
}
.setComments-add {
width: 190rpx;
margin: auto;
border-radius: 27rpx;
border: 1rpx solid #FB6087;
color: #FB6087;
font-size: 24rpx;
letter-spacing: 1rpx;
padding: 10rpx 0;
margin-bottom: 47rpx;
text-align: center;
}
.index-student-information {
min-height: 800rpx;
background: #FFFFFF;
border-radius: 50rpx 50rpx 0 0;
padding: 71rpx 0 30rpx 0;
flex-direction: column;
}
flex-direction: column;
}
</style>
......@@ -43,7 +43,7 @@
>
<operation v-if="tabNme=='作业情况'" :dataList="homeWorks"></operation>
<studentList @selected="selectStuHandler" v-if="tabNme=='学生列表'" :dataList="students"></studentList>
<examList v-if="tabNme=='考试信息'" :dataList="exams" :CourseId="currentCourseId"></examList>
<examList v-if="tabNme=='考试信息'" :dataList="exams"></examList>
</scroll-view>
<Loadmore :state="pageState" />
</view>
......@@ -113,7 +113,7 @@
homeWorks:[],
exams:[],
pageState: "more",
currentCourseId:0,
currentCourseId:189666293,
userData:{},
loading:false
});
......@@ -138,9 +138,9 @@
},
changeCourseHandler(id){
console.log(id,'........................')
data.Msg.CourseId=id
data.OperationMsg.courseId=id
data.currentCourseId=id
data.Msg.courseId=189666293
data.OperationMsg.courseId=189666293
data.currentCourseId=189666293
methods.getCourseStuList()
methods.getExamPageList()
methods.getCourseHomeWorkList()
......
......@@ -2,38 +2,36 @@
<view class="setComments-index-box">
<navbar class="navbarSticky" bg="#F6F6F6">
<view class="setComments-index-header-box flex">
<van-icon class="setComments-index-header-left" name="arrow-left" @click="back"/>
<van-icon class="setComments-index-header-left" name="arrow-left" @click="back" />
<text class="setComments-index-header-title">设置评语</text>
</view>
</navbar>
<view class="setComments-index-content">
<view class="setComments-index-setType flex">
<view class="setComments-setType-left flex">
<view>
<van-image class="img" width="29rpx" height="29rpx" fit="cover"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653977710000_475.png" />
</view>
<view class="setComments-setType-text flex">
<text>自定义评价</text>
<view>从自动评价规则进入修改</view>
</view>
</view>
<view class="setComments-setType-right flex">
<view>
<text>自动评价规则</text>
<van-image class="img" width="14rpx" height="13rpx" fit="cover"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653977684000_601.png" />
</view>
</view>
</view>
<setComments></setComments>
</view>
<view class="setComments-index-content">
<view class="setComments-index-setType flex">
<view class="setComments-setType-left flex">
<view>
<van-image class="img" width="29rpx" height="29rpx" fit="cover" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653977710000_475.png" />
</view>
<view class="setComments-setType-text flex">
<text>自定义评价</text>
<view>从自动评价规则进入修改</view>
</view>
</view>
<view class="setComments-setType-right flex">
<view>
<text>自动评价规则</text>
<van-image class="img" width="14rpx" height="13rpx" fit="cover" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653977684000_601.png" />
</view>
</view>
</view>
<setComments :CourseCommentTimesList="courseTimeList" @refreshData="getCourseCommentTimes"></setComments>
</view>
</view>
</template>
<script>
import setComments from '@/components/setComments/setComments'
import setComments from '@/components/setComments/setComments'
import {
reactive,
toRefs,
......@@ -44,122 +42,150 @@
import navbar from '../../components/navbar.vue'
export default {
props: {
},
components: {
navbar,
setComments
},
setComments
},
setup() {
let {
let {
proxy
} = getCurrentInstance();
let data = reactive({
value:1,
optionsList:[
{ text: '部分可见', value: 0 },
{ text: '可见不可见', value: 1 },
{ text: '活动商品', value: 2 },
],
radioList:[
{name:'使用默认配置',id:1,checked:true},
{name:'自定义评价',id:2}
],
checked:'1',
obj:{},
value: 1,
optionsList: [{
text: '部分可见',
value: 0
},
{
text: '可见不可见',
value: 1
},
{
text: '活动商品',
value: 2
},
],
radioList: [{
name: '使用默认配置',
id: 1,
checked: true
},
{
name: '自定义评价',
id: 2
}
],
checked: '1',
Msg: {
HomeWorkId: '',
CourseId: '',
},
showPhone: false,
showLogin: true, //多次点击
HomeWorkId:'',
jobDetails: {},
dataList:[],
pageState:'more'
courseTimeList: [], //课程自动生成评论次数
});
let methods = {
back(){
let methods = {
back() {
uni.navigateBack({
delta: 1
})
},
radioChange (e){
console.log("打印国家名称",e.target.value)
}
}
},
radioChange(e) {
console.log("打印国家名称", e.target.value)
},
//获取课程评论次数列表
getCourseCommentTimes() {
proxy.$request("/Teacher/GetCourseCommentTimes", data.Msg).then(res => {
if (res) {
data.courseTimeList = res.Data;
}
})
}
}
return {
...toRefs(data),
...methods
...methods
};
},
onLoad(option) {
this.Msg.HomeWorkId = option.HomeWorkId
onLoad(option) {
this.Msg.CourseId = option.CourseId;
this.getCourseCommentTimes();
},
};
</script>
<style scoped>
.setComments-setType-right view text{
margin-right: 11rpx;
}
.setComments-setType-right view{
color: #D9868D;
background: #F5DEE0;
border-radius: 25rpx;
width: 200rpx;
height: 50rpx;
line-height: 50rpx;
text-align: center;
letter-spacing: 1rpx;
}
.setComments-setType-right{
flex-shrink: 0;
font-size: 24rpx;
font-weight: 500;
}
.setComments-setType-text view{
font-size: 24rpx;
color: #AFAFAF;
font-weight: 400;
margin-top: 15rpx;
}
.setComments-setType-text text{
font-size: 30rpx;
font-weight: bold;
color: #282828;
}
.setComments-setType-text{
flex-direction: column;
margin-left: 26rpx;
letter-spacing: 1rpx;
}
.setComments-setType-left view:first-child{
flex-shrink: 0;
}
.setComments-setType-left{
flex-grow: 1;
margin-right: 32rpx;
}
.setComments-index-setType{
background: #FCEEEF;
box-shadow: 0px 6px 52px 0px rgba(230, 65, 80, 0.19);
border-radius: 50px;
margin: 55rpx 50rpx 50rpx 50rpx;
padding: 33rpx 50rpx;
}
.setComments-index-box{
background: #F6F6F6;
}
.setComments-index-header-title{
font-size: 32rpx;
font-weight: 500;
color: #282828;
flex:1;
text-align: center;
padding-right: 40rpx;
}
.navbarSticky {
.setComments-setType-right view text {
margin-right: 11rpx;
}
.setComments-setType-right view {
color: #D9868D;
background: #F5DEE0;
border-radius: 25rpx;
width: 200rpx;
height: 50rpx;
line-height: 50rpx;
text-align: center;
letter-spacing: 1rpx;
}
.setComments-setType-right {
flex-shrink: 0;
font-size: 24rpx;
font-weight: 500;
}
.setComments-setType-text view {
font-size: 24rpx;
color: #AFAFAF;
font-weight: 400;
margin-top: 15rpx;
}
.setComments-setType-text text {
font-size: 30rpx;
font-weight: bold;
color: #282828;
}
.setComments-setType-text {
flex-direction: column;
margin-left: 26rpx;
letter-spacing: 1rpx;
}
.setComments-setType-left view:first-child {
flex-shrink: 0;
}
.setComments-setType-left {
flex-grow: 1;
margin-right: 32rpx;
}
.setComments-index-setType {
background: #FCEEEF;
box-shadow: 0px 6px 52px 0px rgba(230, 65, 80, 0.19);
border-radius: 50px;
margin: 55rpx 50rpx 50rpx 50rpx;
padding: 33rpx 50rpx;
}
.setComments-index-box {
background: #F6F6F6;
}
.setComments-index-header-title {
font-size: 32rpx;
font-weight: 500;
color: #282828;
flex: 1;
text-align: center;
padding-right: 40rpx;
}
.navbarSticky {
display: sticky;
top: 0;
z-index: 9;
......
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