Browse Source

劣化状态分析页面单独提出、节能减排KPI页面完成、导出功能修改

Koishi 3 years ago
parent
commit
35ac4fa53a

+ 3 - 2
public/static/config/modeConfig.js

@@ -1,5 +1,5 @@
 // 本地联调开关
-const localTest = 0;
+const localTest = 1;
 
 // 服务器地址
 let baseURL = null;
@@ -16,8 +16,9 @@ const tilesMaxLevel = 18;
 const adapterUrl = "http://10.155.32.4:8011/";
 
 if (localTest) {
-    baseURL = "http://192.168.10.13:8082/" // 联机调试 - 石林
+    // baseURL = "http://192.168.10.13:8082/" // 联机调试 - 石林
     // baseURL = "http://10.155.32.33:9001/" // 联机调试 - 谢生杰
+    baseURL = "http://192.168.10.6:8082/" // 联机调试 - 王昌盛
 
     tilesUrl = "http://localhost:8080/static/cesium/Assets/Textures/NaturalEarthII";
 } else {

BIN
public/static/img/jnjp1.jpg


BIN
public/static/img/jnjp2.jpg


BIN
public/static/img/jnjp3.jpg


BIN
public/static/img/jnjp4.jpg


+ 23 - 19
src/router/index.js

@@ -150,6 +150,12 @@ const routes = [{
 		import( /* webpackChunkName: "decision1" */ "../views/Decision/Decision1.vue"),
 },
 {
+	path: "/decision/zbtjfx", // 节能减排KPI
+	name: "decision1",
+	component: () =>
+		import( /* webpackChunkName: "decision1" */ "../views/Decision/zbtjfx.vue"),
+},
+{
 	path: "/decision/decision1Mx", //风机绩效榜明细
 	name: "decision1Mx",
 	component: () =>
@@ -419,6 +425,11 @@ const routes = [{
 		import("../views/HealthControl/Health3.vue"),
 },
 {
+	path: "/health/healthLineChart/:wpId/:wtId", // 劣化状态分析
+	component: () => import( /* webpackChunkName: "healthLineChart" */
+		"../views/HealthControl/healthLineChart.vue"),
+},
+{
 	path: "/health/health4",
 	name: "health4",
 	children: [{
@@ -432,18 +443,11 @@ const routes = [{
 		component: () =>
 			import( /* webpackChunkName: "health8" */ "../views/HealthControl/Health10.vue"),
 	}, {
-		path: "healthLineChart/:wpId/:wtId", // 风机健康趋势
-		component: () =>
-			import( /* webpackChunkName: "healthLineChart" */
-				"../views/HealthControl/healthLineChart.vue"),
-	},
-	{
 		path: "healthLineChart2/:wpId/:wtId", // 健康趋势
 		component: () =>
 			import( /* webpackChunkName: "healthLineChart2" */
 				"../views/HealthControl/healthLineChart2.vue"),
-	}
-	],
+	}],
 	component: () =>
 		import("../views/HealthControl/Health4.vue"),
 },
@@ -540,19 +544,19 @@ const routes = [{
 	component: () => import("../views/windAnalysis/fxzstmain.vue"),
 },
 {
-path:"/health/MalfunctionWarning/", //故障预警
-name:"MalfunctionWarning",
-component:() => import("../views/MalfunctionWarning/MalfunctionWarning.vue")
+	path: "/health/MalfunctionWarning/", //故障预警
+	name: "MalfunctionWarning",
+	component: () => import("../views/MalfunctionWarning/MalfunctionWarning.vue")
 },
 {
-	path:"/health/MalfunctionWarning/DBscan", //dbscan
-	name:"DBscan",
-	component:() => import("../views/MalfunctionWarning/DBscan.vue")
+	path: "/health/MalfunctionWarning/DBscan", //dbscan
+	name: "DBscan",
+	component: () => import("../views/MalfunctionWarning/DBscan.vue")
 },
 {
-	path:"/health/MalfunctionWarning/mdjl", //密度聚类
-	name:"mdjl",
-	component:() => import("../views/MalfunctionWarning/mdjl.vue")
+	path: "/health/MalfunctionWarning/mdjl", //密度聚类
+	name: "mdjl",
+	component: () => import("../views/MalfunctionWarning/mdjl.vue")
 },
 /***********************************************************智慧检修************************************************************* */
 /***********************************************************安全管控************************************************************* */
@@ -583,10 +587,10 @@ component:() => import("../views/MalfunctionWarning/MalfunctionWarning.vue")
 		import('../views/Others/index.vue'),
 },
 {
-	path: "/others/reportPandect", // 报表总览
+	path: "/others/reportPandect", // 报表总览
 	name: "reportPandect",
 	component: () =>
-		import( /* webpackChunkName: "reportPandect" */ "../views/reportPandect/index.vue"),
+		import( /* webpackChunkName: "reportPandect" */ "../views/reportPandect/index.vue"),
 }, {
 	path: "/others/tjfx",
 	name: "tjfx",

File diff suppressed because it is too large
+ 352 - 0
src/views/Decision/zbtjfx.vue


+ 43 - 27
src/views/HealthControl/Health4.vue

@@ -10,9 +10,20 @@
           <div class="page-common-body-menu-border left bottom"></div>
           <div class="page-common-body-menu-border right top"></div>
           <div class="page-common-body-menu-border right bottom"></div>
-          <div class="page-common-body-menu-item" v-for="(menuData, index) of menuDatas" :key="index" @click="clickMenu(index)" :class="{ active: activeIndex == index }">
+          <div
+            class="page-common-body-menu-item"
+            v-for="(menuData, index) of menuDatas"
+            :key="index"
+            @click="clickMenu(index)"
+            :class="{ active: activeIndex == index }"
+          >
             <router-link :to="menuData.path">
-              <span class="svg-icon" :class="activeIndex == index ? 'svg-icon-yellow' : 'svg-icon-green'">
+              <span
+                class="svg-icon"
+                :class="
+                  activeIndex == index ? 'svg-icon-yellow' : 'svg-icon-green'
+                "
+              >
                 <SvgIcon :svgid="menuData.icon"></SvgIcon>
               </span>
             </router-link>
@@ -30,38 +41,43 @@ export default {
   components: { SvgIcon },
   data() {
     return {
-      activeIndex:0,
-      wpId:"",
-      wtId:"",
-      menuDatas: [{
-        icon: "svg-q实时监视",
-        path: "/health/health0",
-      },{
-        icon: "svg-q健康",
-        path: "/health/health10",
-      },{
-        icon: "svg-q趋势",
-        path: "/health/health4/healthLineChart2",
-      },{
-        icon: "svg-q曲线",
-        path: "/health/health4/healthLineChart",
-      }]
+      activeIndex: 0,
+      wpId: "",
+      wtId: "",
+      menuDatas: [
+        {
+          icon: "svg-q实时监视",
+          path: "/health/health0",
+        },
+        {
+          icon: "svg-q健康",
+          path: "/health/health10",
+        },
+        {
+          icon: "svg-q趋势",
+          path: "/health/health4/healthLineChart2",
+        },
+        {
+          icon: "svg-q曲线",
+          path: "/health/health4/healthLineChart",
+        },
+      ],
     };
   },
 
   created() {
-   this.wtId = this.$route.params.wtId;
-   this.wpId = this.$route.params.wpId;
-   this.menuDatas.forEach(ele=>{
-     ele.path += ('/'+this.wpId + '/'+this.wtId);
-   });
+    this.wtId = this.$route.params.wtId;
+    this.wpId = this.$route.params.wpId;
+    this.menuDatas.forEach((ele) => {
+      ele.path += "/" + this.wpId + "/" + this.wtId;
+    });
   },
-  
-  methods:{
-    clickMenu: function(index) {
+
+  methods: {
+    clickMenu: function (index) {
       this.activeIndex = index;
     },
-  }
+  },
 };
 </script>
 

+ 220 - 180
src/views/layout/Menu.vue

@@ -1,10 +1,28 @@
 <template>
   <div class="menu">
     <ul class="menu-list">
-      <li class="menu-item" v-for="(menu, index) of currentMenu" :key="menu" @click="click(index)" :class="{ active: activeIndex == index }" @mouseenter="subMenuShow(menu.children, index)">
+      <li
+        class="menu-item"
+        v-for="(menu, index) of currentMenu"
+        :key="menu"
+        @click="click(index)"
+        :class="{ active: activeIndex == index }"
+        @mouseenter="subMenuShow(menu.children, index)"
+      >
         <router-link :to="menu.path">
-          <el-tooltip class="item" effect="dark" :content="menu.text" placement="bottom" :show-after="500" :enterable="false" hide-after="10">
-            <div class="menu-icon svg-icon" :class="activeIndex == index ? 'svg-icon-green' : 'svg-icon-gray'">
+          <el-tooltip
+            class="item"
+            effect="dark"
+            :content="menu.text"
+            placement="bottom"
+            :show-after="500"
+            :enterable="false"
+            hide-after="10"
+          >
+            <div
+              class="menu-icon svg-icon"
+              :class="activeIndex == index ? 'svg-icon-green' : 'svg-icon-gray'"
+            >
               <SvgIcon :svgid="menu.icon"></SvgIcon>
             </div>
           </el-tooltip>
@@ -19,12 +37,23 @@
   </div>
   <div class="sub-menu" v-show="isShowSubMenu" @mouseleave="subMenuHide">
     <ul class="menu-list">
-      <li class="menu-item" v-for="(menu, index) of subMenu" @click="subclick(index)" :key="menu" :class="{ active: subIndex == index }">
+      <li
+        class="menu-item"
+        v-for="(menu, index) of subMenu"
+        @click="subclick(index)"
+        :key="menu"
+        :class="{ active: subIndex == index }"
+      >
         <router-link :to="menu.path">
           <div class="menu-icon svg-icon">
             <!-- <SvgIcon :svgid="menu.icon"></SvgIcon> -->
           </div>
-          <div class="sub-menu-text" :class="subIndex == index ? 'green' : 'gray'">{{ menu.text }}</div>
+          <div
+            class="sub-menu-text"
+            :class="subIndex == index ? 'green' : 'gray'"
+          >
+            {{ menu.text }}
+          </div>
         </router-link>
       </li>
     </ul>
@@ -273,6 +302,11 @@ export default {
                   icon: "svg-wind-site",
                   path: "/decision/zzhcydl",
                 },
+                {
+                  text: "节能减排API",
+                  icon: "svg-wind-site",
+                  path: "/decision/zzhcydl",
+                },
               ],
             },
             {
@@ -405,6 +439,11 @@ export default {
                   icon: "svg-wind-site",
                   path: "/health/health8",
                 },
+                {
+                  text: "劣化状态分析",
+                  icon: "svg-q曲线",
+                  path: "/health/healthLineChart/MHS_FDC/MG01_01",
+                },
               ],
             },
             {
@@ -495,9 +534,9 @@ export default {
               ],
             },
             {
-              text:"故障预警",
-              icon:"svg-预警记录",
-              path:"/health/MalfunctionWarning/",
+              text: "故障预警",
+              icon: "svg-预警记录",
+              path: "/health/MalfunctionWarning/",
               // children:[
               //   {
               //     text:"算法类型",
@@ -515,7 +554,7 @@ export default {
               //     path:"/health/MalfunctionWarning/mdjl",
               //   }
               // ]
-            }
+            },
           ],
         },
         {
@@ -545,137 +584,137 @@ export default {
         //   id: "znbb",
         //   text: "智能报表",
         //   data: [
-            // {
-            //   text: '报表首页',
-            //   icon: 'svg-wind-site',
-            //   path: '/znbb/reportPandect'
-            // },// 统计分析
-            // {
-            //   text: "统计分析",
-            //   icon: "svg-matrix",
-            //   path: "/tjfx",
-            //   children: [
-            //     {
-            //       text: "统计分析",
-            //       icon: "svg-matrix",
-            //       path: "/tjfx",
-            //     },
-            //     {
-            //       text: "表底值查询",
-            //       icon: "svg-matrix",
-            //       path: "/bdzcx",
-            //     },
-            //   ],
-            // },
-            // {
-            //   text: "报表管理",
-            //   icon: "svg-matrix",
-            //   path: "/bdzcx",
-            //   children: [
-            //     {
-            //       text: "OA日报",
-            //       icon: "svg-matrix",
-            //       path: "/oafd",
-            //     },
-            //     {
-            //       text: "OA日报(光伏)",
-            //       icon: "svg-matrix",
-            //       path: "/oagf",
-            //     },
-            //     {
-            //       text: "新能源日报",
-            //       icon: "svg-matrix",
-            //       path: "/xnyrb",
-            //     },
-            //     {
-            //       text: "国电电力MISS日报(风电)",
-            //       icon: "svg-matrix",
-            //       path: "/missfdrb",
-            //     },
-            //     {
-            //       text: "国电电力MISS日报(光伏)",
-            //       icon: "svg-matrix",
-            //       path: "/missgfrb",
-            //     },
-            //     {
-            //       text: "新能源风电生产月报",
-            //       icon: "svg-matrix",
-            //       path: "/xnyfdscyb",
-            //     },
-            //     {
-            //       text: "麻黄山生产月报",
-            //       icon: "svg-matrix",
-            //       path: "/mhsscyb",
-            //     },
-            //     {
-            //       text: "牛首山生产月报",
-            //       icon: "svg-matrix",
-            //       path: "/nssscyb",
-            //     },
-            //     {
-            //       text: "青山生产月报",
-            //       icon: "svg-matrix",
-            //       path: "/qsscyb",
-            //     },
-            //     {
-            //       text: "石板泉生产月报",
-            //       icon: "svg-matrix",
-            //       path: "/sbqscyb",
-            //     },
-            //     {
-            //       text: "香山生产月报",
-            //       icon: "svg-matrix",
-            //       path: "/xsscyb",
-            //     },
-            //     {
-            //       text: "新能源光伏生产月报",
-            //       icon: "svg-matrix",
-            //       path: "/xnygfscyb",
-            //     },
-            //     {
-            //       text: "大武口生产月报",
-            //       icon: "svg-matrix",
-            //       path: "/dwkscyb",
-            //     },
-            //     {
-            //       text: "平罗生产月报",
-            //       icon: "svg-matrix",
-            //       path: "/plscyb",
-            //     },
-            //     {
-            //       text: "宣和生产月报",
-            //       icon: "svg-matrix",
-            //       path: "/xhscyb",
-            //     },
-            //   ],
-            // },
-            // {
-            //   text: "自定制报表管理",
-            //   icon: "svg-matrix",
-            //   path: "/fdczzdy",
-            //   children: [
-            //     {
-            //       text: "风电场站自定义",
-            //       icon: "svg-matrix",
-            //       path: "/fdczzdy",
-            //     },
-            //     {
-            //       text: "风电项目自定义",
-            //       icon: "svg-matrix",
-            //       path: "/fdxmzdy",
-            //     },
-            //     {
-            //       text: "光伏场站自定义",
-            //       icon: "svg-matrix",
-            //       path: "/gfczzdy",
-            //     },
-            //     {
-            //       text: "光伏项目自定义",
-            //       icon: "svg-matrix",
-            //       path: "/gfxmzdy",
-            //     },
-            //   ],
-            // },
+        // {
+        //   text: '报表首页',
+        //   icon: 'svg-wind-site',
+        //   path: '/znbb/reportPandect'
+        // },// 统计分析
+        // {
+        //   text: "统计分析",
+        //   icon: "svg-matrix",
+        //   path: "/tjfx",
+        //   children: [
+        //     {
+        //       text: "统计分析",
+        //       icon: "svg-matrix",
+        //       path: "/tjfx",
+        //     },
+        //     {
+        //       text: "表底值查询",
+        //       icon: "svg-matrix",
+        //       path: "/bdzcx",
+        //     },
+        //   ],
+        // },
+        // {
+        //   text: "报表管理",
+        //   icon: "svg-matrix",
+        //   path: "/bdzcx",
+        //   children: [
+        //     {
+        //       text: "OA日报",
+        //       icon: "svg-matrix",
+        //       path: "/oafd",
+        //     },
+        //     {
+        //       text: "OA日报(光伏)",
+        //       icon: "svg-matrix",
+        //       path: "/oagf",
+        //     },
+        //     {
+        //       text: "新能源日报",
+        //       icon: "svg-matrix",
+        //       path: "/xnyrb",
+        //     },
+        //     {
+        //       text: "国电电力MISS日报(风电)",
+        //       icon: "svg-matrix",
+        //       path: "/missfdrb",
+        //     },
+        //     {
+        //       text: "国电电力MISS日报(光伏)",
+        //       icon: "svg-matrix",
+        //       path: "/missgfrb",
+        //     },
+        //     {
+        //       text: "新能源风电生产月报",
+        //       icon: "svg-matrix",
+        //       path: "/xnyfdscyb",
+        //     },
+        //     {
+        //       text: "麻黄山生产月报",
+        //       icon: "svg-matrix",
+        //       path: "/mhsscyb",
+        //     },
+        //     {
+        //       text: "牛首山生产月报",
+        //       icon: "svg-matrix",
+        //       path: "/nssscyb",
+        //     },
+        //     {
+        //       text: "青山生产月报",
+        //       icon: "svg-matrix",
+        //       path: "/qsscyb",
+        //     },
+        //     {
+        //       text: "石板泉生产月报",
+        //       icon: "svg-matrix",
+        //       path: "/sbqscyb",
+        //     },
+        //     {
+        //       text: "香山生产月报",
+        //       icon: "svg-matrix",
+        //       path: "/xsscyb",
+        //     },
+        //     {
+        //       text: "新能源光伏生产月报",
+        //       icon: "svg-matrix",
+        //       path: "/xnygfscyb",
+        //     },
+        //     {
+        //       text: "大武口生产月报",
+        //       icon: "svg-matrix",
+        //       path: "/dwkscyb",
+        //     },
+        //     {
+        //       text: "平罗生产月报",
+        //       icon: "svg-matrix",
+        //       path: "/plscyb",
+        //     },
+        //     {
+        //       text: "宣和生产月报",
+        //       icon: "svg-matrix",
+        //       path: "/xhscyb",
+        //     },
+        //   ],
+        // },
+        // {
+        //   text: "自定制报表管理",
+        //   icon: "svg-matrix",
+        //   path: "/fdczzdy",
+        //   children: [
+        //     {
+        //       text: "风电场站自定义",
+        //       icon: "svg-matrix",
+        //       path: "/fdczzdy",
+        //     },
+        //     {
+        //       text: "风电项目自定义",
+        //       icon: "svg-matrix",
+        //       path: "/fdxmzdy",
+        //     },
+        //     {
+        //       text: "光伏场站自定义",
+        //       icon: "svg-matrix",
+        //       path: "/gfczzdy",
+        //     },
+        //     {
+        //       text: "光伏项目自定义",
+        //       icon: "svg-matrix",
+        //       path: "/gfxmzdy",
+        //     },
+        //   ],
+        // },
         //   ],
         // },
         {
@@ -807,7 +846,8 @@ export default {
                   path: "/others/gfxmzdy",
                 },
               ],
-            },{
+            },
+            {
               text: "原始数据查询",
               icon: "svg-报表首页",
               path: "/others/realSearch",
@@ -822,16 +862,16 @@ export default {
                   icon: "svg-wind-site",
                   path: "/others/historySearch",
                 },
-				{
-				  text: "气象历史数据",
-				  icon: "svg-wind-site",
-				  path: "/others/weather",
-				},
-				{
-				  text: "数据导出",
-				  icon: "svg-wind-site",
-				  path: "/others/ExportExcel",
-				},
+                {
+                  text: "气象历史数据",
+                  icon: "svg-wind-site",
+                  path: "/others/weather",
+                },
+                {
+                  text: "数据导出",
+                  icon: "svg-wind-site",
+                  path: "/others/ExportExcel",
+                },
               ],
             },
             {
@@ -919,35 +959,35 @@ export default {
                 },
               ],
             },
