改太多

This commit is contained in:
minom committed 2026-10-30 17:47:01 +08:00
1 parent be5352efed
commit 1cb2a7a35e
48 files changed
+17970 -485

No files matched your search

+5
View File
@@ -68,6 +68,7 @@
<template #item.slot_btn="{ item }">
<a @click="gotoSignup(item)" class="btn btn-outline-secondary btn-sm">報名</a>
<a @click="gotoBatchSignup(item)" class="btn btn-outline-secondary btn-sm">批次報名</a>
<a @click="gotoImport(item)" class="btn btn-outline-secondary btn-sm">匯入Excel</a>
<a @click="gotoSignupList(item)" class="btn btn-outline-secondary btn-sm">明細</a>
</template>
@@ -213,6 +214,10 @@
this.search.subject = ""
this.search.up_time1=""
},
gotoImport(item) {
this.$emit('custom-event', { action: 'import', item: item });
},
gotoBatchSignup(item) {
this.$emit('custom-event', { action: 'batchSign', item: item });
},
+124
View File
@@ -0,0 +1,124 @@
<template>
<div class="container-fluid">
<v-card>
<v-card-title class="bg-primary white--text text-center">
<h4>Excel匯入</h4>
<div class="ms-auto">
<!--<v-btn @click.prevent="batchSave()">儲存</v-btn>
<v-btn @click.prevent="back01()">返回</v-btn>-->
</div>
</v-card-title>
<v-card-text>
<v-select :items="data_table.list"
label="選擇法會"
item-text="subject"
item-value="num" v-model="selected">
</v-select>
<v-file-input v-model="selectedFiles" truncate-length="15" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel" label="請選擇要匯入的excel" outlined dense></v-file-input>
<v-btn @click.prevent="importList">匯入</v-btn>
</v-card-text>
</v-card>
<v-dialog v-model="message_dialog.show" class="dialog_width">
<template>
<v-card>
<v-card-title>
{{ message_dialog.message }}
</v-card-title>
<v-card-text>
<v-btn @click.prevent="message_dialog.show=false" v-if="!message_dialog.show_confirm">關閉</v-btn>
</v-card-text>
</v-card>
</template>
</v-dialog>
</div>
</template>
<script>
module.exports = {
props: {
num: {
type: Number
}
},
data() {
return {
options: { multiSort: false },
search_options: { multiSort: false },
message_dialog: { show: false, show_confirm: false, message: "" },
data_table: {
loading: true,
list: [],
selected: [],
singleSelect: false,
count: 0,
page: 1,
pageSize: -1,
},
selected: null,
search: { subject: "" },
selectedFiles:[],
}
},
activated() {
this.getActivity()
},
watch: {
selected: {
handler() {
this.getProOrder()
},
deep: true,
},
},
methods: {
importList() {
if (!this.selectedFiles || this.selectedFiles.length === 0) return;
const formData = new FormData();
// If multiple files are enabled, loop through and append each file
for (let i = 0; i < this.selectedFiles.length; i++) {
formData.append('files', this.selectedFiles[i]);
}
//try {
// const response = await axios.post('/api/upload', formData, {
// headers: {
// 'Content-Type': 'multipart/form-data'
// }
// });
// console.log('Upload success:', response.data);
//} catch (error) {
// console.error('Upload failed:', error);
//}
},
back01() {//返回
this.$emit('custom-event', { action: 'signup1', item: this.num });
},
getActivity() {//撈法會資料
//const { sortBy, sortDesc, page, itemsPerPage } = this.options
const params = {
sortBy: "startDate_solar", sortDesc: true,
page: 1, pageSize: -1
};
this.data_table.loading = true
const self = this
axios
.post(HTTP_HOST + 'api/activity/GetListNew', this.search, { params: params })
.then(response => {
this.data_table.list = response.data.list
this.data_table.list = this.data_table.list.filter(x => x.num != self.num)
this.data_table.count = response.data.count;
this.data_table.loading = false
})
.catch(error => console.log(error))
}
}
}
</script>
<style>
.v-dialog {
width: 80% !important;
}
</style>
+4
View File
@@ -96,6 +96,7 @@
'fastSignUp3-component': httpVueLoader('./fastSignUp3.vue'),
'fastSignUp4-component': httpVueLoader('./fastSignUp4.vue'),
'fastSignUp5-component': httpVueLoader('./fastSignUp5.vue'),
'fastSignUp6-component': httpVueLoader('./fastSignUp6.vue'),
},
watch: {
options: {
@@ -126,6 +127,9 @@
} else if (item.action === "batchSign") {
this.twoData = item.item.num
this.currentView = "fastSignUp5-component"
} else if (item.action === "import") {
this.twoData = item.item.num
this.currentView = "fastSignUp6-component"
}
//console.log("item.action:",this.twoData)
},