Browse Source

1、地图配置

master
Aug 7 months ago
parent
commit
d826084f10
13 changed files with 393 additions and 157 deletions
  1. +1
    -0
      admin-hanhai-vue/package.json
  2. +3
    -0
      admin-hanhai-vue/src/main.js
  3. +20
    -41
      admin-hanhai-vue/src/views/travelSpot/TravelSpotList.vue
  4. +235
    -0
      admin-hanhai-vue/src/views/travelSpot/modules/TencentMapPicker.vue
  5. +33
    -8
      admin-hanhai-vue/src/views/travelSpot/modules/TravelSpotForm.vue
  6. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/controller/TravelSpotController.java
  7. +30
    -13
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/entity/TravelSpot.java
  8. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/mapper/TravelSpotMapper.java
  9. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/service/ITravelSpotService.java
  10. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/service/impl/TravelSpotServiceImpl.java
  11. +18
    -39
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/vue/TravelSpotList.vue
  12. +15
    -10
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/vue/modules/TravelSpotForm.vue
  13. +34
    -42
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/vue3/TravelSpot.data.ts

+ 1
- 0
admin-hanhai-vue/package.json View File

@ -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",


+ 3
- 0
admin-hanhai-vue/src/main.js View File

@ -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')


+ 20
- 41
admin-hanhai-vue/src/views/travelSpot/TravelSpotList.vue View File

@ -4,33 +4,6 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="地点名字">
<a-input placeholder="请输入地点名字" v-model="queryParam.spotName"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="地点所属景区">
<j-dict-select-tag placeholder="请选择地点所属景区" v-model="queryParam.areaId" dictCode="travel_area,area_name,id"/>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="地点类型">
<a-input placeholder="请输入地点类型" v-model="queryParam.categoryId"></a-input>
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
</a-form>
</div>
@ -39,10 +12,10 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('地点表')">导出</a-button>
<!-- <a-button type="primary" icon="download" @click="handleExportXls('地点表')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
</a-upload> -->
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
@ -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
}
}


+ 235
- 0
admin-hanhai-vue/src/views/travelSpot/modules/TencentMapPicker.vue View File