-			{
-			  text: "样本库",
-			  icon: "svg-预警记录",
-			  path: "/others/gz",
-			  children: [
-			    {
-			      text: "故障样本库",
-			      icon: "svg-matrix",
-			      path: "/others/gz",
-			    },
-			    {
-			      text: "性能下降样本库",
-			      icon: "svg-matrix",
-			      path: "/others/xn",
-			    },
-			    {
-			      text: "预警分析样本库",
-			      icon: "svg-matrix",
-			      path: "/others/yj",
-			    },
-			    {
-			      text: "智能营销样本库",
-			      icon: "svg-matrix",
-			      path: "/others/zn",
-			    }
-			  ],
-			},
+            {
+              text: "样本库",
+              icon: "svg-预警记录",
+              path: "/others/gz",
+              children: [
+                {
+                  text: "故障样本库",
+                  icon: "svg-matrix",
+                  path: "/others/gz",
+                },
+                {
+                  text: "性能下降样本库",
+                  icon: "svg-matrix",
+                  path: "/others/xn",
+                },
+                {
+                  text: "预警分析样本库",
+                  icon: "svg-matrix",
+                  path: "/others/yj",
+                },
+                {
+                  text: "智能营销样本库",
+                  icon: "svg-matrix",
+                  path: "/others/zn",
+                },
+              ],
+            },
           ],
