فهرست منبع

设备分布数据调整

yf_zhb 2 سال پیش
والد
کامیت
cadac38438

+ 157 - 133
minggao/src/assets/icon/iconfont.css

@@ -1,12 +1,15 @@
 @font-face {
-  font-family: 'iconfont';  /* Project id 1738837 */
-  src: url('//at.alicdn.com/t/c/font_1738837_8v4lnlb9hs7.woff2?t=1675231909556') format('woff2'),
-       url('//at.alicdn.com/t/c/font_1738837_8v4lnlb9hs7.woff?t=1675231909556') format('woff'),
-       url('//at.alicdn.com/t/c/font_1738837_8v4lnlb9hs7.ttf?t=1675231909556') format('truetype');
+  font-family: 'iconfont'; /* Project id 1738837 */
+  src: url('//at.alicdn.com/t/c/font_1738837_8v4lnlb9hs7.woff2?t=1675231909556')
+      format('woff2'),
+    url('//at.alicdn.com/t/c/font_1738837_8v4lnlb9hs7.woff?t=1675231909556')
+      format('woff'),
+    url('//at.alicdn.com/t/c/font_1738837_8v4lnlb9hs7.ttf?t=1675231909556')
+      format('truetype');
 }
 
 .iconfont {
-  font-family: "iconfont" !important;
+  font-family: 'iconfont' !important;
   font-size: 16px;
   font-style: normal;
   -webkit-font-smoothing: antialiased;
@@ -14,514 +17,535 @@
 }
 
 .icon-yujing:before {
-  content: "\e663";
+  content: '\e663';
 }
 
 .icon-yujing1:before {
-  content: "\e87a";
+  content: '\e87a';
 }
 
 .icon-ceju:before {
-  content: "\e647";
+  content: '\e647';
 }
 
 .icon-zuidahua:before {
-  content: "\e640";
+  content: '\e640';
 }
 
 .icon-zuixiaohua:before {
-  content: "\e645";
+  content: '\e645';
 }
 
 .icon-didian:before {
-  content: "\e67e";
+  content: '\e67e';
 }
 
 .icon-minggaoshouye:before {
-  content: "\e750";
+  content: '\e750';
 }
 
 .icon-shezhi1:before {
-  content: "\e63b";
+  content: '\e63b';
 }
 
 .icon-xietongzhihuidaping:before {
-  content: "\e63c";
+  content: '\e63c';
 }
 
 .icon-database-full:before {
-  content: "\e940";
+  content: '\e940';
 }
 
 .icon-gongzuoguanli-dingdanguanli:before {
-  content: "\e632";
+  content: '\e632';
 }
 
 .icon-205yonghu_yonghu6:before {
-  content: "\e63e";
+  content: '\e63e';
 }
 
 .icon-203yonghu_yonghu4:before {
-  content: "\e63f";
+  content: '\e63f';
 }
 
 .icon-mimasuo:before {
-  content: "\e678";
+  content: '\e678';
 }
 
 .icon-jurassic_user:before {
-  content: "\e6a4";
+  content: '\e6a4';
 }
 
 .icon-mima2:before {
-  content: "\e64d";
+  content: '\e64d';
 }
 
 .icon-wenjian:before {
-  content: "\e631";
+  content: '\e631';
 }
 
 .icon-tongzhi:before {
-  content: "\e64c";
+  content: '\e64c';
 }
 
 .icon-yingyongzhongxin:before {
-  content: "\e62f";
+  content: '\e62f';
 }
 
 .icon-dingwei2:before {
-  content: "\e668";
+  content: '\e668';
 }
 
 .icon-keshihuaquanjing:before {
-  content: "\e644";
+  content: '\e644';
 }
 
 .icon-sanjiao1:before {
-  content: "\e600";
+  content: '\e600';
 }
 
 .icon-sanjiao3:before {
-  content: "\e601";
+  content: '\e601';
 }
 
 .icon-qian:before {
-  content: "\e643";
+  content: '\e643';
 }
 
 .icon-ball-camera-full:before {
-  content: "\e965";
+  content: '\e965';
 }
 
 .icon-xiugai:before {
-  content: "\e62e";
+  content: '\e62e';
 }
 
 .icon-wenshidapeng:before {
-  content: "\e665";
+  content: '\e665';
 }
 
 .icon-chumiaoqi:before {
-  content: "\e62d";
+  content: '\e62d';
 }
 
 .icon-fapiao:before {
-  content: "\e6b6";
+  content: '\e6b6';
 }
 
 .icon-jiance:before {
-  content: "\e6c3";
+  content: '\e6c3';
 }
 
 .icon-shiming:before {
-  content: "\e6d3";
+  content: '\e6d3';
 }
 
 .icon-daping:before {
-  content: "\e6d8";
+  content: '\e6d8';
 }
 
 .icon-shuizhi:before {
-  content: "\e6dc";
+  content: '\e6dc';
 }
 
 .icon-shujujiankong:before {
-  content: "\e62a";
+  content: '\e62a';
 }
 
 .icon-diannao2:before {
-  content: "\e64a";
+  content: '\e64a';
 }
 
 .icon-jiantou:before {
-  content: "\e639";
+  content: '\e639';
 }
 
 .icon-shuibeng:before {
-  content: "\e627";
+  content: '\e627';
 }
 
 .icon-shuiliang:before {
-  content: "\e692";
+  content: '\e692';
 }
 
 .icon-xiaomaijingyanguangaicanshu:before {
-  content: "\e630";
+  content: '\e630';
 }
 
 .icon-shuaxin:before {
-  content: "\e63d";
+  content: '\e63d';
 }
 
 .icon-duocengturangshangqing:before {
-  content: "\eb61";
+  content: '\eb61';
 }
 
 .icon-turangshidu:before {
-  content: "\eb26";
+  content: '\eb26';
 }
 
 .icon-turangwendu:before {
-  content: "\eb23";
+  content: '\eb23';
 }
 
 .icon-daqiyali:before {
-  content: "\eb27";
+  content: '\eb27';
 }
 
 .icon-kongqiwendu:before {
-  content: "\eb3a";
+  content: '\eb3a';
 }
 
 .icon-kongqishidu:before {
-  content: "\eb3b";
+  content: '\eb3b';
 }
 
 .icon-chongzhi1:before {
-  content: "\e604";
+  content: '\e604';
 }
 
 .icon-duigou:before {
-  content: "\e712";
+  content: '\e712';
 }
 
 .icon-dengpao:before {
-  content: "\e69e";
+  content: '\e69e';
 }
 
 .icon-pingtai:before {
-  content: "\e628";
+  content: '\e628';
 }
 
 .icon-shezhi:before {
-  content: "\e679";
+  content: '\e679';
 }
 
 .icon-shouye1:before {
-  content: "\e684";
+  content: '\e684';
 }
 
 .icon-caiwuguanli:before {
-  content: "\e6b0";
+  content: '\e6b0';
 }
 
 .icon-erweima:before {
-  content: "\e626";
+  content: '\e626';
 }
 
 .icon-cell-phone:before {
-  content: "\e624";
+  content: '\e624';
 }
 
 .icon-tongji2:before {
-  content: "\e646";
+  content: '\e646';
 }
 
 .icon-iconzhengli_shouxieqianpi:before {
-  content: "\e648";
+  content: '\e648';
 }
 
 .icon-shibie:before {
-  content: "\e603";
+  content: '\e603';
 }
 
 .icon-tongji1:before {
-  content: "\e642";
+  content: '\e642';
 }
 
 .icon-keshihuadaping:before {
-  content: "\e61c";
+  content: '\e61c';
 }
 
 .icon-tuichuguanbi:before {
-  content: "\e61d";
+  content: '\e61d';
 }
 
 .icon-zhaopianchakan:before {
-  content: "\e61b";
+  content: '\e61b';
 }
 
 .icon-tubiaorenwu:before {
-  content: "\e61a";
+  content: '\e61a';
 }
 
 .icon-dingwei1:before {
-  content: "\e619";
+  content: '\e619';
 }
 
 .icon-jidiguanli:before {
-  content: "\e618";
+  content: '\e618';
 }
 
 .icon-jidimianji:before {
-  content: "\e617";
+  content: '\e617';
 }
 
 .icon-jianlishijian:before {
-  content: "\e60d";
+  content: '\e60d';
 }
 
 .icon-luxiang:before {
-  content: "\e637";
+  content: '\e637';
 }
 
 .icon-banshou:before {
-  content: "\e65c";
+  content: '\e65c';
 }
 
 .icon-chandi:before {
-  content: "\eb24";
+  content: '\eb24';
 }
 
 .icon-jichu:before {
-  content: "\eb25";
+  content: '\eb25';
 }
 
 .icon-chidao:before {
-  content: "\eb44";
+  content: '\eb44';
 }
 
 .icon-rili:before {
-  content: "\e609";
+  content: '\e609';
 }
 
 .icon-fenlei:before {
-  content: "\e616";
+  content: '\e616';
 }
 
 .icon-quanping:before {
-  content: "\e656";
+  content: '\e656';
 }
 
 .icon-saomiaoshibie380:before {
-  content: "\e686";
+  content: '\e686';
 }
 
 .icon-tianjia:before {
-  content: "\e615";
+  content: '\e615';
 }
 
 .icon-tongji:before {
-  content: "\e636";
+  content: '\e636';
 }
 
 .icon-weimingming-34:before {
-  content: "\e60b";
+  content: '\e60b';
 }
 
 .icon-chouchongbug:before {
-  content: "\e6e1";
+  content: '\e6e1';
 }
 
 .icon-loufang:before {
-  content: "\e64f";
+  content: '\e64f';
 }
 
 .icon-diannao1:before {
-  content: "\e623";
+  content: '\e623';
 }
 
 .icon-tupian-xianxing:before {
-  content: "\e635";
+  content: '\e635';
 }
 
 .icon-xiangqing-:before {
-  content: "\e608";
+  content: '\e608';
 }
 
 .icon-mianji:before {
-  content: "\e602";
+  content: '\e602';
 }
 
 .icon-dianhua2:before {
-  content: "\e611";
+  content: '\e611';
 }
 
 .icon-dingwei:before {
-  content: "\e675";
+  content: '\e675';
 }
 
 .icon-bangding:before {
-  content: "\e784";
+  content: '\e784';
 }
 
 .icon-yonghu11:before {
-  content: "\e705";
+  content: '\e705';
 }
 
 .icon-yu:before {
-  content: "\e63a";
+  content: '\e63a';
 }
 
 .icon-thermometer_icon:before {
-  content: "\e67a";
+  content: '\e67a';
 }
 
 .icon-shidu:before {
-  content: "\e60a";
+  content: '\e60a';
 }
 
 .icon-xingzhuang:before {
-  content: "\e614";
+  content: '\e614';
 }
 
 .icon-dian:before {
-  content: "\e655";
+  content: '\e655';
 }
 
 .icon-wendu:before {
-  content: "\e660";
+  content: '\e660';
 }
 
 .icon-dingshi:before {
-  content: "\e77e";
+  content: '\e77e';
 }
 
 .icon-fangzhi:before {
-  content: "\e75c";
+  content: '\e75c';
 }
 
 .icon-shouye:before {
-  content: "\e61e";
+  content: '\e61e';
 }
 
 .icon-nongchangguanli:before {
-  content: "\e62c";
+  content: '\e62c';
 }
 
 .icon-shouhou:before {
-  content: "\e80e";
+  content: '\e80e';
 }
 
 .icon-xitong:before {
-  content: "\e60f";
+  content: '\e60f';
 }
 
 .icon-shujuzhanshi:before {
-  content: "\e621";
+  content: '\e621';
 }
 
 .icon-jidi:before {
-  content: "\e672";
+  content: '\e672';
 }
 
 .icon-zhuanjia:before {
-  content: "\e607";
+  content: '\e607';
 }
 
 .icon-nongshiguanli:before {
-  content: "\e60c";
+  content: '\e60c';
 }
 
 .icon-huanjingjiance:before {
-  content: "\e610";
+  content: '\e610';
 }
 
 .icon-shebei:before {
-  content: "\e622";
+  content: '\e622';
 }
 
 .icon-cebaoguanli:before {
-  content: "\e776";
+  content: '\e776';
 }
 
 .icon-suyuan:before {
-  content: "\e6e8";
+  content: '\e6e8';
 }
 
 .icon-jiankong:before {
-  content: "\e629";
+  content: '\e629';
 }
 
 .icon-xinxi1:before {
-  content: "\e64b";
+  content: '\e64b';
 }
 
 .icon-yonghu1:before {
-  content: "\e612";
+  content: '\e612';
 }
 
 .icon-mima1:before {
-  content: "\e620";
+  content: '\e620';
 }
 
 .icon-diannao:before {
-  content: "\e605";
+  content: '\e605';
 }
 
 .icon-biaoqian:before {
-  content: "\e634";
+  content: '\e634';
 }
 
 .icon-dizhi:before {
-  content: "\e606";
+  content: '\e606';
 }
 
 .icon-shijian:before {
-  content: "\e77c";
+  content: '\e77c';
 }
 
 .icon-yemiancaozuo:before {
-  content: "\e64e";
+  content: '\e64e';
 }
 
 .icon-yonghu:before {
-  content: "\e60e";
+  content: '\e60e';
 }
 
 .icon-iconfontedit:before {
-  content: "\e61f";
+  content: '\e61f';
 }
 
 .icon-chongzhi:before {
-  content: "\e633";
+  content: '\e633';
 }
 
 .icon-jinyong:before {
-  content: "\e641";
+  content: '\e641';
 }
 
 .icon-mima:before {
-  content: "\e638";
+  content: '\e638';
 }
 
 .icon-wendang:before {
-  content: "\e613";
+  content: '\e613';
 }
 
 .icon-shanchu:before {
-  content: "\e625";
+  content: '\e625';
 }
 
 .icon-icon_huabanfuben:before {
-  content: "\e62b";
+  content: '\e62b';
 }
 
 .icon-BAI-wuzi:before {
-  content: "\e69c";
+  content: '\e69c';
 }
 
 .icon-zhuti_tiaosepan_o:before {
-  content: "\eb6e";
+  content: '\eb6e';
 }
 
