add pagination for screen 27 move pagination screen 28 #62
@ -30,16 +30,17 @@
|
|||||||
</v-row>
|
</v-row>
|
||||||
<v-row ref="contents">
|
<v-row ref="contents">
|
||||||
<v-col :cols="12" class="h100">
|
<v-col :cols="12" class="h100">
|
||||||
<v-card class="px-5 py-5 h100">
|
<v-card class="px-5 py-5">
|
||||||
<div ref="gridParent" class="h100 px-5">
|
<div ref="gridParent" class="px-5" style="height:calc(100% - 40px)">
|
||||||
<component ref="myGrid" :is="loadGrid ? 'Grid' : null" :gridName="gridName"
|
<component ref="myGrid" :is="loadGrid ? 'Grid' : null" :gridName="gridName"
|
||||||
:parentPrgmId="myPrgmId" />
|
:parentPrgmId="myPrgmId" />
|
||||||
</div>
|
</div>
|
||||||
|
<div class="d-flex align-center justify-center pa-5" v-if="loadGrid && totalCount > 0">
|
||||||
|
<pagination id="pagination" :total-count="totalCount" :page-num="page" :limit="limit"
|
||||||
|
@loadData="changeGrid" />
|
||||||
|
</div>
|
||||||
</v-card>
|
</v-card>
|
||||||
<div class="d-flex align-center justify-center pa-5" v-if="loadGrid && totalCount > 0" >
|
|
||||||
<pagination id="pagination" :total-count="totalCount" :page-num="page" :limit="limit"
|
|
||||||
@loadData="changeGrid" />
|
|
||||||
</div>
|
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</div>
|
</div>
|
||||||
@ -212,7 +213,7 @@ export default {
|
|||||||
},
|
},
|
||||||
layoutInit() {
|
layoutInit() {
|
||||||
const searchFilterHeight = this.$refs.searchFilter.offsetHeight;
|
const searchFilterHeight = this.$refs.searchFilter.offsetHeight;
|
||||||
this.$refs.contents.style.height = `calc(100% - 90px - ${searchFilterHeight}px) `;
|
this.$refs.contents.style.height = `calc(100% - 30px - ${searchFilterHeight}px) `;
|
||||||
},
|
},
|
||||||
async setFromDt() {
|
async setFromDt() {
|
||||||
this.pageData.fromDt = Utility.setBeforetDate(
|
this.pageData.fromDt = Utility.setBeforetDate(
|
||||||
|
@ -100,6 +100,10 @@
|
|||||||
:gridName="gridName"
|
:gridName="gridName"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="d-flex align-center justify-center pa-5" v-if="loadGrid && totalCount > 0">
|
||||||
|
<pagination id="pagination" :total-count="totalCount" :page-num="page" :limit="limit"
|
||||||
|
@loadData="changeGrid" />
|
||||||
|
</div>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
@ -117,6 +121,7 @@ import selectCodeList from "@/components/common/select/selectCodeList";
|
|||||||
import SelectMttList from "@/components/common/select/SelectMttList";
|
import SelectMttList from "@/components/common/select/SelectMttList";
|
||||||
import Datepicker from "~/components/common/Datepicker";
|
import Datepicker from "~/components/common/Datepicker";
|
||||||
import BtnExcelDownload from "~/components/common/button/BtnExcelDownload";
|
import BtnExcelDownload from "~/components/common/button/BtnExcelDownload";
|
||||||
|
import pagination from '~/components/common/Pagination';
|
||||||
|
|
||||||
let myTitle;
|
let myTitle;
|
||||||
// const myPrgmId = "PRG0018";
|
// const myPrgmId = "PRG0018";
|
||||||
@ -144,27 +149,18 @@ export default {
|
|||||||
Datepicker,
|
Datepicker,
|
||||||
Search,
|
Search,
|
||||||
Grid,
|
Grid,
|
||||||
|
pagination,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
myPrgmId: myPrgmId,
|
myPrgmId: myPrgmId,
|
||||||
gridName: "rowGrid",
|
gridName: "rowGrid",
|
||||||
loadGrid: false,
|
loadGrid: false,
|
||||||
dataPathMock: {
|
itemsPerPage: 10,
|
||||||
rowGrid: {
|
itemsPerPageArray: [10, 20, 30],
|
||||||
column: [
|
limit: 20,
|
||||||
{ header: "태그", name: "id", headerAlign: "left" },
|
page: 1,
|
||||||
{ header: "배율", name: "lable", headerAlign: "left" },
|
totalCount: 0,
|
||||||
{ header: "설비비", name: "type", headerAlign: "left" },
|
|
||||||
{ header: "설비배분비율", name: "note", headerAlign: "left" },
|
|
||||||
{ header: "금일데이터", name: "note", headerAlign: "left" },
|
|
||||||
{ header: "최종마감시각", name: "date", headerAlign: "left" },
|
|
||||||
],
|
|
||||||
data: dataPathDataExample,
|
|
||||||
defaultRow: dataPathDataExample,
|
|
||||||
option: {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -190,7 +186,10 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
chkIsFind(val) {
|
chkIsFind(val) {
|
||||||
if (val) this.search();
|
if (val) {
|
||||||
|
this.page = 1;
|
||||||
|
this.search();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
chkBlocId() {
|
chkBlocId() {
|
||||||
this.setPageData({ isFind: true });
|
this.setPageData({ isFind: true });
|
||||||
@ -243,10 +242,6 @@ export default {
|
|||||||
columnOptions: {
|
columnOptions: {
|
||||||
resizable: true,
|
resizable: true,
|
||||||
},
|
},
|
||||||
pageOptions: {
|
|
||||||
useClient: true,
|
|
||||||
perPage: 13,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
this.setGridOption({
|
this.setGridOption({
|
||||||
gridKey: this.gridName,
|
gridKey: this.gridName,
|
||||||
@ -261,6 +256,8 @@ export default {
|
|||||||
await this.getRowGridData();
|
await this.getRowGridData();
|
||||||
},
|
},
|
||||||
async getRowGridData() {
|
async getRowGridData() {
|
||||||
|
this.loadGrid = false;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
this.pageData.blocMstrList.length > 0 &&
|
this.pageData.blocMstrList.length > 0 &&
|
||||||
this.pageData.commCdList.length > 0 &&
|
this.pageData.commCdList.length > 0 &&
|
||||||
@ -274,8 +271,25 @@ export default {
|
|||||||
mttCd: this.pageData.commCd, // 검침대상유형
|
mttCd: this.pageData.commCd, // 검침대상유형
|
||||||
mttTp: this.pageData.readObjId, // 검침대상
|
mttTp: this.pageData.readObjId, // 검침대상
|
||||||
readDt: this.pageData.fromDt, // 조회기간
|
readDt: this.pageData.fromDt, // 조회기간
|
||||||
|
limit: this.limit,
|
||||||
|
page: this.page,
|
||||||
|
offset: (this.page - 1) * this.limit, // MariaDB Query에서 직접 계산이 안됨
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const res2 = await this.postApiReturn({
|
||||||
|
apiKey: 'selectReadResultCloseMngPageTotal',
|
||||||
|
resKey: 'cdKindPageTotal',
|
||||||
|
sendParam: {
|
||||||
|
blocId: this.pageData.blocMstrList[this.pageData.blocId].blocId, // 사업장
|
||||||
|
mttCd: this.pageData.commCd, // 검침대상유형
|
||||||
|
mttTp: this.pageData.readObjId, // 검침대상
|
||||||
|
readDt: this.pageData.fromDt, // 조회기간
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
this.totalCount = res2[0].totalcount;
|
||||||
|
|
||||||
this.setGridData({
|
this.setGridData({
|
||||||
gridKey: this.gridName,
|
gridKey: this.gridName,
|
||||||
value: res.map((item) => ({
|
value: res.map((item) => ({
|
||||||
@ -325,6 +339,12 @@ export default {
|
|||||||
this.setPageData({ isFind: true });
|
this.setPageData({ isFind: true });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
changeGrid: async function (pageNum, limit) {
|
||||||
|
this.page = pageNum;
|
||||||
|
this.limit = limit;
|
||||||
|
|
||||||
|
this.search();
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -431,13 +451,4 @@ const myColumns = [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
import { getPathDataExample } from "@/const/const";
|
|
||||||
const dataPathDataExample = getPathDataExample({
|
|
||||||
id: "INCHEON.HVAC.EQP_HT_CH001.UT_CH101.CHI_AMP_1A_PV",
|
|
||||||
lable: "INCHEON 고온 냉동기 101호기 - 호로1",
|
|
||||||
type: "사용",
|
|
||||||
note: "-",
|
|
||||||
date: "2023-01-10 20:02:00",
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -210,6 +210,8 @@ const INIT_URL_STATE = {
|
|||||||
// prgmId: "TMP0013" 검침실적마감관리 ems/ReadResultCloseMngPage
|
// prgmId: "TMP0013" 검침실적마감관리 ems/ReadResultCloseMngPage
|
||||||
selectReadResultCloseMng:
|
selectReadResultCloseMng:
|
||||||
'ems/base/ReadResultCloseMngCtr/selectReadResultCloseMng', // 일일검침정보
|
'ems/base/ReadResultCloseMngCtr/selectReadResultCloseMng', // 일일검침정보
|
||||||
|
selectReadResultCloseMngPageTotal:
|
||||||
|
'ems/base/ReadResultCloseMngCtr/selectReadResultCloseMngPageTotal', // 일일검침정보
|
||||||
saveReadResultCloseMngSP:
|
saveReadResultCloseMngSP:
|
||||||
'ems/base/ReadResultCloseMngCtr/saveReadResultCloseMngSP', // 전월 or 일 마감
|
'ems/base/ReadResultCloseMngCtr/saveReadResultCloseMngSP', // 전월 or 일 마감
|
||||||
saveReadResultCloseMngSPMM:
|
saveReadResultCloseMngSPMM:
|
||||||
|
Reference in New Issue
Block a user