
--- client/views/pages/adm/system/contextPath/ContextPathSelectList.vue
... | ... | @@ -1,165 +0,0 @@ |
1 | -<template> | |
2 | - <div class="search-bar"> | |
3 | - <input | |
4 | - type="text" | |
5 | - class="form-control sm" | |
6 | - placeholder="경로를 입력하세요." | |
7 | - v-model="search.searchText" | |
8 | - @keyup.enter="findAll" | |
9 | - /> | |
10 | - | |
11 | - <button class="btn-ico xsm main ico-sch" @click="findAll"> | |
12 | - <span class="sr-only">검색</span> | |
13 | - </button> | |
14 | - </div> | |
15 | - <div class="content-zone"> | |
16 | - <div class="content"> | |
17 | - <div class="scroll"> | |
18 | - <div class="tbl-wrap"> | |
19 | - <ListTable | |
20 | - :className="'data cursor'" | |
21 | - :colgroup="colgroup" | |
22 | - :thead="thead" | |
23 | - :tbody="tbody" | |
24 | - @listClick="fnView" | |
25 | - > | |
26 | - <template v-slot:button="{ row, idx }"> | |
27 | - <button | |
28 | - class="btn-ico md ico-del" | |
29 | - @click.stop="fnDel(row, idx)" | |
30 | - v-if="pageAuth.delAuthrt == 'Y'" | |
31 | - > | |
32 | - </button> | |
33 | - </template> | |
34 | - </ListTable> | |
35 | - </div> | |
36 | - </div> | |
37 | - </div> | |
38 | - </div> | |
39 | - <div class="btn-wrap list"> | |
40 | - <div></div> | |
41 | - <PaginationButton :className="'pagination'" | |
42 | - v-model:currentPage="search.currentPage" | |
43 | - :pagination="search" | |
44 | - :click="findAll" | |
45 | - /> | |
46 | - <button | |
47 | - class="btn sm main" | |
48 | - @click="fnAdd" | |
49 | - v-if="pageAuth.regAuthrt == 'Y'" | |
50 | - > | |
51 | - 등록 | |
52 | - </button> | |
53 | - </div> | |
54 | -</template> | |
55 | - | |
56 | -<script> | |
57 | -import ListTable from "../../../../component/table/ListTable.vue"; | |
58 | -import PaginationButton from "../../../../component/pagination/PaginationButton.vue"; | |
59 | -import { findAll, del } from "../../../../../resources/api/cntxtPth"; | |
60 | -import queryParams from "../../../../../resources/js/queryParams"; | |
61 | -import { toRaw } from "vue"; | |
62 | -import { defaultSearchParams } from "../../../../../resources/js/defaultSearchParams"; | |
63 | - | |
64 | -export default { | |
65 | - mixins: [queryParams], | |
66 | - components: { | |
67 | - ListTable: ListTable, | |
68 | - PaginationButton: PaginationButton, | |
69 | - }, | |
70 | - data() { | |
71 | - return { | |
72 | - // 페이지 컨텍스트 패스 객체 | |
73 | - pageAuth: JSON.parse(localStorage.getItem("vuex")).pageAuth, | |
74 | - | |
75 | - colgroup: ["4%", "20", "25%", "13%", "13%", "5%"], | |
76 | - thead: ["NO", "경로", "사용여부", "등록자", "등록일", "삭제"], | |
77 | - tbody: [], | |
78 | - search: { ...defaultSearchParams }, | |
79 | - list: [], // 컨텍스트 패스 목록 | |
80 | - listCnt: 0, | |
81 | - }; | |
82 | - }, | |
83 | - created() { | |
84 | - this.resotreQueryParams("queryParams"); | |
85 | - this.findAll(); | |
86 | - }, | |
87 | - methods: { | |
88 | - // 목록 조회 | |
89 | - async findAll() { | |
90 | - this.saveQueryParams("queryParams", this.search); // 검색조건 저장 | |
91 | - try { | |
92 | - const res = await findAll(toRaw(this.search)); | |
93 | - this.list = res.data.data.list; | |
94 | - this.listCnt = res.data.data.pagination.totalRecordCount; | |
95 | - this.search = res.data.data.pagination; | |
96 | - this.makeTbody(); | |
97 | - console.log("this.list : ", this.list); | |
98 | - } catch (error) { | |
99 | - // console.log("error : ", error); | |
100 | - } | |
101 | - }, | |
102 | - // 상세 조회 | |
103 | - fnView(idx) { | |
104 | - this.saveQueryParams("queryParams", this.search); // 검색조건 저장 | |
105 | - this.$router.push({ | |
106 | - name: "admContextPathSelectListOne", | |
107 | - query: { | |
108 | - pageId: this.list[idx]["cntxtPthId"], | |
109 | - }, | |
110 | - }); | |
111 | - }, | |
112 | - // 등록 페이지 이동 | |
113 | - fnAdd() { | |
114 | - this.$router.push({ | |
115 | - name: "admContextPathInsert", | |
116 | - }); | |
117 | - }, | |
118 | - // 삭제 | |
119 | - async fnDel(row, idx) { | |
120 | - if (this.list[idx].sysPvsnYn == 0) { | |
121 | - alert("시스템에서 제공하는 정보는 삭제할수 없습니다."); | |
122 | - return; | |
123 | - } | |
124 | - if (!confirm("삭제하시겠습니까?")) { | |
125 | - return; | |
126 | - } | |
127 | - try { | |
128 | - const res = await del(this.list[idx]); | |
129 | - alert(res.data.message); | |
130 | - if (res.status == 200) { | |
131 | - this.findAll(); | |
132 | - } | |
133 | - } catch (error) { | |
134 | - alert("에러가 발생했습니다.\n시스템관리자에게 문의하세요."); | |
135 | - } | |
136 | - }, | |
137 | - // tbody 생성 | |
138 | - makeTbody() { | |
139 | - this.tbody = []; // 초기화 | |
140 | - this.tbody = this.list.map((cntxtPth, index) => { | |
141 | - let id = | |
142 | - this.listCnt - | |
143 | - index - | |
144 | - (this.search.currentPage - 1) * this.search.recordSize; // 번호 | |
145 | - let path = cntxtPth.path; // 경로 | |
146 | - let useYn = cntxtPth.useYn; // 사용여부 | |
147 | - let writer; // 작성자 | |
148 | - let writeDt; // 작성일 | |
149 | - // 수정 이력 확인 후 수정된 경우가 없다면 최초 작성자로 등록 | |
150 | - if (cntxtPth.mdfr == null || cntxtPth.mdfr === "") { | |
151 | - writer = cntxtPth.rgtrNm; | |
152 | - writeDt = cntxtPth.regDt; | |
153 | - } else { | |
154 | - writer = cntxtPth.mdfrNm; | |
155 | - writeDt = cntxtPth.mdfcnDt; | |
156 | - } | |
157 | - return { id, path, useYn, writer, writeDt }; | |
158 | - }); | |
159 | - }, | |
160 | - }, | |
161 | - watch: {}, | |
162 | - computed: {}, | |
163 | - mounted() {}, | |
164 | -}; | |
165 | -</script> |
--- server/modules/web/server.js
+++ server/modules/web/server.js
... | ... | @@ -57,9 +57,9 @@ |
57 | 57 |
/** |
58 | 58 |
* @author : 하석형 |
59 | 59 |
* @since : 2023.08.24 |
60 |
- * @dscription : ROOT URL -> index.html |
|
60 |
+ * @dscription : /, /{ContextPath}/ -> index.html |
|
61 | 61 |
*/ |
62 |
-webServer.get("/", function (request, response) { |
|
62 |
+webServer.get(/^\/([^\/]+\/)?$/, function (request, response) { |
|
63 | 63 |
//response.sendFile을 통한 HTTP html reponse (html내용 Streaming) |
64 | 64 |
response.sendFile(`${BASE_DIR}/client/views/index.html`); |
65 | 65 |
}); |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?