diff --git a/package.json b/package.json index 6a46cc5..dba8a8e 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,9 @@ "url": "https://gitee.com/y_project/MuYu-Cloud.git" }, "dependencies": { + "@amap/amap-jsapi-loader": "^1.0.1", "@riophae/vue-treeselect": "0.4.0", + "@types/echarts": "^4.9.22", "axios": "0.24.0", "clipboard": "2.0.8", "core-js": "3.25.3", diff --git a/src/api/system/fence.js b/src/api/system/fence.js new file mode 100644 index 0000000..ed3d22b --- /dev/null +++ b/src/api/system/fence.js @@ -0,0 +1,77 @@ +import request from "@/utils/request"; +import fence from "@/views/system/fence/index.vue"; + +/** + * 围栏列表 + * @param data + * @returns {*} + */ +export function fenceList(data) { + return request({ + url: '/corpor/fenceList', + method: 'post', + data + }) +} + +/** + * 新增围栏 + * @param data + * @returns {*} + */ +export function fenceAdd(data) { + return request({ + url: '/corpor/fenceAdd', + method: 'post', + data + }) +} + +/** + * 删除围栏 + * @param fenceId + * @returns {*} + */ +export function fenceDelete(fenceId) { + return request({ + url: '/corpor/fenceDelete/'+fenceId, + method: 'post' + }) +} + + +/** + * 修改围栏 + * @param data + * @returns {*} + */ +export function fenceUpdate(data) { + return request({ + url: '/corpor/fenceUpdate', + method: 'post', + data + }) +} + + +/** + * 保存围栏 + */ +export function saveFence(data) { + return request({ + url: '/corpor/saveFence', + method: 'post', + data + }) +} + + +/** + * 标识列表 + */ +export function identificationList() { + return request({ + url: '/corpor/identificationList', + method: 'post' + }) +} diff --git a/src/main.js b/src/main.js index 546f125..8f9c63c 100644 --- a/src/main.js +++ b/src/main.js @@ -37,6 +37,7 @@ import DictTag from '@/components/DictTag' import VueMeta from 'vue-meta' // 字典数据组件 import DictData from '@/components/DictData' +import AMapLoader from "@amap/amap-jsapi-loader"; // 全局方法挂载 Vue.prototype.getDicts = getDicts @@ -84,3 +85,12 @@ new Vue({ store, render: h => h(App) }) + + +AMapLoader.load({ + 'key': 'fcd296bbfa904e3bf49d7316882a11bf', + 'version': '2.0', // 指定要加载的 JSAPI 的版本,缺少时默认为 1.4.15 + 'plugins': ['AMap.Scale','AMap.GeoJSON'] // 需要使用的的插件列表,如比例尺'AMap.Scale'等,更多插件请看官方文档 +}).then((AMap) => { + Vue.use(AMap) +}) diff --git a/src/router/index.js b/src/router/index.js index 2afac71..b4d712a 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -73,6 +73,7 @@ export const constantRoutes = [ } ] }, + { path: '/user', component: Layout, diff --git a/src/views/system/fence/index.vue b/src/views/system/fence/index.vue new file mode 100644 index 0000000..be0a6fc --- /dev/null +++ b/src/views/system/fence/index.vue @@ -0,0 +1,518 @@ + + + +