Browse Source

adm:feat> 添加系统更换接口

onlyh 3 years ago
parent
commit
01b683287d

+ 5 - 0
src/api/equipComponent.ts

@@ -30,3 +30,8 @@ export function allSystem(param:any) {
     return httputils.getJson(`${ baseUrl }/dict/project/system/type`, {})
 
 }
+// 统计所有的系统类型
+export function allSystems(param:any) {
+    return httputils.getJson(`${ baseUrl }/dict/system/type`, {})
+
+}

+ 7 - 2
src/views/maintain/system/index.vue

@@ -42,7 +42,7 @@
             <template v-if="next">
                 <div class="align" :style="{ 'height': isWidth ? '400px':'200px' }">
                     <span class="text">系统类别</span>
-                    <el-cascader :options="list" clearable v-model="systemVal"
+                    <el-cascader :options="addlist" clearable v-model="systemVal"
                                  :props="optionProps"
                                  class="adm-select"></el-cascader>
                 </div>
@@ -69,7 +69,7 @@ import { AdmMultiTable, AdmSearch, baseDataForm, Pagination, Statistics } from "
 import { createSystem, dictQuery, queryCountSystem, querySystem, updateSystem } from "@/api/datacenter";
 import tools from "@/utils/maintain";
 import { UserModule } from "@/store/modules/user";
-import { allSystem, BeatchQueryParam } from "@/api/equipComponent";
+import { allSystem, BeatchQueryParam,allSystems } from "@/api/equipComponent";
 
 @Component({
     name: "adm-system",
@@ -87,6 +87,8 @@ export default class extends Vue {
     loading = false;
     // 下拉数据
     list = [];
+    // 添加系统下拉数据
+    addlist = []
     // 信息点集合(表头)
     all = [];
     codeToDataSource: any = {};
@@ -222,6 +224,9 @@ export default class extends Vue {
         this.systemMsg = '添加系统'
         this.currRowContent = {}
         this.dialogVisible = true;
+        allSystems({}).then(res=> {
+            this.addlist = res.content
+        })
     }
 
     //下一步事件

+ 9 - 4
src/views/scene/plane/index.vue

@@ -1,10 +1,12 @@
 <template>
-    <div></div>
+    <div style="height: 100%;width:100%">
+        <iframe :src="src" frameborder="0" style="height: 100%;width:100%"></iframe>
+    </div>
 </template>
 
 <script lang="ts">
-import { Vue, Component } from "vue-property-decorator";
-import { UserModule } from "@/store/modules/user";
+import {Vue, Component} from "vue-property-decorator";
+import {UserModule} from "@/store/modules/user";
 
 // 平面图跳转地址
 // @ts-ignore
@@ -15,6 +17,8 @@ const planJumpUrl = window.__systemConf.planJumpUrl;
     components: {},
 })
 export default class extends Vue {
+    src = ''
+
     // 项目id
     private get projectId(): string {
         return UserModule.projectId;
@@ -26,7 +30,8 @@ export default class extends Vue {
     }
 
     created() {
-        window.open(`${planJumpUrl}?projectId=${this.projectId}&projectName=${this.projectName}`);
+        this.src = `${planJumpUrl}?projectId=${this.projectId}&projectName=${this.projectName}`
+        // window.open(`${planJumpUrl}?projectId=${this.projectId}&projectName=${this.projectName}`);
     }
 }
 </script>

+ 9 - 4
src/views/scene/system/index.vue

@@ -1,10 +1,12 @@
 <template>
-    <div></div>
+    <div style="height: 100%;width:100%">
+        <iframe :src="src" frameborder="0" style="height: 100%;width:100%"></iframe>
+    </div>
 </template>
 
 <script lang="ts">
-import { Vue, Component } from "vue-property-decorator";
-import { UserModule } from "@/store/modules/user";
+import {Vue, Component} from "vue-property-decorator";
+import {UserModule} from "@/store/modules/user";
 
 // 系统图跳转地址
 // @ts-ignore
@@ -15,6 +17,8 @@ const topoJumpUrl = window.__systemConf.topoJumpUrl;
     components: {},
 })
 export default class extends Vue {
+    src = ''
+
     // 项目id
     private get projectId(): string {
         return UserModule.projectId;
@@ -26,7 +30,8 @@ export default class extends Vue {
     }
 
     created() {
-        window.open(`${topoJumpUrl}?projectId=${this.projectId}&projectName=${this.projectName}`);
+        this.src = `${topoJumpUrl}?projectId=${this.projectId}&projectName=${this.projectName}`
+        // window.open(`${topoJumpUrl}?projectId=${this.projectId}&projectName=${this.projectName}`);
     }
 }
 </script>

+ 10 - 10
vue.config.js

@@ -51,26 +51,26 @@ module.exports = {
                 }
             },
             "/datacenter": {
-                target: "http://192.168.64.17:28890",
-                // target: "http://192.168.0.72:8080",
+                // target: "http://192.168.64.17:28890",
+                target: "http://192.168.0.72:8080",
                 changeOrigin: true
             },
             "/equip-component": {
-                target: "http://192.168.64.17:28890",
-                // target: "http://192.168.0.72:8080",
+                // target: "http://192.168.64.17:28890",
+                target: "http://192.168.0.72:8080",
                 changeOrigin: true
             },
             "/schedulerapi": {
-                target: "http://192.168.64.17:28890",
-                // target: "http://192.168.0.72:8080",
+                // target: "http://192.168.64.17:28890",
+                target: "http://192.168.0.72:8080",
                 changeOrigin: true,
                 pathRewrite: {
                     "^/schedulerapi": "/scheduler"
                 }
             },
             "/modelapi": {
-                target: "http://192.168.64.17:28890",
-                // target: "http://192.168.0.72:8080",
+                // target: "http://192.168.64.17:28890",
+                target: "http://192.168.0.72:8080",
                 changeOrigin: true,
                 pathRewrite: {
                     "^/modelapi": "/revit-algorithm"
@@ -84,8 +84,8 @@ module.exports = {
             //     }
             // },
             "/message-center": {
-                target: "http://192.168.64.17:28890",
-                // target: "http://192.168.0.72:8080",
+                // target: "http://192.168.64.17:28890",
+                target: "http://192.168.0.72:8080",
                 changeOrigin: true
             },
             "/rwd": {