Explorar o código

Merge remote-tracking branch 'origin/V0.0.5' into V0.0.5

jingyuanchao hai 1 ano
pai
achega
fc333a8b86

+ 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;
   },
 };

+ 26 - 3
src/api/board/cockpit.js

@@ -42,14 +42,37 @@ export function drill(query) {
   });
 }
 // GA38统计
-export function orgGA38(orgId) {
+export function orgGA38(query) {
   return request({
     url: "/core/cockpit/orgga38",
     method: "get",
-    params: { orgId },
+    params: query,
+  });
+}
+// GA38统计
+export function orgInfo(orgId) {
+  return request({
+    url: "/core/cockpit/orginfo",
+    method: "get",
+    params: {orgId},
+  });
+}
+// 本月来访
+export function currentMonthVisitInfo(orgId) {
+  return request({
+    url: "/core/cockpit/currentmonthvisit",
+    method: "get",
+    params: {orgId},
+  });
+}
+// 安保情况
+export function orgSecurityInfo(orgId) {
+  return request({
+    url: "/core/cockpit/orgsecurityinfo",
+    method: "get",
+    params: {orgId},
   });
 }
-
 // 隐患统计
 export function question(query) {
     return request({

+ 362 - 0
src/views/board/charts/comprehesive/report.vue

@@ -0,0 +1,362 @@
+<!--  -->
+<template>
+  <div class="static_info report">
+    <div ref="orgchart"></div>
+    <div class="chart-template other">
+      <!-- <div class="line"></div> -->
+      <p>
+        <span> 其它(本月) </span>
+      </p>
+      <div ref="otherchart"></div>
+    </div>
+  </div>
+</template>
+<script>
+import "./../../board.scss";
+import {
+  orgInfo,
+  currentMonthVisitInfo,
+  orgSecurityInfo,
+} from "@/api/board/cockpit.js";
+import * as echarts from "echarts";
+export default {
+  props: {
+    orgId: {
+      type: String,
+      isRequired: true,
+    },
+  },
+  data() {
+    return {
+      data: {
+        org: [],
+        visit: [],
+        orgSecurity: [],
+      },
+    };
+  },
+  components: {},
+  computed: {},
+  watch: {
+    orgId: {
+      deep: true,
+      handler(val) {
+        this.getOrgData();
+        this.getOtherData();
+      },
+    },
+  },
+
+  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.getData();
+    // },
+    handleMouseEnter() {
+      this.isMouseOver = true;
+    },
+    handleMouseLeave() {
+      this.isMouseOver = false;
+    },
+    async getOrgData() {
+      let r = (await orgInfo(this.orgId)).data;
+      this.org = r;
+
+      this.initOrgMap();
+    },
+
+    async getOtherData() {
+      this.visit = (await currentMonthVisitInfo(this.orgId)).data;
+      this.orgSecurity = (await orgSecurityInfo(this.orgId)).data;
+
+      this.initOtherMap();
+    },
+    initOtherMap() {
+      this.otherChart && this.otherChart.dispose();
+      let c = this.$refs["otherchart"];
+
+      // 基于准备好的dom,初始化echarts实例
+      this.otherChart = 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: false,
+          textStyle: {
+            color: "rgb(245, 245, 245)",
+          },
+        },
+        color: ["#5470c6", "#91cc75", "#fac858"],
+        series: [
+          {
+            name: "来访",
+            type: "pie",
+            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: "纸质",
+                value: this.visit.paperCount,
+              },
+              {
+                name: "紧急来访",
+                value: this.visit.urgencyCount,
+              },
+              {
+                name: "电子",
+                value: this.visit.electronicCount,
+              },
+            ],
+          },
+          {
+            name: "安保",
+            type: "pie",
+            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: "未配置保安",
+                value: this.orgSecurity.unequippedCount,
+              },
+              {
+                name: "配置保安",
+                value: this.orgSecurity.equippedCount,
+              },
+            ],
+          },
+        ],
+      };
+      if (option && typeof option === "object") {
+        this.otherChart.setOption(option);
+      }
+    },
+    initOrgMap() {
+      this.orgChart && this.orgChart.dispose();
+      let c = this.$refs["orgchart"];
+
+      // 基于准备好的dom,初始化echarts实例
+      this.orgChart = 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: false,
+          textStyle: {
+            color: "rgb(245, 245, 245)",
+          },
+        },
+        // grid: {
+        //   left: "3%",
+        //   right: "4%",
+        //   bottom: "2%",
+        //   top: "20px",
+        //   containLabel: true,
+        // },
+        color: ["#5470c6"],
+        series: [
+          {
+            name: "行社",
+            type: "pie",
+            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: "行社",
+                value: this.org.hangsheCount,
+              },
+            ],
+          },
+          {
+            name: "营业网点",
+            type: "pie",
+            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: "营业网点",
+                value: this.org.bankingCount,
+              },
+            ],
+          },
+          {
+            name: "网点业务库",
+            type: "pie",
+            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.bankingStoreCount,
+              },
+            ],
+          },
+          {
+            name: "离行式自助银行",
+            type: "pie",
+            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.offlineCount,
+              },
+            ],
+          },
+        ],
+      };
+      if (option && typeof option === "object") {
+        this.orgChart.setOption(option);
+      }
+    },
+    windowResize() {
+      this.orgChart && this.orgChart.resize();
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.report {
+  background-image: linear-gradient(
+    to right,
+    rgba(27, 33, 57, 0.8) 0%,
+    rgba(32, 49, 99, 0.6) 50%,
+    rgba(27, 33, 57, 0.8) 100%
+  );
+  margin-top: 15px;
+  width: calc(100% - 0px);
+  margin-left: 1px;
+  border-top: 3px solid;
+  border-image: linear-gradient(
+      to right,
+      rgba(27, 33, 57, 0.8) 20%,
+      rgba(101, 219, 229, 1) 50%,
+      rgba(27, 33, 57, 0.8) 80%
+    )
+    3;
+}
+
+.static_info {
+  height: calc(100%);
+  width: 100%;
+  display: flex;
+  flex-direction: row;
+  margin: 5px;
+
+  & > div {
+    height:calc(100% - 10px);
+  }
+  & > div:first-child {
+    width: 35%;
+  }
+  & > 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>

+ 83 - 67
src/views/board/charts/resumption/report_line.vue → src/views/board/charts/drill/report.vue

@@ -2,7 +2,7 @@
 <template>
   <div class="chart-template chart-template-withperiod">
     <p>
-      <span> {{ title }} </span>
+      <span>预案演练</span>
     </p>
     <div>
       <el-tabs v-model="activeName" @tab-click="handleClick">
@@ -21,25 +21,36 @@
 <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: "近7天",
+    text: "天",
     value: "1",
   },
   {
-    text: "近七周",
+    text: "近7天",
     value: "2",
   },
   {
-    text: "近七月",
+    text: "近30天",
     value: "3",
   },
+  {
+    text: "近90天",
+    value: "4",
+  },
+  {
+    text: "本年",
+    value: "5",
+  },
 ];
 export default {
   props: {
@@ -47,9 +58,13 @@ export default {
       type: String,
       isRequired: true,
     },
-    title: {
+    maxDiagram: {
+      type: Number,
+      isRequired: false,
+    },
+    orgName:{
       type: String,
-      isRequired: true,
+      isRequired: false,
     },
   },
   data() {
@@ -112,33 +127,31 @@ export default {
       this.isMouseOver = false;
     },
     async getData() {
-      let bs = parseInt(this.activeName) + 1;
-      this.data = {
-        all: [
-          210 * bs,
-          101 * bs,
-          117 * bs,
-          78 * bs,
-          107 * bs,
-          105 * bs,
-          124 * bs,
-        ],
-        completed: [
-          155 * bs,
-          99 * bs,
-          110 * bs,
-          78 * bs,
-          104 * bs,
-          102 * bs,
-          115 * bs,
-        ],
-        name: ["10.25", "10.24", "10-23", "10-22", "10-21", "10-20", "10-19"],
+      let r = (await drill({ orgId: this.orgId, period: this.activeName }))
+        .data;
+      let data = {
+        all: [],
+        completed: [],
+        rate: [],
+        name: [],
       };
-      this.data.rate = [];
-      this.data.all.forEach((v, i) => {
-        this.data.rate[i] = (this.data.completed[i] / this.data.all[i]) * 100;
-      });
-      console.info(this.data);
+
+      for (let item of r) {        
+        if (this.maxDiagram && data.name.length >= this.maxDiagram) {
+          break;
+        }
+        data.all.push(item.total);
+        data.completed.push(item.completed);
+        data.rate.push((item.completedRate * 100).toFixed(0));
+        if(this.orgName && item.orgName.startsWith(this.orgName)){
+          data.name.push(item.orgName.substr(this.orgName.length));
+        }else{
+          data.name.push(item.orgName);
+        }
+      }
+      this.data = data;
+
+      // console.info(this.data);
     },
 
     windowResize() {
@@ -146,26 +159,26 @@ export default {
     },
     initMap() {
       this.myChart && this.myChart.dispose();
-      let chart = this.$refs["chart"];
+      let c = this.$refs["chart"];
 
       // 基于准备好的dom,初始化echarts实例
       this.myChart = echarts.init(
-        chart
+        c
         // document.getElementById("commAlarmEvent_Chart")
       );
 
-   
       let t = this;
       // 指定图表的配置项和数据
       var option = {
-          color: ["rgb(250,200,88)"],
+        //  color: ["#82D5AE"],
         tooltip: {
           trigger: "axis",
           confine: true,
           axisPointer: {
             type: "shadow",
           },
-          formatter: "{c}%",
+
+          // formatter: "完成率:{c}%",
         },
         legend: {
           show: true,
@@ -177,7 +190,7 @@ export default {
           left: "3%",
           right: "4%",
           bottom: "2%",
-          top: "40px",
+          top: "20px",
           containLabel: true,
         },
 
@@ -198,9 +211,9 @@ export default {
             },
             axisLabel: {
               interval: 0,
-              rotate: -30,
+              rotate: -45,
               fontSize: 12,
-              // color: "#fff",
+              color: "#fff",
             },
           },
         ],
@@ -208,8 +221,6 @@ export default {
           {
             type: "value",
             minInterval: 1,
-            min:Math.min(...this.data.rate,50),
-            max:100,
             // max: function (value) {
             //   let m = value.max == Math.ceil(value.max) ? Math.ceil(value.max * 1.0001) : Math.ceil(value.max);
             //   return m
@@ -228,36 +239,41 @@ export default {
           //   data: this.data.all,
           // },
           {
-            name: "完成",
-            type: "line",
+            name: "完成",
+            type: "bar",
             barWidth: "14",
             // label: {
             //   show: true,
             //   position: 'top',
             // },
-            data: this.data.rate,
-            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.toFixed(1) + "%";
-                  },
-                  show: true,
-                  position: "top",
-                  textStyle: {
-                    fontWeight: "bolder",
-                    fontSize: "12",
-                    color: "rgb(245, 245, 245)",
-                  },
-                },
-              },
-            },
+            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,
           },
         ],
       };

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

@@ -0,0 +1,303 @@
+<!--  -->
+<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,
+    },
+    maxDiagram: {
+      type: Number,
+      isRequired: false,
+    },
+    orgName: {
+      type: String,
+      isRequired: false,
+    },
+  },
+  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 (this.maxDiagram && data.name.length >= this.maxDiagram) {
+          break;
+        }
+        data.all.push(item.taskTotal);
+        data.completed.push(item.completedCount);
+        data.rate.push((item.completedRate * 100).toFixed(0));
+        if (this.orgName && item.orgName.startsWith(this.orgName)) {
+          data.name.push(item.orgName.substr(this.orgName.length));
+        } else {
+          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>

+ 312 - 0
src/views/board/charts/ga38/report.vue

@@ -0,0 +1,312 @@
+<!--  -->
+<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 {
+  findMaxIndex,
+  getChartDOMSize,
+  getNextPeriod,
+  getPeriodText,
+} from "../../utils.js";
+import { orgGA38 } from "@/api/board/cockpit.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,
+    },
+    maxDiagram: {
+      type: Number,
+      isRequired: false,
+    },
+    orgName: {
+      type: String,
+      isRequired: false,
+    },
+    // title: {
+    //   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 orgGA38({ orgId: this.orgId, period: this.activeName }))
+        .data;
+      let data = {
+        ga2021: [],
+        ga2015: [],
+        rate: [],
+        name: [],
+      };
+
+      for (let p in r) {
+        let item = r[p];
+        if (this.maxDiagram && data.name.length >= this.maxDiagram) {
+          break;
+        }
+        data.ga2021.push(item.ga382021);
+        data.ga2015.push(item.ga382015);
+        data.rate.push((item.reachRate * 100).toFixed(0));
+        if (this.orgName && item.orgName.startsWith(this.orgName)) {
+          data.name.push(item.orgName.substr(this.orgName.length));
+        } else {
+          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: "GA38-2021",
+            type: "bar",
+            stack: "ga38",
+            barWidth: "14",
+            // label: {
+            //   show: true,
+            //   position: 'top',
+            // },
+            data: this.data.ga2021,
+            // 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: "GA38-2015",
+            type: "bar",
+            stack: "ga38",
+            barWidth: "14",
+            // label: {
+            //   show: true,
+            //   position: 'top',
+            // },
+            data: this.data.ga2015,
+          },
+          {
+            name: "达标率",
+            type: "bar",
+            stack: "ga38",
+            barWidth: "14",
+            tooltip: {
+              valueFormatter: (v) => `${v}%`,
+            },
+            // label: {
+            //   show: true,
+            //   formatter:'{c}%'
+            // },
+            data: this.data.rate,
+          },
+        ],
+      };
+      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>

