From e62f76eab4dab7a620c8008d518580daafac47fe Mon Sep 17 00:00:00 2001
From: wangzeyan <258785420@qq.com>
Date: Sun, 18 May 2025 11:46:48 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9C=B0=E5=8C=BA=E9=80=89?=
=?UTF-8?q?=E6=8B=A9=E7=BB=84=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
admin/src/app/api/venue.ts | 4 +
admin/src/app/lang/zh-cn/venue.venue.json | 8 +-
.../app/views/venue/components/venue-edit.vue | 583 ++++++++++--------
admin/src/components/TencentMapPicker.vue | 5 +-
.../app/adminapi/controller/venue/Venue.php | 4 -
niucloud/app/adminapi/route/venue.php | 2 +
niucloud/app/validate/venue/Venue.php | 4 +-
7 files changed, 329 insertions(+), 281 deletions(-)
diff --git a/admin/src/app/api/venue.ts b/admin/src/app/api/venue.ts
index 695778f5..bf28df73 100644
--- a/admin/src/app/api/venue.ts
+++ b/admin/src/app/api/venue.ts
@@ -2,6 +2,10 @@ import request from '@/utils/request'
+
+
+
+
// USER_CODE_BEGIN -- venue
/**
* 获取场地列表
diff --git a/admin/src/app/lang/zh-cn/venue.venue.json b/admin/src/app/lang/zh-cn/venue.venue.json
index 03d57f6a..45c03127 100644
--- a/admin/src/app/lang/zh-cn/venue.venue.json
+++ b/admin/src/app/lang/zh-cn/venue.venue.json
@@ -9,12 +9,8 @@
"availabilityStatusPlaceholder":"请输入场地可用状态",
"timeRangeType":"场地可用时间范围类型",
"timeRangeTypePlaceholder":"请输入场地可用时间范围类型",
- "timeRangeStart":"范围类型的开始时间",
- "timeRangeStartPlaceholder":"请输入范围类型的开始时间",
- "timeRangeEnd":"范围类型的结束时间",
- "timeRangeEndPlaceholder":"请输入范围类型的结束时间",
- "fixedTimeRanges":"固定时间范围类型的可用时间, 存储为JSON数组",
- "fixedTimeRangesPlaceholder":"请输入固定时间范围类型的可用时间, 存储为JSON数组",
+ "fixedTimeRanges":"时间范围",
+ "fixedTimeRangesPlaceholder":"请输入时间范围",
"createdAt":"创建时间",
"createdAtPlaceholder":"请输入创建时间",
"updatedAt":"修改时间",
diff --git a/admin/src/app/views/venue/components/venue-edit.vue b/admin/src/app/views/venue/components/venue-edit.vue
index 47ec3aad..79e38621 100644
--- a/admin/src/app/views/venue/components/venue-edit.vue
+++ b/admin/src/app/views/venue/components/venue-edit.vue
@@ -1,267 +1,316 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.name }}
-
-
-
-
-
-
-
- {{ item.name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 可用
+ 不可用
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/admin/src/components/TencentMapPicker.vue b/admin/src/components/TencentMapPicker.vue
index 41341f31..89894672 100644
--- a/admin/src/components/TencentMapPicker.vue
+++ b/admin/src/components/TencentMapPicker.vue
@@ -1,7 +1,7 @@
{
}
const TMap = (window as any).TMap
- const center = new TMap.LatLng(39.90403, 116.407526)
+ const center = new TMap.LatLng(20.029077, 110.366367)
map = new TMap.Map('container', {
center,
@@ -499,5 +499,6 @@ onBeforeUnmount(() => {
.address-search {
display: flex;
gap: 8px;
+ margin-top: 20px;
}
diff --git a/niucloud/app/adminapi/controller/venue/Venue.php b/niucloud/app/adminapi/controller/venue/Venue.php
index 9db487d8..695807cd 100644
--- a/niucloud/app/adminapi/controller/venue/Venue.php
+++ b/niucloud/app/adminapi/controller/venue/Venue.php
@@ -59,8 +59,6 @@ class Venue extends BaseAdminController
["capacity",0],
["availability_status",0],
["time_range_type",""],
- ["time_range_start",""],
- ["time_range_end",""],
["fixed_time_ranges",""],
]);
@@ -81,8 +79,6 @@ class Venue extends BaseAdminController
["capacity",0],
["availability_status",0],
["time_range_type",""],
- ["time_range_start",""],
- ["time_range_end",""],
["fixed_time_ranges",""],
]);
diff --git a/niucloud/app/adminapi/route/venue.php b/niucloud/app/adminapi/route/venue.php
index 35faef3e..6234ac7e 100644
--- a/niucloud/app/adminapi/route/venue.php
+++ b/niucloud/app/adminapi/route/venue.php
@@ -15,6 +15,8 @@ use app\adminapi\middleware\AdminCheckRole;
use app\adminapi\middleware\AdminCheckToken;
use app\adminapi\middleware\AdminLog;
+
+
// USER_CODE_BEGIN -- venue
Route::group('venue', function () {
diff --git a/niucloud/app/validate/venue/Venue.php b/niucloud/app/validate/venue/Venue.php
index d4e25396..01b6d678 100644
--- a/niucloud/app/validate/venue/Venue.php
+++ b/niucloud/app/validate/venue/Venue.php
@@ -37,8 +37,8 @@ class Venue extends BaseValidate
];
protected $scene = [
- "add" => ['campus_id', 'venue_name', 'capacity', 'availability_status', 'time_range_type', 'time_range_start', 'time_range_end', 'fixed_time_ranges'],
- "edit" => ['campus_id', 'venue_name', 'capacity', 'availability_status', 'time_range_type', 'time_range_start', 'time_range_end', 'fixed_time_ranges']
+ "add" => ['campus_id', 'venue_name', 'capacity', 'availability_status', 'time_range_type', 'fixed_time_ranges'],
+ "edit" => ['campus_id', 'venue_name', 'capacity', 'availability_status', 'time_range_type', 'fixed_time_ranges']
];
}