init dev-push code ui base design
This commit is contained in:
@ -1,115 +1,84 @@
|
||||
<template>
|
||||
<v-row class="search-box" align="center" no-gutters>
|
||||
<v-col :cols="option.labelCols">
|
||||
<v-row class="search-box" align="center">
|
||||
<v-col :cols="option.labelCols" class="py-0">
|
||||
<label for="" class="search-box-label">
|
||||
<v-icon
|
||||
x-small
|
||||
:color="item.required ? '#fb8200' : 'primary'"
|
||||
class="mr-1"
|
||||
>mdi-record-circle</v-icon
|
||||
v-if="item.iconShow"
|
||||
small
|
||||
:class="['mr-1', item.required ? 'icon-orange' : 'icon-blue']"
|
||||
>$icoBulletPoint</v-icon
|
||||
>
|
||||
{{ option.labelContent }}
|
||||
</label>
|
||||
</v-col>
|
||||
<v-col :cols="option.textCols">
|
||||
<v-text-field
|
||||
readonly
|
||||
v-model="selectValue"
|
||||
append-icon="mdi-magnify"
|
||||
class="v-input__custom"
|
||||
@click="dialogOpenCloseEvent(dialog)"
|
||||
outlined
|
||||
:hide-details="true"
|
||||
:required="item.required || false"
|
||||
:disabled="item.disabled || false"
|
||||
></v-text-field>
|
||||
<v-col :cols="option.textCols" class="py-0">
|
||||
<v-text-field readonly v-model="selectValue" append-icon="" class="v-input__custom"
|
||||
@click="dialogOpenCloseEvent(dialog)" outlined :hide-details="true" :required="item.required || false"
|
||||
:disabled="item.disabled || 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="540px">
|
||||
<v-dialog v-model="dialog" scrollable width="800px">
|
||||
<v-card style="height: 100%">
|
||||
<v-card-title class="pa-5 d-flex align-center justify-space-between">
|
||||
<v-card-title class="px-6 py-4 d-flex align-center justify-space-between">
|
||||
<span class="custom-title-4">{{ option.modalTitle }}</span>
|
||||
<v-btn
|
||||
icon
|
||||
tile
|
||||
:ripple="false"
|
||||
@click="dialogOpenCloseEvent(dialog)"
|
||||
>
|
||||
<v-icon>mdi-close</v-icon>
|
||||
</v-btn>
|
||||
<a-button icon="close" type="text" @click="dialogOpenCloseEvent(dialog)"></a-button>
|
||||
</v-card-title>
|
||||
<div class="pa-5">
|
||||
<v-row align="center" no-gutters>
|
||||
<v-col :cols="12">
|
||||
<component
|
||||
:is="'SelectBox'"
|
||||
ref="SelectBox1"
|
||||
:labelCols="2"
|
||||
:textCols="6"
|
||||
:propsValue="selectValue01"
|
||||
:itemList="selectValueList01"
|
||||
:label="'설비그룹'"
|
||||
@update:propsValue="selectValue01 = $event"
|
||||
:readonly="
|
||||
item.openMode == undefined
|
||||
? openMode
|
||||
: item.openMode == 'ALL'
|
||||
<div class="pa-6 pt-0">
|
||||
<v-row align="center">
|
||||
<v-col :cols="5">
|
||||
<component :is="'SelectBox'" ref="SelectBox1" :labelCols="12" :textCols="12" :iconShow="true"
|
||||
:propsValue="selectValue01" :itemList="selectValueList01" :label="'설비그룹'"
|
||||
@update:propsValue="selectValue01 = $event" :readonly="item.openMode == undefined
|
||||
? openMode
|
||||
: item.openMode == 'ALL'
|
||||
? false
|
||||
: true
|
||||
"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row align="center" no-gutters>
|
||||
<v-col :cols="2">
|
||||
<label for="" class="search-box-label">
|
||||
<v-icon x-small color="primary" class="mr-1"
|
||||
>mdi-record-circle</v-icon
|
||||
>
|
||||
설비명
|
||||
</label>
|
||||
</v-col>
|
||||
<v-col :cols="6">
|
||||
<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>
|
||||
<v-spacer></v-spacer>
|
||||
<v-col cols="4" class="text-right">
|
||||
<v-btn :ripple="false" @click="search()">
|
||||
조회
|
||||
</v-btn>
|
||||
<!-- <v-btn :ripple="false" @click="initSearch()">
|
||||
초기화
|
||||
</v-btn> -->
|
||||
" />
|
||||
</v-col>
|
||||
<v-col :cols="7">
|
||||
<v-row align="center" no-gutters>
|
||||
<v-col :cols="12">
|
||||
<label for="" class="search-box-label">
|
||||
<v-icon small :class="['mr-1 icon-blue']">$icoBulletPoint</v-icon>
|
||||
물리량명
|
||||
</label>
|
||||
</v-col>
|
||||
<v-col :cols="9"> <v-text-field append-icon="" class="v-input__custom"
|
||||
outlined :hide-details="true" v-model="searchWord"
|
||||
@keyup.enter="search"><template v-slot:append>
|
||||
<!-- Custom SVG icon -->
|
||||
<v-icon>$icoSearch</v-icon>
|
||||
|
||||
|
||||
</template></v-text-field></v-col>
|
||||
<v-spacer></v-spacer>
|
||||
<v-col cols="3" class="text-right">
|
||||
<a-button icon="search" type="primary" @click="search()"
|
||||
class="search-button">조회</a-button>
|
||||
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
</div>
|
||||
<v-divider></v-divider>
|
||||
<!-- <div :style="'height: calc(50vh)'"> -->
|
||||
<div :style="'height: 429px;'">
|
||||
<div :style="'height: 429px;'">
|
||||
<!-- <div :style="{ height: 'calc(100% - 213px)' }"> -->
|
||||
<div ref="modalGridParent" class="h100 py-3">
|
||||
<component
|
||||
:is="loadGrid && dialog ? 'Grid' : null"
|
||||
:gridName="gridName"
|
||||
<div ref="modalGridParent" class="h100 px-6 py-4">
|
||||
<component :is="loadGrid && dialog ? 'Grid' : null" :gridName="gridName"
|
||||
:dataPath="searchParam.modalDataEqpmBaseInfoPop.eqpmBaseInfoPop"
|
||||
:parentPrgmId="parentPrgmId"
|
||||
@getRowsData="getRowData"
|
||||
@dblClick="setUpdate($event)"
|
||||
/>
|
||||
:parentPrgmId="parentPrgmId" @getRowsData="getRowData" @dblClick="setUpdate($event)" />
|
||||
</div>
|
||||
</div>
|
||||
<v-card-actions class="pa-5 d-flex align-center justify-center">
|
||||
<v-btn :ripple="false" @click="setUpdate($event)">확인</v-btn>
|
||||
<v-btn :ripple="false" @click="dialogOpenCloseEvent(dialog)"
|
||||
>닫기</v-btn
|
||||
>
|
||||
<v-card-actions class="px-6 py-4 d-flex align-center justify-end">
|
||||
<a-button :ripple="false" @click="setUpdate($event)" class="mr-2">확인</a-button>
|
||||
<a-button :ripple="false" type="primary" @click="dialogOpenCloseEvent(dialog)"
|
||||
class="mr-2">닫기</a-button>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
@ -166,6 +135,11 @@ export default {
|
||||
require: false,
|
||||
default: true, // 'ALL'도 있음
|
||||
},
|
||||
iconShow: {
|
||||
type: Boolean,
|
||||
require: false,
|
||||
default: true,
|
||||
},
|
||||
// bindingFlag:{
|
||||
// type:Boolean,
|
||||
// require: false,
|
||||
@ -181,7 +155,7 @@ export default {
|
||||
return {
|
||||
dialog: false,
|
||||
|
||||
loadGrid: false,
|
||||
loadGrid: true,
|
||||
gridName: 'gridEqpmBaseInfoPop',
|
||||
myModalKey: 'eqpmBaseInfoPop',
|
||||
modalDataKey: 'modalDataEqpmBaseInfoPop',
|
||||
@ -283,7 +257,7 @@ export default {
|
||||
async created() {
|
||||
await this.init();
|
||||
},
|
||||
mounted() {},
|
||||
mounted() { },
|
||||
methods: {
|
||||
...mapMutations({
|
||||
setPageData: 'setPageData',
|
||||
@ -300,29 +274,36 @@ export default {
|
||||
this.gridInit();
|
||||
},
|
||||
async setSelectValueList01() {
|
||||
let res = await this.postApiReturn({
|
||||
apiKey: 'selectEqpmGrpCodeList',
|
||||
resKey: 'eqpmGrpCodeLists',
|
||||
sendParam: { eqpmKindId: this.searchParam.eqpmKindId },
|
||||
// 부모 페이지에서 설비종류인 eqpmKindId 값을 꼭 가져와야한다.
|
||||
});
|
||||
if (res.length > 0) {
|
||||
this.selectValueList01 = await res.map(obj => {
|
||||
return {
|
||||
text: obj.eqpmGrpNm,
|
||||
value: obj.eqpmGrpId,
|
||||
};
|
||||
});
|
||||
// 부모 페이지에서 설비그룹을 선택한 값이 있다면(eqpmGrpId) 그 값으로 바인딩 아닐 경우 조회한 데이터의 첫번째 값으로 선택
|
||||
this.selectValue01 =
|
||||
this.searchParam.eqpmGrpId != undefined
|
||||
? this.searchParam.eqpmGrpId
|
||||
: this.selectValueList01[0].value;
|
||||
// this.selectValue01 = this.selectValueList01[0].value;
|
||||
} else {
|
||||
this.selectValueList01 = [];
|
||||
this.selectValue01 = null;
|
||||
}
|
||||
// let res = await this.postApiReturn({
|
||||
// apiKey: 'selectEqpmGrpCodeList',
|
||||
// resKey: 'eqpmGrpCodeLists',
|
||||
// sendParam: { eqpmKindId: this.searchParam.eqpmKindId },
|
||||
// // 부모 페이지에서 설비종류인 eqpmKindId 값을 꼭 가져와야한다.
|
||||
// });
|
||||
// if (res.length > 0) {
|
||||
// this.selectValueList01 = await res.map(obj => {
|
||||
// return {
|
||||
// text: obj.eqpmGrpNm,
|
||||
// value: obj.eqpmGrpId,
|
||||
// };
|
||||
// });
|
||||
// // 부모 페이지에서 설비그룹을 선택한 값이 있다면(eqpmGrpId) 그 값으로 바인딩 아닐 경우 조회한 데이터의 첫번째 값으로 선택
|
||||
// this.selectValue01 =
|
||||
// this.searchParam.eqpmGrpId != undefined
|
||||
// ? this.searchParam.eqpmGrpId
|
||||
// : this.selectValueList01[0].value;
|
||||
// // this.selectValue01 = this.selectValueList01[0].value;
|
||||
// } else {
|
||||
// this.selectValueList01 = [];
|
||||
// this.selectValue01 = null;
|
||||
// }
|
||||
|
||||
this.selectValueList01 = [
|
||||
{ label: '냉동기고온', value: '냉동기고온' },
|
||||
{ label: '냉동기저온', value: '냉동기저온' },
|
||||
{ label: '공조기', value: '공조기' },
|
||||
{ label: '보일러', value: '보일러' }
|
||||
];
|
||||
},
|
||||
search() {
|
||||
this.getGridData();
|
||||
@ -360,26 +341,34 @@ export default {
|
||||
},
|
||||
async getGridData() {
|
||||
this.loadGrid = false;
|
||||
|
||||
let res = await this.postApiReturn({
|
||||
apiKey: 'selectEqpmBaseInfoPop',
|
||||
resKey: 'epqmBaseInfoData',
|
||||
sendParam: {
|
||||
eqpmGrpId: this.selectValue01,
|
||||
searchWord: this.searchWord,
|
||||
// openMode : this.item.openMode == undefined ? this.openMode : this.item.openMode
|
||||
},
|
||||
});
|
||||
// grid와 popup eqpmId 값 중복되는 것 제거하는 로직 - 시작
|
||||
let newRes = [];
|
||||
if (this.bindingGridEqpmIdList.length > 0) {
|
||||
newRes = res.filter(item => {
|
||||
return !this.bindingGridEqpmIdList.includes(item.eqpmId);
|
||||
});
|
||||
res = newRes;
|
||||
}
|
||||
// let res = [];
|
||||
// let res = await this.postApiReturn({
|
||||
// apiKey: 'selectEqpmBaseInfoPop',
|
||||
// resKey: 'epqmBaseInfoData',
|
||||
// sendParam: {
|
||||
// eqpmGrpId: this.selectValue01,
|
||||
// searchWord: this.searchWord,
|
||||
// // openMode : this.item.openMode == undefined ? this.openMode : this.item.openMode
|
||||
// },
|
||||
// });
|
||||
// // grid와 popup eqpmId 값 중복되는 것 제거하는 로직 - 시작
|
||||
// let newRes = [];
|
||||
// if (this.bindingGridEqpmIdList.length > 0) {
|
||||
// newRes = res.filter(item => {
|
||||
// return !this.bindingGridEqpmIdList.includes(item.eqpmId);
|
||||
// });
|
||||
// res = newRes;
|
||||
// }
|
||||
// grid와 popup eqpmId 값 중복되는 것 제거하는 로직 - 끝
|
||||
|
||||
const res = [
|
||||
{
|
||||
'eqpmId': 'PYSCL00001',
|
||||
'eqpmNm': 'AMP_1A',
|
||||
|
||||
}
|
||||
]
|
||||
|
||||
this.setModalGridData({
|
||||
modalKey: this.myModalKey,
|
||||
gridKey: this.gridName,
|
||||
@ -452,9 +441,9 @@ export default {
|
||||
// this.dialog = false;
|
||||
// return;
|
||||
// }
|
||||
if (this.myBindingData.length <= 0) {
|
||||
return alert('설비상세 리스트를 먼저 선택해주세요.');
|
||||
}
|
||||
// if (this.myBindingData.length <= 0) {
|
||||
// return alert('설비상세 리스트를 먼저 선택해주세요.');
|
||||
// }
|
||||
this.dialog = !val;
|
||||
},
|
||||
},
|
||||
@ -482,33 +471,29 @@ var eqpmBaseInfoPop = {
|
||||
}
|
||||
}
|
||||
|
||||
.tui-grid-cell.tui-grid-cell-has-tree
|
||||
.tui-grid-tree-extra-content
|
||||
+ .tui-grid-cell-content:before {
|
||||
.tui-grid-cell.tui-grid-cell-has-tree .tui-grid-tree-extra-content+.tui-grid-cell-content:before {
|
||||
content: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@each $theme in dark, light {
|
||||
.v-application.#{$theme}-mode {
|
||||
.v-dialog {
|
||||
.v-card {
|
||||
&__title {
|
||||
color: map-deep-get($color, 'white', '0');
|
||||
@if $theme == dark {
|
||||
background-color: #2d3355;
|
||||
.v-btn {
|
||||
background-color: #2d3355;
|
||||
}
|
||||
} @else {
|
||||
background-color: #3f4d7d;
|
||||
.v-btn {
|
||||
background-color: #3f4d7d;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// .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