313 lines
20 KiB
TypeScript
313 lines
20 KiB
TypeScript
import { ValueType } from "realgrid";
|
|
import { footerIntArrayByDivision, footerAvgDecimalArrayByDivision } from "@/components/util/grid/footerSummary";
|
|
import type { GridView } from "@/components/type/DataGrid.type";
|
|
|
|
// 하수도 통계 관리 03. 하수관로 유지 관리
|
|
const rawMaintainList = [
|
|
{
|
|
tabKey: 'ST00030001',
|
|
tabLabel: '개보수',
|
|
rowStartNum: 4,
|
|
fixedColumns: 2,
|
|
columns: [
|
|
{
|
|
name: 'ctpvNm',
|
|
fieldName: 'ctpvNm',
|
|
header: { text: '시도' },
|
|
mergeCells: true,
|
|
sortdisable: true,
|
|
footer: [
|
|
{
|
|
valueCallback: (grid: GridView) => {
|
|
const divisionIndex = 0;
|
|
const dataSource = grid.getDataSource();
|
|
const rowCount = dataSource.getRowCount();
|
|
const uniqueValues = new Set<string>();
|
|
for (let i = 0; i < rowCount; i++) {
|
|
const divisionValue = dataSource.getValue(i, 'displayYear');
|
|
if (divisionValue !== null && divisionValue !== undefined && divisionValue !== '') {
|
|
uniqueValues.add(String(divisionValue));
|
|
}
|
|
}
|
|
const divisionValues = Array.from(uniqueValues);
|
|
return divisionValues.length > divisionIndex ? divisionValues[divisionIndex] + ' 합계' : '합계';
|
|
}
|
|
},
|
|
{
|
|
valueCallback: (grid: GridView) => {
|
|
const divisionIndex = 1;
|
|
const dataSource = grid.getDataSource();
|
|
const rowCount = dataSource.getRowCount();
|
|
const uniqueValues = new Set<string>();
|
|
for (let i = 0; i < rowCount; i++) {
|
|
const divisionValue = dataSource.getValue(i, 'displayYear');
|
|
if (divisionValue !== null && divisionValue !== undefined && divisionValue !== '') {
|
|
uniqueValues.add(String(divisionValue));
|
|
}
|
|
}
|
|
const divisionValues = Array.from(uniqueValues);
|
|
return divisionValues.length > divisionIndex ? divisionValues[divisionIndex] + ' 합계' : '합계';
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{ name: 'sggNm', fieldName: 'sggNm', header: { text: '시군구' }, mergeCells: true, sortdisable: true },
|
|
{ name: 'admdstNm', fieldName: 'admdstNm', header: { text: '행정구역명' }, mergeCells: true },
|
|
{
|
|
name: 'displayYear',
|
|
fieldName: 'displayYear',
|
|
header: { text: '구분' },
|
|
sortdisable: true,
|
|
footer: [
|
|
{
|
|
valueCallback: (grid: GridView) => {
|
|
const divisionIndex = 0;
|
|
const dataSource = grid.getDataSource();
|
|
const rowCount = dataSource.getRowCount();
|
|
const uniqueValues = new Set<string>();
|
|
for (let i = 0; i < rowCount; i++) {
|
|
const divisionValue = dataSource.getValue(i, 'displayYear');
|
|
if (divisionValue !== null && divisionValue !== undefined && divisionValue !== '') {
|
|
uniqueValues.add(String(divisionValue));
|
|
}
|
|
}
|
|
const divisionValues = Array.from(uniqueValues);
|
|
return divisionValues.length > divisionIndex ? divisionValues[divisionIndex] + ' 합계' : '';
|
|
}
|
|
},
|
|
{
|
|
valueCallback: (grid: GridView) => {
|
|
const divisionIndex = 1;
|
|
const dataSource = grid.getDataSource();
|
|
const rowCount = dataSource.getRowCount();
|
|
const uniqueValues = new Set<string>();
|
|
for (let i = 0; i < rowCount; i++) {
|
|
const divisionValue = dataSource.getValue(i, 'displayYear');
|
|
if (divisionValue !== null && divisionValue !== undefined && divisionValue !== '') {
|
|
uniqueValues.add(String(divisionValue));
|
|
}
|
|
}
|
|
const divisionValues = Array.from(uniqueValues);
|
|
return divisionValues.length > divisionIndex ? divisionValues[divisionIndex] + ' 합계' : '';
|
|
}
|
|
}
|
|
]
|
|
},
|
|
/* 전체보수 (m) */
|
|
{ name: 'mendngWhol', fieldName: 'mendngWhol', header: { text: '계' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
|
|
{ name: 'cbsysMendngPrlg', fieldName: 'cbsysMendngPrlg', header: { text: '합류식' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
|
|
{ name: 'sprsysExlnPrlg', fieldName: 'sprsysExlnPrlg', header: { text: '우수' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
|
|
{ name: 'sprsysDrtwPrlg', fieldName: 'sprsysDrtwPrlg', header: { text: '오수' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
|
|
|
|
/* 부분보수 (개소) */
|
|
{ name: 'partMendngWhol', fieldName: 'partMendngWhol', header: { text: '계' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
|
{ name: 'cbsysPartMendngPrlg', fieldName: 'cbsysPartMendngPrlg', header: { text: '합류식' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
|
{ name: 'sprsysExlnMendngPrlg', fieldName: 'sprsysExlnMendngPrlg', header: { text: '우수' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
|
{ name: 'sprsysDrtwMendngPrlg', fieldName: 'sprsysDrtwMendngPrlg', header: { text: '오수' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
|
|
|
/* 부속시설 (개소) */
|
|
{ name: 'cbsysMnhlCnt', fieldName: 'cbsysMnhlCnt', header: { text: '합류식\n맨홀' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
|
{ name: 'sprsysDrtwMnhlCnt', fieldName: 'sprsysDrtwMnhlCnt', header: { text: '오수맨홀' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
|
{ name: 'sprsysExlnMnhlCnt', fieldName: 'sprsysExlnMnhlCnt', header: { text: '우수맨홀' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
|
{ name: 'drtwRcvprpCnt', fieldName: 'drtwRcvprpCnt', header: { text: '오수받이' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
|
{ name: 'exlnRcvprpCnt', fieldName: 'exlnRcvprpCnt', header: { text: '빗물받이' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
|
{ name: 'stofcbrCnt', fieldName: 'stofcbrCnt', header: { text: '토실' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
|
{ name: 'otflCnt', fieldName: 'otflCnt', header: { text: '토구' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
|
|
|
/* 조사량 및 비고 */
|
|
{ name: 'cctvExmnPrlg', fieldName: 'cctvExmnPrlg', header: { text: '수밀검사·\nCCTV조사량\n(m)' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
|
|
{ name: 'rmrk', fieldName: 'rmrk', header: { text: '비고' } },
|
|
],
|
|
columnLayout: [
|
|
{
|
|
name: 'addrGroup',
|
|
header: { text: '행정구역' },
|
|
items: [
|
|
{ column: 'ctpvNm', footerUserSpans: [{ colspan: 4 }, { colspan: 4 }] },
|
|
'sggNm',
|
|
'admdstNm',
|
|
]
|
|
},
|
|
'displayYear',
|
|
{
|
|
name: 'mtcPipeGroup', header: { text: '개·보수관로' },
|
|
items: [
|
|
{
|
|
name: 'totalRepairGroup', header: { text: '전체보수(m)' },
|
|
items: ['mendngWhol', 'cbsysMendngPrlg', { name: 'sepTotalGroup', header: { text: '분류식' }, items: ['sprsysExlnPrlg', 'sprsysDrtwPrlg'] }]
|
|
},
|
|
{
|
|
name: 'partRepairGroup', header: { text: '부분보수(개소)' },
|
|
items: ['partMendngWhol', 'cbsysPartMendngPrlg', { name: 'sepPartGroup', header: { text: '분류식' }, items: ['sprsysExlnMendngPrlg', 'sprsysDrtwMendngPrlg'] }]
|
|
}
|
|
]
|
|
},
|
|
'cbsysMnhlCnt',
|
|
{ name: 'sepMnhleGroup', header: { text: '분류식' }, items: ['sprsysDrtwMnhlCnt', 'sprsysExlnMnhlCnt'] },
|
|
'drtwRcvprpCnt', 'exlnRcvprpCnt',
|
|
{ name: 'soilGroup', header: { text: '토실·토구(개소)' }, items: ['stofcbrCnt', 'otflCnt'] },
|
|
'cctvExmnPrlg', 'rmrk'
|
|
]
|
|
},
|
|
{
|
|
tabKey: 'ST00030002',
|
|
tabLabel: '관로준설',
|
|
rowStartNum: 4,
|
|
fixedColumns: 2,
|
|
columns: [
|
|
{
|
|
name: 'ctpvNm',
|
|
fieldName: 'ctpvNm',
|
|
header: { text: '시도' },
|
|
mergeCells: true,
|
|
sortdisable: true,
|
|
footer: [
|
|
{
|
|
valueCallback: (grid: GridView) => {
|
|
const divisionIndex = 0;
|
|
const dataSource = grid.getDataSource();
|
|
const rowCount = dataSource.getRowCount();
|
|
const uniqueValues = new Set<string>();
|
|
for (let i = 0; i < rowCount; i++) {
|
|
const divisionValue = dataSource.getValue(i, 'displayYear');
|
|
if (divisionValue !== null && divisionValue !== undefined && divisionValue !== '') {
|
|
uniqueValues.add(String(divisionValue));
|
|
}
|
|
}
|
|
const divisionValues = Array.from(uniqueValues);
|
|
return divisionValues.length > divisionIndex ? divisionValues[divisionIndex] + ' 합계' : '합계';
|
|
}
|
|
},
|
|
{
|
|
valueCallback: (grid: GridView) => {
|
|
const divisionIndex = 1;
|
|
const dataSource = grid.getDataSource();
|
|
const rowCount = dataSource.getRowCount();
|
|
const uniqueValues = new Set<string>();
|
|
for (let i = 0; i < rowCount; i++) {
|
|
const divisionValue = dataSource.getValue(i, 'displayYear');
|
|
if (divisionValue !== null && divisionValue !== undefined && divisionValue !== '') {
|
|
uniqueValues.add(String(divisionValue));
|
|
}
|
|
}
|
|
const divisionValues = Array.from(uniqueValues);
|
|
return divisionValues.length > divisionIndex ? divisionValues[divisionIndex] + ' 합계' : '합계';
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{ name: 'sggNm', fieldName: 'sggNm', header: { text: '시군구' }, mergeCells: true, sortdisable: true },
|
|
{ name: 'admdstNm', fieldName: 'admdstNm', header: { text: '행정구역명' }, mergeCells: true },
|
|
{
|
|
name: 'displayYear',
|
|
fieldName: 'displayYear',
|
|
header: { text: '구분' },
|
|
sortdisable: true,
|
|
footer: [
|
|
{
|
|
valueCallback: (grid: GridView) => {
|
|
const divisionIndex = 0;
|
|
const dataSource = grid.getDataSource();
|
|
const rowCount = dataSource.getRowCount();
|
|
const uniqueValues = new Set<string>();
|
|
for (let i = 0; i < rowCount; i++) {
|
|
const divisionValue = dataSource.getValue(i, 'displayYear');
|
|
if (divisionValue !== null && divisionValue !== undefined && divisionValue !== '') {
|
|
uniqueValues.add(String(divisionValue));
|
|
}
|
|
}
|
|
const divisionValues = Array.from(uniqueValues);
|
|
return divisionValues.length > divisionIndex ? divisionValues[divisionIndex] + ' 합계' : '';
|
|
}
|
|
},
|
|
{
|
|
valueCallback: (grid: GridView) => {
|
|
const divisionIndex = 1;
|
|
const dataSource = grid.getDataSource();
|
|
const rowCount = dataSource.getRowCount();
|
|
const uniqueValues = new Set<string>();
|
|
for (let i = 0; i < rowCount; i++) {
|
|
const divisionValue = dataSource.getValue(i, 'displayYear');
|
|
if (divisionValue !== null && divisionValue !== undefined && divisionValue !== '') {
|
|
uniqueValues.add(String(divisionValue));
|
|
}
|
|
}
|
|
const divisionValues = Array.from(uniqueValues);
|
|
return divisionValues.length > divisionIndex ? divisionValues[divisionIndex] + ' 합계' : '';
|
|
}
|
|
}
|
|
]
|
|
},
|
|
/* 2. 시설 기본 정보 */
|
|
{ name: 'wholFcltPrlg', fieldName: 'wholFcltPrlg', header: { text: '하수관로\n총시설연장\n(m)' }, footer: footerAvgDecimalArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
|
|
|
|
/* 3. 준설연장 및 개소수 */
|
|
{ name: 'wholSwagePpl', fieldName: 'wholSwagePpl', header: { text: '합계' }, footer: footerAvgDecimalArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
|
|
{ name: 'cbsysPplPrlg', fieldName: 'cbsysPplPrlg', header: { text: '합류식' }, footer: footerAvgDecimalArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
|
|
{ name: 'sprsysExlnPrlg', fieldName: 'sprsysExlnPrlg', header: { text: '우수' }, footer: footerAvgDecimalArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
|
|
{ name: 'sprsysDrtwPrlg', fieldName: 'sprsysDrtwPrlg', header: { text: '오수' }, footer: footerAvgDecimalArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
|
|
{ name: 'mnhlCnt', fieldName: 'mnhlCnt', header: { text: '맨홀\n(개소)' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
|
{ name: 'exlnDrtwRcvprpCnt', fieldName: 'exlnDrtwRcvprpCnt', header: { text: '오·우수받이\n(개소)' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
|
{ name: 'stofcbrOtflCnt', fieldName: 'stofcbrOtflCnt', header: { text: '토실·토구\n(개소)' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
|
|
|
/* 4. 준설 계획 및 율 */
|
|
{ name: 'drdgnPlanPrlg', fieldName: 'drdgnPlanPrlg', header: { text: '준설 계획\n연장(m)' }, footer: footerAvgDecimalArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
|
|
{ name: 'drdgnTrgtCtrsDrdgnRt', fieldName: 'drdgnTrgtCtrsDrdgnRt', header: { text: '계획대비\n준설율\n(%)' }, footer: footerAvgDecimalArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
|
|
{ name: 'wholPrlgCtrsDrdgnRt', fieldName: 'wholPrlgCtrsDrdgnRt', header: { text: '전체연장대비\n준설율(%)' }, footer: footerAvgDecimalArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
|
|
|
|
/* 5. 준설실적 */
|
|
{ name: 'drdgnAmt', fieldName: 'drdgnAmt', header: { text: '금액\n(백만원)' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
|
{ name: 'drdgnQnt', fieldName: 'drdgnQnt', header: { text: '준설량\n(㎥)' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
|
|
|
/* 6. 준설토사처리 */
|
|
{ name: 'drdgnUntprcAmt', fieldName: 'drdgnUntprcAmt', header: { text: '준설단가\n(원/m3)' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
|
{ name: 'wholDrdgnPrcsQnt', fieldName: 'wholDrdgnPrcsQnt', header: { text: '처리량 계\n(톤)' }, footer: footerAvgDecimalArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
|
|
{ name: 'rclmQnt', fieldName: 'rclmQnt', header: { text: '매립' }, footer: footerAvgDecimalArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
|
|
{ name: 'oceanEmsnQnt', fieldName: 'oceanEmsnQnt', header: { text: '해양방출' }, footer: footerAvgDecimalArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
|
|
{ name: 'rcycQnt', fieldName: 'rcycQnt', header: { text: '재활용' }, footer: footerAvgDecimalArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
|
|
{ name: 'etcQnt', fieldName: 'etcQnt', header: { text: '기타' }, footer: footerAvgDecimalArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
|
|
|
|
/* 7. 기타 및 의견 */
|
|
{ name: 'rmrk', fieldName: 'rmrk', header: { text: '비고' } },
|
|
],
|
|
columnLayout: [
|
|
{
|
|
name: 'addrGroup',
|
|
header: { text: '행정구역' },
|
|
items: [
|
|
{ column: 'ctpvNm', footerUserSpans: [{ colspan: 4 }, { colspan: 4 }] }, // sido -> ctpvNm
|
|
'sggNm',
|
|
'admdstNm'
|
|
]
|
|
},
|
|
'displayYear',
|
|
'wholFcltPrlg',
|
|
{
|
|
name: 'drdgGroup', header: { text: '준설연장 및 개소수' },
|
|
items: [
|
|
{
|
|
name: 'pipeLenGroup', header: { text: '관로(m)' },
|
|
items: ['wholSwagePpl', 'cbsysPplPrlg', { name: 'sepRepairGroup', header: { text: '분류식' }, items: ['sprsysExlnPrlg', 'sprsysDrtwPrlg'] }]
|
|
},
|
|
'mnhlCnt', 'exlnDrtwRcvprpCnt', 'stofcbrOtflCnt'
|
|
]
|
|
},
|
|
'drdgnPlanPrlg', 'drdgnTrgtCtrsDrdgnRt', 'wholPrlgCtrsDrdgnRt',
|
|
{ name: 'acmsltGroup', header: { text: '준설실적' }, items: ['drdgnAmt', 'drdgnQnt'] },
|
|
{
|
|
name: 'processGroup', header: { text: '준설토사처리' },
|
|
items: ['drdgnUntprcAmt', 'wholDrdgnPrcsQnt', 'rclmQnt', 'oceanEmsnQnt', 'rcycQnt', 'etcQnt']
|
|
},
|
|
'rmrk'
|
|
]
|
|
}
|
|
];
|
|
|
|
export const SewagePipeMaintainColumnInfoList = rawMaintainList.map(tab => ({
|
|
...tab,
|
|
columns: tab.columns.map(col => ({
|
|
...col,
|
|
editable: false,
|
|
styleName: "rg-cell-readonly"
|
|
}))
|
|
})); |