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

调整意见调查的样式

parent 4c085ba5
<template> <template>
<view class="indexpage"> <view class="indexpage" :class="[{'no-scroll':SurveyObj.ActivitySurveyId>0}]">
<div class="wenjuan_dc" @click="goTongji()" >
<img src="../../static/image/wjdc.png" alt="" />
</div>
<navbar class="navbarSticky" bg="#F5F5F5"> <navbar class="navbarSticky" bg="#F5F5F5">
<view class="navbarCon"> <view class="navbarCon">
<view class="pagetitle"> <view class="pagetitle">
...@@ -142,6 +139,9 @@ ...@@ -142,6 +139,9 @@
<bottom></bottom> <bottom></bottom>
<canvas canvas-id="myCanvas" class="canvas" style="position:absolute;left: -1000px;"></canvas> <canvas canvas-id="myCanvas" class="canvas" style="position:absolute;left: -1000px;"></canvas>
<van-toast id="van-toast" /> <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> </view>
</template> </template>
...@@ -206,7 +206,7 @@ ...@@ -206,7 +206,7 @@
let methods = { let methods = {
goTongji() { goTongji() {
console.log("SurveyObj",data.SurveyObj); //console.log("SurveyObj",data.SurveyObj);
this.jumpPage('/pages/study/questionNaire?ActivitySurveyId='+data.SurveyObj.ActivitySurveyId+"&ActivitySurveyGuestId="+data.SurveyObj.ActivitySurveyGuestId); this.jumpPage('/pages/study/questionNaire?ActivitySurveyId='+data.SurveyObj.ActivitySurveyId+"&ActivitySurveyGuestId="+data.SurveyObj.ActivitySurveyGuestId);
}, },
jumpPage(url) { jumpPage(url) {
...@@ -762,4 +762,23 @@ ...@@ -762,4 +762,23 @@
border-radius: 20rpx; border-radius: 20rpx;
margin: 60rpx auto; 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> </style>
...@@ -10,28 +10,28 @@ ...@@ -10,28 +10,28 @@
<view class="QuestionInner" v-for="(item,index) in dataObj.CourseArrangementList" :key="index"> <view class="QuestionInner" v-for="(item,index) in dataObj.CourseArrangementList" :key="index">
{{item.Title}} {{item.Title}}
<view style="margin:20rpx 0 30rpx 0;"> <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> </view>
<view class="QuestionTitle">教师授课情形</view> <view class="QuestionTitle">教师授课情形</view>
<view class="QuestionInner" v-for="(item,index) in dataObj.TeachersSituationList" :key="index"> <view class="QuestionInner" v-for="(item,index) in dataObj.TeachersSituationList" :key="index">
{{item.Title}} {{item.Title}}
<view style="margin:20rpx 0 30rpx 0;"> <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> </view>
<view class="QuestionTitle">助教老师</view> <view class="QuestionTitle">助教老师</view>
<view class="QuestionInner" v-for="(item,index) in dataObj.TeachingAssistantList" :key="index"> <view class="QuestionInner" v-for="(item,index) in dataObj.TeachingAssistantList" :key="index">
{{item.Title}} {{item.Title}}
<view style="margin:20rpx 0 30rpx 0;"> <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> </view>
<view class="QuestionTitle">学习环境</view> <view class="QuestionTitle">学习环境</view>
<view class="QuestionInner" v-for="(item,index) in dataObj.LearningEnvironmentList" :key="index"> <view class="QuestionInner" v-for="(item,index) in dataObj.LearningEnvironmentList" :key="index">
{{item.Title}} {{item.Title}}
<view style="margin:20rpx 0 30rpx 0;"> <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> </view>
<view class="QuestionTitle">意见与建议</view> <view class="QuestionTitle">意见与建议</view>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
</view> </view>
<view style="margin-top:30rpx;" class="btnDiv"> <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> </view>
<van-toast id="van-toast" /> <van-toast id="van-toast" />
</view> </view>
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
computed, computed,
onMounted, onMounted,
provide, provide,
inject
} from "vue"; } from "vue";
import { import {
querySurveyInfo, querySurveyInfo,
...@@ -81,6 +82,7 @@ ...@@ -81,6 +82,7 @@
this.GetSurveyInfo(); this.GetSurveyInfo();
}, },
setup(props) { setup(props) {
let Toast = inject("$toast");
let { let {
proxy proxy
} = getCurrentInstance(); } = getCurrentInstance();
...@@ -89,10 +91,31 @@ ...@@ -89,10 +91,31 @@
ActivitySurveyId:0, ActivitySurveyId:0,
ActivitySurveyGuestId:0, ActivitySurveyGuestId:0,
}, },
loading:false,
count: 5, count: 5,
dataObj: {} dataObj: {}
}) })
let methods = { 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() { async GetSurveyInfo() {
let res = await querySurveyInfo(data.msg); let res = await querySurveyInfo(data.msg);
if (res) { if (res) {
...@@ -107,23 +130,34 @@ ...@@ -107,23 +130,34 @@
}, },
//保存数据 //保存数据
saveQuestion(){ 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'); var UserInfo = uni.getStorageSync('userInfo');
this.dataObj.StudentId = UserInfo.Id; this.dataObj.StudentId = UserInfo.Id;
this.dataObj.UserType=2; this.dataObj.UserType=2;
this.dataObj.ActivitySurveyId=this.msg.ActivitySurveyId; this.dataObj.ActivitySurveyId=this.msg.ActivitySurveyId;
this.dataObj.ActivitySurveyGuestId=this.msg.ActivitySurveyGuestId; this.dataObj.ActivitySurveyGuestId=this.msg.ActivitySurveyGuestId;
let res = saveGuestSurvey(this.dataObj).then(res => { let res = saveGuestSurvey(this.dataObj).then(res => {
if (res.Code == 1) { if (res.resultCode == 1) {
uni.showToast({ Toast.success('提交成功');
title: res.message, setTimeout(()=>{
icon: "none",
}); uni.switchTab({
url:"/pages/index/index"
})
},1000)
}else{ }else{
uni.showToast({ Toast.fail('提交失败,请重试');
title: res.message,
icon: "none",
});
} }
this.loading=false
}); });
} }
} }
......
//请求电商接口 //请求电商接口
let host = '' let host = ''
if (process.env.NODE_ENV === "development") { if (process.env.NODE_ENV === "development") {
// host = 'http://192.168.10.65:8088/api' host = 'http://192.168.10.46:8200/api'
host = "https://mallapi.oytour.com/api" //host = "https://mallapi.oytour.com/api"
} else { } else {
host = "https://mallapi.oytour.com/api" 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