Browse Source

Merge branch 'master' of http://39.106.8.246:3003/BDTP/adm-frontend

qule 2 years ago
parent
commit
c87e4f1a8e
37 changed files with 594 additions and 469 deletions
  1. BIN
      public/imgs/navigation/build_white.png
  2. BIN
      public/imgs/navigation/build_yellow.png
  3. BIN
      public/imgs/navigation/businessspace_white.png
  4. BIN
      public/imgs/navigation/businessspace_yellow.png
  5. BIN
      public/imgs/navigation/cadimg_white.png
  6. BIN
      public/imgs/navigation/cadimg_yellow.png
  7. BIN
      public/imgs/navigation/equip_white.png
  8. BIN
      public/imgs/navigation/equip_yellow.png
  9. BIN
      public/imgs/navigation/project_white.png
  10. BIN
      public/imgs/navigation/project_yellow.png
  11. BIN
      public/imgs/navigation/relationview_white.png
  12. BIN
      public/imgs/navigation/relationview_yellow.png
  13. BIN
      public/imgs/navigation/systemgraph_white.png
  14. BIN
      public/imgs/navigation/systemgraph_yellow.png
  15. BIN
      public/imgs/navigation/systemor_white.png
  16. BIN
      public/imgs/navigation/systemor_yellow.png
  17. 25 23
      public/systemConf.js
  18. 24 12
      src/components/frame/leftMenu.vue
  19. 1 0
      src/components/frame/pageLeft.vue
  20. 2 2
      src/components/frame/pageRight.vue
  21. 1 1
      src/components/old-adm/businessSpaceLedger/spaceadd/index.vue
  22. 1 1
      src/components/old-adm/business_space/business/handsontable.vue
  23. 5 0
      src/components/old-adm/business_space/newGraphy/canvasFun.vue
  24. 13 11
      src/components/old-adm/business_space/newGraphy/graphy.vue
  25. 1 1
      src/components/old-adm/ledger/components/handsontables/assets.vue
  26. 2 2
      src/components/old-adm/ledger/components/handsontables/device.vue
  27. 2 2
      src/components/old-adm/ledger/components/handsontables/system.vue
  28. 1 1
      src/components/old-adm/ledger/facility/addfacility.vue
  29. 1 1
      src/components/old-adm/ledger/facility/parts/index.vue
  30. 1 1
      src/components/old-adm/ledger/facility/partsmanage/addparts/index.vue
  31. 1 1
      src/components/old-adm/ledger/facility/partsmanage/index.vue
  32. 1 1
      src/components/old-adm/ledger/system/addsystem.vue
  33. 482 397
      src/components/old-adm/ready/buildfloor/index.vue
  34. 2 0
      src/components/systemGraph/edit.vue
  35. 2 6
      src/components/systemGraph/graph.vue
  36. 3 3
      src/store/index.js
  37. 23 3
      src/utils/authUtils.ts

BIN
public/imgs/navigation/build_white.png


BIN
public/imgs/navigation/build_yellow.png


BIN
public/imgs/navigation/businessspace_white.png


BIN
public/imgs/navigation/businessspace_yellow.png


BIN
public/imgs/navigation/cadimg_white.png


BIN
public/imgs/navigation/cadimg_yellow.png


BIN
public/imgs/navigation/equip_white.png


BIN
public/imgs/navigation/equip_yellow.png


BIN
public/imgs/navigation/project_white.png


BIN
public/imgs/navigation/project_yellow.png


BIN
public/imgs/navigation/relationview_white.png


BIN
public/imgs/navigation/relationview_yellow.png


BIN
public/imgs/navigation/systemgraph_white.png


BIN
public/imgs/navigation/systemgraph_yellow.png


BIN
public/imgs/navigation/systemor_white.png


BIN
public/imgs/navigation/systemor_yellow.png


+ 25 - 23
public/systemConf.js

@@ -42,41 +42,43 @@ var __systemConf = {
     "name": "信息录入工具",
     "orders": 1,
     children: [{
+        "id": "projectmanage",
+        "name": "项目信息",
+        "orders": 6,
+        "path": "/project/manage",
+        "icon": "project"
+      }, {
       "id": "build_floor",
-      "name": "建筑楼层管理",
+      "name": "建筑楼层",
       "orders": 2,
       "path": "/ready/buildfloor",
       "type": "menu",
-      "icon": "icon-jianzhu"
+      "icon": "build"
     },{
-      "id": "equipment",
-      "name": "设备台账",
+      "id": "businessspaceledger",
+      "name": "业务空间",
       "orders": 3,
-      "path": "/ledger/facility"
+      "path": "/ledger/spacelist",
+      "icon": "businessspace"
     },{
-      "id": "businessspaceledger",
-      "name": "业务空间台账",
+      "id": "equipment",
+      "name": "设备",
       "orders": 3,
-      "path": "/ledger/spacelist"
+      "path": "/ledger/facility",
+      "icon": "equip"
     },
     {
       "id": "system",
-      "name": "系统台账",
+      "name": "系统",
       "orders": 4,
-      "path": "/ledger/list"
+      "path": "/ledger/list",
+      "icon": "systemor"
     },{
       "id": "overview",
-      "name": "全部关系总览",
+      "name": "关系",
       "orders": 5,
       "path": "/relation/overview",
-      "icon": "icon-jiqixuexi-"
-    }
-    ,{
-      "id": "projectmanage",
-      "name": "项目信息管理",
-      "orders": 6,
-      "path": "/project/manage",
-      "icon": "icon-jiqixuexi-"
+      "icon": "relationview"
     }
   ]
   }, {
@@ -85,10 +87,10 @@ var __systemConf = {
     "orders": 6,
     children: [{
       "id": "CADtuzhiguanli",
-      "name": "CAD核查图纸管理",
+      "name": "CAD图纸核查",
       "orders": 7,
       "path": "/deliveryTools/cadDrawingManage",
-      "icon": "icon-topology"
+      "icon": "cadimg"
     }]
   }, {
     "id": "draw",
@@ -96,10 +98,10 @@ var __systemConf = {
     "orders": 8,
     children: [{
       "id": "xitongtubianji",
-      "name": "系统图编辑工具",
+      "name": "系统图",
       "orders": 9,
       "path": "/systemGraph",
-      "icon": "icon-topology"
+      "icon": "systemgraph"
     }]
   }]
 };

