Browse Source

Merge branch 'develop' of http://39.106.8.246:3003/web/wanda-bm-guide into develop-yx

yunxing 4 years ago
parent
commit
e388e4e1f3

+ 1 - 1
package.json

@@ -6,7 +6,7 @@
         "host": "60.205.177.43",
         "path": "/root/apps/web/wandaBmGuide",
         "user": "root",
-        "password": "WWW.sagacloud.mail@2020",
+        "password": "cGVyc2FneV8yMDIwbGFic2wlIyQ=",
         "local": "wandaBmGuide"
     },
     "scripts": {

File diff suppressed because it is too large
+ 1061 - 924
src/components/floorMap/darkColorIndex.vue


+ 22 - 0
src/components/floorMap/index.vue

@@ -97,6 +97,8 @@
             <a>查看</a>
           </li>
         </ul>
+        <!-- 提示文本 -->
+        <div class="wellTooltip" v-show="isclickShopName">该电井为{{isclickShopName}}商铺提供供电</div>
         <div style="text-align: right; margin-top: 10px">
           <el-button
             v-show="showBtnWell"
@@ -256,6 +258,7 @@ export default {
       statusDisabled: ["已拆除"], //禁止跳转的设备状态
       roomKey: 1,
       shopsList: [], //所有强电井对应的店铺
+      isclickShopName:'', //是否是点击商铺后电井高亮
     };
   },
   props: {
@@ -339,6 +342,9 @@ export default {
           ) {
             //判断是否为电井
             this.showBtnWell = true;
+            setTimeout(()=>{
+              item.selected = true
+            },300)
           }
           setTimeout(() => {
             this.visible = true;
@@ -630,6 +636,7 @@ export default {
               clientY: point.y,
             },
           ];
+          this.isclickShopName = item.name ? item.name + '—'+ item.data.Name :'xxx —'+ item.data.Name ;
           this.handleClickLegendItem(wellItem, event, true);
         });
       } else {
@@ -853,6 +860,7 @@ export default {
                     -1
                   ) {
                     item.highLightFlag = true;
+
                     // item.zOrder = 30;
                     shopsnumItemList.push(item);
                   }
@@ -866,6 +874,11 @@ export default {
     },
     // 清除电井关联商铺的高亮状态
     clearHightLight() {
+      this.isclickShopName = '';
+           // 所有电井置为 select = false
+      this.topologyParser.imageLegendList.forEach((eqItem) => {
+        eqItem.selected = false;
+      });
       ItemColor.spaceHighColor = new SColor("#FBF2CC");
       // for (let key in this.wellMap) {
       //     this.wellMap[key].forEach((item) => {
@@ -1185,4 +1198,13 @@ a:hover {
     opacity: 0.5;
   }
 }
+.wellTooltip{
+  background: #FEEAD2;
+  margin-left: 12px;
+  height: 22px;
+  line-height: 22px;
+  display: inline-block;
+  padding: 0px 12px 0 12px;
+  color: #B26206;
+}
 </style>

+ 19 - 12
src/components/menuList.vue

@@ -36,23 +36,19 @@
     <div class="home-right">
       <span
         @click="dumpLegend"
-        v-show="
-          permissions ? permissions.includes('GLSMS_SYMBOL_MANAGE') : false
-        "
+        v-show="permissions ? permissions.includes('GLSMS_SYMBOL_MANAGE') : false"
       >
         <img class="img1" src="../assets/imgs/scj.png" alt />
-        <span class="span1" :style="showStyle?'color:#fff':''">图例库</span>
+        <span class="span1" :style="showStyle ? 'color:#fff' : ''">图例库</span>
       </span>
 
       <span
         @click="toDrafts"
         class="span-out"
-        v-show="
-          permissions ? permissions.includes('GLSMS_PLANARGRAPH_MANAGE') : false
-        "
+        v-show="permissions ? permissions.includes('GLSMS_PLANARGRAPH_MANAGE') : false"
       >
         <img class="img2" src="../assets/imgs/cgx.png" alt />
-        <span class="span2" :style="showStyle?'color:#fff':''">草稿箱</span>
+        <span class="span2" :style="showStyle ? 'color:#fff' : ''">草稿箱</span>
         <span class="span2-num" v-if="draftNum && draftNum <= 99">{{
           draftNum
         }}</span>
@@ -65,7 +61,9 @@
       </span>
       <span>
         <img class="img3" src="../assets/imgs/clock.png" alt />
-        <span class="span3" :style="showStyle?'color:#fff':''">{{ times }}</span>
+        <span class="span3" :style="showStyle ? 'color:#fff' : ''">{{
+          times
+        }}</span>
       </span>
       <div class="checkkout" v-show="showStyleBtn">
         <img
@@ -80,7 +78,7 @@
         />
         <div
           class="tip"
-          :style="{ color: !showStyle ? '#8e9298' : '#69c4df' }"
+          :style="{ color: !showStyle ? '#8e9298' : '#69c4df','white-space':'nowrap' }"
           @click="checkColor"
         >
           {{ !showStyle ? "切换驾驶舱" : "切换项目首页" }}
@@ -368,7 +366,10 @@ export default {
     }
   }
   .home-style {
+    display: flex;
+    justify-content: space-between;
     background: linear-gradient(180deg, #103979 0%, #162653 100%);
+    margin-right: 0px;
     .downright {
       position: absolute;
       width: 0;
@@ -391,6 +392,7 @@ export default {
       margin: 0 8px;
       cursor: pointer;
       transition: all 0.2s;
+      flex: 1;
     }
     .is-active {
       color: #025baa;
@@ -404,12 +406,15 @@ export default {
     }
   }
   .btnlist-style {
+    display: flex;
+    align-content: center;
     & > div {
       line-height: 48px;
       text-align: center;
       background: url("../assets/imgs/btn-rect.png") no-repeat;
       float: left;
-      width: 142px;
+      max-width: 142px;
+      min-width: 100px;
       height: 48px;
       margin: 0 8px;
       cursor: pointer;
@@ -424,7 +429,7 @@ export default {
   }
   .home-right {
     float: right;
-    margin-right: 20px;
+    margin-right: 40px;
     line-height: 48px;
     color: #646c73;
     font-size: 14px;
@@ -464,6 +469,8 @@ export default {
 }
 .menu-style {
   background: #0c102c;
+  display: flex;
+  justify-content: space-between;
 }
 .checkkout {
   display: flex;

+ 5 - 4
src/views/homepage/Circle.js

@@ -10,15 +10,16 @@ export class SCircle {
      *
      * @param {canvasid} id
      */
-    constructor(id) {
+    constructor(id,radius =60) {
         const canvas = document.getElementById(id);
         this.ctx = canvas.getContext("2d");
         this.percent = 100;  //最终百分比
         this.circleX = canvas.width / 2;  //中心x坐标
         this.circleY = canvas.height / 2;  //中心y坐标
-        this.radius = 60; //圆环半径
+        this.radius = radius; //圆环半径
         this.lineWidth = 5;  //圆形线条的宽度
-        this.fontSize = 40; //字体大小
+        this.fontSize = radius *3/4; //字体大小
+        this.baseName = '本月总任务'
     }
 
     /**
@@ -55,7 +56,7 @@ export class SCircle {
         this.ctx.textAlign = 'center';
         this.ctx.textBaseline = 'middle';
         this.ctx.fillStyle = '#ffffff';
-        this.ctx.fillText("本月总任务", this.circleX, this.circleY + this.fontSize * 3 / 4);
+        this.ctx.fillText(this.baseName, this.circleX, this.circleY + this.fontSize * 3 / 4);
         this.ctx.stroke();
     }
 

+ 108 - 64
src/views/homepage/darkColor.vue

@@ -41,7 +41,7 @@
                     class="number"
                     v-for="(equip, index) in item.assetTypeList"
                     :key="index"
-                    @click='navToInnerPage(item, equip)'
+                    @click="navToInnerPage(item, equip)"
                   >
                     <div class="title">
                       <P
@@ -151,9 +151,9 @@
           </div>
         </div>
         <div class="feng-map" ref="fengmap">
-          <div class="lcgn-title">
+          <!-- <div class="lcgn-title">
             <span class="span1">{{ floorInfo.code }}</span>
-          </div>
+          </div> -->
           <floorMap
             ref="floorMap"
             :loadName="loadName"
@@ -162,11 +162,11 @@
           ></floorMap>
           <!-- 图例 -->
           <div class="legend-boxs">
-            <Legend
+            <!-- <Legend
               :floors="floorsArr"
               type="1"
               :editTips="`编辑${floorInfo.code}层楼层功能平面图`"
-            ></Legend>
+            ></Legend> -->
             <floor-list
               v-if="floorsArr.length > 0"
               :floorsArr="floorsArr"
@@ -197,12 +197,8 @@
             </div>
           </div>
           <div class="box-bottom">
-            <div class="circle">
-              <canvas
-                :id="'canvas_' + item.type"
-                width="150"
-                height="150"
-              ></canvas>
+            <div class="circle canvas-circle">
+              <canvas :id="'canvas_' + item.type"></canvas>
             </div>
             <div class="msg">
               <div class="msg-item">
@@ -287,6 +283,7 @@ export default {
         { id: "1007", name: "燃气系统" },
         { id: "1008", name: "土建装饰" },
       ],
+      canvasCircle: 0, //圆的半径
     };
   },
   computed: {
@@ -303,7 +300,12 @@ export default {
           : moment().format("YYYY")
       ).then((res) => {
         const TYPE = statisticItem.type; // 类型
-        const circle = new SCircle(`canvas_${TYPE}`);
+        const circle = new SCircle(`canvas_${TYPE}`, this.canvasCircle * 0.7);
+        let circle_basename = null;
+        statisticItem.type == 1
+          ? (circle_basename = "本月总任务")
+          : (circle_basename = "本年总任务");
+        circle.baseName = circle_basename;
         // 总数
         let total = 0;
         // 即将预期
@@ -326,8 +328,7 @@ export default {
         circle.setText(total);
       });
     },
-
-     expandRestItems(item, index) {
+    expandRestItems(item, index) {
       this.systemList.forEach((eq) => {
         if (eq.smsxt !== item.smsxt) {
           eq.expand = false;
@@ -432,8 +433,15 @@ export default {
       }
     },
     // 点击跳转
-    navToInnerPage (item, equip) {
-      this.$router.push({path:"./analysis", query:{smsxt:item.smsxt, equipId: equip.category_code, module:'core'}})
+    navToInnerPage(item, equip) {
+      this.$router.push({
+        path: "./analysis",
+        query: {
+          smsxt: item.smsxt,
+          equipId: equip.category_code,
+          module: "core",
+        },
+      });
     },
 
     /**
@@ -495,39 +503,59 @@ export default {
     },
     // 获取右侧统计数据
     getRightstatic() {
-      // 对右侧数据做遍历
-      this.statisticsList.forEach((statisticItem) => {
-        this.projectStatistics(
-          statisticItem.type,
-          statisticItem.system,
-          statisticItem.type == 1
-            ? moment().format("YYYYMM")
-            : moment().format("YYYY")
-        ).then((res) => {
+      // 设置圆环半径
+        const BoxDom = document.getElementsByClassName("canvas-circle")[0];
+        this.canvasCircle = 0;
+        if (BoxDom.offsetHeight > BoxDom.offsetWidth) {
+          this.canvasCircle = BoxDom.offsetWidth / 2;
+        } else {
+          this.canvasCircle = BoxDom.offsetHeight / 2;
+        }
+        // 对右侧数据做遍历
+        this.statisticsList.forEach((statisticItem) => {
           const TYPE = statisticItem.type; // 类型
-          const circle = new SCircle(`canvas_${TYPE}`);
-          // 总数
-          let total = 0;
-          // 即将预期
-          let due_num = 0;
-          //  未完成任务
-          let unfinished = 0;
-          // 累计统计
-          res.data.forEach((item) => {
-            total = total + item.total;
-            due_num = due_num + item.due_num;
-            unfinished = unfinished + item.unfinished;
-          });
-          // 赋值
-          Object.assign(statisticItem, {
-            total,
-            due_num,
-            unfinished,
+          const Dom = document.getElementById(`canvas_${TYPE}`);
+          // 设置Dom得width\height
+          Dom.height = this.canvasCircle * 2;
+          Dom.width = this.canvasCircle * 2;
+          this.projectStatistics(
+            statisticItem.type,
+            statisticItem.system,
+            statisticItem.type == 1
+              ? moment().format("YYYYMM")
+              : moment().format("YYYY")
+          ).then((res) => {
+            let circle_basename = null;
+            statisticItem.type == 1
+              ? (circle_basename = "本月总任务")
+              : (circle_basename = "本年总任务");
+            const circle = new SCircle(
+              `canvas_${TYPE}`,
+              this.canvasCircle * 0.7
+            );
+            circle.baseName = circle_basename;
+            // 总数
+            let total = 0;
+            // 即将预期
+            let due_num = 0;
+            //  未完成任务
+            let unfinished = 0;
+            // 累计统计
+            res.data.forEach((item) => {
+              total = total + item.total;
+              due_num = due_num + item.due_num;
+              unfinished = unfinished + item.unfinished;
+            });
+            // 赋值
+            Object.assign(statisticItem, {
+              total,
+              due_num,
+              unfinished,
+            });
+            circle.persentTransform(total, due_num, unfinished);
+            circle.setText(total);
           });
-          circle.persentTransform(total, due_num, unfinished);
-          circle.setText(total);
         });
-      });
     },
   },
   created() {
@@ -563,7 +591,8 @@ export default {
     box-sizing: border-box;
     display: flex;
     .system-main-title {
-      width: 152px;
+      min-width: 130px;
+      max-width: 200px;
       height: 40px;
       background: rgba(22, 73, 206, 0.36);
       line-height: 40px;
@@ -597,6 +626,15 @@ export default {
       .system-list {
         height: ~"calc(100% - 44px)";
         overflow-y: auto;
+        &::-webkit-scrollbar-track {
+          background: rgba(22, 73, 206, 0.3);
+          border-radius: 2px;
+        }
+        &::-webkit-scrollbar-thumb {
+          background: rgba(22, 73, 206, 0.8);
+          border-radius: 10px;
+          border: none;
+        }
         ul {
           li.system-item {
             position: relative;
@@ -712,6 +750,12 @@ export default {
             /deep/ .p-select-header {
               background: #cccccc !important;
             }
+            /deep/ .p-select-cursor-input {
+              color: #ffffff !important;
+              &::-webkit-input-placeholder {
+                color: #ffffff !important;
+              }
+            }
           }
           li:hover {
             border-color: #e4e5e7;
@@ -732,10 +776,9 @@ export default {
           li:nth-of-type(6) {
             .system-name {
               background: linear-gradient(
-                133deg,
-                rgba(57, 152, 219, 0.3) 0%,
-                rgba(112, 187, 239, 0.3),
-                100%
+                to left,
+                rgba(57, 152, 219, 0.3),
+                rgba(112, 187, 239, 0.3)
               );
               border-radius: 6px 0px 0px 6px;
             }
@@ -786,7 +829,7 @@ export default {
             height: 100%;
             .progress-list {
               height: 12px;
-              background: #ccc;
+              background: rgba(56, 94, 204, 0.48);
               border-radius: 6px 6px;
               display: flex;
               margin-right: 30px;
@@ -817,7 +860,7 @@ export default {
               display: flex;
               margin-top: 28px;
               .legend-item {
-                margin-right: 30px;
+                margin-right: 25px;
                 display: flex;
                 align-items: center;
                 .legend-color {
@@ -926,7 +969,7 @@ export default {
       box-sizing: border-box;
       .box {
         width: 100%;
-        height: ~"calc(33% - 16px)";
+        height: ~"calc((100% - 30px) / 3)";
         background: radial-gradient(#20284f 20%, transparent 20%) 0 0;
         background-color: transparent;
         background-size: 8px 8px;
@@ -950,14 +993,21 @@ export default {
           // padding-top: 36px;
           box-sizing: border-box;
           display: flex;
+          position: relative;
+          align-items: center;
+          height: calc(100% - 52px);
           .circle {
-            width: 150px;
-            height: 150px;
+            max-width: 150px;
+            min-width: 120px;
+            height: 100%;
+            display: flex;
+            margin-left: 20px;
+            align-items: center;
           }
           .msg {
             flex: 1;
-            margin-top: 10px;
-            padding: 30px 0 0 30px;
+            padding: 0 0 0 20px;
+            white-space:nowrap;
             box-sizing: border-box;
             .msg-item:nth-of-type(1) {
               display: flex;
@@ -997,10 +1047,4 @@ export default {
     }
   }
 }
-/deep/ .p-select-option-box {
-  background: rgba(22, 73, 206, 0.36) !important;
-  .p-select-option-menu {
-    background: rgba(22, 73, 206, 0.36) !important;
-  }
-}
 </style>

+ 12 - 12
src/views/statistics/index.vue

@@ -308,8 +308,8 @@
             <thead>
               <tr>
                 <th width="10%">序号</th>
-                <th width="20%">中心</th>
-                <th width="20%">区域</th>
+                <th width="20%">大区 </th>
+                <th width="20%">城市公司</th>
                 <th width="20%">广场名称</th>
                 <th width="30%">异常原因</th>
               </tr>
@@ -335,7 +335,7 @@
             <thead>
               <tr>
                 <th width="10%">序号</th>
-                <th width="20%">大区</th>
+                <th width="20%">大区 </th>
                 <th width="20%">城市公司</th>
                 <th width="20%">广场名称</th>
                 <th width="30%">异常原因</th>
@@ -1162,7 +1162,7 @@ export default {
           };
         },
       }).addTo(myMaps);
-
+ 
       if (this.currentLevel === 1) {
         //1集团
         this.pantGroupMap(this.currentZoneData, this.currentSysId);
@@ -1205,7 +1205,6 @@ export default {
      */
     openMaskPanel(system) {
       let target = this.getDataByCityCcode(this.selectedZone)
-      console.log('target',target)
       if (target) {
         this.currentDialogLevel = target.level
         this.currentLevel = target.level
@@ -1229,7 +1228,7 @@ export default {
           });
         }
       });
-
+ 
       if (this.tabData.length) {
         this.activeName = this.tabData[0].id;
         this.currentDialogTab = this.activeName;
@@ -1552,7 +1551,7 @@ export default {
         let marker = L.marker(center, { icon: textIcon }).addTo(groupLayer);
         let marker2 = L.marker(center, { icon: circleIcon }).addTo(groupLayer);
         let feaureGroup = L.featureGroup([marker, marker2]);
-
+       
         popup.on('add' , (ev) => {
            let popupDom = document.querySelectorAll('.leaflet-mypopup-content')[0]
            let tipDom = document.querySelectorAll('.leaflet-popup-tip')[0]
@@ -1564,7 +1563,7 @@ export default {
              tipDom.style.background="#09173E"
            }
         })
-
+      
         marker2.on("mouseover", (ev) => {
             popup.openOn(myMaps);
         });
@@ -1620,7 +1619,7 @@ export default {
           let item = data[i];
           if (item.is_exception_num) {
             html += `<div class="line">
-                            <span>${item.category_name}</span>
+                            <span>${item.category_name}</span> 
                             <span>${item.asset_num || "--"}${
               item.category_name === "屋面logo"
                 ? "个"
@@ -1634,7 +1633,7 @@ export default {
                 </div>`;
           } else {
             html += `<div class="line">
-                            <span>${item.category_name}</span>
+                            <span>${item.category_name}</span> 
                             <span>${item.asset_num || "--"}${
               item.category_name === "屋面logo"
                 ? "个"
@@ -1657,7 +1656,7 @@ export default {
 };
 </script>
 
-<style scoped lang="less">
+<style scoped lang="less">  
 @import "../../assets/css/dark.less";
 @import "../../assets/css/light.less";
 .dark-my-leaflet-div-icon{
@@ -1689,4 +1688,5 @@ export default {
   padding-top: 0;
 }
 
-</style>
+</style> 
+