From 49eaf122a8dd860fa0c31d1191ae2ef86a716144 Mon Sep 17 00:00:00 2001 From: fanluyan <754122931@qq.com> Date: Tue, 26 Mar 2024 14:32:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=94=B6=E8=97=8F=E5=A4=B9?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/Sidebar.vue | 13 ++ src/router/index.js | 8 + src/utils/api/index.js | 34 +++ .../monitoringEquipment/SIMCard/index.vue | 154 -------------- .../deviceVisualization/index.vue | 8 - .../components/pictureTags.vue | 3 +- .../components/favoraddDialog.vue | 135 ++++++++++++ .../userEquipment/favorInformation/index.vue | 194 ++++++++++++++++++ .../userEquipment/groupInformation/index.vue | 12 -- .../userEquipment/towerTeam/index.vue | 8 - src/views/realTimeMonitor/index.vue | 96 +++++++-- vue.config.js | 2 +- 12 files changed, 465 insertions(+), 202 deletions(-) delete mode 100644 src/views/management/monitoringEquipment/SIMCard/index.vue delete mode 100644 src/views/management/monitoringEquipment/deviceVisualization/index.vue create mode 100644 src/views/management/userEquipment/favorInformation/components/favoraddDialog.vue create mode 100644 src/views/management/userEquipment/favorInformation/index.vue delete mode 100644 src/views/management/userEquipment/groupInformation/index.vue delete mode 100644 src/views/management/userEquipment/towerTeam/index.vue diff --git a/src/components/common/Sidebar.vue b/src/components/common/Sidebar.vue index 3cfdbf5..1a3916c 100644 --- a/src/components/common/Sidebar.vue +++ b/src/components/common/Sidebar.vue @@ -106,6 +106,11 @@ export default { index: "/devicePhotoSchedule", title: "拍照时间表设置", }, + { + index: "/favorInformation", + title: "收藏夹管理", + }, + // { // index: "/deviceUpgrade", // title: "装置升级", @@ -187,6 +192,10 @@ export default { index: "/devicePhotoSchedule", title: "拍照时间表设置", }, + { + index: "/favorInformation", + title: "收藏夹管理", + }, // { // index: "/deviceUpgrade", // title: "装置升级", @@ -267,6 +276,10 @@ export default { index: "/devicePhotoSchedule", title: "拍照时间表设置", }, + { + index: "/favorInformation", + title: "收藏夹管理", + }, // { // index: "/deviceUpgrade", // title: "装置升级", diff --git a/src/router/index.js b/src/router/index.js index 50c18af..cb86e08 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -84,6 +84,14 @@ const routes = [ ), meta: { title: "杆塔信息管理", icon: "" }, }, + { + path: "/favorInformation", + component: () => + import( + /* webpackChunkName: "tabs" */ "../views/management/userEquipment/favorInformation/index.vue" + ), + meta: { title: "收藏夹管理", icon: "" }, + }, { path: "/photographicDevice", component: () => diff --git a/src/utils/api/index.js b/src/utils/api/index.js index 95f23d8..6b58379 100644 --- a/src/utils/api/index.js +++ b/src/utils/api/index.js @@ -833,3 +833,37 @@ export function addFavorList(data) { data, }); } +//获取收藏夹列表 +export function listFavorApi(data) { + return request({ + url: "/api/listFavor", + method: "post", + data, + }); +} +//新增收藏夹列表 +export function addFavorApi(data) { + return request({ + url: "/api/addFavor", + method: "post", + data, + }); +} + +//修改收藏夹列表 +export function updateFavorApi(data) { + return request({ + url: "/api/updateFavor", + method: "post", + data, + }); +} + +//删除收藏夹列表 +export function deleteFavorApi(data) { + return request({ + url: "/api/deleteFavor", + method: "post", + data, + }); +} diff --git a/src/views/management/monitoringEquipment/SIMCard/index.vue b/src/views/management/monitoringEquipment/SIMCard/index.vue deleted file mode 100644 index 2f8202a..0000000 --- a/src/views/management/monitoringEquipment/SIMCard/index.vue +++ /dev/null @@ -1,154 +0,0 @@ - - - - 新增 - 修改 - 删除 - 查询 - 质保延期 - 导入 - 导入模板下载 - 导出 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ scope.row.date }} - - - - - - - - - - - - - - - diff --git a/src/views/management/monitoringEquipment/deviceVisualization/index.vue b/src/views/management/monitoringEquipment/deviceVisualization/index.vue deleted file mode 100644 index 4a62e42..0000000 --- a/src/views/management/monitoringEquipment/deviceVisualization/index.vue +++ /dev/null @@ -1,8 +0,0 @@ - - 装置分布可视化 - - - \ No newline at end of file diff --git a/src/views/management/monitoringEquipment/photographicDevice/components/pictureTags.vue b/src/views/management/monitoringEquipment/photographicDevice/components/pictureTags.vue index 231dca3..cd17374 100644 --- a/src/views/management/monitoringEquipment/photographicDevice/components/pictureTags.vue +++ b/src/views/management/monitoringEquipment/photographicDevice/components/pictureTags.vue @@ -169,7 +169,8 @@ export default { .then((res) => { console.log(res); this.markId = res.data.markId; - + this.color = res.data.color; + this.num = res.data.boderWidth; if (res.data.path !== null) { this.picsrc = res.data.path; if (res.data.list.length !== 0) { diff --git a/src/views/management/userEquipment/favorInformation/components/favoraddDialog.vue b/src/views/management/userEquipment/favorInformation/components/favoraddDialog.vue new file mode 100644 index 0000000..b60c053 --- /dev/null +++ b/src/views/management/userEquipment/favorInformation/components/favoraddDialog.vue @@ -0,0 +1,135 @@ + + + + + + + + + + + + diff --git a/src/views/management/userEquipment/favorInformation/index.vue b/src/views/management/userEquipment/favorInformation/index.vue new file mode 100644 index 0000000..903af4d --- /dev/null +++ b/src/views/management/userEquipment/favorInformation/index.vue @@ -0,0 +1,194 @@ + + + + + 收藏夹管理 + 新增 + + + + + + + + + + + + + + 修改 + 删除 + + + + + + + + + + + + + + + diff --git a/src/views/management/userEquipment/groupInformation/index.vue b/src/views/management/userEquipment/groupInformation/index.vue deleted file mode 100644 index 9ff4f68..0000000 --- a/src/views/management/userEquipment/groupInformation/index.vue +++ /dev/null @@ -1,12 +0,0 @@ - - 分组信息管理 - - - \ No newline at end of file diff --git a/src/views/management/userEquipment/towerTeam/index.vue b/src/views/management/userEquipment/towerTeam/index.vue deleted file mode 100644 index 24d22ad..0000000 --- a/src/views/management/userEquipment/towerTeam/index.vue +++ /dev/null @@ -1,8 +0,0 @@ - - 杆塔班组用户 - - - \ No newline at end of file diff --git a/src/views/realTimeMonitor/index.vue b/src/views/realTimeMonitor/index.vue index edc99e5..e3eb52e 100644 --- a/src/views/realTimeMonitor/index.vue +++ b/src/views/realTimeMonitor/index.vue @@ -49,6 +49,12 @@ + @@ -306,6 +312,30 @@ + + + + + + + + + + + + 取 消 + 确 定 + + @@ -322,6 +352,7 @@ import { setTermGPSJoggle, updateTermCamera, addFavorList, + listFavorApi, } from "@/utils/api/index"; import previewContain from "./previewContain.vue"; import carouselChart from "../components/carouselChart.vue"; @@ -396,6 +427,12 @@ export default { currentData: "", //保存选中的数据 zzradio: -1, collectFlag: false, //收藏 + + favorListDialog: false, //收藏弹窗 + favorform: { + favorVal: "", + }, //收藏夹参数 + favorOptions: [], //收藏夹列表 }; }, watch: { @@ -456,8 +493,12 @@ export default { handleNodeClick(data) { this.clearfun(); console.log(data); - if (data.name == "收藏夹") { - // this.$refs.tree.setCurrentKey(this.selectData.id); + + if ( + (data.dyValue == null || data.dyValue == bsManufacturer) && + data.hasOwnProperty("list") + ) { + this.$refs.tree.setCurrentKey(this.selectData.id); return; } this.selectData = data; @@ -723,21 +764,15 @@ export default { }, addCollectClick() { if (!this.collectFlag) { - this.$confirm("此操作将添加至收藏夹, 是否继续?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - }).then(() => { - this.collectFlag = true; - addFavorList({ list: [this.zztermId], type: 1 }).then((res) => { - this.getLineTreeStatus(); - }); - - this.$message({ - type: "success", - message: "添加成功!", - }); - }); + this.favorListDialog = true; + listFavorApi() + .then((res) => { + if (res.code == 200) { + this.favorOptions = res.data; + this.favorform.favorVal = res.data[0].id; + } + }) + .catch((err) => {}); } else { this.$confirm("此操作将取消收藏, 是否继续?", "提示", { confirmButtonText: "确定", @@ -745,7 +780,10 @@ export default { type: "warning", }).then(() => { this.collectFlag = false; - addFavorList({ list: [this.zztermId], type: 0 }).then((res) => { + addFavorList({ + termid: this.zztermId, + id: 0, + }).then((res) => { this.getLineTreeStatus(); }); @@ -756,6 +794,28 @@ export default { }); } }, + //切换收藏夹 + changeFavAl(val) { + console.log(val); + }, + //选中收藏夹 + confimFavorBtn() { + this.collectFlag = true; + console.log(this.favorform.favorVal); + addFavorList({ + termid: this.zztermId, + id: this.favorform.favorVal, + }).then((res) => { + if (res.code == 200) { + this.favorListDialog = false; + this.getLineTreeStatus(); + this.$message({ + type: "success", + message: "添加成功!", + }); + } + }); + }, //点击图片列表执行函数 jumpTowerPic(data) { console.log("我是从子组件过来的数据"); diff --git a/vue.config.js b/vue.config.js index 99df3aa..7a39808 100644 --- a/vue.config.js +++ b/vue.config.js @@ -31,7 +31,7 @@ module.exports = defineConfig({ //表示拦截以/api开头的请求路径 // target: "http://180.166.218.222:40080", //dell服务器环境 - target: "http://192.168.50.42:8093/", //湖南 + target: "http://192.168.50.7:8094/", //湖南 changOrigin: true, //是否开启跨域 pathRewrite: { "^/api": "", //重写api,把api变成空字符,因为我们真正请求的路径是没有api的