+ 24 - 12
src/components/frame/leftMenu.vue

@@ -4,14 +4,14 @@
       :index="menu.orders.toString()"
       v-if="menu.children && menu.children.length > 0"
     >
-      <template slot="title">
+      <!-- <template slot="title">
         <i
           class="menuIcon"
-          :class="'iconfont ' + menu.icon"
+          :class="'leftMenuIconfont ' + menu.icon"
           v-if="!!menu.icon"
         ></i>
         <span v-text="menu.name"></span>
-      </template>
+      </template> -->
       <leftMenu
         :menu="subMenu"
         v-for="subMenu in menu.children"
@@ -22,12 +22,20 @@
       :index="menu.path"
       v-if="!menu.children || menu.children.length == 0"
     >
-      <i
+      <!-- <i
         class="menuIcon"
-        :class="'iconfont ' + menu.icon"
+        :class="'leftMenuIconfont ' + menu.icon"
         v-if="!!menu.icon"
-      ></i>
-      <span slot="title" v-text="menu.name"></span>
+      ></i> -->
+      <img :src="menu.state == 'normal' ? menu.normalImg : menu.activeImg" />
+      <span
+        slot="title"
+        v-text="menu.name"
+        style="margin-left: 6px"
+        :style="{
+          color: menu.state == 'normal' ? 'white' : 'rgb(255, 208, 75)',
+        }"
+      ></span>
     </el-menu-item>
   </div>
 </template>
@@ -36,11 +44,15 @@ export default {
   name: "leftMenu",
   props: ["menu"],
   data() {
-    return {};
+    return {
+      routerPath: "",
+    };
   },
   computed: {},
-  methods: {},
-  created() {},
+  methods: {
+  },
+  created() {
+  },
 
   mounted() {},
   components: {},
@@ -51,8 +63,8 @@ export default {
 .menuIcon {
   margin-right: 6px;
   color: #fff;
-  width: 16px;
-  height:16px;
+  width: 20px;
+  height: 20px;
 }
 </style>
 

+ 1 - 0
src/components/frame/pageLeft.vue

@@ -94,6 +94,7 @@ export default {
   -moz-osx-font-smoothing: grayscale;
   color: #ffffff;
   margin-left: 88px;
+  cursor: pointer;
 }
 
 .logoDiv {

+ 2 - 2
src/components/frame/pageRight.vue

@@ -23,11 +23,11 @@
             <i class="el-icon-switch-button"></i>
             <span class="user-pro-oper">退出登录</span>
           </div>
-          <div class="userPropLine"></div>
+          <!-- <div class="userPropLine"></div>
           <div class="userPropUpPass">
             <i class="el-icon-unlock"></i>
             <span class="user-pro-oper">修改密码</span>
-          </div>
+          </div> -->
 
           <div class="userInfo" slot="reference">
             <span v-text="user.name"></span>

+ 1 - 1
src/components/old-adm/businessSpaceLedger/spaceadd/index.vue

@@ -5,7 +5,7 @@
       <el-select
         v-model="showType"
         @change="initTable"
-        style="width: 125px; margin-right: 10px; vertical-align: bottom"
+        style="width: 140px; margin-right: 10px; vertical-align: bottom"
       >
         <el-option
           v-for="item in showTypes"

+ 1 - 1
src/components/old-adm/business_space/business/handsontable.vue

@@ -24,7 +24,7 @@
       <el-select
         v-model="showType"
         @change="handleChangeShowType"
-        style="width: 100px; margin-right: 10px; vertical-align: bottom"
+        style="width: 140px; margin-right: 10px; vertical-align: bottom"
       >
         <el-option
           v-for="item in showTypes"

+ 5 - 0
src/components/old-adm/business_space/newGraphy/canvasFun.vue

@@ -182,4 +182,9 @@ export default {
     }
   }
 }
+
+#canvas-actions-box>div{
+  line-height: 2;
+  padding: 0 10px !important;
+}
 </style>

+ 13 - 11
src/components/old-adm/business_space/newGraphy/graphy.vue

@@ -1,21 +1,23 @@
 <template>
   <div id="graphy" ref="graphy" v-loading="canvasLoading">
-    <div v-show="!FloorMap">
-      <!-- 平面图其他分区 -->
-      <!-- <div style="margin-right:10px;width: 100%;margin-bottom: 10px" v-if="showOtherFlag">
-        <el-button type="primary" @click="addZoneBtn">添加分区</el-button>
-        <el-select v-model="OtherValue" placeholder="请选择分区类型" @change="changeOtherZone">
-          <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
-          </el-option>
-        </el-select>
-      </div> -->
+    <!-- <div v-show="!FloorMap">
       <div
         class="center"
-        style="height: 400px; padding-top: 182px; box-sizing: border-box"
+        style="height: 400px; padding-top: 182px; box-sizing: border-box;text-align: center; margin: 0 auto;"
       >
         <i class="icon-wushuju iconfont"></i>
-        暂无数据
+        请选择建筑楼层
       </div>
+    </div> -->
+    <div
+      class="middle_sty"
+      style="height: 91%; text-align: center"
+      v-show="!FloorMap"
+    >
+      <p>
+        <i class="icon-wushuju iconfont"></i>
+        请选择建筑楼层
+      </p>
     </div>
     <div class="canvas-box" v-show="FloorMap">
       <canvas

+ 1 - 1
src/components/old-adm/ledger/components/handsontables/assets.vue

@@ -28,7 +28,7 @@
       <el-select
         v-model="showType"
         @change="initTable"
-        style="width: 130px; margin-right: 10px; vertical-align: bottom"
+        style="width: 140px; margin-right: 10px; vertical-align: bottom"
       >
         <el-option
           v-for="item in showTypes"

+ 2 - 2
src/components/old-adm/ledger/components/handsontables/device.vue

