mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-06 19:25:44 +09:00
홈페이지 메뉴 관리 (작업중)
This commit is contained in:
184
frontend/src/modules/sysMgt/components/HomeMenuRegPop.vue
Normal file
184
frontend/src/modules/sysMgt/components/HomeMenuRegPop.vue
Normal file
@@ -0,0 +1,184 @@
|
||||
<template>
|
||||
<!-- <div class="wrap bg-wrap"> -->
|
||||
<div>
|
||||
<div class="dimmed modal20" @click="ModalClose();"></div>
|
||||
<div class="popup-wrap modal20">
|
||||
<div class="popup modal20 popup_form">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">홈페이지 메뉴 등록</h3>
|
||||
</div>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>부모 메뉴</th>
|
||||
<td>
|
||||
<select name="" id="stat" v-model="prntNm">
|
||||
<option value="">선택</option>
|
||||
<option v-for="(option,i) in prntMenuList" v-bind:key="i">{{ option.menuNm }}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>메뉴명</th>
|
||||
<td><input type="text" v-model="menuNm"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>메뉴구분</th>
|
||||
<td>
|
||||
<select name="" id="menugubun" v-model="menuGubun">
|
||||
<option value="">선택</option>
|
||||
<option value="G">GNB</option>
|
||||
<option value="L">LNB</option>
|
||||
<option value="N">미지정</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>메뉴순서</th>
|
||||
<td><input type="number" v-model="menuOdrg"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>사용여부</th>
|
||||
<td>
|
||||
<div>
|
||||
<input
|
||||
type="radio"
|
||||
name="useYn"
|
||||
value="Y"
|
||||
id="popup_radio5"
|
||||
v-model="useYn"/>
|
||||
<label for="popup_radio5">사용</label>
|
||||
<input
|
||||
type="radio"
|
||||
name="useYn"
|
||||
value="N"
|
||||
id="popup_radio6"
|
||||
v-model="useYn"/>
|
||||
<label for="popup_radio6">미사용</label>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>메뉴레벨</th>
|
||||
<td><input type="number" value="2" v-model="menuLvl" readonly></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>메뉴URL</th>
|
||||
<td><input type="menuUrl" v-model="menuUrl"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="fnInsertHomeMenu()">저장</button>
|
||||
<button class="btn-default" @click="ModalClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<common-modal ref="commonModal"></common-modal>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import sysMgtApi from "../service/sysMgtApi.js";
|
||||
import commonModal from "./commonModal";
|
||||
|
||||
export default {
|
||||
name: "homeMenuReg",
|
||||
data() {
|
||||
return {
|
||||
isFocused: false,
|
||||
row: {},
|
||||
prntMenuList: [],
|
||||
menuNo: '',
|
||||
prntNm: '',
|
||||
menuNm: '',
|
||||
menuGubun: '',
|
||||
menuOdrg: '',
|
||||
useYn: '',
|
||||
menuLvl: 2,
|
||||
menuUrl: '',
|
||||
}
|
||||
},
|
||||
components: {
|
||||
commonModal,
|
||||
},
|
||||
created() {
|
||||
this.formReset();
|
||||
},
|
||||
methods: {
|
||||
async selectPrntMenu(){
|
||||
try{
|
||||
const response = await sysMgtApi.selectPrntMenu();
|
||||
const result = response.data;
|
||||
if(result != null && result.retCode == '0000'){
|
||||
this.prntMenuList = result.data.list;
|
||||
} else {
|
||||
console.log("result",result)
|
||||
this.row.title = '홈페이지 부모 메뉴';
|
||||
this.row.msg1 = '조회정보가 없습니다.';
|
||||
this.$refs.commonModal.alertSysModalOpen(this.row);
|
||||
}
|
||||
} catch(err) {
|
||||
this.row.title = '홈페이지 부모 메뉴';
|
||||
this.row.msg1 = '실패 하였습니다.'
|
||||
this.$refs.commmonModal.alertSysModalOpen(this.row);
|
||||
}
|
||||
},
|
||||
// 모달 띄우기
|
||||
ModalOpen() {
|
||||
this.formReset();
|
||||
var dimmed = document.getElementsByClassName('modal20');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
this.selectPrntMenu();
|
||||
},
|
||||
// 모달 끄기
|
||||
ModalClose() {
|
||||
var dimmed = document.getElementsByClassName('modal20');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
|
||||
},
|
||||
fnInsertHomeMenu(){
|
||||
let params = {
|
||||
menuNo : this.menuNo,
|
||||
prntNm : this.prntNm,
|
||||
menuNm : this.menuNm,
|
||||
menuGubun : this.menuGubun,
|
||||
menuOdrg : this.menuOdrg,
|
||||
useYn : this.useYn,
|
||||
menuLvl : this.menuLvl,
|
||||
menuUrl : this.menuUrl,
|
||||
}
|
||||
|
||||
try{
|
||||
const response = sysMgtApi.insertHomeMenu(params);
|
||||
const result = response.data;
|
||||
if(result != null && result.retCode == '0000'){
|
||||
this.row.title = '홈페이지 메뉴 관리';
|
||||
this.row.title = '메뉴가 등록되었습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
} catch (err) {
|
||||
this.row.title = '홈페이지 메뉴 관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
}
|
||||
},
|
||||
// 저장 후 부모창 호출.
|
||||
toComplete() {
|
||||
this.getParent('adminList').$refs.table.reloadData();
|
||||
this.ModalClose();
|
||||
},
|
||||
formReset() {
|
||||
var type = this.insertType;
|
||||
Object.assign(this.$data, this.$options.data());
|
||||
this.insertType = type;
|
||||
},
|
||||
checkFocus() {
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -6,6 +6,7 @@ import BatchList from '../views/BatchList'
|
||||
import BatchDetail from '../views/BatchDetail'
|
||||
import NotiList from '../views/NotiList'
|
||||
import WorkState from '../views/WorkState'
|
||||
import HomeMenuList from '../views/HomeMenuList'
|
||||
|
||||
export default [
|
||||
{
|
||||
@@ -56,6 +57,12 @@ export default [
|
||||
component: WorkState,
|
||||
name: 'workState',
|
||||
meta: { public: false }
|
||||
},
|
||||
{
|
||||
path: '/sysMgt/homeMenuList',
|
||||
component: HomeMenuList,
|
||||
name: 'homeMenuList',
|
||||
meta: { public: false }
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
@@ -68,23 +68,27 @@ const resetPassword = (params) => {
|
||||
return httpClient.post('/api/v1/bo/login/resetPassword', params, { withCredentials: false });
|
||||
}
|
||||
|
||||
//배치 리스트 조회
|
||||
const batchList = (params) => {
|
||||
return httpClient.post('/api/v1/bo/sysMgt/batchList', params, { withCredentials: false } )
|
||||
}
|
||||
|
||||
//배치 상세조회
|
||||
const batchDetail = (params) => {
|
||||
return httpClient.post('/api/v1/bo/sysMgt/batchDetail', params, { withCredentials: false })
|
||||
}
|
||||
|
||||
//배치 수동 조작
|
||||
const batchExecuteJob = (params) => {
|
||||
return httpClient.post('/api/v1/bo/sysMgt/batchExecuteJob', params, { withCredentials: false })
|
||||
}
|
||||
|
||||
|
||||
//알림 이력 조회
|
||||
const notiList = (params) => {
|
||||
return httpClient.post('/api/v1/bo/sysMgt/notiList', params, { withCredentials: false })
|
||||
}
|
||||
|
||||
//서비스 점검 설정
|
||||
const setWorkState = (params) => {
|
||||
return httpClient.post('/api/v1/bo/sysMgt/setWorkState', params, { withCredentials: false })
|
||||
}
|
||||
@@ -97,6 +101,25 @@ const athMenuList = (params) => {
|
||||
return httpClient.post('/api/v1/bo/sysMgt/selectAuthMemuListForAddAuth', params, { withCredentials: false })
|
||||
}
|
||||
|
||||
const selectHomeMenuList = (params) => {
|
||||
return httpClient.post('/api/v1/bo/sysMgt/selectHomeMenuList', params, { withCredentials: false })
|
||||
}
|
||||
|
||||
const deleteHomeMenu = (params) => {
|
||||
return httpClient.post('/api/v1/bo/sysMgt/deleteHomeMenu', params, { withCredentials: false })
|
||||
}
|
||||
|
||||
const updateHomeMenu = (params) => {
|
||||
return httpClient.post('/api/v1/bo/sysMgt/updateHomeMenu', params, { withCredentials: false })
|
||||
}
|
||||
|
||||
const insertHomeMenu = (params) => {
|
||||
return httpClient.post('/api/v1/bo/sysMgt/insertHomeMenu', params, { withCredentials: false })
|
||||
}
|
||||
|
||||
const selectPrntMenu = (params) => {
|
||||
return httpClient.post('/api/v1/bo/sysMgt/selectPrntMenu', params, { withCredentials: false })
|
||||
}
|
||||
|
||||
export default {
|
||||
insertAdmin,
|
||||
@@ -119,5 +142,10 @@ export default {
|
||||
notiList,
|
||||
setWorkState,
|
||||
svcCheckList,
|
||||
athMenuList
|
||||
athMenuList,
|
||||
selectHomeMenuList,
|
||||
deleteHomeMenu,
|
||||
updateHomeMenu,
|
||||
insertHomeMenu,
|
||||
selectPrntMenu,
|
||||
}
|
||||
|
||||
114
frontend/src/modules/sysMgt/views/HomeMenuList.vue
Normal file
114
frontend/src/modules/sysMgt/views/HomeMenuList.vue
Normal file
@@ -0,0 +1,114 @@
|
||||
<template>
|
||||
<div class="contents">
|
||||
<div class="contents_wrap">
|
||||
<div class="top_wrap">
|
||||
<h3 class="title">홈페이지 메뉴 관리</h3>
|
||||
<p class="breadcrumb">운영 관리 > 홈페이지 메뉴 관리</p>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="count">
|
||||
총 <span></span>건
|
||||
</div>
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue add" @click="fnInsertPopup">등록</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col width="10%" />
|
||||
<col width="15%" />
|
||||
<col width="10%" />
|
||||
<col width="10%" />
|
||||
<col width="10%" />
|
||||
<col width="10%" />
|
||||
<col width="20%" />
|
||||
<col width="15%" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>부모 메뉴 명</th>
|
||||
<th>메뉴 명</th>
|
||||
<th>메뉴 구분</th>
|
||||
<th>메뉴 순서</th>
|
||||
<th>사용 여부</th>
|
||||
<th>메뉴 레벨</th>
|
||||
<th>메뉴 URL</th>
|
||||
<th>수정 / 삭제</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(list, i) in menuList" v-bind:key="i">
|
||||
<td>{{ list.prntNm }}</td>
|
||||
<td>{{ list.menuNm }}</td>
|
||||
<td>{{ list.menuGubun }}</td>
|
||||
<td>{{ list.menuOdrg }}</td>
|
||||
<td>{{ list.useYn }}</td>
|
||||
<td>{{ list.menuLvl }}</td>
|
||||
<td>{{ list.menuUrl }}</td>
|
||||
<td class="two_btn_group">
|
||||
<button type="button" class="button grey" >수정</button>
|
||||
<button type="button" class="button white delete" >삭제</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<homeMenuRegPop ref="homeMenuRegPop"></homeMenuRegPop>
|
||||
<common-modal ref="commonModal"></common-modal>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import sysMgtApi from '../service/sysMgtApi';
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
import homeMenuRegPop from '../components/HomeMenuRegPop'
|
||||
export default {
|
||||
name: 'homeMenuList',
|
||||
data() {
|
||||
return {
|
||||
row: {},
|
||||
perPageCnt: 50,
|
||||
menuList: [],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
commonModal,
|
||||
homeMenuRegPop,
|
||||
},
|
||||
created() {
|
||||
this.fnSelectHomeMenu();
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
|
||||
//홈페이지 메뉴 조회
|
||||
async fnSelectHomeMenu(){
|
||||
let params = {
|
||||
|
||||
}
|
||||
try{
|
||||
const response = await sysMgtApi.selectHomeMenuList(params);
|
||||
const result = response.data;
|
||||
if(result != null && result.retCode == '0000'){
|
||||
this.menuList = result.data.list;
|
||||
} else {
|
||||
this.row.title = '홈페이지 메뉴 관리';
|
||||
this.row.msg1 = '조회정보가 없습니다.';
|
||||
this.$refs.commonModal.alertModalOpen(this.row);
|
||||
}
|
||||
} catch (err){
|
||||
this.row.title = '홈페이지 메뉴 관리';
|
||||
this.row.msg1 = '실패 하였습니다.'
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
},
|
||||
|
||||
fnInsertPopup(){
|
||||
this.$refs.homeMenuRegPop.ModalOpen();
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user