-        }
+        },
       ],
       activeIndex: 0,
       isShowSubMenu: false,
@@ -955,7 +995,7 @@ export default {
       subMenu: [],
       subIndex: null,
     };
-  }, 
+  },
   methods: {
     click(index) {
       this.activeIndex = index;

+ 122 - 76
src/views/report/ExportExcel.vue

@@ -62,29 +62,34 @@
             </td>
             <td class="excelPickerTd">
               <el-date-picker
-                v-model="value1[index]"
-                type="monthrange"
-                @change="value1Change(index)"
-                range-separator="至"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
                 class="mr15"
+                format="YYYY-MM"
+                v-model="dateArray[index]"
+                type="month"
+                placeholder="请选择"
               >
               </el-date-picker>
             </td>
             <td>
-              <el-input
-                placeholder="请输入时间间隔"
-                type="number"
-                v-model="inputVal[index]"
-                @change="inputValChange(index)"
-              ></el-input>
+              <el-select
+                v-model="timeData[index]"
+                clearable
+                placeholder="Select"
+              >
+                <el-option
+                  v-for="item in timeArray"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
             </td>
             <td width="120px">
               <el-button
                 type="text"
                 style="cursor: pointer"
-                @click="thisExport(index)"
+                @click="singleExport(index)"
                 >导出
               </el-button>
             </td>
@@ -110,8 +115,23 @@ export default {
       rqChecked: true, //日期单击checkbox状态【为true时,下方任意日期选择与当前选择同步】
       sjChecked: true, //时间间隔checkbox状态【为true时,下方任意时间选择与当前选择同步】
       tableData: [], //表格数据
-      value1: [], //日期数组,默认一个月的,当用户改变某一个时,找到对应下标去改数据
-      inputVal: [], //时间同上
+      dateArray: [], //日期数组,默认一个月的,当用户改变某一个时,找到对应下标去改数据
+      //时间同上
+      timeArray: [
+        {
+          label: "5分钟",
+          value: "300",
+        },
+        {
+          label: "10分钟",
+          value: "600",
+        },
+        {
+          label: "15分钟",
+          value: "900",
+        },
+      ],
+      timeData: [],
       startTs: [], //起始时间,通过下标去找对应的时间
       endTs: [], //结束时间
       muBan: {
@@ -147,26 +167,6 @@ export default {
     this.tableVal();
   },
   methods: {
-    value1Change(index) {
-      //日期数组,默认一个月的,当用户改变某一个时,找到对应下标去改数据
-      if (this.rqChecked) {
-        var date = this.value1[index];
-        this.value1 = [];
-        this.tableData.forEach((ele, index) => {
-          this.value1.push(date);
-          this.time(index, date);
-        });
-      }
-    },
-    inputValChange(index) {
-      if (this.sjChecked) {
-        var sj = this.inputVal[index];
-        this.inputVal = [];
-        this.tableData.forEach((ele, index) => {
-          this.inputVal.push(sj);
-        });
-      }
-    },
     rqCheck() {
       this.rqChecked = event.target.checked;
     },
@@ -177,14 +177,35 @@ export default {
       //模板切换,改变按钮颜色
       this.templateId = a;
     },
-    thisExport(index) {
+    singleExport(index) {
       //当前导出,index为下标
       let that = this;
-      that.single = true;
-      // 下面的是通过下标找到对应的数据,请求ajax
-      that.time(index, that.value1[index]);
-      that.stations[index] = that.tableData[index].value;
-      that.allExportF(0, index);
+      that.API.requestData({
+        method: "GET",
+        subUrl: "export/downloadFile",
+        data: {
+          station: that.tableData[index].value,
+          templateId: "2" || that.templateId,
+          month: that.dateArray[index].formatDate("yyyy-MM"),
+          interval: that.timeData[index],
+        },
+        success(res) {
+          var filename = res.data.name;
+          var eleLink = document.createElement("a");
+
+          const downloadLink = (res.data.path + "\\" + filename)
+            .replace(/\\/g, "/")
+            .replace(/http:\//g, "http://")
+            .replace(/https:\//g, "http://");
+
+          eleLink.download = downloadLink;
+          eleLink.style.display = "none";
+          eleLink.href = downloadLink;
+          document.body.appendChild(eleLink);
+          eleLink.click();
+          document.body.removeChild(eleLink);
+        },
+      });
     },
     tableVal() {
       let that = this;
@@ -192,42 +213,31 @@ export default {
         method: "GET",
         subUrl: "export/databases",
         success(res) {
-          if (res.code === 200) {
-            const arr3 = [];
-            const arr4 = [];
-            var data = []; //项目列表
-            res.data.forEach((item, index) => {
-              const value = Object.keys(item)[0];
-              arr3.push(value);
-              arr4.push(item[value]);
-              data.push({
-                fdc: item[value],
-                value: value,
-              });
-              that.inputVal.push(1800);
+          const arr3 = [];
+          const arr4 = [];
+          var data = []; //项目列表
+          res.data.forEach((item, index) => {
+            const value = Object.keys(item)[0];
+            arr3.push(value);
+            arr4.push(item[value]);
+            data.push({
+              fdc: item[value],
+              value: value,
             });
-            that.stations = arr3;
-            that.zipNames = arr4;
-            that.tableData = data;
-            that.defaultValue1();
-          }
+            that.timeData.push("300");
+          });
+          that.stations = arr3;
+          that.zipNames = arr4;
+          that.tableData = data;
+          that.defaultValue1();
         },
       });
     },
     defaultValue1() {
-      //默认时间区间
-      const end = new Date();
       const start = new Date();
-      start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-      /////////////
-      var nowDate = new Date();
-      var year = nowDate.getFullYear();
-      var month = nowDate.getMonth();
-      var day = nowDate.getDate();
-
+      start.setTime(start.getTime());
       this.tableData.forEach((ele, index) => {
-        this.value1.push([start, end]);
-        this.time(index, [start, end]);
+        this.dateArray.push(start);
       });
     },
     formatJson(filterVal, jsonData) {
@@ -236,7 +246,48 @@ export default {
     },
     allExport() {
       //一键导出
-      this.allExportF(0);
+      let that = this;
+
+      let station = [];
+      that.tableData.forEach((ele) => {
+        station.push(ele.value);
+      });
+
+      let month = [];
+      that.dateArray.forEach((ele) => {
+        month.push(ele.formatDate("yyyy-MM"));
+      });
+
+      let interval = [];
+      that.timeData.forEach((ele) => {
+        interval.push(ele);
+      });
+      that.API.requestData({
+        method: "GET",
+        subUrl: "export/downloadFile",
+        data: {
+          station: station.toString(),
+          templateId: "2" || that.templateId,
+          month: month.toString(),
+          interval: interval.toString(),
+        },
+        success(res) {
+          var filename = res.data.name;
+          var eleLink = document.createElement("a");
+
+          const downloadLink = (res.data.path + "\\" + filename)
+            .replace(/\\/g, "/")
+            .replace(/http:\//g, "http://")
+            .replace(/https:\//g, "http://");
+
+          eleLink.download = downloadLink;
+          eleLink.style.display = "none";
+          eleLink.href = downloadLink;
+          document.body.appendChild(eleLink);
+          eleLink.click();
+          document.body.removeChild(eleLink);
+        },
+      });
     },
     allExportF(_index, thisIndex) {
       //_index递归递增,thisIndex单击导出【下标】
@@ -473,11 +524,6 @@ export default {
           }
         });
     },
-    time(index, val) {
-      //时间转时间戳
-      this.startTs[index] = Date.parse(new Date(val[0]));
-      this.endTs[index] = Date.parse(new Date(val[1]) + 86400000);
-    },
   },
 };
 </script>