Merge branch 'feature/headquartersSetting' into feature/dockerSetting
This commit is contained in:
commit
30a632fd0c
@ -84,8 +84,8 @@ const useBuildingStore = defineStore("buildingInfo", () => {
|
||||
// 獲取2D、3D顯示與否
|
||||
const fetchDashboard2D3D = async (BuildingId) => {
|
||||
const res = await getDashboard2D3D(BuildingId);
|
||||
showForgeArea.value = res.data.is3DEnabled || false;
|
||||
previewImageExt.value = res.data.previewImageExt || "";
|
||||
showForgeArea.value = res.data?.is3DEnabled || false;
|
||||
previewImageExt.value = res.data?.previewImageExt || "";
|
||||
};
|
||||
|
||||
// 清除localStorage建築物
|
||||
|
@ -41,12 +41,12 @@ watch(
|
||||
);
|
||||
|
||||
watch(
|
||||
() => store.previewImageExt,
|
||||
(newExt) => {
|
||||
if (formState.value.building_guid) {
|
||||
imgBaseUrl.value = newExt
|
||||
? `${FILE_BASEURL}/upload/setting/previewImage/${formState.value.building_guid}${newExt}`
|
||||
: `${FILE_BASEURL}/upload/build_img.jpg`;
|
||||
[() => store.previewImageExt, () => formState.value.building_guid],
|
||||
([newExt, buildingGuid]) => {
|
||||
if (newExt && buildingGuid) {
|
||||
imgBaseUrl.value = `${FILE_BASEURL}/upload/setting/previewImage/${buildingGuid}${newExt}`;
|
||||
} else {
|
||||
imgBaseUrl.value = `${FILE_BASEURL}/upload/build_img.jpg`;
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
|
@ -55,7 +55,7 @@ const doLogin = async () => {
|
||||
|
||||
<template>
|
||||
<div
|
||||
class="absolute top-10 left-1/2 -translate-x-1/2 z-20 border-4 rounded-3xl p-5 bg-white bg-opacity-60"
|
||||
class="absolute top-10 left-1/2 -translate-x-1/2 z-20 border-2 border-slate-200/40 shadow-lg shadow-slate-100/20 rounded-3xl p-5 bg-gradient-to-br from-slate-600 to-slate-800 bg-opacity-60"
|
||||
>
|
||||
<div class="flex flex-col items-start w-96">
|
||||
<div
|
||||
@ -65,7 +65,7 @@ const doLogin = async () => {
|
||||
</div>
|
||||
<div class="w-full flex flex-col items-end my-2">
|
||||
<div class="w-full flex justify-between">
|
||||
<label class="mr-2 text-2xl text-black" for="account">{{
|
||||
<label class="mr-2 text-2xl text-slate-200" for="account">{{
|
||||
$t("account")
|
||||
}}</label>
|
||||
<input
|
||||
@ -81,7 +81,7 @@ const doLogin = async () => {
|
||||
</div>
|
||||
<div class="w-full flex flex-col items-end my-2">
|
||||
<div class="w-full flex justify-between relative">
|
||||
<label class="mr-2 text-2xl text-black" for="password">{{
|
||||
<label class="mr-2 text-2xl text-slate-200" for="password">{{
|
||||
$t("password")
|
||||
}}</label>
|
||||
<input
|
||||
|
@ -138,14 +138,13 @@ watch(
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
watch(
|
||||
() => buildingStore.previewImageExt,
|
||||
(newValue) => {
|
||||
if (buildingStore.selectedBuilding && buildingStore.selectedBuilding.building_guid) {
|
||||
imgBaseUrl.value = buildingStore.previewImageExt
|
||||
? `${FILE_BASEURL}/upload/setting/previewImage/${buildingStore.selectedBuilding.building_guid}${newValue}`
|
||||
: `${FILE_BASEURL}/upload/build_img.jpg`;
|
||||
[() => buildingStore.previewImageExt, () => buildingStore.selectedBuilding?.building_guid],
|
||||
([newExt, buildingGuid]) => {
|
||||
if (newExt && buildingGuid) {
|
||||
imgBaseUrl.value = `${FILE_BASEURL}/upload/setting/previewImage/${buildingGuid}${newExt}`;
|
||||
} else {
|
||||
imgBaseUrl.value = `${FILE_BASEURL}/upload/build_img.jpg`;
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
|
Loading…
Reference in New Issue
Block a user