22
0

3 کامیت‌ها 6d5554190e ... c6592a6fbe

نویسنده SHA1 پیام تاریخ
  onlyh c6592a6fbe Merge remote-tracking branch 'origin/master' 3 سال پیش
  onlyh 5bc09d38c6 adm:feat> 修改设备/系统添加问题 3 سال پیش
  onlyh 01b683287d adm:feat> 添加系统更换接口 3 سال پیش

+ 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`, {})
+
+}

+ 4 - 0
src/views/maintain/device/index.vue

@@ -452,6 +452,8 @@ export default class extends Vue {
         deleteEquip([{id: this.currRowContent.id}]).then(res => {
             if (res.result == 'success') {
                 this.$message.success('删除成功')
+                this.deviceList();
+                this.dataCount()
                 this.handleChangeDevice()
                 this.dialogVisible = false;
             }
@@ -545,6 +547,8 @@ export default class extends Vue {
             if (res.result == 'success') {
                 this.$message.success('创建成功');
                 this.dialogVisible = false;
+                this.deviceList();
+                this.dataCount()
                 this.handleChangeDevice()
             }
         })

+ 24 - 16
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>
@@ -64,16 +64,16 @@
 </template>
 
 <script lang="ts">
-import { Component, Vue, Watch } from "vue-property-decorator";
-import { AdmMultiTable, AdmSearch, baseDataForm, Pagination, Statistics } from "../components/index";
-import { createSystem, dictQuery, queryCountSystem, querySystem, updateSystem } from "@/api/datacenter";
+import {Component, Vue, Watch} from "vue-property-decorator";
+import {AdmMultiTable, AdmSearch, baseDataForm, Pagination, Statistics} from "../components/index";
+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 {UserModule} from "@/store/modules/user";
+import {allSystem, BeatchQueryParam, allSystems} from "@/api/equipComponent";
 
 @Component({
     name: "adm-system",
-    components: { Statistics, AdmSearch, AdmMultiTable, Pagination, baseDataForm },
+    components: {Statistics, AdmSearch, AdmMultiTable, Pagination, baseDataForm},
 })
 export default class extends Vue {
     optionProps = {
@@ -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
+        })
     }
 
     //下一步事件
@@ -235,7 +240,7 @@ export default class extends Vue {
             };
 
             await dictQuery(param).then((res: any) => {
-                const { basicInfos, dictStages } = this.informationArrangement(res.content);
+                const {basicInfos, dictStages} = this.informationArrangement(res.content);
                 // 添加系统分类
                 // dictStages.map((item: any) => {
                 //     item = { ...item, classification: this.systemLabel };
@@ -318,14 +323,14 @@ export default class extends Vue {
                 orders: "sort asc, name desc",
             };
             let param2 = {
-                filters: this.systemType[1] ? `classCode='${ this.systemType[1] }'` : undefined,
+                filters: this.systemType[1] ? `classCode='${this.systemType[1]}'` : undefined,
                 pageNumber: this.paginationList.page,
                 pageSize: this.paginationList.size,
                 orders: "createTime desc, id asc",
                 projectId: this.projectId,
             };
             if (this.inputSearch != "") {
-                param2.filters = `localName contain '${ this.inputSearch }' or localId contain '${ this.inputSearch }'`;
+                param2.filters = `localName contain '${this.inputSearch}' or localId contain '${this.inputSearch}'`;
             }
             let promise = new Promise((resolve) => {
                 dictQuery(param).then((res) => {
@@ -338,10 +343,9 @@ export default class extends Vue {
                 });
             });
             Promise.all([promise, promise2]).then((res) => {
-                let tableData = [];
                 this.loading = false;
                 // 类型下信息点,重组数据
-                let { basicInfos, dictStages } = this.informationArrangement(res[0].content)
+                let {basicInfos, dictStages} = this.informationArrangement(res[0].content)
                 this.headersStage = {
                     basicInfos: {
                         name: "基础信息台账",
@@ -394,14 +398,18 @@ export default class extends Vue {
                 content: [from]
             }
             createSystem(param).then(res => {
-                res.result == 'success' && this.$message.success('添加成功')
-                this.dialogVisible = false
-                this.changeSystemList()
+                if (res.result == 'success') {
+                    this.systemList();
+                    this.dataCount();
+                    this.changeSystemList()
+                    this.$message.success('添加成功')
+                    this.dialogVisible = false
+                }
             })
         }
     }
 
-    @Watch("systemType", { immediate: true, deep: true })
+    @Watch("systemType", {immediate: true, deep: true})
     handleDeviceMsg() {
         this.systemVal = this.systemType
     }

+ 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": {