diff --git a/src/components/Modal/HWModal.ts b/src/components/Modal/HWModal.ts index 511b007..2ca50d1 100644 --- a/src/components/Modal/HWModal.ts +++ b/src/components/Modal/HWModal.ts @@ -21,7 +21,7 @@ const HW_MODAL_HTML = `
기본 정보 (Identity)
- +
@@ -32,6 +32,14 @@ const HW_MODAL_HTML = `
+
+ + +
+
+ + +
@@ -187,6 +195,8 @@ function fillHwFormData(asset: HardwareAsset) { (document.getElementById('hw-법인') as HTMLInputElement).value = asset.법인; (document.getElementById('hw-자산코드') as HTMLInputElement).value = asset.자산코드; (document.getElementById('hw-위치') as HTMLInputElement).value = asset.위치; + (document.getElementById('hw-현사용조직') as HTMLInputElement).value = asset.현사용조직 || ''; + (document.getElementById('hw-이전사용조직') as HTMLInputElement).value = asset.이전사용조직 || ''; (document.getElementById('hw-모델명') as HTMLInputElement).value = asset.모델명 || ''; (document.getElementById('hw-OS') as HTMLInputElement).value = asset.OS || ''; (document.getElementById('hw-CPU') as HTMLInputElement).value = asset.CPU || ''; @@ -288,6 +298,8 @@ export function initHwModal() { 법인: (document.getElementById('hw-법인') as HTMLInputElement).value, 자산코드: (document.getElementById('hw-자산코드') as HTMLInputElement).value, 위치: (document.getElementById('hw-위치') as HTMLInputElement).value, + 현사용조직: (document.getElementById('hw-현사용조직') as HTMLInputElement).value, + 이전사용조직: (document.getElementById('hw-이전사용조직') as HTMLInputElement).value, 모델명: (document.getElementById('hw-모델명') as HTMLInputElement).value, OS: (document.getElementById('hw-OS') as HTMLInputElement).value, CPU: (document.getElementById('hw-CPU') as HTMLInputElement).value, diff --git a/src/core/excelHandler.ts b/src/core/excelHandler.ts index 967b14f..af5ac68 100644 --- a/src/core/excelHandler.ts +++ b/src/core/excelHandler.ts @@ -38,6 +38,8 @@ export interface HardwareAsset { 서버PW?: string; 모니터링?: string; 비고?: string; + 현사용조직?: string; + 이전사용조직?: string; } @@ -90,7 +92,7 @@ const SW_TABS = ['구독SW', '영구SW']; const HW_HEADERS = ['법인', '자산코드', '명칭', '위치', '관리자', 'IP주소', 'MACaddress', 'HW사양', 'OS', '구매일', '금액', '납품업체', '품의서명']; const PC_HEADERS = ['법인', '자산코드', '사용자', '위치', 'CPU', 'GPU', 'RAM', 'SSD1', 'SSD2', 'HDD1', 'HDD2', '구매일', '금액', '납품업체', '품의서명']; -const SERVER_HEADERS = ['법인', '자산번호', '유형', '용도', '설치위치', '담당자(정)', '담당자(부)', 'IP 주소', '원격접속', '모델명', 'OS', 'CPU', 'RAM', 'GPU', 'Storage1', 'Storage2', 'Storage3', '모니터링', '비고']; +const SERVER_HEADERS = ['구매법인', '자산번호', '구매일자', '용도', '상세내용', '현 사용조직', '이전 사용조직', '설치위치', '담당자(정)', '담당자(부)', 'IP 주소 1', 'IP 주소 2', '원격도구', '서버 ID', '서버 PW', '모델명', 'OS', 'CPU', 'RAM', 'SSD1', 'SSD2', '모니터링', '비고']; const STORAGE_HEADERS = ['법인', '유형', '자산코드', '명칭', '위치', '모델명', '용량', '담당자(정)', '담당자(부)', 'IP주소', 'MAC주소', '구매일', '금액', '납품업체', '품의서명']; const SUB_SW_HEADERS = ['ID', '분야', '법인', '부서', '제품명', '구매일', '구독일', '금액', '수량', '계정명', '납품업체', '비고']; const PERM_SW_HEADERS = ['ID', '분야', '법인', '부서', '제품명', '구매일', '유지보수여부', '금액', '수량', '계정명', '납품업체', '비고']; @@ -112,7 +114,7 @@ export function downloadTemplate() { wscols = [{wch:15}, {wch:25}, {wch:15}, {wch:20}, {wch:20}, {wch:20}, {wch:15}, {wch:15}, {wch:15}, {wch:15}, {wch:15}, {wch:15}, {wch:15}, {wch:20}, {wch:25}]; } else if (tab === '서버') { hd = SERVER_HEADERS; - wscols = [{wch:15}, {wch:20}, {wch:15}, {wch:25}, {wch:20}, {wch:15}, {wch:15}, {wch:20}, {wch:20}, {wch:25}, {wch:20}, {wch:15}, {wch:15}, {wch:15}, {wch:15}, {wch:15}, {wch:15}, {wch:15}, {wch:30}]; + wscols = [{wch:15}, {wch:20}, {wch:15}, {wch:25}, {wch:30}, {wch:20}, {wch:20}, {wch:20}, {wch:15}, {wch:15}, {wch:20}, {wch:20}, {wch:20}, {wch:20}, {wch:20}, {wch:25}, {wch:20}, {wch:15}, {wch:15}, {wch:15}, {wch:15}, {wch:15}, {wch:30}]; } else if (tab === '스토리지') { hd = STORAGE_HEADERS; wscols = [{wch:15}, {wch:15}, {wch:25}, {wch:25}, {wch:20}, {wch:25}, {wch:15}, {wch:15}, {wch:15}, {wch:15}, {wch:20}, {wch:15}, {wch:15}, {wch:20}, {wch:25}]; @@ -164,9 +166,13 @@ export function exportToExcel(masterData: MasterAssetData) { } else if (tab === '서버') { wsData = [ SERVER_HEADERS, - ...targetAssets.map(a => [a.법인, a.자산코드, a.storage유형 || '물리', a.용도 || '', a.위치, a.담당자_정 || '', a.담당자_부 || '', a.IP주소, a.원격접속 || '', a.모델명 || '', a.OS, a.CPU, a.RAM, a.GPU || '', a.SSD1 || '', a.SSD2 || '', a.HDD1 || '', a.모니터링 || '', a.비고 || '']) + ...targetAssets.map(a => [ + a.법인, a.자산코드, a.구매일 || '', a.용도 || '', a.상세 || '', a.현사용조직 || '', a.이전사용조직 || '', + a.위치, a.담당자_정 || '', a.담당자_부 || '', a.IP주소, (a as any).IP2 || '', a.원격접속 || '', + (a as any).서버ID || '', (a as any).서버PW || '', a.모델명 || '', a.OS, a.CPU, a.RAM, a.SSD1 || '', a.SSD2 || '', a.모니터링 || '', a.비고 || '' + ]) ]; - colsConfig = [{wch:15}, {wch:20}, {wch:15}, {wch:25}, {wch:20}, {wch:15}, {wch:15}, {wch:20}, {wch:20}, {wch:25}, {wch:20}, {wch:15}, {wch:15}, {wch:15}, {wch:15}, {wch:15}, {wch:15}, {wch:15}, {wch:30}]; + colsConfig = [{wch:15}, {wch:20}, {wch:15}, {wch:25}, {wch:30}, {wch:20}, {wch:20}, {wch:20}, {wch:15}, {wch:15}, {wch:20}, {wch:20}, {wch:20}, {wch:20}, {wch:20}, {wch:25}, {wch:20}, {wch:15}, {wch:15}, {wch:15}, {wch:15}, {wch:15}, {wch:30}]; } else if (tab === '스토리지') { wsData = [ STORAGE_HEADERS, @@ -262,18 +268,27 @@ export async function parseExcel(file: File): Promise { hwAssets.push({ id: Math.random().toString(36).substring(2, 9), type: sheetName, - 법인: row['법인'] || '', + 법인: row['구매법인'] || row['법인'] || '', 자산코드: row['자산번호'] || row['자산코드'] || '', 명칭: row['용도'] || row['명칭'] || '', - 용도: row['용도'] || '', 위치: row['설치위치'] || row['위치'] || '', + 구매일: row['구매일자'] || row['구매일'] || '', + 용도: row['용도'] || '', + 상세: row['상세내용'] || row['상세'] || '', + 현사용조직: row['현 사용조직'] || '', + 이전사용조직: row['이전 사용조직'] || '', + 위치: row['설치위치'] || row['위치'] || '', 관리자: row['담당자(정)'] || '', 담당자_정: row['담당자(정)'] || '', 담당자_부: row['담당자(부)'] || '', - IP주소: row['IP 주소'] || row['IP주소'] || '', IP2: row['IP2'] || '', - 원격접속: row['원격접속'] || '', 서버ID: row['서버ID'] || '', 서버PW: row['서버PW'] || '', + IP주소: row['IP 주소 1'] || row['IP 주소'] || row['IP주소'] || '', + IP2: row['IP 주소 2'] || row['IP2'] || '', + 원격접속: row['원격도구'] || row['원격접속'] || '', + 서버ID: row['서버 ID'] || row['서버ID'] || '', + 서버PW: row['서버 PW'] || row['서버PW'] || '', 모델명: row['모델명'] || '', OS: row['OS'] || '', - CPU: row['CPU'] || '', RAM: row['RAM'] || '', GPU: row['GPU'] || '', - SSD1: row['Storage1'] || row['SSD1'] || '', SSD2: row['Storage2'] || row['SSD2'] || '', HDD1: row['Storage3'] || row['HDD1'] || '', - 모니터링: row['모니터링'] || '', 비고: row['비고'] || '', storage유형: row['유형'] || '물리', - MACaddress: '', HW사양: '', 구매일: '', 금액: '', 납품업체: '', 품의서명: '', + CPU: row['CPU'] || '', RAM: row['RAM'] || '', + SSD1: row['SSD1'] || row['Storage1'] || '', + SSD2: row['SSD2'] || row['Storage2'] || '', + 모니터링: row['모니터링'] || '', 비고: row['비고'] || '', storage유형: '물리', + MACaddress: '', HW사양: '', 금액: '', 납품업체: '', 품의서명: '', }); } else if (sheetName === '스토리지') { hwAssets.push({ diff --git a/src/views/AssetTableView.ts b/src/views/AssetTableView.ts index 11cb056..5ac1e9e 100644 --- a/src/views/AssetTableView.ts +++ b/src/views/AssetTableView.ts @@ -32,7 +32,7 @@ function renderHwTable(table: HTMLTableElement, container: HTMLElement, mainCont tableWrapper.className = 'table-container'; if (state.activeSubTab === '개인PC') { - table.innerHTML = `No법인자산코드사용자위치CPUGPURAMSSD1SSD2HDD1HDD2구매일금액납품업체품의서관리`; + table.innerHTML = `No구매법인자산코드사용자위치CPUGPURAMSSD1SSD2HDD1HDD2구매일금액납품업체품의서관리`; tableWrapper.appendChild(table); container.appendChild(tableWrapper); mainContent.appendChild(container); @@ -46,7 +46,7 @@ function renderHwTable(table: HTMLTableElement, container: HTMLElement, mainCont tbody.appendChild(tr); }); } else if (state.activeSubTab === '스토리지') { - table.innerHTML = `No법인유형자산코드명칭위치모델명용량담당자(정)IP주소구매일금액관리`; + table.innerHTML = `No구매법인유형자산코드명칭위치모델명용량담당자(정)IP주소구매일금액관리`; tableWrapper.appendChild(table); container.appendChild(tableWrapper); mainContent.appendChild(container); @@ -64,8 +64,9 @@ function renderHwTable(table: HTMLTableElement, container: HTMLElement, mainCont const filterBar = document.createElement('div'); filterBar.className = 'search-bar'; - // 법인, 유형, 위치 고유값 추출 + // 법인, 조직, 유형, 위치 고유값 추출 const corps = Array.from(new Set(fullList.map(a => a.법인))).filter(Boolean).sort(); + const orgUnits = Array.from(new Set(fullList.map(a => a.현사용조직))).filter(Boolean).sort(); const types = Array.from(new Set(fullList.map(a => a.storage유형))).filter(Boolean).sort(); const locations = Array.from(new Set(fullList.map(a => { const loc = String(a.위치 || ''); @@ -75,16 +76,23 @@ function renderHwTable(table: HTMLTableElement, container: HTMLElement, mainCont filterBar.innerHTML = `
- +
- +
+
+ + +