From b33b835a45b7eaad0f492b7dd443e1fb41ff009e Mon Sep 17 00:00:00 2001 From: "hehihoho3@gmail.com" Date: Mon, 23 Sep 2024 18:13:53 +0900 Subject: [PATCH] =?UTF-8?q?=ED=81=B4=EB=9D=BC=EC=9D=B4=EC=96=B8=ED=8A=B8?= =?UTF-8?q?=203,4=20=EC=9B=90=EB=B3=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/templates/agent/view.html | 1213 +++++++++++------- 1 file changed, 729 insertions(+), 484 deletions(-) diff --git a/src/main/resources/templates/agent/view.html b/src/main/resources/templates/agent/view.html index 6e6fae2..ea685b0 100644 --- a/src/main/resources/templates/agent/view.html +++ b/src/main/resources/templates/agent/view.html @@ -21,7 +21,7 @@ color: #555; } .custom-height { - height: 100px; + height: 100px; } .example-button { border-radius: 20px; @@ -77,529 +77,774 @@ -
-
+
+
- - + + - -
- -
-
-
-
-

AGENT 발송 테스트

-
-
- -
-
-
-
- - -
-
-
- - - - + +
+ +
+
+
+
+

AGENT 발송 테스트

+
+
+ +
+
+
+
+ + +
+
+
+ + + + -
-
-
-

-
- - -
-

- -
-
- - -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
- - -
- -
- -
-
0 bytes
-
-
- -
- -
-
-
- - - - -
-
-
-
- - - - - -
-
-
-

Client 1 현재현황

- +
-
-
- -
-
- -
- MSG 건 - 0 -
+
+ +
+
+ + +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
0 bytes
+
+
+ +
+ +
+
+
+ + + + +
+
+
+
+
+
+
+ +

+
+ + +
+

+ + + +
+
+ + +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
0 bytes
+
+
+ +
+ +
+
+
+ + + + + +
+ +
+ +
+ +
+ + + + + +
+
+
+

Client 1 현재현황

+ +
+
+
+ +
+
+ +
+ MSG 건 + 0
- -
-
- -
- MSG_LOG 건 - 0 -
+
+ +
+
+ +
+ MSG_LOG 건 + 0
- -
-
- -
- report(X) 건 - 0 -
+
+ +
+
+ +
+ report(X) 건 + 0
+
- - - - - - - - - - -
-
-
-
-

클라이언트1 현황확인

- - +
+
+
+

Client 2 현재현황

+ +
+
+
+ +
+
+ +
+ MSG 건 + 0 +
+
-
-
-
-
-
- -
- 클라이언트 insert -
- 0 - 건수 -
-
-
-
- - 0초 - -
+ +
+
+ +
+ MSG_LOG 건 + 0 +
+
+
+ +
+
+ +
+ report(X) 건 + 0
- -
-
- -
- 데이터 이관 시간 (C -> S) -
- 0 - 건수 -
-
-
-
- - 0초 - -
-
-
- -
-
- -
- 클라이언트 report (S -> C) -
- 0 - - - 건수 -
-
-
-
- - 0초 - -
-
-
- -
- - - - - - - - - - - - -
+
- + + + + + + + + + +
+
+
+
+

클라이언트1 현황확인

+ + +
+
+
+
+
+
+ +
+ 클라이언트 insert +
+ 0 + 건수 +
+
+
+
+ + 0초 + +
+
+
+ +
+
+ +
+ 데이터 이관 시간 (C -> S) +
+ 0 + 건수 +
+
+
+
+ + 0초 + +
+
+
+ +
+
+ +
+ 클라이언트 report (S -> C) +
+ 0 + + + 건수 +
+
+
+
+ + 0초 + +
+
+
+ + +
+ + + + + + + + + + + + + +
+
+
+ +
+
+
+
+

클라이언트2 현황확인

+ + +
+
+
+
+
+
+ +
+ 클라이언트 insert +
+ 0 + 건수 +
+
+
+
+ + 0초 + +
+
+
+ +
+
+ +
+ 데이터 이관 시간 (C -> S) +
+ 0 + 건수 +
+
+
+
+ + 0초 + +
+
+
+ +
+
+ +
+ 클라이언트 report (S -> C) +
+ 0 + + + 건수 +
+
+
+
+ + 0초 + +
+
+
+ + +
+ + + + + + + + + + + + + +
+
+
+
- -
- + +
+ +
+ -
- - - - -
-
- - - -
- - - - - + + + + + + // client_2 영역 + // client_2 영역 + // client_2 영역 + // client_2 영역 + // client_2 영역 + /* + * client_2 msg insert + * */ + $("#divTwoSms .sendBtn").on("click", function () { + + // 폼 데이터를 수집 + var formData = new FormData($("#divTwoSms .sendForm")[0]); + + // 먼저 파일을 업로드하고 파일명만 받음 + var fileUploadForm = new FormData(); + fileUploadForm.append("fileName01", formData.get("fileName01")); + fileUploadForm.append("fileName02", formData.get("fileName02")); + fileUploadForm.append("fileName03", formData.get("fileName03")); + + + $.ajax({ + type: "POST", + url: "/agent/two/uploadFiles", + data: fileUploadForm, + processData: false, + contentType: false, + success: function(response) { + console.log('response : ', response); + if (response.status === 'OK') { + + + // 파일명만 formData에 추가 + // 파일명 formData에 추가 + if (response.data.fileName01) { + formData.append("fileName01", response.data.fileName01); + } + if (response.data.fileName02) { + formData.append("fileName02", response.data.fileName02); + } + if (response.data.fileName03) { + formData.append("fileName03", response.data.fileName03); + } + + + var jsonObject = {}; + formData.forEach((value, key) => { + if (!(value instanceof File)) { + jsonObject[key] = value; + } + }); + if(jsonObject['recvPhone'] === ""){ + alert('정보를 입력하거나 예시입력을 클릭해주세요.') + return false; + } + + + + $.ajax({ + type: "POST", + url: "/agent/two/send", + data: JSON.stringify(jsonObject), // JSON 문자열로 변환된 데이터를 전송 + dataType: 'json', + contentType: 'application/json', + // async: true, + success: function (data) { + // console.log('data : ', data); + + if (data.status === 'OK') { + fn_successAlert('경과시간 : '+data.data, data.msg); + // fn_successAlert(data, message) + } + else { + alert("오류 알림 : :: "+data.msg); + } + }, + error: function (e) { + alert("데이터 저장에 실패하였습니다."); + console.log("ERROR : " + JSON.stringify(e)); + }, + beforeSend : function(xmlHttpRequest) { + fn_twoInsertScriptStart(); + + }, + complete : function(xhr, textStatus) { + oneStopInsertTimer(); + } + }); + } else { + alert("파일 업로드 실패: " + response.msg); + } + }, + error: function(e) { + alert("파일 업로드에 실패하였습니다."); + console.log("ERROR : " + JSON.stringify(e)); + } + }); + }); + + + }); + + +