서비스점검설정 프론트

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

@@ -86,12 +86,10 @@ const notiList = (params) => {
} }
const setWorkState = (params) => { const setWorkState = (params) => {
console.log("api호출",params)
return httpClient.post('/api/v1/bo/sysMgt/setWorkState', params, { withCredentials: false }) return httpClient.post('/api/v1/bo/sysMgt/setWorkState', params, { withCredentials: false })
} }
const svcCheckList = (params) => { const svcCheckList = (params) => {
console.log("api호출",params)
return httpClient.post('/api/v1/bo/sysMgt/svcCheckList', params, { withCredentials: false }) return httpClient.post('/api/v1/bo/sysMgt/svcCheckList', params, { withCredentials: false })
} }

View File

@@ -2,13 +2,13 @@
<div class="contents"> <div class="contents">
<div class="contents_wrap"> <div class="contents_wrap">
<div class="top_wrap"> <div class="top_wrap">
<h3 class="title">알림 이력</h3> <h3 class="title">서비스 점검 설정</h3>
<p class="breadcrumb">알림 이력</p> <p class="breadcrumb">서비스 점검 설정</p>
</div> </div>
<div class="search_wrap"> <div class="search_wrap">
<div class="group"> <div class="group">
<div class="input_box cal"> <div class="input_box cal">
<label for="right" class="label">조회기간</label> <label for="right" class="label">기간설정</label>
<div class="term"> <div class="term">
<span class="custom_input icon_date"> <span class="custom_input icon_date">
<vuejs-datepicker <vuejs-datepicker
@@ -80,6 +80,7 @@ export default {
sDateDiv: 'day', sDateDiv: 'day',
startDate: new Date(), startDate: new Date(),
totalItems: 0, totalItems: 0,
row: {},
grid: { grid: {
url: '/api/v1/bo/sysMgt/svcCheckList', url: '/api/v1/bo/sysMgt/svcCheckList',
pagePerRows: 50, pagePerRows: 50,
@@ -103,6 +104,10 @@ export default {
endTime : '', endTime : '',
state: 'use' state: 'use'
}, },
startTime : '',
endTime : '',
state: '',
}; };
}, },
components: { components: {
@@ -140,17 +145,41 @@ export default {
fnSaveTxt(){ fnSaveTxt(){
let params = { let params = {
startDate : moment(this.startDate).format('YYYY-MM-DD'), startDate : moment(this.startDate).format('YYYY-MM-DD'),
startTimeT : this.startTime.HH, startTimeT : '',
startTimeM : this.startTime.mm, startTimeM : '',
endTimeT : this.endTime.HH, endTimeT : '',
endTimeM : this.endTime.mm, endTimeM : '',
state : this.state, 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) { search: function (isKeep) {
this.$refs.table.search(this.grid.params, 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 () { changePerPage: function () {
// 페이지당 조회할 개수 // 페이지당 조회할 개수
@@ -178,6 +207,14 @@ export default {
return moment(date).format('YYYY-MM-DD'); 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();
},
} }
}; };