|
|
@@ -5,42 +5,41 @@
|
|
|
|
|
|
<tab-content title="新增活動">
|
|
|
|
|
|
- <b-form @submit.prevent>
|
|
|
- <b-row>
|
|
|
- <b-col cols="12">
|
|
|
- <b-form-group label="活動名稱" label-for="activity-name" label-cols-md="4">
|
|
|
- <b-form-input v-model="activity_name" id="activity-name" placeholder="活動名稱" />
|
|
|
- </b-form-group>
|
|
|
- </b-col>
|
|
|
- <b-col cols="12">
|
|
|
- <b-form-group label="活動時間" label-for="date" label-cols-md="4">
|
|
|
- <b-form-input v-model="date" id="date" type="date" placeholder="活動時間" />
|
|
|
- </b-form-group>
|
|
|
- </b-col>
|
|
|
- <b-col cols="12">
|
|
|
- <b-form-group label="活動地點" label-for="place" label-cols-md="4">
|
|
|
- <b-form-input v-model="place" id="place" placeholder="活動地點" />
|
|
|
- </b-form-group>
|
|
|
- </b-col>
|
|
|
- <b-col cols="12">
|
|
|
- <b-form-group label="報名截止時間" label-for="deadline" label-cols-md="4">
|
|
|
- <b-form-input v-model="deadline" id="deadline" type="time" placeholder="報名截止時間" />
|
|
|
- </b-form-group>
|
|
|
- </b-col>
|
|
|
-
|
|
|
- <!-- submit and reset -->
|
|
|
- <b-col offset-md="4">
|
|
|
- <b-button v-ripple.400="'rgba(255, 255, 255, 0.15)'" type="submit" variant="primary"
|
|
|
- class="mr-1" @click="postData">
|
|
|
- 送出
|
|
|
- </b-button>
|
|
|
- <b-button v-ripple.400="'rgba(186, 191, 199, 0.15)'" type="reset"
|
|
|
- variant="outline-secondary">
|
|
|
- 取消
|
|
|
- </b-button>
|
|
|
- </b-col>
|
|
|
- </b-row>
|
|
|
- </b-form>
|
|
|
+ <b-form @submit.prevent>
|
|
|
+ <b-row>
|
|
|
+ <b-col cols="12">
|
|
|
+ <b-form-group label="活動名稱" label-for="activity-name" label-cols-md="4">
|
|
|
+ <b-form-input v-model="activity_name" id="activity-name" placeholder="活動名稱" />
|
|
|
+ </b-form-group>
|
|
|
+ </b-col>
|
|
|
+ <b-col cols="12">
|
|
|
+ <b-form-group label="活動時間" label-for="date" label-cols-md="4">
|
|
|
+ <b-form-input v-model="date" id="date" type="date" placeholder="活動時間" />
|
|
|
+ </b-form-group>
|
|
|
+ </b-col>
|
|
|
+ <b-col cols="12">
|
|
|
+ <b-form-group label="活動地點" label-for="place" label-cols-md="4">
|
|
|
+ <b-form-input v-model="place" id="place" placeholder="活動地點" />
|
|
|
+ </b-form-group>
|
|
|
+ </b-col>
|
|
|
+ <b-col cols="12">
|
|
|
+ <b-form-group label="報名截止時間" label-for="deadline" label-cols-md="4">
|
|
|
+ <b-form-input v-model="deadline" id="deadline" type="time" placeholder="報名截止時間" />
|
|
|
+ </b-form-group>
|
|
|
+ </b-col>
|
|
|
+
|
|
|
+ <!-- submit and reset -->
|
|
|
+ <b-col offset-md="4">
|
|
|
+ <b-button v-ripple.400="'rgba(255, 255, 255, 0.15)'" type="submit" variant="primary"
|
|
|
+ class="mr-1" @click="postData">
|
|
|
+ 送出
|
|
|
+ </b-button>
|
|
|
+ <b-button v-ripple.400="'rgba(186, 191, 199, 0.15)'" type="reset" variant="outline-secondary">
|
|
|
+ 取消
|
|
|
+ </b-button>
|
|
|
+ </b-col>
|
|
|
+ </b-row>
|
|
|
+ </b-form>
|
|
|
|
|
|
</tab-content>
|
|
|
|
|
|
@@ -70,59 +69,6 @@
|
|
|
|
|
|
</form-wizard>
|
|
|
|
|
|
-
|
|
|
- <!-- <b-card-code title="編輯活動">
|
|
|
- <b-form @submit.prevent>
|
|
|
- <b-row>
|
|
|
- <b-col cols="12">
|
|
|
- <b-form-group label="活動名稱" label-for="activity-name" label-cols-md="4">
|
|
|
- <b-form-input v-model="activity_name" id="activity-name" placeholder="活動名稱" />
|
|
|
- </b-form-group>
|
|
|
- </b-col>
|
|
|
- <b-col cols="12">
|
|
|
- <b-form-group label="活動時間" label-for="date" label-cols-md="4">
|
|
|
- <b-form-input v-model="date" id="date" type="date" placeholder="活動時間" />
|
|
|
- </b-form-group>
|
|
|
- </b-col>
|
|
|
- <b-col cols="12">
|
|
|
- <b-form-group label="活動地點" label-for="place" label-cols-md="4">
|
|
|
- <b-form-input v-model="place" id="place" placeholder="活動地點" />
|
|
|
- </b-form-group>
|
|
|
- </b-col>
|
|
|
- <b-col cols="12">
|
|
|
- <b-form-group label="報名截止時間" label-for="deadline" label-cols-md="4">
|
|
|
- <b-form-input v-model="deadline" id="deadline" type="time" placeholder="報名截止時間" />
|
|
|
- </b-form-group>
|
|
|
- </b-col>
|
|
|
-
|
|
|
- <b-col offset-md="4">
|
|
|
- <b-button v-ripple.400="'rgba(255, 255, 255, 0.15)'" type="submit" variant="primary"
|
|
|
- class="mr-1" @click="postData">
|
|
|
- 送出
|
|
|
- </b-button>
|
|
|
- <b-button v-ripple.400="'rgba(186, 191, 199, 0.15)'" type="reset" variant="outline-secondary">
|
|
|
- 取消
|
|
|
- </b-button>
|
|
|
- </b-col>
|
|
|
- </b-row>
|
|
|
- </b-form>
|
|
|
- </b-card-code>
|
|
|
-
|
|
|
- <b-row>
|
|
|
- <b-col md="6" lg="6">
|
|
|
- <b-card title="匯入獎項列表" class="mb-6">
|
|
|
- <b-form-file ref="prizeList" placeholder="請將檔案拉至此處或是點擊欄位選擇檔案" drop-placeholder="Drop file here..."
|
|
|
- accept=".xls, .xlsx, .csv" @change="importFile($event, 'prize')"></b-form-file>
|
|
|
- </b-card>
|
|
|
- </b-col>
|
|
|
- <b-col md="6" lg="6">
|
|
|
- <b-card title="匯入來賓列表" class="mb-6">
|
|
|
- <b-form-file ref="guestList" placeholder="請將檔案拉至此處或是點擊欄位選擇檔案" drop-placeholder="Drop file here..."
|
|
|
- accept=".xls, .xlsx, .csv" @change="importFile($event, 'guest')"></b-form-file>
|
|
|
- </b-card>
|
|
|
- </b-col>
|
|
|
- </b-row> -->
|
|
|
-
|
|
|
<b-modal ref="confirm-modal" title="成功設定活動" centered ok-only ok-title="確認">
|
|
|
<b-card-text>
|
|
|
已成功設定活動資訊!
|
|
|
@@ -140,8 +86,7 @@
|
|
|
上傳資料失敗,{{ errorText }}。
|
|
|
</b-card-text>
|
|
|
</b-modal>
|
|
|
- </div>
|
|
|
-
|
|
|
+</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
@@ -227,15 +172,16 @@ export default {
|
|
|
this.isSuccess = response.data.isSuccess;
|
|
|
if (this.isSuccess == true) {
|
|
|
this.$refs['insert-success-modal'].toggle();
|
|
|
- this.$refs[refOption].reset();
|
|
|
} else if (this.isSuccess == false) {
|
|
|
this.errorText = '匯入Excel檔案錯誤';
|
|
|
this.$refs['insert-fail-modal'].toggle();
|
|
|
}
|
|
|
+ this.$refs[refOption].reset();
|
|
|
}).catch(error => {
|
|
|
console.log(error);
|
|
|
this.errorText = error;
|
|
|
this.$refs['insert-fail-modal'].toggle();
|
|
|
+ this.$refs[refOption].reset();
|
|
|
});
|
|
|
},
|
|
|
formSubmitted() {
|