From 169c182bf56a47d3f5163928109ce42ee392a68a Mon Sep 17 00:00:00 2001 From: Yan Nan <255809923@qq.com> Date: Sat, 6 Apr 2024 14:28:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=94=B5=E5=AD=90=E5=9B=B4=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 + src/api/system/fence.js | 77 +++++ src/main.js | 10 + src/router/index.js | 1 + src/views/system/fence/index.vue | 518 +++++++++++++++++++++++++++++++ 5 files changed, 608 insertions(+) create mode 100644 src/api/system/fence.js create mode 100644 src/views/system/fence/index.vue 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 @@ + + + + From e4e10d63aa21a326b8db33d04e2dd91781d5013b Mon Sep 17 00:00:00 2001 From: Yan Nan <255809923@qq.com> Date: Mon, 8 Apr 2024 10:01:42 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=94=B5=E5=AD=90=E5=9B=B4=E6=A0=8F48?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/record.js | 9 ++ src/views/system/record/index.vue | 222 ++++++++++++++++++++++++++++++ 2 files changed, 231 insertions(+) create mode 100644 src/api/system/record.js create mode 100644 src/views/system/record/index.vue diff --git a/src/api/system/record.js b/src/api/system/record.js new file mode 100644 index 0000000..7fe692d --- /dev/null +++ b/src/api/system/record.js @@ -0,0 +1,9 @@ +import request from "@/utils/request"; + +export function recordList(data) { + return request({ + url: '/corpor/recordList', + method: 'post', + data + }) +} diff --git a/src/views/system/record/index.vue b/src/views/system/record/index.vue new file mode 100644 index 0000000..0ec2125 --- /dev/null +++ b/src/views/system/record/index.vue @@ -0,0 +1,222 @@ + + +