Update screen 30, 13, 22
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
<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>
|
||||
@ -20,28 +21,29 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row ref="contents" id="CalendarMngContent" class="mt-4">
|
||||
<v-col cols="12" lg="4" class="h100 pr-2">
|
||||
<v-col cols="12" lg="4" class=" pr-2">
|
||||
<v-card class="w100">
|
||||
<v-card-title class="d-flex justify-space-between align-center">
|
||||
<span class="custom-title-4">캘린더 리스트</span>
|
||||
<Buttons :parentPrgmId="myPrgmId" :bindingData="gridName" :btnActionsFnc="btnActions" />
|
||||
</v-card-title>
|
||||
<v-card-actions class="pt-0 px-5 pb-5" :style="{ height: 'calc(100% - 72.56px)' }">
|
||||
<v-card-actions class="pt-0 px-5 pb-5" :style="{ height: 'calc(100% - 10px)' }">
|
||||
<div ref="gridParent" class="w100 h100">
|
||||
<component class="w100" :ref="gridName + myPrgmId" :is="loadGrid ? 'Grid' : null"
|
||||
:gridName="gridName" :parentPrgmId="myPrgmId" :editorGrid="true"
|
||||
@getRowsData="getRowData" :dataPath="dataPathExample" />
|
||||
@getRowsData="getRowData" />
|
||||
</div>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-col>
|
||||
<v-col cols="12" lg="8" class="h100 pl-3">
|
||||
<v-col cols="12" lg="8" class=" pl-3">
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<span class="custom-title-4">캘린더 미리보기</span>
|
||||
</v-card-title>
|
||||
<v-card-actions class="px-5 d-block" :style="{ height: 'calc(100% - 62px)' }">
|
||||
<Calendar :parentPrgmId="myPrgmId" :gridName="gridName" :headerVisible="false" />
|
||||
<v-card-actions class="px-5 d-block" >
|
||||
<Calendar :parentPrgmId="myPrgmId" :gridName="gridName" :headerVisible="false"
|
||||
:showTitle="false" />
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-col>
|
||||
@ -94,81 +96,7 @@ export default {
|
||||
return {
|
||||
myPrgmId: myPrgmId,
|
||||
gridName: 'rowGrid',
|
||||
loadGrid: true,
|
||||
dataPathExample: {
|
||||
"rowGrid": {
|
||||
data: [
|
||||
{
|
||||
"hldyFg": "평일",
|
||||
"hldyNm": ""
|
||||
},
|
||||
{
|
||||
"dt": "2025-07-23",
|
||||
"dtNm": "수요일",
|
||||
"dt": "2025-07-21",
|
||||
"dtNm": "월요일",
|
||||
"hldyFg": "평일",
|
||||
"hldyNm": ""
|
||||
},
|
||||
{
|
||||
"dt": "2025-07-22",
|
||||
"dtNm": "화요일",
|
||||
"hldyFg": "평일",
|
||||
"hldyNm": ""
|
||||
},
|
||||
{
|
||||
"dt": "2025-07-24",
|
||||
"dtNm": "목요일",
|
||||
"hldyFg": "평일",
|
||||
"hldyNm": ""
|
||||
},
|
||||
{
|
||||
"dt": "2025-07-25",
|
||||
"dtNm": "금요일",
|
||||
"hldyFg": "평일",
|
||||
"hldyNm": ""
|
||||
},
|
||||
{
|
||||
"dt": "2025-07-26",
|
||||
"dtNm": "토요일",
|
||||
"hldyFg": "주말",
|
||||
"hldyNm": ""
|
||||
},
|
||||
{
|
||||
"dt": "2025-07-27",
|
||||
"dtNm": "일요일",
|
||||
"hldyFg": "휴일",
|
||||
"hldyNm": "정기휴일"
|
||||
}
|
||||
],
|
||||
column: [
|
||||
{
|
||||
header: '일자',
|
||||
name: 'dt',
|
||||
align: 'center',
|
||||
// formatter({ value }) {
|
||||
// return value.split(' ')[0];
|
||||
// },
|
||||
},
|
||||
{
|
||||
header: '요일',
|
||||
name: 'dtNm',
|
||||
align: 'center',
|
||||
// formatter({ value }) {
|
||||
// return value + '요일';
|
||||
// },
|
||||
},
|
||||
{
|
||||
header: '구분',
|
||||
name: 'hldyFg',
|
||||
align: 'center',
|
||||
essential: true,
|
||||
},
|
||||
{ header: '휴일명', name: 'hldyNm', editor: 'text' },
|
||||
],
|
||||
|
||||
}
|
||||
},
|
||||
loadGrid: false,
|
||||
rowKey: null,
|
||||
edtingFinishFlag: 'Y',
|
||||
};
|
||||
@ -241,16 +169,19 @@ export default {
|
||||
await this.gridInit();
|
||||
},
|
||||
async search() {
|
||||
// await this.getRowGridData();
|
||||
await this.getRowGridData();
|
||||
},
|
||||
async gridInit() {
|
||||
// const gridHeight = this.$refs.gridParent.offsetHeight - 30;
|
||||
// this.setGridOption({
|
||||
// gridKey: this.gridName,
|
||||
// value: Object.assign(Utility.defaultGridOption(gridHeight), {
|
||||
// scrollX: false,
|
||||
// }),
|
||||
// });
|
||||
const gridHeight = this.$refs.gridParent.offsetHeight - 30;
|
||||
this.setGridOption({
|
||||
gridKey: this.gridName,
|
||||
value: Object.assign(Utility.defaultGridOption(gridHeight), {
|
||||
scrollX: false, header: {
|
||||
height: 37,
|
||||
},
|
||||
rowHeight: 37,
|
||||
}),
|
||||
});
|
||||
|
||||
// this.getRowGridData();
|
||||
},
|
||||
@ -350,86 +281,86 @@ export default {
|
||||
|
||||
this.loadGrid = false;
|
||||
|
||||
// let res = await this.postApiReturn({
|
||||
// apiKey: 'selectWorkCald',
|
||||
// resKey: 'workcaldData',
|
||||
// sendParam: {
|
||||
// blocId: this.pageData.blocMstrList[this.chkBlocCd].blocId,
|
||||
// yymm: this.chkFromDt,
|
||||
// comId: this.comId,
|
||||
// },
|
||||
// });
|
||||
let res = await this.postApiReturn({
|
||||
apiKey: 'selectWorkCald',
|
||||
resKey: 'workcaldData',
|
||||
sendParam: {
|
||||
blocId: this.pageData.blocMstrList[this.chkBlocCd].blocId,
|
||||
yymm: this.chkFromDt,
|
||||
comId: this.comId,
|
||||
},
|
||||
});
|
||||
|
||||
// let res2 = await this.postApiReturn({
|
||||
// apiKey: 'selectWorkCaldDetl',
|
||||
// resKey: 'workcaldDetlData',
|
||||
// sendParam: {
|
||||
// blocId: this.pageData.blocMstrList[this.chkBlocCd].blocId,
|
||||
// yymm: this.chkFromDt,
|
||||
// comId: this.comId,
|
||||
// },
|
||||
// });
|
||||
let res2 = await this.postApiReturn({
|
||||
apiKey: 'selectWorkCaldDetl',
|
||||
resKey: 'workcaldDetlData',
|
||||
sendParam: {
|
||||
blocId: this.pageData.blocMstrList[this.chkBlocCd].blocId,
|
||||
yymm: this.chkFromDt,
|
||||
comId: this.comId,
|
||||
},
|
||||
});
|
||||
|
||||
// for (var i = 0; i < res2.length; i++) {
|
||||
// if (
|
||||
// !(
|
||||
// res2[i].hldyNm == null ||
|
||||
// res2[i].hldyNm == '토요일' ||
|
||||
// res2[i].hldyNm == '일요일'
|
||||
// )
|
||||
// ) {
|
||||
// for (var j = i + 1; j < res2.length; j++) {
|
||||
// if (res2[i].hldyNm == res2[j].hldyNm) {
|
||||
// res2[i].hldyNm = '';
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
for (var i = 0; i < res2.length; i++) {
|
||||
if (
|
||||
!(
|
||||
res2[i].hldyNm == null ||
|
||||
res2[i].hldyNm == '토요일' ||
|
||||
res2[i].hldyNm == '일요일'
|
||||
)
|
||||
) {
|
||||
for (var j = i + 1; j < res2.length; j++) {
|
||||
if (res2[i].hldyNm == res2[j].hldyNm) {
|
||||
res2[i].hldyNm = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// res = res.map(item => {
|
||||
// const dt = this.$dayjs(item.dt.split(' ')[0]); // YYYY-MM-DD
|
||||
// const dtNm = dt.format('ddd'); // 요일
|
||||
// const newItem = {
|
||||
// ...item,
|
||||
// dtNm: dtNm,
|
||||
// hldyNm: item.hldyNm ? item.hldyNm : '',
|
||||
// rowStat: null,
|
||||
// };
|
||||
// return newItem;
|
||||
// });
|
||||
res = res.map(item => {
|
||||
const dt = this.$dayjs(item.dt.split(' ')[0]); // YYYY-MM-DD
|
||||
const dtNm = dt.format('ddd'); // 요일
|
||||
const newItem = {
|
||||
...item,
|
||||
dtNm: dtNm,
|
||||
hldyNm: item.hldyNm ? item.hldyNm : '',
|
||||
rowStat: null,
|
||||
};
|
||||
return newItem;
|
||||
});
|
||||
|
||||
// this.loadGrid = true;
|
||||
// this.setPageData({ isFind: false });
|
||||
this.loadGrid = true;
|
||||
this.setPageData({ isFind: false });
|
||||
|
||||
// this.setGridColumn({
|
||||
// gridKey: this.gridName,
|
||||
// value: myColumns,
|
||||
// });
|
||||
this.setGridColumn({
|
||||
gridKey: this.gridName,
|
||||
value: myColumns,
|
||||
});
|
||||
|
||||
// this.setGridData({
|
||||
// gridKey: this.gridName,
|
||||
// value: res,
|
||||
// });
|
||||
this.setGridData({
|
||||
gridKey: this.gridName,
|
||||
value: res,
|
||||
});
|
||||
|
||||
// this.setPageData({ planData: res2 });
|
||||
this.setPageData({ planData: res2 });
|
||||
|
||||
// // 첫번째 row 선택상태
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs[this.gridName + this.myPrgmId].focus({
|
||||
// //rowKey: 0,
|
||||
// rowKey:
|
||||
// this.pageData.rowGridSelectKey == '' ||
|
||||
// this.pageData.rowGridSelectKey == null
|
||||
// ? 0
|
||||
// : this.pageData.rowGridSelectKey ==
|
||||
// this.$refs[this.gridName + this.myPrgmId].getData().length - 1
|
||||
// ? this.pageData.rowGridSelectKey
|
||||
// : 0,
|
||||
// columnName: 'dt',
|
||||
// setScroll: true,
|
||||
// });
|
||||
// this.setPageData({ isFind: false });
|
||||
// });
|
||||
// 첫번째 row 선택상태
|
||||
this.$nextTick(() => {
|
||||
this.$refs[this.gridName + this.myPrgmId].focus({
|
||||
//rowKey: 0,
|
||||
rowKey:
|
||||
this.pageData.rowGridSelectKey == '' ||
|
||||
this.pageData.rowGridSelectKey == null
|
||||
? 0
|
||||
: this.pageData.rowGridSelectKey ==
|
||||
this.$refs[this.gridName + this.myPrgmId].getData().length - 1
|
||||
? this.pageData.rowGridSelectKey
|
||||
: 0,
|
||||
columnName: 'dt',
|
||||
setScroll: true,
|
||||
});
|
||||
this.setPageData({ isFind: false });
|
||||
});
|
||||
},
|
||||
async getRowData(data, gridName) {
|
||||
this.setGridSelectData({
|
||||
@ -604,4 +535,17 @@ select.selectbox {
|
||||
border-width: 0px;
|
||||
// box-sizing: border-box;
|
||||
}
|
||||
|
||||
::v-deep {
|
||||
.custom-vc-calender {
|
||||
.vc-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.vc-weeks {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user