서비스점검설정 프론트

This commit is contained in:
2023-05-17 10:54:08 +09:00
parent bda68878ae
commit c7552afa95
2 changed files with 45 additions and 10 deletions

View File

@@ -2,13 +2,13 @@
<div class="contents">
<div class="contents_wrap">
<div class="top_wrap">
<h3 class="title">알림 이력</h3>
<p class="breadcrumb">알림 이력</p>
<h3 class="title">서비스 점검 설정</h3>
<p class="breadcrumb">서비스 점검 설정</p>
</div>
<div class="search_wrap">
<div class="group">
<div class="input_box cal">
<label for="right" class="label">조회기간</label>
<label for="right" class="label">기간설정</label>
<div class="term">
<span class="custom_input icon_date">
<vuejs-datepicker
@@ -80,6 +80,7 @@ export default {
sDateDiv: 'day',
startDate: new Date(),
totalItems: 0,
row: {},
grid: {
url: '/api/v1/bo/sysMgt/svcCheckList',
pagePerRows: 50,
@@ -103,6 +104,10 @@ export default {
endTime : '',
state: 'use'
},
startTime : '',
endTime : '',
state: '',
};
},
components: {
@@ -140,17 +145,41 @@ export default {
fnSaveTxt(){
let params = {
startDate : moment(this.startDate).format('YYYY-MM-DD'),
startTimeT : this.startTime.HH,
startTimeM : this.startTime.mm,
endTimeT : this.endTime.HH,
endTimeM : this.endTime.mm,
startTimeT : '',
startTimeM : '',
endTimeT : '',
endTimeM : '',
state : this.state,
}
sysMgtApi.setWorkState(params);
if (this.startTime) {
params.startTimeT = moment(this.startTime, 'HH:mm').format('HH');
params.startTimeM = moment(this.startTime, 'HH:mm').format('mm');
}
if (this.endTime) {
params.endTimeT = moment(this.endTime, 'HH:mm').format('HH');
params.endTimeM = moment(this.endTime, 'HH:mm').format('mm');
}
sysMgtApi.setWorkState(params).then(() => {
// 저장이 완료된 후에 테이블 다시 로드
this.$nextTick(() => {
this.$refs.table.reloadData();
});
});
},
search: function (isKeep) {
this.$refs.table.search(this.grid.params, isKeep);
const getP = this.$refs.table.getPagination();
this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage,
perPage: this.perPageCnt,
params: this.grid.params,
});
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
},
changePerPage: function () {
// 페이지당 조회할 개수
@@ -178,6 +207,14 @@ export default {
return moment(date).format('YYYY-MM-DD');
}
},
beforeRouteLeave(to, from, next) {
const getP = this.$refs.table.getPagination();
this.$store.commit('searchcondition/updateSearchCondition', {
params: this.grid.params,
});
// 라우트 하기전 실행
next();
},
}
};