Compare commits

..

2 Commits

18 changed files with 1812 additions and 1637 deletions

View File

@ -92,12 +92,9 @@
background: map-deep-get($config, #{$theme}, "basic-button-background"); background: map-deep-get($config, #{$theme}, "basic-button-background");
} }
.searchFilter{
.search-button { .search-button {
height: 40px;
color: map-deep-get($config, #{$theme}, "search-btn-color"); color: map-deep-get($config, #{$theme}, "search-btn-color");
} }
}
.v-dialog { .v-dialog {
.ant-btn-icon-only { .ant-btn-icon-only {

View File

@ -98,17 +98,6 @@
@include theme($theme); @include theme($theme);
.v-application.#{$theme}-mode { .v-application.#{$theme}-mode {
.grid-title {
font-weight: 600;
font-size: 16px;
line-height: 24px;
letter-spacing: 0;
color: map-deep-get($config,
#{$theme},
"tui-grid-title-color"
);
}
.tui-grid { .tui-grid {
&-table { &-table {
border: 1px solid; border: 1px solid;

View File

@ -113,6 +113,14 @@
color: map-deep-get($config, #{$theme}, "h1-title"); color: map-deep-get($config, #{$theme}, "h1-title");
} }
.custom-subtitle-tab {
font-size: 1.25rem !important;
font-weight: 600 !important;
line-height: 1.25 !important;
color: map-deep-get($config, #{$theme}, "subtitle-tab");
}
.v-dialog { .v-dialog {
.custom-title-4 { .custom-title-4 {
font-size: 16px !important; font-size: 16px !important;

View File

@ -102,7 +102,6 @@ $config: (
v-calendar-day-color: #fff, v-calendar-day-color: #fff,
v-calendar-day-in-not-month-color: rgba(255, 255, 255, 0.05), v-calendar-day-in-not-month-color: rgba(255, 255, 255, 0.05),
v-calendar-is-today-background-color: #2d4571, v-calendar-is-today-background-color: #2d4571,
tui-grid-title-color: #FFFFFFD9,
tui-grid-header-backgroundColor: #2a2b2d, tui-grid-header-backgroundColor: #2a2b2d,
tui-grid-header-color: #FFFFFFD9, tui-grid-header-color: #FFFFFFD9,
tui-grid-border-horziontal-color: #212224, tui-grid-border-horziontal-color: #212224,
@ -171,6 +170,7 @@ $config: (
ant-btn-default-border-outlined:#424242, ant-btn-default-border-outlined:#424242,
btn-header-select-bg: #1F1F1F, btn-header-select-bg: #1F1F1F,
btn-header-select-color:#FFFFFFD9, btn-header-select-color:#FFFFFFD9,
subtitle-tab: #FFFFFFA6,
), ),
light: (w-g5: $--color-gray_555, light: (w-g5: $--color-gray_555,
g5-w: $--color-white, g5-w: $--color-white,
@ -239,7 +239,6 @@ $config: (
v-calendar-day-color: #111, v-calendar-day-color: #111,
v-calendar-day-in-not-month-color: #f8f8f8, v-calendar-day-in-not-month-color: #f8f8f8,
v-calendar-is-today-background-color: #e3eaf3, v-calendar-is-today-background-color: #e3eaf3,
tui-grid-title-color: #000000E0,
tui-grid-header-backgroundColor: #fafafa, //#e0e0e0, tui-grid-header-backgroundColor: #fafafa, //#e0e0e0,
tui-grid-header-color: rgba(0, 0, 0, 0.88), tui-grid-header-color: rgba(0, 0, 0, 0.88),
tui-grid-border-horziontal-color: #e0e0e0, tui-grid-border-horziontal-color: #e0e0e0,
@ -306,5 +305,6 @@ $config: (
ant-btn-default-border-outlined:#D9D9D9, ant-btn-default-border-outlined:#D9D9D9,
btn-header-select-color:#1F1F1F, btn-header-select-color:#1F1F1F,
btn-header-select-bg:#FFFFFF, btn-header-select-bg:#FFFFFF,
subtitle-tab: #000000A6,
), ),
); );

View File

@ -45,7 +45,7 @@ export default {
size: { size: {
type: String, type: String,
require: false, require: false,
default: "middle", // small, middle, large default: "default", // small, middle, large
} }
}, },
data() { data() {

View File

@ -1,5 +1,5 @@
// Gauge chart options // Gauge chart options
export default function getGaugeChartOption({ title, min = 0, max = 160, unit = '%', isDarkMode = false, backgroundRadius = 97 }) { export default function getGaugeChartOption({ title, value, min = 0, max = 160, unit = '%', isDarkMode = false, backgroundRadius = 97 }) {
const colorRanges = isDarkMode const colorRanges = isDarkMode
? [ ? [
[0.375, '#49AA19'], // Dark Green [0.375, '#49AA19'], // Dark Green

View File

@ -2,7 +2,7 @@
export default function getLineChartOption({ export default function getLineChartOption({
xAxisData = [], xAxisData = [],
seriesData = [], seriesData = [],
// legendData = [], legendData = [],
isDarkMode = false, isDarkMode = false,
}) { }) {
@ -31,7 +31,7 @@ export default function getLineChartOption({
}, },
legend: { legend: {
// data: legendData, data: legendData,
icon: 'circle', icon: 'circle',
top: '0%', top: '0%',
right: '5%', right: '5%',

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="pb-5 h100"> <div class="pb-5 h100">
<div class="d-flex align-center justify-space-between"> <div class="d-flex align-center justify-space-between">
<span class="grid-title">공통그룹코드</span> <span class="text-h6">공통그룹코드</span>
<div> <div>
<Buttons <Buttons
:parentPrgmId="parentPrgmId" :parentPrgmId="parentPrgmId"
@ -126,7 +126,7 @@ export default {
{ {
header: '사용여부', header: '사용여부',
name: 'useFg', name: 'useFg',
align: 'left', align: 'center',
formatter({ value }) { formatter({ value }) {
const newValue = _this.pageData.useFgList.filter( const newValue = _this.pageData.useFgList.filter(
item => item.commCd == value, item => item.commCd == value,

View File

@ -271,6 +271,63 @@ export default {
value: myColumns, value: myColumns,
}); });
const res = [
{
"comId": "COM001",
"ercId": "ERC001",
"objMm": "202507",
"objYm": "2025-07",
"unitPrce": 120.5,
"peakPow": 450,
"baseChrg": 30000,
"notiChrg": 32500,
"rmrk": "Standard summer rate",
"blocId": "BLOC001",
"regUserNo": "USER001",
"regDttm": "2025-07-01T09:00:00",
"procUserNo": "USER002",
"procDttm": "2025-07-15T14:30:00"
},
{
"comId": "COM002",
"ercId": "ERC002",
"objMm": "202507",
"objYm": "2025-07",
"unitPrce": 98.75,
"peakPow": 300,
"baseChrg": 25000,
"notiChrg": 27000,
"rmrk": "Reduced rate for solar",
"blocId": "BLOC002",
"regUserNo": "USER003",
"regDttm": "2025-07-02T10:15:00",
"procUserNo": "USER004",
"procDttm": "2025-07-16T11:45:00"
},
{
"comId": "COM003",
"ercId": "ERC003",
"objMm": "202507",
"objYm": "2025-07",
"unitPrce": 110.0,
"peakPow": 400,
"baseChrg": 28000,
"notiChrg": 29500,
"rmrk": "Geothermal adjustment",
"blocId": "BLOC003",
"regUserNo": "USER005",
"regDttm": "2025-07-03T08:45:00",
"procUserNo": "USER006",
"procDttm": "2025-07-17T13:20:00"
}
]
this.setGridData({
gridKey: this.gridName,
value: res,
});
this.loadGrid = true; this.loadGrid = true;
}, },
async btnActions(action) { async btnActions(action) {

View File

@ -4,7 +4,7 @@
class="d-flex justify-space-between align-center" class="d-flex justify-space-between align-center"
style="height: 80px;" style="height: 80px;"
> >
<span class="txt">검침 대상 추가 정보</span> <span class="txt custom-subtitle-tab">검침 대상 추가 정보</span>
<Buttons <Buttons
:parentPrgmId="parentPrgmId" :parentPrgmId="parentPrgmId"
:bindingData="gridName" :bindingData="gridName"
@ -20,8 +20,6 @@
:editorGrid="true" :editorGrid="true"
:innerTabGridInfo="innerTabGridInfo" :innerTabGridInfo="innerTabGridInfo"
@getRowsData="getRowData" @getRowsData="getRowData"
:selectedRowDataWatchFlag="true"
:dataPath="dataPathMock"
/> />
</div> </div>
</div> </div>
@ -55,23 +53,10 @@ export default {
}, },
data() { data() {
return { return {
loadGrid: true, loadGrid: false,
gridName: 'rowDetailGrid', gridName: 'rowDetailGrid',
rowKey: null, rowKey: null,
edtingFinishFlag: 'Y', edtingFinishFlag: 'Y',
dataPathMock: {
"rowDetailGrid": {
column: [
{ header: '검침 대상 ID', name: 'readObjId', align: 'left' },
{ header: '검침 대상 명', name: 'readObjNm', align: 'left' },
{ header: '검침 대상 유형', name: 'readObjKind', align: 'left' },
{ header: '그룹', name: 'grpCd', align: 'left' },
],
data: dataPathDataExample,
defaultRow: dataPathDataExample,
option: {}
}
},
}; };
}, },
computed: { computed: {
@ -461,25 +446,4 @@ export default {
search() {}, search() {},
}, },
}; };
const dataPathDataExample = [
{
readObjId: 'OBJ001',
readObjNm: '서울 본사',
readObjKind: 'TYPE01',
grpCd: 'GRP01',
},
{
readObjId: 'OBJ002',
readObjNm: '부산 지사',
readObjKind: 'TYPE02',
grpCd: 'GRP02',
},
{
readObjId: 'OBJ003',
readObjNm: '대전 공장',
readObjKind: 'TYPE03',
grpCd: 'GRP01',
}
];
</script> </script>

View File

@ -67,7 +67,6 @@
:gridName="gridName" :gridName="gridName"
:parentPrgmId="myPrgmId" :parentPrgmId="myPrgmId"
@getRowsData="getRowData" @getRowsData="getRowData"
:dataPath="dataPathMock"
/> />
</div> </div>
</div> </div>
@ -132,22 +131,8 @@ export default {
return { return {
myPrgmId: myPrgmId, myPrgmId: myPrgmId,
gridName: 'rowGrid', gridName: 'rowGrid',
loadGrid: true, loadGrid: false,
detailList: myDetail, detailList: myDetail,
dataPathMock : {
rowGrid: {
column: [
{ header: '추가 정보 그룹', name: 'addGrpId', align: 'left' },
{ header: '추가 정보 ID', name: 'addInfoId', align: 'left' },
{ header: '추가 정보 명', name: 'addInfoNm', align: 'left' },
{ header: 'Data 형식', name: 'addInfoDataKind', align: 'center' },
{ header: '사용여부', name: 'useFg', align: 'center' },
],
data: dataMockExample,
defaultRow: dataMockExample,
option: {},
},
},
}; };
}, },
computed: { computed: {
@ -518,43 +503,4 @@ const myDetail = [
placeholder: '시스템 자동입력', placeholder: '시스템 자동입력',
}, },
]; ];
const dataMockExample = [
{
addGrpId: 'GRP001',
addInfoId: 'INFO001',
addInfoNm: '온도 센서',
addInfoDataKind: 'DATA01',
useFg: true,
},
{
addGrpId: 'GRP002',
addInfoId: 'INFO002',
addInfoNm: '압력 센서',
addInfoDataKind: 'DATA02',
useFg: false,
},
{
addGrpId: 'GRP003',
addInfoId: 'INFO003',
addInfoNm: '압력 센서',
addInfoDataKind: 'DATA03',
useFg: false,
},
{
addGrpId: 'GRP004',
addInfoId: 'INFO004',
addInfoNm: '압력 센서',
addInfoDataKind: 'DATA04',
useFg: false,
},
{
addGrpId: 'GRP005',
addInfoId: 'INFO005',
addInfoNm: '압력 센서',
addInfoDataKind: 'DATA05',
useFg: false,
},
];
</script> </script>

View File

@ -4,28 +4,24 @@
<v-row ref="searchFilter"> <v-row ref="searchFilter">
<v-col :cols="12"> <v-col :cols="12">
<v-card class="searchFilter"> <v-card class="searchFilter">
<v-row align="end" no-gutters> <v-row align="center" no-gutters>
<v-col :cols="2.5"> <v-col :cols="2">
<InputText <InputText
:parentPrgmId="myPrgmId" :parentPrgmId="myPrgmId"
label="배치ID" label="배치ID"
valueNm="batchId" valueNm="batchId"
:searchOption="true" :searchOption="true"
:iconShow="true"
customClass="input-large"
/> />
</v-col> </v-col>
<v-col :cols="2.5"> <v-col :cols="2">
<InputText <InputText
:parentPrgmId="myPrgmId" :parentPrgmId="myPrgmId"
label="배치명" label="배치명"
valueNm="batchNm" valueNm="batchNm"
:searchOption="true" :searchOption="true"
:iconShow="true"
customClass="input-large"
/> />
</v-col> </v-col>
<v-col :cols="2.5"> <v-col :cols="2">
<component <component
:is="'selectCodeList'" :is="'selectCodeList'"
:parentPrgmId="myPrgmId" :parentPrgmId="myPrgmId"
@ -33,21 +29,19 @@
:dataKey="'execRsltCd'" :dataKey="'execRsltCd'"
:sendParam="{ commGrpCd: 'CO_BATCH_EXEC_RSLT', useFg: '1' }" :sendParam="{ commGrpCd: 'CO_BATCH_EXEC_RSLT', useFg: '1' }"
:addAll="true" :addAll="true"
:iconShow="true"
customClass="select-large"
/> />
</v-col> </v-col>
<v-col :cols="2.5"> <v-col :cols="2">
<component <component
:is="'Datepicker'" :is="'Datepicker'"
:parentPrgmId="myPrgmId" :parentPrgmId="myPrgmId"
:label="'조회기간'" :label="'조회기간'"
:customClass="'input-large'"
/> />
</v-col> </v-col>
<v-col :cols="2" class="text-right d-flex align-end justify-end ga-1" style="gap: 4px"> <v-spacer></v-spacer>
<BtnSearch size="large" /> <v-col :cols="4" class="text-right">
<BtnExcelDownload :parentPrgmId="myPrgmId" :gridName="gridName" size="large" /> <BtnSearch />
<BtnExcelDownload :parentPrgmId="myPrgmId" :gridName="gridName" />
</v-col> </v-col>
</v-row> </v-row>
</v-card> </v-card>
@ -63,11 +57,10 @@
<div ref="gridParent" class="px-5 h100"> <div ref="gridParent" class="px-5 h100">
<component <component
:ref="gridName" :ref="gridName"
:is=" 'Grid' " :is="loadGrid ? 'Grid' : null"
:parentPrgmId="myPrgmId" :parentPrgmId="myPrgmId"
:gridName="gridName" :gridName="gridName"
@getRowsData="getRowData" @getRowsData="getRowData"
:dataPath="dataPathMock"
/> />
</div> </div>
</div> </div>
@ -140,56 +133,10 @@ export default {
data() { data() {
return { return {
myPrgmId: myPrgmId, myPrgmId: myPrgmId,
loadGrid: true, loadGrid: false,
gridName: 'rowGrid', gridName: 'rowGrid',
// rowGridOrigin: [], // rowGridOrigin: [],
detailList: myDetail, detailList: myDetail,
dataPathMock : {
'rowGrid': {
column: [
{ header: 'No.', name: 'batchLogSeq', align: 'center', width: 100 },
{ header: '배치ID', name: 'batchId', align: 'center', width: 100 },
{ header: '배치명', name: 'batchNm', align: 'left', width: 150 },
{ header: '실행 일자', name: 'execDt', align: 'center', width: 80 },
{
header: '실행 결과',
name: 'execRsltCd',
align: 'center',
width: 80,
// formatter({ value }) {
// let retVal = '';
// const newValue = _this.pageData.execRsltCdList.filter(
// item => item.commCd == value,
// );
// if (newValue.length > 0) {
// retVal = newValue[0].commCdNm;
// }
// return retVal;
// },
}, // "1": 프로그램, "2": 팝업
{ header: '실행 로그', name: 'execLogCont', minWidth: 150 },
{
header: '배치 시작 일시',
name: 'batchStrtDttm',
align: 'center',
width: 160,
},
{
header: '배치 종료 일시',
name: 'batchEndDttm',
align: 'center',
width: 160,
},
{ header: '등록자NO', name: 'regUserNo', width: 120 },
{ header: '등록일시', name: 'regDttm', align: 'center', width: 160 },
{ header: '수정자NO', name: 'procUserNo', width: 120 },
{ header: '수정일시', name: 'procDttm', align: 'center', width: 160 },
],
data: dataMockExample,
defaultRow: dataMockExample,
option: {},
},
},
}; };
}, },
computed: { computed: {
@ -248,14 +195,6 @@ export default {
init() { init() {
// this.layoutInit(); // this.layoutInit();
this.gridInit(); this.gridInit();
// _this.pageData = {
// execRsltCdList: [
// { commCd: '1', commCdNm: '성공' },
// { commCd: '2', commCdNm: '실패' },
// ],
// };
}, },
// layoutInit() { // layoutInit() {
// const searchFilterHeight = this.$refs.searchFilter.offsetHeight; // const searchFilterHeight = this.$refs.searchFilter.offsetHeight;
@ -368,13 +307,10 @@ export default {
} }
}); });
}, },
// async getRowData(data) { async getRowData(data) {
async getRowData() {
console.log("something")
this.setPageData({ this.setPageData({
// rowGridSelectKey: data.rowKey, rowGridSelectKey: data.rowKey,
rowGridSelectKey: 1, rowGridSelectData: data,
rowGridSelectData: fakeRowData,
}); });
}, },
compareData(type, newDt) { compareData(type, newDt) {
@ -481,86 +417,16 @@ const defaultData = {
}, },
}; };
const dataMockExample = [
{
batchLogSeq: 1,
batchId: 'BATCH001',
batchNm: '일일 데이터 백업',
execDt: '2025-07-15',
execRsltCd: '1', // sẽ được formatter thành "성공" hoặc tương tự
execLogCont: '백업 완료. 오류 없음.',
batchStrtDttm: '2025-07-15 01:00:00',
batchEndDttm: '2025-07-15 01:30:00',
regUserNo: 'admin01',
regDttm: '2025-07-15 01:00:00',
procUserNo: 'admin02',
procDttm: '2025-07-15 01:35:00',
},
{
batchLogSeq: 2,
batchId: 'BATCH002',
batchNm: '월간 리포트 생성',
execDt: '2025-07-01',
execRsltCd: '2',
execLogCont: '리포트 생성 중 오류 발생: 파일 접근 실패.',
batchStrtDttm: '2025-07-01 03:00:00',
batchEndDttm: '2025-07-01 03:10:00',
regUserNo: 'reportUser',
regDttm: '2025-07-01 03:00:00',
procUserNo: 'admin03',
procDttm: '2025-07-01 03:15:00',
},
{
batchLogSeq: 3,
batchId: 'BATCH003',
batchNm: '사용자 통계 갱신',
execDt: '2025-07-14',
execRsltCd: '1',
execLogCont: '통계 갱신 완료.',
batchStrtDttm: '2025-07-14 23:00:00',
batchEndDttm: '2025-07-14 23:20:00',
regUserNo: 'statUser',
regDttm: '2025-07-14 23:00:00',
procUserNo: 'admin01',
procDttm: '2025-07-14 23:25:00',
},
];
const fakeRowData = {
rowKey: 1,
batchLogSeq: 1,
batchId: 'BATCH001',
batchNm: '일일 데이터 백업',
execDt: '2025-07-15',
execRsltCd: '1',
execLogCont: JSON.stringify({
session: {
userNo: 'admin01',
userNm: '관리자',
comId: 'SKCC',
locale: 'ko_KR',
},
batch: {
comId: 'SKCC',
totStdDt: '20230110',
},
}),
batchStrtDttm: '2025-07-15 01:00:00',
batchEndDttm: '2025-07-15 01:30:00',
regUserNo: 'admin01',
regDttm: '2025-07-15 01:00:00',
procUserNo: 'admin02',
procDttm: '2025-07-15 01:35:00',
};
const myDetail = [ const myDetail = [
{ {
type: 'TextArea', type: 'TextArea',
valueNm: 'execLogCont', valueNm: 'execLogCont',
readonly: true, readonly: true,
cols: 12, cols: 12,
class: 'py-2 transparent', class: 'py-2',
}, },
]; ];
</script> </script>
<style lang="scss">
@import '@/assets/scss/common.scss';
</style>

View File

@ -1,65 +1,33 @@
<template> <template>
<div class="l-layout"> <div class="l-layout">
<PageTitle text="공통코드" />
<v-row ref="searchFilter"> <v-row ref="searchFilter">
<v-col :cols="12"> <v-col :cols="12">
<v-card class="searchFilter"> <v-card class="searchFilter">
<v-row align="center" no-gutters> <v-row align="center" no-gutters>
<v-col :cols="3"> <v-col :cols="4">
<component <component
:is="'selectCodeList'" :is="'selectCodeList'"
:parentPrgmId="myPrgmId" :parentPrgmId="myPrgmId"
:label="'시스템구분'" :label="'시스템구분'"
dataKey="sysDivCd" dataKey="sysDivCd"
:labelCols="12"
:textCols="12"
:sendParam="{ commGrpCd: 'CO_SYSDIV', useFg: '1' }" :sendParam="{ commGrpCd: 'CO_SYSDIV', useFg: '1' }"
:addAll="true" :addAll="true"
customClass="select-large"
/> />
</v-col> </v-col>
<v-col :cols="3"> <v-col :cols="4">
<component <component
:is="'selectCodeList'" :is="'selectCodeList'"
:parentPrgmId="myPrgmId" :parentPrgmId="myPrgmId"
:label="'사용여부'" :label="'사용여부'"
:labelCols="12"
:textCols="12"
:dataKey="'useFg'" :dataKey="'useFg'"
customClass="select-large"
:sendParam="{ commGrpCd: 'CO_USEFG', useFg: '1' }" :sendParam="{ commGrpCd: 'CO_USEFG', useFg: '1' }"
/> />
</v-col> </v-col>
<v-col :cols="3"> <v-col :cols="4" class="text-right">
<InputText <BtnSearch @click="search" />
:parentPrgmId="myPrgmId"
label="그룹코드"
valueNm="commGrpCd"
:searchOption="true"
:labelCols="12"
:textCols="12"
customClass="input-large"
/>
</v-col>
<v-col :cols="3">
<InputText
:parentPrgmId="myPrgmId"
label="그룹코드명"
valueNm="commGrpCdNm"
:searchOption="true"
:labelCols="12"
:textCols="12"
customClass="input-large"
/>
</v-col>
<v-col :cols="12" class="text-right">
<BtnSearch style="margin-top:20px" @click="search" />
</v-col> </v-col>
</v-row> </v-row>
<!-- <v-row align="center" no-gutters> <v-row align="center" no-gutters>
<v-col :cols="4"> <v-col :cols="4">
<InputText <InputText
:parentPrgmId="myPrgmId" :parentPrgmId="myPrgmId"
@ -80,7 +48,7 @@
:textCols="8" :textCols="8"
/> />
</v-col> </v-col>
</v-row> --> </v-row>
</v-card> </v-card>
</v-col> </v-col>
</v-row> </v-row>
@ -117,7 +85,7 @@
<v-card class="pb-5"> <v-card class="pb-5">
<v-card-title>공통그룹코드 상세</v-card-title> <v-card-title>공통그룹코드 상세</v-card-title>
<div class="px-5" style="height:calc(100% - 70px)"> <div class="px-5" style="height:calc(100% - 70px)">
<v-tabs v-model="tab" > <v-tabs v-model="tab" :hide-slider="true">
<v-tab <v-tab
v-for="item in items" v-for="item in items"
:key="item.id" :key="item.id"
@ -164,7 +132,6 @@ import Form from '~/components/common/form/Form';
import CommCdTab from '@/components/pages/comm/CommCdTab'; import CommCdTab from '@/components/pages/comm/CommCdTab';
import Grid from '~/components/common/Grid'; import Grid from '~/components/common/Grid';
import Utility from '~/plugins/utility'; import Utility from '~/plugins/utility';
import PageTitle from "~/components/common/PageTitle";
let myTitle; let myTitle;
let myPrgmId; let myPrgmId;
@ -191,7 +158,6 @@ export default {
Form, Form,
CommCdTab, CommCdTab,
Grid, Grid,
PageTitle
}, },
data() { data() {
return { return {
@ -263,9 +229,6 @@ export default {
const myOptions = { const myOptions = {
scrollX: false, scrollX: false,
header: {
height: 38,
},
}; };
this.setGridOption({ this.setGridOption({
gridKey: this.gridName, gridKey: this.gridName,
@ -278,7 +241,7 @@ export default {
{ {
header: '시스템구분', header: '시스템구분',
name: 'sysDivCd', name: 'sysDivCd',
align: 'left', align: 'center',
formatter({ value }) { formatter({ value }) {
let commCdNm = ''; let commCdNm = '';
if (sysCdList.length > 0) { if (sysCdList.length > 0) {
@ -315,7 +278,7 @@ export default {
{ {
header: '사용여부', header: '사용여부',
name: 'useFg', name: 'useFg',
align: 'left', align: 'center',
formatter({ value }) { formatter({ value }) {
const newValue = _this.pageData.useFgList.filter( const newValue = _this.pageData.useFgList.filter(
item => item.commCd == value, item => item.commCd == value,
@ -591,10 +554,7 @@ const myDetail = [
valueNm: 'commGrpCd', valueNm: 'commGrpCd',
disabled: true, disabled: true,
cols: 6, cols: 6,
labelCols: 12, class: 'py-2',
textCols: 12,
iconShow: true,
class: 'py-2 pr-2',
required: true, required: true,
}, },
{ {
@ -603,10 +563,7 @@ const myDetail = [
valueNm: 'commGrpNm', valueNm: 'commGrpNm',
disabled: false, disabled: false,
cols: 6, cols: 6,
labelCols: 12, class: 'py-2',
textCols: 12,
iconShow: true,
class: 'py-2 pl-2',
required: true, required: true,
}, },
{ {
@ -615,10 +572,7 @@ const myDetail = [
valueNm: 'sysDivCd', valueNm: 'sysDivCd',
disabled: false, disabled: false,
cols: 6, cols: 6,
labelCols: 12, class: 'py-2',
textCols: 12,
iconShow: true,
class: 'py-2 pr-2 mt-3',
list: 'sysDivCdList', list: 'sysDivCdList',
itemText: 'commCdNm', itemText: 'commCdNm',
itemValue: 'commCd', itemValue: 'commCd',
@ -630,10 +584,7 @@ const myDetail = [
valueNm: 'useFg', valueNm: 'useFg',
disabled: false, disabled: false,
cols: 6, cols: 6,
labelCols: 12, class: 'py-2',
textCols: 12,
iconShow: true,
class: 'py-2 pl-2 mt-10',
value: { '1': true, '0': false }, value: { '1': true, '0': false },
required: true, required: true,
}, },
@ -643,10 +594,7 @@ const myDetail = [
valueNm: 'rmrk', valueNm: 'rmrk',
disabled: false, disabled: false,
cols: 6, cols: 6,
labelCols: 12, class: 'py-2',
textCols: 12,
iconShow: true,
class: 'py-2 pr-2 mt-3',
}, },
]; ];
</script> </script>

View File

@ -344,7 +344,7 @@
<v-row> <v-row>
<v-col cols="auto" style="text-align: left"> <v-col cols="auto" style="text-align: left">
<!-- <p class="textInfo">{{ ngDtlCnt }}</p> --> <!-- <p class="textInfo">{{ ngDtlCnt }}</p> -->
<p class="card-text-info">{{ ngDtlCnt }}</p> <p class="card-text-info">200</p>
</v-col> </v-col>
<v-col :cols="3" style="text-align: left"> </v-col> <v-col :cols="3" style="text-align: left"> </v-col>
</v-row> </v-row>
@ -369,7 +369,7 @@
<v-row> <v-row>
<v-col cols="auto" style="text-align: left"> <v-col cols="auto" style="text-align: left">
<!-- <p class="textInfo">{{ ngDtlSolvCnt }}</p> --> <!-- <p class="textInfo">{{ ngDtlSolvCnt }}</p> -->
<p class="card-text-info">{{ ngDtlSolvCnt }}</p> <p class="card-text-info">100</p>
</v-col> </v-col>
<v-col :cols="3" style="text-align: left"> </v-col> <v-col :cols="3" style="text-align: left"> </v-col>
</v-row> </v-row>
@ -580,7 +580,11 @@ export default {
Chart, Chart,
UnusedStatPopPage, UnusedStatPopPage,
EtcStatPopPage, EtcStatPopPage,
PageTitle BtnSearch,
AntCard,
CheckBox,
RadioStandard,
PageTitle,
}, },
computed: { computed: {
...mapState({ ...mapState({
@ -603,6 +607,7 @@ export default {
// let chartOption = this.getGuageChartOption2(this.chart_01); // let chartOption = this.getGuageChartOption2(this.chart_01);
let chartOption = getGaugeChartOption({ let chartOption = getGaugeChartOption({
title: this.chart_01, title: this.chart_01,
value: 75,
isDarkMode: this.isDarkMode, isDarkMode: this.isDarkMode,
}); });
chartOption["series"][0]["data"][0].value = this.$store.state.pageData[myPrgmId][ chartOption["series"][0]["data"][0].value = this.$store.state.pageData[myPrgmId][
@ -613,6 +618,7 @@ export default {
// let chartOption3 = this.getGuageChartOption2(this.chart_03); // let chartOption3 = this.getGuageChartOption2(this.chart_03);
let chartOption3 = getGaugeChartOption({ let chartOption3 = getGaugeChartOption({
title: this.chart_03, title: this.chart_03,
value: 75,
isDarkMode: this.isDarkMode, isDarkMode: this.isDarkMode,
}); });
chartOption3["series"][0]["data"][0].value = this.$store.state.pageData[myPrgmId][ chartOption3["series"][0]["data"][0].value = this.$store.state.pageData[myPrgmId][
@ -713,9 +719,13 @@ export default {
// this.search(); // this.search();
await this.gridInit(); await this.gridInit();
await new Promise((resolve) => setTimeout(resolve, 1500)); await new Promise((resolve) => setTimeout(resolve, 1500));
await this.getTodayEfficiencyStatus();
await this.getEnrgAndCO2Data();
await this.getGridData();
if (this.$router.currentRoute.fullPath == this.myHome.root) { if (this.$router.currentRoute.fullPath == this.myHome.root) {
this.dtToday = Utility.setFormatDate(new Date(), "YYYY-MM-DD HH:mm"); this.dtToday = Utility.setFormatDate(new Date(), "YYYY-MM-DD HH:mm");
await this.getEnrgAndCO2Data(); await this.getEnrgAndCO2Data();
await this.getCompareEqpmTotData(); await this.getCompareEqpmTotData();
await this.getTodayEfficiencyStatus(); await this.getTodayEfficiencyStatus();
@ -745,7 +755,9 @@ export default {
if (this.$refs.gridParent != undefined) { if (this.$refs.gridParent != undefined) {
// gridHeight = gridHeight*0.9 // gridHeight = gridHeight*0.9
gridHeight = this.$refs.gridParent.offsetHeight - 35; gridHeight = this.$refs.gridParent.offsetHeight - 35;
// console.log("gridHeight : ", gridHeight);
} }
const myOptions = { const myOptions = {
// scrollX: false, // scrollX: false,
setScroll: true, setScroll: true,
@ -758,10 +770,12 @@ export default {
height: 38, height: 38,
}, },
}; };
this.setGridOption({ this.setGridOption({
gridKey: this.gridName, gridKey: this.gridName,
value: Object.assign(Utility.defaultGridOption(gridHeight), myOptions), value: Object.assign(Utility.defaultGridOption(gridHeight), myOptions),
}); });
let hhMapper = { let hhMapper = {
"00": "00~01", "00": "00~01",
"01": "01~02", "01": "01~02",
@ -793,7 +807,7 @@ export default {
header: "NO", header: "NO",
name: "rowNum", name: "rowNum",
width: 70, width: 70,
align: "center", align: "right",
// hidden: true, // hidden: true,
}, },
{ {
@ -841,99 +855,98 @@ export default {
}); });
this.loadGrid = true; this.loadGrid = true;
this.isGridLoading = false;
// this.getGridData(); // this.getGridData();
}, },
async getGridData() { async getGridData() {
this.loadGrid = false; this.loadGrid = false;
// console // console
const res = await this.postApiReturn({ // const res = await this.postApiReturn({
apiKey: "selectIssueGdIdxData", // apiKey: 'selectIssueGdIdxData',
resKey: "issueGdIdxData", // resKey: 'issueGdIdxData',
sendParam: {}, // sendParam: {},
});
// let fakeData = [
// {
// 'alrmKind' : "WARN",
// 'alrmMsg' : "냉동기 전류부하율이 @V1%로 높음 (평균 @V2% 대비 @V3% 낮음) -@EQPM",
// 'careStndVal' : 50,
// 'warnStndVal' : 60,
// 'eccId' : "ECC000004",
// 'eqpmGrpNm' : "냉동기저온1",
// 'eqpmGrpId' : "EQG000001",
// 'eqpmKindId' : "EKIND0001",
// 'eqpmId' : "CHI-201",
// 'eqpmNm' : "CHI-201",
// 'fabId' : "ECC000003",
// 'fabNm' : "삼천1공장",
// 'gdIdxId' : "GD00001",
// 'gdIdxNm' : "전류부하율 평균 편차",
// 'rowKey' : 0,
// 'rowNum' : 1,
// 'rowSpanMap' : {},
// 'sortKey' : 0,
// 'sortSeq' : 1,
// 'totDttm' : Utility.setFormatDate(new Date(), 'YYYY-MM-DD'),
// 'totTime' : '2022-12-20 02:43:24',
// 'totVal' : 70
// },
// {
// 'alrmKind' : "WARN",
// 'alrmMsg' : "냉동기 냉각수 유량 부하율이 @V1%로 높음 -@EQPM",
// 'careStndVal' : 70,
// 'warnStndVal' : 100,
// 'eccId' : "ECC000004",
// 'eqpmGrpNm' : "냉동기고온1",
// 'eqpmGrpId' : "EQG000001",
// 'eqpmKindId' : "EKIND0001",
// 'eqpmId' : "CHI-302",
// 'eqpmNm' : "CHI-302",
// 'fabId' : "ECC000004",
// 'fabNm' : "삼천1공장",
// 'gdIdxId' : "GD00011",
// 'gdIdxNm' : "냉각수 유량 부하율",
// 'rowKey' : 0,
// 'rowNum' : 2,
// 'rowSpanMap' : {},
// 'sortKey' : 0,
// 'sortSeq' : 1,
// 'totDttm' : Utility.setFormatDate(new Date(), 'YYYY-MM-DD'),
// 'totTime' : '2022-12-20 07:23:38',
// 'totVal' : 120
// }
// ]
// this.setGridData({
// gridKey: this.gridName,
// value: fakeData,
// }); // });
let fakeData = [
{
alrmKind: "WARN",
alrmMsg: "냉동기 전류부하율이 @V1%로 높음 (평균 @V2% 대비 @V3% 낮음) -@EQPM",
careStndVal: 50,
warnStndVal: 60,
eccId: "ECC000004",
eqpmGrpNm: "냉동기저온1",
eqpmGrpId: "EQG000001",
eqpmKindId: "EKIND0001",
eqpmId: "CHI-201",
eqpmNm: "CHI-201",
fabId: "ECC000003",
fabNm: "삼천1공장",
gdIdxId: "GD00001",
gdIdxNm: "전류부하율 평균 편차",
rowKey: 0,
rowNum: 1,
rowSpanMap: {},
sortKey: 0,
sortSeq: 1,
totDttm: Utility.setFormatDate(new Date(), "YYYY-MM-DD"),
totTime: "2022-12-20 02:43:24",
totVal: 70,
},
{
alrmKind: "WARN",
alrmMsg: "냉동기 냉각수 유량 부하율이 @V1%로 높음 -@EQPM",
careStndVal: 70,
warnStndVal: 100,
eccId: "ECC000004",
eqpmGrpNm: "냉동기고온1",
eqpmGrpId: "EQG000001",
eqpmKindId: "EKIND0001",
eqpmId: "CHI-302",
eqpmNm: "CHI-302",
fabId: "ECC000004",
fabNm: "삼천1공장",
gdIdxId: "GD00011",
gdIdxNm: "냉각수 유량 부하율",
rowKey: 0,
rowNum: 2,
rowSpanMap: {},
sortKey: 0,
sortSeq: 1,
totDttm: Utility.setFormatDate(new Date(), "YYYY-MM-DD"),
totTime: "2022-12-20 07:23:38",
totVal: 120,
},
];
this.setGridData({ this.setGridData({
gridKey: this.gridName, gridKey: this.gridName,
value: res, value: fakeData,
}); });
// this.setGridData({
// gridKey: this.gridName,
// value: res,
// });
this.loadGrid = true; this.loadGrid = true;
}, },
async getEnrgAndCO2Data() { async getEnrgAndCO2Data() {
this.loadChart_01 = false; this.loadChart_01 = false;
const res = await this.postApiReturn({ const res = [];
apiKey: "selectEnrgAndCO2Data",
resKey: "enrgAndCO2Data",
sendParam: {},
});
// ////////////////////////////////////////// // //////////////////////////////////////////
// // 시연용 data 세팅 // // 시연용 data 세팅
// res[0]['dayVal'] = 18.0; res[0] = {};
// res[0]['mnthVal'] = 507.0; res[0]["dayVal"] = 18.0;
// res[0]['planVal'] = 653.0; res[0]["mnthVal"] = 507.0;
// res[0]['co2DayVal'] = 9.0; res[0]["planVal"] = 653.0;
// res[0]['co2MnthVal'] = 238.0; res[0]["co2DayVal"] = 9.0;
// res[0]['co2PlanVal'] = 307.0; res[0]["co2MnthVal"] = 238.0;
// res[0]['co2YearVal'] = 1224.0; res[0]["co2PlanVal"] = 307.0;
// res[0]['effcRt'] = 77.59; res[0]["co2YearVal"] = 1224.0;
res[0]["effcRt"] = 77.59;
// ////////////////////////////////////////// // //////////////////////////////////////////
// 대시보드 표기 // 대시보드 표기
this.enrgUsageDayVal = this.numberFormatter( this.enrgUsageDayVal = this.numberFormatter(
parseFloat(res[0]["dayVal"]).toFixed(0) parseFloat(res[0]["dayVal"]).toFixed(0)
); );
@ -951,16 +964,20 @@ export default {
parseFloat(res[0]["co2BefMnthVal"]).toFixed(0) parseFloat(res[0]["co2BefMnthVal"]).toFixed(0)
); );
this.CO2YearVal = this.numberFormatter(parseFloat(res[0]["co2YearVal"]).toFixed(0)); this.CO2YearVal = this.numberFormatter(parseFloat(res[0]["co2YearVal"]).toFixed(0));
this.$nextTick(() => { this.$nextTick(() => {
let chartOption = null; let chartOption = null;
// chartOption = this.getGuageChartOption2(this.chart_01); // chartOption = this.getGuageChartOption2(this.chart_01);
chartOption = getGaugeChartOption({ chartOption = getGaugeChartOption({
title: "Energy Usage", title: "Energy Usage",
value: 75,
isDarkMode: this.isDarkMode, isDarkMode: this.isDarkMode,
}); });
console.log("charto:", chartOption);
chartOption["series"][0]["data"][0].value = chartOption["series"][0]["data"][0].value =
res[0]["effcRt"] != null ? res[0]["effcRt"] : 0; res[0]["effcRt"] != null ? res[0]["effcRt"] : 0;
this.$store.state.pageData[myPrgmId][this.chart_01] = chartOption; this.$store.state.pageData[myPrgmId][this.chart_01] = chartOption;
console.log("gauge chart ops:", chartOption);
// if(res[0]['effcRt'] == undefined || res[0]['effcRt'] == null){ // if(res[0]['effcRt'] == undefined || res[0]['effcRt'] == null){
// res[0]['effcRt'] = null; // res[0]['effcRt'] = null;
// } // }
@ -976,11 +993,12 @@ export default {
}, },
async getCompareEqpmTotData() { async getCompareEqpmTotData() {
this.loadChart_02 = false; this.loadChart_02 = false;
const res = await this.postApiReturn({ // const res = await this.postApiReturn({
apiKey: "selectCompareEqpmTotData", // apiKey: "selectCompareEqpmTotData",
resKey: "compareEqpmTotData", // resKey: "compareEqpmTotData",
sendParam: {}, // sendParam: {},
}); // });
const res = "abc";
this.$nextTick(() => { this.$nextTick(() => {
this.setChart02Data(res); this.setChart02Data(res);
}); });
@ -989,24 +1007,25 @@ export default {
}, },
async getTodayEfficiencyStatus() { async getTodayEfficiencyStatus() {
this.loadChart_03 = false; this.loadChart_03 = false;
const res = await this.postApiReturn({ // const res = await this.postApiReturn({
apiKey: "selectTodayEfficiencyStatus", // apiKey: 'selectTodayEfficiencyStatus',
resKey: "todayEfficiencyStatus", // resKey: 'todayEfficiencyStatus',
sendParam: {}, // sendParam: {},
}); // });
// 대시보드 표기 // 대시보드 표기
this.ngDtlCnt = this.numberFormatter(res[0]["ngDtlCnt"]); // this.ngDtlCnt = this.numberFormatter(res[0]['ngDtlCnt']);
this.ngDtlSolvCnt = this.numberFormatter(res[0]["ngDtlSolvCnt"]); // this.ngDtlSolvCnt = this.numberFormatter(res[0]['ngDtlSolvCnt']);
let effcRt = this.numberFormatter( // let effcRt = this.numberFormatter(
(res[0]["ngDtlSolvCnt"] / res[0]["ngDtlCnt"]) * 100 // (res[0]['ngDtlSolvCnt'] / res[0]['ngDtlCnt']) * 100,
); // );
// let effcRt = this.numberFormatter(78.21) let effcRt = this.numberFormatter(78.21);
this.$nextTick(() => { this.$nextTick(() => {
let chartOption = null; let chartOption = null;
// chartOption = this.getGuageChartOption2(this.chart_03); // chartOption = this.getGuageChartOption2(this.chart_03);
chartOption = getGaugeChartOption({ chartOption = getGaugeChartOption({
title: "Today Efficiency", title: "Today Efficiency",
value: 75,
isDarkMode: this.isDarkMode, isDarkMode: this.isDarkMode,
}); });
chartOption["series"][0]["data"][0].value = isNaN(effcRt) ? 0 : effcRt; chartOption["series"][0]["data"][0].value = isNaN(effcRt) ? 0 : effcRt;
@ -1018,14 +1037,15 @@ export default {
}, },
async getTodayNgTopTen() { async getTodayNgTopTen() {
this.loadChart_04 = false; this.loadChart_04 = false;
const res = await this.postApiReturn({ // const res = await this.postApiReturn({
apiKey: "selectTodayNgTopTen", // apiKey: "selectTodayNgTopTen",
resKey: "todayNgTopTen", // resKey: "todayNgTopTen",
sendParam: {}, // sendParam: {},
}); // });
this.setPageData({ const res = "abc";
chart04Data: res, // this.setPageData({
}); // chart04Data: res,
// });
this.$nextTick(() => { this.$nextTick(() => {
this.setChart04Data(res); this.setChart04Data(res);
}); });
@ -1034,11 +1054,12 @@ export default {
}, },
async getCompareEqpmTGdChart() { async getCompareEqpmTGdChart() {
this.loadChart_05 = false; this.loadChart_05 = false;
const res = await this.postApiReturn({ // const res = await this.postApiReturn({
apiKey: "selectCompareEqpmTGdChart", // apiKey: "selectCompareEqpmTGdChart",
resKey: "compareEqpmTGdChart", // resKey: "compareEqpmTGdChart",
sendParam: {}, // sendParam: {},
}); // });
const res = "aaa";
this.$nextTick(() => { this.$nextTick(() => {
this.setChart05Data(res); this.setChart05Data(res);
}); });
@ -1046,12 +1067,12 @@ export default {
this.isLine2Loading = false; this.isLine2Loading = false;
}, },
async setChart05Data(data) { async setChart05Data(data) {
if (this.$store.state.pageData[this.myPrgmId].compareEqpmTGdChart != undefined) { // if (this.$store.state.pageData[this.myPrgmId].compareEqpmTGdChart != undefined) {
this.$store.state.pageData[this.myPrgmId].compareEqpmTGdChart.series = []; // this.$store.state.pageData[this.myPrgmId].compareEqpmTGdChart.series = [];
} // }
if (!data.length) { // if (!data.length) {
return; // return;
} // }
let xAxisData = []; let xAxisData = [];
let seriesData = []; let seriesData = [];
// let legendData = { // let legendData = {
@ -1060,7 +1081,7 @@ export default {
// dayVal: "금일", // dayVal: "금일",
// }; // };
// let legendData = ["전전일", "전일", "금일"]; let legendData = ["전전일", "전일", "금일"];
let befBefValDataList = { let befBefValDataList = {
name: "전전일", name: "전전일",
@ -1088,36 +1109,37 @@ export default {
}; };
// for (var i = 0; i < data.length; i++) { // for (var i = 0; i < data.length; i++) {
//////없애야함////// //////없애야함//////
// let total = 0; let total = 0;
let hour = Utility.setFormatDate( let hour = Utility.setFormatDate(
new Date().setTime(new Date().getTime() - 1 * 60 * 60 * 1000), new Date().setTime(new Date().getTime() - 1 * 60 * 60 * 1000),
"HH" "HH"
); );
//////없애야함////// //////없애야함//////
for (var i = 0; i < 24; i++) { for (var i = 0; i < 24; i++) {
if (data[i].tm != undefined) { // if (data[i].tm != undefined) {
xAxisData.push(parseInt(data[i].tm)); // xAxisData.push(parseInt(data[i].tm));
} else { // } else {
// xAxisData.push(i);
// }
xAxisData.push(i); xAxisData.push(i);
}
// //////없애야함////// // //////없애야함//////
// let num = parseInt(Math.random() * (13 - 7) + 7); let num = parseInt(Math.random() * (13 - 7) + 7);
// let num2 = parseInt(Math.random() * (11 - 6) + 6); let num2 = parseInt(Math.random() * (11 - 6) + 6);
// let num3 = parseInt(Math.random() * (10 - 5) + 5); let num3 = parseInt(Math.random() * (10 - 5) + 5);
// let tempTotal = num + num2 + num3; let tempTotal = num + num2 + num3;
// total += tempTotal; total += tempTotal;
// let befBefVal = num; let befBefVal = num;
// let befVal = num2; let befVal = num2;
// let dayVal = num3; let dayVal = num3;
// ////////////////// // //////////////////
let befBefVal = data[i].befBefVal != undefined ? data[i].befBefVal : 0; // let befBefVal = data[i].befBefVal != undefined ? data[i].befBefVal : 0;
let befVal = data[i].befVal != undefined ? data[i].befVal : 0; // let befVal = data[i].befVal != undefined ? data[i].befVal : 0;
befBefValDataList["data"].push(befBefVal); befBefValDataList["data"].push(befBefVal);
befValDataList["data"].push(befVal); befValDataList["data"].push(befVal);
if (i <= parseInt(hour)) { if (i <= parseInt(hour)) {
let dayVal = data[i].dayVal != undefined ? data[i].dayVal : 0; // let dayVal = data[i].dayVal != undefined ? data[i].dayVal : 0;
dayValDataList["data"].push(dayVal); dayValDataList["data"].push(dayVal);
} }
} }
@ -1129,7 +1151,7 @@ export default {
var chartOption = getLineChartOption({ var chartOption = getLineChartOption({
xAxisData: xAxisData, xAxisData: xAxisData,
// legendData: legendData, legendData: legendData,
seriesData: seriesData, seriesData: seriesData,
isDarkMode: this.isDarkMode, isDarkMode: this.isDarkMode,
}); });
@ -1164,19 +1186,22 @@ export default {
// series: seriesData, // series: seriesData,
// }; // };
console.log("chart 5 data:", seriesData);
await this.$nextTick(() => {}); await this.$nextTick(() => {});
this.setChartOption({ // this.setChartOption({
chartKey: "compareEqpmTGdChart", // chartKey: "compareEqpmTGdChart",
value: chartOption, // value: chartOption,
}); // });
this.$store.state.pageData[myPrgmId]["compareEqpmTGdChart"] = chartOption;
}, },
async setChart04Data(data) { async setChart04Data(data) {
if (this.$store.state.pageData[this.myPrgmId].todayNgTopTen != undefined) { // if (this.$store.state.pageData[this.myPrgmId].todayNgTopTen != undefined) {
this.$store.state.pageData[this.myPrgmId].todayNgTopTen.series = []; // this.$store.state.pageData[this.myPrgmId].todayNgTopTen.series = [];
} // }
if (!data.length) { // if (!data.length) {
return; // return;
} // }
let seriesData = [ let seriesData = [
{ {
type: "pie", type: "pie",
@ -1194,52 +1219,51 @@ export default {
}, },
]; ];
let pidChartdata = []; let pidChartdata = [];
for (var i = 0; i < data.length; i++) { // for (var i = 0; i < data.length; i++) {
if (data[i].eqpmId != undefined) { // if (data[i].eqpmId != undefined) {
pidChartdata.push({
value: data[i]["ngDtlCnt"],
name: data[i]["eqpmId"],
groupId: data[i]["eqpmNm"],
});
}
}
// let eqpmNmList = [
// 'CHI-202',
// 'CHI-201',
// 'UT_LT_CH101',
// 'UT_LT_CH102',
// 'UT_LT_CH103',
// 'UT_LT_CH104',
// 'UT_LT_CH105',
// 'U-CH-013',
// 'U-CH-014',
// 'U-CH-015',
// 'U-CH-016',
// 'U-CH-017',
// 'U-CH-018',
// 'U-CH-019',
// 'U-CH-015B',
// 'U-CH-015C',
// 'U-CH-015D',
// 'U-CH-015E',
// 'UT_HT_CT101',
// 'UT_HT_CT102',
// 'UT_HT_CT103',
// 'UT_HT_CP101',
// 'VCB_A',
// 'U-CH-012',
// 'U-CH-015F',
// 'U-CH-016A',
// ]
// for(var i=1; i<21; i++){
// pidChartdata.push({ // pidChartdata.push({
// // value: data[i]['ngDtlCnt'], // value: data[i]["ngDtlCnt"],
// value: i+parseInt(Math.random()*(9-5)+5), // name: data[i]["eqpmId"],
// name: eqpmNmList[i], // groupId: data[i]["eqpmNm"],
// groupId: eqpmNmList[i]
// }); // });
// } // }
// }
let eqpmNmList = [
"CHI-202",
"CHI-201",
"UT_LT_CH101",
"UT_LT_CH102",
"UT_LT_CH103",
"UT_LT_CH104",
"UT_LT_CH105",
"U-CH-013",
"U-CH-014",
"U-CH-015",
"U-CH-016",
"U-CH-017",
"U-CH-018",
"U-CH-019",
"U-CH-015B",
"U-CH-015C",
"U-CH-015D",
"U-CH-015E",
"UT_HT_CT101",
"UT_HT_CT102",
"UT_HT_CT103",
"UT_HT_CP101",
"VCB_A",
"U-CH-012",
"U-CH-015F",
"U-CH-016A",
];
for (var i = 1; i < 21; i++) {
pidChartdata.push({
// value: data[i]['ngDtlCnt'],
value: i + parseInt(Math.random() * (9 - 5) + 5),
name: eqpmNmList[i],
groupId: eqpmNmList[i],
});
}
seriesData[0]["data"] = [...pidChartdata]; seriesData[0]["data"] = [...pidChartdata];
var chartOption = { var chartOption = {
grid: { grid: {
@ -1269,15 +1293,17 @@ export default {
series: seriesData, series: seriesData,
}; };
await this.$nextTick(() => {}); await this.$nextTick(() => {});
this.setChartOption({ chartKey: "todayNgTopTen", value: chartOption }); // this.setChartOption({ chartKey: "todayNgTopTen", value: chartOption });
this.$store.state.pageData[myPrgmId]["todayNgTopTen"] = chartOption;
this.$store.state.pageData[myPrgmId]["chart04Data"] = chartOption;
}, },
async setChart02Data(data) { async setChart02Data(data) {
if (this.$store.state.pageData[this.myPrgmId].compareEqpmTotChart != undefined) { // if (this.$store.state.pageData[this.myPrgmId].compareEqpmTotChart != undefined) {
this.$store.state.pageData[this.myPrgmId].compareEqpmTotChart.series = []; // this.$store.state.pageData[this.myPrgmId].compareEqpmTotChart.series = [];
} // }
if (!data.length) { // if (!data.length) {
return; // return;
} // }
let xAxisData = []; let xAxisData = [];
let seriesData = []; let seriesData = [];
// let legendMapper = { // let legendMapper = {
@ -1285,6 +1311,7 @@ export default {
// 'befVal' : '전일', // 'befVal' : '전일',
// 'dayVal' : '금일' // 'dayVal' : '금일'
// } // }
let legendData = ["전전일", "전일", "금일"];
let befBefValDataList = { let befBefValDataList = {
name: "전전일", name: "전전일",
type: "line", type: "line",
@ -1309,38 +1336,82 @@ export default {
lineStyle: { width: 2 }, lineStyle: { width: 2 },
data: [], data: [],
}; };
// for (var i = 0; i < data.length; i++) { // // for (var i = 0; i < data.length; i++) {
let hour = Utility.setFormatDate( let hour = Utility.setFormatDate(
new Date().setTime(new Date().getTime() - 1 * 60 * 60 * 1000), new Date().setTime(new Date().getTime() - 1 * 60 * 60 * 1000),
"HH" "HH"
); );
// for (var i = 0; i < 24; i++) {
// if (data[i].tm != undefined) {
// xAxisData.push(parseInt(data[i].tm));
// } else {
// xAxisData.push(i);
// }
// //////없애야함//////
for (var i = 0; i < 24; i++) { for (var i = 0; i < 24; i++) {
if (data[i].tm != undefined) {
xAxisData.push(parseInt(data[i].tm));
} else {
xAxisData.push(i); xAxisData.push(i);
}
//////없애야함//////
// let num = parseInt(Math.random() * (13 - 10) + 10).toString().padStart(2, '0'); let num = parseInt(Math.random() * (13 - 10) + 10)
// let num2 = parseInt(Math.random() * (9 - 1) + 1).toString().padStart(2, '0'); .toString()
// let num3 = parseInt(Math.random() * (13 - 10) + 10).toString().padStart(2, '0'); .padStart(2, "0");
// let num4 = parseInt(Math.random() * (9 - 1) + 1).toString().padStart(2, '0'); let num2 = parseInt(Math.random() * (9 - 1) + 1)
// let num5 = parseInt(Math.random() * (13 - 10) + 10).toString().padStart(2, '0'); .toString()
// let num6 = parseInt(Math.random() * (9 - 1) + 1).toString().padStart(2, '0'); .padStart(2, "0");
let num3 = parseInt(Math.random() * (13 - 10) + 10)
.toString()
.padStart(2, "0");
let num4 = parseInt(Math.random() * (9 - 1) + 1)
.toString()
.padStart(2, "0");
let num5 = parseInt(Math.random() * (13 - 10) + 10)
.toString()
.padStart(2, "0");
let num6 = parseInt(Math.random() * (9 - 1) + 1)
.toString()
.padStart(2, "0");
let befBefVal = num + num2;
let befVal = num3 + num4;
let dayVal = num5 + num6;
befBefValDataList["data"].push(befBefVal);
befValDataList["data"].push(befVal);
if (i <= parseInt(hour)) {
// let dayVal = data[i].dayVal != undefined ? data[i].dayVal : 0;
dayValDataList["data"].push(dayVal);
}
}
// let num = parseInt(Math.random() * (13 - 10) + 10)
// .toString()
// .padStart(2, "0");
// let num2 = parseInt(Math.random() * (9 - 1) + 1)
// .toString()
// .padStart(2, "0");
// let num3 = parseInt(Math.random() * (13 - 10) + 10)
// .toString()
// .padStart(2, "0");
// let num4 = parseInt(Math.random() * (9 - 1) + 1)
// .toString()
// .padStart(2, "0");
// let num5 = parseInt(Math.random() * (13 - 10) + 10)
// .toString()
// .padStart(2, "0");
// let num6 = parseInt(Math.random() * (9 - 1) + 1)
// .toString()
// .padStart(2, "0");
// let befBefVal = num + num2; // let befBefVal = num + num2;
// let befVal = num3 + num4; // let befVal = num3 + num4;
// let dayVal = num5 + num6; // let dayVal = num5 + num6;
// //////없애야함////// // //////없애야함//////
let befBefVal = data[i].befBefVal != undefined ? data[i].befBefVal : 0; // let befBefVal = data[i].befBefVal != undefined ? data[i].befBefVal : 0;
let befVal = data[i].befVal != undefined ? data[i].befVal : 0; // let befVal = data[i].befVal != undefined ? data[i].befVal : 0;
befBefValDataList["data"].push(befBefVal); // befBefValDataList["data"].push(befBefVal);
befValDataList["data"].push(befVal); // befValDataList["data"].push(befVal);
if (i <= parseInt(hour)) { // if (i <= parseInt(hour)) {
let dayVal = data[i].dayVal != undefined ? data[i].dayVal : 0; // let dayVal = data[i].dayVal != undefined ? data[i].dayVal : 0;
dayValDataList["data"].push(dayVal); // dayValDataList["data"].push(dayVal);
} // }
} // }
seriesData = [befBefValDataList, befValDataList, dayValDataList]; seriesData = [befBefValDataList, befValDataList, dayValDataList];
// seriesData = [ // seriesData = [
@ -1362,7 +1433,7 @@ export default {
// ]; // ];
var chartOption = getLineChartOption({ var chartOption = getLineChartOption({
xAxisData: xAxisData, xAxisData: xAxisData,
// legendData: legendData, legendData: legendData,
seriesData: seriesData, seriesData: seriesData,
isDarkMode: this.isDarkMode, isDarkMode: this.isDarkMode,
}); });
@ -1397,10 +1468,12 @@ export default {
// series: seriesData, // series: seriesData,
// }; // };
await this.$nextTick(() => {}); await this.$nextTick(() => {});
this.setChartOption({ this.$store.state.pageData[myPrgmId][this.chart_02] = chartOption;
chartKey: "compareEqpmTotChart",
value: chartOption, // this.setChartOption({
}); // chartKey: "compareEqpmTotChart",
// value: chartOption,
// });
}, },
getGuageChartOption(chartName) { getGuageChartOption(chartName) {
const gaugeColors = [ const gaugeColors = [
@ -1433,8 +1506,8 @@ export default {
splitNumber: 10, splitNumber: 10,
itemStyle: { itemStyle: {
// color: '#FFAB91' // color: '#FFAB91'
color: "auto", // color: 'auto',
// color:gaugeColors color: gaugeColors,
}, },
progress: { progress: {
// show: true, // show: true,
@ -1445,8 +1518,8 @@ export default {
// show: false // show: false
show: true, show: true,
itemStyle: { itemStyle: {
// color: '#FFAB91', color: "#FFAB91",
color: "auto", // color: 'auto',
}, },
}, },
axisLine: { axisLine: {
@ -1492,12 +1565,140 @@ export default {
fontSize: 15, fontSize: 15,
// fontSize: 20, // fontSize: 20,
fontWeight: "bolder", fontWeight: "bolder",
formatter: "{value} %", formatter: "30%",
color: "auto", color: "auto",
}, },
data: [ data: [
{ {
value: NaN, name: "new",
value: 344,
},
],
},
],
};
return guageChartOption;
},
getGuageChartOption2(chartName) {
const gaugeColors = [
[0, "#ed1c24"],
[0.6, "#ed1c24"],
[0.8, "#f7931e"],
[1.0, "#009245"],
];
const gaugeColors2 = [
[0, "#009245"],
[0.6, "#009245"],
[0.8, "#f7931e"],
[1.0, "#ed1c24"],
];
var guageChartOption = {
grid: {
// top: '-10%',
bottom: 0,
},
title: {},
graphic: [
{
type: "circle",
left: "center",
top: "center",
shape: {
r: 97, // radius of the background circle
},
style: {
fill: this.isDarkMode ? "#141415" : "#F5F5F5", // Light grey color
opacity: 0.3, // Semi-transparent
},
z: 0, // make sure it's behind the gauge
},
],
series: [
{
type: "gauge",
radius: "90%",
startAngle: 225,
endAngle: -45,
min: 0,
max: 160,
// progress: {
// show: true,
// width: 15,
// },
axisLine: {
lineStyle: {
width: 12,
color: [
[0.375, "#3CB371"], // Green (060)
[0.5, "#FFD700"], // Yellow (6080)
[0.625, "#FFA500"], // Orange (80100)
[1, "#FF4500"], // Red (100160)
],
},
},
axisTick: {
distance: -5,
length: 5,
lineStyle: {
color: "#000000",
width: 1,
},
},
splitLine: {
distance: -12,
length: 8,
lineStyle: {
color: "#000000",
width: 2,
},
},
axisLabel: {
color: this.isDarkMode ? "#fff" : "#333333",
distance: 23,
fontSize: 9,
},
pointer: {
show: true,
length: "70%",
width: 6,
itemStyle: {
color: "#FA8C16", // Set your desired pointer color here
},
},
title: {
show: false,
offsetCenter: [0, "40%"],
fontSize: 18,
},
detail: {
valueAnimation: true,
fontWeight: 500, // or "normal", "lighter", "bolder", or a number like 600
fontFamily: "Oxanium, sans-serif", // or any custom font
fontSize: 30,
lineHeight: 25,
offsetCenter: [0, "60%"],
color: this.isDarkMode ? "#fff" : "#333333",
formatter: function (value) {
return `{valueStyle|${value}}\n{percentStyle|%}`;
},
rich: {
// valueStyle: {
// fontSize: 25,
// fontWeight: "bold",
// },
percentStyle: {
fontSize: 10,
color: this.isDarkMode ? "#fff" : "#333333",
// fontWeight: "normal",
},
},
},
data: [
{
value: 16,
name: "에너지사용효율", // "Energy Usage Efficiency"
}, },
], ],
}, },
@ -1646,6 +1847,7 @@ export default {
}[state]; }[state];
}, },
chartClickEvent(argData, $event) { chartClickEvent(argData, $event) {
// console.log('chartClickEvent', argData);
let pageMapper = { let pageMapper = {
dashBoard_enrgUsageGauge: { dashBoard_enrgUsageGauge: {
pageName: "ems-effc-EnrgUseTotSummPage", pageName: "ems-effc-EnrgUseTotSummPage",
@ -1707,18 +1909,32 @@ export default {
}); });
}, },
topTenChartClickEvent(event) { topTenChartClickEvent(event) {
let chartData = this.pageData.chart04Data; // let chartData = this.pageData.chart04Data;
// let chartData = this.$store.state.pageData[myPrgmId][this.chart_04]['series'][0]['data'] // console.log("chart data first", this.pageData);
let chartData = this.$store.state.pageData[myPrgmId][this.chart_04]["series"][0][
"data"
];
console.log("select equipment", event["data"]["groupId"]);
let selectedChartData = chartData.filter((item) => { let selectedChartData = chartData.filter((item) => {
return item.eqpmId == event["data"]["groupId"]; return item.eqpmId == event["data"]["groupId"];
}); });
var data = { console.log("chart data", selectedChartData);
// var data = {
// cmCycle: "CYC_DAY",
// fromDt: Utility.setFormatDate(new Date(), "YYYY-MM-DD HH:mm"),
// fabId: selectedChartData[0].fabId,
// eqpmKindId: selectedChartData[0].eqpmKindId,
// eqpmGrpId: selectedChartData[0].eqpmGrpId,
// eqpmId: selectedChartData[0].eqpmId,
// };
var fake_data = {
cmCycle: "CYC_DAY", cmCycle: "CYC_DAY",
fromDt: Utility.setFormatDate(new Date(), "YYYY-MM-DD HH:mm"), fromDt: Utility.setFormatDate(new Date(), "YYYY-MM-DD HH:mm"),
fabId: selectedChartData[0].fabId, fabId: 4555,
eqpmKindId: selectedChartData[0].eqpmKindId, eqpmKindId: 99988,
eqpmGrpId: selectedChartData[0].eqpmGrpId, eqpmGrpId: 88888,
eqpmId: selectedChartData[0].eqpmId, eqpmId: 99900,
}; };
var key = "tick_" + Math.random(); var key = "tick_" + Math.random();
this.$router.push({ this.$router.push({
@ -1728,7 +1944,8 @@ export default {
// tick:key // tick:key
}, },
params: { params: {
...data, // ...data,
...fake_data,
key: key, key: key,
}, },
}); });

View File

@ -12,7 +12,6 @@
:textCols="12" :textCols="12"
:labelCols="12" :labelCols="12"
:parentPrgmId="myPrgmId" :parentPrgmId="myPrgmId"
:customClass="'select-large'"
/> />
</v-col> </v-col>
<v-col :cols="3"> <v-col :cols="3">
@ -23,7 +22,6 @@
dataKey="searchErcKind" dataKey="searchErcKind"
:sendParam="{ commGrpCd: 'EM_ERCKIND', useFg: '1' }" :sendParam="{ commGrpCd: 'EM_ERCKIND', useFg: '1' }"
:addAll="true" :addAll="true"
:customClass="'select-large'"
/> />
</v-col> </v-col>
<v-col :cols="3"> <v-col :cols="3">
@ -36,9 +34,13 @@
:addAll="true" :addAll="true"
:textCols="12" :textCols="12"
:labelCols="12" :labelCols="12"
:customClass="'select-large'"
/> />
</v-col> </v-col>
<v-col :cols="3" class="text-right">
<BtnSearch @click="search" />
</v-col>
</v-row>
<v-row align="center" no-gutters>
<v-col :cols="3"> <v-col :cols="3">
<component <component
:is="'selectCodeList'" :is="'selectCodeList'"
@ -47,11 +49,8 @@
dataKey="searchChrgKind" dataKey="searchChrgKind"
:sendParam="{ commGrpCd: 'EM_ENGCHAGKIND', useFg: '1' }" :sendParam="{ commGrpCd: 'EM_ENGCHAGKIND', useFg: '1' }"
:addAll="true" :addAll="true"
:customClass="'select-large'"
/> />
</v-col> </v-col>
</v-row>
<v-row align="center" no-gutters>
<v-col :cols="3"> <v-col :cols="3">
<component <component
:is="'selectCodeList'" :is="'selectCodeList'"
@ -60,7 +59,6 @@
dataKey="useFg" dataKey="useFg"
:sendParam="{ commGrpCd: 'CO_USEFG', useFg: '1' }" :sendParam="{ commGrpCd: 'CO_USEFG', useFg: '1' }"
:addAll="true" :addAll="true"
:customClass="'select-large'"
/> />
</v-col> </v-col>
<v-col :cols="3"> <v-col :cols="3">
@ -71,14 +69,8 @@
:textCols="12" :textCols="12"
:labelCols="12" :labelCols="12"
:searchOption="true" :searchOption="true"
:customClass="'input-large'"
/> />
</v-col> </v-col>
<v-col :cols="3">
</v-col>
<v-col :cols="3" class="text-right">
<BtnSearch :size="'default'" @click="search" />
</v-col>
</v-row> </v-row>
</v-card> </v-card>
</v-col> </v-col>
@ -331,9 +323,6 @@ export default {
columnOptions: { columnOptions: {
resizable: true, resizable: true,
}, },
header: {
height: 38,
},
}; };
this.setGridOption({ this.setGridOption({
gridKey: this.gridName, gridKey: this.gridName,
@ -343,12 +332,12 @@ export default {
const _this = this; const _this = this;
const myColumns = [ const myColumns = [
{ header: '회사 ID', name: 'comId', hidden: true }, { header: '회사 ID', name: 'comId', hidden: true },
{ header: '에너지원ID', name: 'ercId', width: 120, align: 'left' }, { header: '에너지원ID', name: 'ercId', width: 120, align: 'center' },
{ header: '에너지원명', name: 'ercNm', align: 'left' }, { header: '에너지원명', name: 'ercNm', align: 'left' },
{ {
header: '에너지원 유형', header: '에너지원 유형',
name: 'ercKind', name: 'ercKind',
align: 'left', align: 'center',
formatter({ value }) { formatter({ value }) {
let retVal = ''; let retVal = '';
const newValue = _this.pageData.ercKindList.filter( const newValue = _this.pageData.ercKindList.filter(
@ -461,7 +450,7 @@ export default {
header: '사용 여부', header: '사용 여부',
name: 'useFg', name: 'useFg',
width: 95, width: 95,
align: 'left', align: 'center',
formatter({ value }) { formatter({ value }) {
value = value === true ? '1' : '0'; value = value === true ? '1' : '0';
const newValue = _this.pageData.useFgList.filter( const newValue = _this.pageData.useFgList.filter(
@ -490,24 +479,74 @@ export default {
this.loadGrid = true; this.loadGrid = true;
}, },
async getRowGridData() { async getRowGridData() {
let res = []; let res = [
{
if (this.pageData.blocMstrList.length > 0) { "comId": "COM001",
res = await this.postApiReturn({ "ercId": "ERC001",
apiKey: 'selectErcInfo', "ercNm": "LNG 가스",
resKey: 'ercInfoData', "ercKind": "GAS",
sendParam: { "readObjId": "READ001",
blocId: this.pageData.blocMstrList[this.pageData.blocId].blocId, "readPlcId": "PLC001",
ercKind: this.pageData.searchErcKind, "chrgKind": "FIXED",
readObjId: this.pageData.searchReadObj, "unitPrce": 120.5,
chrgKind: this.pageData.searchChrgKind, "prceFg": "1",
useFg: this.pageData.useFg, "peakPow": 500,
ercNmLike: this.pageData.ercNm, "elecContId": "EC001",
"elecContNm": "계약A",
"blocId": "BLOC001",
"useFg": true
}, },
}); {
} else { "comId": "COM002",
this.setPageData({ isFind: false }); "ercId": "ERC002",
"ercNm": "태양광",
"ercKind": "ELEC",
"readObjId": "READ002",
"readPlcId": "PLC002",
"chrgKind": "VARIABLE",
"unitPrce": 95.0,
"prceFg": "0",
"peakPow": 300,
"elecContId": "EC002",
"elecContNm": "계약B",
"blocId": "BLOC002",
"useFg": false
},
{
"comId": "COM003",
"ercId": "ERC003",
"ercNm": "지열",
"ercKind": "HEAT",
"readObjId": "READ003",
"readPlcId": "PLC003",
"chrgKind": "FIXED",
"unitPrce": 110.0,
"prceFg": "1",
"peakPow": 450,
"elecContId": "EC003",
"elecContNm": "계약C",
"blocId": "BLOC003",
"useFg": true
} }
]
;
// if (this.pageData.blocMstrList.length > 0) {
// res = await this.postApiReturn({
// apiKey: 'selectErcInfo',
// resKey: 'ercInfoData',
// sendParam: {
// blocId: this.pageData.blocMstrList[this.pageData.blocId].blocId,
// ercKind: this.pageData.searchErcKind,
// readObjId: this.pageData.searchReadObj,
// chrgKind: this.pageData.searchChrgKind,
// useFg: this.pageData.useFg,
// ercNmLike: this.pageData.ercNm,
// },
// });
// } else {
// this.setPageData({ isFind: false });
// }
const newRes = res.map(item => { const newRes = res.map(item => {
const newObj = { const newObj = {
...item, ...item,
@ -759,8 +798,133 @@ const defaultData = {
/* data 세팅 */ /* data 세팅 */
// 로컬 gridName 값과 동일한 이름으로 세팅 // 로컬 gridName 값과 동일한 이름으로 세팅
rowGrid: { rowGrid: {
data: [], data: [
column: [], // myColumns, {
"comId": "COM001",
"ercId": "ERC001",
"ercNm": "LNG 가스",
"ercKind": "GAS",
"readObjId": "READ001",
"readPlcId": "PLC001",
"chrgKind": "FIXED",
"unitPrce": 120.5,
"prceFg": "1",
"peakPow": 500,
"elecContId": "EC001",
"elecContNm": "계약A",
"blocId": "BLOC001",
"useFg": true
},
{
"comId": "COM002",
"ercId": "ERC002",
"ercNm": "태양광",
"ercKind": "ELEC",
"readObjId": "READ002",
"readPlcId": "PLC002",
"chrgKind": "VARIABLE",
"unitPrce": 95.0,
"prceFg": "0",
"peakPow": 300,
"elecContId": "EC002",
"elecContNm": "계약B",
"blocId": "BLOC002",
"useFg": false
},
{
"comId": "COM003",
"ercId": "ERC003",
"ercNm": "지열",
"ercKind": "HEAT",
"readObjId": "READ003",
"readPlcId": "PLC003",
"chrgKind": "FIXED",
"unitPrce": 110.0,
"prceFg": "1",
"peakPow": 450,
"elecContId": "EC003",
"elecContNm": "계약C",
"blocId": "BLOC003",
"useFg": true
}
],
column: [
{ header: '회사 ID', name: 'comId', hidden: true },
{ header: '에너지원ID', name: 'ercId', width: 120, align: 'center' },
{ header: '에너지원명', name: 'ercNm', align: 'left' },
{
header: '에너지원 유형',
name: 'ercKind',
align: 'center',
},
{
header: '검침대상',
name: 'readObjId',
align: 'left',
},
{
header: '검침 개소 ID',
name: 'readPlcId',
width: 80,
align: 'center',
hidden: true,
},
{
header: '고지 유형',
name: 'chrgKind',
width: 80,
align: 'center',
hidden: true,
},
{
header: '기본단가',
name: 'unitPrce',
width: 100,
align: 'right',
hidden: true,
},
{
header: '단가 사용여부',
name: 'prceFg',
width: 100,
align: 'center',
hidden: true,
},
{
header: '피크 전력',
name: 'peakPow',
width: 100,
align: 'right',
hidden: true,
},
{
header: '전력 계약',
name: 'elecContId',
width: 100,
align: 'center',
hidden: true,
},
{
header: '전력 계약',
name: 'elecContNm',
width: 100,
align: 'center',
hidden: true,
},
{
header: '사업장',
name: 'blocId',
width: 100,
align: 'center',
hidden: true,
},
{
header: '사용 여부',
name: 'useFg',
width: 95,
align: 'center',
}
], // myColumns,
option: {}, // myOptions option: {}, // myOptions
defaultRow: { defaultRow: {
comId: '', comId: '',

View File

@ -69,7 +69,6 @@
@getRowsData="getRowData" @getRowsData="getRowData"
@sendSelectedRowStatInfo="getSelectedRowStatInfo" @sendSelectedRowStatInfo="getSelectedRowStatInfo"
:selectedRowDataWatchFlag="true" :selectedRowDataWatchFlag="true"
:dataPath="dataPathMock"
/> />
</div> </div>
</div> </div>
@ -188,26 +187,8 @@ export default {
return { return {
myPrgmId: myPrgmId, myPrgmId: myPrgmId,
gridName: 'rowGrid', gridName: 'rowGrid',
loadGrid: true, loadGrid: false,
tab: null, tab: null,
dataPathMock: {
"rowGrid": {
column: [
{ header: '검침 대상 ID', name: 'readObjId', align: 'left' },
{ header: '검침 대상 명', name: 'readObjNm', align: 'left' },
{ header: '검침 대상 유형', name: 'readObjKind', align: 'left' },
{ header: '그룹', name: 'grpCd', align: 'left' },
{ header: 'TJ 환산계수', name: 'tjCvrtCoef', align: 'right' },
{ header: 'TOE 환산계수', name: 'toeCvrtCoef', align: 'right' },
{ header: 'CO2 환산계수', name: 'co2CvrtCoef', align: 'right' },
{ header: '단위', name: 'unitCd', align: 'left' },
{ header: '사용 여부', name: 'useFg', align: 'center' },
],
data: dataPathDataExample,
defaultRow: dataPathDataExample,
option: {}
}
},
items: [ items: [
{ {
name: '검침 대상 정보', name: '검침 대상 정보',
@ -724,8 +705,8 @@ const defaultData = {
}, },
buttonAuth: { buttonAuth: {
add: true, add: true,
save: true,
remove: true, remove: true,
save: true,
excel: false, excel: false,
}, },
}, },
@ -873,40 +854,7 @@ const myDetail = [
required: true, required: true,
}, },
]; ];
const dataPathDataExample = [
{
readObjId: 'OBJ001',
readObjNm: '서울 본사',
readObjKind: 'TYPE01',
grpCd: 'GRP01',
tjCvrtCoef: 1.25,
toeCvrtCoef: 0.85,
co2CvrtCoef: 2.1,
unitCd: 'kWh',
useFg: '1',
},
{
readObjId: 'OBJ002',
readObjNm: '부산 지사',
readObjKind: 'TYPE02',
grpCd: 'GRP02',
tjCvrtCoef: 1.10,
toeCvrtCoef: 0.90,
co2CvrtCoef: 1.8,
unitCd: 'MJ',
useFg: '0',
},
{
readObjId: 'OBJ003',
readObjNm: '대전 공장',
readObjKind: 'TYPE03',
grpCd: 'GRP01',
tjCvrtCoef: 1.30,
toeCvrtCoef: 0.95,
co2CvrtCoef: 2.3,
unitCd: 'GJ',
useFg: '1',
}
];
</script> </script>
<style lang="scss">
@import '@/assets/scss/common.scss';
</style>

View File

@ -195,16 +195,28 @@ export default {
}); });
}, },
async getEqpmKind() { async getEqpmKind() {
let res = await this.postApiReturn({ // let res = await this.postApiReturn({
apiKey: 'selectEqpmKindCodeList', // apiKey: "selectEqpmKindCodeList",
resKey: 'eqpmKindCodeLists', // resKey: "eqpmKindCodeLists",
sendParam: {}, // sendParam: {},
}); // });
let res = [
{
eqpmKindId: "냉동기저온",
eqpmKindNm: "냉동기저온",
},
{
eqpmKindId: "냉동기고온",
eqpmKindNm: "냉동기고온",
},
];
if (res.length > 0) { if (res.length > 0) {
this.selectValueList01 = await res.map(item => { this.selectValueList01 = await res.map((item) => {
return { return {
text: item.eqpmKindNm, // text: item.eqpmKindNm,
label: item.eqpmKindNm,
value: item.eqpmKindId, value: item.eqpmKindId,
}; };
}); });
@ -221,24 +233,29 @@ export default {
gridInit() {}, gridInit() {},
getRowGridData() {}, getRowGridData() {},
async getData() { async getData() {
let res = await this.postApiReturn({ // let res = await this.postApiReturn({
apiKey: 'selectEnrgEffcTotSumm', // apiKey: "selectEnrgEffcTotSumm",
resKey: 'totSummData', // resKey: "totSummData",
sendParam: { // sendParam: {
fromDt: this.pageData.fromDt, // fromDt: this.pageData.fromDt,
eqpmKindId: this.selectValue01, // eqpmKindId: this.selectValue01,
}, // },
}); // });
let res = ["aaa", "bbb"];
await this.getChartData(res); await this.getChartData(res);
this.selectData = res.filter((item, i) => { // this.selectData = res.filter((item, i) => {
return ( // return (
res.findIndex((item2, j) => { // res.findIndex((item2, j) => {
return item.eqpmGrpId === item2.eqpmGrpId; // return item.eqpmGrpId === item2.eqpmGrpId;
}) === i // }) === i
); // );
}); // });
this.selectData = [
{ eqpmGrpId: "G001", eqpmGrpNm: "Group A", otherProp: "..." },
{ eqpmGrpId: "G002", eqpmGrpNm: "Group B", otherProp: "..." },
];
}, },
barClick(event, chartName) { barClick(event, chartName) {
var data = {}; var data = {};
@ -285,25 +302,37 @@ export default {
// } // }
// }); // });
data.map(item => { // data.map((item) => {
if (chartDataObj[item.eqpmGrpId] != null) { // if (chartDataObj[item.eqpmGrpId] != null) {
chartDataObj[item.eqpmGrpId].push(item); // chartDataObj[item.eqpmGrpId].push(item);
} else { // } else {
chartDataObj[item.eqpmGrpId] = [item]; // chartDataObj[item.eqpmGrpId] = [item];
} // }
}); // });
chartDataObj = {
group1: [
{ fabNm: "Fab A", okCnt: 120, ngCnt: 30 },
{ fabNm: "Fab B", okCnt: 150, ngCnt: 20 },
{ fabNm: "Fab C", okCnt: 100, ngCnt: 50 },
],
group2: [
{ fabNm: "Fab D", okCnt: 180, ngCnt: 10 },
{ fabNm: "Fab E", okCnt: 160, ngCnt: 25 },
{ fabNm: "Fab F", okCnt: 140, ngCnt: 35 },
],
};
// chartDataObj.keys()[0] // chartDataObj.keys()[0]
var i = 0; var i = 0;
for (var x of Object.keys(chartDataObj)) { for (var x of Object.keys(chartDataObj)) {
this.loadChartList.push(false); this.loadChartList.push(false);
i++; i++;
this.objList['chart_0' + i] = chartDataObj[x]; this.objList["chart_0" + i] = chartDataObj[x];
this.chartNameList.push('chart_0' + i); this.chartNameList.push("chart_0" + i);
this.setPageData({ this.setPageData({
[this.chartNameList[i - 1]]: Utility.defaultChartOption(true), [this.chartNameList[i - 1]]: Utility.defaultChartOption(true),
}); });
this.setChartData(chartDataObj[x], i); this.setChartData(chartDataObj[x], i);
} }
// this.setChartData(chartDataObj[Object.keys(chartDataObj)[0]]); // this.setChartData(chartDataObj[Object.keys(chartDataObj)[0]]);

View File

@ -103,6 +103,7 @@
<component <component
:ref="gridName" :ref="gridName"
class="tagTrndGrid" class="tagTrndGrid"
v-if="loadGrid"
:is="loadGrid ? 'Grid' : null" :is="loadGrid ? 'Grid' : null"
:gridName="gridName" :gridName="gridName"
:parentPrgmId="myPrgmId" :parentPrgmId="myPrgmId"
@ -198,6 +199,7 @@ export default {
async asyncData(context) { async asyncData(context) {
const myState = context.store.state; const myState = context.store.state;
myPrgmId = context.route.query.prgmId; myPrgmId = context.route.query.prgmId;
console.log("menudata:", myState.menuData[myPrgmId]);
await context.store.commit("setActiveMenuInfo", myState.menuData[myPrgmId]); await context.store.commit("setActiveMenuInfo", myState.menuData[myPrgmId]);
myTitle = await myState.activeMenuInfo.menuNm; myTitle = await myState.activeMenuInfo.menuNm;
}, },
@ -328,6 +330,7 @@ export default {
} else { } else {
this.dumyChartFg = false; this.dumyChartFg = false;
} }
this.dumyChartFg = true;
if (this.initedFlag && this.tagList.length > 0) { if (this.initedFlag && this.tagList.length > 0) {
this.search(); this.search();
} }
@ -406,12 +409,12 @@ export default {
getAddInfoList: "modules/search/getAddInfoList", getAddInfoList: "modules/search/getAddInfoList",
}), }),
async init() { async init() {
this.setPageData({ await this.setPageData({
rowGridSelectKey: 0, rowGridSelectKey: 0,
rowGridSelectData: null, rowGridSelectData: null,
}); });
this.gridInit(); await this.gridInit();
this.setChartNull(); this.setChartNull2();
}, },
async search() { async search() {
// search가 2번 타는 경우: // search가 2번 타는 경우:
@ -510,6 +513,12 @@ export default {
gridKey: this.gridName, gridKey: this.gridName,
value: myColumns, value: myColumns,
}); });
this.setGridData({
gridKey: this.gridName,
value: newRes,
});
this.loadGrid = true; this.loadGrid = true;
}, },
getRowData(data) { getRowData(data) {
@ -800,6 +809,7 @@ export default {
// data SeriesData 추가 // data SeriesData 추가
chartDataDict[dataTagTitle]["seriesData"] = seriesData; chartDataDict[dataTagTitle]["seriesData"] = seriesData;
// data legend 추가 // data legend 추가
console.log("le dat:", legendData);
chartDataDict[dataTagTitle]["legendList"] = legendData; chartDataDict[dataTagTitle]["legendList"] = legendData;
// //
//rawData chart data 구성하기 //rawData chart data 구성하기
@ -1206,8 +1216,40 @@ const defaultData = {
rowGridSelectData: null, rowGridSelectData: null,
/* Griddata 세팅 */ /* Griddata 세팅 */
rowGrid: { rowGrid: {
data: [], data: [
column: [], {
eqpmGrpNm: "냉동기고온",
eqpmGrpId: "UT_HT_CH201",
eqpmId: "UT_HT_CH201",
eqpmNm: "UT_HT_CH201",
tagId: "ICHEON.HVAC.EQP_HT_CH004.UT_HT_CH201.CHI_AMP_1A_PV",
tagNm: "ICHEON 고온 냉동기 201호기 - 회로1 전류A",
// rowStat: "I",
},
{
eqpmGrpNm: "냉동기고온",
eqpmGrpId: "UT_HT_CH201",
eqpmId: "UT_HT_CH201",
eqpmNm: "UT_HT_CH201",
tagId: "ICHEON.HVAC.EQP_HT_CH004.UT_HT_CH201.CHI_AMP_1A_PV",
tagNm: "ICHEON 고온 냉동기 201호기 - 회로1 전류A",
// rowStat: "I",
},
],
column: [
{ header: "설비그룹", name: "eqpmGrpNm", align: "left", width: 150 },
{
header: "설비그룹 ID",
name: "eqpmGrpId",
align: "center",
hidden: true,
},
{ header: "설비ID", name: "eqpmId", align: "left", width: 200 },
{ header: "설비명", name: "eqpmNm", align: "left", width: 200 },
{ header: "TAG ID", name: "tagId", align: "left", width: 500 },
{ header: "TAG 명", name: "tagNm", align: "left" },
// { header: "rowStat", name: "rowStat", align: "center", hidden: true },
],
option: {}, option: {},
defaultRow: { defaultRow: {
eqpmGrpNm: null, eqpmGrpNm: null,