Browse Source

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

haojianlong 5 years ago
parent
commit
ea9d9e2b3b

+ 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.383"
     },
     "devDependencies": {
         "ajv": "^6.9.1",

+ 5 - 11
src/api/data_admin/buildTaskApi.js

@@ -23,6 +23,11 @@ export function deleteModelTask(param, success) {
     let url = `${baseUrl}/datacenter/model-scan-task/delete`;
     http.postJson(url, param, success)
 }
+//查询:根据模型空间ID查询设备信息
+export function queryModelDiglog(param, success) {
+    let url = `${baseUrl}/datacenter/model-scan-task/equip-query`;
+    http.postJson(url, param, success)
+}
 //查询模型任务
 export function queryModelTask(param, success) {
     let url = `${baseUrl}/datacenter/model-scan-task/page-query`;
@@ -70,17 +75,6 @@ export function queryDeviceCategory(param, success) {
     let url = `${baseUrl}/datacenter/equip-scan-task/equip-category-query`;
     http.postJson(url, param, success)
 }
-//查询:根据模型空间ID查询设备信息
-export function queryModelDiglog(param, success) {
-    // let query = ''
-    // listId.map(item => {
-    //     query += `listId=${item}&`
-    // })
-    // let url = `${baseUrl}/datacenter/model-scan-task/equip-query?${query}`;
-    // http.postJson(url, param, success)
-    let url = `${baseUrl}/datacenter/model-scan-task/equip-query`;
-    http.postJson(url, param, success)
-}
 
 /*************************资产台账任务接口****************************/
 //统计数量

+ 1 - 1
src/api/scan/httpUtil.js

@@ -45,7 +45,7 @@ export default {
         let ProjectId = storage.get("global_project_selected")
         let userName = storage.get("user_name")
         let vm = this;
-        fetch({ url: url, method: 'post', params: data.paramsQuery || null, data: data, headers: {'ProjectId': ProjectId, 'Comming': 'adm' ,'Account': userName} }).then((response) => {
+        fetch({ url: url, method: 'post', data: data, headers: {'ProjectId': ProjectId, 'Comming': 'adm' ,'Account': userName} }).then((response) => {
             successResponse(vm, response, success, failed)
         }).catch(error => {
             errorResponse(vm, error, err);

+ 35 - 29
src/components/data_admin/buildTask/dialog/modelTaskDialog.vue

@@ -124,42 +124,48 @@ export default {
       }
 
       if (this.params.spaceList && this.params.spaceList.length) {
-        //通过平面图区域查询(接口未支持)paramsQuery:{listId:[]}
-        let IdList = this.params.spaceList
-        queryModelDiglog(IdList, res => {})
+        //通过平面图区域查询
+        params.IdList = this.params.spaceList
+        queryModelDiglog(params, res => {
+          this.dataFormatter(res)
+        })
       } else {
         params.Filters += `;ModelId='${this.params.CurrentModelId}'`
         queryEquip(params, res => {
-          this.tableData = res.Content.map(item => {
-            if (item.Component && item.Component.length) {
-              item.ComponentCount = []
-              item.Component.map(parts => {
-                if (parts.EquipCategory && parts.EquipCategory.EquipCode && parts.EquipCategory.EquipName) {
-                  let index = item.ComponentCount.findIndex(c => { return c.code == parts.EquipCategory.EquipCode })
-                  if (index != -1) {
-                    item.ComponentCount[index].count++
-                  } else {
-                    item.ComponentCount.push({
-                      name: parts.EquipCategory.EquipName,
-                      code: parts.EquipCategory.EquipCode,
-                      count: 1
-                    })
-                  }
-                }
-              })
-            }
-            item.FolderName = this.params.modelFolderName
-            item.FolderId = this.params.modelFolderId
-            item.FileName = this.params.modelFileName
-            item.FileId = this.params.CurrentModelId
-            item.SchemeId = "1"
-            return item
-          })
-          this.page.total = res.Total
+          this.dataFormatter(res)
         })
       }
 
     },
+    // 表格数据格式化
+    dataFormatter(res) {
+      this.tableData = res.Content.map(item => {
+        if (item.Component && item.Component.length) {
+          item.ComponentCount = []
+          item.Component.map(parts => {
+            if (parts.EquipCategory && parts.EquipCategory.EquipCode && parts.EquipCategory.EquipName) {
+              let index = item.ComponentCount.findIndex(c => { return c.code == parts.EquipCategory.EquipCode })
+              if (index != -1) {
+                item.ComponentCount[index].count++
+              } else {
+                item.ComponentCount.push({
+                  name: parts.EquipCategory.EquipName,
+                  code: parts.EquipCategory.EquipCode,
+                  count: 1
+                })
+              }
+            }
+          })
+        }
+        item.FolderName = this.params.modelFolderName
+        item.FolderId = this.params.modelFolderId
+        item.FileName = this.params.modelFileName
+        item.FileId = this.params.CurrentModelId
+        item.SchemeId = "1"
+        return item
+      })
+      this.page.total = res.Total
+    },
     //选中项修改
     handleSelectionChange(val) {
       this.selections = val;

+ 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) {

+ 9 - 2
src/components/data_admin/buildTask/table/assetsTable.vue

@@ -42,6 +42,7 @@
 
 <script>
 import { queryAssetsTask, deleteAssetsTask, createAssetsTask, updateAssetsTask } from "@/api/data_admin/buildTaskApi"
+import tools from "@/utils/tools"
 import { mapGetters } from "vuex"
 import assetsDetail from '../detail/assetsDetail'
 export default {
@@ -180,13 +181,19 @@ export default {
     handleCurrentChange(pageNo) {
       this.page.pageNumber = pageNo;
       this.getTableData()
+    },
+    projectId() {
+      this.page.pageNumber = 1
+      this.getTableData()
     }
   },
   watch: {
     paramsData: {
       handler(newName, oldName) {
-        this.page.pageNumber = 1
-        this.getTableData()
+        if(!tools.isSimilarly(newName, oldName)){
+          this.page.pageNumber = 1
+          this.getTableData()
+        }
       },
       immediate: true,
       deep: true

+ 9 - 2
src/components/data_admin/buildTask/table/deviceTable.vue

@@ -51,6 +51,7 @@
 
 <script>
 import { queryDeviceTask, deleteDeviceTask, createDeviceTask, updateDeviceTask } from "@/api/data_admin/buildTaskApi"
+import tools from "@/utils/tools"
 import { mapGetters } from "vuex"
 import deviceDetail from '../detail/deviceDetail'
 export default {
@@ -213,11 +214,17 @@ export default {
   watch: {
     paramsData: {
       handler(newName, oldName) {
-        // this.page.pageNumber = 1
-        this.getTableData()
+        if(!tools.isSimilarly(newName, oldName)){
+          this.page.pageNumber = 1
+          this.getTableData()
+        }
       },
       immediate: true,
       deep: true
+    },
+    projectId() {
+      this.page.pageNumber = 1
+      this.getTableData()
     }
   }
 };

+ 9 - 2
src/components/data_admin/buildTask/table/modelTable.vue

@@ -45,6 +45,7 @@
 
 <script>
 import { queryModelTask, deleteModelTask, updateModelTask, createModelTask } from "@/api/data_admin/buildTaskApi"
+import tools from "@/utils/tools"
 import { mapGetters } from "vuex"
 import deviceDetail from '../detail/deviceDetail'
 export default {
@@ -203,11 +204,17 @@ export default {
   watch: {
     paramsData: {
       handler(newName, oldName) {
-        this.page.pageNumber = 1
-        this.getTableData()
+        if(!tools.isSimilarly(newName, oldName)){
+          this.page.pageNumber = 1
+          this.getTableData()
+        }
       },
       immediate: true,
       deep: true
+    },
+    projectId() {
+      this.page.pageNumber = 1
+      this.getTableData()
     }
   }
 };

+ 9 - 2
src/components/data_admin/buildTask/table/replaceTable.vue

@@ -42,6 +42,7 @@
 
 <script>
 import { queryAssetsTask, deleteAssetsTask } from "@/api/data_admin/buildTaskApi"
+import tools from "@/utils/tools"
 import { mapGetters } from "vuex"
 import assetsDetail from '../detail/assetsDetail'
 export default {
@@ -167,11 +168,17 @@ export default {
   watch: {
     paramsData: {
       handler(newName, oldName) {
-        this.page.pageNumber = 1
-        this.getTableData()
+        if(!tools.isSimilarly(newName, oldName)){
+          this.page.pageNumber = 1
+          this.getTableData()
+        }
       },
       immediate: true,
       deep: true
+    },
+    projectId() {
+      this.page.pageNumber = 1
+      this.getTableData()
     }
   }
 };

+ 9 - 2
src/components/data_admin/buildTask/table/tearTable.vue

@@ -42,6 +42,7 @@
 
 <script>
 import { queryAssetsTask, deleteAssetsTask } from "@/api/data_admin/buildTaskApi"
+import tools from "@/utils/tools"
 import { mapGetters } from "vuex"
 import assetsDetail from '../detail/assetsDetail'
 export default {
@@ -167,11 +168,17 @@ export default {
   watch: {
     paramsData: {
       handler(newName, oldName) {
-        this.page.pageNumber = 1
-        this.getTableData()
+        if(!tools.isSimilarly(newName, oldName)){
+          this.page.pageNumber = 1
+          this.getTableData()
+        }
       },
       immediate: true,
       deep: true
+    },
+    projectId() {
+      this.page.pageNumber = 1
+      this.getTableData()
     }
   }
 };

+ 5 - 0
src/components/data_admin/buildTask/taskStatistics.vue

@@ -83,6 +83,11 @@ export default {
         this.waitReplaceCount = res.Count
       })
     }
+  },
+  watch: {
+    projectId() {
+      this.getTaskCount();
+    }
   }
 }
 </script>

+ 225 - 0
src/components/ledger/cenote/dialog/addSpaceDialog.vue

@@ -0,0 +1,225 @@
+
+<template>
+  <el-dialog :title="title" :visible.sync="dialog" :before-close="handleClose" width="900px" id="addEqDialog">
+    <el-row class="filters">
+      <el-col :span="7" style="width:268px;padding:0px;">
+        <el-input style placeholder="输入业务空间名称、本地编码进行查询" v-model="keycode" clearable @keyup.enter.native="getTableData">
+          <i slot="suffix" class="el-input__icon el-icon-search" @click="getTableData"></i>
+        </el-input>
+      </el-col>
+      <el-col :span="8.5" style="padding:0 0;margin-left:-2px">
+        <floor-cascader ref="floorcas" @change="changeFloor"></floor-cascader>
+      </el-col>
+      <el-col :span="7.5" style="padding:0 0;">
+        <space-select ref="spacesel" @change="changeSpace"></space-select>
+      </el-col>
+    </el-row>
+    <el-row class="filters" :gutter="20"></el-row>
+    <div class="table-box">
+      <el-table :data="tableData" style="width: 100%" height="350" v-loading="loading" :header-cell-style="headerStyle" ref="multipleTable"
+        @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55"></el-table-column>
+        <el-table-column :label="`${inSpaceType}本地名称`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            {{scope.row.RoomLocalName||scope.row.RoomName||''}}
+          </template>
+        </el-table-column>
+        <el-table-column prop="RoomLocalID" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop :label="`所属建筑楼层`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            {{ scope.row.BuildingId && floorType[scope.row.BuildingId]? ((floorType[scope.row.BuildingId] || '') + (scope.row.FloorId && floorType[scope.row.FloorId] ? (' - ' + floorType[scope.row.FloorId] || '') : '')) : ''}}
+          </template>
+        </el-table-column>
+        <el-table-column prop="ObjectType" :label="`空间类型`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            {{spaceType[scope.row.ObjectType] || ''}}
+          </template>
+        </el-table-column>
+        <el-table-column prop="action" label="操作" min-width="100">
+          <template slot-scope="scope">
+            <el-button size="mini" @click="toDetail(scope.$index, scope.row)" plain>查看详情</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <!-- 分页 -->
+      <el-pagination class="fr" 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>
+    <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="handleClose">取 消</el-button>
+      <el-button size="small" type="primary" @click="savaRelation">确 定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+import {
+  unSysZoneSpace,
+  linkSysSp,
+  queryDictionaryHead
+} from "@/api/scan/request";
+import floorCascader from "@/components/ledger/lib/floorCascader";
+import dictionaryCas from "@/components/config_point/dictionaryCascader";
+import spaceSelect from "@/components/ledger/lib/spaceSelect";
+import { mapGetters } from "vuex";
+export default {
+  components: {
+    floorCascader,
+    dictionaryCas,
+    spaceSelect
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"]),
+    dialog() {
+      return this.dialogVisible;
+    }
+  },
+  data() {
+    return {
+      title: "添加系统所在业务空间",
+      keycode: "", //输入查询条件
+      inSpaceType: "业务空间",
+      Buildfloor: ["all"], // 选中的建筑楼层
+      Spacecategory: null, // 选中的业务空间类型
+      tableData: [],
+      floorData: {}, //楼层
+      spaceData: {}, //业务空间分区
+      loading: false,
+      selections: [], // 选中项
+      page: {
+        pageSize: 50,
+        pageSizes: [10, 20, 50, 100],
+        pageNumber: 1,
+        total: 0
+      },
+      headerStyle: {
+        backgroundColor: "#e1e4e5",
+        color: "#2b2b2b",
+        lineHeight: "30px"
+      } // 列表样式
+    };
+  },
+  props: {
+    params: Object, //查看的竖井关系信息
+    spaceType: Object,
+    dialogVisible: Boolean,
+    floorType: Object
+  },
+  mounted() { },
+  methods: {
+    // 显示弹窗
+    showDialog() {
+      this.dialogVisible = true;
+    },
+    //修改建筑楼层
+    changeFloor(value) {
+      this.Buildfloor = value;
+      this.getTableData();
+    },
+    //修改空间类型
+    changeSpace(value) {
+      this.Spacecategory = value;
+      this.getTableData();
+    },
+    getTableData() {
+      let params = {
+        data: {
+          Filters: "not RoomID isNull",
+          Orders: "RoomLocalName desc",
+          PageNumber: this.page.pageNumber,
+          PageSize: this.page.pageSize
+        },
+        shaftId: this.params.ShaftID,
+        sysId: this.$route.query.SysID
+      };
+      if (this.Buildfloor[0] == "noKnow") {
+        params.data.Filters += `;buildingId isNull`;
+      } else if (this.Buildfloor[0] && this.Buildfloor[0] != "all") {
+        params.data.Filters += `;buildingId='${this.Buildfloor[0]}'`;
+      }
+      if (this.Buildfloor[1] == "noKnow") {
+        params.data.Filters += `;floorId isNull`;
+      } else if (this.Buildfloor[1] && this.Buildfloor[1] != "all") {
+        params.data.Filters += `;floorId='${this.Buildfloor[1]}'`;
+      }
+      if (this.Spacecategory) {
+        params.data.Filters += `;ObjectType='${this.Spacecategory}'`;
+      }
+      if (this.keycode != "") {
+        params.data.Filters += `;RoomName contain '${this.keycode}' or RoomLocalName contain '${this.keycode}'`;
+      }
+
+      unSysZoneSpace(params, res => {
+        this.tableData = res.Content;
+        this.page.total = res.Total;
+      });
+    },
+    handleClose() {
+      this.$emit("update:dialogVisible", false);
+    },
+    //选中项修改
+    handleSelectionChange(val) {
+      this.selections = val;
+    },
+    savaRelation() {
+      if (this.selections.length) {
+        let params = {
+          Content: this.selections.map(item => {
+            return {
+              SpaceID: item.RoomID,
+              SysID: this.$route.query.SysID,
+              ObjectType: item.ObjectType
+            };
+          })
+        };
+        linkSysSp(params, res => {
+          this.$message.success("关联成功!");
+          this.$emit("refresh");
+        });
+      } else {
+        this.$message("请选择要关联的设备");
+      }
+    },
+    //改变pagesize
+    handleSizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+      this.getTableData();
+    },
+    //改变pageno
+    handleCurrentChange(pageNo) {
+      this.page.pageNumber = pageNo;
+      this.getTableData();
+    },
+    // 查看详情
+    toDetail() {
+      this.$message("开发中");
+    }
+  },
+  watch: {
+    dialogVisible: {
+      handler() {
+        if (this.dialogVisible) {
+          this.page.pageNumber = 1;
+          this.tableData = [];
+          this.getTableData();
+        }
+      },
+      immediate: true
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+#addEqDialog {
+  .filters {
+    margin: 0 0 10px 0;
+  }
+  .table-box {
+    height: 370px;
+    .fr {
+      margin-top: 10px;
+    }
+  }
+}
+</style>

+ 1 - 1
src/components/ledger/system/table/spaceTable.vue

@@ -35,7 +35,7 @@
       </el-table>
     </div>
     <!-- 添加空间弹窗 -->
-    <addSpaceDialog :dialogVisible.sync="dialogVisible" ref="addSpaceDialog" @refresh="refresh" :type="type" :params="params" :spaceType="spaceType"
+    <addSpaceDialog :dialogVisible.sync="dialogVisible" ref="addSpaceDialog" @refresh="refresh" :params="params" :spaceType="spaceType"
       :floorType="floorType"></addSpaceDialog>
   </div>
 </template>

+ 232 - 205
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>
@@ -36,7 +40,7 @@
         </div>
         <div class="notice_operate">
           <!-- <div class="readAll">全部标为已读</div> -->
-          <div class="seeAll">查看全部<i class="iconfont icon-right"></i></div>
+          <div class="seeAll" @click="allDetails">查看全部<i class="iconfont icon-right"></i></div>
         </div>
       </div>
     </transition>
@@ -66,6 +70,9 @@ import { MQTT_SERVICE, MQTT_USERNAME, MQTT_PASSWORD } from './mqSetting'
 import { messgeCount, messgeQuery, messgeUpdateState } from '@/api/msgsever'
 
 export default {
+  components: {
+
+  },
   data() {
     return {
       client: Stomp.client(MQTT_SERVICE),
@@ -84,10 +91,10 @@ 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",
-      }
+      },
     }
   },
-  created () {
+  created() {
     this.connect()
   },
   mounted() {
@@ -96,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,
@@ -112,7 +127,7 @@ export default {
         this.messageList = res.Content
       })
     },
-    getUnreadCount(){//获取未读消息的数量
+    getUnreadCount() {//获取未读消息的数量
       let params = {
         Filters: `Read=false;UserId='${this.userId}'`
       }
@@ -120,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()//将当前角色消息全部置为已读
       }
     },
@@ -170,7 +185,7 @@ export default {
     },
     //断开连接
     disconnect() {
-      this.client.disconnect(function() {
+      this.client.disconnect(function () {
         console.log("连接已断开!");
       })
     },
@@ -178,7 +193,7 @@ export default {
     send(destination, message, headers = {}) {
       this.client.send(destination, headers, JSON.stringify(message))
     },
-    
+
     handleClickConnectMQ() {//连接MQ
       this.connect()
     },
@@ -189,213 +204,225 @@ export default {
       this.unsubscribe()
     },
     handleClickSendMessage() {//发送消息
-      this.send('/topic/datacenter.broadcast',this.sendMessage)
+      this.send('/topic/datacenter.broadcast', this.sendMessage)
+    },
+    allDetails() {
+      this.noticeListShow = false;
+      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>

+ 209 - 0
src/framework/components/messagesever/msgAllDetails.vue

@@ -0,0 +1,209 @@
+  <template>
+  <div class="box">
+    <div class="condition">
+      <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 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">
+              <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="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%);">
+              <i class="icon-wushuju iconfont"></i>
+              数据暂无
+            </div>
+          </template>
+        </el-table>
+      </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>
+import { mapGetters } from 'vuex'
+import { messgeQuery, messgeUpdate } from '@/api/msgsever'
+import Bus from '@/utils/bus.js'
+
+export default {
+  data() {
+    return {
+      tableData: [],
+      loading: false,
+      page: {
+        pageSize: 50,
+        pageSizes: [10, 20, 50, 100],
+        pageNumber: 1,
+        total: 0
+      },
+      headerStyle: {// 列表样式
+        backgroundColor: '#e1e4e5',
+        color: '#2b2b2b',
+        lineHeight: '30px'
+      }, 
+      moduleMap: {//消息模块映射
+        "Model": "模型文件管理"
+      },
+      iconClassMap: { //消息类型图标映射
+        "Success": "msg-icon el-icon-success success-color",
+        "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', ['userId'])
+  },
+  mounted() {
+    this.getTableData();
+  },
+  methods: {
+    // 获取列表数据
+    getTableData() {
+      let params = {
+        Cascade: [
+          {
+            Name: "project"
+          }
+        ],
+        Filters: `UserId='${this.userId}'`,
+        Orders: "CreateTime desc, Id asc",
+        PageNumber: this.page.pageNumber,
+        PageSize: this.page.pageSize
+      }
+      this.loading = true;
+      messgeQuery(params, res => {
+        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>
+
+<style scoped lang='less'>
+.box {
+  .condition {
+    padding: 10px;
+    display: flex;
+    height: 100%;
+    flex-direction: column;
+    border: 1px solid #dfe6ec;
+    background: #fff;
+    .main {
+      margin-top: 10px;
+      a{
+        text-decoration: none;
+      }
+    }
+  }
+}
+.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)

+ 16 - 1
src/router/system.js

@@ -1,4 +1,5 @@
 import LayoutMain from '@/framework/layout/Main'
+import MsgAllDetails from "@/framework/components/messagesever/msgAllDetails"
 
 import Login from '@/framework/layout/Login'
 import Dasboard from '@/views/dasboard'
@@ -67,6 +68,7 @@ import dataReport from '@/views/ledger/report'
 import auth from '@/views/system/auth'
 import noUser from '@/views/system/nouser'
 import spaceDetail from '@/views/ledger/spacelist/spaceDetail'
+import relatedSpace from '@/views/ledger/cenotelist/relatedSpace'
 
 /**  关系维护并计算 */
 import maintain from '@/views/relation/maintain'
@@ -83,7 +85,15 @@ 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 },
@@ -359,6 +369,11 @@ export default [
                 name: 'cenoteDetail',
                 component: cenoteDetail,
                 meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '竖井台账', path: '/ledger/cenotelist' }, { label: '竖井关系详情' }] }
+            }, {
+                path: 'relatedSpace',
+                name: 'relatedSpace',
+                component: relatedSpace,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '竖井台账', path: '/ledger/cenotelist' }, { label: '竖井关联的元空间' }] }
             },
             {
                 path: 'rentlist',

+ 27 - 0
src/utils/tools.js

@@ -34,4 +34,31 @@ tools.deepCopy = (obj) => {
     return temp
 }
 
+//判断watch监听的值是否相同
+tools.isSimilarly = (newValue, oldValue) => {
+    if(typeof newValue === typeof oldValue){
+        if(newValue === oldValue){
+            return true
+        } else {
+            let flag = false
+            try {
+                Object.keys(newValue).forEach((item, index, arr) => {
+                    if(oldValue.hasOwnProperty(item) && newValue[item] === oldValue[item]){
+                        if(index == arr.length-1){
+                            flag = true
+                        }
+                    } else {
+                        throw new Error()
+                    }
+                })
+            } catch (error) {
+                return false
+            }
+            return flag
+        }
+    } else {
+        return false
+    }
+}
+
 export default tools

+ 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 } })
       })
     }

+ 3 - 2
src/views/data_admin/buildTask/addTask/addModelTask.vue

@@ -5,6 +5,7 @@
       <model-folder ref="modelFolder" @change="handleChangeModelFolder" style="margin-right:10px;"></model-folder>
       <my-cascader :isWidth="false" ref="cascader" @change="changeDevice"></my-cascader>
       <el-button style="float:right;margin-top:1px;" @click="handleClickCreate">{{buttonContent}}</el-button>
+      <el-switch v-show="CurrentModelId" style="float:right;margin-top:7px;margin-right:20px;" v-model="isLight" active-text="高亮显示未完成验证的区块"></el-switch>
     </div>
     <el-row>
       <div class="l-list">
@@ -18,7 +19,7 @@
         </div>
       </div>
       <div class="r-model">
-        <draw-model ref="drawModel" :id="1" :CurrentModelId="CurrentModelId" @changeButtonContent="changeButtonContent"></draw-model>
+        <draw-model ref="drawModel" :id="1" :CurrentModelId="CurrentModelId" :isLight="isLight" @changeButtonContent="changeButtonContent"></draw-model>
       </div>
     </el-row>
     <modelTask-dialog :dialogVisible.sync="dialogVisible" :params="params" :newTaskTypes="newTaskTypes"></modelTask-dialog>
@@ -42,6 +43,7 @@ export default {
   },
   data() {
     return {
+      isLight: false,//是否高亮未完成验证区块
       query: {},//query信息
       dialogVisible: false,//是否显示弹窗
       modelFolderName: '',//模型文件夹名字
@@ -95,7 +97,6 @@ export default {
       } else {
         this.resetSelected()
       }
-      console.log("handleChangeModelFolder")
     },
     resetSelected(){
       this.modelFileList = []

+ 4 - 27
src/views/ledger/cenotelist/index.vue

@@ -25,24 +25,6 @@
       <div class="tableLeft" v-show="tableData && tableData.length">
         <handson-table ref="table"></handson-table>
       </div>
-      <div class="tableRight">
-        <div v-show="isTableRightShow">
-          <div class="table_right_box"><span class="iconfont close_right" @click="handleCloseRight">&#xe66b;</span></div>
-          <h5>管理需要关联的元空间</h5>
-          <p style="margin-bottom: 10px;">以下为关联的元空间id</p>
-          <el-input
-            type="textarea"
-            :autosize="{ minRows: 6, maxRows: 10}"
-            :disabled="onlyRead"
-            placeholder="请输入元空间id,以“,”分割"
-            v-model="spaceList">
-          </el-input>
-          <el-row class="right" v-show="!onlyRead">
-            <el-button @click="handleCloseRight">取消</el-button>
-            <el-button @click="saveSpaceList" type="primary">保存</el-button>
-          </el-row>
-        </div>
-      </div>
     </div>
     <el-pagination
       class="right"
@@ -75,7 +57,6 @@ import tools from "@/utils/scan/tools"
 import handsonUtils from "@/utils/hasontableUtils"
 import showTools from "@/utils/handsontable/notShow"
 import text from "@/utils/handsontable/mainText"
-
 import cenoteType from "@/components/ledger/lib/cenoteType";
 import handsonTable from "@/components/common/handsontable";
 import { getDataDictionary, getCenoteTableData, updataCenoteTableData, deleteCenoteTableData, saveCenoteRelateSpace, BeatchQueryParam } from "@/api/scan/request"
@@ -89,7 +70,6 @@ export default {
     return {
       cenoteId: "",//竖井类型id
       shaftId: "",//要操作的竖井id
-      isTableRightShow: false,
       spaceList: "",
       options: [{
         value: true,
@@ -297,11 +277,6 @@ export default {
       this.cenoteId = value.Id
       this.getTableHeader()
     },
-    //关闭右侧关联元空间输入按钮
-    handleCloseRight() {
-      this.isTableRightShow = false
-      this.spaceList = ""
-    },
     //切换每页显示多少条数据
     handleSizeChange(val) {
       this.page.pageSize = val
@@ -372,8 +347,10 @@ export default {
       this.shaftId = infos.ShaftID //要操作的数据id
       //点击关联的元空间
       if (val === "SpaceCount") {
-        this.spaceList = infos.SpaceList
-        this.isTableRightShow = true
+        this.$router.push({
+          path:'/ledger/relatedSpace',
+          query:{ShaftId: this.shaftId,name:name,onlyRead:this.onlyRead}
+        })
         return false
       } else if (val === "OtheRelations") {
         this.$router.push({

+ 260 - 0
src/views/ledger/cenotelist/relatedSpace.vue

@@ -0,0 +1,260 @@
+<template>
+  <div id="relatedSpace">
+    <div class="condition">
+      <div class="header">
+        <el-button style="float:left;" size="small" type="default" icon="el-icon-back" @click="goBack"></el-button>
+        <span style="float:left;">{{ cenoteObj.name || '' }}</span>
+        <div class="edit-tool" v-if="!cenoteObj.onlyRead">
+          <el-button v-if="isMyTab == 2" size="small" style="float:right" @click="dialogVisible = true">添加</el-button>
+          <div v-else>
+            <el-button v-show="!isEdit" @click="isEdit = true" size="small" style="float:right">编辑</el-button>
+            <el-button v-show="isEdit" size="small" style="float:right">保存</el-button>
+            <el-button v-show="isEdit" size="small" @click="isEdit = false" style="float:right">取消</el-button>
+          </div>
+          <addSpaceDialog :dialogVisible.sync="dialogVisible" ref="addSpaceDialog" @refresh="refresh" :params="cenoteObj" :spaceType="spaceType" :floorType="floorType"></addSpaceDialog>
+        </div>
+        <space-select @change="changeSpace"></space-select>
+      </div>
+      <div class="saga-build-tab">
+        <el-radio-group v-model="isMyTab" @change="changeRadio" style="width: 136px;">
+          <el-radio-button label="1">平面图</el-radio-button>
+          <el-radio-button label="2" class="space-own-radio" style="width: 68px;">列表</el-radio-button>
+        </el-radio-group>
+      </div>
+      <div v-show="isMyTab == 1" class="data-item">
+        <el-select v-model="building" placeholder="请选择建筑" @change="changeBuilding">
+          <el-option v-for="item in buildingList" :key="item.value" :label="item.BuildLocalName" :value="item.BuildID"></el-option>
+        </el-select>
+        <div style="height:calc(100% - 42px);margin:10px 0 0 0;width:100%;position:relative;">
+          <el-scrollbar style="height:100%;width:149px;border-right:1px solid;margin:0px;">
+          <div class="floor" style="width:149px;height:100%;">
+            <span class="floor-item">楼 层</span>
+            <div v-if="building">
+            <span class="floor-item" @click="changeFloor(item.FloorID)" :class="{floorItemChoose:(item.FloorID == floor)}" v-for="item in buildingObj.Floor" :key="item.FloorID">{{ item.FloorLocalName }}</span>
+            </div>
+          </div>
+          </el-scrollbar>
+        </div>
+      </div>
+      <div v-show="isMyTab == 2" class="data-item">
+        <related-spaceList :space="space" ref="spacelist"></related-spaceList>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import spaceSelect from "@/components/ledger/lib/spaceSelect";
+import relatedSpaceList from "@/views/ledger/cenotelist/relatedSpaceList";
+import addSpaceDialog from '@/components/ledger/cenote/dialog/addSpaceDialog';
+import { queryDictionaryHead, buildingQuery } from '@/api/scan/request'
+export default {
+  data() {
+    return {
+      isMyTab: 1,//默认平面图
+      isEdit: false,//是否正在编辑
+      building: '',//当前建筑id
+      buildingObj:{},//当前建筑obj
+      buildingList: [],
+      space: '',//当前业务空间
+      floor: '',//当前楼层
+      dialogVisible: false,//添加空间弹窗
+      spaceType: {},//空间种类
+      floorType: {},//子组件楼层信息
+    }
+  },
+  computed: {
+    cenoteObj() {
+      return this.$route.query;
+    }
+  },
+  props: {
+
+  },
+  components: {
+    spaceSelect,
+    relatedSpaceList,
+    addSpaceDialog
+  },
+  created() {
+    this.load();
+    let pa = {
+      Filters: `parentId='Space'`
+    }
+    queryDictionaryHead(pa, res => {
+      res.Content.map(t => {
+        if (t.Name != "元空间") {
+          this.spaceType[t.Code] = t.Name;
+        }
+      })
+    });
+
+    let param = {
+      Cascade: [
+        { Name: "floor" }
+      ]
+    };
+    buildingQuery(param, res => {
+      this.buildingList = res.Content;
+      if(this.buildingList.length > 0){
+        this.building = this.buildingList[0].BuildID;
+        this.buildingObj = this.buildingList[0];
+        if(this.buildingObj.Floor.length > 0){
+          this.floor = this.buildingObj.Floor[0].FloorID;
+        }
+      }
+      res.Content.map(item => {
+        if (item.BuildID && item.BuildLocalName) {
+          this.floorType[item.BuildID] = item.BuildLocalName;
+          if (item.Floor instanceof Array) {
+            item.Floor.map(f => {
+              if (f.FloorID && f.FloorLocalName) {
+                this.floorType[f.FloorID] = f.FloorLocalName;
+              }
+            })
+          }
+        }
+      });
+    });
+  },
+  methods: {
+    //更改业务空间类型
+    changeSpace(val) {
+      this.space = val;
+      this.load();
+    },
+    //加载数据
+    load() {
+      if (this.isMyTab == 1) {
+
+      }
+      else {
+        this.$refs.spacelist.getSpaceList();
+      }
+    },
+    //更换建筑
+    changeBuilding(bid){
+      this.buildingList.map(item => {
+        if(item.BuildID == bid){
+          this.buildingObj = item;
+        }
+      })
+      this.load();
+    },
+    //更换楼层
+    changeFloor(fid){
+      this.floor = fid;
+      this.load();
+    },
+    //更换列表或平面图
+    changeRadio(val) {
+      this.isMyTab = val;
+      this.load();
+    },
+    //返回
+    goBack() {
+      this.$router.push({
+        name: 'cenotelist'
+      })
+    },
+    //更新
+    refresh() {
+      this.load();
+    }
+  },
+  watch: {
+
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.condition {
+  position: relative;
+  padding: 10px 10px;
+  display: flex;
+  height: calc(100% - 22px);
+  flex-direction: column;
+  border: 1px solid #dfe6ec;
+  background: #fff;
+  .header {
+    padding-bottom: 10px;
+    border-bottom: 1px solid rgba(0, 0, 0, 0.5);
+    span {
+      line-height: 33px;
+      margin-left: 15px;
+    }
+    /deep/ .buildFloor {
+      line-height: 32px;
+    }
+  }
+  .spaceTypes {
+    .types {
+      float: left;
+      width: calc(100% - 200px);
+      /deep/ .el-tabs__item.is-top {
+        border-top: 2px solid transparent;
+        &.is-active {
+          border-top: 2px solid #409eff;
+        }
+      }
+    }
+    .deleBtn {
+      float: left;
+      width: 200px;
+      text-align: right;
+      height: 40px;
+      border-bottom: 1px solid #e4e7ed;
+    }
+  }
+}
+.saga-build-tab {
+  position: absolute;
+  left: 50%;
+  transform: translateX(-50%);
+  .tab-main {
+    float: left;
+    width: 120px;
+    padding: 0 5px;
+    margin: 5px 0;
+    border: 1px solid #ccc;
+    background-color: #fff;
+    height: 30px;
+    box-sizing: border-box;
+    text-align: center;
+    cursor: pointer;
+    overflow: hidden;
+    i {
+      font-size: 18px;
+      padding-right: 10px;
+      float: left;
+      line-height: 30px;
+      margin-left: 10px;
+    }
+    span {
+      line-height: 30px;
+      float: left;
+    }
+  }
+  .tab-active {
+    background-color: #409eff;
+    color: #fff;
+  }
+}
+.data-item {
+  height: calc(100% - 44px);
+  padding: 10px 0px;
+}
+.floor-item {
+  padding: 10px 10px;
+  display: block;
+  margin: 0px;
+  cursor: pointer;
+}
+.floorItemChoose {
+  background: rgba(0,0,0,0.2);
+}
+/deep/ .el-scrollbar__wrap {
+    overflow-x: hidden;
+  }
+</style>

+ 82 - 0
src/views/ledger/cenotelist/relatedSpaceList.vue

@@ -0,0 +1,82 @@
+<template>
+  <div id="relatedSpaceList" style="height:100%;">
+    <div class="query">
+      <el-input v-model="keyword" placeholder="请输入关键词" @keyup.enter.native="getSpaceList" style="width:240px;margin:0 0 0 10px;">
+        <i slot="suffix" class="el-input__icon el-icon-search" @click="getSpaceList"></i>
+      </el-input>
+      <floorCascader @change="changeCascader"></floorCascader>
+    </div>
+    <div class="table-area" style="height:calc(100% - 52px)">
+      <el-scrollbar style="height:calc(100% - 40px);">
+        <el-table :data="tableData" style="width: 100%;height:100%;" v-loading="loading" :header-cell-style="headerStyle">
+          <el-table-column prop='MeterFunc' label='业务空间建筑楼层' show-overflow-tooltip min-width="200" header-align='center' align="center">
+          </el-table-column>
+          <el-table-column prop='MeterFunc' label='业务空间类型' show-overflow-tooltip min-width="200" header-align='center' align="center">
+          </el-table-column>
+          <el-table-column prop='MeterFunc' label='业务空间本地名称' show-overflow-tooltip min-width="200" header-align='center' align="center">
+          </el-table-column>
+          <el-table-column prop='MeterFunc' label='业务空间本地编码' show-overflow-tooltip min-width="200" header-align='center' align="center">
+          </el-table-column>
+          <el-table-column prop='' label='操作' show-overflow-tooltip min-width="90" header-align='center' align='center'>
+            <template slot-scope="scope">
+              <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain icon="el-icon-delete"></el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-scrollbar>
+      <!-- 分页 -->
+      <el-pagination @size-change="getSpaceList" @current-change="getSpaceList" :current-page="currentPage" :page-sizes="pageSizes"
+        :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="tableData.length" style="float:right;">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+import floorCascader from "@/components/ledger/lib/floorCascader";
+export default {
+  data() {
+    return {
+      //表格头样式
+      headerStyle: {
+        backgroundColor: '#e1e4e5',
+        color: '#2b2b2b',
+        lineHeight: '30px'
+      },
+      pageSizes: [10, 20, 50, 100],
+      pageSize: 50,
+      currentPage: 1,
+      keyword: '',//关键词
+      floor: '',//当前楼层
+      options: [],//楼层
+      tableData: [],//表格数据
+      loading: false,//加载
+    }
+  },
+  components:{
+    floorCascader
+  },
+  methods: {
+    getSpaceList() {
+      console.log(111)
+    },
+    changeCascader(val){
+      console.log(val);
+    }
+  },
+  props: {
+    space: '',//空间id
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.query {
+  padding: 10px 0px;
+}
+#relatedSpaceList {
+  /deep/ .el-scrollbar__wrap {
+    overflow-x: hidden;
+  }
+}
+</style>