TC 수정사항 반영

This commit is contained in:
kimre
2022-07-16 23:53:22 +09:00
parent c323de8bb9
commit e8328fef2c
43 changed files with 954 additions and 904 deletions

View File

@@ -11,8 +11,9 @@
<label for="stat" class="label">상태</label>
<select name="" id="stat" v-model="searchType1" @keyup.enter="search">
<option value="">전체</option>
<option value="Y">사용</option>
<option value="N">폐기</option>
<option v-for="(option, i) in statType" v-bind:value="option.code" v-bind:key="i">
{{ option.codeNm }}
</option>
</select>
</div>
<div class="select_box">
@@ -33,10 +34,11 @@
<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="grid.pagePerRows" @keyup.enter="search">
<option value="20">20</option>
<option value="50" selected>50</option>
<option value="100">100</option>
<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>
@@ -69,6 +71,7 @@ import channelMgtApi from '../service/channelMgtApi';
import xlsx from '@/common/excel';
import moment from 'moment';
import commonModal from "@/components/modal/commonModal";
import api from "@/service/api";
export default {
name: 'temltList',
@@ -82,9 +85,13 @@ export default {
pageType: 'CHANN',
searchType1: '',
searchType2: 'custNm',
// 테이블 리스트 데이터
perPageCnt: 50,
options: [
{text: '20', value: 20},
{text: '50', value: 50},
{text: '100', value: 100}
],
grid: {
url: '/api/v1/bo/channelMgt/tmpltList',
perPage: 50,
@@ -135,8 +142,10 @@ export default {
commonModal,
},
created() {
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
// const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
this.getExcelHeader();
this.setCodeData();
this.grid.pagePerRows = this.perPageCnt;
},
destroyed() {
this.$store.commit('searchcondition/updateSearchCondition', {
@@ -159,7 +168,7 @@ export default {
// store에 저장된 페이지 정보 및 검색 조건을 불러오기
let isKeep = false;
if (getCondition) {
this.grid.pagePerRows = getCondition.perPage;
this.grid.pagePerRows = 50;
this.grid.params = getCondition.params;
page = getCondition.page;
isKeep = true;
@@ -171,7 +180,10 @@ export default {
console.log(this.grid.params);
this.grid.params.searchType1 = this.searchType1
this.grid.params.searchType2 = this.searchType2
this.grid.params.pagePerRows = this.perPageCnt
this.grid.perPage = this.perPageCnt
console.log(this.grid)
this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData();
},
@@ -181,11 +193,7 @@ export default {
this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage,
perPage: this.perPageCnt,
params: {
searchType1: '',
searchType2: 'custNm',
searchText1: ''
}
params: this.grid.params
});
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
@@ -238,6 +246,15 @@ export default {
this.excelHeader = res;
});
},
setCodeData() {
// 상태 옵션 셋팅.
api.commCode({'grpCd': 'TMPLT_STTUS_CD'}).then(response => {
this.statType = response.data.data.list;
});
},
changePerPage: function () { // 페이지당 조회할 개수
this.grid.pagePerRows = this.perPageCnt;
},
},
beforeRouteLeave(to, from, next) {