@@ -1659,9 +1659,9 @@ export default {
   top: -6px;
 }
 </style>
-<style lang="less">
+<style lang="less" scoped>
 .hanson-bar {
-  height: 40px;
+  // height: 40px;
   padding: 5px 0;
   font-size: 14px;
   overflow: hidden;

+ 2 - 2
src/components/old-adm/ledger/components/handsontables/system.vue

@@ -30,7 +30,7 @@
       <el-select
         v-model="showType"
         @change="handleChangeShowType"
-        style="width: 100px; margin-right: 10px; vertical-align: bottom"
+        style="width: 140px; margin-right: 10px; vertical-align: bottom"
       >
         <el-option
           v-for="item in showTypes"
@@ -1027,7 +1027,7 @@ export default {
   top: -6px;
 }
 </style>
-<style lang="less">
+<style lang="less" scoped>
 .hanson-bar {
   height: 52px;
   padding: 5px 0;

+ 1 - 1
src/components/old-adm/ledger/facility/addfacility.vue

@@ -5,7 +5,7 @@
       <el-select
         v-model="showType"
         @change="initTable"
-        style="width: 125px; margin-right: 10px; vertical-align: bottom"
+        style="width: 140px; margin-right: 10px; vertical-align: bottom"
       >
         <el-option
           v-for="item in showTypes"

+ 1 - 1
src/components/old-adm/ledger/facility/parts/index.vue

@@ -21,7 +21,7 @@
       <el-select
         v-model="showType"
         @change="initTable"
-        style="width: 100px; margin-right: 10px; vertical-align: bottom"
+        style="width: 140px; margin-right: 10px; vertical-align: bottom"
       >
         <el-option
           v-for="item in showTypes"

+ 1 - 1
src/components/old-adm/ledger/facility/partsmanage/addparts/index.vue

@@ -10,7 +10,7 @@
         <el-select
           v-model="showType"
           @change="initTable"
-          style="width: 100px; margin-right: 10px; vertical-align: bottom"
+          style="width: 140px; margin-right: 10px; vertical-align: bottom"
         >
           <el-option
             v-for="item in showTypes"

+ 1 - 1
src/components/old-adm/ledger/facility/partsmanage/index.vue

@@ -25,7 +25,7 @@
       <el-select
         v-model="showType"
         @change="initTable"
-        style="width: 100px; margin-right: 10px; vertical-align: bottom"
+        style="width: 140px; margin-right: 10px; vertical-align: bottom"
       >
         <el-option
           v-for="item in showTypes"

+ 1 - 1
src/components/old-adm/ledger/system/addsystem.vue

@@ -12,7 +12,7 @@
           :disabled="showType === 'all'"
           v-model="showType"
           @change="initTable"
-          style="width: 125px; margin-right: 10px; vertical-align: bottom"
+          style="width: 140px; margin-right: 10px; vertical-align: bottom"
         >
           <el-option
             v-for="item in showTypes"

+ 482 - 397
src/components/old-adm/ready/buildfloor/index.vue

@@ -1,48 +1,84 @@
 <template>
-    <div id="bd-fl-manage">
-        <el-row>
-            <div class="l-list">
-                <div class="action-box">
-                    <div>
-                        <el-button @click="addBuild" icon="el-icon-plus" size="small" type="default" />
-                        <el-button @click="delBuild" icon="el-icon-minus" size="small" type="default" :disabled="!buildList.length" />
-                        <el-button @click="editBuild" icon="el-icon-edit-outline" size="small" type="default" :disabled="!buildList.length" />
-                    </div>
-                </div>
-                <h4>建筑</h4>
-                <div class="build-list">
-                    <div
-                        :class="{ 'floor-item': true, active: item.active }"
-                        :key="item.id"
-                        @click="changeBuild(index)"
-                        style="cursor: pointer"
-                        v-for="(item, index) in buildList"
-                    >
-                        <span>
-                            {{ item.localName || item.name }}
-                            <el-badge :value="item.count" class="mark" v-if="item.count > 0" />
-                        </span>
-                    </div>
-                </div>
-            </div>
-            <div class="r-table" v-if="buildList.length > 0">
-                <div class="action-box">
-                    <el-button @click="addFloor" size="small" type="default">添加楼层 </el-button>
-                </div>
-                <div class="table-box">
-                    <el-table :data="tableData" :header-cell-style="headerStyle" height="100%" style="width: 100%" v-loading="loading">
-                        <el-table-column label="楼层本地名">
-                            <template slot-scope="scope">{{ scope.row.localName }}</template>
-                        </el-table-column>
-                        <el-table-column label="楼层顺序号">
-                            <template slot-scope="scope">{{ scope.row.floorSequenceID }}</template>
-                        </el-table-column>
-                        <el-table-column label="楼层信息">
-                            <template slot-scope="scope">
-                                <el-button @click="editFloorData(scope.row)" icon="el-icon-edit-outline" plain size="mini"></el-button>
-                            </template>
-                        </el-table-column>
-                        <el-table-column label="平面图" prop="dataSource">
+  <div id="bd-fl-manage">
+    <el-row>
+      <div class="l-list">
+        <div class="action-box">
+          <div>
+            <el-button
+              @click="addBuild"
+              icon="el-icon-plus"
+              size="small"
+              type="default"
+            />
+            <el-button
+              @click="delBuild"
+              icon="el-icon-minus"
+              size="small"
+              type="default"
+              :disabled="!buildList.length"
+            />
+            <el-button
+              @click="editBuild"
+              icon="el-icon-edit-outline"
+              size="small"
+              type="default"
+              :disabled="!buildList.length"
+            />
+          </div>
+        </div>
+        <h4>建筑</h4>
+        <div class="build-list">
+          <div
+            :class="{ 'floor-item': true, active: item.active }"
+            :key="item.id"
+            @click="changeBuild(index)"
+            style="cursor: pointer"
+            v-for="(item, index) in buildList"
+          >
+            <span>
+              {{ item.localName || item.name }}
+              <el-badge
+                :value="item.count"
+                class="mark"
+                v-if="item.count > 0"
+              />
+            </span>
+          </div>
+        </div>
+      </div>
+      <div class="r-table" v-if="buildList.length > 0">
+        <div class="action-box">
+          <el-button @click="addFloor" size="small" type="default"
+            >添加楼层
+          </el-button>
+        </div>
+        <div class="table-box">
+          <el-table
+            :data="tableData"
+            :header-cell-style="headerStyle"
+            height="100%"
+            style="width: 100%"
+            v-loading="loading"
+          >
+            <el-table-column label="楼层本地名">
+              <template slot-scope="scope">{{ scope.row.localName }}</template>
+            </el-table-column>
+            <el-table-column label="楼层顺序号">
+              <template slot-scope="scope">{{
+                scope.row.floorSequenceID
+              }}</template>
+            </el-table-column>
+            <el-table-column label="楼层信息">
+              <template slot-scope="scope">
+                <el-button
+                  @click="editFloorData(scope.row)"
+                  icon="el-icon-edit-outline"
+                  plain
+                  size="mini"
+                ></el-button>
+              </template>
+            </el-table-column>
+            <!-- <el-table-column label="平面图" prop="dataSource">
                             <template slot-scope="scope">
                                 <p @click="checkDrawImg(scope.row, 2)" v-if="scope.row.sign > 0">
                                     <el-badge is-dot>
@@ -65,34 +101,61 @@
                                 <span style="margin-right: 20px">{{ scope.row.floorThroughList ? scope.row.floorThroughList.length : 0 }}</span>
                                 <el-button @click="changeConnection(scope.row)" icon="el-icon-edit-outline" plain size="mini" />
                             </template>
-                        </el-table-column>
-                        <el-table-column label="操作" prop="action">
-                            <template slot-scope="scope">
-                                <el-button @click="handleDelete(scope.row)" icon="el-icon-delete" plain size="mini" type="danger" />
-                            </template>
-                        </el-table-column>
-                    </el-table>
-                </div>
-            </div>
-            <div v-else class="r-table">
-                <div class="center" style="margin-top: 300px"><i class="icon-wushuju iconfont"></i> 请先在左侧创建建筑</div>
-            </div>
-        </el-row>
-        <!-- 添加-修改楼层 -->
-        <addFloor :curBuildId="curBuildId" :curFloorId="curFloorId" :title="floorTitle" @refresh="refresh" ref="addFloorDialog" />
-        <!-- 添加-修改建筑 :currentType="currentType"-->
-        <addBuild :buildTitle="buildTitle" ref="addBuildDialog" :buildMessage="buildMessage" @handleBuild="handleBuild" />
-        <!-- 删除建筑-删除楼层 -->
-        <el-dialog :visible.sync="delDialogVis" @close="handleClose" id="messageDialog" title="提示" width="20%">
-            <div>确定要删除该{{ delText }}?</div>
-            <span class="dialog-footer" slot="footer">
-                <el-button @click="delDialogVis = false" size="small">取消</el-button>
-                <el-button @click="confirmDel" size="small" type="primary">确认</el-button>
-            </span>
-        </el-dialog>
-        <!-- 添加贯通关系弹窗 -->
-        <addConnectivity @refresh="refresh" ref="addConnectivity" />
-    </div>
+                        </el-table-column> -->
+            <el-table-column label="操作" prop="action">
+              <template slot-scope="scope">
+                <el-button
+                  @click="handleDelete(scope.row)"
+                  icon="el-icon-delete"
+                  plain
+                  size="mini"
+                  type="danger"
+                />
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+      <div v-else class="r-table">
+        <div class="center" style="margin-top: 300px">
+          <i class="icon-wushuju iconfont"></i> 请先在左侧创建建筑
+        </div>
+      </div>
+    </el-row>
+    <!-- 添加-修改楼层 -->
+    <addFloor
+      :curBuildId="curBuildId"
+      :curFloorId="curFloorId"
+      :title="floorTitle"
+      @refresh="refresh"
+      ref="addFloorDialog"
+    />
+    <!-- 添加-修改建筑 :currentType="currentType"-->
+    <addBuild
+      :buildTitle="buildTitle"
+      ref="addBuildDialog"
+      :buildMessage="buildMessage"
+      @handleBuild="handleBuild"
+    />
+    <!-- 删除建筑-删除楼层 -->
+    <el-dialog
+      :visible.sync="delDialogVis"
+      @close="handleClose"
+      id="messageDialog"
+      title="提示"
+      width="20%"
+    >
+      <div>确定要删除该{{ delText }}?</div>
+      <span class="dialog-footer" slot="footer">
+        <el-button @click="delDialogVis = false" size="small">取消</el-button>
+        <el-button @click="confirmDel" size="small" type="primary"
+          >确认</el-button
+        >
+      </span>
+    </el-dialog>
+    <!-- 添加贯通关系弹窗 -->
+    <addConnectivity @refresh="refresh" ref="addConnectivity" />
+  </div>
 </template>
 
 <script>
@@ -105,363 +168,385 @@ import DicController from "@/controller/old-adm/dicController";
 import ScanController from "@/controller/old-adm/ScanController";
 
 export default {
-    components: {
-        addFloor,
-        addBuild,
-        addConnectivity,
+  components: {
+    addFloor,
+    addBuild,
+    addConnectivity,
+  },
+  data() {
+    return {
+      repetitionGraphyVisible: false, // 替换平面图弹窗
+      floorTitle: "添加楼层",
+      buildTitle: "添加建筑",
+      delDialogVis: false,
+      delText: "建筑",
+      headerStyle: {
+        backgroundColor: "#d9d9d9",
+        color: "#2b2b2b",
+        lineHeight: "30px",
+      },
+      buildList: [],
+      tableData: [],
+      page: {
+        pageSize: 500,
+        pageSizes: [10, 20, 50, 100],
+        pageNumber: 1,
+        total: 0,
+      },
+      loading: false, //列表loading
+      curBuildId: "", //当前选中的建筑id
+      curBuildName: "", //当前选中建筑的名称
+      curFloorId: "", //当前选中的楼层id
+      modelId: "",
+      buildMessage: {},
+      selectedBuildIndex: 0,
+    };
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"]),
+  },
+  mounted() {},
+  created() {
+    this.init();
+    this.handleBuildQuery();
+    this.handleSearchBuildKey();
+  },
+  methods: {
+    init() {
+      let bdParam = {
+        orders: "localName asc",
+        pageNumber: 1,
+        pageSize: 500,
+      };
+      ScanController.buildingQueryAndCount(bdParam).then((res) => {
+        this.buildList = res.content;
+        if (this.buildList.length) {
+          // 如果存在建筑id,则将当前选择建筑置为该建筑
+          if (this.$route.query.buildingId) {
+            this.selectedBuildIndex = this.buildList.findIndex(
+              (item) => item.id === this.$route.query.buildingId
+            );
+          }
+          this.changeBuild(
+            this.selectedBuildIndex > this.buildList.length - 1
+              ? 0
+              : this.selectedBuildIndex
+          );
+        }
+      });
     },
-    data() {
-        return {
-            repetitionGraphyVisible: false, // 替换平面图弹窗
-            floorTitle: "添加楼层",
-            buildTitle: "添加建筑",
-            delDialogVis: false,
-            delText: "建筑",
-            headerStyle: {
-                backgroundColor: "#d9d9d9",
-                color: "#2b2b2b",
-                lineHeight: "30px",
-            },
-            buildList: [],
-            tableData: [],
-            page: {
-                pageSize: 500,
-                pageSizes: [10, 20, 50, 100],
-                pageNumber: 1,
-                total: 0,
-            },
-            loading: false, //列表loading
-            curBuildId: "", //当前选中的建筑id
-            curBuildName: "", //当前选中建筑的名称
-            curFloorId: "", //当前选中的楼层id
-            modelId: "",
-            buildMessage: {},
-            selectedBuildIndex: 0,
-        };
+    //change build
+    changeBuild(index) {
+      this.selectedBuildIndex = index;
+      this.buildList.map((item) => {
+        item.active = false;
+        return item;
+      });
+      this.buildList[index].active = true;
+      this.curBuildId = this.buildList[index].id;
+      this.curBuildName =
+        this.buildList[index].localName || this.buildList[index].name;
+      this.getFloorTableData();
+      this.$forceUpdate();
     },
-    computed: {
-        ...mapGetters("layout", ["projectId"]),
+    //add build
+    addBuild() {
+      // this.$message.warning("开发中...");
+      // return;
+      this.buildTitle = "添加建筑";
+      this.$refs.addBuildDialog.showDialog();
+      this.handleSearchBuildKey();
     },
-    mounted() {},
-    created() {
-        this.init();
-        this.handleBuildQuery();
-        this.handleSearchBuildKey();
-    },
-    methods: {
-        init() {
-            let bdParam = {
-                orders: "localName asc",
-                pageNumber: 1,
-                pageSize: 500,
-            };
-            ScanController.buildingQueryAndCount(bdParam).then((res) => {
-                this.buildList = res.content;
-                if (this.buildList.length) {
-                    // 如果存在建筑id,则将当前选择建筑置为该建筑
-                    if (this.$route.query.buildingId) {
-                        this.selectedBuildIndex = this.buildList.findIndex((item) => item.id === this.$route.query.buildingId);
-                    }
-                    this.changeBuild(this.selectedBuildIndex > this.buildList.length - 1 ? 0 : this.selectedBuildIndex);
-                }
-            });
-        },
-        //change build
-        changeBuild(index) {
-            this.selectedBuildIndex = index;
-            this.buildList.map((item) => {
-                item.active = false;
-                return item;
-            });
-            this.buildList[index].active = true;
-            this.curBuildId = this.buildList[index].id;
-            this.curBuildName = this.buildList[index].localName || this.buildList[index].name;
-            this.getFloorTableData();
-            this.$forceUpdate();
-        },
-        //add build
-        addBuild() {
-            // this.$message.warning("开发中...");
-            // return;
-            this.buildTitle = "添加建筑";
-            this.$refs.addBuildDialog.showDialog();
-            this.handleSearchBuildKey();
-        },
-        handleSearchBuildKey() {
-            let params = {
-                type: "building",
-                pageNumber: 1,
-                pageSize: 1000,
-                orders: "sort asc, name desc",
-            };
-            DicController.getDataDictionary(params).then((res) => {
-                let first = {};
-                //一级循环出来一级标签
-                let list = res.content.filter((i) => i.firstName !== "工作历" && i.firstName !== "能耗信息" && i.firstName !== "人员信息");
-                list.map((item) => {
-                    // console.table(item.category, item.dataType)
-                    const category = ["ENUM", "MENUM", "BOOLEAN"];
-                    if (item.category == "STATIC" && item.dataType.includes(category) && item.dataSource) {
-                        item.options = item.dataSource;
-                        item.props = {
-                            value: "code",
-                            label: "name",
-                            children: "content",
-                            checkStrictly: true,
-                        };
-                    }
-                    if (first[item.firstName] && first[item.firstName].length) {
-                    } else {
-                        first[item.firstName] = [];
-                    }
-                    if (item.path !== "infos.areaTree") {
-                        //DefaultQRCode,BuildQRCode 不再维护
-                        first[item.firstName].push({
-                            InfoPointName: item.name,
-                            InfoPointCode: item.code,
-                            Visible: item.visible,
-                            UnDisabled: item.unDisabled,
-                            SecondName: item.secondName ? item.secondName : "",
-                            options: item.dataSource,
-                            props: item.props,
-                            Unit: item.unit,
-                            Path: item.path,
-                            dataType: item.dataType,
-                            category: item.category,
-                            editable: item.editable,
-                        });
-                    }
-                });
-                this.buildMessage = first;
-            });
-        },
-        //delete build ,根据id删除建筑信息
-        delBuild() {
-            this.delText = "建筑";
-            this.delDialogVis = true;
-        },
-        //edit build
-        editBuild() {
-            this.buildTitle = "编辑建筑";
-            this.handleSearchBuildKey();
-            let list = this.currentBuildList.filter((i) => i.id === this.curBuildId);
-            let obj = {};
-            for (let i = 0; i < list.length; i++) {
-                obj = list[i];
-            }
-            this.$refs.addBuildDialog.showDialog(obj);
-        },
-        handleFile(val, name) {},
-        // handleBuild 获取建筑信息
-        handleBuild(val) {
-            let newform = tools.formatData(val);
-            let Param = {
-                content: [newform],
-            };
-            if (newform.id) {
-                ScanController.objectUpdateBuild(Param).then((res) => {
-                    this.$message.success("更新成功");
-                    this.$refs.addBuildDialog.closeDialog();
-                });
-            } else {
-                ScanController.objectCreateBuild(Param).then((res) => {
-                    this.$message.success("创建成功");
-                    this.$refs.addBuildDialog.closeDialog();
-                });
-            }
-            setTimeout(() => {
-                this.handleBuildQuery();
-                this.init();
-            }, 500);
-        },
-        //delete floor
-        handleDelete(floor) {
-            this.delText = "楼层";
-            this.delDialogVis = true;
-            this.curFloorId = floor.id;
-        },
-        //确认删除弹窗关闭
-        handleClose() {},
-        addFloor() {
-            this.curFloorId = "";
-            this.floorTitle = "添加楼层";
-            this.$refs.addFloorDialog.showDialog();
-        },
-        // 获取列表
-        getFloorTableData() {
-            let floorParam = {
-                cascade: [{ name: "floorThroughList" }],
-                orders: "floorSequenceID desc",
-                pageNumber: this.page.pageNumber,
-                pageSize: this.page.pageSize,
-                filters: `buildingId='${this.curBuildId}'`,
-            };
-            ScanController.floorQueryAndSign(floorParam).then((res) => {
-                this.tableData = res.content;
-                this.page.total = res.total;
-            });
-        },
-        // 创建楼层成功-修改关系成功
-        refresh() {
-            this.getFloorTableData();
-        },
-        // 确认删除(删除建筑-楼层公用)
-        confirmDel() {
-            if (this.delText == "楼层") {
-                let delParam = [{ id: this.curFloorId }];
-                this.delDialogVis = false;
-                ScanController.deleteFloorInfo(delParam).then((res) => {
-                    this.$message.success("删除成功");
-                    this.init();
-                });
-            } else {
-                // 删除建筑
-                if (this.tableData && this.tableData.length) {
-                    this.$message.error("当前建筑中包含楼层,不可删除");
-                    this.delDialogVis = false;
-                } else {
-                    let param = [{ id: this.curBuildId }];
-                    this.delDialogVis = false;
-                    ScanController.deleteBuildInfo(param).then((res) => {
-                        this.$message.success("删除成功");
-                        this.handleBuildQuery();
-                        this.init();
-                    });
-                }
-            }
-        },
-        // 修改楼层信息
-        editFloorData(floor) {
-            this.floorTitle = "编辑楼层信息";
-            this.curFloorId = floor.id;
-            this.$refs.addFloorDialog.showDialog(floor);
-        },
-        // 修改楼层贯通关系
-        changeConnection(row) {
-            this.$refs.addConnectivity.showDialog();
-            this.$refs.addConnectivity.floor = row;
-        },
-        // 查看平面图
-        checkDrawImg(row, index) {
-            if (3 == index) {
-                this.modelId = "";
-            } else if (index == 1) {
-                this.modelId = row.infos.floorMap;
-            } else {
-                this.modelId = row.modelId;
-            }
-            const pa = { modelId: this.modelId, FloorID: row.id, BuildID: row.buildingId, BuildName: this.curBuildName, FloorName: row.localName };
-            this.$router.push({ name: "repetitionGraphy", query: pa });
-        },
-        //  查询建筑信息
-        handleBuildQuery() {
-            let param = {
-                projectId: this.projectId,
-                orders: "localName asc",
-                pageNumber: 1,
-                pageSize: 500,
+    handleSearchBuildKey() {
+      let params = {
+        type: "building",
+        pageNumber: 1,
+        pageSize: 1000,
+        orders: "sort asc, name desc",
+      };
+      DicController.getDataDictionary(params).then((res) => {
+        let first = {};
+        //一级循环出来一级标签
+        let list = res.content.filter(
+          (i) =>
+            i.firstName !== "工作历" &&
+            i.firstName !== "能耗信息" &&
+            i.firstName !== "人员信息"
+        );
+        list.map((item) => {
+          // console.table(item.category, item.dataType)
+          const category = ["ENUM", "MENUM", "BOOLEAN"];
+          if (
+            item.category == "STATIC" &&
+            item.dataType.includes(category) &&
+            item.dataSource
+          ) {
+            item.options = item.dataSource;
+            item.props = {
+              value: "code",
+              label: "name",
+              children: "content",
+              checkStrictly: true,
             };
-            ScanController.objectQueryBuild(param).then((res) => {
-                this.currentBuildList = res.content;
+          }
+          if (first[item.firstName] && first[item.firstName].length) {
+          } else {
+            first[item.firstName] = [];
+          }
+          if (item.path !== "infos.areaTree") {
+            //DefaultQRCode,BuildQRCode 不再维护
+            first[item.firstName].push({
+              InfoPointName: item.name,
+              InfoPointCode: item.code,
+              Visible: item.visible,
+              UnDisabled: item.unDisabled,
+              SecondName: item.secondName ? item.secondName : "",
+              options: item.dataSource,
+              props: item.props,
+              Unit: item.unit,
+              Path: item.path,
+              dataType: item.dataType,
+              category: item.category,
+              editable: item.editable,
             });
-        },
+          }
+        });
+        this.buildMessage = first;
+      });
+    },
+    //delete build ,根据id删除建筑信息
+    delBuild() {
+      this.delText = "建筑";
+      this.delDialogVis = true;
+    },
+    //edit build
+    editBuild() {
+      this.buildTitle = "编辑建筑";
+      this.handleSearchBuildKey();
+      let list = this.currentBuildList.filter((i) => i.id === this.curBuildId);
+      let obj = {};
+      for (let i = 0; i < list.length; i++) {
+        obj = list[i];
+      }
+      this.$refs.addBuildDialog.showDialog(obj);
     },
-    watch: {
-        projectId() {
+    handleFile(val, name) {},
+    // handleBuild 获取建筑信息
+    handleBuild(val) {
+      let newform = tools.formatData(val);
+      let Param = {
+        content: [newform],
+      };
+      if (newform.id) {
+        ScanController.objectUpdateBuild(Param).then((res) => {
+          this.$message.success("更新成功");
+          this.$refs.addBuildDialog.closeDialog();
+        });
+      } else {
+        ScanController.objectCreateBuild(Param).then((res) => {
+          this.$message.success("创建成功");
+          this.$refs.addBuildDialog.closeDialog();
+        });
+      }
+      setTimeout(() => {
+        this.handleBuildQuery();
+        this.init();
+      }, 500);
+    },
+    //delete floor
+    handleDelete(floor) {
+      this.delText = "楼层";
+      this.delDialogVis = true;
+      this.curFloorId = floor.id;
+    },
+    //确认删除弹窗关闭
+    handleClose() {},
+    addFloor() {
+      this.curFloorId = "";
+      this.floorTitle = "添加楼层";
+      this.$refs.addFloorDialog.showDialog();
+    },
+    // 获取列表
+    getFloorTableData() {
+      let floorParam = {
+        cascade: [{ name: "floorThroughList" }],
+        orders: "floorSequenceID desc",
+        pageNumber: this.page.pageNumber,
+        pageSize: this.page.pageSize,
+        filters: `buildingId='${this.curBuildId}'`,
+      };
+      ScanController.floorQueryAndSign(floorParam).then((res) => {
+        this.tableData = res.content;
+        this.page.total = res.total;
+      });
+    },
+    // 创建楼层成功-修改关系成功
+    refresh() {
+      this.getFloorTableData();
+    },
+    // 确认删除(删除建筑-楼层公用)
+    confirmDel() {
+      if (this.delText == "楼层") {
+        let delParam = [{ id: this.curFloorId }];
+        this.delDialogVis = false;
+        ScanController.deleteFloorInfo(delParam).then((res) => {
+          this.$message.success("删除成功");
+          this.init();
+        });
+      } else {
+        // 删除建筑
+        if (this.tableData && this.tableData.length) {
+          this.$message.error("当前建筑中包含楼层,不可删除");
+          this.delDialogVis = false;
+        } else {
+          let param = [{ id: this.curBuildId }];
+          this.delDialogVis = false;
+          ScanController.deleteBuildInfo(param).then((res) => {
+            this.$message.success("删除成功");
+            this.handleBuildQuery();
             this.init();
-        },
+          });
+        }
+      }
+    },
+    // 修改楼层信息
+    editFloorData(floor) {
+      this.floorTitle = "编辑楼层信息";
+      this.curFloorId = floor.id;
+      this.$refs.addFloorDialog.showDialog(floor);
+    },
+    // 修改楼层贯通关系
+    changeConnection(row) {
+      this.$refs.addConnectivity.showDialog();
+      this.$refs.addConnectivity.floor = row;
+    },
+    // 查看平面图
+    checkDrawImg(row, index) {
+      if (3 == index) {
+        this.modelId = "";
+      } else if (index == 1) {
+        this.modelId = row.infos.floorMap;
+      } else {
+        this.modelId = row.modelId;
+      }
+      const pa = {
+        modelId: this.modelId,
+        FloorID: row.id,
+        BuildID: row.buildingId,
+        BuildName: this.curBuildName,
+        FloorName: row.localName,
+      };
+      this.$router.push({ name: "repetitionGraphy", query: pa });
+    },
+    //  查询建筑信息
+    handleBuildQuery() {
+      let param = {
+        projectId: this.projectId,
+        orders: "localName asc",
+        pageNumber: 1,
+        pageSize: 500,
+      };
+      ScanController.objectQueryBuild(param).then((res) => {
+        this.currentBuildList = res.content;
+      });
     },
+  },
+  watch: {
+    projectId() {
+      this.init();
+    },
+  },
 };
 </script>
 <style lang="less" scoped>
 #bd-fl-manage {
-    overflow: hidden;
-    height: 100%;
-    position: relative;
+  overflow: hidden;
+  height: 100%;
+  position: relative;
 
-    .el-row {
-        height: 100%;
+  .el-row {
+    height: 100%;
 
-        .el-col-4 {
-            width: 17%;
-        }
+    .el-col-4 {
+      width: 17%;
+    }
 
-        .el-col-20 {
-            width: 82%;
-        }
+    .el-col-20 {
+      width: 82%;
+    }
 
-        & > div {
-            float: left;
-            height: 100%;
-            overflow: hidden;
-            background-color: #fff;
-            box-sizing: border-box;
-            border: 1px solid #dfe6ec;
+    & > div {
+      float: left;
+      height: 100%;
+      overflow: hidden;
+      background-color: #fff;
+      box-sizing: border-box;
+      border: 1px solid #dfe6ec;
 
-            .action-box {
-                padding: 10px;
+      .action-box {
+        padding: 10px;
 
-                .el-button--small {
-                    padding: 10px 11px;
-                }
-            }
+        .el-button--small {
+          padding: 10px 11px;
         }
+      }
+    }
 
-        .l-list {
-            width: 17%;
-            overflow-y: auto;
+    .l-list {
+      width: 17%;
+      overflow-y: auto;
 
-            h4 {
-                padding-left: 10px;
-                border-top: 1px solid #d9d9d9;
-                border-bottom: 1px solid #d9d9d9;
-                background: #d9d9d9;
-                color: #2b2b2b;
-                line-height: 44px;
-            }
+      h4 {
+        padding-left: 10px;
+        border-top: 1px solid #d9d9d9;
+        border-bottom: 1px solid #d9d9d9;
+        background: #d9d9d9;
+        color: #2b2b2b;
+        line-height: 44px;
+      }
 
-            .build-list {
-                line-height: 48px;
+      .build-list {
+        line-height: 48px;
 
-                .floor-item {
-                    white-space: nowrap;
-                    overflow: hidden;
-                    text-overflow: ellipsis;
+        .floor-item {
+          white-space: nowrap;
+          overflow: hidden;
+          text-overflow: ellipsis;
 
-                    span {
-                        margin-left: 10px;
-                    }
-                }
+          span {
+            margin-left: 10px;
+          }
+        }
 
-                .floor-item.active,
-                .floor-item:hover {
-                    background-color: #f5f7fa;
-                    color: #000;
-                }
-            }
+        .floor-item.active,
+        .floor-item:hover {
+          background-color: #f5f7fa;
+          color: #000;
         }
+      }
+    }
 
-        .r-table {
-            width: 82%;
-            margin-left: 1%;
+    .r-table {
+      width: 82%;
+      margin-left: 1%;
 
-            .table-box {
-                height: calc(100% - 54px);
-                margin-bottom: 8px;
+      .table-box {
+        height: calc(100% - 54px);
+        margin-bottom: 8px;
 
-                .iconfont {
-                    vertical-align: middle;
-                }
+        .iconfont {
+          vertical-align: middle;
+        }
 
-                /deep/ .el-badge__content.is-fixed {
-                    transform: translateY(-6%) translateX(-100%);
-                }
+        /deep/ .el-badge__content.is-fixed {
+          transform: translateY(-6%) translateX(-100%);
+        }
 
-                p {
-                    cursor: pointer;
-                }
-            }
+        p {
+          cursor: pointer;
         }
+      }
     }
+  }
 }
 </style>

+ 2 - 0
src/components/systemGraph/edit.vue

@@ -1128,6 +1128,7 @@ export default {
 #divGraphEdit .delBtn {
   float: right;
   margin-right: 49px;
+  cursor: pointer;
 }
 
 #divGraphEdit .imgBar {
@@ -1297,6 +1298,7 @@ export default {
   position: absolute;
   bottom: 16px;
   margin-left: 62px;
+  cursor: pointer;
 }
 
 #divGraphEdit .rightDetail .selectPrefix {

+ 2 - 6
src/components/systemGraph/graph.vue

@@ -155,11 +155,8 @@ export default {
           //关闭右侧详情框
           this.$emit("closeright");
         });
+
         pixiContainer.appendChild(pixiApp.view);
-        // pixiApp.stage.interactive = true;
-        // pixiApp.view.on("click", (event) => {
-        //   alert(1);
-        // });
         _this.pixiApp = pixiApp;
       } else pixiApp = _this.pixiApp;
 
@@ -254,7 +251,7 @@ export default {
       });
 
       //画线
-      _this.lineArr.forEach((_cLine) => {
+      _this.lineArr.forEach((_cLine, _index) => {
         var lineColor = "0x" + _cLine.style.lineColor.substring(1);
         var lineInstance = new PIXI.Graphics();
         lineInstance.lineStyle(_cLine.style.lineWidth, lineColor, 1, 0, false);
@@ -285,7 +282,6 @@ export default {
           _this.isClickGraphNode = true;
           _this.clickEventCall(event, 2);
         });
-
         pixiApp.stage.addChild(lineInstance);
       });
     },

+ 3 - 3
src/store/index.js

@@ -59,11 +59,11 @@ export default new Vuex.Store({
             function find(menus) {
                 for (let i = 0; i < menus.length; i++) {
                     let currMenu = menus[i];
-                    if (currMenu.url == breadcrumb.to) {
+                    if (currMenu.path == breadcrumb.to) {
                         return currMenu;
                     }
-                    if (currMenu.child && currMenu.child.length > 0) {
-                        let findMenu = find(currMenu.child);
+                    if (currMenu.children && currMenu.children.length > 0) {
+                        let findMenu = find(currMenu.children);
                         if (findMenu) {
                             newBreadcrumbs.push({
                                 label: findMenu.name,

+ 23 - 3
src/utils/authUtils.ts

@@ -30,11 +30,13 @@ export class authUtils {
     if (vueStore.state.user.id) {
       //更新面包屑数据
       vueStore.commit("updateBreadcrumbs", { to: to.path });
+      var prefitxMenuImg = "/" + (window as any).__systemConf.baseRouteUrl + '/imgs/navigation/';
+      var leftMenus = constructorMenu(vueStore.state.menus);
+      vueStore.commit("updateMenus", leftMenus);
       return next();
     }
-
     let userInfoResult = await userController.getUserInfoById();
-    
+
     if (userInfoResult.result != logicConfig.resultObj.success) {
       console.error("获取用户信息失败,原因:" + userInfoResult.message);
       return next({ path: logicConfig.routerNameConfig.loginRouteName });
@@ -50,7 +52,10 @@ export class authUtils {
       id: _userInfo.id,
       name: _userInfo.name,
     });
-    vueStore.commit("updateMenus", _userInfo.menus || (window as any).__systemConf.menus);
+
+    var prefitxMenuImg = "/" + (window as any).__systemConf.baseRouteUrl + '/imgs/navigation/';
+    var leftMenus = constructorMenu(_userInfo.menus || (window as any).__systemConf.menus);
+    vueStore.commit("updateMenus", leftMenus);
 
     //更新面包屑数据
     vueStore.commit("updateBreadcrumbs", { to: to.path });
@@ -70,5 +75,20 @@ export class authUtils {
     vueStore.commit("updateSelectProject", projects[0]);
 
     next();
+
+
+    function constructorMenu(menus) {
+      menus.forEach(_c => {
+        if (_c.children && _c.children.length > 0) {
+          _c.children = constructorMenu(_c.children);
+        } else {
+          _c.normalImg = prefitxMenuImg + _c.icon + '_white.png';
+          _c.activeImg = prefitxMenuImg + _c.icon + '_yellow.png';
+          _c.state = to.path == _c.path ? 'active' : 'normal';
+        }
+      });
+      return menus;
+    };
+
   }
 }