AiDA 3.0 Feedback Survey
- Please take the survey
-
+
Please take the survey
+
-
@@ -437,7 +471,7 @@ import { Https } from "@/tool/https";
import { defineComponent, toRefs,ref, reactive, createVNode } from "vue";
export default defineComponent({
setup() {
- const feedbackData:any = reactive({
+ let feedbackData:any = reactive({
userName:'',
gender:'Female',
occupation:'',
@@ -684,7 +718,42 @@ export default defineComponent({
).catch(res=>{
});
}
-
+ let forbid = ref(false)
+ let initData = (data:any) => {
+ // Object.assign(feedbackData,data)
+ // console.log(JSON.parse(JSON.stringify(feedbackData)));
+ forbid.value = true
+ for (const iterator in data) {
+ if(typeof data[iterator] == 'object'){
+ data[iterator].forEach((item:any)=>{
+ if(item*1){
+ feedbackData[iterator].push(item)
+ }else{
+ if(iterator == 'helpful'){
+ refList.helpfulOthers.checked = true
+ othersHelpful.value = item
+ }else if(iterator == 'improve'){
+ refList.improvelOthers.checked = true
+ othersImprovel.value = item
+ }
+ }
+ })
+ }else{
+ feedbackData[iterator] = data[iterator]
+ }
+ }
+ if(data.othersIsSubscribeCause){
+ refList.isSubscribeCauseOthers.checked = true
+ let arr = []
+ data.reasonForNotSubscribe.forEach((item:any,index:number) => {
+ if(index <= 1){
+ arr.push(item)
+ }
+ });
+ othersIsSubscribeCause.value = data.othersIsSubscribeCause[2]
+ }
+ // feedbackData = reactive(...data)
+ }
return {
...toRefs(feedbackData),
...toRefs(refList),
@@ -693,6 +762,8 @@ export default defineComponent({
othersIsSubscribeCause,
CountryList,
setSubmit,
+ forbid,
+ initData,
};
},
@@ -710,15 +781,49 @@ export default defineComponent({
@import url("https://fonts.googleapis.com/css2?family=Quicksand:wght@400;700&display=swap");
.feedbackSurvey {
font-family: "Quicksand", sans-serif;
+ font-family: 'Roboto', sans-serif;
text-align: center;
line-height: 1.5;
// background: linear-gradient(180deg, #f3f3e6 0%, #eee4f3 100%);
margin: 1rem;
height: 100%;
overflow-y: auto;
+ &.active{
+ #title {
+ font-size: 3rem;
+ }
+ #description {
+ font-size: 1.4rem;
+ }
+ #survey-form {
+ width: 90%;
+ padding: 1.5rem;
+ font-size: 1.2rem;
+ }
+ p{
+ font-size: 1.4rem;
+ }
+ input,
+ #dropdown {
+ padding: 5px;
+ }
+
+ textarea {
+ max-height: 125px;
+ padding: 5px;
+ }
+ input[type="radio"],
+ input[type="checkbox"] {
+ width: 1rem;
+ height: 1rem;
+ }
+ input,select{
+ height: 3.5rem;
+ }
+ }
#main{
background: linear-gradient(45deg, #eee4f3, #f3f4e6);
-
+ padding: 2rem;
}
#title {
font-size: 6rem;
@@ -730,7 +835,7 @@ export default defineComponent({
font-size: 2.8rem;
font-style: italic;
}
-
+
#survey-form {
position: relative;
background: rgba(255, 255, 255, 0.2);
@@ -742,12 +847,14 @@ export default defineComponent({
padding: 3rem;
box-shadow: -1px 1px 5px 0.5px;
font-size: 2.4rem;
- transition: width 1s ease;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
+ &.active{
+ transition: width 1s ease;
+ }
}
-
+
@media (max-width: 760px) {
form {
width: 75%;
@@ -763,6 +870,9 @@ export default defineComponent({
margin: 1rem;
width: 100%;
}
+ .section:last-child{
+ margin-bottom: 4rem;
+ }
.w40 {
width: 40%;
}
diff --git a/src/views/feedbackSurveyCN.vue b/src/views/feedbackSurveyCN.vue
index 2a1fd941..0823d248 100644
--- a/src/views/feedbackSurveyCN.vue
+++ b/src/views/feedbackSurveyCN.vue
@@ -20,7 +20,7 @@
>性别:
*