Browse Source

1、修改部分组件内部的跳转方式
2、代理内新增image-service

niuheng 2 years ago
parent
commit
7531b353ca

+ 1 - 1
src/components/old-adm/businessSpaceLedger/index.vue

@@ -394,7 +394,7 @@ export default {
     },
     // 跳转至关系总览
     jumpToAllRelation() {
-      this.$router.push({ name: 'overView' })
+      this.$router.push({path: '/relation/overview', name: 'overView' })
     },
     relaSuc() {
       this.init();

+ 1 - 1
src/components/old-adm/businessSpaceLedger/spaceDetail/index.vue

@@ -94,7 +94,7 @@ import { mapGetters } from "vuex";
 import tools from "@/utils/old-adm/scan/tools";
 import ScanController from "@/controller/old-adm/ScanController";
 import dicController from "@/controller/old-adm/dicController";
-import logicConfig from "@/logicConfig";
+import {logicConfig} from "@/logicConfig";
 
 import eqToSpaceTable from "@/components/old-adm/business_space/newTables/eqToSpaceTable";
 import syInSpaceTable from "@/components/old-adm/business_space/newTables/syInSpaceTable";

+ 2 - 1
src/components/old-adm/businessSpaceLedger/spaceadd/index.vue

@@ -112,7 +112,7 @@ import buildFloor from "@/utils/old-adm/handsontable/buildFloorData";
 
 import handsonTable from "@/components/old-adm/common/handsontable";
 import menum from "@/components/old-adm/dialogs/list/menum";
-import logicConfig from "@/logicConfig";
+import {logicConfig} from "@/logicConfig";
 import ScanController from "@/controller/old-adm/ScanController";
 
 import Dic from "@/controller/old-adm/dicController";
@@ -276,6 +276,7 @@ export default {
             session.remove("spaceAddData");
             this.$router.push({
               name: "spacelist",
+              path: "/ledger/spacelist",
               params: {
                 zone: this.space.otherType
                   ? this.space.otherType

+ 1 - 1
src/components/old-adm/business_space/newAddDialogs/addEquipDialog.vue

@@ -111,7 +111,7 @@
 </template>
 
 <script>
-import logicConfig from "@/logicConfig";
+import {logicConfig} from "@/logicConfig";
 import { businessSpaceController } from "@/controller/old-adm/businessSpaceController";
 import { mapGetters } from "vuex";
 import ScanController from "@/controller/old-adm/ScanController";

+ 1 - 1
src/components/old-adm/business_space/newAddDialogs/addSystemDialog.vue

@@ -58,7 +58,7 @@
 
 <script>
 import { businessSpaceController } from "@/controller/old-adm/businessSpaceController";
-import logicConfig from "@/logicConfig";
+import {logicConfig} from "@/logicConfig";
 export default {
   data() {
     return {

+ 1 - 1
src/components/old-adm/business_space/newAddDialogs/roomInFloorDialog.vue

@@ -84,7 +84,7 @@
 </template>
 <script>
 import { businessSpaceController } from "@/controller/old-adm/businessSpaceController";
-import logicConfig from "@/logicConfig";
+import {logicConfig} from "@/logicConfig";
 export default {
   data() {
     return {

+ 1 - 1
src/components/old-adm/business_space/newGraphy/graphy.vue

@@ -241,7 +241,7 @@ import {
 import { colorArr } from "@/utils/old-adm/spaceColor";
 import unRelateBSP from "./unRelateBSP";
 import createBSP from "./createBSP";
-import logicConfig from "@/logicConfig";
+import {logicConfig} from "@/logicConfig";
 import { businessSpaceController } from "@/controller/old-adm/businessSpaceController";
 import ScanController from "@/controller/old-adm/ScanController";
 

+ 1 - 1
src/components/old-adm/business_space/newTables/eqToSpaceTable.vue

@@ -93,7 +93,7 @@
 <script>
 import ScanController from "@/controller/old-adm/ScanController";
 import { businessSpaceController } from "@/controller/old-adm/businessSpaceController";
-import logicConfig from "@/logicConfig";
+import {logicConfig} from "@/logicConfig";
 import { mapGetters } from "vuex";
 import addEquipDialog from "@/components/old-adm/business_space/newAddDialogs/addEquipDialog";
 export default {

+ 1 - 1
src/components/old-adm/business_space/newTables/syInSpaceTable.vue

@@ -77,7 +77,7 @@
 <script>
 import ScanController from "@/controller/old-adm/ScanController";
 import { businessSpaceController } from "@/controller/old-adm/businessSpaceController";
-import logicConfig from "@/logicConfig";
+import {logicConfig} from "@/logicConfig";
 import { mapGetters } from "vuex";
 import addSystemDialog from "@/components/old-adm/business_space/newAddDialogs/addSystemDialog";
 export default {

+ 1 - 1
src/components/old-adm/ledger/components/addDialog/dialogZone.vue

@@ -25,7 +25,7 @@
 </template>
 
 <script>
-import logicConfig from "@/logicConfig";
+import {logicConfig} from "@/logicConfig";
 import ScanController from "@/controller/old-adm/ScanController";
 export default {
   name: "dialogZone",

+ 1 - 1
src/components/old-adm/ledger/components/details/detail/cruxDialog.vue

@@ -21,7 +21,7 @@
 </template>
 
 <script>
-import logicConfig from "@/logicConfig";
+import {logicConfig} from "@/logicConfig";
 import Dic from "@/controller/old-adm/dicController";
 
 export default {

+ 2 - 1
src/components/old-adm/ledger/components/handsontables/device.vue

@@ -1291,7 +1291,7 @@ export default {
           // window.open(`http://adm.sagacloud.cn:8058/spread?id=${infos.EquipID}&pid=${this.projectId}&secret=${this.secret}`,"_blank")
           // this.$message("开发中...")
           this.$router.push({
-            path: "deviceDetails",
+            path: "/ledger/deviceDetails",
             query: {
               type: this.mess.deviceId,
               equipId: infos.id,
@@ -1615,6 +1615,7 @@ export default {
       // 跳转批量维护设备位置页面
       this.$router.push({
         name: "BatchPointAssets",
+        path: "/ledger/batchPointAssets",
         params: query,
       });
     },

+ 1 - 0
src/components/old-adm/ledger/facility/addfacility.vue

@@ -347,6 +347,7 @@ export default {
         this.$message.success("创建成功");
         storage.remove("deviceAddData");
         this.$router.push({
+          path:'/ledger/facility',
           name: "facilityLedger",
           params: {
             deviceId: this.category.deviceId,

+ 2 - 2
src/components/old-adm/ledger/facility/batchPoint.vue

@@ -196,7 +196,7 @@ export default {
     // 返回
     goback() {
         this.confirm(() => {
-            this.$router.push({ name: "facilityLedger" });
+            this.$router.push({path: "/ledger/facility", name: "facilityLedger" });
         })
     },
     getCascader() {
@@ -559,7 +559,7 @@ export default {
   },
   watch: {
     projectId() {
-      this.$router.push({ name: "facilityLedger" });
+      this.$router.push({path: "/ledger/facility", name: "facilityLedger" });
     }
   }
 };

+ 2 - 2
src/components/old-adm/ledger/facility/batchlink.vue

@@ -255,12 +255,12 @@ export default {
     // },
     //返回
     goBack() {
-      this.$router.push({ name: "facilityLedger" })
+      this.$router.push({path: "/ledger/facility", name: "facilityLedger" })
     }
   },
   watch: {
     projectId() {
-      this.$router.push({ name: "facilityLedger" })
+      this.$router.push({ path: "/ledger/facility",name: "facilityLedger" })
     }
   }
 };

+ 1 - 1
src/components/old-adm/ledger/facility/details/index.vue

@@ -539,7 +539,7 @@ export default {
       this.exhibitionEnergy.list = resultEnergy;
     },
     goBack() {
-      this.$router.push({ name: "facilityLedger" })
+      this.$router.push({path: "/ledger/facility", name: "facilityLedger" })
     },
     // 切换实例
     handleChangeExample() {

+ 1 - 0
src/components/old-adm/ledger/system/addsystem.vue

@@ -243,6 +243,7 @@ export default {
         session.remove("systemAddData");
         this.$router.push({
           name: "systemlist",
+          path: "/ledger/list",
           params: { SysType: this.category.category },
         });
       });

+ 1 - 1
src/components/old-adm/relation/overview/detail/index.vue

@@ -226,7 +226,7 @@ export default {
       this.view.scaleByPoint(val / scale, this.canvasWidth / 2, this.canvasHeight / 2);
     },
     goback() {
-      this.$router.push({ name: 'overView' })
+      this.$router.push({path: '/relation/overview', name: 'overView' })
     },
     // 获取项目下建筑
     getBuilding() {

+ 11 - 0
vue.config.js

@@ -52,6 +52,17 @@ module.exports = {
           '^/middleService': ''
         }
       },
+      '/image-service': {
+        // 此处的写法,目的是为了 将 /2dapi/jsonz 替换target的值
+        // target: 'http://apmstandard/',
+        target: 'http://develop.ysbdtp.com/image-service',
+        // 允许跨域
+        changeOrigin: true,
+        ws: true,
+        pathRewrite: {
+          '^/image-service': ''
+        }
+      },
     }
   },
   pages: {