@ -0,0 +1,235 @@
<template>
<div>
<div class="map-box">
<div class="map" ref="map" style="height: 400px" ></div>
<div class="map-search">
<div>
<a-input-search id="place" v-model="searchValue" placeholder="请输入详细地址" enter-button @search="searchAddress(searchValue)" />
</div>
<div>
<ul v-if="kwData.length">
<li v-for="(item, index) in kwData" :key="index" @click="selectKeyword(item)">{{ item.address }}</li>
</ul>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'TencentMapPicker',
props: {
latitude: {
type: Number|String,
default: 0
},
longitude: {
type: Number|String,
default: 0
}
},
watch: {
latitude(newVal, oldVal) {
console.info(`newVal`,newVal,`oldVal`,oldVal)
if (newVal) {
this.form.latitude = newVal
// this.$nextTick(()=>{
// this.map.setCenter(new window.TMap.LatLng(this.form.latitude, this.form.longitude));
// })
}
},
longitude(newVal, oldVal) {
console.info(`newVal`,newVal,`oldVal`,oldVal)
if (newVal) {
this.form.longitude = newVal
// this.$nextTick(()=>{
// this.map.setCenter(new window.TMap.LatLng(this.form.latitude, this.form.longitude));
// })
}
}
},
data() {
return {
searchValue: '', //
form: {
longitude: 116.397128,
latitude: 39.916527
},
kwData:[]
}
},
mounted() {
let that = this
if (that.script) return;
that.script = document.createElement('script');
that.script.type = 'text/javascript';
that.script.src = `//map.qq.com/api/gljs?v=1.exp&libraries=service&key=SNGBZ-K6AKJ-5X2FI-XYKCM-DEZXZ-FGBA3`;
document.head.appendChild(that.script);
that.script.onload = () => {
window.initMap = that.initMap;
that.$nextTick(() => {
that.initMap();
});
};
},
methods: {
//
initMap() {
//
this.searchEr = new window.TMap.service.Search({ pageSize: 15 });
//
this.map = new window.TMap.Map(this.$refs.map, {
backgroundColor: '#f7f7f7',
mapStyleId: 'style1',
zoom: 14,
mapTypeControlOptions: {
mapTypeIds: [],
},
draggableCursor: 'crosshair',
center: new window.TMap.LatLng(this.form.latitude, this.form.longitude),
});
//
this.markerLayer = new window.TMap.MultiMarker({
map: this.map,
geometries: [],
});
//
this.geocoder = new window.TMap.service.Geocoder();
const setMarker = () => {
const latlng = new window.TMap.LatLng(this.form.latitude, this.form.longitude);
this.markerLayer.setGeometries([]);
let geometries = this.markerLayer.getGeometries();
geometries.push({
id: '-1',
position: latlng,
});
this.markerLayer.updateGeometries(geometries);
};
this.map.on('click', (e) => {
this.form.longitude = e.latLng.getLng(); //
this.form.latitude = e.latLng.getLat(); //
setMarker();
this.getAddressFormat();
});
if (this.form.longitude) {
this.map.setCenter(new window.TMap.LatLng(this.form.latitude, this.form.longitude));
setMarker();
}
},
selectKeyword(event){
this.map.setCenter(new window.TMap.LatLng(event.location.lat, event.location.lng));
this.kwData = []
},
//
searchAddress(keyword = '') {
if (!keyword) return;
this.$jsonp('https://apis.map.qq.com/ws/place/v1/suggestion', {
key: 'SNGBZ-K6AKJ-5X2FI-XYKCM-DEZXZ-FGBA3',
output: 'jsonp',
keyword: keyword,
}).then((res) => {
console.log(`res`,res)
if (res.status === 0) {
this.kwData = res.data
} else {
this.kwData = []
}
}).catch((e) => {
console.log(e)
})
this.markerLayer.setGeometries([]);
this.searchEr.searchRectangle({
keyword,
bounds: this.map.getBounds(),
})
.then((result) => {
console.info(`result`,result)
const { location = {} } = result.data[0] || {};
const { lat = 39.916527, lng = 116.397128 } = location;
this.map.setCenter(new window.TMap.LatLng(lat, lng));
result.data.forEach((item, index) => {
let geometries = this.markerLayer.getGeometries();
//
geometries.push({
id: String(index),
position: item.location,
});
//
this.markerLayer.updateGeometries(geometries);
});
});
},
getAddressFormat() {
const { longitude, latitude } = this.form;
this.geocoder
.getAddress({
location: new window.TMap.LatLng(latitude, longitude),
})
.then((res) => {
const {
formatted_addresses: { recommend = '' },
} = res.result || {};
this.searchValue = recommend
this.form.hotelDetailAddress = recommend;
this.$emit('onLocationSelected', this.form);
console.log(this.form);
});
},
}
}
</script>
<style>
.map-box {
position: relative;
}
.map-search {
z-index: 1000;
display: flex;
flex-direction: column;
position: absolute;
top: 20px;
left: 20px;
width: 300px;
}
button {
border-radius: 0;
}
.icons {
display: flex;
align-items: center;
justify-content: space-between;
}
.time {
margin-top: 15px;
width: 100%;
font-size: 12px;
flex-wrap: wrap;
height: 70%;
}
ul{
background: white;
list-style-type: none;
padding-left: 0px;
height: 280px;
overflow: scroll;
}
li{
padding-left: 6px;
font-size: 10px;
text-align: left;
height: 40px;
line-height: 15px;
display: flex;
align-items: center;
}
li:hover{
cursor: pointer;
background: #f5f5f5;
}
</style>

+ 33
- 8
admin-hanhai-vue/src/views/travelSpot/modules/TravelSpotForm.vue View File

