작업중

This commit is contained in:
2023-05-09 14:13:42 +09:00
parent c52c72b078
commit 96fe1ec899

View File

@@ -26,7 +26,7 @@
<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">
<timepicker v-model="StartTime" format="hh:mm A" minute-interval="15"></timepicker> <vue-timepicker v-model="StartTime" format="hh:mm A" :minute-interval="10"></vue-timepicker>
</span> </span>
</div> </div>
</div> </div>
@@ -34,54 +34,18 @@
<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">
<timepicker v-model="EndTime" format="hh:mm A" minute-interval="15"></timepicker> <vue-timepicker v-model="EndTime" format="hh:mm A" :minute-interval="10"></vue-timepicker>
</span> </span>
</div> </div>
</div> </div>
<div class="select_box id"> <div>
<label for="searchType" class="label">알림 구분</label> <input type="radio" name="state" value="use" id="popup_radio1">
<select name="" id="searchType2" v-model="srchGbn2" @keyup.enter="search"> <label for="popup_radio1">사용</label>
<option value="00">선택안함</option> <input type="radio" name="state" value="notUse" id="popup_radio2">
<option value="01">종량 전환 알림</option> <label for="popup_radio2">점검중</label>
<option value="02">이월 소멸 알림</option>
</select>
</div>
<div class="select_box id">
<label for="searchType" class="label">상세검색</label>
<select name="" id="searchType" v-model="srchGbn" @keyup.enter="search">
<option value="00">선택안함</option>
<option value="01">유저ID</option>
<option value="02">웹요청ID</option>
</select>
</div>
<div class="input_box id">
<label for="id1" class="label">검색어</label>
<input
class="search-box"
type="text"
id="id1"
placeholder="검색어 입력"
v-model.trim="grid.params.search"
@keyup.enter="search"
:readonly="!isFocused"
@focus="isFocused = true"
@blur="isFocused = false"
/>
</div> </div>
<div> <div>
<button type="button" class="button grey" @click="search">조회</button> <button type="button" class="button grey" @click="save">저장</button>
</div>
</div>
</div>
<div class="info">
<div class="count">
<span> {{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }} </span>
<div class="select_box NumberSe">
<select name="" id="perpage" v-model="perPageCnt" @change="changePerPage()">
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">
{{ option.text }}
</option>
</select>
</div> </div>
</div> </div>
</div> </div>
@@ -98,15 +62,12 @@
:addCls="grid.addCls" :addCls="grid.addCls"
></custom-grid> ></custom-grid>
</div> </div>
<noti-detail-pop ref="notiDetailModal"></noti-detail-pop>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import customGrid from '@/components/CustomGrid'; import customGrid from '@/components/CustomGrid';
import moment from 'moment';
import NotiDetailPop from '../components/NotiDetailPop';
import Timepicker from 'vue-timepicker'; import Timepicker from 'vue-timepicker';
class CustomATagRenderer { class CustomATagRenderer {
@@ -152,8 +113,6 @@ export default {
periodDay: 7, periodDay: 7,
sDateDiv: 'day', sDateDiv: 'day',
startDate: new Date(), startDate: new Date(),
endDate: new Date(),
strDate: new Date(),
totalItems: 0, totalItems: 0,
grid: { grid: {
@@ -167,18 +126,6 @@ export default {
{ name: 'userId', header: '유저 ID', align: 'center', width: '15%' }, { name: 'userId', header: '유저 ID', align: 'center', width: '15%' },
{ name: 'notiDiv', header: '알림 구분', align: 'center', width: '15%' }, { name: 'notiDiv', header: '알림 구분', align: 'center', width: '15%' },
{ name: 'webReqId', header: '웹요청 ID', align: 'center', width: '20%' }, { name: 'webReqId', header: '웹요청 ID', align: 'center', width: '20%' },
{
name: 'msgTitle',
header: '내용',
align: 'center',
width: '20%' ,
renderer: {
type: CustomATagRenderer,
options: {
callback: this.notiDetailPop,
},
},
},
// { name: 'regDt', header: '등록 일시', align: 'center', width: '15%' }, // { name: 'regDt', header: '등록 일시', align: 'center', width: '15%' },
], ],
noDataStr: '발송 내역이 없습니다.', noDataStr: '발송 내역이 없습니다.',
@@ -197,7 +144,6 @@ export default {
components: { components: {
customGrid: customGrid, customGrid: customGrid,
vuejsDatepicker, vuejsDatepicker,
NotiDetailPop,
Timepicker, Timepicker,
}, },
@@ -236,91 +182,9 @@ export default {
}, },
methods: { methods: {
search: function (isKeep) { save(){
alert("저장!")
this.grid.params = {
startDt: moment(this.startDate).format('YYYYMMDD'),
endDt: moment(this.endDate).format('YYYYMMDD'),
search: this.grid.params.search,
srchGbn: this.srchGbn,
srchGbn2: this.srchGbn2
} }
this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData();
},
sendStoreData: function () {
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 () {
// 페이지당 조회할 개수
this.grid.pagePerRows = this.perPageCnt;
},
customFormatter: function (date) {
if (this.sDateDiv == 'month') {
return moment(date).format('YYYY-MM');
} else if (this.sDateDiv == 'year') {
return moment(date).format('YYYY');
} else {
return moment(date).format('YYYY-MM-DD');
} }
},
initSetStartDate() {
let setYear = Number(moment(new Date()).format('YYYY'));
let initStartDate = new Date(setYear, 0, 1);
this.startDate = initStartDate;
},
setPeriodDay(day) {
this.periodDay = day;
this.endDate = new Date();
this.initSetStartDate();
this.closeDate('start');
this.closeDate('end');
},
selectedStartDate(day) {
if (day != undefined && day != null) {
this.periodDay = day;
}
if (this.startDate > this.endDate) {
this.startDate = this.endDate;
}
},
selectedEndDate(day) {
if (day != undefined && day != null) {
this.periodDay = day;
}
},
closeDate(type) {
if (type != undefined && type != null) {
this.disabledSDate = {from: this.endDate};
this.disabledEDate = {to: this.startDate, from: new Date()};
}
},
notiDetailPop(props){
this.$refs.notiDetailModal.notiDetailModalOpen(props);
}
},
beforeRouteLeave(to, from, next) {
const getP = this.$refs.table.getPagination();
this.$store.commit('searchcondition/updateSearchCondition', {
params: this.grid.params,
});
// 라우트 하기전 실행
next();
},
}; };
</script> </script>