- Update screen 14 29 - Remove mock data dashboard
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -12,6 +12,7 @@
|
||||
:textCols="12"
|
||||
:labelCols="12"
|
||||
:parentPrgmId="myPrgmId"
|
||||
:customClass="'select-large'"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col :cols="3">
|
||||
@ -22,6 +23,7 @@
|
||||
dataKey="searchErcKind"
|
||||
:sendParam="{ commGrpCd: 'EM_ERCKIND', useFg: '1' }"
|
||||
:addAll="true"
|
||||
:customClass="'select-large'"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col :cols="3">
|
||||
@ -34,13 +36,9 @@
|
||||
:addAll="true"
|
||||
:textCols="12"
|
||||
:labelCols="12"
|
||||
:customClass="'select-large'"
|
||||
/>
|
||||
</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">
|
||||
<component
|
||||
:is="'selectCodeList'"
|
||||
@ -49,8 +47,11 @@
|
||||
dataKey="searchChrgKind"
|
||||
:sendParam="{ commGrpCd: 'EM_ENGCHAGKIND', useFg: '1' }"
|
||||
:addAll="true"
|
||||
:customClass="'select-large'"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row align="center" no-gutters>
|
||||
<v-col :cols="3">
|
||||
<component
|
||||
:is="'selectCodeList'"
|
||||
@ -59,6 +60,7 @@
|
||||
dataKey="useFg"
|
||||
:sendParam="{ commGrpCd: 'CO_USEFG', useFg: '1' }"
|
||||
:addAll="true"
|
||||
:customClass="'select-large'"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col :cols="3">
|
||||
@ -69,8 +71,14 @@
|
||||
:textCols="12"
|
||||
:labelCols="12"
|
||||
:searchOption="true"
|
||||
:customClass="'input-large'"
|
||||
/>
|
||||
</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-card>
|
||||
</v-col>
|
||||
@ -323,6 +331,9 @@ export default {
|
||||
columnOptions: {
|
||||
resizable: true,
|
||||
},
|
||||
header: {
|
||||
height: 38,
|
||||
},
|
||||
};
|
||||
this.setGridOption({
|
||||
gridKey: this.gridName,
|
||||
@ -332,12 +343,12 @@ export default {
|
||||
const _this = this;
|
||||
const myColumns = [
|
||||
{ header: '회사 ID', name: 'comId', hidden: true },
|
||||
{ header: '에너지원ID', name: 'ercId', width: 120, align: 'center' },
|
||||
{ header: '에너지원ID', name: 'ercId', width: 120, align: 'left' },
|
||||
{ header: '에너지원명', name: 'ercNm', align: 'left' },
|
||||
{
|
||||
header: '에너지원 유형',
|
||||
name: 'ercKind',
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
formatter({ value }) {
|
||||
let retVal = '';
|
||||
const newValue = _this.pageData.ercKindList.filter(
|
||||
@ -450,7 +461,7 @@ export default {
|
||||
header: '사용 여부',
|
||||
name: 'useFg',
|
||||
width: 95,
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
formatter({ value }) {
|
||||
value = value === true ? '1' : '0';
|
||||
const newValue = _this.pageData.useFgList.filter(
|
||||
@ -479,74 +490,24 @@ export default {
|
||||
this.loadGrid = true;
|
||||
},
|
||||
async getRowGridData() {
|
||||
let res = [
|
||||
{
|
||||
"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
|
||||
}
|
||||
]
|
||||
;
|
||||
let res = [];
|
||||
|
||||
// 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 });
|
||||
// }
|
||||
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 newObj = {
|
||||
...item,
|
||||
@ -798,133 +759,8 @@ const defaultData = {
|
||||
/* data 세팅 */
|
||||
// 로컬 gridName 값과 동일한 이름으로 세팅
|
||||
rowGrid: {
|
||||
data: [
|
||||
{
|
||||
"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,
|
||||
data: [],
|
||||
column: [], // myColumns,
|
||||
option: {}, // myOptions
|
||||
defaultRow: {
|
||||
comId: '',
|
||||
@ -1160,3 +996,6 @@ const myDetail = [
|
||||
},
|
||||
];
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@import '@/assets/scss/common.scss';
|
||||
</style>
|
||||
|
@ -195,68 +195,51 @@ export default {
|
||||
});
|
||||
},
|
||||
async getEqpmKind() {
|
||||
// let res = await this.postApiReturn({
|
||||
// apiKey: "selectEqpmKindCodeList",
|
||||
// resKey: "eqpmKindCodeLists",
|
||||
// sendParam: {},
|
||||
// });
|
||||
let res = await this.postApiReturn({
|
||||
apiKey: 'selectEqpmKindCodeList',
|
||||
resKey: 'eqpmKindCodeLists',
|
||||
sendParam: {},
|
||||
});
|
||||
|
||||
let res = [
|
||||
{
|
||||
eqpmKindId: "냉동기저온",
|
||||
eqpmKindNm: "냉동기저온",
|
||||
},
|
||||
{
|
||||
eqpmKindId: "냉동기고온",
|
||||
eqpmKindNm: "냉동기고온",
|
||||
},
|
||||
];
|
||||
|
||||
if (res.length > 0) {
|
||||
this.selectValueList01 = await res.map((item) => {
|
||||
return {
|
||||
// text: item.eqpmKindNm,
|
||||
label: item.eqpmKindNm,
|
||||
value: item.eqpmKindId,
|
||||
};
|
||||
});
|
||||
this.selectValue01 = this.selectValueList01[0].value;
|
||||
} else {
|
||||
this.selectValueList01 = [];
|
||||
this.selectValue01 = null;
|
||||
}
|
||||
this.setPageData({
|
||||
eqpmKindList: this.selectValueList01,
|
||||
eqpmKindId: this.selectValue01,
|
||||
});
|
||||
},
|
||||
if (res.length > 0) {
|
||||
this.selectValueList01 = await res.map(item => {
|
||||
return {
|
||||
text: item.eqpmKindNm,
|
||||
value: item.eqpmKindId,
|
||||
};
|
||||
});
|
||||
this.selectValue01 = this.selectValueList01[0].value;
|
||||
} else {
|
||||
this.selectValueList01 = [];
|
||||
this.selectValue01 = null;
|
||||
}
|
||||
this.setPageData({
|
||||
eqpmKindList: this.selectValueList01,
|
||||
eqpmKindId: this.selectValue01,
|
||||
});
|
||||
},
|
||||
gridInit() {},
|
||||
getRowGridData() {},
|
||||
async getData() {
|
||||
// let res = await this.postApiReturn({
|
||||
// apiKey: "selectEnrgEffcTotSumm",
|
||||
// resKey: "totSummData",
|
||||
// sendParam: {
|
||||
// fromDt: this.pageData.fromDt,
|
||||
// eqpmKindId: this.selectValue01,
|
||||
// },
|
||||
// });
|
||||
let res = ["aaa", "bbb"];
|
||||
await this.getChartData(res);
|
||||
let res = await this.postApiReturn({
|
||||
apiKey: 'selectEnrgEffcTotSumm',
|
||||
resKey: 'totSummData',
|
||||
sendParam: {
|
||||
fromDt: this.pageData.fromDt,
|
||||
eqpmKindId: this.selectValue01,
|
||||
},
|
||||
});
|
||||
|
||||
// this.selectData = res.filter((item, i) => {
|
||||
// return (
|
||||
// res.findIndex((item2, j) => {
|
||||
// return item.eqpmGrpId === item2.eqpmGrpId;
|
||||
// }) === i
|
||||
// );
|
||||
// });
|
||||
await this.getChartData(res);
|
||||
|
||||
this.selectData = [
|
||||
{ eqpmGrpId: "G001", eqpmGrpNm: "Group A", otherProp: "..." },
|
||||
{ eqpmGrpId: "G002", eqpmGrpNm: "Group B", otherProp: "..." },
|
||||
];
|
||||
},
|
||||
this.selectData = res.filter((item, i) => {
|
||||
return (
|
||||
res.findIndex((item2, j) => {
|
||||
return item.eqpmGrpId === item2.eqpmGrpId;
|
||||
}) === i
|
||||
);
|
||||
});
|
||||
},
|
||||
barClick(event, chartName) {
|
||||
var data = {};
|
||||
if (chartName == "card") {
|
||||
@ -291,52 +274,40 @@ export default {
|
||||
});
|
||||
},
|
||||
async getChartData(data) {
|
||||
var chartDataObj = {};
|
||||
this.objList = {};
|
||||
// let res = await this.postApiReturn({
|
||||
// apiKey : 'selectEnrgEffcTotSumm',
|
||||
// resKey : 'totSummData',
|
||||
// sendParam:{
|
||||
// fromDt : this.pageData.fromDt,
|
||||
// eqpmKindId : this.pageData.eqpmKindId,
|
||||
// }
|
||||
// });
|
||||
var chartDataObj = {};
|
||||
this.objList = {};
|
||||
// let res = await this.postApiReturn({
|
||||
// apiKey : 'selectEnrgEffcTotSumm',
|
||||
// resKey : 'totSummData',
|
||||
// sendParam:{
|
||||
// fromDt : this.pageData.fromDt,
|
||||
// eqpmKindId : this.pageData.eqpmKindId,
|
||||
// }
|
||||
// });
|
||||
|
||||
// data.map((item) => {
|
||||
// if (chartDataObj[item.eqpmGrpId] != null) {
|
||||
// chartDataObj[item.eqpmGrpId].push(item);
|
||||
// } else {
|
||||
// chartDataObj[item.eqpmGrpId] = [item];
|
||||
// }
|
||||
// });
|
||||
data.map(item => {
|
||||
if (chartDataObj[item.eqpmGrpId] != null) {
|
||||
chartDataObj[item.eqpmGrpId].push(item);
|
||||
} else {
|
||||
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]
|
||||
var i = 0;
|
||||
for (var x of Object.keys(chartDataObj)) {
|
||||
this.loadChartList.push(false);
|
||||
i++;
|
||||
this.objList['chart_0' + i] = chartDataObj[x];
|
||||
this.chartNameList.push('chart_0' + i);
|
||||
this.setPageData({
|
||||
[this.chartNameList[i - 1]]: Utility.defaultChartOption(true),
|
||||
});
|
||||
|
||||
// chartDataObj.keys()[0]
|
||||
var i = 0;
|
||||
for (var x of Object.keys(chartDataObj)) {
|
||||
this.loadChartList.push(false);
|
||||
i++;
|
||||
this.objList["chart_0" + i] = chartDataObj[x];
|
||||
this.chartNameList.push("chart_0" + i);
|
||||
this.setPageData({
|
||||
[this.chartNameList[i - 1]]: Utility.defaultChartOption(true),
|
||||
});
|
||||
this.setChartData(chartDataObj[x], i);
|
||||
}
|
||||
// this.setChartData(chartDataObj[Object.keys(chartDataObj)[0]]);
|
||||
},
|
||||
this.setChartData(chartDataObj[x], i);
|
||||
}
|
||||
// this.setChartData(chartDataObj[Object.keys(chartDataObj)[0]]);
|
||||
},
|
||||
async setChartData(data, number) {
|
||||
this.loadChartList[number - 1] = false;
|
||||
let xAxisData = [];
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user