feat: 서버 통합 표준 헤더(21개 컬럼) 적용 및 UI/디자인 최적화
This commit is contained in:
@@ -30,6 +30,10 @@ export interface HardwareAsset {
|
|||||||
금액?: string;
|
금액?: string;
|
||||||
납품업체?: string;
|
납품업체?: string;
|
||||||
품의서명?: string;
|
품의서명?: string;
|
||||||
|
용도?: string;
|
||||||
|
원격접속?: string;
|
||||||
|
모니터링?: string;
|
||||||
|
비고?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SoftwareAsset {
|
export interface SoftwareAsset {
|
||||||
|
|||||||
@@ -240,12 +240,21 @@ body {
|
|||||||
|
|
||||||
.btn-outline {
|
.btn-outline {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
color: var(--text-main);
|
color: var(--primary-color);
|
||||||
border: 1px solid var(--border-color);
|
border: 1px solid var(--primary-color);
|
||||||
|
padding: 0.25rem 0.5rem;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
font-weight: 500;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-outline:hover {
|
.btn-outline:hover {
|
||||||
background-color: var(--border-color);
|
background-color: var(--primary-light);
|
||||||
|
border-color: var(--primary-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-nowrap {
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-danger {
|
.btn-danger {
|
||||||
|
|||||||
@@ -58,15 +58,50 @@ function renderHwTable(table: HTMLTableElement, container: HTMLElement, mainCont
|
|||||||
tbody.appendChild(tr);
|
tbody.appendChild(tr);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
table.innerHTML = `<thead><tr><th>No</th><th>법인</th>${state.activeSubTab === '전산비품' ? '<th>유형</th>' : ''}<th>자산코드</th><th>명칭</th><th>위치</th><th>관리자</th><th>구매일</th><th>금액</th><th>관리</th></tr></thead><tbody id="dynamic-tbody"></tbody>`;
|
if (state.activeSubTab === '서버') {
|
||||||
|
table.innerHTML = `<thead><tr><th>No</th><th>법인</th><th>자산번호</th><th>유형</th><th>용도</th><th>설치위치</th><th>담당자(정)</th><th>담당자(부)</th><th>IP 주소</th><th>원격접속</th><th>모델명</th><th>OS</th><th>CPU</th><th>RAM</th><th>GPU</th><th>Storage1</th><th>Storage2</th><th>Storage3</th><th>모니터링</th><th>비고</th><th>관리</th></tr></thead><tbody id="dynamic-tbody"></tbody>`;
|
||||||
|
} else {
|
||||||
|
table.innerHTML = `<thead><tr><th>No</th><th>법인</th>${state.activeSubTab === '전산비품' ? '<th>유형</th>' : ''}<th>자산코드</th><th>명칭</th><th>위치</th><th>관리자</th><th>구매일</th><th>금액</th><th>관리</th></tr></thead><tbody id="dynamic-tbody"></tbody>`;
|
||||||
|
}
|
||||||
|
|
||||||
container.appendChild(table);
|
container.appendChild(table);
|
||||||
mainContent.appendChild(container);
|
mainContent.appendChild(container);
|
||||||
const tbody = document.getElementById('dynamic-tbody')!;
|
const tbody = document.getElementById('dynamic-tbody')!;
|
||||||
if (list.length === 0) { tbody.innerHTML = `<tr><td colspan="10">등록된 자산이 없습니다.</td></tr>`; return; }
|
const colCount = state.activeSubTab === '서버' ? 21 : (state.activeSubTab === '전산비품' ? 11 : 10);
|
||||||
|
if (list.length === 0) { tbody.innerHTML = `<tr><td colspan="${colCount}">등록된 자산이 없습니다.</td></tr>`; return; }
|
||||||
|
|
||||||
list.forEach((asset, idx) => {
|
list.forEach((asset, idx) => {
|
||||||
const tr = document.createElement('tr');
|
const tr = document.createElement('tr');
|
||||||
tr.style.cursor = 'pointer';
|
tr.style.cursor = 'pointer';
|
||||||
tr.innerHTML = `<td>${idx+1}</td><td>${asset.법인}</td>${state.activeSubTab === '전산비품' ? `<td>${asset.비품유형||'-'}</td>` : ''}<td>${asset.자산코드}</td><td>${asset.명칭}</td><td>${asset.위치}</td><td>${asset.관리자}</td><td>${asset.구매일||''}</td><td>${asset.금액||''}</td><td><button class="btn-outline btn-edit">수정</button></td>`;
|
|
||||||
|
if (state.activeSubTab === '서버') {
|
||||||
|
tr.innerHTML = `
|
||||||
|
<td>${idx+1}</td>
|
||||||
|
<td>${asset.법인}</td>
|
||||||
|
<td class="text-nowrap">${asset.자산코드}</td>
|
||||||
|
<td>${asset.storage유형 || '물리'}</td>
|
||||||
|
<td class="text-nowrap">${asset.용도 || asset.명칭 || '-'}</td>
|
||||||
|
<td class="text-nowrap">${asset.위치}</td>
|
||||||
|
<td>${asset.담당자_정 || asset.관리자 || '-'}</td>
|
||||||
|
<td>${asset.담당자_부 || '-'}</td>
|
||||||
|
<td>${asset.IP주소}</td>
|
||||||
|
<td class="text-nowrap">${asset.원격접속 || '-'}</td>
|
||||||
|
<td class="text-nowrap">${asset.모델명 || '-'}</td>
|
||||||
|
<td>${asset.OS || ''}</td>
|
||||||
|
<td>${asset.CPU || ''}</td>
|
||||||
|
<td>${asset.RAM || ''}</td>
|
||||||
|
<td>${asset.GPU || '-'}</td>
|
||||||
|
<td>${asset.SSD1 || '-'}</td>
|
||||||
|
<td>${asset.SSD2 || '-'}</td>
|
||||||
|
<td>${asset.HDD1 || '-'}</td>
|
||||||
|
<td>${asset.모니터링 || '-'}</td>
|
||||||
|
<td>${asset.비고 || '-'}</td>
|
||||||
|
<td><button class="btn-outline btn-edit">수정</button></td>
|
||||||
|
`;
|
||||||
|
} else {
|
||||||
|
tr.innerHTML = `<td>${idx+1}</td><td>${asset.법인}</td>${state.activeSubTab === '전산비품' ? `<td>${asset.비품유형||'-'}</td>` : ''}<td>${asset.자산코드}</td><td>${asset.명칭}</td><td>${asset.위치}</td><td>${asset.관리자}</td><td>${asset.구매일||''}</td><td>${asset.금액||''}</td><td><button class="btn-outline btn-edit">수정</button></td>`;
|
||||||
|
}
|
||||||
|
|
||||||
tr.addEventListener('click', (e) => { if (!(e.target as HTMLElement).closest('button')) openHwModal(asset); });
|
tr.addEventListener('click', (e) => { if (!(e.target as HTMLElement).closest('button')) openHwModal(asset); });
|
||||||
tr.querySelector('.btn-edit')?.addEventListener('click', () => openHwModal(asset));
|
tr.querySelector('.btn-edit')?.addEventListener('click', () => openHwModal(asset));
|
||||||
tbody.appendChild(tr);
|
tbody.appendChild(tr);
|
||||||
|
|||||||
BIN
서버 관리대장(기술개발센터).xlsx
Normal file
BIN
서버 관리대장(기술개발센터).xlsx
Normal file
Binary file not shown.
BIN
서버 관리대장(한맥빌딩).xlsx
Normal file
BIN
서버 관리대장(한맥빌딩).xlsx
Normal file
Binary file not shown.
BIN
서버목록 및 IDC 서버 위치.xlsx
Normal file
BIN
서버목록 및 IDC 서버 위치.xlsx
Normal file
Binary file not shown.
Reference in New Issue
Block a user