@ -13,6 +13,16 @@
<j-image-upload isMultiple v-model="model.spotImage" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="所属景区" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="areaId">
<j-dict-select-tag type="list" v-model="model.areaId" dictCode="travel_area,area_name,id" placeholder="请选择所属景区" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="地点类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="categoryId">
<j-dict-select-tag type="list" v-model="model.categoryId" dictCode="jdz_spot" placeholder="请选择地点类型" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="地点坐标_经度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spotLongitude">
<a-input-number v-model="model.spotLongitude" placeholder="请输入地点坐标_经度" style="width: 100%" />
@ -24,23 +34,27 @@
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="地点所属景区" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="areaId">
<j-dict-select-tag type="list" v-model="model.areaId" dictCode="travel_area,area_name,id" placeholder="请选择地点所属景区" />
<a-form-model-item label="地图选择位置" :labelCol="labelCol" :wrapperCol="wrapperCol">
<TencentMapPicker
:latitude="model.spotLatitude"
:longitude="model.spotLongitude"
@onLocationSelected="handleLocationSelected"
/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="地点类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="categoryId">
<a-input-number v-model="model.categoryId" placeholder="请输入地点类型" style="width: 100%" />
<a-form-model-item label="地点详情" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spotDetail">
<j-editor v-model="model.spotDetail" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="地点详情" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spotDetail">
<j-editor v-model="model.spotDetail" />
<a-form-model-item label="语音讲解文字" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spotAudio">
<a-textarea v-model="model.spotAudio" rows="4" placeholder="请输入语音讲解文字" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="语音讲解内容" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spotAudio">
<a-input v-model="model.spotAudio" placeholder="请输入语音讲解内容" ></a-input>
<a-form-model-item label="语音讲解音频" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spotAudioContent">
<a-input v-model="model.spotAudioContent" placeholder="请输入语音讲解音频" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
@ -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);
},


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/controller/TravelSpotController.java View File

@ -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="地点表")


+ 30
- 13
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/entity/TravelSpot.java View File

@ -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;
}

+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/mapper/TravelSpotMapper.java View File

@ -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<TravelSpot> {


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/service/ITravelSpotService.java View File

@ -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<TravelSpot> {


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/service/impl/TravelSpotServiceImpl.java View File

@ -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


+ 18
- 39
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/vue/TravelSpotList.vue View File

@ -4,33 +4,6 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="地点名字">
<a-input placeholder="请输入地点名字" v-model="queryParam.spotName"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="地点所属景区">
<j-dict-select-tag placeholder="请选择地点所属景区" v-model="queryParam.areaId" dictCode="travel_area,area_name,id"/>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="地点类型">
<a-input placeholder="请输入地点类型" v-model="queryParam.categoryId"></a-input>
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
</a-form>
</div>
@ -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
}
}


+ 15
- 10
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/vue/modules/TravelSpotForm.vue View File

@ -14,23 +14,23 @@
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="地点坐标_经度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spotLongitude">
<a-input-number v-model="model.spotLongitude" placeholder="请输入地点坐标_经度" style="width: 100%" />
<a-form-model-item label="所属景区" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="areaId">
<j-dict-select-tag type="list" v-model="model.areaId" dictCode="travel_area,area_name,id" placeholder="请选择所属景区" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="地点坐标_纬度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spotLatitude">
<a-input-number v-model="model.spotLatitude" placeholder="请输入地点坐标_纬度" style="width: 100%" />
<a-form-model-item label="地点类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="categoryId">
<j-dict-select-tag type="list" v-model="model.categoryId" dictCode="jdz_spot" placeholder="请选择地点类型" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="地点所属景区" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="areaId">
<j-dict-select-tag type="list" v-model="model.areaId" dictCode="travel_area,area_name,id" placeholder="请选择地点所属景区" />
<a-form-model-item label="地点坐标_经度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spotLongitude">
<a-input-number v-model="model.spotLongitude" placeholder="请输入地点坐标_经度" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="地点类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="categoryId">
<a-input-number v-model="model.categoryId" placeholder="请输入地点类型" style="width: 100%" />
<a-form-model-item label="地点坐标_纬度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spotLatitude">
<a-input-number v-model="model.spotLatitude" placeholder="请输入地点坐标_纬度" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -39,8 +39,13 @@
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="语音讲解内容" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spotAudio">
<a-input v-model="model.spotAudio" placeholder="请输入语音讲解内容" ></a-input>
<a-form-model-item label="语音讲解文字" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spotAudio">
<a-textarea v-model="model.spotAudio" rows="4" placeholder="请输入语音讲解文字" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="语音讲解音频" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spotAudioContent">
<a-input v-model="model.spotAudioContent" placeholder="请输入语音讲解音频" ></a-input>
</a-form-model-item>
</a-col>
</a-row>


+ 34
- 42
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/travelSpot/vue3/TravelSpot.data.ts View File

@ -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',
},
];

Loading…
Cancel
Save