init dev-push code ui base design
This commit is contained in:
@ -1,119 +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-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="item.readonly || false"
|
||||
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>
|
||||
<v-col :cols="option.textCols" class="py-0">
|
||||
<v-text-field :readonly="item.readonly || false" 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>
|
||||
|
||||
<v-dialog v-model="dialog" scrollable width="540px">
|
||||
</template></v-text-field>
|
||||
</v-col>
|
||||
<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"
|
||||
:disabled="option.eqpmGrpDisableFlag"
|
||||
:propsValue="selectValue01"
|
||||
:itemList="selectValueList01"
|
||||
:label="'설비그룹'"
|
||||
@update:propsValue="selectValue01 = $event"
|
||||
:readonly="
|
||||
item.selectBoxReadonly != undefined
|
||||
? item.selectBoxReadonly
|
||||
: false
|
||||
"
|
||||
/>
|
||||
<div class="px-6 py-4 pt-0">
|
||||
<v-row align="center">
|
||||
<v-col :cols="5">
|
||||
<component :is="'SelectBox'" ref="SelectBox1" :labelCols="12" :textCols="12"
|
||||
:disabled="option.eqpmGrpDisableFlag" :propsValue="selectValue01" :iconShow="true"
|
||||
:itemList="selectValueList01" :label="'설비그룹'"
|
||||
@update:propsValue="selectValue01 = $event" :readonly="item.selectBoxReadonly != undefined
|
||||
? item.selectBoxReadonly
|
||||
: false
|
||||
" />
|
||||
</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-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-btn :ripple="false" @click="initSearch()">
|
||||
초기화
|
||||
</v-btn> -->
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
</div>
|
||||
<v-divider></v-divider>
|
||||
<div :style="'height: 429px;'">
|
||||
<!-- <div :style="{ height: 'calc(100% - 213px)' }"> -->
|
||||
<div ref="modalGridParent" class="h100 w100">
|
||||
<component
|
||||
:is="loadGrid && dialog ? 'Grid' : null"
|
||||
:gridName="grid_01"
|
||||
:dataPath="searchParam.pyscModalData.egrpPysclQtyPop"
|
||||
:parentPrgmId="parentPrgmId"
|
||||
@getRowsData="getRowData"
|
||||
@dblClick="setUpdate($event)"
|
||||
/>
|
||||
|
||||
<div :style="'height: calc(50vh)'">
|
||||
<div ref="modalGridParent" class="h100 px-6 py-4">
|
||||
<component :is="loadGrid && dialog ? 'Grid' : null" :gridName="grid_01"
|
||||
:dataPath="searchParam.pyscModalData.egrpPysclQtyPop" :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-btn
|
||||
v-if="item.closeBtnFg || false"
|
||||
:ripple="false"
|
||||
@click="deleteBtnAction($event)"
|
||||
>삭제</v-btn
|
||||
>
|
||||
<v-card-actions class="px-6 py-4 d-flex align-center justify-end">
|
||||
<!-- <v-btn :ripple="false" @click="setUpdate($event)">확인</v-btn>
|
||||
<v-btn :ripple="false" @click="dialogOpenCloseEvent(dialog)">닫기</v-btn> -->
|
||||
<!-- <v-btn v-if="item.closeBtnFg || false" :ripple="false" @click="deleteBtnAction($event)">삭제</v-btn> -->
|
||||
<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>
|
||||
<a-button v-if="item.closeBtnFg || false" :ripple="false" icon="delete" type="danger" ghost danger
|
||||
@click="deleteBtnAction($event)">삭제</a-button>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
@ -165,7 +130,7 @@ export default {
|
||||
type: String,
|
||||
require: false,
|
||||
},
|
||||
eqpmGrpDisableFlag:{
|
||||
eqpmGrpDisableFlag: {
|
||||
type: Boolean,
|
||||
require: false,
|
||||
default: false
|
||||
@ -185,7 +150,23 @@ export default {
|
||||
return {
|
||||
dialog: false,
|
||||
|
||||
loadGrid: false,
|
||||
loadGrid: true,
|
||||
dataPathPopExample: {
|
||||
"rowGrid": {
|
||||
data: [
|
||||
{
|
||||
'calcProc': 'AVG_CNT2',
|
||||
'argCnt': '2',
|
||||
'calcDesc': '두개 변수에 대한 평균'
|
||||
|
||||
}
|
||||
],
|
||||
column: [
|
||||
{ header: '계산코드', name: 'calcProc', width: 150 },
|
||||
{ header: '아규먼트갯수', name: 'argCnt', align: 'center', width: 100 },
|
||||
]
|
||||
}
|
||||
},
|
||||
grid_01: 'grid_01',
|
||||
myModalKey: 'egrpPysclQtyPop',
|
||||
modalDataKey: 'pyscModalData',
|
||||
@ -300,7 +281,7 @@ export default {
|
||||
await this.setSelectValueList01();
|
||||
this.init();
|
||||
},
|
||||
mounted() {},
|
||||
mounted() { },
|
||||
methods: {
|
||||
...mapMutations({
|
||||
setPageData: 'setPageData',
|
||||
@ -317,39 +298,46 @@ export default {
|
||||
},
|
||||
async setSelectValueList01() {
|
||||
// form으로 popup 사용할 때 인자로 eqpmKindId, eqpmGrpId 보내줘야한다.
|
||||
let res = await this.postApiReturn({
|
||||
apiKey: 'selectEqpmGrpCodeList',
|
||||
resKey: 'eqpmGrpCodeLists',
|
||||
sendParam: {
|
||||
eqpmKindId:
|
||||
this.item.eqpmKindId != undefined
|
||||
? this.item.eqpmKindId
|
||||
: this.searchParam.eqpmKindId,
|
||||
},
|
||||
// form을 통해 popup을 사용할 경우 -> this.item.eqpmKindId 사용
|
||||
// 부모 페이지에서 설비종류인 eqpmKindId 값을 꼭 가져와야한다.
|
||||
});
|
||||
if (res.length > 0) {
|
||||
this.selectValueList01 = await res.map(obj => {
|
||||
return {
|
||||
text: obj.eqpmGrpNm,
|
||||
value: obj.eqpmGrpId,
|
||||
};
|
||||
});
|
||||
// form을 통해 popup을 사용할 경우 -> this.item.eqpmGrpId 사용
|
||||
// 부모 페이지에서 설비그룹을 선택한 값이 있다면(eqpmGrpId) 그 값으로 바인딩 아닐 경우 조회한 데이터의 첫번째 값으로 선택
|
||||
// console.log('this.item.eqpmGrpId : ', this.item.eqpmGrpId);
|
||||
// console.log('this.searchParam.eqpmGrpId : ', this.searchParam.eqpmGrpId);
|
||||
this.selectValue01 =
|
||||
this.item.eqpmGrpId != undefined
|
||||
? this.item.eqpmGrpId
|
||||
: this.searchParam.eqpmGrpId != undefined
|
||||
? this.searchParam.eqpmGrpId
|
||||
: this.selectValueList01[0].value;
|
||||
} else {
|
||||
this.selectValueList01 = [];
|
||||
this.selectValue01 = null;
|
||||
}
|
||||
// let res = await this.postApiReturn({
|
||||
// apiKey: 'selectEqpmGrpCodeList',
|
||||
// resKey: 'eqpmGrpCodeLists',
|
||||
// sendParam: {
|
||||
// eqpmKindId:
|
||||
// this.item.eqpmKindId != undefined
|
||||
// ? this.item.eqpmKindId
|
||||
// : this.searchParam.eqpmKindId,
|
||||
// },
|
||||
// // form을 통해 popup을 사용할 경우 -> this.item.eqpmKindId 사용
|
||||
// // 부모 페이지에서 설비종류인 eqpmKindId 값을 꼭 가져와야한다.
|
||||
// });
|
||||
// if (res.length > 0) {
|
||||
// this.selectValueList01 = await res.map(obj => {
|
||||
// return {
|
||||
// text: obj.eqpmGrpNm,
|
||||
// value: obj.eqpmGrpId,
|
||||
// };
|
||||
// });
|
||||
// // form을 통해 popup을 사용할 경우 -> this.item.eqpmGrpId 사용
|
||||
// // 부모 페이지에서 설비그룹을 선택한 값이 있다면(eqpmGrpId) 그 값으로 바인딩 아닐 경우 조회한 데이터의 첫번째 값으로 선택
|
||||
// // console.log('this.item.eqpmGrpId : ', this.item.eqpmGrpId);
|
||||
// // console.log('this.searchParam.eqpmGrpId : ', this.searchParam.eqpmGrpId);
|
||||
// this.selectValue01 =
|
||||
// this.item.eqpmGrpId != undefined
|
||||
// ? this.item.eqpmGrpId
|
||||
// : this.searchParam.eqpmGrpId != undefined
|
||||
// ? this.searchParam.eqpmGrpId
|
||||
// : this.selectValueList01[0].value;
|
||||
// } else {
|
||||
// this.selectValueList01 = [];
|
||||
// this.selectValue01 = null;
|
||||
// }
|
||||
|
||||
this.selectValueList01 = [
|
||||
{ label: '냉동기고온', value: '냉동기고온' },
|
||||
{ label: '냉동기저온', value: '냉동기저온' },
|
||||
{ label: '공조기', value: '공조기' },
|
||||
{ label: '보일러', value: '보일러' }
|
||||
];
|
||||
},
|
||||
search() {
|
||||
this.getGridData();
|
||||
@ -359,6 +347,7 @@ export default {
|
||||
this.getGridData();
|
||||
},
|
||||
gridInit() {
|
||||
// const gridHeight = this.$refs.gridParent.offsetHeight - 30;
|
||||
const myOptions = {
|
||||
columnOptions: {
|
||||
resizable: true,
|
||||
@ -370,7 +359,7 @@ export default {
|
||||
modalDataKey: this.modalDataKey,
|
||||
value: Object.assign(
|
||||
// Utility.defaultGridOption(this.$refs.modalGridParent.offsetHeight - 60, myOptions),
|
||||
Utility.defaultGridOption(400, myOptions),
|
||||
// Utility.defaultGridOption(100, myOptions),
|
||||
myOptions,
|
||||
),
|
||||
});
|
||||
@ -399,44 +388,44 @@ export default {
|
||||
this.loadGrid = false;
|
||||
|
||||
let res = [];
|
||||
res = await this.postApiReturn({
|
||||
apiKey: 'selectEgrpPysclQtyPop',
|
||||
resKey: 'egrpPysclQtyData',
|
||||
sendParam: {
|
||||
searchWord: this.searchWord,
|
||||
eqpmGrpId: this.selectValue01,
|
||||
openMode: this.item.openMode,
|
||||
},
|
||||
});
|
||||
let newRes = [];
|
||||
let tempTagList = this.pyscPopVal.split('/*wq2a/');
|
||||
let tagList = tempTagList.filter(item => item != '');
|
||||
if (tagList.length > 0) {
|
||||
newRes = res.filter(item => {
|
||||
return !tagList.includes(item.pysclQtyId);
|
||||
});
|
||||
res = newRes;
|
||||
}
|
||||
|
||||
//이미 선택된 값들 제거(배열)
|
||||
if (this.item.dataList) {
|
||||
if (this.item.dataList.length > 0) {
|
||||
newRes = res.filter(item => {
|
||||
return !this.item.dataList.includes(item.pysclQtyId);
|
||||
});
|
||||
res = newRes;
|
||||
}
|
||||
}
|
||||
|
||||
// res = [
|
||||
// {
|
||||
// 'pysclQtyId' : 'PYSCL00001',
|
||||
// 'pysclQtyCd' : 'AMP_1A',
|
||||
// 'pysclQtyNm' : '회로1 전류A',
|
||||
// 'pysclQtyTpNm' : 'TAG'
|
||||
// res = await this.postApiReturn({
|
||||
// apiKey: 'selectEgrpPysclQtyPop',
|
||||
// resKey: 'egrpPysclQtyData',
|
||||
// sendParam: {
|
||||
// searchWord: this.searchWord,
|
||||
// eqpmGrpId: this.selectValue01,
|
||||
// openMode: this.item.openMode,
|
||||
// },
|
||||
// });
|
||||
// let newRes = [];
|
||||
// let tempTagList = this.pyscPopVal.split('/*wq2a/');
|
||||
// let tagList = tempTagList.filter(item => item != '');
|
||||
// if (tagList.length > 0) {
|
||||
// newRes = res.filter(item => {
|
||||
// return !tagList.includes(item.pysclQtyId);
|
||||
// });
|
||||
// res = newRes;
|
||||
// }
|
||||
|
||||
// //이미 선택된 값들 제거(배열)
|
||||
// if (this.item.dataList) {
|
||||
// if (this.item.dataList.length > 0) {
|
||||
// newRes = res.filter(item => {
|
||||
// return !this.item.dataList.includes(item.pysclQtyId);
|
||||
// });
|
||||
// res = newRes;
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
|
||||
res = [
|
||||
{
|
||||
'pysclQtyId': 'PYSCL00001',
|
||||
'pysclQtyCd': 'AMP_1A',
|
||||
'pysclQtyNm': '회로1 전류A',
|
||||
'pysclQtyTpNm': 'TAG'
|
||||
|
||||
}
|
||||
]
|
||||
this.setModalGridData({
|
||||
modalKey: this.myModalKey,
|
||||
gridKey: this.grid_01,
|
||||
@ -491,10 +480,10 @@ export default {
|
||||
this.dialog = flag;
|
||||
},
|
||||
async dialogOpenCloseEvent(val) {
|
||||
await this.setSelectValueList01();
|
||||
if (!this.myBindingData) {
|
||||
return alert('그리드를 먼저 선택해주세요.');
|
||||
}
|
||||
// await this.setSelectValueList01();
|
||||
// if (!this.myBindingData) {
|
||||
// return alert('그리드를 먼저 선택해주세요.');
|
||||
// }
|
||||
this.dialog = !val;
|
||||
},
|
||||
deleteBtnAction(v) {
|
||||
@ -562,33 +551,12 @@ var egrpPysclQtyPop = {
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.ant-btn-icon-only {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user