어드민 메뉴명, 브래드크럼 수정 및 위치 변경

This commit is contained in:
kimjhjjang
2022-11-17 10:15:08 +09:00
parent f80d307b0d
commit 69aec986af
6 changed files with 485 additions and 464 deletions

View File

@@ -1,10 +1,9 @@
<template>
<div class="contents">
<div class="contents_wrap">
<div class="top_wrap">
<h3 class="title">알림톡 템플릿 관리</h3>
<p class="breadcrumb">채널관리 &gt; 알림톡 템플릿 관리</p>
<p class="breadcrumb">카카오 채널관리 &gt; 알림톡 템플릿 관리</p>
</div>
<div class="search_wrap">
<div class="select_box id">
@@ -25,18 +24,26 @@
</select>
</div>
<div class="input_box">
<input class="search-box" type="text" id="id1" placeholder="검색어 입력" v-model.trim="grid.params.searchText1"
@keyup.enter="search" maxlength="100"/>
<input
class="search-box"
type="text"
id="id1"
placeholder="검색어 입력"
v-model.trim="grid.params.searchText1"
@keyup.enter="search"
maxlength="100"
/>
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div>
<div class="info">
<div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span>
<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 v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">
{{ option.text }}
</option>
</select>
</div>
@@ -44,21 +51,20 @@
</div>
<div class="table">
<custom-grid
ref="table"
:totalItems="'totalItems'"
:url="grid.url"
:pagePerRows="grid.pagePerRows"
:initialRequest="grid.initialRequest"
:pagination="grid.pagination"
:isCheckbox="grid.isCheckbox"
:columns="grid.columns"
:noDataStr="grid.noDataStr"
:addCls="grid.addCls"
:header="grid.headder"
ref="table"
:totalItems="'totalItems'"
:url="grid.url"
:pagePerRows="grid.pagePerRows"
:initialRequest="grid.initialRequest"
:pagination="grid.pagination"
:isCheckbox="grid.isCheckbox"
:columns="grid.columns"
:noDataStr="grid.noDataStr"
:addCls="grid.addCls"
:header="grid.headder"
></custom-grid>
<common-modal ref="commmonModal"></common-modal>
</div>
</div>
</div>
@@ -69,8 +75,8 @@ import customGrid from '@/components/CustomGrid';
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";
import commonModal from '@/components/modal/commonModal';
import api from '@/service/api';
export default {
name: 'temltList',
@@ -79,7 +85,7 @@ export default {
row: {},
authType: [],
statType: [],
cate2Code: "",
cate2Code: '',
totalItems: 0,
pageType: 'CHANN',
searchType1: '',
@@ -87,9 +93,9 @@ export default {
// 테이블 리스트 데이터
perPageCnt: 50,
options: [
{text: '20', value: 20},
{text: '50', value: 50},
{text: '100', value: 100}
{ text: '20', value: 20 },
{ text: '50', value: 50 },
{ text: '100', value: 100 },
],
grid: {
url: '/api/v1/bo/channelMgt/tmpltList',
@@ -99,40 +105,39 @@ export default {
initialRequest: false,
addCls: 'box_OFvis',
header: [
[
{header: 'No', childNames: []},
{header: '고객사명', childNames: []},
{header: '사업자번호', childNames: []},
{header: '템플릿코드', childNames: []},
{header: '템플릿명', childNames: []},
{header: '템플릿 유형', childNames: []},
{header: '상태', childNames: []},
{header: '발신프로필', childNames: []},
{header: '마지막 수정일', childNames: []}
]
{ header: 'No', childNames: [] },
{ header: '고객사명', childNames: [] },
{ header: '사업자번호', childNames: [] },
{ header: '템플릿코드', childNames: [] },
{ header: '템플릿명', childNames: [] },
{ header: '템플릿 유형', childNames: [] },
{ header: '상태', childNames: [] },
{ header: '발신프로필', childNames: [] },
{ header: '마지막 수정일', childNames: [] },
],
],
columns: [
{name: 'no', header: 'No', align: 'center', width: '4%'},
{name: 'custNm', header: '고객사명', align: 'center', width: '12%'},
{name: 'bregNo', header: '사업자번호', align: 'center', width: '10%'},
{name: 'tmpltCd', header: '템플릿코드', align: 'center', width: '12%'},
{name: 'tmpltNm', header: '템플릿명', align: 'center', width: '18%'},
{name: 'tmpltType', header: '템플릿 유형', align: 'center', width: '8%'},
{name: 'stat', header: '상태', align: 'center', width: '8%'},
{name: 'sendProfile', header: '발신프로필', align: 'center', width: '18%'},
{name: 'lastChgDt', header: '마지막 수정일', width: '10%', cls: 'td_line'}
{ name: 'no', header: 'No', align: 'center', width: '4%' },
{ name: 'custNm', header: '고객사명', align: 'center', width: '12%' },
{ name: 'bregNo', header: '사업자번호', align: 'center', width: '10%' },
{ name: 'tmpltCd', header: '템플릿코드', align: 'center', width: '12%' },
{ name: 'tmpltNm', header: '템플릿명', align: 'center', width: '18%' },
{ name: 'tmpltType', header: '템플릿 유형', align: 'center', width: '8%' },
{ name: 'stat', header: '상태', align: 'center', width: '8%' },
{ name: 'sendProfile', header: '발신프로필', align: 'center', width: '18%' },
{ name: 'lastChgDt', header: '마지막 수정일', width: '10%', cls: 'td_line' },
],
noDataStr: '검색 결과가 없습니다.',
params: {
searchType1: '',
searchType2: 'custNm',
searchText1: ''
searchText1: '',
},
excelHeader: []
}
excelHeader: [],
},
};
},
components: {
@@ -140,9 +145,9 @@ export default {
channelMgtApi,
commonModal,
},
created() {
created() {
this.getExcelHeader();
this.setCodeData();
this.setCodeData();
},
destroyed() {
this.$store.commit('searchcondition/updateSearchCondition', {
@@ -151,13 +156,11 @@ export default {
params: {
searchType1: '',
searchType2: 'custNm',
searchText1: ''
}
searchText1: '',
},
});
},
mounted() {
let page = 1;
// 페이지 정보 및 검색 조건
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
@@ -173,12 +176,12 @@ export default {
this.search(isKeep);
},
methods: {
search: function (isKeep) {
search: function (isKeep) {
this.grid.params.searchType1 = this.searchType1;
this.grid.params.searchType2 = this.searchType2;
this.grid.params.pagePerRows = this.perPageCnt;
this.grid.perPage = this.perPageCnt;
this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData();
},
@@ -187,7 +190,7 @@ export default {
this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage,
perPage: this.perPageCnt,
params: this.grid.params
params: this.grid.params,
});
},
async getExcelDataDown() {
@@ -196,7 +199,7 @@ export default {
const params = {
searchType1: this.grid.params.searchType1,
searchType2: this.grid.params.searchType2,
searchText1: this.grid.params.searchText1
searchText1: this.grid.params.searchText1,
};
response = await channelMgtApi.tmpltListExcel(params);
@@ -206,10 +209,10 @@ export default {
result.data.list = result.data.list.map((item) => {
return {
...item,
custNm: this.fromHtmlEntities(item.custNm)
}
custNm: this.fromHtmlEntities(item.custNm),
};
});
if (result != null && result.retCode == "0000") {
if (result != null && result.retCode == '0000') {
return result.data;
} else {
return false;
@@ -232,24 +235,24 @@ export default {
const data = await this.getExcelDataDown();
let options = {
header: this.excelHeader,
dataOrder: 'header'
dataOrder: 'header',
};
xlsx.export(data.list, saveFileName, options).then(() => {
});
xlsx.export(data.list, saveFileName, options).then(() => {});
},
getExcelHeader() {
// 헤더를 mockup으로 관리한다.
channelMgtApi.getExcelHeader(this.pageType).then(res => {
channelMgtApi.getExcelHeader(this.pageType).then((res) => {
this.excelHeader = res;
});
},
setCodeData() {
// 상태 옵션 셋팅.
api.commCode({'grpCd': 'TMPLT_STTUS_CD'}).then(response => {
api.commCode({ grpCd: 'TMPLT_STTUS_CD' }).then((response) => {
this.statType = response.data.data.list;
});
},
changePerPage: function () { // 페이지당 조회할 개수
changePerPage: function () {
// 페이지당 조회할 개수
this.grid.pagePerRows = this.perPageCnt;
this.search(true);
},
@@ -261,15 +264,14 @@ export default {
},
beforeRouteLeave(to, from, next) {
const getP = this.$refs.table.getPagination();
this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage,
perPage: this.perPageCnt,
params: this.grid.params
params: this.grid.params,
});
// 라우트 하기전 실행
next();
}
},
};
</script>
</script>