+ 114 - 43
src/views/board/charts/question/report.vue

@@ -51,7 +51,12 @@ const types = [
   },
 ];
 export default {
-  props: ["orgId"],
+  props: {
+    orgId:{
+      type: String,
+      isRequired: true,
+    },
+  },
   data() {
     return {
       data: {
@@ -122,13 +127,14 @@ export default {
       //   notQuestion: 4*bs,
       //   reformed: (500 - 112 - 20 - 50 - 4)*bs,
       // };
-      let r = (await  question({ orgId: this.orgId, period: this.activeName })).data;
+      let r = (await question({ orgId: this.orgId, period: this.activeName }))
+        .data;
 
       this.data = r;
-      if(r.total==0){
-        this.data.reformRate=100;
-      }else{
-        this.data.reformRate=((r.reformed/r.total)*100).toFixed(0);
+      if (r.total == 0) {
+        this.data.reformRate = 100;
+      } else {
+        this.data.reformRate = ((r.reformed / r.total) * 100).toFixed(0);
       }
     },
 
@@ -143,74 +149,130 @@ export default {
 
       let chartData = [
         {
-          name: "确认",
+          name: "确认",
           value: this.data.unconfirm,
         },
         {
-          name: "异议审批中",
-          value: this.data.auditing,
+          name: "有异议",
+          value: this.data.dissent,
+        },
+        {
+          name: "已关闭",
+          value: this.data.closed,
         },
         {
           name: "待整改",
           value: this.data.unreform,
         },
         {
-          name: "异议隐患",
-          value: this.data.notQuestion,
+          name: "已整改",
+          value: this.data.reformed,
         },
         {
-          name: "整改完成",
-          value: this.data.reformed,
+          name: "已逾期",
+          value: this.data.overdue,
+        },
+        {
+          value: this.sum(
+            this.data.unconfirm,
+            this.data.dissent,
+            this.data.closed,
+            this.data.unreform,
+            this.data.reformed,
+            this.data.overdue
+          ),
+          itemStyle: {
+            color: "none",
+            decal: {
+              symbol: "none",
+            },
+            label: {
+              show: false,
+            },
+          },
         },
       ];
+
       let t = this;
       // 指定图表的配置项和数据
       var option = {
-        title: {
-          left: "center",
-        },
+        // title: {
+        //   left: "center",
+        // },
         tooltip: {
           trigger: "item",
-          formatter: "{a} <br/>{b} : {c} ({d}%)",
+          show:false,
+          // formatter: "{a} <br/>{b} : {c} ({d}%)",
         },
-        legend: {
-          type: "scroll",
-          orient: "vertical",
-          right: 10,
-          top: 20,
-          bottom: 20,
-          data: chartData.map((d) => d.name),
-          formatter: function (name) {
-            let d = chartData.find((c) => c.name === name);
-            return d.name + "  " + d.value + "项";
-          },
+        title: {
+          text: `总数: ${this.data.total}`,
+          subtext: `整改率: ${Math.round(this.data.reformed * 100)}%`,
+          left: "center",
+          top: "50%",
           textStyle: {
-            color: "white",
+            fontSize: 16,
+            color: "#fff",
+            fontWeight:200,
+            // fontFamily:'SYNormal, Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif',
+            align: "center",
+          },
+          subtextStyle: {
+            fontSize: 16,
+            color: "#fff",
+            fontWeight:200,
+            // fontFamily:'SYNormal, Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif',
+            align: "center",
           },
         },
+   
+        legend: {
+          show: false,
+          selectedMode:false,
+          // type: "scroll",
+          // orient: "vertical",
+          // right: 10,
+          // top: 20,
+          // bottom: 20,
+
+          // data: chartData.map((d) => d.name),
+          // formatter: function (name) {
+          //   let d = chartData.find((c) => c.name === name);
+          //   return (
+          //     d.name + ":" + (d.value ? (d.value * 100).toFixed(2) + "%" : "-")
+          //   );
+          // },
+          // textStyle: {
+          //   color: "white",
+          // },
+        },
         series: [
           {
             name: "问题整改",
             type: "pie",
-            radius: ["65%", "85%"],
-            center: ["30%", "50%"],
+            radius: ["70%", "110%"],
+            center: ["50%", "75%"],
+            startAngle: 180,
             data: chartData,
             label: {
               show: true,
-              position: "center",
-              color: "#fff",
-              fontSize: 14,
-              formatter: function (value) {
-                return `总数:${t.data.total}\n\n整改率:${t.data.reformRate}%`;
-              },
-            },
-            emphasis: {
-              itemStyle: {
-                shadowBlur: 10,
-                shadowOffsetX: 0,
-                shadowColor: "rgba(0, 0, 0, 0.5)",
+              //  position: "center",
+              color: "#8e949c",
+              fontSize: 12,
+              formatter: function (param) {
+                if (param.name) {
+                  return `${param.name}(${Math.round(param.value * 100)}%)`;
+                } else {
+                  return "";
+                }
               },
             },
+            // emphasis: {
+            //   itemStyle: {
+            //     shadowBlur: 10,
+            //     shadowOffsetX: 0,
+            //     shadowColor: "rgba(0, 0, 0, 0.5)",
+            //   },
+            // },
           },
         ],
       };
@@ -229,6 +291,15 @@ export default {
         this.getData();
       }, this.refreshTime);
     },
+    sum(...values) {
+      let t = 0;
+      values.forEach((v) => {
+        if (v) {
+          t = t + parseFloat(v);
+        }
+      });
+      return t;
+    },
   },
 };
 </script>

+ 17 - 13
src/views/board/charts/resumption/report_bar.vue → src/views/board/charts/resumption/report.vue

@@ -21,6 +21,7 @@
 <script>
 import "./../../board.scss";
 import * as echarts from "echarts";
+import { resumption } from "@/api/board/cockpit.js";
 import {
   findMaxIndex,
   getChartDOMSize,
@@ -55,18 +56,22 @@ export default {
       type: String,
       isRequired: true,
     },
-    orgName:{
-      type: String,
-      isRequired: true,
+    maxDiagram:{
+      type:Number,
+      isRequired:false,      
     },
-    title: {
+    orgName:{
       type: String,
-      isRequired: true,
-    },
-    api: {
-      type: Function,
-      isRequired: true,
+      isRequired: false,
     },
+    // title: {
+    //   type: String,
+    //   isRequired: true,
+    // },
+    // api: {
+    //   type: Function,
+    //   isRequired: true,
+    // },
   },
   data() {
     return {
@@ -101,7 +106,6 @@ export default {
 
   created() {
     this.types = types;
-    this.maxDisplay = 16;
     this.refreshTime = 1 * 10 * 1000;
     this.isMouseOver = false;
   },
@@ -128,7 +132,7 @@ export default {
       this.isMouseOver = false;
     },
     async getData() {
-      let r = (await this.api({ orgId: this.orgId, period: this.activeName }))
+      let r = (await resumption({ orgId: this.orgId, period: this.activeName }))
         .data;
       let data = {
         all: [],
@@ -138,14 +142,14 @@ export default {
       };
 
       for (let item of r) {
-        if(data.all.length>=16){
+        if(this.maxDiagram && data.all.length>=this.maxDiagram){
           break;
         }
         data.all.push(item.taskTotal);
         data.completed.push(item.completedCount);
         data.rate.push((item.completedRate * 100).toFixed(0));
         
-        if(item.orgName.startsWith(this.orgName)){
+        if(this.orgName && item.orgName.startsWith(this.orgName)){
           data.name.push(item.orgName.substr(this.orgName.length));
         }else{
           data.name.push(item.orgName);

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

@@ -0,0 +1,244 @@
+<!--  -->
+<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: 28px;
+          height: calc(100% - 50px);
+        "
+      >
+        <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;
+  // line-height: 22px;
+  height: 20%;
+  max-height: 30px;
+  & > span {
+    display: inline-block;
+    width: 40px;
+  }
+  & > span:first-child {
+    width: 80px;
+  }
+}
+</style>

+ 37 - 29
src/views/board/index.vue

@@ -29,56 +29,47 @@
         <div>
           <resumptionReport
             :orgId="selectedOrg.id"
-            :api="api.resumption"
+            :maxDiagram="maxDiagram"
             :orgName="selectedOrg.name"
-            title="日常安全履职"
           />
         </div>
         <div>
-          <resumptionReport
-            :orgId="selectedOrg.id"
-            :api="api.monitor"
-            :orgName="selectedOrg.name"
-            title="监控调阅"
-          />
+          <question :orgId="selectedOrg.id" />
         </div>
         <div>
-          <resumptionReport
+          <ga38-chart
             :orgId="selectedOrg.id"
-            :api="api.safetyCheck"
+            :maxDiagram="maxDiagram"
             :orgName="selectedOrg.name"
-            title="日常安全检查"
           />
         </div>
       </div>
       <div>
         <div>
           <div>
-            <mapChart :orgId="selectedOrg.id" :orgName="selectedOrg.name" />
+            <mapChart :orgId="selectedOrg.id" />
           </div>
           <div>
-            <orgStatis :orgId="selectedOrg.id" :orgName="selectedOrg.name" />
+            <comprehesive-chart :orgId="selectedOrg.id" />
           </div>
         </div>
       </div>
       <div>
         <div>
-          <question :orgId="selectedOrg.id" />
+          <safety-check-chart :orgId="selectedOrg.id" />
         </div>
         <div>
-          <resumptionReport
+          <drill-chart
             :orgId="selectedOrg.id"
-            :api="api.drill"
+            :maxDiagram="maxDiagram"
             :orgName="selectedOrg.name"
-            title="预案演练"
           />
         </div>
         <div>
-          <resumptionReport
+          <eduChart
             :orgId="selectedOrg.id"
-            :api="api.edu"
+            :maxDiagram="maxDiagram"
             :orgName="selectedOrg.name"
-            title="教育培训"
           />
         </div>
 
@@ -94,10 +85,15 @@
 
 <script>
 import { mapGetters } from "vuex";
-import resumptionReport from "./charts/resumption/report_bar.vue";
+import resumptionReport from "./charts/resumption/report.vue";
 import question from "./charts/question/report.vue";
 import mapChart from "./charts/map/report.vue";
-import orgStatis from "./charts/org/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";
 
@@ -114,7 +110,8 @@ export default {
         id: null,
         name: null,
       },
-      orgCascaderSelectedIds:[],
+      maxDiagram: null,
+      orgCascaderSelectedIds: [],
       electricHost: undefined,
       api,
     };
@@ -124,7 +121,11 @@ export default {
     resumptionReport,
     question,
     mapChart,
-    orgStatis,
+    ga38Chart,
+    comprehesiveChart,
+    safetyCheckChart,
+    drillChart,
+    eduChart,
   },
 
   computed: {
@@ -192,7 +193,8 @@ export default {
       id: this.orgId,
       name: this.orgName,
     };
-    this.orgCascaderSelectedIds=[this.orgId]
+
+    this.orgCascaderSelectedIds = [this.orgId];
   },
   beforeDestroy() {
     clearInterval(this.orgtimer);
@@ -228,6 +230,12 @@ export default {
         id: checked[0].data.id,
         name: checked[0].data.shortName,
       };
+
+      if (checked[0].data.type == 3) {
+        this.maxDiagram = 10;
+      } else {
+        this.maxDiagram = null;
+      }
     },
   },
 };
@@ -466,10 +474,10 @@ export default {
 
         & > div:first-child {
           width: 100%;
-          height: 80%;
+          height: 75%;
         }
         & > div:nth-child(2) {
-          height: calc(20%);
+          height: calc(25%);
         }
       }
     }
@@ -527,11 +535,11 @@ export default {
 </style>
 <style lang="scss">
 .board-org-popper {
-   .el-cascader-menu__wrap {
+  .el-cascader-menu__wrap {
     height: auto !important;
   }
 
-   .el-scrollbar__wrap {
+  .el-scrollbar__wrap {
     overflow: auto;
   }
 }

+ 1 - 0
src/views/core/message/index.vue

@@ -21,6 +21,7 @@
                   @defaultKey="getDefaultKey"
                   @checkChange="checkChange"
                   @click="clickTreeNode"
+                  hangsheTree
                   ref="orgTree"
                 ></org-tree>
               </el-form-item>

+ 11 - 1
src/views/core/outIn/approve/index.vue

@@ -172,9 +172,19 @@ export default {
       rules: {}
     };
   },
-  created() {
+  mounted() {
     this.getList();
   },
+  beforeRouteEnter(to,from,next){
+    console.log(from,'to')
+    if(from.path === '/home'){
+      next(vm=>{
+        vm.queryParams.approveStatus = to.query.approveStatus;
+      })
+    }else {
+      next()
+    }
+  },
   methods: {
     dayjs,
     /** 查询介绍信列表 */

+ 10 - 9
src/views/evaluationRule/addEvaluate.vue

@@ -2,9 +2,9 @@
   <div>
     <!-- :visible.sync="isShow" -->
     <DialogCom
-    :visible.sync="isShow"
+      :visible.sync="isShow"
       :width="'500px'"
-      :title="`${id ? '编辑' : '新增'}扣分规则`"
+      :title="`${!id ? '编辑' : '新增'}扣分规则`"
       @close="closeHandler"
       append-to-body
     >
@@ -104,17 +104,18 @@ export default {
   mounted() {},
 
   methods: {
-    show() {
+    show(val) {
+      console.log(this.id );
+      this.id = val;
+
       this.isShow = true;
     },
     resetFormHandler() {
       this.isShow = false;
     },
     closeHandler() {
-      if(this.$refs.ruleForm){
-
-
-        this.$refs.ruleForm.resetFields()
+      if (this.$refs.ruleForm) {
+        this.$refs.ruleForm.resetFields();
       }
       this.ruleForm = {};
     },
@@ -128,9 +129,9 @@ export default {
             //当前是新增
             this.ruleForm.uid = guid();
           }
-          let obj=JSON.parse(JSON.stringify(this.ruleForm))
+          let obj = JSON.parse(JSON.stringify(this.ruleForm));
           this.$emit("submitHandler", obj);
-         
+
           this.isShow = false;
         } else {
           return false;

+ 1 - 1
src/views/evaluationRule/editEvaluationRuleDialog.vue

@@ -339,7 +339,7 @@ export default {
     },
 
     openSelect() {
-      this.$refs.dialogEvaluate.show();
+      this.$refs.dialogEvaluate.show(1);
     },
     onSubmit() {
       this.$refs.form.validate(async (isValidate) => {

+ 3 - 2
src/views/index.vue

@@ -147,6 +147,9 @@ export default {
         {
           name:'来访审批',
           path:'/Introduce/core/letter/approve',
+          query: {
+            approveStatus:0
+          }
         },
         {
           name:'隐患问题',
@@ -180,9 +183,7 @@ export default {
   methods: {
     imageUrl,
     clickNum(item){
-      console.log(item,'666')
       let page = this.pageList.find(v=>v.name === item.taskTypeText);
-      console.log(page,'666')
       this.$router.push({
         path:page.path,
         query:page.query

+ 81 - 10
src/views/resumptionEvaluate/evaluate/editDialog.vue

@@ -135,7 +135,7 @@
         :orgType="formData.orgType"
         @submitHandler="onSelect"
       ></DialogSelect>
-      <DialogThreeState ref="DialogThreeState"> </DialogThreeState>
+      <!-- <DialogThreeState ref="DialogThreeState"> </DialogThreeState> -->
     </DialogCom>
   </div>
 </template>
@@ -351,17 +351,88 @@ export default {
           }
           if (this.formData.id) {
             //编辑
+            let msg = "";
+            if(obj.status=='1'&&obj.isDistribute=='0'){
+            console.log(obj.status=='1'&&obj.isDistribute=='0')
+              msg = "是否确认修改?";
+              this.$modal
+              .confirm(msg)
+              .then(function () {
+                return editEvaluate(obj);
+              })
+              .then(() => {
+                this.$message.success("编辑成功");
+                 this.$emit("success");
+                 this.onHide();
+                this.getList();
+              })
+              .catch(() => {
+              });
+            }else{
+              if(obj.isComplete==true){
+              msg = "因存在已完成任务,本次修改内容将下周期生效";
+                this.$modal
+              .confirm(msg)
+              .then(function () {
+                return editEvaluate(obj);
+              })
+              .then(() => {
+                this.$message.success("编辑成功");
+                 this.$emit("success");
+                 this.onHide();
+                this.getList();
 
-            editEvaluate(obj).then((res) => {
-              let { code, msg } = res;
-              if (code == 200) {
-                this.$message.success(msg);
-                this.$emit("success");
-                this.onHide();
-              } else {
-                this.$message.error(msg);
-              }
+              })
+              .catch(() => {
+              });
+            }else{
+              if(obj.isHaveTask==false){
+                msg = "是否确认修改?";
+              this.$modal
+              .confirm(msg)
+              .then(function () {
+                return editEvaluate(obj);
+              })
+              .then(() => {
+                this.$message.success("编辑成功");
+                 this.$emit("success");
+                 this.onHide();
+                this.getList();
+              })
+              .catch(() => {
+              });
+              }else{
+                msg =  "因不存在已完成任务,本次修改内容将立即生效";
+              
+              this.$modal
+            .confirm(msg)
+            .then(function () {
+              return editEvaluate(obj);
+            })
+            .then(() => {
+              this.$message.success("编辑成功");
+                 this.$emit("success");
+                 this.onHide();
+                this.getList();
+
+            })
+            .catch(() => {
             });
+              }
+            }
+            }
+        
+            // editEvaluate(obj).then((res) => {
+            //   console.log(obj);
+            //   let { code, msg } = res;
+            //   if (code == 200) {
+            //     this.$message.success(msg);
+            //     this.$emit("success");
+            //     this.onHide();
+            //   } else {
+            //     this.$message.error(msg);
+            //   }
+            // });
           } else {
             //新增
             addEvaluate(obj).then((res) => {

+ 1 - 0
src/views/resumptionEvaluate/evaluate/index.vue

@@ -28,6 +28,7 @@
                   @defaultKey="getDefaultKey"
                   @checkChange="checkChange"
                   @click="clickTreeNode"
+                  hangsheTree
                   ref="orgTree"
                 ></org-tree>
               </el-form-item>

+ 1 - 1
src/views/safetyBook/aqbwbndjh/index.vue

@@ -268,7 +268,7 @@ export default {
     },
   },
   created() {
-    this.getDeptTree();
+    // this.getDeptTree();
     this.getConfigKey("sys.user.initPassword").then((response) => {
       this.initPassword = response.msg;
     });

+ 1 - 1
src/views/safetyBook/hsggbsdj/index.vue

@@ -285,7 +285,7 @@ export default {
     },
   },
   created() {
-    this.getDeptTree();
+    // this.getDeptTree();
     this.getConfigKey("sys.user.initPassword").then((response) => {
       this.initPassword = response.msg;
     });

+ 1 - 1
src/views/safetyBook/newBook/index.vue

@@ -295,7 +295,7 @@ export default {
     },
   },
   created() {
-    this.getDeptTree();
+    // this.getDeptTree();
     this.getConfigKey("sys.user.initPassword").then((response) => {
       this.initPassword = response.msg;
     });

+ 24 - 6
src/views/scorestatistics/index.vue

@@ -12,8 +12,8 @@
             :model="queryParams"
             size="small"
           >
-            <el-form-item class="formTreeItem" label="组织机构">
-              <tree-select
+            <el-form-item label="组织机构">
+              <!-- <tree-select
                 v-model="queryParams.orgId"
                 :clearable="false"
                 :noChildrenText="''"
@@ -25,7 +25,16 @@
                 noOptionsText="没有数据"
                 noResultsText="没有搜索结果"
                 placeholder="请选择归属机构"
-              />
+              /> -->
+              <org-tree
+                  v-model="queryParams.orgId"
+                  @defaultKey="getDefaultKey"
+                  @checkChange="checkChange"
+                  @click="clickTreeNode"
+                  :defaultCheckSub="true"
+                  :showCheckSub="false"
+                  ref="orgTree"
+                ></org-tree>
             </el-form-item>
             <el-form-item label="查询年月">
               <el-date-picker
@@ -168,7 +177,7 @@
 <script>
 import {mapGetters} from "vuex";
 import {anewDetail, list} from "@/api/scorestatistics/scorestatistics.js";
-import OrgTree from "@/components/orgTree";
+import OrgTree from "@/components/orgTree/orgQuerySelector.vue";
 import {newDateMonth} from "@/utils/index.js";
 import scorestatisticsDialog from "./scorestatisticsDialog.vue";
 import {deptTreeSelect} from "@/api/system/public";
@@ -194,7 +203,6 @@ export default {
       queryParams: {
         orgId: null,
         date: newDateMonth("", "1"),
-
         pageNum: 1,
         pageSize: 10,
       },
@@ -208,7 +216,7 @@ export default {
   created() {
     this.queryParams.orgId = this.orgId;
     this.getList();
-    this.getDeptTree();
+    // this.getDeptTree();
   },
   mounted() {
   },
@@ -236,6 +244,16 @@ export default {
     formatterScore({dataYear, dataMonth}) {
       return dataYear + "-" + dataMonth;
     },
+    getDefaultKey(key) {
+      this.queryParams.orgId = key;
+      this.getList();
+    },
+    
+     // 节点单击事件
+     clickTreeNode(data) {
+      this.queryParams.orgId = data.id;
+      this.handleQuery();
+    },
 
     //获取列表
     getList() {

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 915 - 897
src/views/system/dept/extend.vue


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio