Bläddra i källkod

合并测试环境分支

zhangyu 5 år sedan
förälder
incheckning
cffafd481e

+ 1 - 1
config/dev.env.js

@@ -5,7 +5,7 @@ const prodEnv = require('./prod.env')
 module.exports = merge(prodEnv, {
     NODE_ENV: '"development"',
     BASE_URL: '"http://192.168.20.236"', //测试iframe地址
-    SSO_SERVER: '"http://192.168.20.102:8080"', //(新)测试环境
+    SSO_SERVER: '"http://192.168.20.236:8086"', //(新)测试环境
     MQTT_SERVICE: '"ws://192.168.20.225:61614/stomp/"' //MQ测试环境地址
     // SSO_SERVER: '"http://sso.sagacloud.cn"',  //正式环境
     // BASE_URL: '"http://mbi.sagacloud.cn"', //线上iframe地址

+ 1 - 1
config/prod.env.js

@@ -2,7 +2,7 @@
 module.exports = {
     NODE_ENV: '"production"',
     // BASE_URL: '"http://192.168.20.236"', //测试iframe地址
-    // SSO_SERVER: '"http://192.168.20.102:8080"', //(新)测试环境
+    // SSO_SERVER: '"http://192.168.20.236:8086"', //(新)测试环境
     // MQTT_SERVICE: '"ws://192.168.20.225:61614/stomp/"' //MQ测试环境地址
     BASE_URL: '"http://mbi.sagacloud.cn"', //线上iframe地址
     SSO_SERVER: '"http://sso.sagacloud.cn"',  //正式环境

+ 1 - 1
package.json

@@ -36,7 +36,7 @@
     "@saga-web/base": "2.1.9",
     "@saga-web/draw": "2.1.61",
     "@saga-web/graphy": "2.1.34",
-    "@saga-web/cad-engine": "2.0.432"
+    "@saga-web/cad-engine": "2.0.458"
   },
   "devDependencies": {
     "ajv": "^6.9.1",

+ 7 - 1
src/api/scan/request.js

@@ -1826,6 +1826,12 @@ export function notSyncObject(param, success) {
 
 // 岗位和关联的资产信息点值不一致
 export function postRelationInforAtpism(param, success) {
-    let url = `${baseUrl}/datacenter//statistics/eq2pe-count`
+    let url = `${baseUrl}/datacenter/statistics/eq2pe-count`
     http.postJson(url, param, success)
+}
+
+// 查询所有设备和部件的类型
+export function getAllEqPaType(param, success) {
+  let url = `${baseUrl}/datacenter/class-def/query-equip-comm-type`
+  http.postJson(url, param, success)
 }

+ 1 - 1
src/assets/scss/point/point_config/common.scss

@@ -109,7 +109,7 @@ body .htFiltersConditionsMenu:not(.htGhostTable) {
     cursor: pointer;
 }
 
-@media screen and (max-width: 1200px) {
+@media screen and (max-width: 1366px) {
     .w {
         width: 560px;
     }

+ 1 - 1
src/assets/scss/point/point_config/reset.scss

@@ -1,4 +1,4 @@
-$WinWitdh:1200px;
+$WinWitdh:1366px;
 $BaseC:#555;
 $LinkC:#06f;
 $HoverC:#f60;

+ 83 - 81
src/components/business_space/newGraphy/graphy.vue

@@ -108,7 +108,6 @@ import {
   groupCreRelaZoneAndISp
 } from "@/api/scan/request"
 
-//  BSP => 业务空间
 export default {
   components: {
     canvasFun,
@@ -148,12 +147,13 @@ export default {
       groupCreateDialogVis: false, //批量创建业务空间弹窗
       groupCreateType: 1, //批量创建方式
       zoneDisable: true, // 重新划分是否禁用
+      sourceIdToISP: {}
     }
   },
   computed: {
     ...mapGetters('layout', ['projectId'])
   },
-  created() {},
+  created() { },
   mounted() {
     this.canvasWidth = this.$refs.graphy.offsetWidth;
     this.canvasHeight = this.$refs.graphy.offsetHeight;
@@ -205,9 +205,12 @@ export default {
       queryZone(pa, res => {
         this.BIMIDToSID = {}
         this.BIMIDToSIName = {}
+        this.sourceIdToISP = {}
         res.Content.map(t => {
-          this.BIMIDToSID[t.BIMID.split(":")[1]] = t.RoomID;
-          this.BIMIDToSIName[t.BIMID.split(":")[1]] = t.RoomLocalName || t.RoomName;
+          let key = t.BIMID.split(":")[1];
+          this.BIMIDToSID[key] = t.RoomID;
+          this.BIMIDToSIName[key] = t.RoomLocalName || t.RoomName;
+          this.sourceIdToISP[key] = t;
         })
       })
     },
@@ -474,31 +477,32 @@ export default {
     },
     // 根据图创建新的业务空间-弹窗返回确认创建
     createRoom(val) {
-      let zoneObj = { Outline: [], Height: 0 }, IspaceIdList = [];
-      let selectSpaces = this.scene.getSelectedSpaces();
-      selectSpaces.map(t => {
-        zoneObj.Outline.push(t.data.OutLine);
-        if (this.BIMIDToSID[t.data.SourceId]) {
-          IspaceIdList.push(this.BIMIDToSID[t.data.SourceId]);
-        }
-        if (t.data.Height && (zoneObj.Height == 0 || t.data.Height < zoneObj.Height)) {
-          zoneObj.Height = t.data.Height > 100 ? (t.data.Height / 1000).toFixed(2) : t.data.Height;
-        }
-      })
-      // 如果有划分,求交集
+      const zoneObj = { Outline: [], Height: 0 }, IspaceIdList = [];
+      let spaces = {};
       if (this.scene.cutItem || this.scene.sceneMark) {
-        zoneObj.Outline = [];
-        let arr = this.scene.getIntersect();
-        arr.map(t => {
+        // 如果有划分,求交集
+        // 格式为Poly(先与业务空间求差集)
+        const obj = this.scene.getZoneDifference(true);
+        // 差集与楼层平面图或用户划分区域求交集
+        spaces = this.scene.getPloyIntersect(obj)
+      } else {
+        // 格式为SPoint[]
+        spaces = this.scene.getZoneDifference();
+      }
+      for (let key in spaces) {
+        spaces[key].map(t => {
           let temp = t.map(item => {
             return {
-              X: item.x,
-              Y: -item.y,
+              X: 1*item.x.toFixed(2),
+              Y: -item.y.toFixed(2),
               Z: 0
             }
           })
           zoneObj.Outline.push([temp]);
         })
+        let curISP = this.sourceIdToISP[key];
+        curISP && IspaceIdList.push(curISP.RoomID);
+        zoneObj.Height = zoneObj.Height == 0 ? curISP.Height : zoneObj.Height > curISP.Height ? curISP.Height : zoneObj.Height;
       }
       if (!zoneObj.Outline.length) {
         zoneObj.Outline = null;
@@ -509,38 +513,39 @@ export default {
       this.createSingleBSP(zoneObj, IspaceIdList)
     },
     // 根据图从未关联平面图的业务空间中选择--按钮返回关联信号
-    createFromUnrelated(BSP) {
-      BSP.Outline = [];
-      BSP.Height = 0;
-      let arr = this.scene.getSelectedSpaces(), IspaceIdList = [];
-      arr.map(t => {
-        BSP.Outline.push(t.data.OutLine);
-        if (this.BIMIDToSID[t.data.SourceId]) {
-          IspaceIdList.push(this.BIMIDToSID[t.data.SourceId]);
-        }
-        if (t.Height && (BSP.Height == 0 || t.Height < BSP.Height)) {
-          BSP.Height = t.Height > 100 ? (t.Height / 1000).toFixed(2) : t.Height;
-        }
-      })
-      // 如果有划分,求交集
+    createFromUnrelated(zoneObj) {
+      zoneObj.Outline = [];
+      zoneObj.Height = 0;
+      let spaces = {}, IspaceIdList = [];
       if (this.scene.cutItem || this.scene.sceneMark) {
-        BSP.Outline = [];
-        let spaceIntersect = this.scene.getIntersect();
-        spaceIntersect.map(t => {
+        // 如果有划分,求交集
+        // 格式为Poly(先与业务空间求差集)
+        const obj = this.scene.getZoneDifference(true);
+        // 差集与楼层平面图或用户划分区域求交集
+        spaces = this.scene.getPloyIntersect(obj)
+      } else {
+        // 格式为SPoint[]
+        spaces = this.scene.getZoneDifference();
+      }
+      for (let key in spaces) {
+        spaces[key].map(t => {
           let temp = t.map(item => {
             return {
-              X: item.x,
-              Y: -item.y,
+              X: 1*item.x.toFixed(2),
+              Y: -item.y.toFixed(2),
               Z: 0
             }
           })
-          BSP.Outline.push([temp]);
+          zoneObj.Outline.push([temp]);
         })
+        let curISP = this.sourceIdToISP[key];
+        curISP && IspaceIdList.push(curISP.RoomID);
+        zoneObj.Height = zoneObj.Height == 0 ? curISP.Height : zoneObj.Height > curISP.Height ? curISP.Height : zoneObj.Height;
       }
-      if (!BSP.Outline.length) {
-        BSP.Outline = null;
+      if (!zoneObj.Outline.length) {
+        zoneObj.Outline = null;
       }
-      this.updateBSPOutline(BSP, IspaceIdList)
+      this.updateBSPOutline(zoneObj, IspaceIdList)
     },
     // 编辑空间详情
     editeSpaceDetail() {
@@ -625,48 +630,45 @@ export default {
     // 根据图批量创建所选业务空间
     groupCreateZone() {
       let arr = this.scene.getSelectedSpaces();
-      let spaces = [];
-      // 如果有划分,求交集
+      let createSpaces = [], spaces = {};
       if (this.scene.cutItem || this.scene.sceneMark) {
-        let outlines = this.scene.getIntersectInSpace();
-        for (let k in outlines) {
-          outlines[k] = outlines[k].map(t => {
-            t = t.map(item => {
-              item = item.map(j => {
-                return { X: j.x, Y: -j.y, Z: 0 }
-              })
-              return item
-            })
-            return t;
-          })
-        }
-        spaces = arr.map(t => {
-          return {
-            IspaceId: this.BIMIDToSID[t.data.SourceId],
-            RoomLocalName: this.BIMIDToSIName[t.data.SourceId],
-            Outline: outlines[t.data.SourceId],
-            BuildingId: this.buildFloor[0],
-            FloorId: this.buildFloor[1],
-            Height: t.data.Height > 100 ? (t.data.Height / 1000).toFixed(2) : t.data.Height || 0
-          }
-        }).filter(item => item.Outline && item.Outline.length)
+        // 如果有划分,求交集
+        // 格式为Poly(先与业务空间求差集)
+        const obj = this.scene.getZoneDifference(true);
+        // 差集与楼层平面图或用户划分区域求交集
+        spaces = this.scene.getPloyIntersect(obj)
       } else {
-        spaces = arr.map(t => {
-          return {
-            IspaceId: this.BIMIDToSID[t.data.SourceId],
-            RoomLocalName: this.BIMIDToSIName[t.data.SourceId],
-            Outline: [t.data.OutLine],
-            BuildingId: this.buildFloor[0],
-            FloorId: this.buildFloor[1],
-            Height: t.data.Height > 100 ? (t.data.Height / 1000).toFixed(2) : t.data.Height || 0
-          }
-        })
+        // 格式为SPoint[]
+        spaces = this.scene.getZoneDifference();
       }
-      if (spaces.length) {
+      for (let key in spaces) {
+        let zoneObj = { Outline: [], Height: 0 }
+        spaces[key].map(t => {
+          let temp = t.map(item => {
+            return {
+              X: 1*item.x.toFixed(2),
+              Y: -item.y.toFixed(2),
+              Z: 0
+            }
+          })
+          zoneObj.Outline.push([temp]);
+        })
+        if (!zoneObj.Outline.length) {
+          continue
+        }
+        let curISP = this.sourceIdToISP[key];
+        zoneObj.Height = zoneObj.Height == 0 ? curISP.Height : zoneObj.Height > curISP.Height ? curISP.Height : zoneObj.Height;
+        zoneObj.IspaceId = curISP.RoomID;
+        zoneObj.RoomLocalName = curISP.RoomLocalName;
+        zoneObj.BuildingId = this.buildFloor[0];
+        zoneObj.FloorId = this.buildFloor[1];
+        createSpaces.push(zoneObj);
+      }
+      if (createSpaces.length) {
         this.canvasLoading = true;
-        this.groupCreateBSP(spaces)
+        this.groupCreateBSP(createSpaces)
       } else {
-        this.$message.warning('未选择本层空间');
+        this.$message.warning('未选择空间');
       }
     },
     // 更新业务空间和元空间的关系

+ 21 - 13
src/components/dialogs/list/batchDialog.vue

@@ -297,20 +297,28 @@
       next() { //下一步按钮
         // if (this.active++ > 1) this.active = 0
         this.deviceList = this.firm.filter(item => item.info)
-        if (!this.onlySelect.length) { //对单项全选进行过滤
-          this.$message({
-            message: '还没有选择单值信息哦',
-            type: 'warning'
-          });
-          return false
-        }
-        if (!this.deviceList.length) { //对单项全选进行过滤
-          this.$message({
-            message: '单值信息没有填写哦',
-            type: 'warning'
-          });
-          return false
+        // if (!this.onlySelect.length) { //对单项全选进行过滤
+        //   this.$message({
+        //     message: '还没有选择单值信息哦',
+        //     type: 'warning'
+        //   });
+        //   return false
+        // }
+      let fillIn = this.onlySelect.some(i=>!i.info)
+        if(fillIn) {
+            this.$message({
+              message: '请填写勾选信息',
+              type: 'warning'
+            });
+            return false
         }
+        // if (!this.deviceList.length) { //对单项全选进行过滤
+        //   this.$message({
+        //     message: '单值信息没有填写哦',
+        //     type: 'warning'
+        //   });
+        //   return false
+        // }
         if (this.checkAll) {    // 如果单项全选
           if (this.deviceList.length < 4) { //对单项全选进行过滤
             this.$message({

+ 3 - 8
src/components/echarts/reportDoughnut.vue

@@ -1,5 +1,5 @@
 <template>
-  <div style="width:100%;height:100%;textAlign:center;" :id="id">
+  <div style="width:100%;height:100%;text-align:center;" :id="id">
   </div>
 </template>
 <script>
@@ -21,16 +21,11 @@ export default {
     },
     text: {
       type: String,
-      default: function () {
-        return []
-      }
     },
     type: {},
     name: "",
     sum: ""
   },
-  created(){
-  },
   data() {
     return {
       myCharts: null
@@ -110,9 +105,9 @@ export default {
     }
   },
   watch: {
-    renderData: {
+    'renderData': {
       deep: true,
-      handler: function () {
+      handler(n,o) {
         this.drawDoughnut()
       }
     }

+ 9 - 1
src/components/globaluploader/index.vue

@@ -2,7 +2,7 @@
  * @Author: zhangyu
  * @Date: 2019-11-28 10:05:28
  * @Info: 
- * @LastEditTime : 2019-12-25 17:48:31
+ * @LastEditTime : 2020-01-03 15:31:04
  -->
 <template>
   <div id="global-uploader">
@@ -11,6 +11,7 @@
     <uploader
         ref="uploader"
         :options="options"
+        :fileStatusText="fileStatusText"
         :autoStart="false"
         @file-added="onFileAdded"
         @file-success="onFileSuccess"
@@ -69,6 +70,13 @@ import { mapGetters, mapMutations } from 'vuex'
 export default {
   data() {
     return {
+      fileStatusText: {
+        success: '成功',
+        error: '失败',
+        uploading: '上传中',
+        paused: '暂停',
+        waiting: '等待'
+      },
       options: {
         target: '/image-service/common/multipart_upload',
         chunkSize: 1*1024*1024,

+ 2 - 1
src/components/model/file/addFolder.vue

@@ -5,12 +5,13 @@
         <el-form
           :model="ruleForm"
           :rules="rules"
+          @submit.native.prevent
           ref="addFolderModel"
           label-width="100px"
           class="demo-ruleForm"
         >
           <el-form-item label="文件夹名称" prop="name">
-            <el-input v-model="ruleForm.name" focus></el-input>
+            <el-input v-model="ruleForm.name"  @keyup.enter.native="addFolder" focus></el-input>
           </el-form-item>
         </el-form>
       </div>

+ 9 - 6
src/components/model/file/floorTable.vue

@@ -21,25 +21,29 @@
       <el-table-column prop="UserName" label="上传人"></el-table-column>
       <el-table-column prop="address" align="center" label="操作" width="240">
         <template slot-scope="scope">
-          <div class="operate" v-show="!scope.row.isDown">
+          <div class="operate" v-show="scope.row.Status == 4">
             <el-button type="primary" size="mini" class="iconfont icon-download" @click="downloadModel(scope.row)"></el-button>
             <el-button type="primary" size="mini" class="iconfont icon-replace" @click="repliaceModel(scope.row)"></el-button>
             <el-button type="primary" size="mini" class="iconfont icon-Log" @click="queryModelLog(scope.row)"></el-button>
           </div>
           <div
             :class="['upLoad-loading']"
-            v-show="scope.row.isDown">
+            v-show="scope.row.Status != 4">
             <div class="progress">
               <el-progress
                 :text-inside="false"
                 :stroke-width="20" :percentage="100"
-                :color="scope.row.Status == 1 || scope.row.Status == 10 || scope.row.Status == 11?'#909399':'#67C23A'"></el-progress>
+                :color="scope.row.Status?'#909399':'#67C23A'"></el-progress>
             </div>
             <div class="progress-right">
-              <span v-show="!scope.row.Status">上传中</span>
+              <span v-if="!scope.row.Status">上传中...</span>
               <span v-show="scope.row.Status == 1">等待检查...</span>
-              <span v-show="scope.row.Status == 10">模型检查中</span>
+              <span v-show="scope.row.Status == 10">模型检查中...</span>
               <span v-show="scope.row.Status == 11">未通过检查</span>
+              <span v-show="scope.row.Status == 2">等待数据导出...</span>
+              <span v-show="scope.row.Status == 21">模型数据导出失败</span>
+              <span v-show="scope.row.Status == 3">处理导出数据中...</span>
+              <span v-show="scope.row.Status == 31">同步到数据中心失败</span>
             </div>
           </div>
         </template>
@@ -102,7 +106,6 @@ export default {
             } else if (precent == 101) {
               // 如过precent == 101 则返回结果为suceess 不能关闭进度条,
               item.precent = 100;
-              item.isDown = false;
               this.$emit("percentFinish");
             }
             return;

+ 56 - 7
src/components/model/file/versionDialog.vue

@@ -7,18 +7,18 @@
         <p style="marginTop:15px;">更新内容:</p>
         <el-divider>新增设备概要内容</el-divider>
         <p style="marginBottom:10px;">于【{{versionData.acceptTime}}】上传模型文件,新增设备实例如下:</p>
-        <p v-for="(item, key) in versionData.createData" :key="key">【{{key}}设备类名称】:【{{item.length}}】个</p>
+        <p v-for="(item, key) in versionData.createData" :key="'C'+key">【{{mapType[key]}}】:【{{item.length}}】个</p>
         <el-divider>删除设备概要内容</el-divider>
         <p style="marginBottom:10px;">于【{{versionData.acceptTime}}】上传模型文件,删除设备实例如下:</p>
-        <p v-for="(item, key) in versionData.deleteData" :key="key">【{{key}}设备类名称】:【{{item.length}}】个</p>
+        <p v-for="(item, key) in versionData.deleteData" :key="'D'+key">【{{mapType[key]}}】:【{{item.length}}】个</p>
         <el-divider>新增设备</el-divider>
-        <div v-for="(item, key) in versionData.createData" :key="key">
-          <p>【{{key}}设备类名称】</p>
+        <div v-for="(item, key) in versionData.createData" :key="'CL'+key">
+          <p>【{{mapType[key]}}】</p>
           <p v-for="(obj, i) in item" :key="obj.Id">【{{i+1}}】、建筑:【{{obj.BuildingName || "无"}}】;楼层:【{{obj.FloorName || "无"}}】;设备全局id:【{{obj.ObjId || "无"}}】;BIMID:【{{obj.BimId || "无"}}】;设备本地编码:【{{obj.LocalId || "无"}}】;设备本地名称:【{{obj.LocalName || "无"}}】;CADID:【{{obj.CadId || "无"}}】;</p>
         </div>
         <el-divider>删除设备</el-divider>
-        <div v-for="(item, key) in versionData.deleteData" :key="key">
-          <p>【{{key}}设备类名称】</p>
+        <div v-for="(item, key) in versionData.deleteData" :key="'DL'+key">
+          <p>【{{mapType[key]}}】</p>
           <p v-for="(obj, i) in item" :key="obj.Id">【{{i+1}}】、建筑:【{{obj.BuildingName || "无"}}】;楼层:【{{obj.FloorName || "无"}}】;设备全局id:【{{obj.ObjId || "无"}}】;BIMID:【{{obj.BimId || "无"}}】;设备本地编码:【{{obj.LocalId || "无"}}】;设备本地名称:【{{obj.LocalName || "无"}}】;CADID:【{{obj.CadId || "无"}}】;</p>
         </div>
       </el-scrollbar>
@@ -33,6 +33,7 @@
 <script>
 import { mapGetters } from "vuex";
 import { querySyncLogCount } from "@/api/model/file.js";
+import { getAllEqPaType } from "@/api/scan/request";
 export default {
   components: {
 
@@ -56,6 +57,7 @@ export default {
         createData: {},
         deleteData:{}
       },
+      mapType: { },
     }
   },
   mounted() { },
@@ -65,6 +67,49 @@ export default {
       this.$emit("update:dialogVisible", false);
     },
     // 获取版本信息
+    getData() {
+      if(this.modelFile.Id || this.modelFile.CurrentModelId){
+        this.versionData.userName = this.modelFile.UserName;
+        this.versionData.acceptTime = this.modelFile.AcceptTime;
+        let promise1 = new Promise((resolve, reject) => {
+            querySyncLogCount({Filters: `ModelId='${this.modelFile.CurrentModelId?this.modelFile.CurrentModelId:this.modelFile.Id}'`}, res => {
+                resolve(res)
+            })
+        })
+        let promise2 = new Promise((resolve, reject) => {
+            getAllEqPaType({}, res => {
+                resolve(res)
+            })
+        })
+        Promise.all([promise1, promise2]).then(values => {
+          let versionData = values[0].Content, typeList = values[1].Content;
+          typeList.forEach(item => {
+            this.mapType[item.Code] = item.Name;
+          });
+          console.log(this.mapType)
+          versionData.forEach(item => {
+            if(item.Operation){
+              if(this.versionData.createData[item.Type]){
+                this.versionData.createData[item.Type].push(item);
+              } else {
+                this.versionData.createData[item.Type] = [];
+                this.versionData.createData[item.Type].push(item);
+              }
+            } else {
+              if(this.versionData.deleteData[item.Type]){
+                this.versionData.deleteData[item.Type].push(item);
+              } else {
+                this.versionData.deleteData[item.Type] = [];
+                this.versionData.deleteData[item.Type].push(item);
+              }
+            }
+          });
+          this.$forceUpdate();
+        })
+        console.log(this.versionData)
+      }
+    },
+    // 获取版本信息
     getVersionData() {
       if(this.modelFile.Id || this.modelFile.CurrentModelId){
         this.versionData.userName = this.modelFile.UserName;
@@ -103,7 +148,11 @@ export default {
             createData: {},
             deleteData:{}
           };
-          this.getVersionData();
+          if(Object.keys(this.mapType).length) {
+            this.getVersionData();
+          } else {
+            this.getData();
+          }
         }
       },
       immediate: true

+ 1 - 4
src/components/relation/overview/CardList.vue

@@ -158,7 +158,6 @@
         :isComputed="isComputed"
         :ManualMaintenance="ManualMaintenance"
         :TableVisibleMoreLoading="TableVisibleMoreLoading"
-        @template="templateDown"
         @openComputed="openComputed"
         @RelationType="RelationType"
     />
@@ -262,9 +261,7 @@
         }
         this.ManualMaintenance = relation
       },
-      templateDown() { //下载模板
-        this.$emit('template')
-      },
+
       openComputed(result) {
         this.$emit('openComputed', result)
       },

+ 14 - 55
src/components/relation/overview/Modal/RelationMaintain.vue

@@ -218,7 +218,7 @@
           value: 'lId',
           children: 'Items',
 
-        }, // 级联
+        },
         activities: [{
           content: '数据文件处理中..',
           size: 'large',
@@ -260,7 +260,6 @@
           projectId: this.projectId
         }
       },
-      //    末端数据添加disabled
       disOptions() {
         let arr = this.list.length && this.deepCopy(this.list).map(item => {
           item.Items.length && item.Items.map(i => {
@@ -280,42 +279,18 @@
         return JSON.parse(JSON.stringify(obj))
       },
       showCascader() {
-        this.$nextTick(() => {
-          ++this.isResouceShow
-          let allList = []
-          this.deepCopy(this.source).forEach(item => allList.push(...item.Items))
-          this.list = allList.map((item, index) => {
-            item = {
-              ...item,
-              lId: index
-            }
-            item.Items.map(i => {
-              i.lId = i.Id + i.BlockId //添加唯一标识
-              // i.Source = true //判断源末端
-              return i
-            })
-            return item
-          })
-          this.deepCopy(this.list).forEach(k => {
-            k.Items.forEach(j => {
-              if (j.isSource != null && j.isSource === true) {
-                this.ops.push([k.lId, j.lId])
-              }
-              if (j.isSource != null && j.isSource === false) {
-                this.filterOps.push([k.lId, j.lId])
-              }
+        ++this.isResouceShow
+        let copy = this.deepCopy(this.source)
+        copy.forEach(item => {
+          item.Items.forEach(child => {
+            child.lId = this.list.length
+            this.list.push(child)
+            child.Items.forEach(i => {
+              i.lId = i.Id + i.BlockId
+              i.IsSource == true && this.ops.push([child.lId, i.lId])
+              i.IsSource == false && this.filterOps.push([child.lId, i.lId])
             })
           })
-          //末端
-          // this.filterOps = this.deepCopy(this.list).map(item => {
-          //   item.Items.length && item.Items.map(i => {
-          //     if (this.idArr.includes(i.lId)) {
-          //       i.disabled = true
-          //     }
-          //     return i
-          //   })
-          //   return item
-          // })
         })
       },
       downloadProject(str) {
@@ -336,7 +311,6 @@
       success(event, file, fileList) {
         this.dialogManualOption = true
         this.dialogProcess = true
-        console.log(event, file, fileList, ' file success')
 
       },
       error(event, file, fileList) {
@@ -350,29 +324,21 @@
         this.dialogProcess = false
         this.dialogManualOption = false
       },
-      templateDownload() {
-        this.$emit('template')
-      },
       promptly() {
         if (this.isComputed.IsAutomatic && !this.isComputed.IsSource) { //需要自动计算并且不需要配置云末端
-          console.log(this.isComputed.RelationType, 'this.isComputed.RelationType')
           this.$emit('RelationType', this.isComputed.RelationType, this.isComputed.ZoneType)
         }
         this.dialogTableVisible = false
       },
       sourceOptions(val) {
-        this.ops = val
+        // this.ops = val
         this.idArr = val.map(item => item[1])
-        //二级数据
-        this.secondary = []
         this.deepCopy(this.list).forEach(item => this.secondary.push(...item.Items))
-        //last filter
         let filterList = this.secondary.filter(item => this.idArr.includes(item.lId))
         //接口需要的数据格式
-        let result = []
         filterList.forEach(item => {
           let {BlockId, BuildingId, Domain, Id, MepSystemType, ProjectId, Type, Statistics} = item
-          result.push({
+          this.resultOrigin.push({
             BlockId,
             BuildingId,
             Domain,
@@ -385,21 +351,15 @@
             Statistics
           })
         })
-        this.resultOrigin = result
       },
       endOptions(val) {
         this.idArr = val.map(item => item[1])
-        //二级数据
-        this.secondary = []
         this.deepCopy(this.list).forEach(item => this.secondary.push(...item.Items))
-        //last filter
         let filterList = this.secondary.filter(item => this.idArr.includes(item.lId))
-        console.log(filterList, 'filterList-end')
         //接口需要的数据格式
-        let result = []
         filterList.forEach(item => {
           let {BlockId, BuildingId, Domain, Id, MepSystemType, ProjectId, Type, Statistics} = item
-          result.push({
+          this.resultEnd.push({
             BlockId,
             BuildingId,
             Domain,
@@ -412,7 +372,6 @@
             Statistics
           })
         })
-        this.resultEnd = result
       },
       computedUpdate() {
         if (!this.resultOrigin.length && !this.ops.length) {

+ 4 - 4
src/framework/components/messagesever/index.vue

@@ -2,7 +2,7 @@
  * @Author: zhangyu
  * @Date: 2019-08-26 15:22:13
  * @Info: 
- * @LastEditTime: 2019-11-13 15:46:29
+ * @LastEditTime : 2020-01-03 11:38:57
  -->
 <template>
   <div class="notification-box" v-clickOutside="handleClose" @click="handleClickRead">
@@ -118,7 +118,7 @@ export default {
             Name: "project"
           }
         ],
-        Filters: `UserId='${this.userId}'`,
+        Filters: `UserId='${this.userId}';Type!='Refresh'`,
         Orders: "CreateTime desc, Id asc",
         PageNumber: 1,
         PageSize: 10
@@ -129,7 +129,7 @@ export default {
     },
     getUnreadCount() {//获取未读消息的数量
       let params = {
-        Filters: `Read=false;UserId='${this.userId}'`
+        Filters: `Read=false;UserId='${this.userId}';Type!='Refresh'`
       }
       messgeCount(params, res => {
         this.unreadNum = res.Count
@@ -152,7 +152,7 @@ export default {
     connect() {
       this.client = Stomp.client(MQTT_SERVICE)
       this.client.reconnect_delay = 5000
-      var clientid = `sagaMQ-${this.userInfo.userName}`
+      var clientid = `sagaMQ-${this.userInfo.userName}-${new Date().getTime()}`
       var headers = {
         'login': MQTT_USERNAME,
         'passcode': MQTT_PASSWORD,

+ 11 - 9
src/framework/components/messagesever/msmq.js

@@ -23,15 +23,17 @@ const MSMQ = {
         if(data.Module && data.Module == 'Model'){ //模型文件的消息触发模型文件列表刷新事件
           Bus.$emit('modelStatusChange', data)
         }
-        Notification({ 
-          title: `${data.Title?data.Title:''}`, 
-          dangerouslyUseHTMLString: true, 
-          message: `【${this.moduleMap[data.Module]?this.moduleMap[data.Module]:data.Module}】${data.Content?data.Content.Message?data.Content.Message:'':''}`,
-          type: this.msgTypeMap[data.Type]?this.msgTypeMap[data.Type]:'info'
-        })
-        // Notification.info({ title: '消息',dangerouslyUseHTMLString: true, message: `项目编号:${data.projectId}<br>消息类型:${data.type}<br>描述信息:${data.description}<br>` })
-        unreadNum++
-        Bus.$emit('messageListUpdate', data)//消息驱动消息列表刷新
+        if(data.Type != 'Refresh'){//消息列表可见消息(注类型为'Refresh'的消息用来驱动对应服务刷新,消息中心[用户]不可见)
+          Notification({ 
+            title: `${data.Title?data.Title:''}`, 
+            dangerouslyUseHTMLString: true, 
+            message: `【${this.moduleMap[data.Module]?this.moduleMap[data.Module]:data.Module}】${data.Content?data.Content.Message?data.Content.Message:'':''}`,
+            type: this.msgTypeMap[data.Type]?this.msgTypeMap[data.Type]:'info'
+          })
+          // Notification.info({ title: '消息',dangerouslyUseHTMLString: true, message: `项目编号:${data.projectId}<br>消息类型:${data.type}<br>描述信息:${data.description}<br>` })
+          unreadNum++
+          Bus.$emit('messageListUpdate', data)//消息驱动消息列表刷新
+        }
         return unreadNum
       }
     }

+ 1 - 1
src/framework/layout/layout-store.js

@@ -104,7 +104,7 @@ export default {
       return new Promise((resolve, reject) => {
         frameworkApi.loadUserInfo().then(resp => {
           console.log(resp)
-          if (resp.Result == 'success') {
+          if (resp.Result == 'success' && resp.UserId) {
             state.userInfo = {userName: resp.Username, userId: resp.UserId}
             state.userId = resp.UserId
             storage.set('user_name', resp.Username)

+ 3 - 3
src/views/ledger/report/index.vue

@@ -39,7 +39,7 @@
         <span class="contain-title">设备<i>{{`(${equipCount?equipCount:"0"})`}}</i></span>
         <div class="data-show" v-loading="isLoading" v-if="equipment.length">
           <div class="show-content" v-for="(item,index) in equipment" :key="index">
-            <data-origin :id="'origin' + index" :renderData="item"></data-origin>
+            <data-origin :id="'origin1' + index" :renderData="item"></data-origin>
           </div>
         </div>
       </div>
@@ -78,8 +78,8 @@
         <span class="contain-title">竖井<i>{{`(${shaftCount?shaftCount:'0'})`}}</i></span>
         <div class="data-show" v-loading="isLoading" v-if="shaft.length">
           <div class="show-content" v-for="(item,index) in shaft" :key="index">
-            <datafan :id="'origin' + shaft" :renderData="item" v-if="!item.needCountT"></datafan>
-            <data-origin :id="'origin' + item + index" :renderData="item" v-else></data-origin>
+            <datafan :id="'origin2' + shaft" :renderData="item" v-if="!item.needCountT"></datafan>
+            <data-origin :id="'origin2' + item + index" :renderData="item" v-else></data-origin>
           </div>
         </div>
       </div>

+ 4 - 5
src/views/model/file/index.vue

@@ -231,13 +231,13 @@ export default {
                * 4: 正常(所有用户可操作:下载、替换、查看历史)
                */
               if (item.Status == 2 || item.Status == 20 || item.Status == 21 || item.Status == 3 || item.Status == 31 || item.Status == 4) {
-                Object.assign(item, { isDown: false, precent: 0 });
+                Object.assign(item, { precent: 0 });
               } else {
-                Object.assign(item, { isDown: true, precent: 100 });
+                Object.assign(item, { precent: 100 });
                 if (this.persentList.length != 0) {
                   this.persentList.forEach(pItem => {
                     if (item.Id == pItem.Id) {
-                      Object.assign(item, { isDown: true, precent: pItem.precent ? pItem.precent : 0 });
+                      Object.assign(item, { precent: pItem.precent ? pItem.precent : 0 });
                     }
                   });
                 }
@@ -303,10 +303,9 @@ export default {
           Id: data.replaceModelItem.Id,
           precent: 0
         });
-        // 修改isdown得值
+        // 修改precent得值
         this.tableData.map(item => {
           if (item.Id == data.replaceModelItem.Id) {
-            item.isDown = true;
             item.precent = 0;
           }
         });

+ 1 - 9
src/views/relation/overview/index.vue

@@ -7,7 +7,6 @@
         :content="content"
         :source="source"
         :TableVisibleMoreLoading="TableVisibleMoreLoading"
-        @template="templateDown"
         @calcSpecial="calcSpecial"
         @openComputed="openComputed"
         @RelationType="RelationType"
@@ -85,8 +84,7 @@
         ],
         loading: false,
         source: [],//源端数据
-        ops: [],
-        currentRelationTypeName: '',//当前点击图片的RelationTypeName
+        currentRelationTypeName: '',//当前点击卡片的RelationTypeName
         TableVisibleMoreLoading: false,
       }
     },
@@ -165,11 +163,7 @@
             projectId: this.projectId
           }
         }
-        // businessSpaceAll(param, res => {
-        //
-        // })
         businessSpaceAll(param).then(res=> {
-          console.log(param,'param===')
           if(res.data.Result === 'failure') {
             this.$message({
               message: '计算失败',
@@ -179,8 +173,6 @@
           this.init()
         })
       },
-      templateDown() { //下载模板
-      },
       calcSpecial(relation) {
         this.currentRelationTypeName = relation.RelationTypeName
         if (relation.IsSource) { //配置云末端