神祖牌位管理模組,掛單模組前端URL添加HTTP_HOST

This commit is contained in:
2025-10-29 13:48:20 +08:00
parent 7d36d6b0a6
commit e9f17a5037
36 changed files with 3889 additions and 77 deletions

View File

@@ -58,7 +58,7 @@
},
methods: {
getStatusList() {
axios.get('/api/region/bed/status/list')
axios.get(HTTP_HOST + 'api/region/bed/status/list')
.then((res) => {
this.items = res.data
this.loading = false;
@@ -73,7 +73,7 @@
})
},
deleteStatus(item) {
axios.post('/api/region/bed/status/delete', null, {
axios.post(HTTP_HOST + 'api/region/bed/status/delete', null, {
params: { code: item.code }
})
.then(() => {

View File

@@ -316,7 +316,7 @@
unoccupied: this.filter.unoccupied,
gender: this.filter.Gender,
};
axios.post('/api/region/list', payload)
axios.post(HTTP_HOST + 'api/region/list', payload)
.then((res) => {
this.regions = res.data.regions;
this.summary = res.data.summary; // 保存後端統計
@@ -347,7 +347,7 @@
console.log(this.filter.Gender);
},
getRegionWithRoom() {
axios.get('/api/region/regionwithroom')
axios.get(HTTP_HOST + 'api/region/regionwithroom')
.then((res) => {
this.filter.areas = res.data;
})

View File

@@ -578,7 +578,7 @@
this.expandAllFlag = false;
},
async loadRegions() {
const res = await axios.post('/api/region/getRegionList');
const res = await axios.post(HTTP_HOST + 'api/region/getRegionList');
this.regions = res.data;
this.flatRegions = this.flatten(res.data);
if (this.currentSelectRoom) {
@@ -586,7 +586,7 @@
}
},
loadRegionType() {
axios.post('/api/region/getRegionType')
axios.post(HTTP_HOST + 'api/region/getRegionType')
.then(res => {
this.regionTypes = res.data
});
@@ -799,7 +799,7 @@
});
},
confirmDeleteBed(bed) {
axios.post('/api/region/bed/delete', null, {
axios.post(HTTP_HOST + 'api/region/bed/delete', null, {
params: { uuid: bed.uuid }
}) // 假設後端吃的是 id
.then(() => {
@@ -840,7 +840,7 @@
async saveEditBed() {
try {
await axios.post('/api/region/bed/update', this.room_bed.newBedForm);
await axios.post(HTTP_HOST + 'api/region/bed/update', this.room_bed.newBedForm);
this.room_bed.showBedModal = false;
const updated = this.room_bed.newBedForm;
@@ -882,7 +882,7 @@
},
getBedStatus() {
//獲取床位狀態
axios.get('/api/region/bed/status/list')
axios.get(HTTP_HOST + 'api/region/bed/status/list')
.then((res) => {
this.room_bed.bed_status = res.data;
})
@@ -907,7 +907,7 @@
});
return;
}
axios.post('/api/region/room/create', this.room.room_form)
axios.post(HTTP_HOST + 'api/region/room/create', this.room.room_form)
.then((res) => {
this.room.showCreateRoomDialog = false;
this.currentSelectRegion.rooms.push(res.data);
@@ -924,7 +924,7 @@
},
async roomUpdate() {
try {
const res = await axios.post('/api/region/room/update', this.room.room_form);
const res = await axios.post(HTTP_HOST + 'api/region/room/update', this.room.room_form);
this.$refs.messageModal.open({
message: '客房資料更新成功'
});
@@ -950,7 +950,7 @@
},
roomDelete() {
axios.post('/api/region/room/delete', { uuid: this.currentSelectRoom.uuid })
axios.post(HTTP_HOST + 'api/region/room/delete', { uuid: this.currentSelectRoom.uuid })
.then((res) => {
const region = this.findRegionById(this.regions, this.currentSelectRoom.regionUuid)//當前room所在的region
if (region) {