2025-04-12 17:58:01 vscode task自动提交
This commit is contained in:
parent
cdab004674
commit
d6004d595d
@ -22,7 +22,7 @@
|
||||
|
||||
5. 安装依赖环境
|
||||
本地
|
||||
pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
|
||||
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
线上
|
||||
pip install -r requirements_linux.txt -i https://mirrors.aliyun.com/pypi/simple/
|
||||
|
||||
|
||||
@ -72,6 +72,7 @@ INSTALLED_APPS = [
|
||||
'apps.lyFormBuilder',
|
||||
'apps.lyTiktokUnion',
|
||||
'apps.lyworkflow',
|
||||
'apps.mymaps',
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
|
||||
@ -78,10 +78,10 @@ urlpatterns = [
|
||||
path('media/<path:path>', streamingmedia_serve, {'document_root': settings.MEDIA_ROOT}, ), # 处理媒体文件
|
||||
# path('admin/', admin.site.urls),
|
||||
#api文档地址(正式上线需要注释掉)
|
||||
# re_path(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
|
||||
# re_path(r'^api/lyapi(?P<format>\.json|\.yaml)$', schema_view.without_ui(cache_timeout=0), name='api-schema-json'),
|
||||
# path('lyapi/', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
|
||||
# path(r'lyredoc/', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'),
|
||||
re_path(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
|
||||
re_path(r'^api/lyapi(?P<format>\.json|\.yaml)$', schema_view.without_ui(cache_timeout=0), name='api-schema-json'),
|
||||
path('lyapi/', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
|
||||
path(r'lyredoc/', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'),
|
||||
#管理后台的标准接口
|
||||
path('api/system/', include('mysystem.urls')),
|
||||
path('api/monitor/', include('lymonitor.urls')),
|
||||
|
||||
0
backend/apps/mymaps/__init__.py
Normal file
0
backend/apps/mymaps/__init__.py
Normal file
15
backend/apps/mymaps/models.py
Normal file
15
backend/apps/mymaps/models.py
Normal file
@ -0,0 +1,15 @@
|
||||
from mysystem.models import CoreModel
|
||||
from django.db import models
|
||||
|
||||
class MapPoint(CoreModel):
|
||||
"""地图点位管理"""
|
||||
name = models.CharField(max_length=100, verbose_name='点位名称')
|
||||
longitude = models.DecimalField(max_digits=10, decimal_places=6, verbose_name='经度')
|
||||
latitude = models.DecimalField(max_digits=10, decimal_places=6, verbose_name='纬度')
|
||||
address = models.CharField(max_length=200, verbose_name='详细地址')
|
||||
description = models.TextField(null=True, blank=True, verbose_name='描述')
|
||||
|
||||
class Meta:
|
||||
db_table = 'map_point'
|
||||
verbose_name = '地图点位表'
|
||||
verbose_name_plural = verbose_name
|
||||
10
backend/apps/mymaps/serializers.py
Normal file
10
backend/apps/mymaps/serializers.py
Normal file
@ -0,0 +1,10 @@
|
||||
from rest_framework import serializers
|
||||
from .models import MapPoint
|
||||
|
||||
class MapPointSerializer(serializers.ModelSerializer):
|
||||
create_datetime = serializers.DateTimeField(format='%Y-%m-%d %H:%M:%S', required=False)
|
||||
update_datetime = serializers.DateTimeField(format='%Y-%m-%d %H:%M:%S', required=False)
|
||||
|
||||
class Meta:
|
||||
model = MapPoint
|
||||
fields = '__all__'
|
||||
9
backend/apps/mymaps/urls.py
Normal file
9
backend/apps/mymaps/urls.py
Normal file
@ -0,0 +1,9 @@
|
||||
from django.urls import path, re_path
|
||||
from rest_framework import routers
|
||||
from .views import MapPointViewSet
|
||||
|
||||
router = routers.SimpleRouter()
|
||||
router.register(r'points', MapPointViewSet)
|
||||
|
||||
urlpatterns = [
|
||||
] + router.urls
|
||||
15
backend/apps/mymaps/views.py
Normal file
15
backend/apps/mymaps/views.py
Normal file
@ -0,0 +1,15 @@
|
||||
from utils.viewset import CustomModelViewSet
|
||||
from .models import MapPoint
|
||||
from .serializers import MapPointSerializer
|
||||
|
||||
class MapPointViewSet(CustomModelViewSet):
|
||||
"""
|
||||
地图点位管理接口
|
||||
list:查询
|
||||
create:新增
|
||||
update:修改
|
||||
destroy:删除
|
||||
"""
|
||||
queryset = MapPoint.objects.all()
|
||||
serializer_class = MapPointSerializer
|
||||
extra_filter_backends = []
|
||||
@ -8,7 +8,8 @@ from application.settings import BASE_DIR
|
||||
# 数据库地址
|
||||
DATABASE_ENGINE = "django.db.backends.mysql"
|
||||
# 数据库地址
|
||||
DATABASE_HOST = "47.112.174.207"
|
||||
# DATABASE_HOST = "47.112.174.207"
|
||||
DATABASE_HOST = "vpn.etoai.top"
|
||||
# 数据库端口
|
||||
DATABASE_PORT = 3306
|
||||
# 数据库用户名
|
||||
@ -35,10 +36,10 @@ REDIS_URL = f'redis://:{REDIS_PASSWORD or ""}@{REDIS_HOST}:{REDIS_PORT}'
|
||||
# ************** 服务器基本 配置 ************** #
|
||||
# ================================================= #
|
||||
|
||||
DEBUG = False #是否调试模式
|
||||
DEBUG = True #是否调试模式
|
||||
IS_DEMO = False #是否演示模式(演示模式只能查看无法保存、编辑、删除、新增)
|
||||
IS_SINGLE_TOKEN = False #是否只允许单用户单一地点登录(只有一个人在线上)(默认多地点登录),只针对后台用户生效
|
||||
ALLOW_FRONTEND = False#是否关闭前端API访问
|
||||
ALLOW_FRONTEND = True#是否关闭前端API访问
|
||||
LOGIN_ERROR_RETRY_TIMES = 0 #登录错误次数限制,0表示不限制
|
||||
LOGIN_ERROR_RETRY_TIMEOUT = 60 #登录错误次数过期时间,单位秒
|
||||
FRONTEND_API_LIST = ['/api/app/','/api/xcx/','/api/h5/']#微服务前端接口前缀
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
}
|
||||
}</style><script>var _hmt = _hmt || [];
|
||||
var hmid = "33e0b6798fd8809c21ef51bc99e3149e";
|
||||
(function () { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?" + hmid; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })();</script><script defer="defer" src="static/js/vendors.43bd63f4.js"></script><script defer="defer" src="static/js/app.45edd8d6.js"></script><link href="static/css/vendors.25c1fb87.css" rel="stylesheet"><link href="static/css/app.6a0d1a2a.css" rel="stylesheet"></head><body><noscript><strong>Sorry django-vue-lyadmin (dvlyadmin_pro) doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><script>var dark = window.localStorage.getItem('siteTheme');
|
||||
(function () { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?" + hmid; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })();</script><script src="https://api.tianditu.gov.cn/api?v=4.0&tk=467c0b8aabd1f6a6012c7c2026ea8818"></script><script defer="defer" src="static/js/app.a9e1e5aa.js"></script><link href="static/css/app.96d644d2.css" rel="stylesheet"></head><body><noscript><strong>Sorry django-vue-lyadmin (dvlyadmin_pro) doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><script>var dark = window.localStorage.getItem('siteTheme');
|
||||
if(dark && dark=="dark"){
|
||||
document.documentElement.classList.add("dark")
|
||||
}</script><div id="app" class="lyadmin"><div class="app-loading"><div class="app-loading__logo"><img src="static/img/logo.png"/></div><div class="app-loading__loader"></div><div class="app-loading__title">加载中</div></div></div></body></html>
|
||||
316
backend/frontend/static/css/839.af590168.css
Normal file
316
backend/frontend/static/css/839.af590168.css
Normal file
@ -0,0 +1,316 @@
|
||||
/*!
|
||||
* Cropper.js v1.6.2
|
||||
* https://fengyuanchen.github.io/cropperjs
|
||||
*
|
||||
* Copyright 2015-present Chen Fengyuan
|
||||
* Released under the MIT license
|
||||
*
|
||||
* Date: 2024-04-21T07:43:02.731Z
|
||||
*/
|
||||
|
||||
.cropper-container {
|
||||
direction: ltr;
|
||||
font-size: 0;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
touch-action: none;
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.cropper-container img {
|
||||
backface-visibility: hidden;
|
||||
display: block;
|
||||
height: 100%;
|
||||
image-orientation: 0deg;
|
||||
max-height: none !important;
|
||||
max-width: none !important;
|
||||
min-height: 0 !important;
|
||||
min-width: 0 !important;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.cropper-wrap-box,
|
||||
.cropper-canvas,
|
||||
.cropper-drag-box,
|
||||
.cropper-crop-box,
|
||||
.cropper-modal {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.cropper-wrap-box,
|
||||
.cropper-canvas {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.cropper-drag-box {
|
||||
background-color: #fff;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.cropper-modal {
|
||||
background-color: #000;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.cropper-view-box {
|
||||
display: block;
|
||||
height: 100%;
|
||||
outline: 1px solid #39f;
|
||||
outline-color: rgba(51, 153, 255, 0.75);
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.cropper-dashed {
|
||||
border: 0 dashed #eee;
|
||||
display: block;
|
||||
opacity: 0.5;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.cropper-dashed.dashed-h {
|
||||
border-bottom-width: 1px;
|
||||
border-top-width: 1px;
|
||||
height: calc(100% / 3);
|
||||
left: 0;
|
||||
top: calc(100% / 3);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.cropper-dashed.dashed-v {
|
||||
border-left-width: 1px;
|
||||
border-right-width: 1px;
|
||||
height: 100%;
|
||||
left: calc(100% / 3);
|
||||
top: 0;
|
||||
width: calc(100% / 3);
|
||||
}
|
||||
|
||||
.cropper-center {
|
||||
display: block;
|
||||
height: 0;
|
||||
left: 50%;
|
||||
opacity: 0.75;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.cropper-center::before,
|
||||
.cropper-center::after {
|
||||
background-color: #eee;
|
||||
content: ' ';
|
||||
display: block;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.cropper-center::before {
|
||||
height: 1px;
|
||||
left: -3px;
|
||||
top: 0;
|
||||
width: 7px;
|
||||
}
|
||||
|
||||
.cropper-center::after {
|
||||
height: 7px;
|
||||
left: 0;
|
||||
top: -3px;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
.cropper-face,
|
||||
.cropper-line,
|
||||
.cropper-point {
|
||||
display: block;
|
||||
height: 100%;
|
||||
opacity: 0.1;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.cropper-face {
|
||||
background-color: #fff;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.cropper-line {
|
||||
background-color: #39f;
|
||||
}
|
||||
|
||||
.cropper-line.line-e {
|
||||
cursor: ew-resize;
|
||||
right: -3px;
|
||||
top: 0;
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
.cropper-line.line-n {
|
||||
cursor: ns-resize;
|
||||
height: 5px;
|
||||
left: 0;
|
||||
top: -3px;
|
||||
}
|
||||
|
||||
.cropper-line.line-w {
|
||||
cursor: ew-resize;
|
||||
left: -3px;
|
||||
top: 0;
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
.cropper-line.line-s {
|
||||
bottom: -3px;
|
||||
cursor: ns-resize;
|
||||
height: 5px;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.cropper-point {
|
||||
background-color: #39f;
|
||||
height: 5px;
|
||||
opacity: 0.75;
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
.cropper-point.point-e {
|
||||
cursor: ew-resize;
|
||||
margin-top: -3px;
|
||||
right: -3px;
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
.cropper-point.point-n {
|
||||
cursor: ns-resize;
|
||||
left: 50%;
|
||||
margin-left: -3px;
|
||||
top: -3px;
|
||||
}
|
||||
|
||||
.cropper-point.point-w {
|
||||
cursor: ew-resize;
|
||||
left: -3px;
|
||||
margin-top: -3px;
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
.cropper-point.point-s {
|
||||
bottom: -3px;
|
||||
cursor: s-resize;
|
||||
left: 50%;
|
||||
margin-left: -3px;
|
||||
}
|
||||
|
||||
.cropper-point.point-ne {
|
||||
cursor: nesw-resize;
|
||||
right: -3px;
|
||||
top: -3px;
|
||||
}
|
||||
|
||||
.cropper-point.point-nw {
|
||||
cursor: nwse-resize;
|
||||
left: -3px;
|
||||
top: -3px;
|
||||
}
|
||||
|
||||
.cropper-point.point-sw {
|
||||
bottom: -3px;
|
||||
cursor: nesw-resize;
|
||||
left: -3px;
|
||||
}
|
||||
|
||||
.cropper-point.point-se {
|
||||
bottom: -3px;
|
||||
cursor: nwse-resize;
|
||||
height: 20px;
|
||||
opacity: 1;
|
||||
right: -3px;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
|
||||
.cropper-point.point-se {
|
||||
height: 15px;
|
||||
width: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
|
||||
.cropper-point.point-se {
|
||||
height: 10px;
|
||||
width: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
|
||||
.cropper-point.point-se {
|
||||
height: 5px;
|
||||
opacity: 0.75;
|
||||
width: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.cropper-point.point-se::before {
|
||||
background-color: #39f;
|
||||
bottom: -50%;
|
||||
content: ' ';
|
||||
display: block;
|
||||
height: 200%;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
right: -50%;
|
||||
width: 200%;
|
||||
}
|
||||
|
||||
.cropper-invisible {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.cropper-bg {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC);
|
||||
}
|
||||
|
||||
.cropper-hide {
|
||||
display: block;
|
||||
height: 0;
|
||||
position: absolute;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.cropper-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.cropper-move {
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
.cropper-crop {
|
||||
cursor: crosshair;
|
||||
}
|
||||
|
||||
.cropper-disabled .cropper-drag-box,
|
||||
.cropper-disabled .cropper-face,
|
||||
.cropper-disabled .cropper-line,
|
||||
.cropper-disabled .cropper-point {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
|
||||
.ly-cropper[data-v-2d8252e6] {height:300px;}
|
||||
.ly-cropper__img[data-v-2d8252e6] {height:100%;width:400px;float: left;background: #EBEEF5;}
|
||||
.ly-cropper__img img[data-v-2d8252e6] {display: none;}
|
||||
.ly-cropper__preview[data-v-2d8252e6] {width: 120px;margin-left: 20px;float: left;}
|
||||
.ly-cropper__preview h4[data-v-2d8252e6] {font-weight: normal;font-size: 12px;color: #999;margin-bottom: 20px;}
|
||||
.ly-cropper__preview__img[data-v-2d8252e6] {overflow: hidden;width: 120px;height: 120px;border: 1px solid #ebeef5;}
|
||||
|
||||
2461
backend/frontend/static/css/app.96d644d2.css
Normal file
2461
backend/frontend/static/css/app.96d644d2.css
Normal file
File diff suppressed because one or more lines are too long
2
backend/frontend/static/js/643.7f73a843.js
Normal file
2
backend/frontend/static/js/643.7f73a843.js
Normal file
File diff suppressed because one or more lines are too long
9
backend/frontend/static/js/643.7f73a843.js.LICENSE.txt
Normal file
9
backend/frontend/static/js/643.7f73a843.js.LICENSE.txt
Normal file
@ -0,0 +1,9 @@
|
||||
/*!
|
||||
* Cropper.js v1.6.2
|
||||
* https://fengyuanchen.github.io/cropperjs
|
||||
*
|
||||
* Copyright 2015-present Chen Fengyuan
|
||||
* Released under the MIT license
|
||||
*
|
||||
* Date: 2024-04-21T07:43:05.335Z
|
||||
*/
|
||||
1
backend/frontend/static/js/839.f1a8642e.js
Normal file
1
backend/frontend/static/js/839.f1a8642e.js
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkdjango_vue_lyadmin_pro=self.webpackChunkdjango_vue_lyadmin_pro||[]).push([[839],{96839:function(e,t,r){r.r(t),r.d(t,{default:function(){return m}});var s=r(61431);const o={class:"ly-cropper"},p={class:"ly-cropper__img"},a=["src"],i={class:"ly-cropper__preview"},c={class:"ly-cropper__preview__img",ref:"preview"};var l=r(65643),n=r.n(l),d={props:{src:{type:String,default:""},compress:{type:Number,default:1},aspectRatio:{type:Number,default:NaN}},data(){return{crop:null}},watch:{aspectRatio(e){this.crop.setAspectRatio(e)}},mounted(){this.init()},methods:{init(){this.crop=new(n())(this.$refs.img,{viewMode:2,dragMode:"move",responsive:!1,aspectRatio:this.aspectRatio,preview:this.$refs.preview})},setAspectRatio(e){this.crop.setAspectRatio(e)},getCropData(e,t="image/jpeg"){e(this.crop.getCroppedCanvas().toDataURL(t,this.compress))},getCropBlob(e,t="image/jpeg"){this.crop.getCroppedCanvas().toBlob((t=>{e(t)}),t,this.compress)},getCropFile(e,t="fileName.jpg",r="image/jpeg"){this.crop.getCroppedCanvas().toBlob((s=>{let o=new File([s],t,{type:r});e(o)}),r,this.compress)}}};var m=(0,r(66262).A)(d,[["render",function(e,t,r,l,n,d){return(0,s.openBlock)(),(0,s.createElementBlock)("div",o,[(0,s.createElementVNode)("div",p,[(0,s.createElementVNode)("img",{src:r.src,ref:"img"},null,8,a)]),(0,s.createElementVNode)("div",i,[t[0]||(t[0]=(0,s.createElementVNode)("h4",null,"图像预览",-1)),(0,s.createElementVNode)("div",c,null,512)])])}],["__scopeId","data-v-2d8252e6"]])}}]);
|
||||
2
backend/frontend/static/js/app.a9e1e5aa.js
Normal file
2
backend/frontend/static/js/app.a9e1e5aa.js
Normal file
File diff suppressed because one or more lines are too long
138
backend/frontend/static/js/app.a9e1e5aa.js.LICENSE.txt
Normal file
138
backend/frontend/static/js/app.a9e1e5aa.js.LICENSE.txt
Normal file
@ -0,0 +1,138 @@
|
||||
/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
|
||||
* @license MIT */
|
||||
|
||||
/*!
|
||||
|
||||
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
|
||||
<http://stuartk.com/jszip>
|
||||
|
||||
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
|
||||
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
|
||||
|
||||
JSZip uses the library pako released under the MIT license :
|
||||
https://github.com/nodeca/pako/blob/main/LICENSE
|
||||
*/
|
||||
|
||||
/*!
|
||||
* core-base v10.0.6
|
||||
* (c) 2025 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* shared v10.0.6
|
||||
* (c) 2025 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* vue-i18n v10.0.6
|
||||
* (c) 2025 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* vue-router v4.5.0
|
||||
* (c) 2024 Eduardo San Martin Morote
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
/*!
|
||||
* clipboard.js v2.0.11
|
||||
* https://clipboardjs.com/
|
||||
*
|
||||
* Licensed MIT © Zeno Rocha
|
||||
*/
|
||||
|
||||
/*!
|
||||
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
|
||||
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
||||
* Released under MIT License
|
||||
*/
|
||||
|
||||
/*!
|
||||
* pinia v2.3.1
|
||||
* (c) 2025 Eduardo San Martin Morote
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
/*!
|
||||
* VueCodemirror v6.1.1
|
||||
* Copyright (c) Surmon. All rights reserved.
|
||||
* Released under the MIT License.
|
||||
* Surmon
|
||||
*/
|
||||
|
||||
/*! #__NO_SIDE_EFFECTS__ */
|
||||
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
|
||||
/*! Element Plus Icons Vue v2.3.1 */
|
||||
|
||||
/**
|
||||
* Checks if an event is supported in the current execution environment.
|
||||
*
|
||||
* NOTE: This will not work correctly for non-generic events such as `change`,
|
||||
* `reset`, `load`, `error`, and `select`.
|
||||
*
|
||||
* Borrows from Modernizr.
|
||||
*
|
||||
* @param {string} eventNameSuffix Event name, e.g. "click".
|
||||
* @param {?boolean} capture Check if the capture phase is supported.
|
||||
* @return {boolean} True if the event is supported.
|
||||
* @internal
|
||||
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
||||
*/
|
||||
|
||||
/**
|
||||
* @vue/runtime-core v3.5.13
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
|
||||
/**
|
||||
* @vue/runtime-dom v3.5.13
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
|
||||
/**
|
||||
* @vue/shared v3.5.13
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
|
||||
/**!
|
||||
* Sortable 1.15.6
|
||||
* @author RubaXa <trash@rubaxa.org>
|
||||
* @author owenm <owen23355@gmail.com>
|
||||
* @license MIT
|
||||
*/
|
||||
@ -40,6 +40,7 @@ QQ:1042594286
|
||||
var hmid = "33e0b6798fd8809c21ef51bc99e3149e";
|
||||
(function () { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?" + hmid; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })();
|
||||
</script>
|
||||
<script type="text/javascript" src="https://api.tianditu.gov.cn/api?v=4.0&tk=467c0b8aabd1f6a6012c7c2026ea8818"></script>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
|
||||
47
frontend/src/views/map/myMapIndex.vue
Normal file
47
frontend/src/views/map/myMapIndex.vue
Normal file
@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<div class="map-container">
|
||||
<div id="map" style="width: 100%; height: 600px;"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref, onMounted } from 'vue'
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
name: 'MapView',
|
||||
setup() {
|
||||
const initMap = () => {
|
||||
// 创建天地图
|
||||
const map = new T.Map('map')
|
||||
// 设置显示地图的中心点和级别
|
||||
map.centerAndZoom(new T.LngLat(116.397428, 39.90923), 11)
|
||||
|
||||
// 添加地图控件
|
||||
map.addControl(new T.Control.Zoom()) // 缩放控件
|
||||
map.addControl(new T.Control.Scale()) // 比例尺控件
|
||||
map.addControl(new T.Control.MapType()) // 地图类型控件
|
||||
|
||||
// 切换到卫星影像
|
||||
// map.setMapType(TMAP_HYBRID_MAP)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
// 确保地图 API 加载完成
|
||||
if (window.T) {
|
||||
initMap()
|
||||
} else {
|
||||
console.error('天地图 API 未加载')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.map-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
@ -9,6 +9,7 @@ const productionGzipExtensions = ['js', 'css'];
|
||||
const webpack = require('webpack');
|
||||
|
||||
const appConfig = require("./src/config/index.js")
|
||||
const TerserPlugin = require('terser-webpack-plugin')
|
||||
|
||||
|
||||
function resolve(dir) {
|
||||
@ -155,4 +156,25 @@ module.exports = defineConfig({
|
||||
})
|
||||
.end()
|
||||
},
|
||||
configureWebpack: config => {
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
config.optimization = {
|
||||
minimize: true,
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
terserOptions: {
|
||||
compress: {
|
||||
drop_console: true, // 移除 console
|
||||
drop_debugger: true // 移除 debugger
|
||||
},
|
||||
mangle: true, // 混淆变量名
|
||||
output: {
|
||||
comments: false // 移除注释
|
||||
}
|
||||
}
|
||||
})
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
Loading…
x
Reference in New Issue
Block a user