

231031 서영석 ts -> js 로 수정
@cb1674fef2d489ac1afc2c2c4e08f4b51d3a8fbf
--- Global.js
+++ Global.js
... | ... | @@ -1,4 +1,4 @@ |
1 |
-const PROJECT_NAME = 'NodeJS Web Server Framework(Vue)'; |
|
1 |
+const PROJECT_NAME = 'KERIS'; |
|
2 | 2 |
const PROJECT_VERSION = '1.0'; |
3 | 3 |
const BASE_DIR = __dirname; |
4 | 4 |
const LOG_BASE_DIR = `${__dirname}/server/logs`; |
--- client/resources/js/commonUtil.ts
+++ client/resources/js/commonUtil.js
... | ... | @@ -9,241 +9,25 @@ |
9 | 9 |
const COMMON_UTIL = (function () { |
10 | 10 |
|
11 | 11 |
var _utils = { |
12 |
- |
|
13 |
- |
|
14 |
- engNum: function(value : any) { |
|
15 |
- let engNum = /^[a-zA-Z0-9]*$/; |
|
16 |
- if(engNum.test(value)) { |
|
17 |
- return true |
|
18 |
- } else { |
|
19 |
- return false |
|
20 |
- } |
|
21 |
- }, |
|
22 |
- |
|
23 |
- /** |
|
24 |
- * 오늘 년-월-일 구하기 |
|
25 |
- */ |
|
26 |
- today: function() { |
|
27 |
- let date = new Date(); |
|
28 |
- let today = new Date(date.getTime() - (date.getTimezoneOffset() * 60000)).toISOString().substring(0, 10); |
|
29 |
- return today; |
|
30 |
- }, |
|
31 |
- |
|
32 |
- /** |
|
33 |
- * 오늘 년-월-일 구하기 |
|
34 |
- */ |
|
35 |
- dateTime: function() { |
|
36 |
- let date = new Date(); |
|
37 |
- let today = new Date(date.getTime() - (date.getTimezoneOffset() * 60000)).toISOString().substring(0, 16); |
|
38 |
- return today; |
|
39 |
- }, |
|
40 |
- |
|
41 |
- /** |
|
42 |
- * 한달전 년-월-일 구하기 |
|
43 |
- */ |
|
44 |
- oneMonthAgo: function() { |
|
45 |
- let date = new Date(); |
|
46 |
- let oneMonthAgo = new Date(date.setMonth(date.getMonth() - 1) - (date.getTimezoneOffset() * 60000)).toISOString().substring(0, 10); |
|
47 |
- return oneMonthAgo; |
|
48 |
- }, |
|
49 |
- |
|
50 |
- /** |
|
51 |
- * null값 '-' 으로 치환 |
|
52 |
- */ |
|
53 |
- nullHyphen: function(data : any) { |
|
54 |
- if(data === null || data === "") { |
|
55 |
- return "-"; |
|
56 |
- } else { |
|
57 |
- return data; |
|
58 |
- } |
|
59 |
- }, |
|
60 |
- |
|
61 |
- /** |
|
62 |
- * 일자에 '-' 넣기 |
|
63 |
- */ |
|
64 |
- dateHyphen: function(data : any) { |
|
65 |
- if(data === null || data === "") return "-"; |
|
66 |
- let formatDate = ''; |
|
67 |
- // 공백제거 |
|
68 |
- data = data.replace(/\s/gi, ""); |
|
69 |
- if(data.length == 8) { |
|
70 |
- formatDate = data.replace(/(\d{4})(\d{2})(\d{2})/, '$1-$2-$3'); |
|
71 |
- } else { |
|
72 |
- formatDate = data; |
|
73 |
- } |
|
74 |
- |
|
75 |
- return formatDate; |
|
76 |
- }, |
|
77 |
- |
|
78 |
- /** |
|
79 |
- * 일시에서 시,분,초 자르기 |
|
80 |
- */ |
|
81 |
- yyyymmdd: function(data : any) { |
|
82 |
- if(data === null || data === "") { |
|
83 |
- return "-"; |
|
84 |
- } else { |
|
85 |
- let date = data.substr(0,10); |
|
86 |
- return date; |
|
87 |
- } |
|
88 |
- }, |
|
89 |
- |
|
90 |
- /** |
|
91 |
- * 전화번호 출력 시 '-'을 추가하여 출력 |
|
92 |
- */ |
|
93 |
- HyphenMinus: function( phoneNumber : any ) { |
|
94 |
- if(!phoneNumber) return phoneNumber |
|
95 |
- |
|
96 |
- phoneNumber = phoneNumber.replace(/[^0-9]/g, '') |
|
97 |
- |
|
98 |
- let tmp = '' |
|
99 |
- if( phoneNumber.length < 4){ |
|
100 |
- return phoneNumber; |
|
101 |
- } |
|
102 |
- else if(phoneNumber.length < 7) |
|
103 |
- { |
|
104 |
- tmp += phoneNumber.substr(0, 3); |
|
105 |
- tmp += '-'; |
|
106 |
- tmp += phoneNumber.substr(3); |
|
107 |
- return tmp; |
|
108 |
- } |
|
109 |
- else if(phoneNumber.length == 8) |
|
110 |
- { |
|
111 |
- tmp += phoneNumber.substr(0, 4); |
|
112 |
- tmp += '-'; |
|
113 |
- tmp += phoneNumber.substr(4); |
|
114 |
- return tmp; |
|
115 |
- } |
|
116 |
- else if(phoneNumber.length < 10) |
|
117 |
- { |
|
118 |
- if(phoneNumber.substr(0, 2) =='02') { //02-123-5678 |
|
119 |
- tmp += phoneNumber.substr(0, 2); |
|
120 |
- tmp += '-'; |
|
121 |
- tmp += phoneNumber.substr(2, 3); |
|
122 |
- tmp += '-'; |
|
123 |
- tmp += phoneNumber.substr(5); |
|
124 |
- return tmp; |
|
125 |
- } |
|
126 |
- } |
|
127 |
- else if(phoneNumber.length < 11) |
|
128 |
- { |
|
129 |
- if(phoneNumber.substr(0, 2) =='02') { //02-1234-5678 |
|
130 |
- tmp += phoneNumber.substr(0, 2); |
|
131 |
- tmp += '-'; |
|
132 |
- tmp += phoneNumber.substr(2, 4); |
|
133 |
- tmp += '-'; |
|
134 |
- tmp += phoneNumber.substr(6); |
|
135 |
- return tmp; |
|
136 |
- } else { //010-123-4567 |
|
137 |
- tmp += phoneNumber.substr(0, 3); |
|
138 |
- tmp += '-'; |
|
139 |
- tmp += phoneNumber.substr(3, 3); |
|
140 |
- tmp += '-'; |
|
141 |
- tmp += phoneNumber.substr(6); |
|
142 |
- return tmp; |
|
143 |
- } |
|
144 |
- } |
|
145 |
- else { //010-1234-5678 |
|
146 |
- tmp += phoneNumber.substr(0, 3); |
|
147 |
- tmp += '-'; |
|
148 |
- tmp += phoneNumber.substr(3, 4); |
|
149 |
- tmp += '-'; |
|
150 |
- tmp += phoneNumber.substr(7); |
|
151 |
- return tmp; |
|
152 |
- } |
|
153 |
- }, |
|
154 |
- |
|
155 |
- /** |
|
156 |
- * 전화번호 자동 '-' 삽입 |
|
157 |
- */ |
|
158 |
- //전화번호 입력 시 자동 '-' 삽입 |
|
159 |
- getMask: function( phoneNumber : any ) { |
|
160 |
- if(!phoneNumber) return phoneNumber |
|
161 |
- phoneNumber = phoneNumber.replace(/[^0-9]/g, '') |
|
162 |
- |
|
163 |
- let res = '' |
|
164 |
- if(phoneNumber.length < 3) { |
|
165 |
- res = phoneNumber |
|
166 |
- } |
|
167 |
- else { |
|
168 |
- if(phoneNumber.substr(0, 2) =='02') { |
|
169 |
- if(phoneNumber.length <= 5) {//02-123-5678 |
|
170 |
- res = phoneNumber.substr(0, 2) + '-' + phoneNumber.substr(2, 3) |
|
171 |
- } |
|
172 |
- else if(phoneNumber.length > 5 && phoneNumber.length <= 9) {//02-123-5678 |
|
173 |
- res = phoneNumber.substr(0, 2) + '-' + phoneNumber.substr(2, 3) + '-' + phoneNumber.substr(5) |
|
174 |
- } |
|
175 |
- else if(phoneNumber.length > 9) {//02-1234-5678 |
|
176 |
- res = phoneNumber.substr(0, 2) + '-' + phoneNumber.substr(2, 4) + '-' + phoneNumber.substr(6) |
|
177 |
- } |
|
178 |
- } else { |
|
179 |
- if(phoneNumber.length < 8) { |
|
180 |
- res = phoneNumber |
|
181 |
- } |
|
182 |
- else if(phoneNumber.length == 8) |
|
183 |
- { |
|
184 |
- res = phoneNumber.substr(0, 4) + '-' + phoneNumber.substr(4) |
|
185 |
- } |
|
186 |
- else if(phoneNumber.length == 9) |
|
187 |
- { |
|
188 |
- res = phoneNumber.substr(0, 3) + '-' + phoneNumber.substr(3, 3) + '-' + phoneNumber.substr(6) |
|
189 |
- } |
|
190 |
- else if(phoneNumber.length == 10) |
|
191 |
- { |
|
192 |
- res = phoneNumber.substr(0, 3) + '-' + phoneNumber.substr(3, 3) + '-' + phoneNumber.substr(6) |
|
193 |
- } |
|
194 |
- else if(phoneNumber.length > 10) { //010-1234-5678 |
|
195 |
- res = phoneNumber.substr(0, 3) + '-' + phoneNumber.substr(3, 4) + '-' + phoneNumber.substr(7) |
|
196 |
- } |
|
197 |
- } |
|
198 |
- } |
|
199 |
- return res |
|
200 |
- }, |
|
201 |
- |
|
202 |
- /** |
|
203 |
- * 비밀번호 일치 체크 |
|
204 |
- */ |
|
205 |
- checkPassword: function(pw : any, pwC : any) { |
|
206 |
- if (pw != pwC) return false; |
|
207 |
- return true; |
|
208 |
- }, |
|
209 |
- /** |
|
210 |
- * 휴대폰 번호 정규식 |
|
211 |
- */ |
|
212 |
- checkPhone: function(data : any) { |
|
213 |
- let regExp = /^01([0|1|6|7|8|9]?)-?([0-9]{3,4})-?([0-9]{4})$/; |
|
214 |
- if (regExp.test(data) === true) return true; |
|
215 |
- return false; |
|
216 |
- }, |
|
217 |
- |
|
218 |
- /** |
|
219 |
- * 이메일 정규식 |
|
220 |
- */ |
|
221 |
- checkEmail: function (data : any) { |
|
222 |
- // 이메일 형식 검사 |
|
223 |
- let validateEmail = /^[A-Za-z0-9_\\.\\-]+@[A-Za-z0-9\\-]+\.[A-Za-z0-9\\-\\.]+$/; |
|
224 |
- if (validateEmail.test(data) === true) return true; |
|
225 |
- return false; |
|
226 |
- }, |
|
227 |
- |
|
228 | 12 |
/** |
229 | 13 |
* 빈 객체 여부 |
230 | 14 |
*/ |
231 |
- isEmpty: function (data : any) { |
|
232 |
- if (data === undefined || data === null || data === "null" || data === "" || data.length === 0 || (data.constructor == Object && Object.keys(data).length === 0)) { |
|
15 |
+ isEmpty: function (data) { |
|
16 |
+ if (data === undefined || data === null || data === "" || data.length === 0 || (data.constructor == Object && Object.keys(data).length === 0)) { |
|
233 | 17 |
if ((typeof data) === "number") { |
234 |
- return true |
|
18 |
+ return false |
|
235 | 19 |
} else { |
236 |
- return false; |
|
20 |
+ return true; |
|
237 | 21 |
} |
238 | 22 |
} else { |
239 |
- return true; |
|
23 |
+ return false; |
|
240 | 24 |
} |
241 | 25 |
}, |
242 | 26 |
|
243 | 27 |
/** |
244 | 28 |
* empty to null |
245 | 29 |
*/ |
246 |
- toNull: function ( data : any) { |
|
30 |
+ toNull: function (data) { |
|
247 | 31 |
if(data === undefined || data === "") { |
248 | 32 |
try { |
249 | 33 |
data = null; |
... | ... | @@ -260,7 +44,23 @@ |
260 | 44 |
/** |
261 | 45 |
* string to JSON |
262 | 46 |
*/ |
263 |
- toJson: function (data : any) { |
|
47 |
+ toJson: function (data) { |
|
48 |
+ if ("string" === (typeof data)) { |
|
49 |
+ try { |
|
50 |
+ return JSON.parse(data); |
|
51 |
+ } catch (e) { |
|
52 |
+ console.log("commonUtil.js - string to json convert error : ", e); |
|
53 |
+ return data; |
|
54 |
+ } |
|
55 |
+ } else { |
|
56 |
+ return data; |
|
57 |
+ } |
|
58 |
+ }, |
|
59 |
+ |
|
60 |
+ /** |
|
61 |
+ * string to JSON |
|
62 |
+ */ |
|
63 |
+ toJson: function (data) { |
|
264 | 64 |
if ("string" === (typeof data)) { |
265 | 65 |
try { |
266 | 66 |
return JSON.parse(data); |
... | ... | @@ -276,7 +76,7 @@ |
276 | 76 |
/** |
277 | 77 |
* JSON to string |
278 | 78 |
*/ |
279 |
- toString: function (data : any) { |
|
79 |
+ toString: function (data) { |
|
280 | 80 |
try { |
281 | 81 |
return JSON.parse(data); |
282 | 82 |
} catch (e) { |
... | ... | @@ -288,12 +88,12 @@ |
288 | 88 |
/** |
289 | 89 |
* 다중 separator split |
290 | 90 |
*/ |
291 |
- split: function (text : any, separator : any) { |
|
91 |
+ split: function (text, separator) { |
|
292 | 92 |
var words = []; |
293 | 93 |
if (this.isEmpty(text) == false && this.isEmpty(separator) == false && separator.length > 0) { |
294 | 94 |
words.push(text); |
295 | 95 |
for (var i = 0; i < separator.length; i++) { |
296 |
- var subWords : any = []; |
|
96 |
+ var subWords = []; |
|
297 | 97 |
for (var j = 0; j < words.length; j++) { |
298 | 98 |
if (this.isEmpty(words[j]) == false && this.isEmpty(separator[i]) == false) { |
299 | 99 |
subWords = subWords.concat(words[j].split(separator[i])); |
... | ... | @@ -319,7 +119,7 @@ |
319 | 119 |
/** |
320 | 120 |
* 객체 깊은 복사 |
321 | 121 |
*/ |
322 |
- copyObject: function (obj : any) { |
|
122 |
+ copyObject: function (obj) { |
|
323 | 123 |
if (obj === null || typeof(obj) !== 'object') return obj; |
324 | 124 |
|
325 | 125 |
try { |
... | ... | @@ -336,7 +136,7 @@ |
336 | 136 |
|
337 | 137 |
*/ |
338 | 138 |
getDateTime : function () { |
339 |
- return this.getDate(null) as String + " " + this.getFullTime(null); |
|
139 |
+ return this.getDate()+ " " + this.getFullTime(); |
|
340 | 140 |
}, |
341 | 141 |
|
342 | 142 |
/** |
... | ... | @@ -351,7 +151,7 @@ |
351 | 151 |
* separator(String) |
352 | 152 |
* } |
353 | 153 |
*/ |
354 |
- getDate: function (options : any) { |
|
154 |
+ getDate: function (options) { |
|
355 | 155 |
|
356 | 156 |
if (this.isEmpty(options) == true) { |
357 | 157 |
options = { |
... | ... | @@ -455,7 +255,7 @@ |
455 | 255 |
* separator(String) |
456 | 256 |
* } |
457 | 257 |
*/ |
458 |
- getFullTime: function (options : any) { |
|
258 |
+ getFullTime: function (options) { |
|
459 | 259 |
if (this.isEmpty(options) == true) { |
460 | 260 |
options = { |
461 | 261 |
addHour: 0, |
... | ... | @@ -493,7 +293,7 @@ |
493 | 293 |
* separator(String) |
494 | 294 |
* } |
495 | 295 |
*/ |
496 |
- getTime: function (options : any) { |
|
296 |
+ getTime: function (options) { |
|
497 | 297 |
if (this.isEmpty(options) == true) { |
498 | 298 |
options = { |
499 | 299 |
addHour: 0, |
... | ... | @@ -526,7 +326,7 @@ |
526 | 326 |
* ex) this.prefixZero(2, 5) => 00002, this.prefixZero(20, 5) => 00020 |
527 | 327 |
* |
528 | 328 |
*/ |
529 |
- prefixZero: function (text : any, length : any) { |
|
329 |
+ prefixZero: function (text, length) { |
|
530 | 330 |
var zero = ''; |
531 | 331 |
var suffix = text; |
532 | 332 |
|
... | ... | @@ -546,7 +346,7 @@ |
546 | 346 |
/** |
547 | 347 |
* Date => text |
548 | 348 |
*/ |
549 |
- dateToText: function (date : any) { |
|
349 |
+ dateToText: function (date) { |
|
550 | 350 |
var d = new Date(date); |
551 | 351 |
var yyyy = d.getFullYear(); |
552 | 352 |
var mm = d.getMonth() + 1; |
... | ... | @@ -564,7 +364,7 @@ |
564 | 364 |
* |
565 | 365 |
* ex) getRandomInt(2, 5) => 2~5사이의 정수 난수 값 리턴 |
566 | 366 |
*/ |
567 |
- getRandomInt: function (min : any, max : any) { |
|
367 |
+ getRandomInt: function (min, max) { |
|
568 | 368 |
min = Math.ceil(min); |
569 | 369 |
max = Math.floor(max); |
570 | 370 |
return Math.floor(Math.random() * (max - min)) + min; |
... | ... | @@ -596,7 +396,7 @@ |
596 | 396 |
* |
597 | 397 |
* ex) 10000 => 10,000 |
598 | 398 |
*/ |
599 |
- comma: function (text : any) { |
|
399 |
+ comma: function (text) { |
|
600 | 400 |
try { |
601 | 401 |
return text.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); |
602 | 402 |
} catch (e) { |
... | ... | @@ -613,7 +413,7 @@ |
613 | 413 |
* |
614 | 414 |
* ex) 10,000 => 10000 |
615 | 415 |
*/ |
616 |
- removeComma: function (text : any) { |
|
416 |
+ removeComma: function (text) { |
|
617 | 417 |
try { |
618 | 418 |
return text.toString().replace(/,/g, "");; |
619 | 419 |
} catch (e) { |
... | ... | @@ -628,7 +428,7 @@ |
628 | 428 |
/** |
629 | 429 |
* json 데이터 가지고 오기 (외부 JSON 파일 PATH or URL) (동기 요청) |
630 | 430 |
*/ |
631 |
- getJsonByPromise: function (url : any, isAsync : any) { |
|
431 |
+ getJsonByPromise: function (url, isAsync) { |
|
632 | 432 |
if (this.isEmpty(url) == true) { |
633 | 433 |
new Error('COMMON_UTIL - getJson(url, isAsync) Error : url(parameter) is empty') |
634 | 434 |
} |
... | ... | @@ -659,7 +459,7 @@ |
659 | 459 |
/** |
660 | 460 |
* json 데이터 가지고 오기 (동기 요청) (외부 JSON 파일 PATH or URL) |
661 | 461 |
*/ |
662 |
- getJsonBySync: function (url : any) { |
|
462 |
+ getJsonBySync: function (url) { |
|
663 | 463 |
var result = {}; |
664 | 464 |
if (this.isEmpty(url) == true) { |
665 | 465 |
new Error('COMMON_UTIL - getJson(url, isAsync) Error : url(parameter) is empty') |
--- client/views/index.js
+++ client/views/index.js
... | ... | @@ -1,17 +1,29 @@ |
1 |
-// /** |
|
2 |
-// * @author : 최정우 |
|
3 |
-// * @since : 2022.10.19 |
|
4 |
-// * @dscription : Vue를 활용한 Client단 구현의 시작점(Index) Component 입니다. |
|
5 |
-// */ |
|
6 |
-// import { createApp } from 'vue'; |
|
1 |
+/** |
|
2 |
+ * @author : 최정우 |
|
3 |
+ * @since : 2022.10.19 |
|
4 |
+ * @dscription : Vue를 활용한 Client단 구현의 시작점(Index) Component 입니다. |
|
5 |
+ */ |
|
6 |
+import Vue, { createApp } from 'vue'; |
|
7 | 7 |
|
8 |
-// import AppRouter from './pages/AppRouter.js'; |
|
9 |
-// import App from './pages/App.vue'; |
|
10 |
-// import AppStore from './pages/AppStore.js'; |
|
8 |
+//Router |
|
9 |
+import AppRouter from './pages/AppRouter.js'; |
|
10 |
+import AppStore from './pages/AppStore.js'; |
|
11 |
+import AppFilters from './pages/AppFilters.js'; |
|
12 |
+//Application Root Vue Component |
|
13 |
+import App from './pages/App.vue'; |
|
11 | 14 |
|
12 |
-// const vue = createApp(App).use(AppRouter).use(AppStore).mount('#root'); |
|
13 | 15 |
|
16 |
+ |
|
17 |
+const app = createApp(App); |
|
18 |
+app.use(AppStore) |
|
19 |
+app.use(AppRouter) |
|
20 |
+ |
|
21 |
+app.config.globalProperties.$filters = AppFilters |
|
22 |
+app.mount('#root'); |
|
23 |
+ |
|
24 |
+// //index.html에 정의된 window.AppUserHttpRequestURL을 활용하여, 사용자가 요청한 초기 페이지로 이동 |
|
14 | 25 |
// if (!APP_USER_HTTP_REQUEST_URL && APP_USER_HTTP_REQUEST_URL != '/') { |
15 | 26 |
// console.log('index.js APP_USER_HTTP_REQUEST_URL : ', APP_USER_HTTP_REQUEST_URL); |
16 | 27 |
// AppRouter.push({ path: APP_USER_HTTP_REQUEST_URL, query: {}}) |
17 | 28 |
// } |
29 |
+ |
--- client/views/index.ts
... | ... | @@ -1,22 +0,0 @@ |
1 | -/** | |
2 | - * @author : 최정우 | |
3 | - * @since : 2022.10.19 | |
4 | - * @dscription : Vue를 활용한 Client단 구현의 시작점(Index) Component 입니다. | |
5 | - */ | |
6 | -import { createApp } from 'vue'; | |
7 | - | |
8 | -import AppRouter from './pages/AppRouter'; | |
9 | -import AppStore from './pages/AppStore'; | |
10 | -import AppFilters from './AppFilters'; | |
11 | -import App from './pages/App.vue'; | |
12 | - | |
13 | - | |
14 | -// const vue = createApp(App).use(AppRouter).mount('#root'); | |
15 | -const vue = createApp(App) | |
16 | -vue.use(AppStore); | |
17 | -vue.use(AppRouter); | |
18 | -vue.config.globalProperties.$filters = AppFilters | |
19 | - | |
20 | - | |
21 | -vue.mount('#root'); | |
22 | - |
--- client/views/AppFilters.ts
+++ client/views/pages/AppFilters.js
... | ... | @@ -4,18 +4,18 @@ |
4 | 4 |
* @returns |
5 | 5 |
*/ |
6 | 6 |
|
7 |
- const AppFilters = (function () { |
|
7 |
+const AppFilters = (function () { |
|
8 | 8 |
|
9 | 9 |
var _filters = { |
10 | 10 |
|
11 | 11 |
/*전화번호*/ |
12 |
- phone: function (phone : any) { |
|
12 |
+ phone: function (phone) { |
|
13 | 13 |
return phone.replace(/[^0-9]/g, '') |
14 | 14 |
.replace(/(\d{3})(\d{4})(\d{4})/, '($1) $2-$3'); |
15 | 15 |
}, |
16 | 16 |
|
17 | 17 |
/* 반올림 */ |
18 |
- math: function (param : any) { |
|
18 |
+ math: function (param) { |
|
19 | 19 |
if(param == 0){ |
20 | 20 |
return "-"; |
21 | 21 |
} |
... | ... | @@ -23,7 +23,7 @@ |
23 | 23 |
}, |
24 | 24 |
|
25 | 25 |
/* 특수문자 변형 */ |
26 |
- specialCharacter: function (arr : any) { |
|
26 |
+ specialCharacter: function (arr) { |
|
27 | 27 |
arr = arr.replace(/</g, '<'); |
28 | 28 |
arr = arr.replace(/>/g, '>'); |
29 | 29 |
arr = arr.replace(/"/g, '"'); |
... | ... | @@ -34,7 +34,7 @@ |
34 | 34 |
}, |
35 | 35 |
|
36 | 36 |
/* input text 제한 */ |
37 |
- comma: function (text : any) { |
|
37 |
+ comma: function (text) { |
|
38 | 38 |
try { |
39 | 39 |
return text.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); |
40 | 40 |
} catch (e) { |
... | ... | @@ -47,7 +47,7 @@ |
47 | 47 |
}, |
48 | 48 |
|
49 | 49 |
/* html text 제한 */ |
50 |
- textLimit: function (text : any, limit : any) { |
|
50 |
+ textLimit: function (text, limit) { |
|
51 | 51 |
if (text === undefined || text === null || text === "" || text.length === 0) { |
52 | 52 |
return text; |
53 | 53 |
} else { |
... | ... | @@ -56,7 +56,7 @@ |
56 | 56 |
}, |
57 | 57 |
|
58 | 58 |
/* 파일 사이즈 */ |
59 |
- fileSize: function (size : any) { |
|
59 |
+ fileSize: function (size) { |
|
60 | 60 |
var result = size + " bytes"; |
61 | 61 |
// optional code for multiples approximation |
62 | 62 |
var type = ["KB", "MB", "GB"]; |
... | ... | @@ -67,7 +67,7 @@ |
67 | 67 |
}, |
68 | 68 |
|
69 | 69 |
/* 숫자 한글 표현 */ |
70 |
- numberSize: function (number : any) { |
|
70 |
+ numberSize: function (number) { |
|
71 | 71 |
var result = number; |
72 | 72 |
// optional code for multiples approximation |
73 | 73 |
var type = ["만", "억", "조", "경", "해"]; |
... | ... | @@ -82,7 +82,7 @@ |
82 | 82 |
//return result; |
83 | 83 |
}, |
84 | 84 |
|
85 |
- isEmpty: function (data : any) { |
|
85 |
+ isEmpty: function (data) { |
|
86 | 86 |
if (data === undefined || data === null || data === "" || data.length === 0 || (data.constructor == Object && Object.keys(data).length === 0)) { |
87 | 87 |
if ((typeof data) === "number") { |
88 | 88 |
return false |
... | ... | @@ -95,7 +95,7 @@ |
95 | 95 |
}, |
96 | 96 |
|
97 | 97 |
/* 빈 데이터 표현 => '-' */ |
98 |
- emptyText: function (text : any) { |
|
98 |
+ emptyText: function (text) { |
|
99 | 99 |
if (text === undefined || text === null || text === "" || text.length === 0) { |
100 | 100 |
return '-'; |
101 | 101 |
} else { |
... | ... | @@ -105,19 +105,16 @@ |
105 | 105 |
|
106 | 106 |
//클라이언트의 현재 일짜와 비교해서 더 작은 지에 대한 여부 확인 |
107 | 107 |
//param - dateText : yyyy-mm-dd (String) |
108 |
- isSmallerClientDate: function (dateText : any) { |
|
108 |
+ isSmallerClientDate: function (dateText) { |
|
109 | 109 |
const date = new Date(dateText); |
110 | 110 |
let clientDate = new Date(); |
111 | 111 |
|
112 | 112 |
let yyyy = clientDate.getFullYear(); |
113 |
- let mm : any = clientDate.getMonth() + 1; |
|
113 |
+ let mm = clientDate.getMonth() + 1; |
|
114 | 114 |
if (mm < 10) { |
115 |
- let MM : String; |
|
116 |
- MM = "0" + mm; |
|
117 |
- mm=String(mm); |
|
115 |
+ mm = "0" + mm; |
|
118 | 116 |
} |
119 |
- |
|
120 |
- let dd : any = clientDate.getDate(); |
|
117 |
+ let dd = clientDate.getDate(); |
|
121 | 118 |
if (dd < 10) { |
122 | 119 |
dd = "0" + dd; |
123 | 120 |
} |
... | ... | @@ -134,7 +131,7 @@ |
134 | 131 |
DEFAULT_REPAIR_SIZE: -5, |
135 | 132 |
|
136 | 133 |
/* 인하 횟수 => 인하 수치 */ |
137 |
- repairMillimeter: function(repairCount : any) { |
|
134 |
+ repairMillimeter: function(repairCount) { |
|
138 | 135 |
const newRepairCount = !repairCount ? 0 : Number(repairCount); |
139 | 136 |
const repairSize = this.DEFAULT_REPAIR_SIZE * newRepairCount; |
140 | 137 |
return repairSize; |
... | ... | @@ -145,6 +142,7 @@ |
145 | 142 |
|
146 | 143 |
//초기화 |
147 | 144 |
function init() { |
145 |
+ //console.info('commonUtil.js initialized.'); |
|
148 | 146 |
return _filters; |
149 | 147 |
} |
150 | 148 |
|
--- client/views/pages/admin/user/UserSelectList.vue
+++ client/views/pages/admin/user/UserSelectList.vue
... | ... | @@ -126,7 +126,7 @@ |
126 | 126 |
import { useStore } from "vuex"; |
127 | 127 |
import axios from "axios"; |
128 | 128 |
import crypto from "crypto-js"; |
129 |
-import COMMON_UTIL from '../../../../resources/js/commonUtil.ts'; |
|
129 |
+import COMMON_UTIL from '../../../../resources/js/commonUtil.js'; |
|
130 | 130 |
|
131 | 131 |
|
132 | 132 |
export default { |
--- client/views/pages/user/join/Join.vue
+++ client/views/pages/user/join/Join.vue
... | ... | @@ -5,17 +5,17 @@ |
5 | 5 |
</section> |
6 | 6 |
<section class="join-b"> |
7 | 7 |
<div class="join-b-button"> |
8 |
- <input type="radio" id="one" v-model="selectedMembership" value="one"> |
|
9 |
- <label for="one" class="radio-t t1" |
|
10 |
- :style="{ backgroundColor: selectedMembership === 'one' ? '#86868644' : '#e2ecfc' }">기관회원 |
|
8 |
+ <input type="radio" id="company" v-model="selectedMembership" value="company"> |
|
9 |
+ <label for="company" class="radio-t t1" |
|
10 |
+ :style="{ backgroundColor: selectedMembership === 'company' ? '#86868644' : '#e2ecfc' }">기관회원 |
|
11 | 11 |
<img src="../../../../resources/jpg/join-bt2.png" alt=""></label> |
12 | 12 |
<input type="radio" id="two" v-model="selectedMembership" value="two"> |
13 | 13 |
<label for="two" class="radio-t t2" |
14 |
- :style="{ backgroundColor: selectedMembership === 'two' ? '#86868644' : '#e6fff1' }">일반회원 |
|
14 |
+ :style="{ backgroundColor: selectedMembership === 'common' ? '#86868644' : '#e6fff1' }">일반회원 |
|
15 | 15 |
<img src="../../../../resources/jpg/join-bt.png" alt=""></label> |
16 | 16 |
</div> |
17 | 17 |
</section> |
18 |
- <div v-if="selectedMembership === 'one'"> |
|
18 |
+ <div v-if="selectedMembership === 'company'"> |
|
19 | 19 |
<div class="login-info2"> |
20 | 20 |
<div> |
21 | 21 |
<h3>회사소개</h3> |
... | ... | @@ -176,7 +176,7 @@ |
176 | 176 |
<input type="text" v-model="user['user_id']" placeholder="아이디를 입력하세요."> |
177 | 177 |
</div> |
178 | 178 |
<div> |
179 |
- <button>중복확인</button> |
|
179 |
+ <button @click="userIdCheck">중복확인</button> |
|
180 | 180 |
</div> |
181 | 181 |
</section> |
182 | 182 |
<!-- <section class="join-sec2 joinsub"> |
... | ... | @@ -195,7 +195,7 @@ |
195 | 195 |
<span>비밀번호</span> |
196 | 196 |
</div> |
197 | 197 |
<div class="join-sub-input"> |
198 |
- <input type="text" v-model="user['user_pw']"> |
|
198 |
+ <input type="text" v-model="user['user_pw']" @change="passwordSyncCheck()" placeholder="비밀번호 입력"> |
|
199 | 199 |
|
200 | 200 |
</div> |
201 | 201 |
</section> |
... | ... | @@ -204,8 +204,10 @@ |
204 | 204 |
<span>비밀번호 확인</span> |
205 | 205 |
</div> |
206 | 206 |
<div class="join-sub-input"> |
207 |
- <input type="text"> |
|
207 |
+ <input type="text" v-model="pwCheck" @change="passwordSyncCheck()" placeholder="비밀번호 확인"> |
|
208 | 208 |
</div> |
209 |
+ <div v-if="this.passwordCheckFlag" style="color:chartreuse">비밀번호 일치</div> |
|
210 |
+ <div v-else style="color:red">비밀번호 불일치</div> |
|
209 | 211 |
</section> |
210 | 212 |
<section class="join-sec5 joinsub"> |
211 | 213 |
<div class="join-sec-sub"> |
... | ... | @@ -213,7 +215,6 @@ |
213 | 215 |
</div> |
214 | 216 |
<div> |
215 | 217 |
<input type="text" v-model="user['user_nm']"> |
216 |
- |
|
217 | 218 |
</div> |
218 | 219 |
</section> |
219 | 220 |
<section class="join-sec6"> |
... | ... | @@ -226,14 +227,14 @@ |
226 | 227 |
</div> |
227 | 228 |
<div>@</div> |
228 | 229 |
<div> |
229 |
- <input type="text" name="email_dns" id="email_dns" v-model="email_dns"> |
|
230 |
- </div> |
|
230 |
+ <input v-if="select_email_dns==null" type="text" name="email_dns" id="email_dns" v-model="email_dns"> |
|
231 |
+ <input v-else type="text" name="email_dns" id="email_dns" v-model="select_email_dns"> </div> |
|
231 | 232 |
<div> |
232 |
- <select name="email_sel" id="email_sel"> |
|
233 |
+ <select name="email_sel" id="email_sel" v-model="select_email_dns"> |
|
233 | 234 |
<option value="">직접 입력</option> |
234 |
- <option value="naver.com">naver</option> |
|
235 |
- <option value="hanmail.net">daum</option> |
|
236 |
- <option value="gmail.com">google</option> |
|
235 |
+ <option value="naver.com">naver.com</option> |
|
236 |
+ <option value="hanmail.net">hanmail.net</option> |
|
237 |
+ <option value="gmail.com">google.com</option> |
|
237 | 238 |
</select> |
238 | 239 |
</div> |
239 | 240 |
</div> |
... | ... | @@ -257,7 +258,8 @@ |
257 | 258 |
<section class="join-end-bt"> |
258 | 259 |
<button>이전</button> |
259 | 260 |
|
260 |
- <button @click="commonFileInsert">회원가입</button> |
|
261 |
+ <button v-if="selectedMembership === 'company'" @click="commonFileInsert">회원가입</button> |
|
262 |
+ <button v-else @click="userInsert">회원가입</button> |
|
261 | 263 |
</section> |
262 | 264 |
</div> |
263 | 265 |
|
... | ... | @@ -323,7 +325,7 @@ |
323 | 325 |
email_id:null, |
324 | 326 |
email_dns:null, |
325 | 327 |
select_email_dns:null, |
326 |
- selectedMembership: 'one', |
|
328 |
+ selectedMembership: 'company', |
|
327 | 329 |
isVisible: false, |
328 | 330 |
} |
329 | 331 |
}, |
... | ... | @@ -391,6 +393,7 @@ |
391 | 393 |
}, |
392 | 394 |
|
393 | 395 |
userInsert: function () { |
396 |
+ this.user.user_auth=this.selectedMembership; |
|
394 | 397 |
const vm = this; |
395 | 398 |
axios({ |
396 | 399 |
url: "/user/userInsert.json", |
... | ... | @@ -426,7 +429,7 @@ |
426 | 429 |
}); |
427 | 430 |
}, |
428 | 431 |
joinInsert:function(){ |
429 |
- if(this.selectedMembership=="one"){ |
|
432 |
+ if(this.selectedMembership=="company"){ |
|
430 | 433 |
this.companyInsert(); |
431 | 434 |
} |
432 | 435 |
else{ |
--- client/views/vue-shim.d.ts
... | ... | @@ -1,5 +0,0 @@ |
1 | -declare module '*.vue' { | |
2 | - import type { DefineComponent } from 'vue' | |
3 | - const component: DefineComponent<{}, {}, any> | |
4 | - export default component | |
5 | -}(No newline at end of file) |
--- package-lock.json
+++ package-lock.json
... | ... | @@ -37,13 +37,6 @@ |
37 | 37 |
"vuex": "^4.1.0", |
38 | 38 |
"webpack": "5.74.0", |
39 | 39 |
"webpack-cli": "4.10.0" |
40 |
- }, |
|
41 |
- "devDependencies": { |
|
42 |
- "less": "^4.2.0", |
|
43 |
- "less-loader": "^11.1.3", |
|
44 |
- "ts-loader": "^9.5.0", |
|
45 |
- "ts-node": "^10.9.1", |
|
46 |
- "typescript": "^5.2.2" |
|
47 | 40 |
} |
48 | 41 |
}, |
49 | 42 |
"node_modules/@ampproject/remapping": { |
--- package.json
+++ package.json
... | ... | @@ -42,12 +42,5 @@ |
42 | 42 |
"linux-dev": "export NODE_ENV=development&&node ./server/modules/web/server.js", |
43 | 43 |
"webpack-build": "webpack", |
44 | 44 |
"webpack-build-watch": "webpack --watch" |
45 |
- }, |
|
46 |
- "devDependencies": { |
|
47 |
- "less": "^4.2.0", |
|
48 |
- "less-loader": "^11.1.3", |
|
49 |
- "ts-loader": "^9.5.0", |
|
50 |
- "ts-node": "^10.9.1", |
|
51 |
- "typescript": "^5.2.2" |
|
52 | 45 |
} |
53 | 46 |
} |
--- tsconfig.json
... | ... | @@ -1,22 +0,0 @@ |
1 | -{ | |
2 | - "compilerOptions": { | |
3 | - /* "composite": true, | |
4 | - "target": "esnext", | |
5 | - "module": "esnext", | |
6 | - "strict": true, | |
7 | - "jsx": "preserve", | |
8 | - "moduleResolution": "node", | |
9 | - "allowImportingTsExtensions": true, | |
10 | - "emitDeclarationOnly": true */ | |
11 | - /* "outDir": "./client/build/", */ | |
12 | - "outDir": "./built/", | |
13 | - "strict": true, | |
14 | - "noImplicitAny": true, | |
15 | - "module": "es6", | |
16 | - "target": "es5", | |
17 | - "jsx": "preserve", | |
18 | - "allowJs": true, | |
19 | - "moduleResolution": "node", | |
20 | - | |
21 | - } | |
22 | -}(No newline at end of file) |
--- webpack.config.js
+++ webpack.config.js
... | ... | @@ -1,6 +1,5 @@ |
1 | 1 |
const { VueLoaderPlugin } = require("vue-loader"); |
2 |
- |
|
3 |
-const {PROJECT_NAME, BASE_DIR, SERVICE_STATUS} = require('./Global.js'); |
|
2 |
+const {PROJECT_NAME, BASE_DIR, SERVICE_STATUS} = require('./Global'); |
|
4 | 3 |
|
5 | 4 |
module.exports = { |
6 | 5 |
name: PROJECT_NAME, |
... | ... | @@ -8,7 +7,7 @@ |
8 | 7 |
devtool: 'eval', |
9 | 8 |
|
10 | 9 |
entry: { |
11 |
- app: [`${BASE_DIR}/client/views/index.ts`] |
|
10 |
+ app: [`${BASE_DIR}/client/views/index.js`] |
|
12 | 11 |
}, |
13 | 12 |
|
14 | 13 |
module: { |
... | ... | @@ -18,9 +17,6 @@ |
18 | 17 |
}, { |
19 | 18 |
test: /\.(js|jsx)?$/, |
20 | 19 |
loader: 'babel-loader', |
21 |
- options: { |
|
22 |
- compact: true, |
|
23 |
- }, |
|
24 | 20 |
}, { |
25 | 21 |
test: /\.css$/, |
26 | 22 |
use: ['vue-style-loader', 'css-loader'] |
... | ... | @@ -33,21 +29,10 @@ |
33 | 29 |
fallback:require.resolve('file-loader') |
34 | 30 |
} |
35 | 31 |
}] |
36 |
- },{ |
|
37 |
- test: /\.(ts|tsx)$/, |
|
38 |
- exclude: /node_modules/, |
|
39 |
- loader: 'ts-loader', |
|
40 |
- options: { appendTsSuffixTo: [/\.vue$/] } |
|
41 | 32 |
}], |
42 | 33 |
}, |
43 | 34 |
|
44 | 35 |
plugins: [new VueLoaderPlugin()], |
45 |
- |
|
46 |
- resolve: { |
|
47 |
- //확장자를 순서대로 해석, 여러 파일에서 이름이 동일하지만 다른 확장자를 가진 경우, webpack은 배열의 앞에서부터 파일을 해석하고 남은 것은 해석하지 않음 |
|
48 |
- //import 시, 확장자 생략 가능 |
|
49 |
- extensions: [ '.tsx', '.ts', '.jsx', '.js', '.vue', 'json' ], |
|
50 |
- }, |
|
51 | 36 |
|
52 | 37 |
output: { |
53 | 38 |
path: `${BASE_DIR}/client/build`, // __dirname: webpack.config.js 파일이 위치한 경로 |
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?