jiawuxian 1 éve
szülő
commit
8b5d9dbf56

+ 296 - 88
public/map/config.js

@@ -3,15 +3,15 @@ let mapConfig = {
     map: "/map/fj.json",
     coordinates: () => {
       let arrays = [];
-      arrays.concat(mapConfig.漳州地区行社.coordinates);
-      arrays.concat(mapConfig.福州地区行社.coordinates);
-      arrays.concat(mapConfig.宁德地区行社.coordinates);
-      arrays.concat(mapConfig.厦门地区行社.coordinates);
-      arrays.concat(mapConfig.泉州地区行社.coordinates);
-      arrays.concat(mapConfig.三明地区行社.coordinates);
-      arrays.concat(mapConfig.南平地区行社.coordinates);
-      arrays.concat(mapConfig.龙岩地区行社.coordinates);
-      arrays.concat(mapConfig.莆田地区行社.coordinates);
+      arrays = arrays.concat(mapConfig.漳州地区行社.coordinates);
+      arrays = arrays.concat(mapConfig.福州地区行社.coordinates);
+      arrays = arrays.concat(mapConfig.宁德地区行社.coordinates);
+      arrays = arrays.concat(mapConfig.厦门地区行社.coordinates);
+      arrays = arrays.concat(mapConfig.泉州地区行社.coordinates);
+      arrays = arrays.concat(mapConfig.三明地区行社.coordinates);
+      arrays = arrays.concat(mapConfig.南平地区行社.coordinates);
+      arrays = arrays.concat(mapConfig.龙岩地区行社.coordinates);
+      arrays = arrays.concat(mapConfig.莆田地区行社.coordinates);
 
       return arrays;
     },
@@ -128,81 +128,280 @@ let mapConfig = {
       { name: "仙游农商银行", value: [118.703527, 25.361068, 10] },
     ],
   },
