|
|
@ -139,7 +139,7 @@
|
|
|
|
<span id="currentCity" class="float-text" v-show="!cityListOpen">{{currentCity.cityName}}</span>
|
|
|
|
<span id="currentCity" class="float-text" v-show="!cityListOpen">{{currentCity.cityName}}</span>
|
|
|
|
<button class="float-button" v-on:click="toggleCityList" >≡</button>
|
|
|
|
<button class="float-button" v-on:click="toggleCityList" >≡</button>
|
|
|
|
<ul v-bind:class="['expand-list', cityListOpen ? 'open' : '']">
|
|
|
|
<ul v-bind:class="['expand-list', cityListOpen ? 'open' : '']">
|
|
|
|
<li v-for="city in cityList" v-bind:key="city.cityName" v-on:click="selectCity(city)" v-bind:class="{'active': city.cii_sn === currentCity.cii_sn, 'filled': (currentCity.feedback_Filled ? true : false)}">{{city.cityName}}</li>
|
|
|
|
<li v-for="city in cityList" v-bind:key="city.cityName" v-on:click="selectCity(city)" v-bind:class="{'active': city.cii_sn === currentCity.cii_sn, 'filled': (city.feedback_Filled ? true : false)}">{{city.cityName}}</li>
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
@ -291,6 +291,7 @@
|
|
|
|
showPhotos: false,
|
|
|
|
showPhotos: false,
|
|
|
|
|
|
|
|
|
|
|
|
signaturePad: null,
|
|
|
|
signaturePad: null,
|
|
|
|
|
|
|
|
debug: false,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
@ -306,23 +307,27 @@
|
|
|
|
for (const param of urlParams) {
|
|
|
|
for (const param of urlParams) {
|
|
|
|
this.param[param[0]] = param[1];
|
|
|
|
this.param[param[0]] = param[1];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
this.debug = this.param.debug || false;
|
|
|
|
this.resultPage = !isEmpty(this.param.r);
|
|
|
|
this.resultPage = !isEmpty(this.param.r);
|
|
|
|
var urlPath = window.location.pathname.replace('/customerfeedback/', '').split('-').filter(s => s);
|
|
|
|
var urlPath = window.location.pathname.replace('/customerfeedback/', '').split('-'); // .filter(s => s);
|
|
|
|
urlPath = urlPath.length >= 3 ? urlPath : window.location.pathname.replace('/customerfeedback/', '').split('/');
|
|
|
|
urlPath = urlPath.length >= 3 ? urlPath : window.location.pathname.replace('/customerfeedback/', '').split('/');
|
|
|
|
if (urlPath.length > 0 && isEmpty(this.param.g)) {
|
|
|
|
if (urlPath.length > 0 && isEmpty(this.param.g)) {
|
|
|
|
this.param.g = urlPath[0];
|
|
|
|
this.param.g = urlPath[0];
|
|
|
|
this.param.v = urlPath[1];
|
|
|
|
this.param.v = urlPath[1];
|
|
|
|
this.param.l = urlPath[2] || 1;
|
|
|
|
this.param.l = urlPath[2] || 1;
|
|
|
|
this.resultPage = !isEmpty(urlPath[3]);
|
|
|
|
this.resultPage = !isEmpty(urlPath[3]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.debug = !isEmpty(urlPath[4]);
|
|
|
|
|
|
|
|
this.resultPage = !isEmpty(urlPath[4]) ? false : !isEmpty(urlPath[3]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
console.log(this.param);
|
|
|
|
console.log(this.param, this.debug);
|
|
|
|
if (!(this.param.v && this.param.g)) {
|
|
|
|
if (!(this.param.v && this.param.g)) {
|
|
|
|
this.error = true;
|
|
|
|
this.error = true;
|
|
|
|
this.errorMsg = 'Invalid URL';
|
|
|
|
this.errorMsg = 'Invalid URL';
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.loading = true;
|
|
|
|
this.loading = true;
|
|
|
|
// console.log(this.resultPage);
|
|
|
|
console.log(this.resultPage);
|
|
|
|
this.getCityList();
|
|
|
|
this.getCityList();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
getCityList() {
|
|
|
|
getCityList() {
|
|
|
@ -458,11 +463,18 @@
|
|
|
|
// 已经填写过了
|
|
|
|
// 已经填写过了
|
|
|
|
// that.isFilled = !isEmpty(res.feedbackEvaluation[0].signatureDataUrl);
|
|
|
|
// that.isFilled = !isEmpty(res.feedbackEvaluation[0].signatureDataUrl);
|
|
|
|
that.isFilled = that.currentCity.feedback_Filled || !isEmpty(res.feedbackEvaluation[0].signatureDataUrl);
|
|
|
|
that.isFilled = that.currentCity.feedback_Filled || !isEmpty(res.feedbackEvaluation[0].signatureDataUrl);
|
|
|
|
that.cityListPage = that.resultPage ? false : that.isFilled;
|
|
|
|
that.cityListPage = (that.debug) ? false : (that.resultPage ? false : that.isFilled);
|
|
|
|
if (that.resultPage || that.isFilled) {
|
|
|
|
if (that.resultPage || that.isFilled) {
|
|
|
|
// that.signaturePad.fromDataURL(that.feedbackEvaluation.signatureDataUrl);
|
|
|
|
// that.signaturePad.fromDataURL(that.feedbackEvaluation.signatureDataUrl);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
that.initSignature();
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
|
|
that.initSignature();
|
|
|
|
|
|
|
|
}, 100);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (that.debug) {
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
|
|
that.initSignature();
|
|
|
|
|
|
|
|
}, 100);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
that.showPhotos = res.group[0].inTheEnd;
|
|
|
|
that.showPhotos = res.group[0].inTheEnd;
|
|
|
@ -474,7 +486,7 @@
|
|
|
|
const that = this;
|
|
|
|
const that = this;
|
|
|
|
|
|
|
|
|
|
|
|
event.preventDefault();
|
|
|
|
event.preventDefault();
|
|
|
|
if (that.signaturePad?.isEmpty()) {
|
|
|
|
if (that.signaturePad && that.signaturePad.isEmpty()) {
|
|
|
|
alert("Please provide a signature first.");
|
|
|
|
alert("Please provide a signature first.");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
that.loading = true;
|
|
|
|
that.loading = true;
|
|
|
@ -507,11 +519,11 @@
|
|
|
|
VEI_SN: that.currentCity.VEI_SN,
|
|
|
|
VEI_SN: that.currentCity.VEI_SN,
|
|
|
|
// country_id:,
|
|
|
|
// country_id:,
|
|
|
|
// tour_guide_id: that.currentCity.tourGuideId,
|
|
|
|
// tour_guide_id: that.currentCity.tourGuideId,
|
|
|
|
tour_guide_id: that.feedbackCity[`city_${iterator}`].feedbackEvaluation[0]?.tourGuideId || undefined,
|
|
|
|
tour_guide_id: that.feedbackCity[`city_${iterator}`].feedbackEvaluation[0] ? that.feedbackCity[`city_${iterator}`].feedbackEvaluation[0].tourGuideId : undefined,
|
|
|
|
city_sn: iterator,
|
|
|
|
city_sn: iterator,
|
|
|
|
use_the_photos: formValues.photo_permission || -1,
|
|
|
|
use_the_photos: formValues.photo_permission || -1,
|
|
|
|
other_comments: formValues.comments,
|
|
|
|
other_comments: formValues.comments,
|
|
|
|
feedback_id: that.feedbackCity[`city_${iterator}`].feedbackEvaluation[0]?.feedbackId || undefined,
|
|
|
|
feedback_id: that.feedbackCity[`city_${iterator}`].feedbackEvaluation[0] ? that.feedbackCity[`city_${iterator}`].feedbackEvaluation[0].feedbackId : undefined,
|
|
|
|
service_item_answer: JSON.stringify(rateArr),
|
|
|
|
service_item_answer: JSON.stringify(rateArr),
|
|
|
|
signature_data_url: formValues.signature,
|
|
|
|
signature_data_url: formValues.signature,
|
|
|
|
},
|
|
|
|
},
|
|
|
|