init dev-push code ui base design

This commit is contained in:
leonard
2025-07-22 09:58:38 +07:00
parent ffdf5ccb66
commit eedbf94d56
214 changed files with 42170 additions and 28040 deletions

View File

@ -9,6 +9,8 @@
<component
:is="'SelectBlocMstr'"
ref="SelectBlocMstr"
:textCols="12"
:labelCols="12"
:parentPrgmId="myPrgmId"
/>
</v-col>
@ -30,6 +32,8 @@
dataKey="searchReadObj"
:sendParam="{ useFg: '1' }"
:addAll="true"
:textCols="12"
:labelCols="12"
/>
</v-col>
<v-col :cols="3" class="text-right">
@ -62,8 +66,8 @@
:parentPrgmId="myPrgmId"
label="에너지원명"
valueNm="ercNm"
:textCols="7"
:labelCols="4"
:textCols="12"
:labelCols="12"
:searchOption="true"
/>
</v-col>
@ -475,24 +479,74 @@ export default {
this.loadGrid = true;
},
async getRowGridData() {
let res = [];
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
}
]
;
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,
@ -744,8 +798,133 @@ const defaultData = {
/* data 세팅 */
// 로컬 gridName 값과 동일한 이름으로 세팅
rowGrid: {
data: [],
column: [], // myColumns,
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,
option: {}, // myOptions
defaultRow: {
comId: '',
@ -816,7 +995,10 @@ const myDetail = [
valueNm: 'ercId',
readonly: true,
cols: 6,
class: 'py-2',
labelCols: 12,
textCols: 12,
iconShow: true,
class: 'py-2 pr-4',
required: false,
placeholder: '시스템 자동입력',
},
@ -826,7 +1008,10 @@ const myDetail = [
valueNm: 'ercNm',
disabled: false,
cols: 6,
class: 'py-2',
labelCols: 12,
textCols: 12,
iconShow: true,
class: 'py-2 pl-4',
required: true,
},
{
@ -835,7 +1020,10 @@ const myDetail = [
valueNm: 'ercKind',
disabled: false,
cols: 6,
class: 'py-2',
labelCols: 12,
textCols: 12,
iconShow: true,
class: 'py-2 pr-4',
list: 'ercKindList',
itemText: 'commCdNm',
itemValue: 'commCd',
@ -847,7 +1035,10 @@ const myDetail = [
valueNm: 'readObjId',
disabled: false,
cols: 6,
class: 'py-2',
labelCols: 12,
textCols: 12,
iconShow: true,
class: 'py-2 pl-4',
list: 'readObjList',
itemText: 'readObjNm',
itemValue: 'readObjId',
@ -859,7 +1050,10 @@ const myDetail = [
valueNm: 'chrgKind',
disabled: false,
cols: 6,
class: 'py-2',
labelCols: 12,
textCols: 12,
iconShow: true,
class: 'py-2 pr-4',
list: 'chrgKindList',
itemText: 'commCdNm',
itemValue: 'commCd',
@ -871,7 +1065,10 @@ const myDetail = [
valueNm: 'unitPrce',
disabled: false,
cols: 6,
class: 'py-2',
labelCols: 12,
textCols: 12,
iconShow: true,
class: 'py-2 pl-4',
},
{
type: 'InputText',
@ -879,7 +1076,11 @@ const myDetail = [
valueNm: 'peakPow',
disabled: false,
cols: 6,
class: 'py-2',
labelCols: 12,
textCols: 12,
iconShow: true,
class: 'py-2 pr-4',
},
{
type: 'SelectBox',
@ -887,7 +1088,10 @@ const myDetail = [
valueNm: 'blocId',
disabled: false,
cols: 6,
class: 'py-2',
labelCols: 12,
textCols: 12,
iconShow: true,
class: 'py-2 pl-4',
list: 'blocMstrList',
itemText: 'blocNm',
itemValue: 'blocId',
@ -899,14 +1103,12 @@ const myDetail = [
valueNm: 'elecContId',
disabled: false,
cols: 6,
class: 'py-2',
},
{
type: 'InputText',
valueNm: 'elecContNm',
readonly: true,
cols: 5,
class: 'py-2',
labelCols: 12,
textCols: 12,
iconShow: true,
// class: 'py-2',
class: 'pb-0 mb-0 pr-4',
disableContent: true,
},
{
type: 'ReadPlcPop',
@ -914,14 +1116,26 @@ const myDetail = [
valueNm: 'readPlcId',
disabled: false,
cols: 6,
class: 'py-2',
labelCols: 12,
textCols: 12,
iconShow: true,
class: 'py-2 pl-4',
},
{
type: 'InputText',
valueNm: 'elecContNm',
readonly: true,
cols: 6,
iconShow: true,
class: 'py-2 pr-4',
},
{
type: 'InputText',
valueNm: 'readPlcNm',
readonly: true,
cols: 5,
class: 'py-2',
cols: 6,
iconShow: true,
class: 'py-2 pl-4',
},
{
type: 'CheckBox',
@ -929,7 +1143,8 @@ const myDetail = [
valueNm: 'prceFg',
disabled: false,
cols: 6,
class: 'py-2',
iconShow: true,
class: 'py-2 pr-4',
value: { '1': true, '0': false },
},
{
@ -938,12 +1153,10 @@ const myDetail = [
valueNm: 'useFg',
disabled: false,
cols: 6,
class: 'py-2',
iconShow: true,
class: 'py-2 pl-4',
value: { '1': true, '0': false },
required: true,
},
];
</script>
<style lang="scss">
@import '@/assets/scss/common.scss';
</style>