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

@ -3,139 +3,74 @@
<v-row ref="searchFilter">
<v-col :cols="12">
<v-card class="searchFilter">
<v-row align="center" no-gutters>
<v-col :cols="3">
<v-row align="end" no-gutters>
<v-col :cols="2.5">
<!-- 사업장 -->
<component
:is="'SelectBlocMstr'"
ref="SelectBlocMstr"
:parentPrgmId="myPrgmId"
/>
<component :is="'SelectBlocMstr'" ref="SelectBlocMstr" :parentPrgmId="myPrgmId"
:labelCols="12" :textCols="12" :iconShow="true" :customClass="'select-large'" />
</v-col>
<!-- <v-col :cols="3">
<component
:is="'selectCodeList'"
:parentPrgmId="myPrgmId"
:label="'개소 종류'"
dataKey="searchPlcKind"
:sendParam="{ commGrpCd: 'CM_CHKKIND', useFg: '1'}"
:addAll="true"
/>
</v-col> -->
<v-col :cols="3">
<component
:is="'SelectReadObj'"
:parentPrgmId="myPrgmId"
:label="'검침대상'"
dataKey="searchReadObj"
:sendParam="{ useFg: '1' }"
/>
<v-col :cols="2.5">
<component :is="'SelectReadObj'" :parentPrgmId="myPrgmId" :label="'검침대상'"
dataKey="searchReadObj" :sendParam="{ useFg: '1' }" :labelCols="12" :textCols="12"
:iconShow="true" :customClass="'select-large'" />
</v-col>
<v-col :cols="6" class="text-right">
<BtnSearch @click="search" />
<v-col :cols="2.5">
<component :is="'selectCodeList'" :parentPrgmId="myPrgmId" :label="'사용여부'" dataKey="useFg"
:sendParam="{ commGrpCd: 'CO_USEFG', useFg: '1' }" :addAll="true" :labelCols="12"
:textCols="12" :customClass="'select-large'" :iconShow="true" />
</v-col>
</v-row>
<v-row align="center" no-gutters>
<v-col :cols="3">
<component
:is="'selectCodeList'"
:parentPrgmId="myPrgmId"
:label="'사용여부'"
dataKey="useFg"
:sendParam="{ commGrpCd: 'CO_USEFG', useFg: '1' }"
:addAll="true"
/>
</v-col>
<v-col :cols="6">
<InputText
:parentPrgmId="myPrgmId"
label="검침개소명"
valueNm="readPlcNm"
:labelCols="2"
:textCols="6"
:searchOption="true"
/>
<v-col :cols="2.5">
<InputText :parentPrgmId="myPrgmId" label="검침개소명" valueNm="readPlcNm" :labelCols="12"
:textCols="12" :searchOption="true" :customClass="'input-large'" :iconShow="true" />
</v-col>
<BtnSearch @click="search" size="large" />
</v-row>
</v-card>
</v-col>
</v-row>
<v-row ref="contents">
<v-row ref="contents" class="mt-4">
<v-col :cols="5" class="h100">
<v-card class="pb-5">
<div class="d-flex align-center justify-space-between pa-5">
<v-card-title class="pa-0 custom-title-4"
>검침개소 정보</v-card-title
>
<Buttons
:parentPrgmId="myPrgmId"
:bindingData="gridName"
:detailList="detailList"
:btnActionsFnc="btnActions"
/>
<div class="d-flex align-center justify-space-between pa-4 pb-6">
<v-card-title class="pa-0 custom-title-4">검침개소 정보</v-card-title>
<Buttons :parentPrgmId="myPrgmId" :bindingData="gridName" :detailList="detailList"
:btnActionsFnc="btnActions" />
</div>
<div class="px-5" style="height:calc(100% - 76px)">
<div class="px-4">
<div ref="gridParent" class="w100 h100">
<component
:ref="gridName"
:is="loadGrid ? 'Grid' : null"
:gridName="gridName"
:parentPrgmId="myPrgmId"
@getRowsData="getRowData"
@sendSelectedRowStatInfo="getSelectedRowStatInfo"
:selectedRowDataWatchFlag="true"
/>
<component :ref="gridName" :is="loadGrid ? 'Grid' : null" :gridName="gridName"
:parentPrgmId="myPrgmId" @getRowsData="getRowData"
@sendSelectedRowStatInfo="getSelectedRowStatInfo" :selectedRowDataWatchFlag="true"
:dataPath="dataPathExample" />
</div>
</div>
</v-card>
</v-col>
<v-col :cols="7" class="h100">
<v-card class="pb-5">
<v-card-title class="custom-title-4" style="min-height:76px;"
>검침개소 상세
<v-card-title class="custom-title-4 pb-1 pa-4">검침개소 상세
</v-card-title>
<div class="px-5" style="height:calc(100% - 76px)">
<div class="px-4">
<v-tabs v-model="tab">
<v-tab
v-for="item in items"
:key="item.id"
:disabled="
(item.id == 'readPlcImgInfoTab' ? isImgTabDisabled : false) ||
item.disabledFlag
"
>
<v-tab v-for="item in items" :key="item.id" :disabled="(item.id == 'readPlcImgInfoTab' ? isImgTabDisabled : false) ||
item.disabledFlag
">
{{ item.name }}
</v-tab>
</v-tabs>
<v-tabs-items
v-model="tab"
style="height: calc(100% - 65px);"
class="py-6"
>
<v-tabs-items v-model="tab" style="height: calc(100% - 65px);" class="pt-6 py-2">
<v-tab-item v-for="(item, idx) in items" :key="item.id">
<component
v-if="item.id == 'readPlcBaseInfoTab'"
:is="'Form'"
:parentPrgmId="myPrgmId"
:detailList="detailList"
:bindingData="gridName"
@gridEditingFinish="gridEditingFinish"
/>
<ReadPlcAddInfoTab
v-if="item.id == 'readPlcAddInfoTab'"
:parentPrgmId="myPrgmId"
:innerTabGridInfo="{ tab, idx }"
/>
<ReadPlcImgInfoTab
v-if="item.id == 'readPlcImgInfoTab'"
:parentPrgmId="myPrgmId"
:innerTabGridInfo="{ tab, idx }"
/>
<ReadPlcTagRelTab
v-if="item.id == 'readPlcTagRelTab'"
:parentPrgmId="myPrgmId"
:innerTabGridInfo="{ tab, idx }"
/>
<component v-if="item.id == 'readPlcBaseInfoTab'" :is="'Form'" :parentPrgmId="myPrgmId"
:detailList="detailList" :bindingData="gridName"
@gridEditingFinish="gridEditingFinish" />
<ReadPlcAddInfoTab v-if="item.id == 'readPlcAddInfoTab'" :parentPrgmId="myPrgmId"
:innerTabGridInfo="{ tab, idx }" />
<ReadPlcImgInfoTab v-if="item.id == 'readPlcImgInfoTab'" :parentPrgmId="myPrgmId"
:innerTabGridInfo="{ tab, idx }" />
<ReadPlcTagRelTab v-if="item.id == 'readPlcTagRelTab'" :parentPrgmId="myPrgmId"
:innerTabGridInfo="{ tab, idx }" />
</v-tab-item>
</v-tabs-items>
</div>
@ -199,7 +134,7 @@ export default {
return {
myPrgmId: myPrgmId,
gridName: 'rowGrid',
loadGrid: false,
loadGrid: true,
tab: null,
isImgTabDisabled: false,
items: [
@ -222,6 +157,47 @@ export default {
],
detailList: myDetail,
defaultUseFg: 1,
dataPathExample: {
"rowGrid": {
data: sampleData,
column: [
{
header: '',
name: '',
align: 'center',
width: 50,
formatter: (props) => {
return `<label class="custom-radio">
<span class="radio-mark"></span>
</label>`;
}
},
{
header: '검침개소명',
name: 'readPlcNm',
align: 'left',
minWidth: 400,
},
{
header: '개소 종류',
name: 'plcKind',
minWidth: 100,
align: 'center',
},
{
header: '사용 여부',
name: 'useFg',
minWidth: 100,
align: 'center',
},
],
option: myOptions,
}
}
// loadTree: false
};
},
@ -336,18 +312,18 @@ export default {
},
async initData() {
let ercList = [];
const res = await this.postApiReturn({
apiKey: 'selectErcInfo',
resKey: 'ercInfoData',
sendParam: {
blocId: this.userInfo.blocId,
},
});
res.forEach(item => {
const it = { text: item.ercNm, value: item.ercId };
ercList.push(it);
});
this.setPageData({ ercNmList: ercList });
// const res = await this.postApiReturn({
// apiKey: 'selectErcInfo',
// resKey: 'ercInfoData',
// sendParam: {
// blocId: this.userInfo.blocId,
// },
// });
// res.forEach(item => {
// const it = { text: item.ercNm, value: item.ercId };
// ercList.push(it);
// });
// this.setPageData({ ercNmList: ercList });
},
gridInit() {
const gridHeight = this.$refs.gridParent.offsetHeight - 30;
@ -358,7 +334,9 @@ export default {
resizable: true,
},
treeColumnOptions: {
name: 'readPlcNm',
name: 'eccNm',       // Showing tree table
useIcon: false,      // Not using icon
indentWidth: 10,
},
};
this.setGridOption({
@ -530,12 +508,12 @@ export default {
this.$refs[this.gridName].focus({
rowKey:
this.pageData.rowGridSelectKey == '' ||
this.pageData.rowGridSelectKey == null
this.pageData.rowGridSelectKey == null
? 0
: this.pageData.rowGridSelectKey ==
this.$refs[this.gridName].getData().length - 1
? this.pageData.rowGridSelectKey
: 0,
this.$refs[this.gridName].getData().length - 1
? this.pageData.rowGridSelectKey
: 0,
columnName: 'readPlcNm',
setScroll: true,
});
@ -976,6 +954,63 @@ const defaultData = {
},
};
const sampleData = [
{
readPlcNm: '서울 본사',
plcKind: '본사',
useFg: '사용',
_children: [
{
readPlcNm: '서울 본사 - 1층',
plcKind: '층',
useFg: '사용',
},
{
readPlcNm: '서울 본사 - 2층',
plcKind: '층',
useFg: '미사용',
},
],
},
{
readPlcNm: '부산 지사',
plcKind: '지사',
useFg: '사용',
_children: [
{
readPlcNm: '부산 지사 - A동',
plcKind: '건물',
useFg: '사용',
_children: [
{
readPlcNm: '부산 지사 - A동 1층',
plcKind: '층',
useFg: '사용',
},
],
},
],
},
{
readPlcNm: '대전 창고',
plcKind: '창고',
useFg: '미사용',
},
];
const myOptions = {
columnOptions: {
resizable: true,
},
treeColumnOptions: {
name: 'readPlcNm',       // Showing tree table
useIcon: false,      // Not using icon
indentWidth: 10,
},
}
const myDetail = [
{
type: 'InputText',
@ -983,34 +1018,36 @@ const myDetail = [
valueNm: 'readPlcId',
readonly: true,
cols: 6,
class: 'py-2',
labelCols: 12,
textCols: 12,
class: 'py-3 pr-4',
required: false,
placeholder: '시스템 자동입력',
iconShow: true,
},
{
type: 'InputText',
label: '검침개소명',
valueNm: 'readPlcNm',
disabled: false,
labelCols: 12,
textCols: 12,
cols: 6,
class: 'py-2',
class: 'py-3 pl-4',
required: true,
iconShow: true,
},
{
type: 'ReadPlcPop',
label: '상위 검침개소',
valueNm: 'upReadPlcId',
disabled: false,
labelCols: 12,
textCols: 12,
cols: 6,
class: 'py-2',
class: 'py-3 pr-4 pb-2',
required: true,
},
{
type: 'InputText',
valueNm: 'upReadPlcNm',
readonly: true,
cols: 5,
class: 'py-2',
iconShow: true,
},
{
type: 'SelectBox',
@ -1018,23 +1055,42 @@ const myDetail = [
valueNm: 'plcKind',
disabled: false,
cols: 6,
class: 'py-2',
labelCols: 12,
textCols: 12,
class: 'py-3 pl-4',
list: 'plcKindList',
itemText: 'commCdNm',
itemValue: 'commCd',
required: true,
iconShow: true,
},
{
type: 'InputText',
valueNm: 'plcKind',
valueNm: 'upReadPlcNm',
readonly: true,
cols: 6,
textCols: 12,
class: 'pt-1 py-3 pr-4',
},
{
showValue: false,
},
{
type: 'SelectBox',
label: '검침대상',
valueNm: 'readObjId',
disabled: false,
cols: 6,
class: 'py-2',
labelCols: 12,
textCols: 12,
class: 'py-3 pr-4',
list: 'readObjList',
itemText: 'readObjNm',
itemValue: 'readObjId',
required: true,
iconShow: true,
},
{
type: 'CheckBox',
@ -1042,9 +1098,12 @@ const myDetail = [
valueNm: 'useFg',
disabled: false,
cols: 6,
class: 'py-2',
labelCols: 12,
textCols: 12,
class: 'py-3 pl-4',
value: { '1': true, '0': false },
required: true,
iconShow: true,
},
// {
// type: "SelectBox",
@ -1059,6 +1118,3 @@ const myDetail = [
// },
];
</script>
<style lang="scss">
@import '@/assets/scss/common.scss';
</style>