Commit 78dc305d authored by 黄奎's avatar 黄奎

新加页面

parent 2e738180
<style scoped>
.busSign {
font-size: 40px;
margin-top: 10px;
margin-bottom: 10px;
width: 95%;
margin: 0 auto;
overflow-y: scroll;
}
/* 自定义评分组件的样式 */
.busSign .custom-rate .el-rate__item {
font-size: 38px;
/* 调整星星的大小 */
}
/deep/.busSign .custom-rate .el-rate__icon {
font-size: 60px;
}
/deep/.busSign .custom-rate .el-rate__text {
font-size: 38px;
}
/deep/.busSign .el-textarea .el-textarea__inner {
font-size: 36px;
min-height: 200px;
}
/deep/.busSign .el-radio-group .el-radio__label {
font-size: 36px;
}
/deep/.busSign .el-radio-group .el-radio__input {
line-height: 3;
}
/deep/.busSign .el-radio-group .el-radio__inner {
width: 40px;
height: 40px;
line-height: 40px;
}
/deep/.busSign .el-checkbox .el-checkbox__inner {
width: 40px;
height: 40px;
}
/deep/.busSign .el-checkbox .el-checkbox__label {
font-size: 36px;
/* 设置文字大小 */
}
/* 如果需要调整选中对勾的大小 */
/deep/.busSign .el-checkbox .el-checkbox__input .el-checkbox__inner::after {
width: 20px;
/* 设置对勾的宽度 */
height: 20px;
/* 设置对勾的高度 */
line-height: 20px;
/* 设置对勾内文本的行高 */
}
/deep/.busSign .el-checkbox .el-checkbox__input.is-checked .el-checkbox__inner::after {
transform: rotate(50deg) scaleY(1.3);
}
</style>
<template>
<div class="busSign">
<el-row>
<el-col :span="24" style="text-align:center;margin-top:10px;">
<span style="font-weight:bold;">感谢{{qMsg.SurName}}{{qMsg.Sex==1?"先生":"女士"}}参与意见调查</span>
</el-col>
</el-row>
<el-row>
<el-col :span="12">领队:<template v-if="priceInfo&&priceInfo.LeaderName&&priceInfo.LeaderName!=''">
{{priceInfo.LeaderName}}</template> </el-col>
<el-col :span="12">导游:<template v-if="priceInfo&&priceInfo.GuideName&&priceInfo.GuideName!=''">
{{priceInfo.GuideName}}</template></el-col>
</el-row>
<el-row>
<el-col :span="24">
<span>团期:<template v-if="priceInfo&&priceInfo.StartDateStr&&priceInfo.StartDateStr!=''">
{{priceInfo.StartDateStr}}</template>
<template v-if="priceInfo&&priceInfo.EndDateStr&&priceInfo.EndDateStr!=''">
-{{priceInfo.EndDateStr}}</template></span>
</el-col>
</el-row>
<template v-for="(item,index) in dataList ">
<el-row :key="`t_`+index">
<el-col :span="24">
<span>{{index+1}}{{item.Title}}</span>
</el-col>
</el-row>
<el-row :key="`s_`+index">
<el-col :span="24" style="min-height:100px;margin-top:10px;margin-bottom:10px;">
<template v-if="item.SurveyType === 1">
<el-rate v-model="item.ScoreNum" show-text :texts="texts" class="custom-rate">
</el-rate>
</template>
<template v-if="item.SurveyType === 2">
<el-radio-group v-model="item.ScoreNum">
<el-radio v-for="(radio, rIndex) in item.SurveyOptionsList" :label="radio.ID" :key="rIndex">
{{radio.OptionsName}}</el-radio>
</el-radio-group>
</template>
<template v-if="item.SurveyType === 3">
<el-checkbox v-for="(radio, rIndex) in item.SurveyOptionsList" v-model="radio.IsCheckS" :label="radio.ID"
:key="rIndex">
{{radio.OptionsName}}</el-checkbox>
</template>
<template v-if="item.SurveyType === 4">
<el-input type="textarea" :rows="2" :placeholder="$t('fnc.qsrneirong')" v-model="item.TextContent">
</el-input>
</template>
</el-col>
</el-row>
</template>
<el-row style="margin-bottom:100px;">
<el-col :span="24" style="text-align:center;">
<el-button type="primary" style="width:50%;height:80px;font-size:36px;" @click="saveGuestSurvey"
:loading="saveLoading">提交</el-button>
</el-col>
</el-row>
</div>
</template>
<script>
export default {
data() {
return {
qMsg: {
TCID: 21633,
},
dataList: [],
priceInfo: {},
texts: [
'非常不满意',
'不满意',
'感觉一般',
'满意',
'非常满意'
],
saveLoading: false,
};
},
created() {
if (this.$route.query.TCID) {
this.qMsg.TCID = this.$route.query.TCID;
}
},
mounted() {
this.getPriceInfo();
this.GetSurveyShowList();
},
methods: {
getPriceInfo() {
this.apipost('miniProgram_post_GetBasePrice', {
tcid: this.qMsg.TCID
}, res => {
if (res.data.resultCode === 1) {
let data = res.data.data
this.priceInfo = data;
}
}, null)
},
GetSurveyShowList: function () {
let data = {
IsShow: 1,
SurveyType: -1
}
this.apipost('survey_post_GetBusSurveyShowList', data, res => {
if (res.data.resultCode === 1) {
let data = res.data.data
data.map(item => {
if (item.SurveyType === 2) {
item.SurveyOptionsList.map((cItem, cIndex) => {
cItem.IsCheckS = false
})
}
if (item.SurveyType === 3) {
item.SurveyOptionsList.map((cItem, cIndex) => {
cItem.IsCheckS = false
})
}
if (item.SurveyType === 1) {
item.ScoreNum = 5;
}
})
this.dataList = data;
}
}, null)
},
//提交意见调查
saveGuestSurvey() {
this.saveLoading = true;
var postMsg = [];
console.log("this.dataList2", JSON.parse(JSON.stringify(this.dataList)))
if (this.dataList && this.dataList.length > 0) {
this.dataList.forEach(item => {
item.GuestId = this.qMsg.GuestId;
item.TCID = this.qMsg.TCID;
item.OrderID = this.qMsg.OrderId;
if (item.SurveyType === 2 || item.SurveyType === 3) {
item.SurveyOptionsList.forEach(y => {
//单选
if (item.SurveyType == 2) {
if (item.ScoreNum == y.ID) {
y.IsCheck = "1";
}
}
//多选
if (item.SurveyType == 3) {
y.IsCheck = "0";
if (y.IsCheckS) {
y.IsCheck = "1";
}
}
})
item.ScoreNum = 0;
}
postMsg.push(item);
})
}
this.apipost("survey_post_SetGuestSurvey", postMsg, res => {
this.saveLoading = false;
if (res.data.resultCode == 1) {
this.Success(res.data.message);
} else {
this.Error(res.data.message);
}
});
}
}
}
</script>
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