fix: 위치보기 수정 (도면 오버플로우 제한 및 API 호출 경로 정상화)
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { state, saveAsset, deleteAsset } from '../../core/state';
|
import { state, saveAsset, deleteAsset } from '../../core/state';
|
||||||
import { ASSET_SCHEMA, UI_TEXT } from '../../core/schema';
|
import { ASSET_SCHEMA, UI_TEXT } from '../../core/schema';
|
||||||
import { calculatePcScoreDeductive, getPcGrade } from '../../core/utils';
|
import { calculatePcScoreDeductive, getPcGrade, API_BASE_URL } from '../../core/utils';
|
||||||
import {
|
import {
|
||||||
generateOptionsHTML,
|
generateOptionsHTML,
|
||||||
setFieldValue,
|
setFieldValue,
|
||||||
@@ -728,7 +728,7 @@ class HwAssetModal extends BaseModal {
|
|||||||
|
|
||||||
private async fetchMapConfig() {
|
private async fetchMapConfig() {
|
||||||
try {
|
try {
|
||||||
const res = await fetch(`http://${location.hostname}:3000/api/maps`);
|
const res = await fetch(`${API_BASE_URL}/api/maps`);
|
||||||
this.dynamicMapConfig = await res.json();
|
this.dynamicMapConfig = await res.json();
|
||||||
} catch (err) { console.error('Failed to fetch map config:', err); }
|
} catch (err) { console.error('Failed to fetch map config:', err); }
|
||||||
}
|
}
|
||||||
@@ -925,7 +925,7 @@ class HwAssetModal extends BaseModal {
|
|||||||
|
|
||||||
private async fetchMasterComponents(): Promise<void> {
|
private async fetchMasterComponents(): Promise<void> {
|
||||||
try {
|
try {
|
||||||
const res = await fetch(`http://${location.hostname}:3000/api/hardware-components`);
|
const res = await fetch(`${API_BASE_URL}/api/hardware-components`);
|
||||||
this.masterComponents = await res.json();
|
this.masterComponents = await res.json();
|
||||||
} catch (err) { console.error('Failed to fetch master components:', err); }
|
} catch (err) { console.error('Failed to fetch master components:', err); }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -537,6 +537,8 @@
|
|||||||
background-color: var(--canvas-soft-2);
|
background-color: var(--canvas-soft-2);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layout-map-container.readonly {
|
.layout-map-container.readonly {
|
||||||
@@ -546,12 +548,15 @@
|
|||||||
.image-marker-wrapper {
|
.image-marker-wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layout-map-img {
|
.layout-map-img {
|
||||||
display: block;
|
display: block;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
max-height: 75vh;
|
max-height: 70vh;
|
||||||
|
object-fit: contain;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
-webkit-user-drag: none;
|
-webkit-user-drag: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,19 @@
|
|||||||
import { defineConfig } from 'vite';
|
import { defineConfig } from 'vite';
|
||||||
import { resolve } from 'path';
|
import { resolve } from 'path';
|
||||||
|
|
||||||
|
const proxyTarget = process.env.VITE_DEV_PROXY_TARGET || 'http://localhost:3000';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
server: {
|
server: {
|
||||||
port: 8080,
|
port: 8080,
|
||||||
host: true, // Listen on all local IPs
|
host: true, // Listen on all local IPs
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
target: 'http://localhost:3000',
|
target: proxyTarget,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
},
|
},
|
||||||
'/uploads': {
|
'/uploads': {
|
||||||
target: 'http://localhost:3000',
|
target: proxyTarget,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user