|
|
@ -37,7 +37,7 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="form-container" id="main">
|
|
|
|
<div class="form-container" id="main">
|
|
|
|
<div id="result" v-if="error">
|
|
|
|
<div id="result" v-if="error || (!cityListPage && isEmptyData)">
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" fill="currentColor" class="bi bi-x-circle-fill" viewBox="0 0 16 16">
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" fill="currentColor" class="bi bi-x-circle-fill" viewBox="0 0 16 16">
|
|
|
|
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.5-4.5a.5.5 0 0 0-.707 0L8 7.293 5.207 4.5a.5.5 0 0 0-.707.707L7.293 8l-2.793 2.793a.5.5 0 0 0 .707.707L8 8.707l2.793 2.793a.5.5 0 0 0 .707-.707L8.707 8l2.793-2.793a.5.5 0 0 0 0-.707z" />
|
|
|
|
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.5-4.5a.5.5 0 0 0-.707 0L8 7.293 5.207 4.5a.5.5 0 0 0-.707.707L7.293 8l-2.793 2.793a.5.5 0 0 0 .707.707L8 8.707l2.793 2.793a.5.5 0 0 0 .707-.707L8.707 8l2.793-2.793a.5.5 0 0 0 0-.707z" />
|
|
|
|
</svg>
|
|
|
|
</svg>
|
|
|
@ -269,6 +269,12 @@
|
|
|
|
drawWidth() {
|
|
|
|
drawWidth() {
|
|
|
|
return window.innerWidth < 768 ? Math.floor(window.innerWidth-40) : 760; // Adjust the threshold as needed
|
|
|
|
return window.innerWidth < 768 ? Math.floor(window.innerWidth-40) : 760; // Adjust the threshold as needed
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
isEmptyData() {
|
|
|
|
|
|
|
|
return this.feedbackItem.guide.length === 0
|
|
|
|
|
|
|
|
|| this.feedbackItem.driver.length === 0
|
|
|
|
|
|
|
|
|| this.feedbackItem.experience.length === 0
|
|
|
|
|
|
|
|
|| this.feedbackItem.hotel.length === 0;
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
@ -303,6 +309,7 @@
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
|
|
|
|
console.clear();
|
|
|
|
console.log('invoke vue', typeof this);
|
|
|
|
console.log('invoke vue', typeof this);
|
|
|
|
this.initData();
|
|
|
|
this.initData();
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -328,14 +335,14 @@
|
|
|
|
this.debug = !isEmpty(urlPath[4]);
|
|
|
|
this.debug = !isEmpty(urlPath[4]);
|
|
|
|
this.resultPage = !isEmpty(urlPath[4]) ? false : !isEmpty(urlPath[3]);
|
|
|
|
this.resultPage = !isEmpty(urlPath[4]) ? false : !isEmpty(urlPath[3]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
console.log(this.param, this.debug);
|
|
|
|
console.log(this.param, 'debug', 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('resultPage', this.resultPage);
|
|
|
|
this.getCityList();
|
|
|
|
this.getCityList();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
getCityList() {
|
|
|
|
getCityList() {
|
|
|
@ -368,7 +375,7 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return r.concat(mergeCity[tgid]);
|
|
|
|
return r.concat(mergeCity[tgid]);
|
|
|
|
}, []);
|
|
|
|
}, []);
|
|
|
|
// console.log(mergeCityA);
|
|
|
|
// console.log(mergeCityA, that.error);
|
|
|
|
that.cityList = mergeCityA;
|
|
|
|
that.cityList = mergeCityA;
|
|
|
|
if (mergeCityA.length === 1) {
|
|
|
|
if (mergeCityA.length === 1) {
|
|
|
|
that.selectCity(mergeCityA[0]);
|
|
|
|
that.selectCity(mergeCityA[0]);
|
|
|
@ -397,18 +404,20 @@
|
|
|
|
for (const iterator of selectedCity.cii_sn_arr) {
|
|
|
|
for (const iterator of selectedCity.cii_sn_arr) {
|
|
|
|
this.getData(Object.assign({}, _param, { CITY_SN: iterator }), true);
|
|
|
|
this.getData(Object.assign({}, _param, { CITY_SN: iterator }), true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.feedbackItem.guide.length === 0
|
|
|
|
|
|
|
|
&& this.feedbackItem.driver.length === 0
|
|
|
|
|
|
|
|
&& this.feedbackItem.experience.length === 0
|
|
|
|
|
|
|
|
&& this.feedbackItem.hotel.length === 0
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
this.error = true;
|
|
|
|
|
|
|
|
this.errorMsg = 'Data error.';
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.getData(Object.assign({}, _param, { CITY_SN: selectedCity.cii_sn }));
|
|
|
|
this.getData(Object.assign({}, _param, { CITY_SN: selectedCity.cii_sn }));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
|
|
|
// if (this.feedbackItem.guide.length === 0
|
|
|
|
|
|
|
|
// && this.feedbackItem.driver.length === 0
|
|
|
|
|
|
|
|
// && this.feedbackItem.experience.length === 0
|
|
|
|
|
|
|
|
// && this.feedbackItem.hotel.length === 0
|
|
|
|
|
|
|
|
// ) {
|
|
|
|
|
|
|
|
// this.error = true;
|
|
|
|
|
|
|
|
// this.errorMsg = 'Data error.';
|
|
|
|
|
|
|
|
// return false;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }, 1000);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
initSignature() {
|
|
|
|
initSignature() {
|
|
|
|
var canvas = document.getElementById('signature-pad');
|
|
|
|
var canvas = document.getElementById('signature-pad');
|
|
|
|