-  马尾农商行:{map:"/map/mawei.json", coordinates:[
-
-  ]},
-  鼓楼区农商行:{map:"/map/gulou.json", coordinates:[]},
-  三明农商银行:{map:"/map/sanming.json", coordinates:[{ name: "三明农商行", value: [117.643759, 26.265176, 10] },]},
-  上杭农商行:{map:"/map/shanghang.json", coordinates:[ { name: "上杭农商行", value: [116.44197, 25.049185, 10] },]},
-  东山联社:{map:"/map/dongshan.json", coordinates:[  { name: "东山县农联社", value: [117.432607, 23.713423, 10] },]},
-  云霄联社:{map:"/map/yunxiao.json", coordinates:[{ name: "云霄县农联社", value: [117.347455, 23.94945, 10] },]},
-  仙游农商银行:{map:"/map/xianyou.json", coordinates:[{ name: "仙游农商银行", value: [118.703527, 25.361068, 10] },]},
-  光泽农信联社:{map:"/map/guangzhe.json", coordinates:[{ name: "光泽县农联社", value: [117.341868, 27.549505, 10] },]},
-  华安县联社:{map:"/map/huaan.json", coordinates:[{ name: "华安县农联社", value: [117.586218, 24.998993, 10] },]},
-  南安农商行:{map:"/map/nanan.json", coordinates:[{ name: "南安农商行", value: [118.414307, 24.964234, 10] },]},
-  南平农商银行:{map:"/map/nanping.json", coordinates:[{ name: "南平农商行", value: [118.185343, 26.648297, 10] },]},
-  南靖县联社:{map:"/map/nanjing.json", coordinates:[{ name: "南靖县农联社", value: [117.37278, 24.523476, 10] },]},
-  厦门农商行:{map:"/map/xiameng.json", coordinates:[{ name: "厦门农商行", value: [118.159546, 24.485303, 10] }]},
-  古田农信联社:{map:"/map/gutian.json", coordinates:[{ name: "古田县农联社", value: [118.762266, 26.581451, 10] }]},
-  周宁县联社:{map:"/map/zhouning.json", coordinates:[{ name: "周宁县农联社", value: [119.439547, 26.987095, 10] },]},
-  大田县联社:{map:"/map/datian.json", coordinates:[{ name: "大田县农联社", value: [117.860583, 25.69679, 10] }]},
-  宁化县联社:{map:"/map/ninghua.json", coordinates:[{ name: "宁化县农联社", value: [116.671271, 26.255966, 10] }]},
-  宁德农商行:{map:"/map/ningde.json", coordinates:[{ name: "宁德农商行", value: [119.527258, 26.666208, 10] }]},
-  安溪农商银行:{map:"/map/anxi.json", coordinates:[{ name: "安溪县农联社", value: [118.202284, 25.047225, 10] }]},
-  寿宁联社:{map:"/map/shouning.json", coordinates:[{ name: "寿宁县农联社", value: [119.518667, 27.461004, 10] }]},
-  将乐县联社:{map:"/map/jiangle.json", coordinates:[{ name: "将乐县农联社", value: [117.445716, 26.972073, 10] }]},
-  尤溪农信联社:{map:"/map/youxi.json", coordinates:[{ name: "尤溪县农联社", value: [118.20086, 26.177155, 10] }]},
-  屏南县联社:{map:"/map/pingnan.json", coordinates:[{ name: "屏南县农联社", value: [118.826127, 26.929013, 10] }]},
-  平和农商银行:{map:"/map/pinghe.json", coordinates:[{ name: "平和县农联社", value: [117.322431, 24.376604, 10] }]},
-  平潭农商行:{map:"/map/pingtan.json", coordinates:[ { name: "平潭农商行", value: [119.805094, 25.508058, 10] }]},
-  建宁联社:{map:"/map/jianning.json", coordinates:[{ name: "建宁县农联社", value: [116.849763, 26.836767, 10] }]},
-  建瓯农商银行:{map:"/map/jianou.json", coordinates:[{ name: "建瓯农商银行", value: [118.326437, 27.039505, 10] }]},
-  建阳区联社:{map:"/map/jianyang.json", coordinates:[{ name: "建阳市农联社", value: [118.128905, 27.337197, 10] }]},
-  德化县联社:{map:"/map/dehua.json", coordinates:[{ name: "德化县农联社", value: [118.256646, 25.502722, 10] }]},
-  惠安联社:{map:"/map/huian.json", coordinates:[{ name: "惠安县农联社", value: [118.807105, 25.034176, 10] }]},
-  政和县联社:{map:"/map/zhenghe.json", coordinates:[{ name: "政和县农联社", value: [118.858131, 27.3699, 10] }]},
-  明溪联社:{map:"/map/mingxi.json", coordinates:[{ name: "明溪县农联社", value: [116.947323, 26.578251, 10] }]},
-  晋江农商行:{map:"/map/jinjiang.json", coordinates:[{ name: "晋江农商行", value: [118.580679, 24.811057, 10] }]},
-  松溪县联社:{map:"/map/songxi.json", coordinates:[{ name: "松溪县农联社", value: [118.791577, 27.535192, 10] }]},
-  柘荣联社:{map:"/map/zherong.json", coordinates:[{ name: "柘荣县农联社", value: [119.896749, 27.230237, 10] }]},
-  武夷山农商行:{map:"/map/wuyishan.json", coordinates:[{ name: "武夷山农商行", value: [118.036163, 27.757306, 10] }]},
-  武平县联社:{map:"/map/wuping.json", coordinates:[{ name: "武平县农联社", value: [116.101001, 25.086408, 10] }]},
-  永安农商银行:{map:"/map/yongan.json", coordinates:[{ name: "永安市农联社", value: [117.373871, 25.982393, 10] }]},
-  永定联社:{map:"/map/yongding.json", coordinates:[{ name: "永定县农联社", value: [116.734408, 24.723809, 10] }]},
-  永春县联社:{map:"/map/yongchun.json", coordinates:[{ name: "永春县农联社", value: [118.297553, 25.328058, 10] }]},
-  永泰联社:{map:"/map/yongtai.json", coordinates:[{ name: "永泰联社", value: [118.939701, 25.871521, 10] }]},
-  沙县农商银行:{map:"/map/shaxian.json", coordinates:[{ name: "沙县农商行", value: [117.800659, 26.407476, 10] },]},
-  泉州农商行:{map:"/map/quanzhou.json", coordinates:[{ name: "泉州农商行", value: [118.687639, 24.876978, 10] }]},
-  泰宁县联社:{map:"/map/taining.json", coordinates:[{ name: "泰宁县农联社", value: [117.182947, 26.899721, 10] }]},
-  浦城县联社:{map:"/map/pucheng.json", coordinates:[{ name: "浦城县农联社", value: [118.382047, 27.930925, 10] }]},
-  清流农信联社:{map:"/map/qingliu.json", coordinates:[{ name: "清流县农联社", value: [116.862321, 26.057757, 10] }]},
-  漳州农商行:{map:"/map/zhangzhou.json", coordinates:[ { name: "漳州农商行", value: [117.675264, 24.524648, 10] }]},
-  漳平农商行:{map:"/map/zhangping.json", coordinates:[{ name: "漳平农商行", value: [117.428414, 25.291055, 10] }]},
-  漳浦农商银行:{map:"/map/zhangpu.json", coordinates:[{ name: "漳浦县农联社", value: [117.628503, 24.12591, 10] }]},
-  石狮农商银行:{map:"/map/shishi.json", coordinates:[{ name: "石狮农商行", value: [118.628645, 24.741741, 10] }]},
-  福安联社:{map:"/map/fuan.json", coordinates:[{ name: "福安市农联社", value: [119.689114, 26.969172, 10] }]},
-  福州农商行:{map:"/map/fuzhou.json", coordinates:[{ name: "福州农商行", value: [119.345806, 26.058267, 10] }]},
-  福清汇通农商行:{map:"/map/fuqing.json", coordinates:[{ name: "福清汇通农商行", value: [119.357814, 25.722627, 10] }]},
-  福鼎市联社:{map:"/map/fuding.json", coordinates:[{ name: "福鼎联社", value: [120.219688, 27.315361, 10] }]},
-  罗源县联社:{map:"/map/luoyuan.json", coordinates:[{ name: "罗源县农联社", value: [119.555228, 26.494764, 10] }]},
-  莆田农商银行:{map:"/map/putian.json", coordinates:[{ name: "莆田农商银行", value: [119.014794, 25.427314, 10] }]},
-  诏安县联社:{map:"/map/zhaoan.json", coordinates:[{ name: "诏安县农联社", value: [117.185518, 23.717786, 10] }]},
-  连城联社:{map:"/map/liancheng.json", coordinates:[{ name: "连城县农联社", value: [116.650912, 25.615751, 10] }]},
-  连江农商银行:{map:"/map/lianjiang.json", coordinates:[{ name: "连江农商银行", value: [119.548364, 26.213602, 10] }]},
-  邵武农商行:{map:"/map/shaowu.json", coordinates:[{ name: "邵武市农联社", value: [117.499641, 27.339004, 10] }]},
-  长乐农商行:{map:"/map/changle.json", coordinates:[{ name: "长乐农商行", value: [119.47577, 25.970764, 10] }]},
-  长汀联社:{map:"/map/changding.json", coordinates:[{ name: "长汀县农联社", value: [116.400555, 25.874531, 10] }]},
-  长泰联社:{map:"/map/changtai.json", coordinates:[{ name: "长泰县农联社", value: [117.755306, 24.626603, 10] }]},
-  闽侯县联社:{map:"/map/minhou.json", coordinates:[{ name: "闽侯县农联社", value: [119.262986, 25.94124, 10] }]},
-  闽清联社:{map:"/map/minqing.json", coordinates:[{ name: "闽清县农联社", value: [118.868057, 26.226602, 10] }]},
-  霞浦县联社:{map:"/map/xiapu.json", coordinates:[{ name: "霞浦县农联社", value: [120.019103, 26.890268, 10] }]},
-  顺昌县联社:{map:"/map/shunchang.json", coordinates:[{ name: "顺昌县农联社", value: [117.815179, 26.796944, 10] }]},
-  龙岩农商行:{map:"/map/longyan.json", coordinates:[{ name: "龙岩农商行", value: [117.027016, 25.086651, 10] }]},
-  龙海农商行:{map:"/map/longhai.json", coordinates:[{ name: "龙海农商行", value: [117.813678, 24.453241, 10] }]},
+  马尾农商行: { map: "/map/mawei.json", coordinates: [] },
+  鼓楼区农商行: { map: "/map/gulou.json", coordinates: [] },
+  三明农商银行: {
+    map: "/map/sanming.json",
+    coordinates: [{ name: "三明农商行", value: [117.643759, 26.265176, 10] }],
+  },
+  上杭农商行: {
+    map: "/map/shanghang.json",
+    coordinates: [{ name: "上杭农商行", value: [116.44197, 25.049185, 10] }],
+  },
+  东山联社: {
+    map: "/map/dongshan.json",
+    coordinates: [{ name: "东山县农联社", value: [117.432607, 23.713423, 10] }],
+  },
+  云霄联社: {
+    map: "/map/yunxiao.json",
+    coordinates: [{ name: "云霄县农联社", value: [117.347455, 23.94945, 10] }],
+  },
+  仙游农商银行: {
+    map: "/map/xianyou.json",
+    coordinates: [{ name: "仙游农商银行", value: [118.703527, 25.361068, 10] }],
+  },
+  光泽农信联社: {
+    map: "/map/guangzhe.json",
+    coordinates: [{ name: "光泽县农联社", value: [117.341868, 27.549505, 10] }],
+  },
+  华安县联社: {
+    map: "/map/huaan.json",
+    coordinates: [{ name: "华安县农联社", value: [117.586218, 24.998993, 10] }],
+  },
+  南安农商行: {
+    map: "/map/nanan.json",
+    coordinates: [{ name: "南安农商行", value: [118.414307, 24.964234, 10] }],
+  },
+  南平农商银行: {
+    map: "/map/nanping.json",
+    coordinates: [{ name: "南平农商行", value: [118.185343, 26.648297, 10] }],
+  },
+  南靖县联社: {
+    map: "/map/nanjing.json",
+    coordinates: [{ name: "南靖县农联社", value: [117.37278, 24.523476, 10] }],
+  },
+  厦门农商行: {
+    map: "/map/xiameng.json",
+    coordinates: [{ name: "厦门农商行", value: [118.159546, 24.485303, 10] }],
+  },
+  古田农信联社: {
+    map: "/map/gutian.json",
+    coordinates: [{ name: "古田县农联社", value: [118.762266, 26.581451, 10] }],
+  },
+  周宁县联社: {
+    map: "/map/zhouning.json",
+    coordinates: [{ name: "周宁县农联社", value: [119.439547, 26.987095, 10] }],
+  },
+  大田县联社: {
+    map: "/map/datian.json",
+    coordinates: [{ name: "大田县农联社", value: [117.860583, 25.69679, 10] }],
+  },
+  宁化县联社: {
+    map: "/map/ninghua.json",
+    coordinates: [{ name: "宁化县农联社", value: [116.671271, 26.255966, 10] }],
+  },
+  宁德农商行: {
+    map: "/map/ningde.json",
+    coordinates: [{ name: "宁德农商行", value: [119.527258, 26.666208, 10] }],
+  },
+  安溪农商银行: {
+    map: "/map/anxi.json",
+    coordinates: [{ name: "安溪县农联社", value: [118.202284, 25.047225, 10] }],
+  },
+  寿宁联社: {
+    map: "/map/shouning.json",
+    coordinates: [{ name: "寿宁县农联社", value: [119.518667, 27.461004, 10] }],
+  },
+  将乐县联社: {
+    map: "/map/jiangle.json",
+    coordinates: [{ name: "将乐县农联社", value: [117.445716, 26.972073, 10] }],
+  },
+  尤溪农信联社: {
+    map: "/map/youxi.json",
+    coordinates: [{ name: "尤溪县农联社", value: [118.20086, 26.177155, 10] }],
+  },
+  屏南县联社: {
+    map: "/map/pingnan.json",
+    coordinates: [{ name: "屏南县农联社", value: [118.826127, 26.929013, 10] }],
+  },
+  平和农商银行: {
+    map: "/map/pinghe.json",
+    coordinates: [{ name: "平和县农联社", value: [117.322431, 24.376604, 10] }],
+  },
+  平潭农商行: {
+    map: "/map/pingtan.json",
+    coordinates: [{ name: "平潭农商行", value: [119.805094, 25.508058, 10] }],
+  },
+  建宁联社: {
+    map: "/map/jianning.json",
+    coordinates: [{ name: "建宁县农联社", value: [116.849763, 26.836767, 10] }],
+  },
+  建瓯农商银行: {
+    map: "/map/jianou.json",
+    coordinates: [{ name: "建瓯农商银行", value: [118.326437, 27.039505, 10] }],
+  },
+  建阳区联社: {
+    map: "/map/jianyang.json",
+    coordinates: [{ name: "建阳市农联社", value: [118.128905, 27.337197, 10] }],
+  },
+  德化县联社: {
+    map: "/map/dehua.json",
+    coordinates: [{ name: "德化县农联社", value: [118.256646, 25.502722, 10] }],
+  },
+  惠安联社: {
+    map: "/map/huian.json",
+    coordinates: [{ name: "惠安县农联社", value: [118.807105, 25.034176, 10] }],
+  },
+  政和县联社: {
+    map: "/map/zhenghe.json",
+    coordinates: [{ name: "政和县农联社", value: [118.858131, 27.3699, 10] }],
+  },
+  明溪联社: {
+    map: "/map/mingxi.json",
+    coordinates: [{ name: "明溪县农联社", value: [116.947323, 26.578251, 10] }],
+  },
+  晋江农商行: {
+    map: "/map/jinjiang.json",
+    coordinates: [{ name: "晋江农商行", value: [118.580679, 24.811057, 10] }],
+  },
+  松溪县联社: {
+    map: "/map/songxi.json",
+    coordinates: [{ name: "松溪县农联社", value: [118.791577, 27.535192, 10] }],
+  },
+  柘荣联社: {
+    map: "/map/zherong.json",
+    coordinates: [{ name: "柘荣县农联社", value: [119.896749, 27.230237, 10] }],
+  },
+  武夷山农商行: {
+    map: "/map/wuyishan.json",
+    coordinates: [{ name: "武夷山农商行", value: [118.036163, 27.757306, 10] }],
+  },
+  武平县联社: {
+    map: "/map/wuping.json",
+    coordinates: [{ name: "武平县农联社", value: [116.101001, 25.086408, 10] }],
+  },
+  永安农商银行: {
+    map: "/map/yongan.json",
+    coordinates: [{ name: "永安市农联社", value: [117.373871, 25.982393, 10] }],
+  },
+  永定联社: {
+    map: "/map/yongding.json",
+    coordinates: [{ name: "永定县农联社", value: [116.734408, 24.723809, 10] }],
+  },
+  永春县联社: {
+    map: "/map/yongchun.json",
+    coordinates: [{ name: "永春县农联社", value: [118.297553, 25.328058, 10] }],
+  },
+  永泰联社: {
+    map: "/map/yongtai.json",
+    coordinates: [{ name: "永泰联社", value: [118.939701, 25.871521, 10] }],
+  },
+  沙县农商银行: {
+    map: "/map/shaxian.json",
+    coordinates: [{ name: "沙县农商行", value: [117.800659, 26.407476, 10] }],
+  },
+  泉州农商行: {
+    map: "/map/quanzhou.json",
+    coordinates: [{ name: "泉州农商行", value: [118.687639, 24.876978, 10] }],
+  },
+  泰宁县联社: {
+    map: "/map/taining.json",
+    coordinates: [{ name: "泰宁县农联社", value: [117.182947, 26.899721, 10] }],
+  },
+  浦城县联社: {
+    map: "/map/pucheng.json",
+    coordinates: [{ name: "浦城县农联社", value: [118.382047, 27.930925, 10] }],
+  },
+  清流农信联社: {
+    map: "/map/qingliu.json",
+    coordinates: [{ name: "清流县农联社", value: [116.862321, 26.057757, 10] }],
+  },
+  漳州农商行: {
+    map: "/map/zhangzhou.json",
+    coordinates: [{ name: "漳州农商行", value: [117.675264, 24.524648, 10] }],
+  },
+  漳平农商行: {
+    map: "/map/zhangping.json",
+    coordinates: [{ name: "漳平农商行", value: [117.428414, 25.291055, 10] }],
+  },
+  漳浦农商银行: {
+    map: "/map/zhangpu.json",
+    coordinates: [{ name: "漳浦县农联社", value: [117.628503, 24.12591, 10] }],
+  },
+  石狮农商银行: {
+    map: "/map/shishi.json",
+    coordinates: [{ name: "石狮农商行", value: [118.628645, 24.741741, 10] }],
+  },
+  福安联社: {
+    map: "/map/fuan.json",
+    coordinates: [{ name: "福安市农联社", value: [119.689114, 26.969172, 10] }],
+  },
+  福州农商行: {
+    map: "/map/fuzhou.json",
+    coordinates: [{ name: "福州农商行", value: [119.345806, 26.058267, 10] }],
+  },
+  福清汇通农商行: {
+    map: "/map/fuqing.json",
+    coordinates: [
+      { name: "福清汇通农商行", value: [119.357814, 25.722627, 10] },
+    ],
+  },
+  福鼎市联社: {
+    map: "/map/fuding.json",
+    coordinates: [{ name: "福鼎联社", value: [120.219688, 27.315361, 10] }],
+  },
+  罗源县联社: {
+    map: "/map/luoyuan.json",
+    coordinates: [{ name: "罗源县农联社", value: [119.555228, 26.494764, 10] }],
+  },
+  莆田农商银行: {
+    map: "/map/putian.json",
+    coordinates: [{ name: "莆田农商银行", value: [119.014794, 25.427314, 10] }],
+  },
+  诏安县联社: {
+    map: "/map/zhaoan.json",
+    coordinates: [{ name: "诏安县农联社", value: [117.185518, 23.717786, 10] }],
+  },
+  连城联社: {
+    map: "/map/liancheng.json",
+    coordinates: [{ name: "连城县农联社", value: [116.650912, 25.615751, 10] }],
+  },
+  连江农商银行: {
+    map: "/map/lianjiang.json",
+    coordinates: [{ name: "连江农商银行", value: [119.548364, 26.213602, 10] }],
+  },
+  邵武农商行: {
+    map: "/map/shaowu.json",
+    coordinates: [{ name: "邵武市农联社", value: [117.499641, 27.339004, 10] }],
+  },
+  长乐农商行: {
+    map: "/map/changle.json",
+    coordinates: [{ name: "长乐农商行", value: [119.47577, 25.970764, 10] }],
+  },
+  长汀联社: {
+    map: "/map/changding.json",
+    coordinates: [{ name: "长汀县农联社", value: [116.400555, 25.874531, 10] }],
+  },
+  长泰联社: {
+    map: "/map/changtai.json",
+    coordinates: [{ name: "长泰县农联社", value: [117.755306, 24.626603, 10] }],
+  },
+  闽侯县联社: {
+    map: "/map/minhou.json",
+    coordinates: [{ name: "闽侯县农联社", value: [119.262986, 25.94124, 10] }],
+  },
+  闽清联社: {
+    map: "/map/minqing.json",
+    coordinates: [{ name: "闽清县农联社", value: [118.868057, 26.226602, 10] }],
+  },
+  霞浦县联社: {
+    map: "/map/xiapu.json",
+    coordinates: [{ name: "霞浦县农联社", value: [120.019103, 26.890268, 10] }],
+  },
+  顺昌县联社: {
+    map: "/map/shunchang.json",
+    coordinates: [{ name: "顺昌县农联社", value: [117.815179, 26.796944, 10] }],
+  },
+  龙岩农商行: {
+    map: "/map/longyan.json",
+    coordinates: [{ name: "龙岩农商行", value: [117.027016, 25.086651, 10] }],
+  },
+  龙海农商行: {
+    map: "/map/longhai.json",
+    coordinates: [{ name: "龙海农商行", value: [117.813678, 24.453241, 10] }],
+  },
 };
 
