diff --git a/package.json b/package.json index 2a1f8a5..0ae6359 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,8 @@ "js-beautify": "1.13.0", "js-cookie": "3.0.1", "jsencrypt": "3.0.0-rc.1", + "leaflet": "^1.9.4", + "mars2d": "^3.3.1", "nprogress": "0.2.0", "quill": "2.0.2", "screenfull": "5.0.2", diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..06bf7a6 --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,153 @@ +{ + "zoom": 13, + "center": { "lng": 117.240601, "lat": 31.827107 }, + "minZoom": 2, + "maxZoom": 18, + "centerAutoLevel": 15, + "control": { + "scale": true, + "locationBar": { + "crs": "CGCS2000_GK_Zone_3", + "template": "
经度:{lng}
纬度:{lat}
横{crsx} 纵{crsy}
层级:{level}
" + }, + "zoom": { "position": "bottomleft" }, + "toolBar": { "position": "bottomleft" } + }, + "basemaps": [ + { + "id": 10, + "name": "地图底图", + "type": "group" + }, + { + "pid": 10, + "name": "天地图电子", + "icon": "img/basemaps/tdt_vec.png", + "type": "group", + "layers": [ + { + "name": "底图", + "type": "tdt", + "layer": "vec_d" + }, + { + "name": "注记", + "type": "tdt", + "layer": "vec_z" + } + ] + }, + { + "pid": 10, + "name": "天地图卫星", + "icon": "img/basemaps/tdt_img.png", + "type": "group", + "layers": [ + { + "name": "底图", + "type": "tdt", + "layer": "img_d" + }, + { + "name": "注记", + "type": "tdt", + "layer": "img_z" + } + ] + }, + { + "pid": 10, + "name": "天地图地形", + "icon": "img/basemaps/tdt_ter.png", + "type": "tdt", + "layer": "ter", + "maxNativeZoom": 14, + "errorTileUrl": "img/tile/errortile.png" + }, + { + "id": 2021, + "pid": 10, + "name": "高德电子", + "icon": "img/basemaps/gaode_vec.png", + "type": "gaode", + "layer": "vec", + "show": true + }, + { + "pid": 10, + "name": "高德卫星", + "icon": "img/basemaps/gaode_img.png", + "type": "group", + "layers": [ + { + "name": "底图", + "type": "gaode", + "layer": "img_d" + }, + { + "name": "注记", + "type": "gaode", + "layer": "img_z" + } + ] + }, + { + "pid": 10, + "name": "腾讯电子", + "icon": "/img/basemaps/tencent_vec.png", + "type": "tencent", + "layer": "vec" + }, + { + "pid": 10, + "name": "腾讯影像", + "icon": "/img/basemaps/tencent_img.png", + "type": "group", + "layers": [ + { "name": "底图", "type": "tencent", "layer": "img_d" }, + { "name": "注记", "type": "tencent", "layer": "img_z" } + ] + }, + { + "pid": 10, + "name": "ArcGIS电子", + "icon": "img/basemaps/esriNationalGeographic.png", + "type": "tile", + "url": "https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}", + "chinaCRS": "GCJ02" + }, + { + "pid": 10, + "name": "ArcGIS影像", + "icon": "img/basemaps/esriWorldImagery.png", + "type": "arcgis", + "url": "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer" + }, + { + "id": 2017, + "pid": 10, + "name": "蓝色地图", + "icon": "img/basemaps/bd-c-midnight.png", + "type": "gaode", + "layer": "vec", + "customColor": "#11243C" + }, + { + "pid": 10, + "name": "灰色地图", + "icon": "img/basemaps/bd-c-grayscale.png", + "type": "gaode", + "layer": "vec", + "customColor": "#575757" + }, + { + "pid": 10, + "name": "离线影像(供参考)", + "icon": "/img/basemaps/google_img.png", + "type": "xyz", + "url": "//data.mars3d.cn/tile/img/{z}/{x}/{y}.jpg", + "chinaCRS": "GCJ02", + "maxZoom": 13 + } + ] +} diff --git a/src/components/Mars2dMap/index.vue b/src/components/Mars2dMap/index.vue new file mode 100644 index 0000000..ca21abe --- /dev/null +++ b/src/components/Mars2dMap/index.vue @@ -0,0 +1,68 @@ + + + diff --git a/src/main.js b/src/main.js index e9c4615..7b01b0d 100644 --- a/src/main.js +++ b/src/main.js @@ -1,72 +1,83 @@ -import Vue from 'vue' +import Vue from "vue"; -import Cookies from 'js-cookie' +import Cookies from "js-cookie"; -import Element from 'element-ui' -import './assets/styles/element-variables.scss' +import Element from "element-ui"; +import "./assets/styles/element-variables.scss"; -import '@/assets/styles/index.scss' // global css -import '@/assets/styles/ruoyi.scss' // ruoyi css -import App from './App' -import store from './store' -import router from './router' -import directive from './directive' // directive -import plugins from './plugins' // plugins -import { download } from '@/utils/request' +import "@/assets/styles/index.scss"; // global css +import "@/assets/styles/ruoyi.scss"; // ruoyi css -import './assets/icons' // icon -import './permission' // permission control +import "leaflet/dist/leaflet.css"; +import "leaflet"; + +import "mars2d/mars2d.css"; + +import App from "./App"; +import store from "./store"; +import router from "./router"; +import directive from "./directive"; // directive +import plugins from "./plugins"; // plugins +import { download } from "@/utils/request"; + +import "./assets/icons"; // icon +import "./permission"; // permission control import { getDicts } from "@/api/system/dict/data"; import { getConfigKey } from "@/api/system/config"; -import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi"; +import { + parseTime, + resetForm, + addDateRange, + selectDictLabel, + selectDictLabels, + handleTree, +} from "@/utils/ruoyi"; // 分页组件 import Pagination from "@/components/Pagination"; // 自定义表格工具组件 -import RightToolbar from "@/components/RightToolbar" +import RightToolbar from "@/components/RightToolbar"; // 富文本组件 -import Editor from "@/components/Editor" +import Editor from "@/components/Editor"; // 文件上传组件 -import FileUpload from "@/components/FileUpload" +import FileUpload from "@/components/FileUpload"; // 图片上传组件 -import ImageUpload from "@/components/ImageUpload" +import ImageUpload from "@/components/ImageUpload"; // 图片预览组件 -import ImagePreview from "@/components/ImagePreview" +import ImagePreview from "@/components/ImagePreview"; // 字典标签组件 -import DictTag from '@/components/DictTag' +import DictTag from "@/components/DictTag"; // 头部标签组件 -import VueMeta from 'vue-meta' +import VueMeta from "vue-meta"; // 字典数据组件 -import DictData from '@/components/DictData' +import DictData from "@/components/DictData"; //echarts -import * as echarts from 'echarts' - - +import * as echarts from "echarts"; // 全局方法挂载 -Vue.prototype.getDicts = getDicts -Vue.prototype.getConfigKey = getConfigKey -Vue.prototype.parseTime = parseTime -Vue.prototype.resetForm = resetForm -Vue.prototype.addDateRange = addDateRange -Vue.prototype.selectDictLabel = selectDictLabel -Vue.prototype.selectDictLabels = selectDictLabels -Vue.prototype.download = download -Vue.prototype.handleTree = handleTree +Vue.prototype.getDicts = getDicts; +Vue.prototype.getConfigKey = getConfigKey; +Vue.prototype.parseTime = parseTime; +Vue.prototype.resetForm = resetForm; +Vue.prototype.addDateRange = addDateRange; +Vue.prototype.selectDictLabel = selectDictLabel; +Vue.prototype.selectDictLabels = selectDictLabels; +Vue.prototype.download = download; +Vue.prototype.handleTree = handleTree; Vue.prototype.$echarts = echarts; // 全局组件挂载 -Vue.component('DictTag', DictTag) -Vue.component('Pagination', Pagination) -Vue.component('RightToolbar', RightToolbar) -Vue.component('Editor', Editor) -Vue.component('FileUpload', FileUpload) -Vue.component('ImageUpload', ImageUpload) -Vue.component('ImagePreview', ImagePreview) +Vue.component("DictTag", DictTag); +Vue.component("Pagination", Pagination); +Vue.component("RightToolbar", RightToolbar); +Vue.component("Editor", Editor); +Vue.component("FileUpload", FileUpload); +Vue.component("ImageUpload", ImageUpload); +Vue.component("ImagePreview", ImagePreview); -Vue.use(directive) -Vue.use(plugins) -Vue.use(VueMeta) -DictData.install() +Vue.use(directive); +Vue.use(plugins); +Vue.use(VueMeta); +DictData.install(); /** * If you don't want to use mock-server @@ -78,14 +89,14 @@ DictData.install() */ Vue.use(Element, { - size: Cookies.get('size') || 'medium' // set element-ui default size -}) + size: Cookies.get("size") || "medium", // set element-ui default size +}); -Vue.config.productionTip = false +Vue.config.productionTip = false; new Vue({ - el: '#app', + el: "#app", router, store, - render: h => h(App) -}) + render: (h) => h(App), +}); diff --git a/src/router/index.js b/src/router/index.js index 8f80f4d..93b21fb 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,10 +1,10 @@ -import Vue from 'vue' -import Router from 'vue-router' +import Vue from "vue"; +import Router from "vue-router"; -Vue.use(Router) +Vue.use(Router); /* Layout */ -import Layout from '@/layout' +import Layout from "@/layout"; /** * Note: 路由配置项 @@ -31,153 +31,158 @@ import Layout from '@/layout' // 公共路由 export const constantRoutes = [ { - path: '/redirect', + path: "/redirect", component: Layout, hidden: true, children: [ { - path: '/redirect/:path(.*)', - component: () => import('@/views/redirect') - } - ] + path: "/redirect/:path(.*)", + component: () => import("@/views/redirect"), + }, + ], }, { - path: '/login', - component: () => import('@/views/login'), - hidden: true + path: "/login", + component: () => import("@/views/login"), + hidden: true, }, { - path: '/register', - component: () => import('@/views/register'), - hidden: true + path: "/register", + component: () => import("@/views/register"), + hidden: true, }, { - path: '/404', - component: () => import('@/views/error/404'), - hidden: true + path: "/404", + component: () => import("@/views/error/404"), + hidden: true, }, { - path: '/401', - component: () => import('@/views/error/401'), - hidden: true + path: "/401", + component: () => import("@/views/error/401"), + hidden: true, }, { - path: '', + path: "/map", + component: () => import("@/views/map/index"), + hidden: true, + }, + { + path: "", component: Layout, - redirect: 'index', + redirect: "index", children: [ { - path: 'index', - component: () => import('@/views/index'), - name: 'Index', - meta: { title: '统计分析', icon: 'dashboard', affix: true } - } - ] + path: "index", + component: () => import("@/views/index"), + name: "Index", + meta: { title: "统计分析", icon: "dashboard", affix: true }, + }, + ], }, { - path: '/user', + path: "/user", component: Layout, hidden: true, - redirect: 'noredirect', + redirect: "noredirect", children: [ { - path: 'profile', - component: () => import('@/views/system/user/profile/index'), - name: 'Profile', - meta: { title: '个人中心', icon: 'user' } - } - ] - } -] + path: "profile", + component: () => import("@/views/system/user/profile/index"), + name: "Profile", + meta: { title: "个人中心", icon: "user" }, + }, + ], + }, +]; // 动态路由,基于用户权限动态去加载 export const dynamicRoutes = [ { - path: '/system/user-auth', + path: "/system/user-auth", component: Layout, hidden: true, - permissions: ['system:user:edit'], + permissions: ["system:user:edit"], children: [ { - path: 'role/:userId(\\d+)', - component: () => import('@/views/system/user/authRole'), - name: 'AuthRole', - meta: { title: '分配角色', activeMenu: '/system/user' } - } - ] + path: "role/:userId(\\d+)", + component: () => import("@/views/system/user/authRole"), + name: "AuthRole", + meta: { title: "分配角色", activeMenu: "/system/user" }, + }, + ], }, { - path: '/system/role-auth', + path: "/system/role-auth", component: Layout, hidden: true, - permissions: ['system:role:edit'], + permissions: ["system:role:edit"], children: [ { - path: 'user/:roleId(\\d+)', - component: () => import('@/views/system/role/authUser'), - name: 'AuthUser', - meta: { title: '分配用户', activeMenu: '/system/role' } - } - ] + path: "user/:roleId(\\d+)", + component: () => import("@/views/system/role/authUser"), + name: "AuthUser", + meta: { title: "分配用户", activeMenu: "/system/role" }, + }, + ], }, { - path: '/system/dict-data', + path: "/system/dict-data", component: Layout, hidden: true, - permissions: ['system:dict:list'], + permissions: ["system:dict:list"], children: [ { - path: 'index/:dictId(\\d+)', - component: () => import('@/views/system/dict/data'), - name: 'Data', - meta: { title: '字典数据', activeMenu: '/system/dict' } - } - ] + path: "index/:dictId(\\d+)", + component: () => import("@/views/system/dict/data"), + name: "Data", + meta: { title: "字典数据", activeMenu: "/system/dict" }, + }, + ], }, { - path: '/monitor/job-log', + path: "/monitor/job-log", component: Layout, hidden: true, - permissions: ['monitor:job:list'], + permissions: ["monitor:job:list"], children: [ { - path: 'index/:jobId(\\d+)', - component: () => import('@/views/monitor/job/log'), - name: 'JobLog', - meta: { title: '调度日志', activeMenu: '/monitor/job' } - } - ] + path: "index/:jobId(\\d+)", + component: () => import("@/views/monitor/job/log"), + name: "JobLog", + meta: { title: "调度日志", activeMenu: "/monitor/job" }, + }, + ], }, { - path: '/tool/gen-edit', + path: "/tool/gen-edit", component: Layout, hidden: true, - permissions: ['tool:gen:edit'], + permissions: ["tool:gen:edit"], children: [ { - path: 'index/:tableId(\\d+)', - component: () => import('@/views/tool/gen/editTable'), - name: 'GenEdit', - meta: { title: '修改生成配置', activeMenu: '/tool/gen' } - } - ] - } -] + path: "index/:tableId(\\d+)", + component: () => import("@/views/tool/gen/editTable"), + name: "GenEdit", + meta: { title: "修改生成配置", activeMenu: "/tool/gen" }, + }, + ], + }, +]; // 防止连续点击多次路由报错 let routerPush = Router.prototype.push; let routerReplace = Router.prototype.replace; // push Router.prototype.push = function push(location) { - return routerPush.call(this, location).catch(err => err) -} + return routerPush.call(this, location).catch((err) => err); +}; // replace Router.prototype.replace = function push(location) { - return routerReplace.call(this, location).catch(err => err) -} + return routerReplace.call(this, location).catch((err) => err); +}; export default new Router({ - mode: 'history', // 去掉url中的# + mode: "history", // 去掉url中的# scrollBehavior: () => ({ y: 0 }), - routes: constantRoutes -}) + routes: constantRoutes, +}); diff --git a/src/views/manage-info/index.vue b/src/views/manage-info/index.vue index d27239b..1709da4 100644 --- a/src/views/manage-info/index.vue +++ b/src/views/manage-info/index.vue @@ -72,9 +72,81 @@ +
+ +
+ + + {{ item.label }} + + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ + +
+ \ No newline at end of file + +======= + +>>>>>>> d52b2ef1097bb2a46437bfad1ac2fb21ed4ffd25 diff --git a/src/views/map/index.vue b/src/views/map/index.vue new file mode 100644 index 0000000..5525528 --- /dev/null +++ b/src/views/map/index.vue @@ -0,0 +1,31 @@ + + + + +