From ae5c99296a9f579d1a4803da15fa3045d26c74fd Mon Sep 17 00:00:00 2001
From: Renpc-kilig <308442850@qq.com>
Date: Fri, 3 Mar 2023 17:33:36 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../activity/ActivityRouteController.java | 5 +
.../templates/activity/get-select.html | 176 ++++++++++++++++++
.../resources/templates/activity/save.html | 4 +-
.../resources/templates/activity/update.html | 33 ++++
4 files changed, 216 insertions(+), 2 deletions(-)
create mode 100644 src/main/resources/templates/activity/get-select.html
diff --git a/src/main/java/cn/com/tenlion/usercenter/controller/route/activity/ActivityRouteController.java b/src/main/java/cn/com/tenlion/usercenter/controller/route/activity/ActivityRouteController.java
index f9296fc..d076832 100644
--- a/src/main/java/cn/com/tenlion/usercenter/controller/route/activity/ActivityRouteController.java
+++ b/src/main/java/cn/com/tenlion/usercenter/controller/route/activity/ActivityRouteController.java
@@ -45,4 +45,9 @@ public class ActivityRouteController extends DefaultBaseController {
return new ModelAndView("activity/map-view");
}
+ @GetMapping("get-select")
+ public ModelAndView getSelect() {
+ return new ModelAndView("activity/get-select");
+ }
+
}
\ No newline at end of file
diff --git a/src/main/resources/templates/activity/get-select.html b/src/main/resources/templates/activity/get-select.html
new file mode 100644
index 0000000..18f6bc1
--- /dev/null
+++ b/src/main/resources/templates/activity/get-select.html
@@ -0,0 +1,176 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/resources/templates/activity/save.html b/src/main/resources/templates/activity/save.html
index e0ae8a6..e53ffb4 100644
--- a/src/main/resources/templates/activity/save.html
+++ b/src/main/resources/templates/activity/save.html
@@ -646,8 +646,8 @@
$('#areaSelectBtn').on('click', function() {
top.dialog.open({
title: '选择地区',
- url: top.restAjax.path('route/area/get-select?areaName={areaName}', [encodeURI($('#areaName').val())]),
- width: '600px',
+ url: top.restAjax.path('route/activity/get-select?areaName={areaName}', [encodeURI($('#areaName').val())]),
+ width: '400px',
height: '225px',
onClose: function() {
var selectedAreaArray = top.dialog.dialogData.selectedAreaArray;
diff --git a/src/main/resources/templates/activity/update.html b/src/main/resources/templates/activity/update.html
index 1046d45..02594e1 100644
--- a/src/main/resources/templates/activity/update.html
+++ b/src/main/resources/templates/activity/update.html
@@ -666,6 +666,39 @@
// 校验
form.verify({
});
+
+ // 区域选择
+ (function() {
+ $('#areaSelectBtn').on('click', function() {
+ top.dialog.open({
+ title: '选择地区',
+ url: top.restAjax.path('route/activity/get-select?areaName={areaName}', [encodeURI($('#areaName').val())]),
+ width: '400px',
+ height: '225px',
+ onClose: function() {
+ var selectedAreaArray = top.dialog.dialogData.selectedAreaArray;
+ if(selectedAreaArray.length > 0) {
+ var areaCode = '';
+ var areaName = '';
+ areaCode = selectedAreaArray[selectedAreaArray.length - 1].areaCode;
+ for(var i = 0, item; item = selectedAreaArray[i++];) {
+ if(areaName) {
+ areaName += ' / ';
+ }
+ areaName += item.areaName;
+ }
+ $('#areaCode').val(areaCode);
+ $('#areaName').val(areaName);
+ }
+ }
+ })
+ });
+ $('#areaCleanBtn').on('click', function () {
+ $('#areaCode').val('');
+ $('#areaName').val('');
+ })
+ })();
+
});