From d826084f100b8f09404a2a6b0e6e43dd5502070e Mon Sep 17 00:00:00 2001
From: Aug <17674666882@163.com>
Date: Thu, 7 Nov 2024 15:17:06 +0800
Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=9C=B0=E5=9B=BE=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
admin-hanhai-vue/package.json | 1 +
admin-hanhai-vue/src/main.js | 3 +
.../src/views/travelSpot/TravelSpotList.vue | 61 ++----
.../views/travelSpot/modules/TencentMapPicker.vue | 235 +++++++++++++++++++++
.../views/travelSpot/modules/TravelSpotForm.vue | 41 +++-
.../controller/TravelSpotController.java | 2 +-
.../modules/travelSpot/entity/TravelSpot.java | 43 ++--
.../travelSpot/mapper/TravelSpotMapper.java | 2 +-
.../travelSpot/service/ITravelSpotService.java | 2 +-
.../service/impl/TravelSpotServiceImpl.java | 2 +-
.../modules/travelSpot/vue/TravelSpotList.vue | 57 ++---
.../travelSpot/vue/modules/TravelSpotForm.vue | 25 ++-
.../modules/travelSpot/vue3/TravelSpot.data.ts | 76 +++----
13 files changed, 393 insertions(+), 157 deletions(-)
create mode 100644 admin-hanhai-vue/src/views/travelSpot/modules/TencentMapPicker.vue
diff --git a/admin-hanhai-vue/package.json b/admin-hanhai-vue/package.json
index c8a446b..77e4060 100644
--- a/admin-hanhai-vue/package.json
+++ b/admin-hanhai-vue/package.json
@@ -35,6 +35,7 @@
"vue-area-linkage": "^5.1.0",
"vue-cropper": "^0.5.4",
"vue-i18n": "^8.7.0",
+ "vue-jsonp": "^2.0.0",
"vue-loader": "^15.7.0",
"vue-ls": "^3.2.0",
"vue-photo-preview": "^1.1.3",
diff --git a/admin-hanhai-vue/src/main.js b/admin-hanhai-vue/src/main.js
index 0809df2..6494dee 100644
--- a/admin-hanhai-vue/src/main.js
+++ b/admin-hanhai-vue/src/main.js
@@ -8,6 +8,9 @@ import router from './router'
import store from './store/'
import { VueAxios } from "@/utils/request"
+import { VueJsonp } from 'vue-jsonp'
+Vue.use(VueJsonp)
+
require('@jeecg/antd-online-mini')
require('@jeecg/antd-online-mini/dist/OnlineForm.css')
diff --git a/admin-hanhai-vue/src/views/travelSpot/TravelSpotList.vue b/admin-hanhai-vue/src/views/travelSpot/TravelSpotList.vue
index 126f59f..39a4594 100644
--- a/admin-hanhai-vue/src/views/travelSpot/TravelSpotList.vue
+++ b/admin-hanhai-vue/src/views/travelSpot/TravelSpotList.vue
@@ -4,33 +4,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 查询
- 重置
-
- {{ toggleSearchStatus ? '收起' : '展开' }}
-
-
-
-
@@ -39,10 +12,10 @@
新增
-
导出
+
@@ -161,24 +134,24 @@
scopedSlots: {customRender: 'imgSlot'}
},
{
- title:'地点坐标_经度',
+ title:'所属景区',
align:"center",
- dataIndex: 'spotLongitude'
+ dataIndex: 'areaId_dictText'
},
{
- title:'地点坐标_纬度',
+ title:'地点类型',
align:"center",
- dataIndex: 'spotLatitude'
+ dataIndex: 'categoryId_dictText'
},
{
- title:'地点所属景区',
+ title:'地点坐标_经度',
align:"center",
- dataIndex: 'areaId_dictText'
+ dataIndex: 'spotLongitude'
},
{
- title:'地点类型',
+ title:'地点坐标_纬度',
align:"center",
- dataIndex: 'categoryId'
+ dataIndex: 'spotLatitude'
},
{
title:'地点详情',
@@ -187,10 +160,15 @@
scopedSlots: {customRender: 'htmlSlot'}
},
{
- title:'语音讲解内容',
+ title:'语音讲解文字',
align:"center",
dataIndex: 'spotAudio'
},
+ {
+ title:'语音讲解音频',
+ align:"center",
+ dataIndex: 'spotAudioContent'
+ },
{
title: '操作',
dataIndex: 'action',
@@ -227,12 +205,13 @@
let fieldList=[];
fieldList.push({type:'string',value:'spotName',text:'地点名字',dictCode:''})
fieldList.push({type:'string',value:'spotImage',text:'地点图片',dictCode:''})
+ fieldList.push({type:'string',value:'areaId',text:'所属景区',dictCode:"travel_area,area_name,id"})
+ fieldList.push({type:'string',value:'categoryId',text:'地点类型',dictCode:'jdz_spot'})
fieldList.push({type:'BigDecimal',value:'spotLongitude',text:'地点坐标_经度',dictCode:''})
fieldList.push({type:'BigDecimal',value:'spotLatitude',text:'地点坐标_纬度',dictCode:''})
- fieldList.push({type:'string',value:'areaId',text:'地点所属景区',dictCode:"travel_area,area_name,id"})
- fieldList.push({type:'int',value:'categoryId',text:'地点类型',dictCode:''})
fieldList.push({type:'Text',value:'spotDetail',text:'地点详情',dictCode:''})
- fieldList.push({type:'Text',value:'spotAudio',text:'语音讲解内容',dictCode:''})
+ fieldList.push({type:'Text',value:'spotAudio',text:'语音讲解文字',dictCode:''})
+ fieldList.push({type:'string',value:'spotAudioContent',text:'语音讲解音频',dictCode:''})
this.superFieldList = fieldList
}
}
diff --git a/admin-hanhai-vue/src/views/travelSpot/modules/TencentMapPicker.vue b/admin-hanhai-vue/src/views/travelSpot/modules/TencentMapPicker.vue
new file mode 100644
index 0000000..a3a0674
--- /dev/null
+++ b/admin-hanhai-vue/src/views/travelSpot/modules/TencentMapPicker.vue
@@ -0,0 +1,235 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/admin-hanhai-vue/src/views/travelSpot/modules/TravelSpotForm.vue b/admin-hanhai-vue/src/views/travelSpot/modules/TravelSpotForm.vue
index 81ad894..7cc67cb 100644
--- a/admin-hanhai-vue/src/views/travelSpot/modules/TravelSpotForm.vue
+++ b/admin-hanhai-vue/src/views/travelSpot/modules/TravelSpotForm.vue
@@ -13,6 +13,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -24,23 +34,27 @@
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
@@ -53,10 +67,12 @@
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
+ import TencentMapPicker from './TencentMapPicker.vue';
export default {
name: 'TravelSpotForm',
components: {
+ TencentMapPicker
},
props: {
//表单禁用
@@ -69,6 +85,8 @@
data () {
return {
model:{
+ longitude:null,
+ latitude:null,
},
labelCol: {
xs: { span: 24 },
@@ -98,6 +116,13 @@
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
+
+ handleLocationSelected({latitude, longitude}) {
+ console.log('event',latitude, longitude)
+ this.model.spotLatitude = latitude;
+ this.model.spotLongitude = longitude;
+ },
+
add () {
this.edit(this.modelDefault);
},
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/controller/TravelSpotController.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/controller/TravelSpotController.java
index 1f44eaa..32b9ae0 100644
--- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/controller/TravelSpotController.java
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/controller/TravelSpotController.java
@@ -39,7 +39,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 地点表
* @Author: jeecg-boot
- * @Date: 2024-10-16
+ * @Date: 2024-11-07
* @Version: V1.0
*/
@Api(tags="地点表")
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/entity/TravelSpot.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/entity/TravelSpot.java
index 188b206..6508461 100644
--- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/entity/TravelSpot.java
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/entity/TravelSpot.java
@@ -20,7 +20,7 @@ import lombok.experimental.Accessors;
/**
* @Description: 地点表
* @Author: jeecg-boot
- * @Date: 2024-10-16
+ * @Date: 2024-11-07
* @Version: V1.0
*/
@Data
@@ -35,6 +35,18 @@ public class TravelSpot implements Serializable {
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
+ /**创建人*/
+ @ApiModelProperty(value = "创建人")
+ private java.lang.String createBy;
+ /**创建日期*/
+ @ApiModelProperty(value = "创建日期")
+ private java.util.Date createTime;
+ /**更新人*/
+ @ApiModelProperty(value = "更新人")
+ private java.lang.String updateBy;
+ /**更新日期*/
+ @ApiModelProperty(value = "更新日期")
+ private java.util.Date updateTime;
/**地点名字*/
@Excel(name = "地点名字", width = 15)
@ApiModelProperty(value = "地点名字")
@@ -43,6 +55,16 @@ public class TravelSpot implements Serializable {
@Excel(name = "地点图片", width = 15)
@ApiModelProperty(value = "地点图片")
private java.lang.String spotImage;
+ /**所属景区*/
+ @Excel(name = "所属景区", width = 15, dictTable = "travel_area", dicText = "area_name", dicCode = "id")
+ @Dict(dictTable = "travel_area", dicText = "area_name", dicCode = "id")
+ @ApiModelProperty(value = "所属景区")
+ private java.lang.String areaId;
+ /**地点类型*/
+ @Excel(name = "地点类型", width = 15, dicCode = "jdz_spot")
+ @Dict(dicCode = "jdz_spot")
+ @ApiModelProperty(value = "地点类型")
+ private java.lang.String categoryId;
/**地点坐标_经度*/
@Excel(name = "地点坐标_经度", width = 15)
@ApiModelProperty(value = "地点坐标_经度")
@@ -51,21 +73,16 @@ public class TravelSpot implements Serializable {
@Excel(name = "地点坐标_纬度", width = 15)
@ApiModelProperty(value = "地点坐标_纬度")
private java.math.BigDecimal spotLatitude;
- /**地点所属景区*/
- @Excel(name = "地点所属景区", width = 15, dictTable = "travel_area", dicText = "area_name", dicCode = "id")
- @Dict(dictTable = "travel_area", dicText = "area_name", dicCode = "id")
- @ApiModelProperty(value = "地点所属景区")
- private java.lang.String areaId;
- /**地点类型*/
- @Excel(name = "地点类型", width = 15)
- @ApiModelProperty(value = "地点类型")
- private java.lang.Integer categoryId;
/**地点详情*/
@Excel(name = "地点详情", width = 15)
@ApiModelProperty(value = "地点详情")
private java.lang.String spotDetail;
- /**语音讲解内容*/
- @Excel(name = "语音讲解内容", width = 15)
- @ApiModelProperty(value = "语音讲解内容")
+ /**语音讲解文字*/
+ @Excel(name = "语音讲解文字", width = 15)
+ @ApiModelProperty(value = "语音讲解文字")
private java.lang.String spotAudio;
+ /**语音讲解音频*/
+ @Excel(name = "语音讲解音频", width = 15)
+ @ApiModelProperty(value = "语音讲解音频")
+ private java.lang.String spotAudioContent;
}
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/mapper/TravelSpotMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/mapper/TravelSpotMapper.java
index 47c5b94..f2b8bde 100644
--- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/mapper/TravelSpotMapper.java
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/mapper/TravelSpotMapper.java
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 地点表
* @Author: jeecg-boot
- * @Date: 2024-10-16
+ * @Date: 2024-11-07
* @Version: V1.0
*/
public interface TravelSpotMapper extends BaseMapper {
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/service/ITravelSpotService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/service/ITravelSpotService.java
index e618026..4eafb09 100644
--- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/service/ITravelSpotService.java
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/service/ITravelSpotService.java
@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 地点表
* @Author: jeecg-boot
- * @Date: 2024-10-16
+ * @Date: 2024-11-07
* @Version: V1.0
*/
public interface ITravelSpotService extends IService {
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/service/impl/TravelSpotServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/service/impl/TravelSpotServiceImpl.java
index a1c2a72..e61b1c7 100644
--- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/service/impl/TravelSpotServiceImpl.java
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/service/impl/TravelSpotServiceImpl.java
@@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 地点表
* @Author: jeecg-boot
- * @Date: 2024-10-16
+ * @Date: 2024-11-07
* @Version: V1.0
*/
@Service
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/vue/TravelSpotList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/vue/TravelSpotList.vue
index 126f59f..4990af7 100644
--- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/vue/TravelSpotList.vue
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/vue/TravelSpotList.vue
@@ -4,33 +4,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 查询
- 重置
-
- {{ toggleSearchStatus ? '收起' : '展开' }}
-
-
-
-
@@ -161,24 +134,24 @@
scopedSlots: {customRender: 'imgSlot'}
},
{
- title:'地点坐标_经度',
+ title:'所属景区',
align:"center",
- dataIndex: 'spotLongitude'
+ dataIndex: 'areaId_dictText'
},
{
- title:'地点坐标_纬度',
+ title:'地点类型',
align:"center",
- dataIndex: 'spotLatitude'
+ dataIndex: 'categoryId_dictText'
},
{
- title:'地点所属景区',
+ title:'地点坐标_经度',
align:"center",
- dataIndex: 'areaId_dictText'
+ dataIndex: 'spotLongitude'
},
{
- title:'地点类型',
+ title:'地点坐标_纬度',
align:"center",
- dataIndex: 'categoryId'
+ dataIndex: 'spotLatitude'
},
{
title:'地点详情',
@@ -187,10 +160,15 @@
scopedSlots: {customRender: 'htmlSlot'}
},
{
- title:'语音讲解内容',
+ title:'语音讲解文字',
align:"center",
dataIndex: 'spotAudio'
},
+ {
+ title:'语音讲解音频',
+ align:"center",
+ dataIndex: 'spotAudioContent'
+ },
{
title: '操作',
dataIndex: 'action',
@@ -227,12 +205,13 @@
let fieldList=[];
fieldList.push({type:'string',value:'spotName',text:'地点名字',dictCode:''})
fieldList.push({type:'string',value:'spotImage',text:'地点图片',dictCode:''})
+ fieldList.push({type:'string',value:'areaId',text:'所属景区',dictCode:"travel_area,area_name,id"})
+ fieldList.push({type:'string',value:'categoryId',text:'地点类型',dictCode:'jdz_spot'})
fieldList.push({type:'BigDecimal',value:'spotLongitude',text:'地点坐标_经度',dictCode:''})
fieldList.push({type:'BigDecimal',value:'spotLatitude',text:'地点坐标_纬度',dictCode:''})
- fieldList.push({type:'string',value:'areaId',text:'地点所属景区',dictCode:"travel_area,area_name,id"})
- fieldList.push({type:'int',value:'categoryId',text:'地点类型',dictCode:''})
fieldList.push({type:'Text',value:'spotDetail',text:'地点详情',dictCode:''})
- fieldList.push({type:'Text',value:'spotAudio',text:'语音讲解内容',dictCode:''})
+ fieldList.push({type:'Text',value:'spotAudio',text:'语音讲解文字',dictCode:''})
+ fieldList.push({type:'string',value:'spotAudioContent',text:'语音讲解音频',dictCode:''})
this.superFieldList = fieldList
}
}
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/vue/modules/TravelSpotForm.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/vue/modules/TravelSpotForm.vue
index 81ad894..c78df26 100644
--- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/vue/modules/TravelSpotForm.vue
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/vue/modules/TravelSpotForm.vue
@@ -14,23 +14,23 @@
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
@@ -39,8 +39,13 @@
-
-
+
+
+
+
+
+
+
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/vue3/TravelSpot.data.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/vue3/TravelSpot.data.ts
index 46a4eca..2302304 100644
--- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/vue3/TravelSpot.data.ts
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/vue3/TravelSpot.data.ts
@@ -16,24 +16,24 @@ export const columns: BasicColumn[] = [
customRender:render.renderAvatar,
},
{
- title: '地点坐标_经度',
+ title: '所属景区',
align:"center",
- dataIndex: 'spotLongitude'
+ dataIndex: 'areaId_dictText'
},
{
- title: '地点坐标_纬度',
+ title: '地点类型',
align:"center",
- dataIndex: 'spotLatitude'
+ dataIndex: 'categoryId_dictText'
},
{
- title: '地点所属景区',
+ title: '地点坐标_经度',
align:"center",
- dataIndex: 'areaId_dictText'
+ dataIndex: 'spotLongitude'
},
{
- title: '地点类型',
+ title: '地点坐标_纬度',
align:"center",
- dataIndex: 'categoryId'
+ dataIndex: 'spotLatitude'
},
{
title: '地点详情',
@@ -42,34 +42,18 @@ export const columns: BasicColumn[] = [
slots: { customRender: 'htmlSlot' },
},
{
- title: '语音讲解内容',
+ title: '语音讲解文字',
align:"center",
dataIndex: 'spotAudio'
},
+ {
+ title: '语音讲解音频',
+ align:"center",
+ dataIndex: 'spotAudioContent'
+ },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
- {
- label: "地点名字",
- field: "spotName",
- component: 'Input',
- colProps: {span: 6},
- },
- {
- label: "地点所属景区",
- field: "areaId",
- component: 'JDictSelectTag',
- componentProps:{
- dictCode:"travel_area,area_name,id"
- },
- colProps: {span: 6},
- },
- {
- label: "地点类型",
- field: "categoryId",
- component: 'Input',
- colProps: {span: 6},
- },
];
//表单数据
export const formSchema: FormSchema[] = [
@@ -86,17 +70,7 @@ export const formSchema: FormSchema[] = [
},
},
{
- label: '地点坐标_经度',
- field: 'spotLongitude',
- component: 'InputNumber',
- },
- {
- label: '地点坐标_纬度',
- field: 'spotLatitude',
- component: 'InputNumber',
- },
- {
- label: '地点所属景区',
+ label: '所属景区',
field: 'areaId',
component: 'JDictSelectTag',
componentProps:{
@@ -106,6 +80,19 @@ export const formSchema: FormSchema[] = [
{
label: '地点类型',
field: 'categoryId',
+ component: 'JDictSelectTag',
+ componentProps:{
+ dictCode:"jdz_spot"
+ },
+ },
+ {
+ label: '地点坐标_经度',
+ field: 'spotLongitude',
+ component: 'InputNumber',
+ },
+ {
+ label: '地点坐标_纬度',
+ field: 'spotLatitude',
component: 'InputNumber',
},
{
@@ -114,8 +101,13 @@ export const formSchema: FormSchema[] = [
component: 'JCodeEditor', //TODO String后缀暂未添加
},
{
- label: '语音讲解内容',
+ label: '语音讲解文字',
field: 'spotAudio',
+ component: 'InputTextArea',//TODO 注意string转换问题
+ },
+ {
+ label: '语音讲解音频',
+ field: 'spotAudioContent',
component: 'Input',
},
];