+@font-face {
+  font-family: 'minggao-iconfont'; /* Project id 3992730 */
+  src: url('//at.alicdn.com/t/c/font_3992730_6mzdxu54yex.woff2?t=1680568222390')
+      format('woff2'),
+    url('//at.alicdn.com/t/c/font_3992730_6mzdxu54yex.woff?t=1680568222390')
+      format('woff'),
+    url('//at.alicdn.com/t/c/font_3992730_6mzdxu54yex.ttf?t=1680568222390')
+      format('truetype');
+}
+
+.minggao-iconfont {
+  font-family: 'minggao-iconfont' !important;
+  font-size: 16px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+.minggao-icontuding:before {
+  content: '\e64c';
+}

BIN
minggao/src/assets/images/home/location-blue.png


BIN
minggao/src/assets/images/home/location-green.png


BIN
minggao/src/assets/images/home/location-orange.png


BIN
minggao/src/assets/images/home/location-red.png


BIN
minggao/src/assets/images/home/location-yellow.png


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 0
minggao/src/assets/images/home/location.svg


+ 74 - 0
minggao/src/components/Icon/index.vue

@@ -0,0 +1,74 @@
+<script>
+import Location from '@/assets/images/home/location.svg?raw';
+
+console.log(Location, ' icon component');
+
+const allSvgIcons = {
+  location: Location
+};
+
+export default {
+  props: {
+    type: {
+      type: String,
+      default: ''
+    },
+    theme: {
+      type: String,
+      default: 'light'
+    },
+    rounded: {
+      type: Boolean,
+      default: false
+    }
+  },
+  computed: {
+    icon() {
+      if (allSvgIcons[this.type]) {
+        return {
+          type: 'svg',
+          source: allSvgIcons[this.type]
+        };
+      }
+
+      return undefined;
+    }
+  }
+};
+</script>
+
+<template>
+  <i
+    :class="`app-icon ${this.theme || ''} ${this.rounded ? 'rounded' : ''}`"
+    v-html="icon.source"
+  ></i>
+</template>
+
+<style lang="less">
+.app-icon {
+  display: flex;
+  width: 1em;
+  height: 1em;
+  align-items: center;
+  justify-content: center;
+
+  &.dark {
+    background-color: #000;
+  }
+
+  &.light {
+    background-color: #fff;
+  }
+
+  &.rounded {
+    border-radius: 50%;
+    overflow: hidden;
+  }
+}
+
+.app-icon svg {
+  width: 1em;
+  height: 1em;
+  fill: currentColor;
+}
+</style>

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 368 - 339
minggao/src/page/forecasting/cbd/Cbd.vue


+ 9 - 1
minggao/src/page/home/index.vue

@@ -182,6 +182,7 @@
 <script>
 //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
 import QRCode from 'qrcodejs2';
+// import testData from './test';
 export default {
   //import引入的组件需要注入到对象中才能使用
   components: {},
@@ -290,6 +291,9 @@ export default {
         method: 'POST',
         url: '/api/api_gateway?method=sysmenage.usermanager.user_info'
       }).then(res => {
+        // 测试代码 ---- start
+        // res = { data: testData };
+        // --- end
         this.indexloading = false;
         this.app_url = res.data.data.app_url;
         this.imgurl = res.data.data.theme_info.logo_url;
@@ -303,7 +307,11 @@ export default {
         });
         // this.infodata = res.data.data.children;
         this.infodata = titleList;
-        console.log(this.routerdata);
+        console.log(
+          this.routerdata,
+          this.infodata,
+          '-------------------------- get'
+        );
         // this.infodata.shift();
         localStorage.setItem('userID', res.data.data.im_user_id); // 存储当前登录账号的ID
         this.username = res.data.data.username;

+ 387 - 0
minggao/src/page/home/test.js

@@ -0,0 +1,387 @@
+export default {
+  errorCode: 0,
+  message: '',
+  formError: {},
+  data: {
+    username: '超级管理员',
+    real_name: '超级管理员',
+    email: '131888888@qq.com',
+    mobile: '13188888888',
+    org_list: [],
+    role_list: [
+      {
+        role_id: 34,
+        role_list: '超级管理员'
+      }
+    ],
+    app_url: '/data/szmg/app/zwjk.apk',
+    user_type: 1,
+    children: [
+      {
+        pur_id: 1,
+        purview_name: '首页',
+        parent_perm_id: 0,
+        menu: '',
+        children: [
+          {
+            pur_id: 2,
+            purview_name: '设备分布',
+            parent_perm_id: 1,
+            menu: 'facilitydistribute'
+          },
+          {
+            pur_id: 3,
+            purview_name: '有害生物分布',
+            parent_perm_id: 1,
+            menu: 'pestdistribute'
+          }
+        ]
+      },
+      {
+        pur_id: 4,
+        purview_name: '指挥中心',
+        parent_perm_id: 0,
+        menu: '',
+        children: [
+          {
+            pur_id: 5,
+            purview_name: '任务管理',
+            parent_perm_id: 4,
+            menu: 'taskRegulator'
+          },
+          {
+            pur_id: 9,
+            purview_name: '实时通讯',
+            parent_perm_id: 4,
+            menu: 'realTime'
+          },
+          {
+            pur_id: 6,
+            purview_name: '实验室识别',
+            parent_perm_id: 4,
+            menu: 'laboratory'
+          }
+          // {
+          //   pur_id: 7,
+          //   purview_name: '监督管理',
+          //   parent_perm_id: 4,
+          //   menu: 'superviseAdmin'
+          // },
+          // {
+          //   pur_id: 8,
+          //   purview_name: '监督记录',
+          //   parent_perm_id: 4,
+          //   menu: 'superviserec'
+          // },
+
+          // {
+          //   pur_id: 40,
+          //   purview_name: '监测日志',
+          //   parent_perm_id: 4,
+          //   menu: 'superviseLog'
+          // }
+        ]
+      },
+      {
+        pur_id: 10,
+        purview_name: '监测点管理',
+        parent_perm_id: 0,
+        menu: '',
+        children: [
+          {
+            pur_id: 11,
+            purview_name: '林木害虫监测点',
+            parent_perm_id: 10,
+            menu: '',
+            children: [
+              {
+                pur_id: 12,
+                purview_name: '智能测报灯',
+                parent_perm_id: 11,
+                menu: 'cbd'
+                // children: [
+                //   {
+                //     pur_id: 32,
+                //     purview_name: '查看图片',
+                //     parent_perm_id: 12,
+                //     menu: 'DataPhotos',
+                //     children: [
+                //       {
+                //         pur_id: 41,
+                //         purview_name: '短信预警',
+                //         parent_perm_id: 32,
+                //         menu: 'messageWarn'
+                //       }
+                //     ]
+                //   },
+                //   {
+                //     pur_id: 33,
+                //     purview_name: '设备控制',
+                //     parent_perm_id: 12,
+                //     menu: ''
+                //   },
+                //   {
+                //     pur_id: 34,
+                //     purview_name: '害虫统计',
+                //     parent_perm_id: 12,
+                //     menu: 'pestsStats'
+                //   },
+                //   {
+                //     pur_id: 35,
+                //     purview_name: '数据详情',
+                //     parent_perm_id: 12,
+                //     menu: 'DataDetails'
+                //   },
+                //   {
+                //     pur_id: 36,
+                //     purview_name: '设备设置',
+                //     parent_perm_id: 12,
+                //     menu: ''
+                //   }
+                // ]
+              },
+              {
+                pur_id: 13,
+                purview_name: '风吸式太阳诱惑虫灯',
+                parent_perm_id: 11,
+                menu: 'cbd'
+              },
+              {
+                pur_id: 14,
+                purview_name: '林木害虫诱捕器',
+                parent_perm_id: 11,
+                menu: 'cbd'
+              }
+            ]
+          },
+          {
+            pur_id: 14,
+            purview_name: '实蝇监测点',
+            parent_perm_id: 10,
+            menu: '',
+            children: [
+              {
+                pur_id: 15,
+                purview_name: '实蝇诱捕器',
+                parent_perm_id: 14,
+                menu: 'trap'
+              },
+              {
+                pur_id: 16,
+                purview_name: '实蝇监测智能诱捕器',
+                parent_perm_id: 14,
+                menu: 'fillinrecord'
+              }
+              // {
+              //   pur_id: 17,
+              //   purview_name: '诱剂维护',
+              //   parent_perm_id: 14,
+              //   menu: 'bait'
+              // }
+            ]
+          },
+          {
+            pur_id: 18,
+            purview_name: '现场监控',
+            parent_perm_id: 10,
+            menu: '',
+            children: [
+              {
+                pur_id: 37,
+                purview_name: '监控',
+                parent_perm_id: 18,
+                menu: 'surveillancevideo',
+                children: [
+                  {
+                    pur_id: 38,
+                    purview_name: '查看图片',
+                    parent_perm_id: 37,
+                    menu: 'photoView'
+                  },
+                  {
+                    pur_id: 39,
+                    purview_name: '设置',
+                    parent_perm_id: 37,
+                    menu: ''
+                  }
+                ]
+              }
+            ]
+          }
+          // {
+          //   pur_id: 19,
+          //   purview_name: '监测点维护',
+          //   parent_perm_id: 10,
+          //   menu: 'maintain'
+          // }
+        ]
+      },
+      {
+        pur_id: 20,
+        purview_name: '监督记录',
+        parent_perm_id: 0,
+        menu: '',
+        children: [
+          {
+            pur_id: 21,
+            purview_name: '监督记录',
+            parent_perm_id: 20,
+            menu: 'superviseModule'
+          }
+        ]
+      },
+      {
+        pur_id: 22,
+        purview_name: '数据报表',
+        parent_perm_id: 0,
+        menu: '',
+        children: [
+          {
+            pur_id: 23,
+            purview_name: '监测任务统计',
+            parent_perm_id: 22,
+            menu: 'supervisiontask'
+          },
+          {
+            pur_id: 24,
+            purview_name: '监督任务统计',
+            parent_perm_id: 22,
+            menu: 'monitoringtask'
+          },
+          {
+            pur_id: 50,
+            purview_name: '样本鉴定记录',
+            parent_perm_id: 22,
+            menu: 'sampleAppraisal'
+          },
+          {
+            pur_id: 51,
+            purview_name: '样地调查',
+            parent_perm_id: 22,
+            menu: 'samplePlot'
+          },
+          {
+            pur_id: 52,
+            purview_name: '诱捕器调查记录',
+            parent_perm_id: 22,
+            menu: 'trapRecord'
+          },
+          {
+            pur_id: 53,
+            purview_name: '踏查记录',
+            parent_perm_id: 22,
+            menu: 'fieldSurveys'
+          }
+        ]
+      },
+      {
+        pur_id: 45,
+        purview_name: '预警管理',
+        parent_perm_id: 0,
+        menu: '',
+        children: [
+          {
+            pur_id: 46,
+            purview_name: '预警记录',
+            parent_perm_id: 45,
+            menu: 'warningrecord'
+          },
+          {
+            pur_id: 47,
+            purview_name: '预警设置',
+            parent_perm_id: 45,
+            menu: 'warningset'
+          }
+        ]
+      },
+      {
+        pur_id: 25,
+        purview_name: '系统设置',
+        parent_perm_id: 0,
+        menu: '',
+        children: [
+          {
+            pur_id: 26,
+            purview_name: '组织管理',
+            parent_perm_id: 25,
+            menu: 'customsManger'
+          },
+          {
+            pur_id: 27,
+            purview_name: '角色管理',
+            parent_perm_id: 25,
+            menu: 'role'
+          },
+          {
+            pur_id: 28,
+            purview_name: '用户管理',
+            parent_perm_id: 25,
+            menu: 'userManger'
+          },
+          {
+            pur_id: 29,
+            purview_name: '有害生物信息维护',
+            parent_perm_id: 25,
+            menu: 'harmfulBiology'
+          },
+          {
+            pur_id: 30,
+            purview_name: '主题定制',
+            parent_perm_id: 25,
+            menu: 'motif'
+          },
+          {
+            pur_id: 31,
+            purview_name: '日志管理',
+            parent_perm_id: 25,
+            menu: 'dayRecord'
+          },
+          {
+            pur_id: 48,
+            purview_name: '设备运行维护',
+            parent_perm_id: 25,
+            menu: 'equipmentOPS'
+          },
+          {
+            pur_id: 49,
+            purview_name: '系数设置',
+            parent_perm_id: 25,
+            menu: 'coefficientset'
+          }
+        ]
+      },
+      {
+        pur_id: 42,
+        purview_name: 'APP',
+        parent_perm_id: 0,
+        menu: '',
+        children: [
+          {
+            pur_id: 43,
+            purview_name: '我的任务',
+            parent_perm_id: 42,
+            menu: ''
+          },
+          {
+            pur_id: 44,
+            purview_name: '监督',
+            parent_perm_id: 42,
+            menu: ''
+          }
+        ]
+      }
+    ],
+    user_login_time: 1680485153,
+    myuid: 4,
+    id: 81,
+    theme_info: {
+      logo_url: '/data/szmg/img/base_photo/20230207091244.jpg',
+      sys_name: '智网监测',
+      copyright_info: '智网监测'
+    },
+    im_user_id: '1642571565000320'
+  },
+  params: {
+    token: 'Tl8bGyk9EP-TuuVigNvPTTg56ld9XsCfW8QwgHvEqSs='
+  }
+};

+ 41 - 11
minggao/src/page/homepage/facilitydistribute.vue

@@ -82,13 +82,25 @@
       <el-button @click="reset" size="mini">重置</el-button>
     </div>
     <div class="tallybox">
-      <div class="tallybox_item">
-        <img src="../../../static/images/homepage/cbd.png" alt="" />
+      <div
+        class="tallybox_item"
+        v-for="(item, key) in deviceTypeDataSource"
+        :key="key"
+      >
+        <!-- <img src="../../../static/images/homepage/cbd.png" alt="" /> -->
+        <!-- <d-icon type="location"></d-icon> -->
+        <i
+          class="minggao-iconfont minggao-icontuding"
+          :style="{ color: item.colour }"
+        ></i>
         <p>
-          智能测报灯:<span style="color: #27c2ff">{{ cbdnum }}台</span>
+          {{ item.type_name }}:<span
+            :style="{ color: item.colour || '#27c2ff' }"
+            >{{ item.num }}台</span
+          >
         </p>
       </div>
-      <div class="tallybox_item">
+      <!-- <div class="tallybox_item">
         <img src="../../../static/images/homepage/ybq.png" alt="" />
         <p>
           实蝇诱捕器:<span style="color: #ff00ff">{{ ybqnum }}台</span>
@@ -99,9 +111,9 @@
         <p>
           监控设备:<span style="color: #e94c3e">{{ jknum }}台</span>
         </p>
-      </div>
+      </div> -->
     </div>
-    <div
+    <!-- <div
       class="tracklistbox"
       v-loading="trackloading"
       element-loading-text="拼命加载中"
@@ -170,7 +182,7 @@
         @current-change="handleCurrentChange"
       >
       </el-pagination>
-    </div>
+    </div> -->
     <div class="piebox">
       <p
         :class="
@@ -308,9 +320,13 @@
 //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
 import * as echarts from 'echarts';
 import '../../../node_modules/echarts/map/js/china';
+import DIcon from '@/components/Icon';
+import { normalization } from '@/util/helpers';
+import { map, assign } from 'lodash-es';
+
 export default {
   //import引入的组件需要注入到对象中才能使用
-  components: {},
+  components: { DIcon },
   data() {
     //这里存放数据
     return {
@@ -391,7 +407,9 @@ export default {
       tracklistdata_backups: {},
       arealistmouse: {},
       trackloading: true,
-      isShowMonitorInfo: false
+      isShowMonitorInfo: false,
+      // 新增字段
+      deviceTypeDataSource: {}
     };
   },
   //监听属性 类似于data概念
@@ -623,7 +641,14 @@ export default {
           '/api/api_gateway?method=monitor_manage.home_map.home_map_device_type'
       }).then(res => {
         // console.log(res.data.data);
-        this.typeoptions = res.data.data;
+        this.typeoptions = res.data.data || [];
+
+        const deviceData = map(this.typeoptions, item => {
+          return assign({}, item, { num: 0 });
+        });
+
+        this.deviceTypeDataSource = normalization(deviceData, 'type_id');
+
         this.initmap();
         this.getbaselist();
       });
@@ -1034,10 +1059,15 @@ export default {
     left: 15px;
     background-color: rgba(255, 255, 255, 0.8);
     padding: 10px;
+    max-height: 220px;
+    overflow-y: auto;
+
     .tallybox_item {
       margin-bottom: 10px;
       display: flex;
       color: #333;
+      align-items: center;
+
       img {
         margin-right: 10px;
       }
@@ -1045,7 +1075,7 @@ export default {
   }
   .tracklistbox {
     position: absolute;
-    top: 180px;
+    top: 266px;
     left: 15px;
     background-color: rgba(255, 255, 255, 0.8);
     padding: 10px;

+ 5 - 0
minggao/src/util/helpers.js

@@ -0,0 +1,5 @@
+import { zipObject, map } from 'lodash-es';
+
+export function normalization(arr, key = 'id') {
+  return zipObject(map(arr, key), arr);
+}