From 685401bd03bb73fbfe1c462c5319c8006839e41f Mon Sep 17 00:00:00 2001 From: 18300102974 Date: Wed, 15 Mar 2023 14:40:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B1=95=E8=A6=BD=E6=9F=A5?= =?UTF-8?q?=E8=A9=A2=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/content/selectExhibition.vue | 17 +++++++++---- FrontEnd/pages/service/_id.vue | 24 +++++++++++++++++-- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/FrontEnd/components/service/content/selectExhibition.vue b/FrontEnd/components/service/content/selectExhibition.vue index 39a97b1..f243c1c 100644 --- a/FrontEnd/components/service/content/selectExhibition.vue +++ b/FrontEnd/components/service/content/selectExhibition.vue @@ -76,10 +76,13 @@ export default { selectMonthList: { type: Array, }, + selectExhibitionList: { + type: Array, + }, }, data() { return { - selectExhibitionList: [], + // selectExhibitionList: [], formData: { select_year: "0", select_month: "0", @@ -150,8 +153,15 @@ export default { }, getExhibitions(){ 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) => { if(response && response.data && response.data.DATA && response.data.DATA.rel){ let data = response.data.DATA.rel @@ -166,7 +176,6 @@ export default { } }) .catch((error) => console.log(error)); - } } }, }; diff --git a/FrontEnd/pages/service/_id.vue b/FrontEnd/pages/service/_id.vue index aa028e7..3bdde9d 100644 --- a/FrontEnd/pages/service/_id.vue +++ b/FrontEnd/pages/service/_id.vue @@ -36,7 +36,7 @@

{{ $t("Select Exhibition") }}

- +

@@ -417,6 +417,7 @@ export default { selectQuantityList: [], selectYearList: [], selectMonthList: [], + selectExhibitionList: [], selectAddressList: [], selectExhibitionServiceList: [{id: 0,show: true}], selectPackageList: [], @@ -448,7 +449,7 @@ export default { await this.getServiceData(); await this.getExtensionYear(); await this.getExtensionMonth(); - // await this.getExhibitions(); + await this.getExhibitions(); await this.getQuantitySelects(); await this.getServiceItems(); await this.getReceivingCitys(); @@ -646,6 +647,25 @@ export default { }) .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() { this.showCardItem = false; await this.$axios