Update 16, 22
This commit is contained in:
@ -7,12 +7,15 @@
|
||||
{{ option.labelContent }}
|
||||
</label>
|
||||
</v-col>
|
||||
<v-col :cols="option.textCols">
|
||||
<v-text-field readonly v-model="selectValue" append-icon="mdi-magnify"
|
||||
:class="['v-select__custom', customClass]"
|
||||
@click="dialogOpenCloseEvent(dialog)" outlined :hide-details="true"
|
||||
:required="item.required || false"></v-text-field>
|
||||
<!-- :disabled="item.disabled || false" -->
|
||||
<v-col :cols="option.textCols" class="py-0">
|
||||
<v-text-field readonly append-icon="" class="v-input__custom" outlined :hide-details="true"
|
||||
v-model="searchWord" @keyup.enter="typeEnterKey" @click="dialogOpenCloseEvent(dialog)"
|
||||
:required="item.required || false"><template v-slot:append>
|
||||
<!-- Custom SVG icon -->
|
||||
<v-icon>$icoSearch</v-icon>
|
||||
|
||||
|
||||
</template></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-dialog v-model="dialog" scrollable width="1000px">
|
||||
@ -21,10 +24,10 @@
|
||||
<span class="custom-title-4">{{ option.modalTitle }}</span>
|
||||
<v-icon @click="dialogOpenCloseEvent(dialog)">mdi-close</v-icon>
|
||||
</v-card-title>
|
||||
<v-row align="end" class="pa-5" no-gutters>
|
||||
<v-row align="end" class="px-5 pb-3" no-gutters>
|
||||
<v-col :cols="2.5" class="mr-2">
|
||||
<v-row>
|
||||
<v-col :cols="2">
|
||||
<v-col :cols="12" class="py-0">
|
||||
<label for="" class="search-box-label">
|
||||
<!-- <v-icon small
|
||||
:class="['mr-1', item.required ? 'icon-orange' : 'icon-blue']"
|
||||
@ -32,28 +35,30 @@
|
||||
검색
|
||||
</label>
|
||||
</v-col>
|
||||
<v-col :cols="12">
|
||||
<v-text-field append-icon="mdi-magnify" class="v-input__custom" outlined :hide-details="true"
|
||||
v-model="searchWord" @keyup.enter="search"></v-text-field>
|
||||
<v-col :cols="11" class="py-0 pr-3">
|
||||
<v-text-field append-icon="mdi-magnify" class="v-input__custom" outlined
|
||||
:hide-details="true" v-model="searchWord" @keyup.enter="search"></v-text-field>
|
||||
</v-col>
|
||||
<a-button icon="search" :ripple="false" type="primary" @click="search()"
|
||||
class="search-button">조회</a-button>
|
||||
</v-row>
|
||||
</v-col>
|
||||
<a-button type="primary" :ripple="false" @click="search()">
|
||||
조회
|
||||
</a-button>
|
||||
|
||||
|
||||
</v-row>
|
||||
<!-- <div :style="'height: calc(65vh)'"> -->
|
||||
<div :style="'height: 600px'">
|
||||
<div :style="'height: 600px'" class="px-5">
|
||||
<!-- <div :style="{ height: 'calc(100% - 213px)' }"> -->
|
||||
<div ref="modalGridParent" class="h100 py-3">
|
||||
<!-- :is="loadGrid && dialog ? 'Grid' : null" -->
|
||||
<component :is="loadGrid && dialog ? 'Grid' : null" :gridName="grid_01"
|
||||
:dataPath="searchParam.modalData2.evtObjPop" :parentPrgmId="parentPrgmId" @getRowsData="getRowData"
|
||||
@dblClick="setUpdate($event)" />
|
||||
:dataPath="searchParam.modalData2.evtObjPop" :parentPrgmId="parentPrgmId"
|
||||
@getRowsData="getRowData" @dblClick="setUpdate($event)" />
|
||||
</div>
|
||||
</div>
|
||||
<v-card-actions class="pa-5 d-flex align-center justify-end">
|
||||
<a-button type="default" class="mr-2" :ripple="false" @click="dialogOpenCloseEvent(dialog)">닫기</a-button>
|
||||
<a-button type="default" class="mr-2" :ripple="false"
|
||||
@click="dialogOpenCloseEvent(dialog)">닫기</a-button>
|
||||
<a-button type="primary" class="mr-2" :ripple="false" @click="setUpdate('init')">초기화</a-button>
|
||||
<a-button type="primary" :ripple="false" @click="setUpdate($event)">확인</a-button>
|
||||
</v-card-actions>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<v-row class="search-box" align="center" >
|
||||
<v-row class="search-box" align="center">
|
||||
<!-- <v-col v-if="label" cols="2"> -->
|
||||
<v-col v-if="item.label" :cols="item.labelCols" class="py-0">
|
||||
<label for="" class="search-box-label">
|
||||
@ -37,12 +37,11 @@
|
||||
<v-row align="center">
|
||||
<v-col v-if="label" cols="12" class="py-0">
|
||||
<label for="" class="search-box-label">
|
||||
<v-icon small
|
||||
:class="['mr-1', 'icon-blue']">$icoBulletPoint</v-icon>
|
||||
<v-icon small :class="['mr-1', 'icon-blue']">$icoBulletPoint</v-icon>
|
||||
{{ item.label }}
|
||||
</label>
|
||||
</v-col>
|
||||
<v-col :cols="label ? 6 : ''" class="py-0">
|
||||
<v-col :cols="label ? 8 : ''" class="py-0">
|
||||
<!-- :value="textfield" -->
|
||||
<v-text-field append-icon="" class="v-input__custom" outlined :hide-details="true"
|
||||
v-model="searchWord" @keyup.enter="typeEnterKey"><template v-slot:append>
|
||||
@ -52,13 +51,10 @@
|
||||
|
||||
</template></v-text-field>
|
||||
</v-col>
|
||||
<v-spacer></v-spacer>
|
||||
<v-col cols="3" class="text-right">
|
||||
<v-btn :ripple="false" icon tile @click="btnTreeExpand()">
|
||||
<!-- {{ treeExpand }} -->
|
||||
<v-icon size="30"
|
||||
v-text="treeExpandAll ? 'mdi-chevron-up' : 'mdi-chevron-down'"></v-icon>
|
||||
</v-btn>
|
||||
<!-- <v-spacer></v-spacer> -->
|
||||
<v-col cols="2" class="text-right">
|
||||
<a-button icon="search" type="primary" @click="search()" class="search-button">조회</a-button>
|
||||
|
||||
<!-- <v-btn color="primary" dark>펼치기</v-btn> -->
|
||||
<!-- <v-btn color="primary" dark>접기</v-btn> -->
|
||||
<!-- <v-btn :ripple="false">초기화</v-btn> -->
|
||||
@ -66,6 +62,12 @@
|
||||
<v-btn v-if="!searchParam.isMulti" :ripple="false" @click="search()">검색</v-btn> -->
|
||||
<!-- as-is 롤 봐도 초기화가 하는 기능을 모르겠음.. -->
|
||||
</v-col>
|
||||
<v-col cols="2" class="text-right"><a-button class="expand-btn" :ripple="false" @click="btnTreeExpand()"
|
||||
style="color: #000000E0;fill:#000000E0">
|
||||
<!-- {{ treeExpand }} -->
|
||||
<v-icon small>$icoExpandAlt</v-icon>
|
||||
Expand All
|
||||
</a-button></v-col>
|
||||
</v-row>
|
||||
|
||||
<!-- <v-btn color="primary" dark @click="btnTreeExpand()">{{
|
||||
@ -78,7 +80,7 @@
|
||||
</div>
|
||||
|
||||
<v-card-text>
|
||||
<div ref="treeGridParent" style="height: 500px">
|
||||
<div ref="treeGridParent" style="height: 450px">
|
||||
<component :ref="'treeGrid' + parentPrgmId" :is="loadGrid && dialog ? 'Grid' : null"
|
||||
:gridName="gridNameTree" :dataPath="searchParam.modalData.selectReadObjListTree"
|
||||
:parentPrgmId="parentPrgmId" :bindingData="bindingData" @getRowsData="getRowData"
|
||||
@ -89,10 +91,10 @@
|
||||
:tree-data="ftnPlcListTreeData"
|
||||
/> -->
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-card-actions class="px-6 py-4 d-flex align-center justify-end">
|
||||
<a-button :ripple="false" @click="setUpdate()" class="mr-2">확인</a-button>
|
||||
<a-button :ripple="false" type="primary" @click="dialog = false" class="mr-2">닫기</a-button>
|
||||
<a-button :ripple="false" @click="dialog = false" class="mr-2">닫기</a-button>
|
||||
<a-button :ripple="false" type="primary" @click="setUpdate($event)">확인</a-button>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
@ -155,7 +157,7 @@ export default {
|
||||
|
||||
myModalKey: 'selectReadObjListTree',
|
||||
gridNameTree: 'treeGrid',
|
||||
loadGrid: true,
|
||||
loadGrid: false,
|
||||
|
||||
dialog: false,
|
||||
treeData: [], // 리턴받은 원본 트리 데이터
|
||||
@ -278,7 +280,7 @@ export default {
|
||||
{
|
||||
header: '검침개소명',
|
||||
name: 'readPlcNm',
|
||||
width: 370,
|
||||
width: 300,
|
||||
align: 'left',
|
||||
},
|
||||
{ header: '검침개소', name: 'name', align: 'center' },
|
||||
@ -289,73 +291,31 @@ export default {
|
||||
async getTreeData() {
|
||||
this.loadGrid = false;
|
||||
|
||||
// const res = await this.postApiReturn({
|
||||
// apiKey: 'selectReadPlcBaseInfo',
|
||||
// resKey: 'readPlcBaseInfoData',
|
||||
// sendParam: {
|
||||
// blocId:
|
||||
// this.searchParam.blocMstrList.length > 0
|
||||
// ? this.searchParam.blocMstrList[this.searchParam.blocId].blocId
|
||||
// : this.searchParam.blocId, //"BL0001",
|
||||
// // readObjId: this.searchParam.readObj, // "MTT00001" // 전력 코드 고정
|
||||
// readObjId: this.searchParam.searchReadObj, // "MTT00001" // 전력 코드 고정
|
||||
const res = await this.postApiReturn({
|
||||
apiKey: 'selectReadPlcBaseInfo',
|
||||
resKey: 'readPlcBaseInfoData',
|
||||
sendParam: {
|
||||
blocId:
|
||||
this.searchParam.blocMstrList.length > 0
|
||||
? this.searchParam.blocMstrList[this.searchParam.blocId].blocId
|
||||
: this.searchParam.blocId, //"BL0001",
|
||||
// readObjId: this.searchParam.readObj, // "MTT00001" // 전력 코드 고정
|
||||
readObjId: this.searchParam.searchReadObj, // "MTT00001" // 전력 코드 고정
|
||||
|
||||
// useFg: '1',
|
||||
// readPlcNmLike: this.searchWord,
|
||||
// },
|
||||
// });
|
||||
|
||||
const treeData = [
|
||||
{
|
||||
readPlcNm: '서울 본사',
|
||||
name: '본사',
|
||||
_children: [
|
||||
{
|
||||
readPlcNm: '서울 본사 - 1층',
|
||||
name: '1층',
|
||||
},
|
||||
{
|
||||
readPlcNm: '서울 본사 - 2층',
|
||||
name: '2층',
|
||||
},
|
||||
],
|
||||
useFg: '1',
|
||||
readPlcNmLike: this.searchWord,
|
||||
},
|
||||
{
|
||||
readPlcNm: '부산 지사',
|
||||
name: '지사',
|
||||
_children: [
|
||||
{
|
||||
readPlcNm: '부산 지사 - A동',
|
||||
name: 'A동',
|
||||
_children: [
|
||||
{
|
||||
readPlcNm: '부산 지사 - A동 1층',
|
||||
name: '1층',
|
||||
},
|
||||
{
|
||||
readPlcNm: '부산 지사 - A동 2층',
|
||||
name: '2층',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
readPlcNm: '부산 지사 - B동',
|
||||
name: 'B동',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
readPlcNm: '대전 창고',
|
||||
name: '창고',
|
||||
},
|
||||
];
|
||||
});
|
||||
|
||||
|
||||
// // console.log("treeData", res)
|
||||
// console.log("treeData", res)
|
||||
let myOptionsTree = {
|
||||
treeColumnOptions: {
|
||||
name: 'readPlcNm',
|
||||
},
|
||||
header: {
|
||||
height: 37,
|
||||
},
|
||||
rowHeight: 'auto',
|
||||
};
|
||||
if (this.searchParam.isMulti) {
|
||||
myOptionsTree['rowHeaders'] = [{ type: 'checkbox' }];
|
||||
@ -373,26 +333,26 @@ export default {
|
||||
|
||||
// this.treeData = res;
|
||||
// const ROOT = res[0].plcCd;
|
||||
// const setTreeData = await this.setTree({
|
||||
// gridKey: this.gridNameTree,
|
||||
// treeKey: 'READ_PLC_ID',
|
||||
// value: res.map(item => ({
|
||||
// ...item,
|
||||
// rowStat: null,
|
||||
// readPlcId: item.readPlcId,
|
||||
// readPlcIdNm: item.readPlcId,
|
||||
// upReadPlcId:
|
||||
// item.upReadPlcId == null || item.upReadPlcId == ''
|
||||
// ? ''
|
||||
// : item.upReadPlcId,
|
||||
// upReadPlcNm:
|
||||
// item.upReadPlcNm == null || item.upReadPlcNm == ''
|
||||
// ? ''
|
||||
// : item.upReadPlcNm,
|
||||
// blocId: item.blocId,
|
||||
// useFg: item.useFg === '1' ? true : false,
|
||||
// })),
|
||||
// });
|
||||
const setTreeData = await this.setTree({
|
||||
gridKey: this.gridNameTree,
|
||||
treeKey: 'READ_PLC_ID',
|
||||
value: res.map(item => ({
|
||||
...item,
|
||||
rowStat: null,
|
||||
readPlcId: item.readPlcId,
|
||||
readPlcIdNm: item.readPlcId,
|
||||
upReadPlcId:
|
||||
item.upReadPlcId == null || item.upReadPlcId == ''
|
||||
? ''
|
||||
: item.upReadPlcId,
|
||||
upReadPlcNm:
|
||||
item.upReadPlcNm == null || item.upReadPlcNm == ''
|
||||
? ''
|
||||
: item.upReadPlcNm,
|
||||
blocId: item.blocId,
|
||||
useFg: item.useFg === '1' ? true : false,
|
||||
})),
|
||||
});
|
||||
// this.treeData = setTreeData;
|
||||
|
||||
|
||||
@ -400,7 +360,7 @@ export default {
|
||||
modalKey: this.myModalKey,
|
||||
gridKey: this.gridNameTree,
|
||||
modalDataKey: this.modalDataKey,
|
||||
value: treeData,
|
||||
value: setTreeData.ROOT || [],
|
||||
});
|
||||
this.loadGrid = true;
|
||||
|
||||
@ -540,22 +500,4 @@ const selectReadObjListTree = {
|
||||
}
|
||||
}
|
||||
|
||||
@each $theme in dark, light {
|
||||
.v-application.#{$theme}-mode {
|
||||
.v-dialog {
|
||||
.v-card {
|
||||
&__title {
|
||||
|
||||
@if $theme ==dark {
|
||||
background-color: #2d3355;
|
||||
|
||||
.v-btn {
|
||||
background-color: #2d3355;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user