guadan
This commit is contained in:
@@ -108,8 +108,9 @@
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
|
||||
<div v-for="region in regions" :key="region.uuid" class="region-block mb-4">
|
||||
<h2 class="region-title mb-3">{{ region.regionPath }}</h2>
|
||||
<div v-for="region in regions" :key="region.uuid" class="region-block mb-4"
|
||||
:style="region.isStop ? { pointerEvents: 'none', opacity: '0.6', backgroundColor: '#f8d7da' } : {}">
|
||||
<h2 class="region-title mb-3">{{region.isStop?(region.regionPath + '(已停用)'): region.regionPath }}</h2>
|
||||
|
||||
<div class="row g-3 justify-content-start">
|
||||
<div v-for="room in region.room" :key="room.ruid" class="col-12 col-md-6 col-lg-6">
|
||||
@@ -319,6 +320,14 @@
|
||||
.then((res) => {
|
||||
this.regions = res.data.regions;
|
||||
this.summary = res.data.summary; // 保存後端統計
|
||||
try {
|
||||
this.regions.sort((a, b) => {
|
||||
return Number(a.isStop) - Number(b.isStop);
|
||||
});
|
||||
}
|
||||
catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error('API 錯誤', err);
|
||||
|
||||
Reference in New Issue
Block a user