From c6f79f5720c5d4a700b8b759a93393559409fd1c Mon Sep 17 00:00:00 2001 From: chenhuan <czj123456> Date: 星期一, 20 五月 2024 15:11:58 +0800 Subject: [PATCH] Merge branch 'master' of http://117.78.1.188:8089/r/dkyChenJiang --- javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectData/upload.html | 83 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 83 insertions(+), 0 deletions(-) diff --git a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectData/upload.html b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectData/upload.html new file mode 100644 index 0000000..ae27303 --- /dev/null +++ b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectData/upload.html @@ -0,0 +1,83 @@ +<!DOCTYPE html> +<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> + +<head> + <th:block th:include="include :: header('鏂囦欢涓婁紶')" /> + <th:block th:include="include :: select2-css" /> +</head> + +<body class="gray-bg"> + <div class="container-div"> + <div class="row"> + <div class="col-sm-12 search-collapse"> + <form id="formId" enctype="multipart/form-data"> + <div class="select-list"> + <ul> + + <li> + <p>涓婁紶鏂囦欢锛�</p> + <input type="file" id="file" name="file"/> + </li> + + <li> + <a class="btn btn-primary btn-rounded btn-sm" onclick="upload()"><i class="fa fa-search"></i> 涓婁紶</a> + </li> + </ul> + </div> + </form> + </div> + + <div class="col-sm-12 select-table table-striped"> + <h3>1銆佹敮鎸佸崟鏂囦欢鍜屽鏂囦欢妯″紡<br> </h3> + <h3>2銆佸涓枃浠惰浠�.ZIP鍘嬬缉鍖呯殑褰㈠紡涓婁紶锛屾妸鍗曚釜鎴栬�呭涓枃浠舵斁鍒版枃浠跺す涓紝鍘嬬缉鏂囦欢澶逛负zip鏍煎紡<br> </h3> + <h3>3銆佹枃浠朵笉鍏佽鍖呭惈鐗规畩瀛楃锛氱┖鏍� 銆佹鍙嶆枩绾裤�侀棶鍙枫�佹槦鍙风瓑<br> </h3> + <h3>4銆佷笂浼犳枃浠剁粡杩囦簡 瑙e帇 銆� 绉诲姩 銆侀亶鍘� 銆佹洿鏂版暟鎹簱绛夊涓楠わ紝璇疯�愬績绛夊緟<br> </h3> + </div> + </div> + </div> + + <th:block th:include="include :: footer" /> + <th:block th:include="include :: select2-js" /> + <script th:inline="javascript"> + var projectDataId = [[${projectDataId}]]; + + function upload(){ + var file = $('#file').val(); + if (file == '' || (!$.common.endWith(file, '.zip'))){ + $.modal.msgWarning("璇烽�夋嫨寰呬笂浼犵殑鏂囦欢"); + return false; + } + + var formData = new FormData(); + formData.append("file", $('#file')[0].files[0]); + formData.append("projectDataId", projectDataId); + $.modal.loading("鏁版嵁涓婁紶瑙f瀽涓�"); + + $.ajax({ + url: ctx + "geo/projectData/uploadZIP", + data: formData, + cache: false, + contentType: false, + processData: false, + type: 'POST', + success: function (result) { + if (result.code == web_status.SUCCESS) { + $.modal.closeLoading(); + $.modal.alertSuccess(result.msg); + } else if (result.code == web_status.WARNING) { + + $.modal.closeLoading(); + $.modal.alertWarning(result.msg) + } else { + + $.modal.closeLoading(); + $.modal.alertError(result.msg); + } + } + }); + } + + </script> +</body> + +</html> \ No newline at end of file -- Gitblit v1.9.1