Update screen 30, 13, 22
This commit is contained in:
@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<div class="l-layout">
|
||||
<!-- 조회조견 -->
|
||||
<v-row ref="searchFilter">
|
||||
<common-page-title />
|
||||
<v-row ref="searchFilter" class="mt-2">
|
||||
<v-col :cols="12">
|
||||
<v-card class="searchFilter">
|
||||
<v-row align="end" no-gutters>
|
||||
@ -24,7 +25,7 @@
|
||||
:customClass="'select-large'"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col :cols="2.5">
|
||||
<v-col :cols="2.5" class="pr-4">
|
||||
<component
|
||||
:is="'selectCodeList'"
|
||||
:parentPrgmId="myPrgmId"
|
||||
@ -34,7 +35,7 @@
|
||||
:customClass="'select-large'"
|
||||
/>
|
||||
</v-col>
|
||||
<BtnSearch size="large" />
|
||||
<BtnSearch size="large" class="mr-2" />
|
||||
|
||||
</v-row>
|
||||
</v-card>
|
||||
@ -57,7 +58,7 @@
|
||||
<div class="px-4">
|
||||
<div ref="gridParent" class="h100 w100">
|
||||
<component :ref="gridName" :is="loadGrid ? 'Grid' : null" :parentPrgmId="myPrgmId"
|
||||
:gridName="gridName" @getRowsData="getRowData" :dataPath="dataPathExample" />
|
||||
:gridName="gridName" @getRowsData="getRowData" />
|
||||
</div>
|
||||
<!-- </v-card-actions> -->
|
||||
</div>
|
||||
@ -77,7 +78,7 @@
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-col>
|
||||
<v-dialog ref="popModal" v-model="dialog" width="700" overlay-color="#000" overlay-opacity="0.8" scrollable>
|
||||
<v-dialog ref="popModal" v-model="dialog" width="800" overlay-color="#000" overlay-opacity="0.8" scrollable>
|
||||
<v-card style="height: 100%">
|
||||
<v-card-title class="v-card__title d-flex align-center justify-space-between">
|
||||
<span class="custom-title-4">DB 프로시져 파라메터 설정</span>
|
||||
@ -91,7 +92,6 @@
|
||||
<v-col cols="12" class="text-right"> </v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
<v-divider></v-divider>
|
||||
<v-card-text style="height: 300px;">
|
||||
<div id="gridParent" class="mt-6" style="height:calc(100% - 36px);">
|
||||
<div style="height:calc(100% - 36px);">
|
||||
@ -101,7 +101,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary" dark @click="setParamChangeData()">확인</v-btn>
|
||||
@ -155,76 +154,16 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
myPrgmId: myPrgmId,
|
||||
loadGrid: true,
|
||||
loadGrid: false,
|
||||
gridName: 'rowGrid',
|
||||
dataPathExample: {
|
||||
"rowGrid": {
|
||||
data: [
|
||||
{
|
||||
"batchId": "BATCH001",
|
||||
"batchNm": "일일 데이터 백업",
|
||||
"batchExecTp": "자동 실행",
|
||||
"batchDupExecFg": "N",
|
||||
"useFg": "사용"
|
||||
},
|
||||
{
|
||||
"batchId": "BATCH002",
|
||||
"batchNm": "월간 리포트 생성",
|
||||
"batchExecTp": "수동 실행",
|
||||
"batchDupExecFg": "Y",
|
||||
"useFg": "사용"
|
||||
},
|
||||
{
|
||||
"batchId": "BATCH003",
|
||||
"batchNm": "로그 정리 작업",
|
||||
"batchExecTp": "자동 실행",
|
||||
"batchDupExecFg": "N",
|
||||
"useFg": "미사용"
|
||||
},
|
||||
{
|
||||
"batchId": "BATCH004",
|
||||
"batchNm": "사용자 통계 수집",
|
||||
"batchExecTp": "예약 실행",
|
||||
"batchDupExecFg": "Y",
|
||||
"useFg": "사용"
|
||||
},
|
||||
{
|
||||
"batchId": "BATCH005",
|
||||
"batchNm": "서버 상태 점검",
|
||||
"batchExecTp": "수동 실행",
|
||||
"batchDupExecFg": "N",
|
||||
"useFg": "미사용"
|
||||
}
|
||||
]
|
||||
|
||||
,
|
||||
column: [
|
||||
{ header: '배치ID', name: 'batchId', align: 'center', width: 100 },
|
||||
{ header: '배치명', name: 'batchNm', minWidth: 200 },
|
||||
{
|
||||
header: '배치 실행 구분',
|
||||
name: 'batchExecTp',
|
||||
align: 'left',
|
||||
minWidth: 190,
|
||||
},
|
||||
{ header: '배치 중복 여부', name: 'batchDupExecFg', hidden: true },
|
||||
{
|
||||
header: '사용여부',
|
||||
name: 'useFg',
|
||||
align: 'center',
|
||||
width: 145,
|
||||
},
|
||||
],
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
// rowGridOrigin: [],
|
||||
detailList: myDetail,
|
||||
|
||||
// 파라메터 셋팅용 변수
|
||||
dialog: false,
|
||||
gridNameParam: 'paramGrid',
|
||||
paramLoadGrid: true,
|
||||
paramLoadGrid: false,
|
||||
selectedGridNameParamRow: null,
|
||||
};
|
||||
},
|
||||
@ -292,7 +231,7 @@ export default {
|
||||
}),
|
||||
init() {
|
||||
// this.layoutInit();
|
||||
// this.gridInit();
|
||||
this.gridInit();
|
||||
this.gridParamInit();
|
||||
},
|
||||
// layoutInit() {
|
||||
@ -309,6 +248,10 @@ export default {
|
||||
columnOptions: {
|
||||
resizable: true,
|
||||
},
|
||||
header: {
|
||||
height: 37,
|
||||
},
|
||||
rowHeight: 37,
|
||||
};
|
||||
this.setGridOption({
|
||||
gridKey: this.gridName,
|
||||
@ -384,7 +327,7 @@ export default {
|
||||
},
|
||||
async search() {
|
||||
// console.log("search");
|
||||
// await this.getRowGridData();
|
||||
await this.getRowGridData();
|
||||
await this.setPageData({
|
||||
isFind: false,
|
||||
});
|
||||
@ -629,20 +572,20 @@ export default {
|
||||
gridKey: this.gridNameParam,
|
||||
value: myOptions,
|
||||
});
|
||||
// setTimeout(() => { });
|
||||
setTimeout(() => { });
|
||||
|
||||
// let modeList = [];
|
||||
// const modeIn = { text: 'IN', value: 'IN' };
|
||||
// const modeOut = { text: 'OUT', value: 'OUT' };
|
||||
// modeList.push(modeIn);
|
||||
// modeList.push(modeOut);
|
||||
// let typeList = [];
|
||||
// const typeInt = { text: 'INT', value: 'int' };
|
||||
// const typeStr = { text: 'STRING', value: 'str' };
|
||||
// const typeFunc = { text: 'FUNCTION', value: 'function' };
|
||||
// typeList.push(typeInt);
|
||||
// typeList.push(typeStr);
|
||||
// typeList.push(typeFunc);
|
||||
let modeList = [];
|
||||
const modeIn = { text: 'IN', value: 'IN' };
|
||||
const modeOut = { text: 'OUT', value: 'OUT' };
|
||||
modeList.push(modeIn);
|
||||
modeList.push(modeOut);
|
||||
let typeList = [];
|
||||
const typeInt = { text: 'INT', value: 'int' };
|
||||
const typeStr = { text: 'STRING', value: 'str' };
|
||||
const typeFunc = { text: 'FUNCTION', value: 'function' };
|
||||
typeList.push(typeInt);
|
||||
typeList.push(typeStr);
|
||||
typeList.push(typeFunc);
|
||||
|
||||
const myColumns = [
|
||||
{ header: 'ID', name: 'id', editor: 'text' },
|
||||
@ -664,27 +607,27 @@ export default {
|
||||
header: 'Type',
|
||||
name: 'type',
|
||||
align: 'center',
|
||||
// formatter({ value }) {
|
||||
// let retVal = '';
|
||||
// switch (value) {
|
||||
// case 'int':
|
||||
// retVal = 'INT';
|
||||
// break;
|
||||
// case 'str':
|
||||
// retVal = 'STRING';
|
||||
// break;
|
||||
// case 'function':
|
||||
// retVal = 'FUNCTION';
|
||||
// break;
|
||||
// }
|
||||
// return retVal;
|
||||
// },
|
||||
// editor: {
|
||||
// type: 'select',
|
||||
// options: {
|
||||
// listItems: typeList,
|
||||
// },
|
||||
// },
|
||||
formatter({ value }) {
|
||||
let retVal = '';
|
||||
switch (value) {
|
||||
case 'int':
|
||||
retVal = 'INT';
|
||||
break;
|
||||
case 'str':
|
||||
retVal = 'STRING';
|
||||
break;
|
||||
case 'function':
|
||||
retVal = 'FUNCTION';
|
||||
break;
|
||||
}
|
||||
return retVal;
|
||||
},
|
||||
editor: {
|
||||
type: 'select',
|
||||
options: {
|
||||
listItems: typeList,
|
||||
},
|
||||
},
|
||||
},
|
||||
{ header: '값', name: 'val', editor: 'text' },
|
||||
{ header: 'rowStat', name: 'rowStat', hidden: true },
|
||||
@ -703,86 +646,49 @@ export default {
|
||||
|
||||
// /* this.pageData.paramStrData 처리 */
|
||||
// // console.log("this.pageData.paramStrData : ", JSON.parse(this.pageData.paramStrData));
|
||||
// let rowData = {};
|
||||
// if (
|
||||
// this.pageData.paramStrData.startsWith('{') &&
|
||||
// this.pageData.paramStrData.endsWith('}')
|
||||
// ) {
|
||||
// rowData = JSON.parse(this.pageData.paramStrData);
|
||||
// }
|
||||
// var keys = Object.keys(rowData); //키를 가져옵니다. 이때, keys 는 반복가능한 객체가 됩니다.
|
||||
// for (var i = 0; i < keys.length; i++) {
|
||||
// var key = keys[i];
|
||||
// res.push(rowData[key]);
|
||||
// }
|
||||
let rowData = {};
|
||||
if (
|
||||
this.pageData.paramStrData.startsWith('{') &&
|
||||
this.pageData.paramStrData.endsWith('}')
|
||||
) {
|
||||
rowData = JSON.parse(this.pageData.paramStrData);
|
||||
}
|
||||
var keys = Object.keys(rowData); //키를 가져옵니다. 이때, keys 는 반복가능한 객체가 됩니다.
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
var key = keys[i];
|
||||
res.push(rowData[key]);
|
||||
}
|
||||
|
||||
// const newRes = res.map(item => {
|
||||
// const newObj = {
|
||||
// ...item,
|
||||
// rowStat: null,
|
||||
// id: item.id || '',
|
||||
// mode: item.mode || 'in',
|
||||
// type: item.type || 'str',
|
||||
// val: item.val || '',
|
||||
// };
|
||||
// return newObj;
|
||||
// });
|
||||
const newRes = res.map(item => {
|
||||
const newObj = {
|
||||
...item,
|
||||
rowStat: null,
|
||||
id: item.id || '',
|
||||
mode: item.mode || 'in',
|
||||
type: item.type || 'str',
|
||||
val: item.val || '',
|
||||
};
|
||||
return newObj;
|
||||
});
|
||||
|
||||
const newRes = [
|
||||
{
|
||||
"id": "VAR001",
|
||||
"mode": "OUT",
|
||||
"type": "int",
|
||||
"val": "100",
|
||||
"rowStat": "C"
|
||||
},
|
||||
{
|
||||
"id": "VAR002",
|
||||
"mode": "IN",
|
||||
"type": "str",
|
||||
"val": "Hello World",
|
||||
"rowStat": "U"
|
||||
},
|
||||
{
|
||||
"id": "FUNC001",
|
||||
"mode": "out",
|
||||
"type": "function",
|
||||
"val": "calculateSum()",
|
||||
"rowStat": "C"
|
||||
},
|
||||
{
|
||||
"id": "VAR003",
|
||||
"mode": "IN",
|
||||
"type": "int",
|
||||
"val": "42",
|
||||
"rowStat": "D"
|
||||
},
|
||||
{
|
||||
"id": "VAR004",
|
||||
"mode": "OUT",
|
||||
"type": "str",
|
||||
"val": "Sample Text",
|
||||
"rowStat": "C"
|
||||
}
|
||||
];
|
||||
|
||||
this.setGridData({
|
||||
gridKey: this.gridNameParam,
|
||||
value: newRes,
|
||||
});
|
||||
// this.$nextTick(() => {
|
||||
// if (newRes.length > 0) {
|
||||
// try {
|
||||
// this.$refs[this.gridNameParam].focus({
|
||||
// //rowKey: 0,
|
||||
// rowKey: 0,
|
||||
// setScroll: true,
|
||||
// });
|
||||
// } catch (error) {
|
||||
// console.log('error[nextTick grid] : ', error);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
this.$nextTick(() => {
|
||||
if (newRes.length > 0) {
|
||||
try {
|
||||
this.$refs[this.gridNameParam].focus({
|
||||
//rowKey: 0,
|
||||
rowKey: 0,
|
||||
setScroll: true,
|
||||
});
|
||||
} catch (error) {
|
||||
console.log('error[nextTick grid] : ', error);
|
||||
}
|
||||
}
|
||||
});
|
||||
this.paramLoadGrid = true;
|
||||
},
|
||||
xlsDataBind(res) {
|
||||
@ -812,21 +718,21 @@ export default {
|
||||
inputClick(event, item, valueNm) {
|
||||
if (valueNm == 'refVal1') {
|
||||
this.dialog = true;
|
||||
// const rowIdxKey = this.$refs[this.gridName].gridInstance.invoke(
|
||||
// 'getFocusedCell',
|
||||
// ).rowKey;
|
||||
// const selectRowData = this.$refs[this.gridName].gridInstance.invoke(
|
||||
// 'getRow',
|
||||
// rowIdxKey,
|
||||
// );
|
||||
const rowIdxKey = this.$refs[this.gridName].gridInstance.invoke(
|
||||
'getFocusedCell',
|
||||
).rowKey;
|
||||
const selectRowData = this.$refs[this.gridName].gridInstance.invoke(
|
||||
'getRow',
|
||||
rowIdxKey,
|
||||
);
|
||||
|
||||
// if (selectRowData.batchExecTp == 'DP') {
|
||||
// // 여기에 팝업 레이어 띠우기 기능 추가
|
||||
// this.pageData.paramStrData = event.target.value;
|
||||
// this.pageData.paramChangeDataTarget = event.target;
|
||||
// this.getRowParamData();
|
||||
// this.dialog = true;
|
||||
// }
|
||||
if (selectRowData.batchExecTp == 'DP') {
|
||||
// 여기에 팝업 레이어 띠우기 기능 추가
|
||||
this.pageData.paramStrData = event.target.value;
|
||||
this.pageData.paramChangeDataTarget = event.target;
|
||||
this.getRowParamData();
|
||||
this.dialog = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
setParamChangeData() {
|
||||
|
Reference in New Issue
Block a user