-
-
 window.boardMap = {
   getMap: (orgName) => {
     if (mapConfig[orgName]) {
@@ -222,14 +421,23 @@ window.boardMap = {
     }
 
     let coordinates = [];
-    for (let p in mapConfig) {
-      if (!mapConfig[p].coordinates) {
-        continue;
-      }
-
-      coordinates = coordinates.concat(mapConfig[p].coordinates);
+    if (typeof mapConfig.default.coordinates == "function") {
+      coordinates = mapConfig.default.coordinates();
+    } else {
+      coordinates = mapConfig.default.coordinates;
     }
+    // let coordinates = [];
+    // for (let p in mapConfig) {
+    //   if (!mapConfig[p].coordinates) {
+    //     continue;
+    //   }
+
+    //   coordinates = coordinates.concat(mapConfig[p].coordinates);
+    // }
 
+    // coordinates.forEach((item, index) => {
+    //   item.name = item.name.substr(0, 2);
+    // });
     return coordinates;
   },
 };

+ 1 - 1
src/api/board/cockpit.js

@@ -60,7 +60,7 @@ export function orgInfo(orgId) {
 // 本月来访
 export function currentMonthVisitInfo(orgId) {
   return request({
-    url: "/core/cockpit/currentmonthvisitinfo",
+    url: "/core/cockpit/currentmonthvisit",
     method: "get",
     params: {orgId},
   });

+ 114 - 68
src/views/board/charts/comprehesive/report.vue

@@ -1,15 +1,13 @@
 <!--  -->
 <template>
-  <div class="static_info">
+  <div class="static_info report">
     <div ref="orgchart"></div>
-    <div class="chart-template static_info">
+    <div class="chart-template other">
       <!-- <div class="line"></div> -->
-      <div>
-        <p>
-          <span> 其它(本月) </span>
-        </p>
-        <div ref="otherchart"></div>
-      </div>
+      <p>
+        <span> 其它(本月) </span>
+      </p>
+      <div ref="otherchart"></div>
     </div>
   </div>
 </template>
@@ -20,6 +18,7 @@ import {
   currentMonthVisitInfo,
   orgSecurityInfo,
 } from "@/api/board/cockpit.js";
+import * as echarts from "echarts";
 export default {
   props: {
     orgId: {
@@ -76,39 +75,24 @@ export default {
       this.isMouseOver = false;
     },
     async getOrgData() {
-      let columnCount = 4;
       let r = (await orgInfo(this.orgId)).data;
-      let data = [];
-
-      for (let i in r) {
-        let columnIndex = i % columnCount;
-        if (!data[columnIndex]) {
-          data[columnIndex] = [];
-        }
-
-        let orgName = r[i].orgName;
-        r[i].orgName = parseInt(i) + 1 + "." + orgName;
-        r[i].reachRate = (r[i].reachRate * 100).toFixed(2) + "%";
-        data[columnIndex].push(r[i]);
-      }
-
-      this.data = data;
+      this.org = r;
 
       this.initOrgMap();
     },
 
     async getOtherData() {
-      this.visit= (await currentMonthVisitInfo(this.orgId)).data
-      this.orgSecurity=(await orgSecurityInfo(this.orgId)).data;
+      this.visit = (await currentMonthVisitInfo(this.orgId)).data;
+      this.orgSecurity = (await orgSecurityInfo(this.orgId)).data;
 
       this.initOtherMap();
     },
     initOtherMap() {
-      this.myChart && this.myChart.dispose();
+      this.otherChart && this.otherChart.dispose();
       let c = this.$refs["otherchart"];
 
       // 基于准备好的dom,初始化echarts实例
-      this.myChart = echarts.init(
+      this.otherChart = echarts.init(
         c
         // document.getElementById("commAlarmEvent_Chart")
       );
@@ -127,23 +111,31 @@ export default {
           // formatter: "完成率:{c}%",
         },
         legend: {
-          show: true,
+          show: false,
           textStyle: {
             color: "rgb(245, 245, 245)",
           },
         },
-        grid: {
-          left: "3%",
-          right: "4%",
-          bottom: "2%",
-          top: "20px",
-          containLabel: true,
-        },
-        series: [         
-        {
+        color: ["#5470c6", "#91cc75", "#fac858"],
+        series: [
+          {
             name: "来访",
             type: "pie",
-            center: ["33%", "50%"],
+            center: ["28%", "50%"],
+            startAngle: 120,
+            label: {
+              // show:false,
+              color: "#fff",
+              
+              formatter: (p) => {
+                return `${p.name}\r\n(${p.value},${p.percent}%)`;
+              },
+            },
+            labelLine:{
+              // smooth:true
+              length:5,
+              length2:5,
+            },
             data: [
               {
                 name: "纸质",
@@ -162,7 +154,19 @@ export default {
           {
             name: "安保",
             type: "pie",
-            center: ["66%", "50%"],
+            center: ["72%", "50%"],
+            label: {
+              // show:false,
+              color: "#fff",
+              formatter: (p) => {
+                return `${p.name}\r\n(${p.value},${p.percent}%)`;
+              },
+            },
+             labelLine:{
+              // smooth:true
+              length:5,
+              length2:5,
+            },
             data: [
               {
                 name: "未配置保安",
@@ -171,21 +175,21 @@ export default {
               {
                 name: "配置保安",
                 value: this.orgSecurity.equippedCount,
-              }
+              },
             ],
           },
         ],
       };
       if (option && typeof option === "object") {
-        this.myChart.setOption(option);
+        this.otherChart.setOption(option);
       }
     },
     initOrgMap() {
-      this.myChart && this.myChart.dispose();
+      this.orgChart && this.orgChart.dispose();
       let c = this.$refs["orgchart"];
 
       // 基于准备好的dom,初始化echarts实例
-      this.myChart = echarts.init(
+      this.orgChart = echarts.init(
         c
         // document.getElementById("commAlarmEvent_Chart")
       );
@@ -209,19 +213,28 @@ export default {
             color: "rgb(245, 245, 245)",
           },
         },
-        grid: {
-          left: "3%",
-          right: "4%",
-          bottom: "2%",
-          top: "20px",
-          containLabel: true,
-        },
+        // grid: {
+        //   left: "3%",
+        //   right: "4%",
+        //   bottom: "2%",
+        //   top: "20px",
+        //   containLabel: true,
+        // },
+        color: ["#5470c6"],
         series: [
           {
             name: "行社",
             type: "pie",
-            radius: ["70%", "110%"],
-            center: ["33%", "33%"],
+            radius: ["38%", "45%"],
+            center: ["25%", "25%"],
+            label: {
+              // show:false,
+              position: "center",
+              color: "#fff",
+              formatter: (p) => {
+                return `${p.value}\r\n\r\n${p.name}`;
+              },
+            },
             data: [
               {
                 name: "行社",
@@ -232,8 +245,16 @@ export default {
           {
             name: "营业网点",
             type: "pie",
-            radius: ["70%", "110%"],
-            center: ["66%", "33%"],
+            radius: ["38%", "45%"],
+            center: ["75%", "25%"],
+            label: {
+              // show:false,
+              position: "center",
+              color: "#fff",
+              formatter: (p) => {
+                return `${p.value}\r\n\r\n${p.name}`;
+              },
+            },
             data: [
               {
                 name: "营业网点",
@@ -244,35 +265,51 @@ export default {
           {
             name: "网点业务库",
             type: "pie",
-            radius: ["70%", "110%"],
-            center: ["66%", "33%"],
+            radius: ["38%", "45%"],
+            center: ["25%", "75%"],
+            label: {
+              // show:false,
+              position: "center",
+              color: "#fff",
+              formatter: (p) => {
+                return `${p.value}\r\n\r\n${p.name}`;
+              },
+            },
             data: [
               {
                 name: "网点业务库",
-                value: this.org.offlineCount,
+                value: this.org.bankingStoreCount,
               },
             ],
           },
           {
             name: "离行式自助银行",
             type: "pie",
-            radius: ["70%", "110%"],
-            center: ["66%", "66%"],
+            radius: ["38%", "45%"],
+            center: ["75%", "75%"],
+            label: {
+              //  show:false,
+              position: "center",
+              color: "#fff",
+              formatter: (p) => {
+                return `${p.value}\r\n\r\n离行式\r\n自助银行`;
+              },
+            },
             data: [
               {
                 name: "离行式自助银行",
-                value: this.org.bankingStoreCount,
+                value: this.org.offlineCount,
               },
             ],
           },
         ],
       };
       if (option && typeof option === "object") {
-        this.myChart.setOption(option);
+        this.orgChart.setOption(option);
       }
     },
     windowResize() {
-      this.myChart && this.myChart.resize();
+      this.orgChart && this.orgChart.resize();
     },
   },
 };
@@ -303,14 +340,23 @@ export default {
   height: calc(100%);
   width: 100%;
   display: flex;
-  flex-direction: column;
+  flex-direction: row;
   margin: 5px;
 
-  & > div:first {
-    width: 40%;
+  & > div {
+    height:calc(100% - 10px);
+  }
+  & > div:first-child {
+    width: 35%;
   }
-  & > div:first {
-    width: 60%;
+  & > div:nth-child(2) {
+    width: 65% !important;
   }
 }
+
+.other {
+  background-image: url(@/assets/board/bg.png);
+  background-position: 100%;
+  background-color: rgba(8, 8, 8);
+}
 </style>

+ 286 - 0
src/views/board/charts/drill/report.vue

@@ -0,0 +1,286 @@
+<!--  -->
+<template>
+  <div class="chart-template chart-template-withperiod">
+    <p>
+      <span>预案演练</span>
+    </p>
+    <div>
+      <el-tabs v-model="activeName" @tab-click="handleClick">
+        <el-tab-pane
+          v-for="t in types"
+          :key="t.value"
+          :label="t.text"
+          :name="t.value"
+        ></el-tab-pane>
+      </el-tabs>
+    </div>
+    <div ref="chart"></div>
+  </div>
+</template>
+
+<script>
+import "./../../board.scss";
+import * as echarts from "echarts";
+import { drill } from "@/api/board/cockpit.js";
+
+import {
+  findMaxIndex,
+  getChartDOMSize,
+  getNextPeriod,
+  getPeriodText,
+} from "../../utils.js";
+
+const types = [
+  {
+    text: "今天",
+    value: "1",
+  },
+  {
+    text: "近7天",
+    value: "2",
+  },
+  {
+    text: "近30天",
+    value: "3",
+  },
+  {
+    text: "近90天",
+    value: "4",
+  },
+  {
+    text: "本年",
+    value: "5",
+  },
+];
+export default {
+  props: {
+    orgId: {
+      type: String,
+      isRequired: true,
+    },
+  },
+  data() {
+    return {
+      data: {
+        all: [],
+        completed: [],
+        name: [],
+      },
+      activeName: types[0].value,
+    };
+  },
+
+  components: {},
+
+  computed: {},
+
+  watch: {
+    orgId: {
+      deep: true,
+      handler(val) {
+        this.resetTimer();
+        this.getData();
+      },
+    },
+    data: {
+      deep: true,
+      handler() {
+        this.initMap();
+      },
+    },
+  },
+
+  created() {
+    this.types = types;
+    this.maxDisplay = 16;
+    this.refreshTime = 1 * 10 * 1000;
+    this.isMouseOver = false;
+  },
+
+  async mounted() {
+    window.addEventListener("resize", this.windowResize);
+  },
+  beforeDestroy() {
+    this.timer && clearInterval(this.timer);
+    this.timer = null;
+
+    window.removeEventListener("resize", this.windowResize);
+  },
+
+  methods: {
+    handleClick() {
+      this.resetTimer();
+      this.getData();
+    },
+    handleMouseEnter() {
+      this.isMouseOver = true;
+    },
+    handleMouseLeave() {
+      this.isMouseOver = false;
+    },
+    async getData() {
+      let r = (await drill({ orgId: this.orgId, period: this.activeName }))
+        .data;
+      let data = {
+        all: [],
+        completed: [],
+        rate: [],
+        name: [],
+      };
+
+      for (let item of r) {        
+        if (data.all.length >= 16) {
+          break;
+        }
+        data.all.push(item.total);
+        data.completed.push(item.completed);
+        data.rate.push((item.completedRate * 100).toFixed(0));
+        data.name.push(item.orgName);
+      }
+      this.data = data;
+
+      // console.info(this.data);
+    },
+
+    windowResize() {
+      this.myChart && this.myChart.resize();
+    },
+    initMap() {
+      this.myChart && this.myChart.dispose();
+      let c = this.$refs["chart"];
+
+      // 基于准备好的dom,初始化echarts实例
+      this.myChart = echarts.init(
+        c
+        // document.getElementById("commAlarmEvent_Chart")
+      );
+
+      let t = this;
+      // 指定图表的配置项和数据
+      var option = {
+        //  color: ["#82D5AE"],
+        tooltip: {
+          trigger: "axis",
+          confine: true,
+          axisPointer: {
+            type: "shadow",
+          },
+
+          // formatter: "完成率:{c}%",
+        },
+        legend: {
+          show: true,
+          textStyle: {
+            color: "rgb(245, 245, 245)",
+          },
+        },
+        grid: {
+          left: "3%",
+          right: "4%",
+          bottom: "2%",
+          top: "20px",
+          containLabel: true,
+        },
+
+        xAxis: [
+          {
+            type: "category",
+            data: this.data.name,
+            // data: this.mapdata.totalDataVo.xlist,
+            axisTick: {
+              alignWithLabel: true,
+            },
+            axisLine: {
+              show: true,
+              lineStyle: {
+                type: "solid",
+                color: "rgb(245, 245, 245)", //左边线的颜⾊
+              },
+            },
+            axisLabel: {
+              interval: 0,
+              rotate: -45,
+              fontSize: 12,
+              color: "#fff",
+            },
+          },
+        ],
+        yAxis: [
+          {
+            type: "value",
+            minInterval: 1,
+            // max: function (value) {
+            //   let m = value.max == Math.ceil(value.max) ? Math.ceil(value.max * 1.0001) : Math.ceil(value.max);
+            //   return m
+            // },
+          },
+        ],
+        series: [
+          // {
+          //   name: "总数",
+          //   type: "bar",
+          //   barWidth: "14",
+          //   // label: {
+          //   //   show: true,
+          //   //   position: 'top',
+          //   // },
+          //   data: this.data.all,
+          // },
+          {
+            name: "应完成",
+            type: "bar",
+            barWidth: "14",
+            // label: {
+            //   show: true,
+            //   position: 'top',
+            // },
+            data: this.data.all,
+            // itemStyle: {
+            //   normal: {
+            //     label: {
+            // formatter: function (param) {
+            // if (t.data.all[param.dataIndex]) {
+            //   let rate = param.value / t.data.all[param.dataIndex];
+            //   return (Math.floor(rate * 1000) / 10).toFixed(1) + "%";
+            // } else {
+            //   return "";
+            // }
+            // return param.value + "%";
+            // },
+            // show: false,
+            // position: "top",
+            // textStyle: {
+            //   fontWeight: "bolder",
+            //   fontSize: "10",
+            //   color: "rgb(245, 245, 245)",
+            // },
+            // },
+            // },
+            // },
+          },
+          {
+            name: "已完成",
+            type: "line",
+            data: this.data.completed,
+          },
+        ],
+      };
+      if (option && typeof option === "object") {
+        this.myChart.setOption(option);
+      }
+    },
+
+    resetTimer() {
+      this.timer && clearInterval(this.timer);
+      this.timer = setInterval(() => {
+        if (this.isMouseOver) {
+          return;
+        }
+        this.activeName = getNextPeriod(this.types, this.activeName);
+        this.getData();
+      }, this.refreshTime);
+    },
+  },
+};
+</script>
+<style lang="less" scoped></style>

+ 291 - 0
src/views/board/charts/edu/report.vue

@@ -0,0 +1,291 @@
+<!--  -->
+<template>
+  <div class="chart-template chart-template-withperiod">
+    <p>
+      <span>教育培训</span>
+    </p>
+    <div>
+      <el-tabs v-model="activeName" @tab-click="handleClick">
+        <el-tab-pane
+          v-for="t in types"
+          :key="t.value"
+          :label="t.text"
+          :name="t.value"
+        ></el-tab-pane>
+      </el-tabs>
+    </div>
+    <div ref="chart"></div>
+  </div>
+</template>
+
+<script>
+import "./../../board.scss";
+import * as echarts from "echarts";
+import { edu } from "@/api/board/cockpit.js";
+import {
+  findMaxIndex,
+  getChartDOMSize,
+  getNextPeriod,
+  getPeriodText,
+} from "../../utils.js";
+const types = [
+  {
+    text: "今天",
+    value: "1",
+  },
+  {
+    text: "近7天",
+    value: "2",
+  },
+  {
+    text: "近30天",
+    value: "3",
+  },
+  {
+    text: "近90天",
+    value: "4",
+  },
+  {
+    text: "本年",
+    value: "5",
+  },
+];
+export default {
+  props: {
+    orgId: {
+      type: String,
+      isRequired: true,
+    },
+  },
+  data() {
+    return {
+      data: {
+        all: [],
+        completed: [],
+        name: [],
+      },
+      activeName: types[0].value,
+    };
+  },
+
+  components: {},
+
+  computed: {},
+
+  watch: {
+    orgId: {
+      deep: true,
+      handler(val) {
+        this.resetTimer();
+        this.getData();
+      },
+    },
+    data: {
+      deep: true,
+      handler() {
+        this.initMap();
+      },
+    },
+  },
+
+  created() {
+    this.types = types;
+    this.maxDisplay = 16;
+    this.refreshTime = 1 * 10 * 1000;
+    this.isMouseOver = false;
+  },
+
+  async mounted() {
+    window.addEventListener("resize", this.windowResize);
+  },
+  beforeDestroy() {
+    this.timer && clearInterval(this.timer);
+    this.timer = null;
+
+    window.removeEventListener("resize", this.windowResize);
+  },
+
+  methods: {
+    handleClick() {
+      this.resetTimer();
+      this.getData();
+    },
+    handleMouseEnter() {
+      this.isMouseOver = true;
+    },
+    handleMouseLeave() {
+      this.isMouseOver = false;
+    },
+    async getData() {
+      let r = (await edu({ orgId: this.orgId, period: this.activeName })).data;
+      let data = {
+        all: [],
+        completed: [],
+        rate: [],
+        name: [],
+      };
+
+      for (let item of r) {
+        if (data.all.length >= 16) {
+          break;
+        }
+        data.all.push(item.taskTotal);
+        data.completed.push(item.completedCount);
+        data.rate.push((item.completedRate * 100).toFixed(0));
+        data.name.push(item.orgName);
+      }
+      this.data = data;
+
+      // console.info(this.data);
+    },
+
+    windowResize() {
+      this.myChart && this.myChart.resize();
+    },
+    initMap() {
+      this.myChart && this.myChart.dispose();
+      let c = this.$refs["chart"];
+
+      // 基于准备好的dom,初始化echarts实例
+      this.myChart = echarts.init(
+        c
+        // document.getElementById("commAlarmEvent_Chart")
+      );
+
+      let t = this;
+      // 指定图表的配置项和数据
+      var option = {
+        //  color: ["#82D5AE"],
+        tooltip: {
+          trigger: "axis",
+          confine: true,
+          axisPointer: {
+            type: "shadow",
+          },
+
+          //  formatter: "完成率:{c}%",
+        },
+        legend: {
+          show: true,
+          textStyle: {
+            color: "rgb(245, 245, 245)",
+          },
+        },
+        grid: {
+          left: "3%",
+          right: "4%",
+          bottom: "2%",
+          top: "20px",
+          containLabel: true,
+        },
+        xAxis: [
+          {
+            type: "category",
+            data: this.data.name,
+            // data: this.mapdata.totalDataVo.xlist,
+            axisTick: {
+              alignWithLabel: true,
+            },
+            axisLine: {
+              show: true,
+              lineStyle: {
+                type: "solid",
+                color: "rgb(245, 245, 245)", //左边线的颜⾊
+              },
+            },
+            axisLabel: {
+              interval: 0,
+              rotate: -45,
+              fontSize: 12,
+              color: "#fff",
+            },
+          },
+        ],
+        yAxis: [
+          {
+            type: "value",
+            minInterval: 0,
+            // max: function (value) {
+            //   let m = value.max == Math.ceil(value.max) ? Math.ceil(value.max * 1.0001) : Math.ceil(value.max);
+            //   return m
+            // },
+          },
+          {
+            type: "value",
+            min: 0,
+            max: 100,
+            show: false,
+          },
+        ],
+        series: [
+          {
+            name: "应完成",
+            type: "line",
+            data: this.data.all,
+            yAxisIndex: 0,
+            // itemStyle: {
+            //   normal: {
+            //     label: {
+            //       formatter: function (param) {
+            //         // if (t.data.all[param.dataIndex]) {
+            //         //   let rate = param.value / t.data.all[param.dataIndex];
+            //         //   return (Math.floor(rate * 1000) / 10).toFixed(1) + "%";
+            //         // } else {
+            //         //   return "";
+            //         // }
+            //         return parseFloat(param.value).toFixed(0) + "%";
+            //       },
+            //       show: true,
+            //       position: "top",
+            //       textStyle: {
+            //         fontWeight: "bolder",
+            //         fontSize: "10",
+            //         color: "rgb(245, 245, 245)",
+            //       },
+            //     },
+            //   },
+            // },
+          },
+          {
+            name: "已完成",
+            type: "line",
+            yAxisIndex: 0,
+            data: this.data.completed,
+          },
+          {
+            name: "完成率",
+            type: "line",
+            yAxisIndex: 1,
+            data: this.data.rate,
+            tooltip: {
+              valueFormatter: (value)=>value+"%",
+            },
+            // itemStyle:{
+            //   normal:{
+            //     label:{
+            //       formatter:'{c}%'
+            //     }
+            //   }
+            // }
+          },
+        ],
+      };
+      if (option && typeof option === "object") {
+        this.myChart.setOption(option);
+      }
+    },
+
+    resetTimer() {
+      this.timer && clearInterval(this.timer);
+      this.timer = setInterval(() => {
+        if (this.isMouseOver) {
+          return;
+        }
+        this.activeName = getNextPeriod(this.types, this.activeName);
+        this.getData();
+      }, this.refreshTime);
+    },
+  },
+};
+</script>
+<style lang="less" scoped></style>

+ 1 - 1
src/views/board/charts/ga38/report.vue

@@ -2,7 +2,7 @@
 <template>
   <div class="chart-template chart-template-withperiod">
     <p>
-      <span>  安防设施建设达标率 </span>
+      <span>安防设施建设达标率</span>
     </p>
     <div>
       <el-tabs v-model="activeName" @tab-click="handleClick">

+ 238 - 0
src/views/board/charts/safetycheck/report.vue

@@ -0,0 +1,238 @@
+<!--  -->
+<template>
+  <div class="chart-template chart-template-withperiod">
+    <p>
+      <span>安全检查</span>
+    </p>
+    <div>
+      <el-tabs v-model="activeName" @tab-click="handleClick">
+        <el-tab-pane
+          v-for="t in types"
+          :key="t.value"
+          :label="t.text"
+          :name="t.value"
+        ></el-tab-pane>
+      </el-tabs>
+    </div>
+    <div style="position:relative">
+      <div ref="chart" style="height:100%;"></div>
+      <div style="position:absolute;right:0px;top:25px">
+        <div v-for="item in this.data" :key="item.type" class="checkType-item">
+          <span>{{item.type}}</span>
+          <span>{{item.total}}</span>
+          <span>{{item.completed}}</span>
+        </div>
+      </div>
+    </div>
+    
+    
+  </div>
+</template>
+
+<script>
+import "./../../board.scss";
+import * as echarts from "echarts";
+import { safetyCheck } from "@/api/board/cockpit.js";
+import {
+  findMaxIndex,
+  getChartDOMSize,
+  getNextPeriod,
+  getPeriodText,
+} from "../../utils.js";
+const types = [
+  {
+    text: "今天",
+    value: "1",
+  },
+  {
+    text: "近7天",
+    value: "2",
+  },
+  {
+    text: "近30天",
+    value: "3",
+  },
+  {
+    text: "近90天",
+    value: "4",
+  },
+  {
+    text: "本年",
+    value: "5",
+  },
+];
+export default {
+  props: {
+    orgId: {
+      type: String,
+      isRequired: true,
+    },
+  },
+  data() {
+    return {
+      data: {
+        all: [],
+        completed: [],
+        name: [],
+      },
+      activeName: types[0].value,
+    };
+  },
+
+  components: {},
+
+  computed: {},
+
+  watch: {
+    orgId: {
+      deep: true,
+      handler(val) {
+        this.resetTimer();
+        this.getData();
+      },
+    },
+    data: {
+      deep: true,
+      handler() {
+        this.initMap();
+      },
+    },
+  },
+
+  created() {
+    this.types = types;
+    this.maxDisplay = 16;
+    this.refreshTime = 1 * 10 * 1000;
+    this.isMouseOver = false;
+  },
+
+  async mounted() {
+    window.addEventListener("resize", this.windowResize);
+  },
+  beforeDestroy() {
+    this.timer && clearInterval(this.timer);
+    this.timer = null;
+
+    window.removeEventListener("resize", this.windowResize);
+  },
+
+  methods: {
+    handleClick() {
+      this.resetTimer();
+      this.getData();
+    },
+    handleMouseEnter() {
+      this.isMouseOver = true;
+    },
+    handleMouseLeave() {
+      this.isMouseOver = false;
+    },
+    async getData() {
+      let r = (
+        await safetyCheck({ orgId: this.orgId, period: this.activeName })
+      ).data;
+
+      this.data = r;
+
+      // console.info(this.data);
+    },
+
+    windowResize() {
+      this.myChart && this.myChart.resize();
+    },
+    initMap() {
+      this.myChart && this.myChart.dispose();
+      let c = this.$refs["chart"];
+
+      // 基于准备好的dom,初始化echarts实例
+      this.myChart = echarts.init(
+        c
+        // document.getElementById("commAlarmEvent_Chart")
+      );
+
+      let t = this;
+      // 指定图表的配置项和数据
+      var option = {
+        //  color: ["#82D5AE"],
+        // tooltip: {
+        //   trigger: "axis",
+        //   confine: true,
+        //   axisPointer: {
+        //     type: "shadow",
+        //   },
+
+        //   formatter: "完成率:{c}%",
+        // },
+        legend: {
+          // true: true,
+          textStyle: {
+            color: "rgb(245, 245, 245)",
+          },
+          type:'scroll',
+          right:5,
+        },
+        color:["#91cc75",'#fac858'],
+        grid: {
+          // left: "3%",
+          // right: "4%",
+          bottom: "2%",
+          top: "20px",
+          // containLabel: true,
+
+        },
+
+        radar: {
+          indicator: this.data.map((d) => ({ name: d.type })),
+          center:['28%','50%'],
+          radius:55,
+          axisName:{
+            color:'#fff'
+          }
+        },
+        series: [
+          {
+            type: "radar",
+            data: [
+              {
+                value: this.data.map(d=>d.total),
+                name: "应检查",
+              },
+              {
+                value: this.data.map(d=>d.completed),
+                name: "已检查",
+              },
+            ],
+          },
+        ],
+      };
+      if (option && typeof option === "object") {
+        this.myChart.setOption(option);
+      }
+    },
+
+    resetTimer() {
+      this.timer && clearInterval(this.timer);
+      this.timer = setInterval(() => {
+        if (this.isMouseOver) {
+          return;
+        }
+        this.activeName = getNextPeriod(this.types, this.activeName);
+        this.getData();
+      }, this.refreshTime);
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+  .checkType-item{
+    font-size:12px;
+
+    & >span{
+      display: inline-block;
+      width:40px;
+    }
+    &>span:first-child{
+      width:80px;
+    }   
+  }
+</style>

+ 12 - 15
src/views/board/index.vue

@@ -53,27 +53,18 @@
       </div>
       <div>
         <div>
-          <resumptionReport
+          <safety-check-chart
             :orgId="selectedOrg.id"
-            :api="api.safetyCheck"
-            :orgName="selectedOrg.name"
-            title="日常安全检查"
           />
         </div>
         <div>
-          <resumptionReport
+          <drill-chart
             :orgId="selectedOrg.id"
-            :api="api.drill"
-            :orgName="selectedOrg.name"
-            title="预案演练"
           />
         </div>
         <div>
-          <resumptionReport
+          <eduChart
             :orgId="selectedOrg.id"
-            :api="api.edu"
-            :orgName="selectedOrg.name"
-            title="教育培训"
           />
         </div>
 
@@ -95,6 +86,9 @@ import mapChart from "./charts/map/report.vue";
 // import orgStatis from "./charts/org/report.vue";
 import ga38Chart from './charts/ga38/report.vue'
 import comprehesiveChart from './charts/comprehesive/report.vue'
+import safetyCheckChart from './charts/safetycheck/report.vue'
+import drillChart from './charts/drill/report.vue'
+import eduChart from './charts/edu/report.vue'
 import dayjs from "dayjs";
 import * as api from "@/api/board/cockpit.js";
 
@@ -122,7 +116,10 @@ export default {
     question,
     mapChart,
     ga38Chart,
-    comprehesiveChart
+    comprehesiveChart,
+    safetyCheckChart,
+    drillChart,
+    eduChart
   },
 
   computed: {
@@ -466,10 +463,10 @@ export default {
 
         & > div:first-child {
           width: 100%;
-          height: 80%;
+          height: 75%;
         }
         & > div:nth-child(2) {
-          height: calc(20%);
+          height: calc(25%);
         }
       }
     }