浏览代码

Merge branch 'msg-sever' of http://39.106.8.246:3003/web/ibms into msg-sever

LXXXY 5 年之前
父节点
当前提交
42669671ba

+ 1 - 1
package.json

@@ -28,7 +28,7 @@
         "@saga-web/base": "2.1.9",
         "@saga-web/draw": "2.1.58",
         "@saga-web/graphy": "2.1.30",
-        "@saga-web/cad-engine": "2.0.366"
+        "@saga-web/cad-engine": "2.0.386"
     },
     "devDependencies": {
         "ajv": "^6.9.1",

+ 25 - 0
src/api/scan/request.js

@@ -949,6 +949,19 @@ export function queryLinkSys(param, success) {
     http.postJson(url, param, success)
 }
 
+//查询系统信息 - 建筑楼层 - 系统一对多
+export function querySysLinkBuild(param, success) {
+    let url = `${baseUrl}/datacenter/general—system/query-new`;
+    if(param.buildingId){
+        url += `?buildingId=${param.buildingId}`
+    }
+    if(param.floorId){
+        url += `&floorId=${param.floorId}`
+    }
+    http.postJson(url, param.data, success)
+}
+
+
 //设备清单 - 设备关联系统 设备1-n
 export function equipLinkSys(param, success) {
     let url = `${baseUrl}/datacenter/sy-in-eq/link-sy`;
@@ -1083,6 +1096,18 @@ export function getEquipNotInSys(param, success) {
     http.postJson(url, param.data, success)
 }
 
+//创建系统所在建筑关系,系统一对多,覆盖
+export function sysRelateBuild(param, success) {
+    let url = `${baseUrl}/datacenter/sy-in-bd/link-bd`;
+    http.postJson(url, param, success)
+}
+
+//创建系统所在楼层关系,系统一对多,覆盖
+export function sysRelateFloor(param, success) {
+    let url = `${baseUrl}/datacenter/sy-in-fl/link-fl`;
+    http.postJson(url, param, success)
+}
+
 //查询当前系统下的设备
 export function getEquipInSys(param, success) {
     let url = `${baseUrl}/equip-component/equip-query/sys-equip`;

+ 1 - 1
src/components/business_space/dialogs/list/firm.vue

@@ -22,7 +22,7 @@
                 <el-radio v-model="radio" :label="scope.row">{{scope.row.venderName || "--"}}</el-radio>
               </template>
             </el-table-column>
-            <el-table-column header-align='center' prop="brand" label="品牌"></el-table-column>
+            <el-table-column header-align='center' prop="brandName" label="品牌"></el-table-column>
             <el-table-column header-align='center' prop="name" label="型号"></el-table-column>
             <el-table-column header-align='center' label="技术参数">
               <template slot-scope="scope">

+ 0 - 4
src/components/business_space/newGraphy/graphy.vue

@@ -679,10 +679,6 @@ export default {
     saveSvg() {
       this.view.saveSceneSvg(`${this.buildFloor[1]}.svg`, 6400, 4800);
     },
-    // 保存为svg
-    saveSvg() {
-      this.view.saveSceneSvg(`${this.buildFloor[1]}.svg`, 6400, 4800);
-    },
     // 保存json
     saveJson() {
       this.view.saveFloorJson(`${this.buildFloor[1]}.json`)

+ 1 - 0
src/components/common/handsontable.vue

@@ -166,6 +166,7 @@
                     sortIndicator: true, //添加排序
                     renderAllRows: true,
                     autoColumnSize: true,
+                    observeChanges: false, //启用observeChanges插件
                     language: "zh-CN",
                     manualColumnResize: true,
                     manualColumnMove: true,

+ 1 - 1
src/components/data_admin/buildTask/dialog/modelTaskDialog.vue

@@ -124,7 +124,7 @@ export default {
       }
 
       if (this.params.spaceList && this.params.spaceList.length) {
-        //通过平面图区域查询(接口未支持)paramsQuery:{listId:[]}
+        //通过平面图区域查询
         params.IdList = this.params.spaceList
         queryModelDiglog(params, res => {
           this.dataFormatter(res)

+ 62 - 4
src/components/data_admin/buildTask/draw/drawModel.vue

@@ -2,7 +2,7 @@
   <div :id="`drawFloor${id}`" class="drawFloor" v-loading="canvasLoading">
     <canvas :id="`floorCanvas${id}`" :width="cadWidth" :height="cadHeight" ref="canvas" tabindex="0"></canvas>
     <div class="operate" v-show="showTools">
-      <canvasFun @fit="fit" @savePng="savePng" @saveSvg="saveSvg" @scale="scale" :config="config" ref="canvasFun"></canvasFun>
+      <canvasFun @fit="fit" @savePng="savePng" @saveSvg="saveSvg" @scale="scale" @saveJson="saveJson" :config="config" ref="canvasFun"></canvasFun>
     </div>
   </div>
 </template>
@@ -11,7 +11,7 @@
 import { DivideFloorScene, FloorView } from "@saga-web/cad-engine/lib"
 import { SColor, SPoint } from "@sybotan-web/draw/lib";
 import canvasFun from "@/components/business_space/newGraphy/canvasFun"
-import { floorQuery } from "@/api/scan/request";
+import { floorQuery, queryEquip } from "@/api/scan/request";
 export default {
   components: {
     canvasFun
@@ -27,6 +27,7 @@ export default {
       modelId: '',
       FloorID: '',
       Outline: [],
+      deviceList: [],
       buttonContent: "",
       showTools: false,
       config: {
@@ -44,6 +45,10 @@ export default {
     dialog: {
       default: false
     },
+    isLight:{
+      type: Boolean,
+      default: false
+    },
     CurrentModelId: String
   },
   created() { },
@@ -58,7 +63,7 @@ export default {
       this.drawMainScene = new DivideFloorScene();
       this.canvasLoading = true;
       this.drawMainScene.getFloorData('/modelapi/base-graph/query', { ModelId: ModelId }).then(res => {
-        console.log(this)
+        // console.log(this)
         this.getGraphtSuc(res);
       })
     },
@@ -106,15 +111,53 @@ export default {
         return;
       }
       this.view.scene = this.drawMainScene;
+      if(this.isLight){//高亮显示未验证的区块
+        this.deviceList = []
+        this.highLightPoint()
+      }
       this.view.fitSceneToView();
       this.drawMainScene.click(this, this.canvasClick);
-
       if (this.$refs.canvasFun) {
         this.view.maxScale = this.view.scale * 10;
         this.view.minScale = this.view.scale;
         this.$refs.canvasFun.everyScale = this.view.scale;
       }
     },
+    //高亮未完成验证的区块
+    async highLightPoint() {
+      await this.getUnverificationDevice()
+      this.view.scene.spaceList.forEach(item => {
+        for(let deviceItem of this.deviceList) {
+          if(deviceItem.LocationJson && item.contains(deviceItem.LocationJson.X, -deviceItem.LocationJson.Y)){//注:坐标体系不同,Y坐标取反
+            item.highLightFlag = true
+            break
+          }
+        }
+      })
+    },
+    //获取模型下未验证的设备
+    getUnverificationDevice(pageNum) {
+      return new Promise((resolve) => {
+        pageNum = pageNum ? pageNum : 1
+        let params = {
+          Filters: `TaskState isNull;ModelId='${this.CurrentModelId}'`,
+          Orders: "CreateTime desc, EquipID asc",
+          Projection: ["EquipID", "BIMID", "BIMLocation", "LocationJson"],
+          PageNumber: pageNum,
+          PageSize: 1000
+        }
+        queryEquip(params, res => {
+          this.deviceList = res.Content
+          resolve();
+        });
+      });
+      // queryEquip(params, res => {
+      //   this.deviceList = this.deviceList.concat(res.Content)
+      //   if (res.Total / (res.PageSize * res.PageNumber) > 1) {
+      //     this.getUnverificationDevice(res.PageNumber + 1)
+      //   } else { }
+      // });
+    },
     // canvas 获取焦点
     focus() {
       document.getElementById(`floorCanvas${this.id}`).focus()
@@ -132,6 +175,9 @@ export default {
     saveSvg() {
       this.view.saveSceneSvg(`${this.floor}.svg`, 6400, 4800);
     },
+    saveJson() {
+      this.view.saveFloorJson(`${this.floor}.json`)
+    },
     // 缩放
     scale(val) {
       if (!this.view) {
@@ -142,6 +188,18 @@ export default {
     }
   },
   watch: {
+    isLight: {
+      handler(newValue, oldValue) {
+        if(newValue){//高亮显示未验证的区块
+          this.deviceList = []
+          this.highLightPoint()
+        } else {
+          this.view.scene.spaceList.forEach(item => {
+            item.highLightFlag = false
+          })
+        }
+      }
+    },
     CurrentModelId: {
       handler(newName, oldName) {
         if (newName) {

+ 1 - 1
src/components/dialogs/list/firm.vue

@@ -22,7 +22,7 @@
                 <el-radio v-model="radio" :label="scope.row">{{scope.row.venderName || "--"}}</el-radio>
               </template>
             </el-table-column>
-            <el-table-column prop="brand" label="品牌" header-align='center'></el-table-column>
+            <el-table-column prop="brandName" label="品牌" header-align='center'></el-table-column>
             <el-table-column prop="name" label="型号" header-align='center'></el-table-column>
             <el-table-column label="技术参数" header-align='center'>
               <template slot-scope="scope">

+ 9 - 4
src/components/ledger/handsontables/assets.vue

@@ -525,6 +525,7 @@ export default {
         columnSorting: true, //添加排序
         sortIndicator: true, //添加排序
         renderAllRows: true,
+        // observeChanges: false, //启用observeChanges插件
         // colWidths: 200,
         autoColumnSize: true,
         language: "zh-CN",
@@ -584,7 +585,7 @@ export default {
     },
     // 更新
     handleUpdataTable(changeData, source) {
-      if (!this.onlyRead) {
+      if (!this.onlyRead && source != 'ObserveChanges.change') {
         if (changeData) {
           let trimmedArr = this.trimmedRows();
           let param = handsonUtils.getParam(changeData, source, this.hot, trimmedArr);
@@ -903,13 +904,17 @@ export default {
     },
     //选择型号修改
     firmChange(data) {
-      tools.setDataForKey(this.tableData[this.row], "DPManufacturerID", data.venderId)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Brand", data.brand)
+      tools.setDataForKey(this.tableData[this.row], "DPManufacturerID", data.venderId)//生产商ID
+      tools.setDataForKey(this.tableData[this.row], "DPBrandID", data.brandId)//品牌ID
+      tools.setDataForKey(this.tableData[this.row], "DPSpecificationID", data.specificationId)//型号ID
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Brand", data.brandName)
       tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Specification", data.name)
       this.handleUpdataTable(
         [
           [this.row, "DPManufacturerID", null, data.venderId],
-          [this.row, "LedgerParam.EquipManufactor.Brand", null, data.brand],
+          [this.row, "DPBrandID", null, data.brandId],
+          [this.row, "DPSpecificationID", null, data.specificationId],
+          [this.row, "LedgerParam.EquipManufactor.Brand", null, data.brandName],
           [this.row, "LedgerParam.EquipManufactor.Specification", null, data.name]
         ],
         "edit"

+ 9 - 4
src/components/ledger/handsontables/device.vue

@@ -482,6 +482,7 @@ export default {
         columnSorting: true, //添加排序
         sortIndicator: true, //添加排序
         renderAllRows: true,
+        // observeChanges: false, //启用observeChanges插件
         // colWidths: 200,
         autoColumnSize: true,
         language: "zh-CN",
@@ -541,7 +542,7 @@ export default {
     },
     // 更新
     handleUpdataTable(changeData, source) {
-      if (!this.onlyRead) {
+      if (!this.onlyRead && source != 'ObserveChanges.change') {
         if (changeData) {
           let trimmedArr = this.trimmedRows();
           let param = handsonUtils.getParam(changeData, source, this.hot, trimmedArr);
@@ -860,13 +861,17 @@ export default {
     },
     //选择型号修改
     firmChange(data) {
-      tools.setDataForKey(this.tableData[this.row], "DPManufacturerID", data.venderId)
-      tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Brand", data.brand)
+      tools.setDataForKey(this.tableData[this.row], "DPManufacturerID", data.venderId)//生产商ID
+      tools.setDataForKey(this.tableData[this.row], "DPBrandID", data.brandId)//品牌ID
+      tools.setDataForKey(this.tableData[this.row], "DPSpecificationID", data.specificationId)//型号ID
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Brand", data.brandName)
       tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Specification", data.name)
       this.handleUpdataTable(
         [
           [this.row, "DPManufacturerID", null, data.venderId],
-          [this.row, "LedgerParam.EquipManufactor.Brand", null, data.brand],
+          [this.row, "DPBrandID", null, data.brandId],
+          [this.row, "DPSpecificationID", null, data.specificationId],
+          [this.row, "LedgerParam.EquipManufactor.Brand", null, data.brandName],
           [this.row, "LedgerParam.EquipManufactor.Specification", null, data.name]
         ],
         "edit"

+ 56 - 23
src/components/ledger/handsontables/system.vue

@@ -32,7 +32,20 @@
     <details-dialog :iframeSrc="iframeSrc" v-if="myDialog.details" :dialog="myDialog"></details-dialog>
     <system-relevance @close="reset" :id="systemId" :dialog="myDialog"></system-relevance>
     <!-- 不支持的输入方式 -->
-    <editSysfloor ref="editFloor" @handleClickUpdate="handleClickUpdate"></editSysfloor>
+    <el-dialog title="临时维护信息点" :visible.sync="myDialog.update" @close="handleCloseUpdate" width="670px">
+      <el-row>
+        该信息点未定义对应组件,现在维护数据不确定后续是否可用。如确实需要维护,请点击<el-link @click="updateInputShow = true" type="primary" :underline="false">继续维护</el-link>。
+      </el-row>
+      <el-row style="margin-top:20px;" v-show="updateInputShow">
+        <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 8}" placeholder="请输入内容" v-model="updateInput"></el-input>
+      </el-row>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="myDialog.update = false">取 消</el-button>
+        <el-button type="primary" @click="handleClickUpdate">确 认</el-button>
+      </span>
+    </el-dialog>
+    <!-- 关联楼层 -->
+    <editSysfloor ref="editFloor" @relateSuccess="relateSuccess"></editSysfloor>
     <!-- 新增系统 -->
     <el-dialog title="确定新增系统的类型" :visible.sync="myDialog.addDevice" width="30%">
       <el-row>
@@ -48,7 +61,7 @@
 import {
   BeatchQueryParam,
   getDataDictionary,
-  queryLinkSys,
+  querySysLinkBuild,
   updateGeneralSys,
   deleteGeneralSys
 } from "@/api/scan/request"
@@ -189,17 +202,24 @@ export default {
       this.loading = true
       if (!!this.mess.deviceId) {
         let param = {
-          PageSize: this.page.size,
-          Orders: "createTime desc, SysID desc",
-          PageNumber: this.page.currentPage,
-          Filters: `category='${this.mess.deviceId}'`
+          data: {
+            PageSize: this.page.size,
+            Orders: "createTime desc, SysID desc",
+            PageNumber: this.page.currentPage,
+            Filters: `category='${this.mess.deviceId}'`
+          }
         }
         if (this.mess.buildId == "noKnow") {
-          param.Filters += `;buildingId isNull`
+          param.buildingId = 1;
         } else if (this.mess.buildId && this.mess.buildId != "all") {
-          param.Filters += `;buildingId='${this.mess.buildId}'`
+          param.buildingId = this.mess.buildId;
+        }
+        if (this.mess.floorId == "noKnow") {
+          param.floorId = 1;
+        } else if (this.mess.floorId && this.mess.floorId != "all") {
+          param.floorId = this.mess.floorId;
         }
-        queryLinkSys(param, res => {
+        querySysLinkBuild(param, res => {
           this.loading = false;
           _this.tableData = res.Content;
           _this.copyMain = tools.deepCopy(res.Content);
@@ -284,7 +304,7 @@ export default {
       }
       if (this.showType == "all") {
         data.splice(3, 0, {
-          data: "sysInBuildFloor",
+          data: "BuildingFloorInfoList",
           renderer: text.sysInBuildFloor,
           readOnly: this.onlyRead
         })
@@ -341,7 +361,7 @@ export default {
                         item,
                         head.Path,
                         // child.error ? "表号功能号格式错误" : "表号功能号不存在"
-                        child.error ? child.value? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
+                        child.error ? child.value ? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
                       );
                     }
                   });
@@ -373,6 +393,7 @@ export default {
         columnSorting: true, //添加排序
         sortIndicator: true, //添加排序
         renderAllRows: true,
+        // observeChanges: false, //启用observeChanges插件
         // colWidths: 200,
         autoColumnSize: true,
         language: "zh-CN",
@@ -431,7 +452,7 @@ export default {
       }
     },
     handleUpdataTable(changeData, source) {
-      if (!this.onlyRead) {
+      if (!this.onlyRead && source != 'ObserveChanges.change') {
         if (changeData) {
           let trimmedArr = this.trimmedRows();
           let param = handsonUtils.getParam(changeData, source, this.hot, trimmedArr);
@@ -517,7 +538,7 @@ export default {
           // this.$message("开发中...")
           this.$router.push({
             path: "/ledger/systemDetail",
-            query: { SysID: infos.SysID, Name: infos.SysLocalName || infos.SysName, SysType:infos.Category }
+            query: { SysID: infos.SysID, Name: infos.SysLocalName || infos.SysName, SysType: infos.Category }
           })
           return false
         //设备二维码图片
@@ -535,25 +556,37 @@ export default {
             this.myDialog.relevance = true
           }
           return false
+        case 'BuildingFloorInfoList':
+          this.$refs.editFloor.showDialog(this.tableData[row.row]);
+          return false
         default:
           break;
       }
       if (!this.onlyRead && showTools.InputModeArr.indexOf(inputMode) == '-1') {
-        // this.updateInfoPoint = val
-        // this.updateInput = tools.dataForKey(this.tableData[row.row], val)
-        // console.log("this is ",this.tableData[row.row])
-        // let floor = tools.dataForKey(this.tableData[row.row], val);
-        this.$refs.editFloor.showDialog(this.tableData[row.row]);
+        this.updateInfoPoint = val
+        this.updateInput = tools.dataForKey(this.tableData[row.row], val)
+        this.myDialog.update = true
       }
     },
+    //关闭临时维护弹窗回调
+    handleCloseUpdate() {
+      this.updateInputShow = false
+      this.updateInfoPoint = ''
+      this.updateInput = ''
+    },
     //更新临时维护信息点
     handleClickUpdate() {
       // this.$message("更新成功");
-      // tools.setDataForKey(this.tableData[this.row], this.updateInfoPoint, this.updateInput)
-      // this.handleUpdataTable([[this.row, this.updateInfoPoint, null, this.updateInput]], "edit")
-      // this.updateInputShow = false
-      // this.myDialog.update = false
-      // this.updateInput = ''
+      tools.setDataForKey(this.tableData[this.row], this.updateInfoPoint, this.updateInput)
+      this.handleUpdataTable([[this.row, this.updateInfoPoint, null, this.updateInput]], "edit")
+      this.updateInputShow = false
+      this.myDialog.update = false
+      this.updateInput = ''
+    },
+    //关联建筑楼层成功
+    relateSuccess(data) {
+      this.getTableData()
+      // tools.setDataForKey(this.tableData[this.row], "BuildingFloorInfoList", data)
     },
     //获取被筛选掉的行号
     trimmedRows() {

+ 94 - 0
src/components/ledger/lib/buildfloorCascader.vue

@@ -0,0 +1,94 @@
+<template>
+  <el-cascader v-model="value" :options="options" :props="props" clearable ref="elCascader" @remove-tag="removeTag"></el-cascader>
+</template>
+<script>
+import { buildingQuery } from "@/api/scan/request";
+export default {
+  data() {
+    return {
+      value: [],
+      props: {
+        multiple: true,
+        checkStrictly: true,
+        value: 'BuildID',
+        label: 'BuildLocalName',
+        children: 'Floor'
+      },
+      options: []
+    }
+  },
+  props: {
+    SysID: {
+      default: ''
+    }
+  },
+  methods: {
+    getCascader() {
+      let param = {
+        Cascade: [
+          { Name: "floor", Orders: "FloorSequenceID desc" }
+        ],
+        Orders: "BuildLocalName asc",
+        PageNumber: 1,
+        PageSize: 50
+      }
+      buildingQuery(param, res => {
+        res.Content.map(t => {
+          if (t.Floor && t.Floor.length) {
+            t.Floor = t.Floor.map(item => {
+              if (item.FloorID == this.FloorID) return
+              item.BuildID = item.FloorID
+              item.BuildLocalName = item.FloorLocalName || item.FloorName
+              return item
+            }).filter(it => it)
+          }
+        })
+        this.options = res.Content
+      })
+    },
+    getSelectedNodes() {
+      let nodes = this.$refs.elCascader.getCheckedNodes();
+      let arr = [], flag = false, brr = [];
+      if (nodes.length) {
+        nodes.map(t => {
+          let obj = {
+            BuildName: t.pathLabels[0],
+            BuildID: t.path[0]
+          }
+          if (t.path.length > 1) {
+            obj.FloorName = t.pathLabels[1]
+            obj.FloorID = t.path[1]
+          } else {
+            flag = true;
+          }
+          arr.push(obj);
+        })
+        if (flag) {
+          for (let i = 0; i < arr.length; i++) {
+            for (let j = 0; j < arr.length; j++) {
+              if (!arr[i].FloorID && arr[j].FloorID && arr[i].BuildID == arr[j].BuildID) {
+                brr.push(i)
+              }
+            }
+          }
+          arr = arr.map((t, i) => {
+            if (brr.indexOf(i) > -1) {
+              return undefined;
+            }
+            return t;
+          }).filter(item => item);
+        }
+      }
+      return arr;
+    },
+    removeTag(){
+      console.log(arguments)
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+.el-cascader {
+  width: 100%;
+}
+</style>

+ 46 - 22
src/components/ledger/lib/editSysFloor.vue

@@ -1,9 +1,9 @@
 <template>
   <el-dialog title="所属建筑楼层" :visible.sync="connectDialogVis" width="50%" id="messageDialog">
     <el-row>
-      <div style="line-height:32px;">添加{{floor.SysLocalName}}所属建筑楼层 : </div>
+      <div style="line-height:32px;">添加{{system.SysLocalName}}所属建筑楼层 : </div>
       <div style="width:70%">
-        <bfCascader ref="bfCascader" :FloorID="floor.FloorID"></bfCascader>
+        <bfCascader ref="bfCascader" :SysID="system.SysID"></bfCascader>
       </div>
     </el-row>
     <span slot="footer" class="dialog-footer">
@@ -13,32 +13,35 @@
   </el-dialog>
 </template>
 <script>
-import bfCascader from '@/components/ready/buildfloor/buildfloorCascader'
-import { createRelationInFloor } from "@/api/scan/request";
+import bfCascader from './buildfloorCascader'
+import { sysRelateBuild, sysRelateFloor } from "@/api/scan/request";
+import { resolve } from 'q';
 export default {
   data() {
     return {
       buildName: '',
       connectDialogVis: false,
-      floor: {}
+      system: {}
     }
   },
   components: {
     bfCascader
   },
   methods: {
-    showDialog(floor=null) {
-      if(floor){
-        this.floor = floor
-      }
-      this.connectDialogVis = true
+    showDialog(system) {
+      this.system = system;
+      this.connectDialogVis = true;
       this.$nextTick(() => {
         this.$refs.bfCascader.getCascader()
-        let arr = this.floor.FloorThroughList || [];
+        let arr = this.system.BuildingFloorInfoList || [];
         let value = []
         if (arr.length) {
           arr.map(t => {
-            value.push([t.BuildID, t.FloorID])
+            if (t.FloorID) {
+              value.push([t.BuildID, t.FloorID]);
+            } else {
+              value.push([t.BuildID])
+            }
           })
         }
         this.$refs.bfCascader.value = value
@@ -46,25 +49,46 @@ export default {
     },
     save() {
       let arr = this.$refs.bfCascader.value;
-      let param = {
-        FloorId: this.floor.FloorID,
-        FloorOtherIdList: []
-      }
+      let buildIds = [], floorIds = [];
       arr.map(t => {
-        param.FloorOtherIdList.push(t[1])
+        if (buildIds.indexOf(t[0]) < 0) {
+          buildIds.push(t[0]);
+        }
+        if (t.length > 1 && floorIds.indexOf(t[1]) < 0) {
+          floorIds.push(t[1]);
+        }
       })
-      // createRelationInFloor(param, res => {
+      let buildPa = {
+        SysId: this.system.SysID,
+        BuildingIdList: buildIds
+      }
+      let floorPa = {
+        SysId: this.system.SysID,
+        FloorIdList: floorIds
+      }
+      let promise1 = new Promise((resolve, reject) => {
+        sysRelateBuild(buildPa, res => {
+          resolve(res);
+        })
+      })
+      let primise2 = new Promise((resolve, reject) => {
+        sysRelateFloor(floorPa, res => {
+          resolve(res);
+        })
+      })
+      let buildFloor = this.$refs.bfCascader.getSelectedNodes();
+      Promise.all([promise1, primise2]).then(res => {
         this.connectDialogVis = false;
-        this.$message.success('关联成功');
-        this.$emit('handleClickUpdate')
-      // })
+        this.$message.success("关联成功");
+        this.$emit('relateSuccess', buildFloor);
+      })
     }
   }
 }
 </script>
 <style lang="less" scoped>
 #messageDialog {
-  .el-row{
+  .el-row {
     height: 50px;
     max-height: 200px;
     overflow-y: auto;

+ 227 - 209
src/framework/components/messagesever/index.vue

@@ -2,7 +2,7 @@
  * @Author: zhangyu
  * @Date: 2019-08-26 15:22:13
  * @Info: 
- * @LastEditTime: 2019-10-31 14:38:27
+ * @LastEditTime: 2019-11-13 15:46:29
  -->
 <template>
   <div class="notification-box" v-clickOutside="handleClose" @click="handleClickRead">
@@ -12,7 +12,9 @@
     <transition name="el-fade-in-linear">
       <div v-show="noticeListShow" @click.stop="" class="noticeBox">
         <ul class="noticeTab">
-          <li class="noticeTab_item">消息通知<!-- <span class="unread_num">1</span> --></li>
+          <li class="noticeTab_item">消息通知
+            <!-- <span class="unread_num">1</span> -->
+          </li>
         </ul>
         <div class="noticeList_scroll">
           <el-scrollbar style="height:100%;">
@@ -20,14 +22,16 @@
               <li class="noticeList_item" v-for="item in messageList" :key="item.Id" :title="item.Content.Message?item.Content.Message:''">
                 <div class="noticeItem_box">
                   <div class="noticeItem_text">
-                    <i :class="iconClassMap[item.Type]?iconClassMap[item.Type]:'msg-icon el-icon-info info-color'"></i>
+                    <i :class="iconClassMap[item.Type]?iconClassMap[item.Type]:'msg-icon el-icon-warning warning-color'"></i>
                     <p><span>{{`【${moduleMap[item.Module]?moduleMap[item.Module]:item.Module}】 `}}</span>{{item.Title?item.Title:""}}</p>
                   </div>
-                  <div class="noticeItem_time">{{item.CreateTime}}
-                    <el-link v-for="(btn, index) in item.Content.ButtonList?item.Content.ButtonList:[]" style="float:right;font-size:12px;margin-left:5px;" type="primary"
-                    :key="index"
-                    :href="`/image-service/common/file_get?systemId=revit&key=${btn.Url}`"
-                    :download="btn.FileName?btn.FileName:''">{{btn.Name?btn.Name:""}}</el-link>
+                  <div class="noticeItem_time">
+                    <span class="proname">{{item.Project[0].ProjLocalName || ''}}</span>
+                    {{item.CreateTime}}
+                    <el-link v-for="(btn, index) in item.Content.ButtonList?item.Content.ButtonList:[]"
+                      style="float:right;font-size:12px;margin-left:5px;" type="primary" :key="index"
+                      :href="`/image-service/common/file_get?systemId=revit&key=${btn.Url}`" :download="btn.FileName?btn.FileName:''">
+                      {{btn.Name?btn.Name:""}}</el-link>
                   </div>
                 </div>
               </li>
@@ -66,8 +70,8 @@ import { MQTT_SERVICE, MQTT_USERNAME, MQTT_PASSWORD } from './mqSetting'
 import { messgeCount, messgeQuery, messgeUpdateState } from '@/api/msgsever'
 
 export default {
-  components:{
-    
+  components: {
+
   },
   data() {
     return {
@@ -88,10 +92,9 @@ export default {
         "Warning": "msg-icon el-icon-warning warning-color",
         "Info": "msg-icon el-icon-info info-color",
       },
-      showTools: false
     }
   },
-  created () {
+  created() {
     this.connect()
   },
   mounted() {
@@ -100,13 +103,21 @@ export default {
     Bus.$on('messageListUpdate', message => {
       this.getMessageList()
     })
+    Bus.$on('getUnreadCountUpdate', message => {
+      this.getUnreadCount()
+    })
   },
   computed: {
     ...mapGetters('layout', ['userInfo', 'projectId', 'projects', 'userId'])
   },
-  methods:{
-    getMessageList(){//获取消息列表(最新10条)
+  methods: {
+    getMessageList() {//获取消息列表(最新10条)
       let params = {
+        Cascade: [
+          {
+            Name: "project"
+          }
+        ],
         Filters: `UserId='${this.userId}'`,
         Orders: "CreateTime desc, Id asc",
         PageNumber: 1,
@@ -116,7 +127,7 @@ export default {
         this.messageList = res.Content
       })
     },
-    getUnreadCount(){//获取未读消息的数量
+    getUnreadCount() {//获取未读消息的数量
       let params = {
         Filters: `Read=false;UserId='${this.userId}'`
       }
@@ -124,17 +135,17 @@ export default {
         this.unreadNum = res.Count
       })
     },
-    setAllRead(){//将当前角色消息全部置为已读
-      if(this.userId){
-        messgeUpdateState({Read:true,UserId:this.userId}, res => {this.unreadNum = 0})
+    setAllRead() {//将当前角色消息全部置为已读
+      if (this.userId) {
+        messgeUpdateState({ Read: true, UserId: this.userId }, res => { this.unreadNum = 0 })
       }
     },
-    handleClose(e){//关闭消息列表
+    handleClose(e) {//关闭消息列表
       this.noticeListShow = false
     },
     handleClickRead() {//点击消息铃铛
-      this.noticeListShow?this.noticeListShow=false:this.noticeListShow=true
-      if(this.noticeListShow){
+      this.noticeListShow ? this.noticeListShow = false : this.noticeListShow = true
+      if (this.noticeListShow) {
         this.setAllRead()//将当前角色消息全部置为已读
       }
     },
@@ -174,7 +185,7 @@ export default {
     },
     //断开连接
     disconnect() {
-      this.client.disconnect(function() {
+      this.client.disconnect(function () {
         console.log("连接已断开!");
       })
     },
@@ -182,7 +193,7 @@ export default {
     send(destination, message, headers = {}) {
       this.client.send(destination, headers, JSON.stringify(message))
     },
-    
+
     handleClickConnectMQ() {//连接MQ
       this.connect()
     },
@@ -193,218 +204,225 @@ export default {
       this.unsubscribe()
     },
     handleClickSendMessage() {//发送消息
-      this.send('/topic/datacenter.broadcast',this.sendMessage)
+      this.send('/topic/datacenter.broadcast', this.sendMessage)
     },
-    allDetails(){
-      console.log(493498384938)
+    allDetails() {
       this.noticeListShow = false;
-      this.$router.push({path:"/message/allDetails"});
+      this.$router.push({ path: "/allDetails" });
     }
   }
 }
 </script>
 
 <style lang="scss" scoped>
-  .notification-box{
-    width: 100%;
-    height: 100%;
-    position: relative;
-    padding: 16px 10px 10px;
-    box-sizing: border-box;
-    color: #79869a;
-    cursor: pointer;
-    .noticeBox{
-      position: absolute;
-      top: 50px;
-      left: 50%;
-      margin-left: -220px;
-      cursor: auto;
-      z-index: 1000;
+.notification-box {
+  width: 100%;
+  height: 100%;
+  position: relative;
+  padding: 16px 10px 10px;
+  box-sizing: border-box;
+  color: #79869a;
+  cursor: pointer;
+  .noticeBox {
+    position: absolute;
+    top: 50px;
+    left: 50%;
+    margin-left: -220px;
+    cursor: auto;
+    z-index: 1000;
+    text-align: left;
+    width: 272px;
+    height: 362px;
+    box-shadow: 0 1px 6px 0 #ccc;
+    color: #333;
+    background: #fff;
+    overflow: visible !important;
+  }
+  .noticeBox::before {
+    content: "";
+    border: solid 7px transparent;
+    border-bottom-color: #fff;
+    display: block;
+    position: absolute;
+    width: 2px;
+    top: -14px;
+    left: 50%;
+    margin-left: 77px;
+    z-index: 0;
+  }
+  .noticeTab {
+    padding: 8px 16px 0;
+    z-index: 10;
+    height: 32px;
+    zoom: 1;
+    box-shadow: 0 -1px 0 0 rgba(0, 0, 0, 0.1) inset;
+    .noticeTab_item {
+      float: left;
+      position: relative;
+      width: 240px;
+      height: 32px;
+      line-height: 32px;
+      padding: 0;
+      margin-right: 0;
+      font-weight: 700;
       text-align: left;
-      width: 272px;
-      height: 362px;
-      box-shadow: 0 1px 6px 0 #ccc;
-      color: #333;
-      background: #fff;
-      overflow: visible!important;
+      cursor: pointer;
+      -webkit-transition: all 0.2s ease-in-out;
+      -o-transition: all 0.2s ease-in-out;
+      transition: all 0.2s ease-in-out;
+      .unread_num {
+        display: inline-block;
+        color: #fff;
+        background-color: #5182e4;
+        height: 14px;
+        padding: 0 2px;
+        line-height: 14px;
+        text-align: center;
+        border-radius: 2px;
+        font-size: 12px;
+        padding: 0 3px;
+        font-family: Arial;
+        -webkit-transform: scale(0.85);
+        -ms-transform: scale(0.85);
+        -o-transform: scale(0.85);
+        transform: scale(0.85);
+      }
     }
-    .noticeBox::before {
-      content: '';
-      border: solid 7px transparent;
-      border-bottom-color: #fff;
-      display: block;
-      position: absolute;
-      width: 2px;
-      top: -14px;
-      left: 50%;
-      margin-left: 77px;
-      z-index: 0;
+    .active {
+      box-shadow: 0 -2px 0 0 #5182e4 inset;
     }
-    .noticeTab {
-      padding: 8px 16px 0;
-      z-index: 10;
-      height: 32px;
+  }
+  .noticeList_scroll {
+    height: 282px;
+    /deep/ .el-scrollbar__wrap {
+      overflow-x: hidden;
+    }
+    .noticeList_item {
+      width: 100%;
+      height: auto;
+      position: relative;
+      cursor: pointer;
+      box-sizing: border-box;
+      padding: 12px 16px;
+      -webkit-transition: all 0.2s ease-in-out;
+      -o-transition: all 0.2s ease-in-out;
+      transition: all 0.2s ease-in-out;
       zoom: 1;
-      box-shadow: 0 -1px 0 0 rgba(0, 0, 0, 0.1) inset;
-      .noticeTab_item {
+      .noticeItem_box {
         float: left;
         position: relative;
-        width: 240px;
-        height: 32px;
-        line-height: 32px;
-        padding: 0;
-        margin-right: 0;
-        font-weight: 700;
-        text-align: left;
-        cursor: pointer;
-        -webkit-transition: all 0.2s ease-in-out;
-        -o-transition: all 0.2s ease-in-out;
-        transition: all 0.2s ease-in-out;
-        .unread_num {
-          display: inline-block;
-          color: #fff;
-          background-color: #5182E4;
-          height: 14px;
-          padding: 0 2px;
-          line-height: 14px;
-          text-align: center;
-          border-radius: 2px;
-          font-size: 12px;
-          padding: 0 3px;
-          font-family: Arial;
-          -webkit-transform: scale(0.85);
-          -ms-transform: scale(0.85);
-          -o-transform: scale(0.85);
-          transform: scale(0.85);
-        }
-      }
-      .active {
-        box-shadow: 0 -2px 0 0 #5182E4 inset;
-      }
-    }
-    .noticeList_scroll {
-      height: 282px;
-      /deep/ .el-scrollbar__wrap {
-        overflow-x: hidden;
-      }
-      .noticeList_item {
         width: 100%;
-        height: auto;
-        position: relative;
-        cursor: pointer;
-        box-sizing: border-box;
-        padding: 12px 16px;
-        -webkit-transition: all 0.2s ease-in-out;
-        -o-transition: all 0.2s ease-in-out;
-        transition: all 0.2s ease-in-out;
-        zoom: 1;
-        .noticeItem_box {
-          float: left;
+        .noticeItem_text {
+          color: rgba(10, 18, 32, 0.87);
+          font-weight: 700;
+          padding-left: 18px;
+          text-indent: -6px;
           position: relative;
-          width: 100%;
-          .noticeItem_text {
-            color: rgba(10, 18, 32, 0.87);
-            font-weight: 700;
-            padding-left: 18px;
-            text-indent: -6px;
-            position: relative;
-            font-size: 12px;
-            line-height: 17px;
-            -webkit-transition: all 0.2s ease-in-out;
-            -o-transition: all 0.2s ease-in-out;
-            transition: all 0.2s ease-in-out;
-            .msg-icon{
-              position: absolute;
-              top: 2.5px;
-              left: 6px;
-            }
-            p {
-              word-break: break-all;
-            }
+          font-size: 12px;
+          line-height: 17px;
+          -webkit-transition: all 0.2s ease-in-out;
+          -o-transition: all 0.2s ease-in-out;
+          transition: all 0.2s ease-in-out;
+          .msg-icon {
+            position: absolute;
+            top: 2.5px;
+            left: 6px;
           }
-          .noticeItem_time {
-            font-size: 12px;
-            height: 19px;
-            line-height: 19px;
-            color: rgba(10, 18, 32, 0.46);
-            margin-top: 4px;
-            padding-left: 18px;
+          p {
+            word-break: break-all;
+          }
+        }
+        .noticeItem_time {
+          font-size: 12px;
+          height: 19px;
+          line-height: 19px;
+          color: rgba(10, 18, 32, 0.46);
+          margin-top: 4px;
+          padding-left: 18px;
+          .proname{
+            float: left;
+            display: block;
+            width: 80px;
+            overflow: hidden;
+            white-space: nowrap;
+            text-overflow: ellipsis;
           }
         }
-      }
-      .noticeList_item:hover {
-        background-color: #F5F7F7;
-      }
-      .noticeList_item:after {
-        content: "";
-        display: block;
-        height: 0;
-        clear:both;
-        visibility: hidden;
-      }
-      .noticeList_item:before {
-        position: absolute;
-        right: 0;
-        bottom: 0;
-        left: 0;
-        height: 1px;
-        padding: 0 16px;
-        background-color: #ebebeb;
-        content: "";
-        background-clip: content-box;
       }
     }
-    .notice_operate {
-      height: 40px;
-      line-height: 20px;
-      padding: 10px 16px;
-      box-sizing: border-box;
-      background-color: rgba(242, 243, 245, 0.48);
-      box-shadow: inset 0 1px 0 0 rgba(10, 18, 32, 0.06);
-      zoom: 1;
-      .readAll {
-        float: left;
-        cursor: pointer;
-        -webkit-transition: all 0.2s ease-in-out;
-        -o-transition: all 0.2s ease-in-out;
-        transition: all 0.2s ease-in-out;
-      }
-      .readAll:hover {
-        text-decoration: underline;
-      }
-      .seeAll {
-        float: right;
-        color: #5182e4;
-        cursor: pointer;
-        font-weight: 700;
-      }
-      .seeAll:hover {
-        text-decoration: underline;
-      }
+    .noticeList_item:hover {
+      background-color: #f5f7f7;
     }
-    .el-icon-message-solid{
-      font-size: 22px;
+    .noticeList_item:after {
+      content: "";
+      display: block;
+      height: 0;
+      clear: both;
+      visibility: hidden;
     }
-    /deep/ .el-badge__content{
-      height: 16px;
-      line-height: 16px;
-      border: 1px solid transparent;
+    .noticeList_item:before {
+      position: absolute;
+      right: 0;
+      bottom: 0;
+      left: 0;
+      height: 1px;
+      padding: 0 16px;
+      background-color: #ebebeb;
+      content: "";
+      background-clip: content-box;
     }
   }
-  .notification-box:hover{
-    color: #d3d8e2;
-    background-color: #3f4f62;
-  }
-  .success-color{
-    color: #67C23A;
-  }
-  .error-color{
-    color: #F56C6C;
+  .notice_operate {
+    height: 40px;
+    line-height: 20px;
+    padding: 10px 16px;
+    box-sizing: border-box;
+    background-color: rgba(242, 243, 245, 0.48);
+    box-shadow: inset 0 1px 0 0 rgba(10, 18, 32, 0.06);
+    zoom: 1;
+    .readAll {
+      float: left;
+      cursor: pointer;
+      -webkit-transition: all 0.2s ease-in-out;
+      -o-transition: all 0.2s ease-in-out;
+      transition: all 0.2s ease-in-out;
+    }
+    .readAll:hover {
+      text-decoration: underline;
+    }
+    .seeAll {
+      float: right;
+      color: #5182e4;
+      cursor: pointer;
+      font-weight: 700;
+    }
+    .seeAll:hover {
+      text-decoration: underline;
+    }
   }
-  .warning-color{
-    color: #E6A23C;
+  .el-icon-message-solid {
+    font-size: 22px;
   }
-  .info-color{
-    color: #909399;
+  /deep/ .el-badge__content {
+    height: 16px;
+    line-height: 16px;
+    border: 1px solid transparent;
   }
+}
+.notification-box:hover {
+  color: #d3d8e2;
+  background-color: #3f4f62;
+}
+.success-color {
+  color: #67c23a;
+}
+.error-color {
+  color: #f56c6c;
+}
+.warning-color {
+  color: #e6a23c;
+}
+.info-color {
+  color: #909399;
+}
 </style>

+ 132 - 95
src/framework/components/messagesever/msgAllDetails.vue

@@ -1,28 +1,44 @@
-<template>
+  <template>
   <div class="box">
     <div class="condition">
-      <div class="main" :style="tableData && tableData.length?'height: calc(100% - 96px);':'height: calc(100% - 46px);'">
-        <!-- <el-table ref="multipleTable" :data="tableData" v-loading='loading' stripe height="100%" :header-cell-style="headerStyle"> -->
-        <el-table ref="multipleTable" v-loading='loading' stripe :header-cell-style="headerStyle" :data="tableData">
+      <div class="main" :style="tableData && tableData.length?'height: calc(100% - 50px);':'height: calc(100% - 46px);'">
+        <el-table ref="multipleTable" :data="tableData" v-loading='loading' stripe height="100%" :header-cell-style="headerStyle"
+          @expand-change="changeMessageState">
           <el-table-column type="selection" width="55"></el-table-column>
-          <el-table-column prop="messageModule" label="模块" width="200"></el-table-column>
-          <el-table-column prop="messageContent" label="消息内容" width="600"></el-table-column>
-          <el-table-column prop="messageTime" label="消息时间">
+          <el-table-column width="25">
+            <template slot-scope="scope">
+              <el-badge class="item" type="warning" is-dot v-if="!scope.row.Read"></el-badge>
+            </template>
+          </el-table-column>
+          <el-table-column prop="Title" label="标题内容" min-width="300" show-overflow-tooltip></el-table-column>
+          <el-table-column label="项目">
+            <template slot-scope="scope">
+              {{ scope.row.Project[0].ProjLocalName }}
+            </template>
+          </el-table-column>
+          <el-table-column label="模块" width="200">
+            <template slot-scope="scope">
+              {{ moduleMap[scope.row.Module]?moduleMap[scope.row.Module]:scope.row.Module }}
+            </template>
+          </el-table-column>
+          <el-table-column prop="CreateTime" label="消息时间">
           </el-table-column>
           <el-table-column label="消息类型">
             <template slot-scope="scope">
-       <i :class="iconClassMap[scope.row.messageType]?iconClassMap[scope.row.messageType]:'msg-icon el-icon-info info-color'"></i>
-      </template>
-            
+              <div>
+                <i :class="iconClassMap[scope.row.Type]?iconClassMap[scope.row.Type]:'msg-icon el-icon-warning warning-color'" style="font-size:14px;"></i>
+                <span>{{ typeMap[scope.row.Type]?typeMap[scope.row.Type]:scope.row.Type }}</span>
+              </div>
+            </template>
           </el-table-column>
-            <el-table-column type="expand">
-            <!-- <template slot-scope="props">
-              <el-form label-position="left" label-width="auto" inline class="demo-table-expand" v-if="props.row.ComponentCount && props.row.ComponentCount.length">
-                <el-form-item v-for="item in props.row.ComponentCount?props.row.ComponentCount:[]" :key="item.code" :label="`${item.name}:`">
-                  <span>{{ item.count }}</span>
-                </el-form-item>
-              </el-form>
-            </template> -->
+          <el-table-column type="expand">
+            <template slot-scope="scope">
+              <p>{{ scope.row.Content.Message }}</p>
+              <el-link v-for="(btn, index) in scope.row.Content.ButtonList" style="float:left;font-size:12px;color:white;width:"
+                :key="index" :href="`/image-service/common/file_get?systemId=revit&key=${btn.Url}`" :download="btn.FileName?btn.FileName:''">
+                {{btn.Name}}
+              </el-link>
+            </template>
           </el-table-column>
           <template slot="empty">
             <div style="height: 60%;transform: translateY(50%);">
@@ -32,34 +48,23 @@
           </template>
         </el-table>
       </div>
-      <div class=footer>
-        <el-pagination class="right">
-        </el-pagination>
-        <!-- <el-pagination
-          class="right"
-          v-show="tableData && tableData.length"
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-          :current-page="page.pageNumber"
-          :page-sizes="page.pageSizes"
-          :page-size="page.pageSize"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="page.total">
-        </el-pagination> -->
-      </div>
+      <el-pagination class="right" v-show="tableData && tableData.length" @size-change="handleSizeChange" @current-change="handleCurrentChange"
+        :current-page="page.pageNumber" :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper"
+        :total="page.total">
+      </el-pagination>
     </div>
   </div>
 </template>
 
-<script>
+  <script>
 import { mapGetters } from 'vuex'
-import { messgeCount, messgeQuery, messgeUpdateState } from '@/api/msgsever'
+import { messgeQuery, messgeUpdate } from '@/api/msgsever'
 import Bus from '@/utils/bus.js'
 
 export default {
   data() {
     return {
-      tableData:[],
+      tableData: [],
       loading: false,
       page: {
         pageSize: 50,
@@ -67,11 +72,11 @@ export default {
         pageNumber: 1,
         total: 0
       },
-      headerStyle: {
+      headerStyle: {// 列表样式
         backgroundColor: '#e1e4e5',
         color: '#2b2b2b',
         lineHeight: '30px'
-      }, // 列表样式
+      }, 
       moduleMap: {//消息模块映射
         "Model": "模型文件管理"
       },
@@ -80,52 +85,70 @@ export default {
         "Error": "msg-icon el-icon-error error-color",
         "Warning": "msg-icon el-icon-warning warning-color",
         "Info": "msg-icon el-icon-info info-color",
+      },
+      typeMap: { //消息类型文字映射
+        "Success": "成功",
+        "Error": "错误",
+        "Warning": "警告",
+        "Info": "提醒",
       }
     }
   },
   computed: {
-    ...mapGetters('layout', ['userInfo', 'projectId', 'projects', 'userId'])
-  },
-  created() {
-
+    ...mapGetters('layout', ['userId'])
   },
   mounted() {
-    this.getMessageList()//获取消息列表
-    Bus.$on('messageListUpdate', message => {
-      this.getMessageList()
-    })
-  },
-  watch: {
-    projectId() {
-      this.page.pageNumber = 1
-      this.multipleSelection = []
-    }
+    this.getTableData();
   },
   methods: {
-    getMessageList(){//获取消息列表
+    // 获取列表数据
+    getTableData() {
       let params = {
+        Cascade: [
+          {
+            Name: "project"
+          }
+        ],
         Filters: `UserId='${this.userId}'`,
         Orders: "CreateTime desc, Id asc",
-        PageNumber: 1,
-        PageSize: 50
+        PageNumber: this.page.pageNumber,
+        PageSize: this.page.pageSize
       }
+      this.loading = true;
       messgeQuery(params, res => {
-        this.messageList = res.Content
-        this.messageList.map((item)=>{
-          console.log(item,234232)
-          this.tableData.push({
-            messageModule: this.moduleMap[item.Module],// 模块
-            messageTime: item.CreateTime,// 时间
-            messageType: item.Type,// 类型
-            messageContent: item.Title,// title
-            messageButton: item.ButtonList?item.ButtonList.Name:''// 按钮
-          })
-        })
+        this.tableData = res.Content;
+        this.page.total = res.Total;
+        this.loading = false;
       })
+    },
+    // 切换每页显示数量
+    handleSizeChange(val) {
+      this.page.pageSize = val;
+      this.getTableData();
+    },
+    // 切换页码
+    handleCurrentChange(val) {
+      this.page.pageNumber = val;
+      this.getTableData();
+    },
+    // 更新消息状态:已读、未读
+    changeMessageState(val) {
+      if(!val.Read){
+        val.Read = true;
+        let params = {
+          Content: [{
+            Id: val.Id,
+            Read: true
+          }]
+        }
+        messgeUpdate(params, res => { 
+          Bus.$emit('getUnreadCountUpdate')
+        });// 展开更新为已读状态,未读数量同步变更
+      }
     }
   }
 };
-</script>
+  </script>
 
 <style scoped lang='less'>
 .box {
@@ -136,37 +159,51 @@ export default {
     flex-direction: column;
     border: 1px solid #dfe6ec;
     background: #fff;
-    .main{
+    .main {
       margin-top: 10px;
+      a{
+        text-decoration: none;
+      }
     }
   }
 }
-</style>
-
-<style>
-  .demo-table-expand {
-    font-size: 0;
-  }
-  .demo-table-expand label {
-    width: 90px;
-    color: #99a9bf;
-  }
-  .demo-table-expand .el-form-item {
-    margin-right: 0;
-    margin-bottom: 0;
-    margin-left: 120px;
-    width: 100%;
-  }
-    .success-color{
-    color: #67C23A;
-  }
-  .error-color{
-    color: #F56C6C;
-  }
-  .warning-color{
-    color: #E6A23C;
-  }
-  .info-color{
-    color: #909399;
+.el-badge.item {
+  height: 10px;
+}
+.el-table__expanded-cell {
+  p {
+    margin-left: 40px;
   }
+}
+.el-link {
+  margin: 20px 0 0 40px;
+  background: #409eff;
+  border-radius: 3px;
+  padding: 3px 15px;
+}
+.demo-table-expand {
+  font-size: 0;
+}
+.demo-table-expand label {
+  width: 90px;
+  color: #99a9bf;
+}
+.demo-table-expand .el-form-item {
+  margin-right: 0;
+  margin-bottom: 0;
+  margin-left: 120px;
+  width: 100%;
+}
+.success-color {
+  color: #67c23a;
+}
+.error-color {
+  color: #f56c6c;
+}
+.warning-color {
+  color: #e6a23c;
+}
+.info-color {
+  color: #909399;
+}
 </style>

+ 14 - 10
src/framework/layout/layout-store.js

@@ -63,19 +63,19 @@ export default {
             storage.set(KEY_MENU_SELECTED, val)
         },
         setprojectId: (state, val) => {
-            let cacheInfo = JSON.parse(localStorage.getItem('_sagacloud_admin_store_cacheInfo'))?JSON.parse(localStorage.getItem('_sagacloud_admin_store_cacheInfo')):{}
+            let cacheInfo = JSON.parse(localStorage.getItem('_sagacloud_admin_store_cacheInfo')) ? JSON.parse(localStorage.getItem('_sagacloud_admin_store_cacheInfo')) : {}
             state.projectId = val
             localStorage.setItem('projectId', val)
-            if(cacheInfo[state.userInfo.userName]){
+            if (cacheInfo[state.userInfo.userName]) {
                 cacheInfo[state.userInfo.userName].projectId = val
                 localStorage.setItem('_sagacloud_admin_store_cacheInfo', JSON.stringify(cacheInfo))
             } else {
-                cacheInfo[state.userInfo.userName] = {projectId: val}
+                cacheInfo[state.userInfo.userName] = { projectId: val }
                 localStorage.setItem('_sagacloud_admin_store_cacheInfo', JSON.stringify(cacheInfo))
             }
             storage.set(KEY_PROJECT_SELECTED, val)
-            state.projects.map((item) =>{
-                if(item.id == val) {
+            state.projects.map((item) => {
+                if (item.id == val) {
                     state.secret = item.pwd
                 }
             })
@@ -98,21 +98,21 @@ export default {
                         }
                         state.projects = []
                         if (resp.Projects) {
-                            if(resp.Projects[0] && resp.Projects[0].ProjId) {
+                            if (resp.Projects[0] && resp.Projects[0].ProjId) {
                                 state.projectId = resp.Projects[0].ProjId
-                                state.secret = resp.Projects[0].Secret?resp.Projects[0].Secret:""
+                                state.secret = resp.Projects[0].Secret ? resp.Projects[0].Secret : ""
                             }
                             resp.Projects.forEach(proj =>
                                 state.projects.push({
                                     id: proj.ProjId,
                                     name: proj.ProjLocalName,
-                                    pwd: proj.Secret?proj.Secret:""
+                                    pwd: proj.Secret ? proj.Secret : ""
                                 })
                             )
                         }
                     } else {
                         state.userInfo = null
-                       
+
                     }
                     resolve(resp)
                 })
@@ -120,7 +120,11 @@ export default {
         },
         setBreadcrumb: {
             root: true,
-            handler({ state }, val) {
+            handler({ state, commit }, val) {
+                let label = val[0].label;
+                if (label === "消息中心") {
+                    commit("setSidebarSelected", "message"); // 当进入消息中心页面的时候不选中导航栏
+                }
                 state.breadcrumb = []
                 state.breadcrumb = val
                 storage.set(KEY_PAGE_BRANDCRUMB, val)

+ 9 - 14
src/router/system.js

@@ -85,24 +85,19 @@ const OwnerManage = () =>
     import ('@/views/market/owner/manage')
 
 export default [
-    { path: '/', name: '', component: LayoutMain, children: [{ path: '', name: 'blank', component: Dasboard }] },
+    { 
+        path: '/', 
+        name: '', 
+        component: LayoutMain, 
+        children: [
+            { path: '', name: 'blank', component: Dasboard },
+            { path: 'allDetails', name: "allDetails", component: MsgAllDetails, meta: { keepAlive: false, breadcrumbs: [{ label: '消息中心' }] } }
+        ] 
+    },
     //{ path: '/login', name: 'Login', component: Login },
     { path: '/auth', name: 'auth', component: auth },
     { path: '/noUser', name: 'noUser', component: noUser },
-    // {
-    //     path: '/msgAllDetails',
-    //     name: 'LayoutMain',
-    //     component: MsgAllDetails,
-    // },
     // 业务空间数据导入工具
-    {
-        path: '/message',
-        name: 'LayoutMain',
-        component: LayoutMain,
-        children: [
-            { path: 'allDetails', name: "allDetails", component: MsgAllDetails, meta: { keepAlive: false, breadcrumbs: [{ label: '消息中心' }] } }
-        ]
-    },
     { path: '/dataUtil', name: 'dataUtil', component: LayoutMain, children: [{ path: 'index', component: dataUtil }] },
     // 平台管理
     {

+ 11 - 19
src/utils/handsontable/mainText.js

@@ -102,27 +102,19 @@ const text = {
         td.style.color = "#409EFF";
         td.style.cursor = "pointer";
         if (value instanceof Array && value.length > 0) {
-            if (value.length == 1) {
-                td.innerHTML = !!value[0].infos ? (value[0].infos.SysLocalName || value[0].infos.SysName) : (value[0].SysLocalName || value[0].SysName)
-            } else {
-                let text = ""
-                for (let i = 0; i < value.length; i++) {
-                    if (!!value[i].SysLocalName || !!value[i].SysName) {
-                        if (i == value.length) {
-                            text += value[i].SysLocalName || value[i].SysName
-                        } else {
-                            text = value[i].SysLocalName || value[i].SysName + "、" + text
-                        }
-                    } else {
-                        if (i == value.length) {
-                            text += value[i].infos.SysLocalName || value[i].infos.SysName
-                        } else {
-                            text = value[i].infos.SysLocalName || value[i].infos.SysName + "、" + text
-                        }
-                    }
+            let text = ""
+            for (let i = 0; i < value.length; i++) {
+                if(value[i].BuildID && value[i].FloorID){
+                    text += `${value[i].BuildLocalName || value[i].BuildName}-${value[i].FloorLocalName || value[i].FloorName }、`
+                } else {
+                    text += `${value[i].BuildLocalName || value[i].BuildName}、`
                 }
-                td.innerHTML = text.substring(0, 40) + "..."
             }
+            text = text.substring(0,text.length-1);
+            if(text.length>15){
+                text = text.substring(0,15)+ "...";
+            }
+            td.innerHTML = text;
         } else {
             td.innerHTML = "无所属建筑楼层"
         }

+ 0 - 2
src/views/data_admin/buildTask/addTask/addDeviceTask.vue

@@ -244,7 +244,6 @@ export default {
     },
     //切换页数
     handleCurrentChange(val) {
-      this.page.pageNumber = 1
       this.page.pageNumber = val
       this.getTableData()
     },
@@ -258,7 +257,6 @@ export default {
       }
       createDeviceTask(param, res => {
         this.$message.success("创建成功!")
-        console.log(this.$route.query.newTaskTypes,1234567)
         this.$router.push({ name: "buildTask",query:{ newTaskTypes:this.$route.query.newTaskTypes } })
       })
     }

+ 1 - 1
src/views/ledger/system/index.vue

@@ -6,7 +6,7 @@
     <saga-title :mess="mess"></saga-title>
     <div class="table-main">
       <div class="search-header">
-        <floor-cascader :type="'no'" @change="changeFloor"></floor-cascader>
+        <floor-cascader @change="changeFloor"></floor-cascader>
         <my-cascader ref="cascader" @change="changeDevice"></my-cascader>
       </div>
       <hanson-table @close="close" ref="tableMain"></hanson-table>

+ 1 - 1
src/views/ready/buildfloor/drawGraphy/checkGraphy.vue

@@ -78,7 +78,7 @@ export default {
     handleItemChange(val) {
       let data = {
         FolderId: val[0],
-        Status: '3, 31, 4',
+        Status: '4',
         ProjectId: this.projectId
       };
       request.queryFloorList(data, res => {

+ 27 - 2
src/views/ready/buildfloor/drawGraphy/drawFloor.vue

@@ -33,7 +33,8 @@ export default {
       config: {
         isEdit: false,
         divide: true
-      }
+      },
+      shadeList: []
     };
   },
   props: {
@@ -53,7 +54,7 @@ export default {
   created() {
     this.FloorID = this.$route.query.FloorID;
     if (!this.dialog) {
-      this.getFloorData();
+      this.init();
     }
   },
   mounted() {
@@ -61,6 +62,11 @@ export default {
     this.cadHeight = document.getElementById(`drawFloor${this.id}`).offsetHeight;
   },
   methods: {
+    //
+    init(){
+      this.getFloorData();
+      this.getOtherFloorOutLine();
+    },
     // 初始化canvas
     initGraphy(Id, type) {
       // type=1 => id:模型id
@@ -120,6 +126,25 @@ export default {
         this.initGraphy(this.floorData.StructureInfo.FloorMap, 2)
       })
     },
+    // 获取绑定该模型id的其他楼层轮廓线
+    getOtherFloorOutLine() {
+      let modelid = this.$route.query.modelId;
+      let pa = {
+        Filters: `ModelId='${modelid}'`
+      }
+      this.shadeList = [];
+      floorQuery(pa, res => {
+        res.Content.map(t => {
+          if (t.FloorID != this.FloorID && t.Outline && t.Outline.length) {
+            let line = t.Outline.map(item => {
+              return new SPoint(item.X, item.Y);
+            })
+            this.shadeList.push(line);
+          }
+        });
+        this.drawMainScene.addAllShade(this.shadeList);
+      });
+    },
     // 清空平面图
     clearGraphy() {
       if (this.view) {

+ 2 - 2
src/views/ready/buildfloor/repetitionGraphy.vue

@@ -63,7 +63,7 @@ export default {
         Outline = Outline.map(t => {
           return {
             x: t.x.toFixed(2),
-            y: t.y.toFixed(2),
+            y: -t.y.toFixed(2),
           }
         })
       }
@@ -79,7 +79,7 @@ export default {
     // 取消
     cancel() {
       this.isEdit = false;
-      this.$refs.drawFloor.getFloorData();
+      this.$refs.drawFloor.init();
     },
     // 编辑平面图
     editGraphy() {