This commit is contained in:
ZhiJian 2024-07-03 22:07:54 +08:00
parent 16baa04bf6
commit d10d97f344
7 changed files with 248 additions and 7 deletions

View File

@ -38,7 +38,7 @@ public class CxxmUserXJ extends BaseEntity {
/** /**
* 部门名称 * 部门名称
*/ */
@Excel(name = "角色类型", type = Excel.Type.IMPORT, combo = {"县级管理员", "县级管理员", "外业调查员"}) @Excel(name = "角色类型", type = Excel.Type.IMPORT, combo = {"县级管理员", "外业调查员"})
private String roleName; private String roleName;
/** /**

View File

@ -32,7 +32,7 @@ public class CxxmUserZJ extends BaseEntity {
/** /**
* 部门名称 * 部门名称
*/ */
@Excel(name = "归属市县", type = Excel.Type.IMPORT, combo = {"楚雄", "禄丰市", "大姚县", "姚安县", "武定县", "双柏县", "牟定县", "南华县", "永仁县", "元谋县"}) @Excel(name = "归属市县", type = Excel.Type.IMPORT, combo = {"楚雄彝族自治州","楚雄", "禄丰市", "大姚县", "姚安县", "武定县", "双柏县", "牟定县", "南华县", "永仁县", "元谋县"})
private String deptName; private String deptName;
/** /**

View File

@ -8,7 +8,7 @@ spring:
master: master:
url: jdbc:mysql://ruoyi-mysql:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 url: jdbc:mysql://ruoyi-mysql:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root username: root
password: 123456 password: 7ZH2jxM1
# 从库数据源 # 从库数据源
slave: slave:
# 从数据源开关/默认关闭 # 从数据源开关/默认关闭

View File

@ -79,7 +79,7 @@ spring:
# 数据库索引 # 数据库索引
database: 0 database: 0
# 密码 # 密码
password: 123456 password: 7ZH2jxM1
# 连接超时时间 # 连接超时时间
timeout: 10s timeout: 10s
lettuce: lettuce:
@ -98,7 +98,7 @@ token:
# 令牌自定义标识 # 令牌自定义标识
header: Authorization header: Authorization
# 令牌密钥 # 令牌密钥
secret: abcdefghijklmnopqrstuvwxyz secret: c7uqYnmmmTxmoxUDd7tPYvpum2
# 令牌有效期默认30分钟 # 令牌有效期默认30分钟
expireTime: 4320 expireTime: 4320
@ -117,7 +117,7 @@ pagehelper:
supportMethodsArguments: true supportMethodsArguments: true
params: count=countSql params: count=countSql
# Swagger配置 # Swagger配置cd
swagger: swagger:
# 是否开启swagger # 是否开启swagger
enabled: true enabled: true

View File

@ -114,7 +114,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
.antMatchers("/login", "/register", "/captchaImage").permitAll() .antMatchers("/login", "/register", "/captchaImage").permitAll()
// 静态资源可匿名访问 // 静态资源可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() .antMatchers("/swagger-ui.htagml\", \"/swger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
.antMatchers("/cxxm/api/version/**","/cxxm/api/type/**","/cxxm/api/user/**").permitAll() .antMatchers("/cxxm/api/version/**","/cxxm/api/type/**","/cxxm/api/user/**").permitAll()
// 除上面外的所有请求全部需要鉴权认证 // 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated() .anyRequest().authenticated()

View File

@ -48,9 +48,11 @@
"js-beautify": "1.13.0", "js-beautify": "1.13.0",
"js-cookie": "3.0.1", "js-cookie": "3.0.1",
"jsencrypt": "3.0.0-rc.1", "jsencrypt": "3.0.0-rc.1",
"jszip": "^3.10.1",
"nprogress": "0.2.0", "nprogress": "0.2.0",
"quill": "1.3.7", "quill": "1.3.7",
"screenfull": "5.0.2", "screenfull": "5.0.2",
"shapefile": "^0.6.6",
"sortablejs": "1.10.2", "sortablejs": "1.10.2",
"v-charts": "^1.19.0", "v-charts": "^1.19.0",
"v-echarts": "^1.0.2", "v-echarts": "^1.0.2",

View File

@ -0,0 +1,239 @@
<template>
<div className="" style="position: relative">
<div id="lonlatMap" style=" width:100%; height: 100%;position: absolute;z-index: 1"></div>
<div
style="position: absolute;right:10px;top: 10px;z-index: 2;background:rgba(255,255,255,0.6);border-radius: 5px;overflow: hidden">
<div class="map-gj">图层</div>
<div class="map-gj" @click="onLineTool">测距</div>
<div class="map-gj" @click="onPolygonTool">测面</div>
<div class="map-gj" @click="clerOver">清除</div>
</div>
</div>
</template>
<script>
var zoom = 18
export default {
components: {},
name: 'info',
data() {
return {
map: null,
infoData: {},
recordData: {},
lineTool: null,//
polygonTool: null,//
}
},
props: ['value', 'files'],
watch: {
value: {
handler: function (newValue, oldValue) {
if (newValue) {
console.log(newValue, '-加载数据到 低于-')
this.infoData = newValue
}
},
immediate: true,
deep: true // truea
},
files: {
handler: function (newValue, oldValue) {
if (newValue) {
console.log(newValue, '-加载巡查情况到地图-')
// this.recordData = newValue
var thef = this
setTimeout(() => {
thef.map_set_images(newValue)
}, 1500)
}
},
immediate: true,
deep: true // truea
}
},
mounted() {
this.$nextTick(() => {
setTimeout(() => {
this.initMap()
}, 500)
setTimeout(() => {
this.setMap()
}, 1500)
})
},
methods: {
onLineTool() {
var config = {
showLabel: true
};
//
this.lineTool = new T.PolylineTool(this.map, config);
this.lineTool.open()
},
onPolygonTool() {
var config = {
showLabel: true,
color: "blue", weight: 3, opacity: 0.5, fillColor: "#FFFFFF", fillOpacity: 0.5
};
//
this.polygonTool = new T.PolygonTool(this.map, config);
this.polygonTool.open()
},
clerOver() {
var OverLay = this.map.getOverlays()
// console.log(OverLay)
if (OverLay && OverLay.length > 0) {
OverLay.map((item, index) => {
if (!item.id) {
this.map.removeOverLay(item)
}
})
}
},
initMap() {
return new Promise((resolve, reject) => {
//
if (window.T) {
console.log('地图脚本初始化成功...')
resolve(window.T)
reject('error')
}
})
},
setMap() {
this.map = new window.T.Map('lonlatMap');
this.map.setMapType(window.TMAP_HYBRID_MAP); //
// console.log(this.infoData)
var LngLat = new window.T.LngLat(Number(this.infoData.x), Number(this.infoData.y))
this.map.centerAndZoom(
LngLat,
zoom,
);
//
var scale = new window.T.Control.Scale();
//
this.map.addControl(scale);
this.addmark()
this.setMapPolers()
},
setMarkMap() {
console.log('多个标注')
},
addmark() {
var marker = new window.T.Marker(new window.T.LngLat(Number(this.infoData.x), Number(this.infoData.y)));//
this.map.addOverLay(marker); //
marker.id = "marker_map"
var label = new window.T.Label({
text: "<b style='background:#fff;padding: 10px;'>" + (this.infoData.dkh || this.infoData.tbbh) + "<b>",
position: marker.getLngLat(),
offset: new T.Point(3, -30)
});
this.map.addOverLay(label);
label.id = "label_map"
marker.addEventListener("drag", function (e) {
label.setLngLat(marker.getLngLat());
})
},
map_set_images(images) {
if (!images) {
return
}
var info = this.infoData
// var imageURL = "https://img0.baidu.com/it/u=2833047327,3565178077&fm=253&fmt=auto&app=138&f=JPEG?w=260&h=260"
var imageURL = require("@/assets/images/fx.png")
var mapPointsList = []
mapPointsList.push(new window.T.LngLat(Number(info.x), Number(info.y)))
images.map((item, index) => {
item.x = item.jd;
item.y = item.wd;
if (item.x && item.y) {
var newindex = Number(index) + 1
mapPointsList.push(new window.T.LngLat(Number(item.x), Number(item.y)))
item.x = Number(item.x)
item.y = Number(item.y)
var deg = Number(item.deg)
var optdiv = '<div style="position: relative;display: contents; width: 50px;height: 50px;overflow: hidden;">' +
'<b style="display: block; font-size: 15px;background: #007aff;border-radius: 100px;' +
'width: 20px;' +
'margin: 15px;' +
'height: 20px;opacity: 0.4;' +
'position: relative;' +
'text-align: center;' +
'left: -10px;line-height: 1.5;' +
'color: white;">' + newindex + '</b>' +
'<img src="' + imageURL + '" style="position: absolute; opacity: 0.5;z-index: -1;top: 0px; left: 0px;width: 50px;height: 50px; transform: rotate(' + deg + 'deg);"alt=""></div>'
var map_images = new window.T.Label({
text: optdiv,
position: new window.T.LngLat(item.x, item.y),
offset: new T.Point(-25, -25),
images: imageURL
});
this.map.addOverLay(map_images);
map_images.id = "map_images"
}
})
var centerPoint = this.map.getViewport(mapPointsList)
if (centerPoint !== undefined) {
// //
this.map.centerAndZoom(
centerPoint.center,
centerPoint.zoom,
);
}
},
setMapPolers() {
var opts = JSON.parse(this.infoData.gis)
if (opts.type == 'Polygon') {
var coordinates = opts.coordinates
for (var k in coordinates) {
var points = []
for (var i in coordinates[k]) {
if (coordinates[k][i][0] && coordinates[k][i][1]) {
points.push(new window.T.LngLat(Number(coordinates[k][i][0]), Number(coordinates[k][i][1])))
}
}
var polygon = new T.Polygon(points, {
color: 'blue',
weight: 3,
opacity: 0.5,
fillColor: '#FFFFFF',
fillOpacity: 0.5
})
console.log(polygon, '--')
//
this.map.addOverLay(polygon)
polygon.id = "polygon" + k
}
}
}
}
}
</script>
<style>
.tdt-label {
background: none !important;
border: none !important;
padding: 0;
box-shadow: none !important;
}
.map-gj {
padding: 5px 10px;
border: 1px solid #999999;
}
.map-gj:last-child {
border: none;
}
</style>