2 Commits

  1. 17
      FrontEnd/components/service/content/selectExhibition.vue
  2. 24
      FrontEnd/pages/service/_id.vue

17
FrontEnd/components/service/content/selectExhibition.vue

@ -76,10 +76,13 @@ export default {
selectMonthList: { selectMonthList: {
type: Array, type: Array,
}, },
selectExhibitionList: {
type: Array,
},
}, },
data() { data() {
return { return {
selectExhibitionList: [],
// selectExhibitionList: [],
formData: { formData: {
select_year: "0", select_year: "0",
select_month: "0", select_month: "0",
@ -150,8 +153,15 @@ export default {
}, },
getExhibitions(){ getExhibitions(){
this.selectExhibitionList = []; this.selectExhibitionList = [];
if((this.formData.select_year && this.formData.select_year!="0") && (this.formData.select_month && this.formData.select_month !="0")){
this.$axios.get(`/trending/api/Onsite/Exhibitions?Lang=${this.$i18n.localeProperties["langQuery"]}&ServiceID=${this.$route.params.id}&Year=${this.formData.select_year}&Month=${this.formData.select_month}`)
let select_year = "";
let select_month = "";
if(this.formData.select_year!="0" && this.formData.select_year!=""){
select_year = this.formData.select_year;
}
if(this.formData.select_month!="0" && this.formData.select_month!=""){
select_month = this.formData.select_month;
}
this.$axios.get(`/trending/api/Onsite/Exhibitions?Lang=${this.$i18n.localeProperties["langQuery"]}&ServiceID=${this.$route.params.id}&Year=${select_year}&Month=${select_month}`)
.then((response) => { .then((response) => {
if(response && response.data && response.data.DATA && response.data.DATA.rel){ if(response && response.data && response.data.DATA && response.data.DATA.rel){
let data = response.data.DATA.rel let data = response.data.DATA.rel
@ -167,7 +177,6 @@ export default {
}) })
.catch((error) => console.log(error)); .catch((error) => console.log(error));
} }
}
}, },
}; };
</script> </script>

24
FrontEnd/pages/service/_id.vue

@ -36,7 +36,7 @@
<h3 class="t14 tw-font-bold tw-mb-[30px] md:t16 tw-block"> <h3 class="t14 tw-font-bold tw-mb-[30px] md:t16 tw-block">
{{ $t("Select Exhibition") }} {{ $t("Select Exhibition") }}
</h3> </h3>
<selectExhibition ref="ref_selectExhibition" :selectYearList="selectYearList" :selectMonthList="selectMonthList"></selectExhibition>
<selectExhibition ref="ref_selectExhibition" :selectYearList="selectYearList" :selectMonthList="selectMonthList" :selectExhibitionList="selectExhibitionList"></selectExhibition>
</div> </div>
<div class="group tw-mb-[20px] tw-p-[20px] tw-rounded-[20px] tw-bg-white"> <div class="group tw-mb-[20px] tw-p-[20px] tw-rounded-[20px] tw-bg-white">
<h3 class="t14 tw-font-bold tw-mb-[20px] md:t16 tw-block"> <h3 class="t14 tw-font-bold tw-mb-[20px] md:t16 tw-block">
@ -417,6 +417,7 @@ export default {
selectQuantityList: [], selectQuantityList: [],
selectYearList: [], selectYearList: [],
selectMonthList: [], selectMonthList: [],
selectExhibitionList: [],
selectAddressList: [], selectAddressList: [],
selectExhibitionServiceList: [{id: 0,show: true}], selectExhibitionServiceList: [{id: 0,show: true}],
selectPackageList: [], selectPackageList: [],
@ -448,7 +449,7 @@ export default {
await this.getServiceData(); await this.getServiceData();
await this.getExtensionYear(); await this.getExtensionYear();
await this.getExtensionMonth(); await this.getExtensionMonth();
// await this.getExhibitions();
await this.getExhibitions();
await this.getQuantitySelects(); await this.getQuantitySelects();
await this.getServiceItems(); await this.getServiceItems();
await this.getReceivingCitys(); await this.getReceivingCitys();
@ -646,6 +647,25 @@ export default {
}) })
.catch((error) => console.log(error)); .catch((error) => console.log(error));
}, },
async getExhibitions(){
let select_year = "";
let select_month = "";
await this.$axios.get(`/trending/api/Onsite/Exhibitions?Lang=${this.$i18n.localeProperties["langQuery"]}&ServiceID=${this.$route.params.id}&Year=${select_year}&Month=${select_month}`)
.then((response) => {
if(response && response.data && response.data.DATA && response.data.DATA.rel){
let data = response.data.DATA.rel
if(data.length>0){
this.selectExhibitionList = data.map((item) => {
return {
id: item.ArgumentID,
name: item.ArgumentValue,
};
});
}
}
})
.catch((error) => console.log(error));
},
async getServiceItems() { async getServiceItems() {
this.showCardItem = false; this.showCardItem = false;
await this.$axios await this.$axios

Loading…
Cancel
Save