Commit 9d7cd923 authored by 罗超's avatar 罗超

调整意见调查的样式

parent 4c085ba5
<template>
<view class="indexpage">
<div class="wenjuan_dc" @click="goTongji()" >
<img src="../../static/image/wjdc.png" alt="" />
</div>
<view class="indexpage" :class="[{'no-scroll':SurveyObj.ActivitySurveyId>0}]">
<navbar class="navbarSticky" bg="#F5F5F5">
<view class="navbarCon">
<view class="pagetitle">
......@@ -142,6 +139,9 @@
<bottom></bottom>
<canvas canvas-id="myCanvas" class="canvas" style="position:absolute;left: -1000px;"></canvas>
<van-toast id="van-toast" />
<view class="diaocha-box" v-if="SurveyObj.ActivitySurveyId>0">
<image @click="goTongji()" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1652251724000_835.png" mode="widthFix"></image>
</view>
</view>
</template>
......@@ -206,7 +206,7 @@
let methods = {
goTongji() {
console.log("SurveyObj",data.SurveyObj);
//console.log("SurveyObj",data.SurveyObj);
this.jumpPage('/pages/study/questionNaire?ActivitySurveyId='+data.SurveyObj.ActivitySurveyId+"&ActivitySurveyGuestId="+data.SurveyObj.ActivitySurveyGuestId);
},
jumpPage(url) {
......@@ -762,4 +762,23 @@
border-radius: 20rpx;
margin: 60rpx auto;
}
.diaocha-box{
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
background-color: rgba(0,0,0,.3);
padding:0 10vw;
display: flex;
align-items: center;
z-index: 1000;
}
.diaocha-box image{
width:80vw;
}
.no-scroll{
overflow: hidden !important;
height: 100vh !important;
}
</style>
......@@ -10,28 +10,28 @@
<view class="QuestionInner" v-for="(item,index) in dataObj.CourseArrangementList" :key="index">
{{item.Title}}
<view style="margin:20rpx 0 30rpx 0;">
<van-rate v-model="item.ScoreNum" :size="25" @change="onChange(item)" color="#ffd21e" void-icon="star" void-color="#eee" />
<van-rate v-model="item.ScoreNum" :size="25" @change="onChange(item)" color="#ffd21e" void-icon="star" void-color="#ddd" />
</view>
</view>
<view class="QuestionTitle">教师授课情形</view>
<view class="QuestionInner" v-for="(item,index) in dataObj.TeachersSituationList" :key="index">
{{item.Title}}
<view style="margin:20rpx 0 30rpx 0;">
<van-rate v-model="item.ScoreNum" :size="25" @change="onChange(item)" color="#ffd21e" void-icon="star" void-color="#eee" />
<van-rate v-model="item.ScoreNum" :size="25" @change="onChange(item)" color="#ffd21e" void-icon="star" void-color="#ddd" />
</view>
</view>
<view class="QuestionTitle">助教老师</view>
<view class="QuestionInner" v-for="(item,index) in dataObj.TeachingAssistantList" :key="index">
{{item.Title}}
<view style="margin:20rpx 0 30rpx 0;">
<van-rate v-model="item.ScoreNum" :size="25" @change="onChange(item)" color="#ffd21e" void-icon="star" void-color="#eee" />
<van-rate v-model="item.ScoreNum" :size="25" @change="onChange(item)" color="#ffd21e" void-icon="star" void-color="#ddd" />
</view>
</view>
<view class="QuestionTitle">学习环境</view>
<view class="QuestionInner" v-for="(item,index) in dataObj.LearningEnvironmentList" :key="index">
{{item.Title}}
<view style="margin:20rpx 0 30rpx 0;">
<van-rate v-model="item.ScoreNum" :size="25" @change="onChange(item)" color="#ffd21e" void-icon="star" void-color="#eee" />
<van-rate v-model="item.ScoreNum" :size="25" @change="onChange(item)" color="#ffd21e" void-icon="star" void-color="#ddd" />
</view>
</view>
<view class="QuestionTitle">意见与建议</view>
......@@ -44,7 +44,7 @@
</view>
<view style="margin-top:30rpx;" class="btnDiv">
<van-button type="primary" style="width:100%;" @click="saveQuestion">提交</van-button>
<button style="width:100%;height:88rpx;color:#FFF;background: #4C50E7 !important;" @click="saveQuestion">提交</button>
</view>
<van-toast id="van-toast" />
</view>
......@@ -60,6 +60,7 @@
computed,
onMounted,
provide,
inject
} from "vue";
import {
querySurveyInfo,
......@@ -81,6 +82,7 @@
this.GetSurveyInfo();
},
setup(props) {
let Toast = inject("$toast");
let {
proxy
} = getCurrentInstance();
......@@ -89,10 +91,31 @@
ActivitySurveyId:0,
ActivitySurveyGuestId:0,
},
loading:false,
count: 5,
dataObj: {}
})
let methods = {
validte(){
let flag=false;
this.dataObj.CourseArrangementList.forEach(x=>{
if(x.ScoreNum==0) flag=true;
})
if(flag) return false;
this.dataObj.TeachersSituationList.forEach(x=>{
if(x.ScoreNum==0) flag=true;
})
if(flag) return false;
this.dataObj.TeachingAssistantList.forEach(x=>{
if(x.ScoreNum==0) flag=true;
})
if(flag) return false;
this.dataObj.LearningEnvironmentList.forEach(x=>{
if(x.ScoreNum==0) flag=true;
})
if(flag) return false;
return true;
},
async GetSurveyInfo() {
let res = await querySurveyInfo(data.msg);
if (res) {
......@@ -107,23 +130,34 @@
},
//保存数据
saveQuestion(){
if(this.loading) return;
this.loading=true
if(!this.validte()){
uni.showToast({
title: "请完成打分项目",
icon: "none",
});
this.loading=false
return;
}
var UserInfo = uni.getStorageSync('userInfo');
this.dataObj.StudentId = UserInfo.Id;
this.dataObj.UserType=2;
this.dataObj.ActivitySurveyId=this.msg.ActivitySurveyId;
this.dataObj.ActivitySurveyGuestId=this.msg.ActivitySurveyGuestId;
let res = saveGuestSurvey(this.dataObj).then(res => {
if (res.Code == 1) {
uni.showToast({
title: res.message,
icon: "none",
});
if (res.resultCode == 1) {
Toast.success('提交成功');
setTimeout(()=>{
uni.switchTab({
url:"/pages/index/index"
})
},1000)
}else{
uni.showToast({
title: res.message,
icon: "none",
});
Toast.fail('提交失败,请重试');
}
this.loading=false
});
}
}
......
//请求电商接口
let host = ''
if (process.env.NODE_ENV === "development") {
// host = 'http://192.168.10.65:8088/api'
host = "https://mallapi.oytour.com/api"
host = 'http://192.168.10.46:8200/api'
//host = "https://mallapi.oytour.com/api"
} else {
host = "https://mallapi.oytour.com/api"
}
......
This diff is collapsed.
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