Browse Source

feat: 重要维保列表跳转内外机房,默认勾选设备。

zhangjiaqi 3 years ago
parent
commit
56ba1e7032

+ 103 - 117
src/api/coreDeviceReport.js

@@ -40,123 +40,109 @@ export function queryDetailData(url, getParams) {
 }
 //核心设备报表
 export function queryFxbbList({ postParams }) {
-    return new Promise(resolve => {
-        resolve({
-            data: [
-                {
-                  //类型:Object  必有字段  备注:无
-                  num: 1, //类型:Number  必有字段  备注:序号
-                  equipmentName: "排烟风机-2-2", //类型:String  必有字段  备注:"排烟风机-2-2",
-                  equipmentCode: "1009", //类型:String  必有字段  备注:"1009",
-                  testResult: 10, //类型:String  必有字段  备注:"强检合格",//检测结果
-                  importantTestImg: [
-                    //类型:Array  必有字段  备注:无
-                    {
-                      //类型:Object  必有字段  备注:无
-                      id:'1',
-                      url: "https://cn.vuejs.org/images/dcloud1.png", //类型:String  必有字段  备注:无
-                      name: "dcloud1.png" //类型:String  必有字段  备注:无
-                    },
-                    {
-                      //类型:Object  必有字段  备注:无
-                      id:'2',
-                      url: "https://cn.vuejs.org/images/logo.png", //类型:String  必有字段  备注:无
-                      name: "vue.png" //类型:String  必有字段  备注:无
-                    }
-                  ],
-                  importantTestFile: [],
-                  currentStatus: 1, //类型:String  必有字段  备注://当前状态
-                  importantWbTime:1615865312160, //类型:String  必有字段  备注:,//最近一次重要维保完成时间
-                  importantWbTaskCode: "mock", //类型:String  必有字段  备注:/最近一次重要维保任务编号
-                  importantWbimg: [
-                    //类型:Array  必有字段  备注:最近一次重要维保
-                    {
-                        id:3,
-                      //类型:Object  必有字段  备注:无
-                      name: "mock", //类型:String  必有字段  备注:无
-                      url: "https://profile.csdnimg.cn/6/3/F/3_tianxintiandisheng", //类型:String  必有字段  备注:无
-                      wbName: "mock", //类型:String  必有字段  备注:维保项名称
-                      checkStatus: "mock", //类型:String  必有字段  备注:维保结果
-                      wxResult: "mock", //类型:String  必有字段  备注:无
-                      childimg: [
-                        //类型:Array  必有字段  备注:维保完工
-                        {
-                          //类型:Object  必有字段  备注:无
-                          name: "mock", //类型:String  必有字段  备注:完工照片名称
-                          url: "https://profile.csdnimg.cn/6/3/F/3_tianxintiandisheng" //类型:String  必有字段  备注:完工照片地址
-                        }
-                      ]
-                    }
-                  ],
-                  importantWxTime: 1615865312160, //类型:String  必有字段  备注:/最近一次重要维修完成时间
-                  importantWxTaskCode: "mock", //类型:String  必有字段  备注:/最近一次重要维修任务编号
-                  importantWximg: [
-                    //类型:Array  必有字段  备注:无
-                    {
-                        id:3,
-                      //类型:Object  必有字段  备注:无
-                      name: "mock", //类型:String  必有字段  备注:最近一次重要维修报修照片名称
-                      url: "https://profile.csdnimg.cn/6/3/F/3_tianxintiandisheng" //类型:String  必有字段  备注:最近一次重要维修报修照片地址
-                    }
-                  ],
-                  importantWxWcImg: [
-                    //类型:Array  必有字段  备注:最新一次重要维修完工照片
-                    {
-                        id:3,
-                      //类型:Object  必有字段  备注:无
-                      name: "mock", //类型:String  必有字段  备注:名字
-                      url: "https://profile.csdnimg.cn/6/3/F/3_tianxintiandisheng" //类型:String  必有字段  备注:地址
-                    }
-                  ],
-                  importantZwTime: 1615865312160, //类型:String  必有字段  备注:最近一次专维完成时间
-                  importantZwTaskCode: "mock", //类型:String  必有字段  备注:最近一次专维任务编号
-                  importantZwWcImg: [
-                    //类型:Array  必有字段  备注:无
-                    {
-                      //类型:Object  必有字段  备注:无
-                      id:3,
-                      name: "mock", //类型:String  必有字段  备注:无
-                      url: "https://profile.csdnimg.cn/6/3/F/3_tianxintiandisheng" //类型:String  必有字段  备注:无
-                    }
-                  ]
-                }
-              ]
-        })
-    })
-    return httputils.postJson(`/data/sms_asset/query`, postParams)
+    // return new Promise(resolve => {
+    //     resolve({
+    //         data: [
+    //             {
+    //               //类型:Object  必有字段  备注:无
+    //               num: 1, //类型:Number  必有字段  备注:序号
+    //               equipmentName: "排烟风机-2-2", //类型:String  必有字段  备注:"排烟风机-2-2",
+    //               equipmentCode: "1009", //类型:String  必有字段  备注:"1009",
+    //               testResult: 2, //类型:String  必有字段  备注:"强检合格",//检测结果
+    //               importantTestImg: '',
+    //               importantTestFile: [],
+    //               currentStatus: 1, //类型:String  必有字段  备注://当前状态
+    //               importantWbTime:1615865312160, //类型:String  必有字段  备注:,//最近一次重要维保完成时间
+    //               importantWbTaskCode: "mock", //类型:String  必有字段  备注:/最近一次重要维保任务编号
+    //               importantWbImg: [
+    //                 //类型:Array  必有字段  备注:最近一次重要维保
+    //                 {
+    //                     id:3,
+    //                   //类型:Object  必有字段  备注:无
+    //                   name: "mock", //类型:String  必有字段  备注:无
+    //                   url: "https://profile.csdnimg.cn/6/3/F/3_tianxintiandisheng", //类型:String  必有字段  备注:无
+    //                   wbName: "mock", //类型:String  必有字段  备注:维保项名称
+    //                   checkStatus: "mock", //类型:String  必有字段  备注:维保结果
+    //                   wxResult: "mock", //类型:String  必有字段  备注:无
+    //                   childImg: [
+    //                     //类型:Array  必有字段  备注:维保完工
+    //                     {
+    //                       //类型:Object  必有字段  备注:无
+    //                       name: "mock", //类型:String  必有字段  备注:完工照片名称
+    //                       url: "https://profile.csdnimg.cn/6/3/F/3_tianxintiandisheng" //类型:String  必有字段  备注:完工照片地址
+    //                     }
+    //                   ]
+    //                 }
+    //               ],
+    //               importantWxTime: 1615865312160, //类型:String  必有字段  备注:/最近一次重要维修完成时间
+    //               importantWxTaskCode: "mock", //类型:String  必有字段  备注:/最近一次重要维修任务编号
+    //               importantWxImg: [
+    //                 //类型:Array  必有字段  备注:无
+    //                 {
+    //                     id:3,
+    //                   //类型:Object  必有字段  备注:无
+    //                   name: "mock", //类型:String  必有字段  备注:最近一次重要维修报修照片名称
+    //                   url: "https://profile.csdnimg.cn/6/3/F/3_tianxintiandisheng" //类型:String  必有字段  备注:最近一次重要维修报修照片地址
+    //                 }
+    //               ],
+    //               importantWxWcImg: [
+    //                 //类型:Array  必有字段  备注:最新一次重要维修完工照片
+    //                 {
+    //                     id:3,
+    //                   //类型:Object  必有字段  备注:无
+    //                   name: "mock", //类型:String  必有字段  备注:名字
+    //                   url: "https://profile.csdnimg.cn/6/3/F/3_tianxintiandisheng" //类型:String  必有字段  备注:地址
+    //                 }
+    //               ],
+    //               importantZwTime: 1615865312160, //类型:String  必有字段  备注:最近一次专维完成时间
+    //               importantZwTaskCode: "mock", //类型:String  必有字段  备注:最近一次专维任务编号
+    //               importantZwWcImg: [
+    //                 //类型:Array  必有字段  备注:无
+    //                 {
+    //                   //类型:Object  必有字段  备注:无
+    //                   id:3,
+    //                   name: "mock", //类型:String  必有字段  备注:无
+    //                   url: "https://profile.csdnimg.cn/6/3/F/3_tianxintiandisheng" //类型:String  必有字段  备注:无
+    //                 }
+    //               ]
+    //             }
+    //           ]
+    //     })
+    // })
+      return httputils.postJson(`/data/sms_asset/queryList`, postParams)
 }
 //核心设备报表头部筛选
-export function queryFxbbOrderArray() {
-    return new Promise((resolve,reject) => {
-        resolve({
-            "result":"success",                //类型:String  可有字段  备注:无
-            // "data":  {                //类型:Object  必有字段  备注:无
-                "currentStatus": [                //类型:Array  必有字段  备注:无
-                     {                //类型:Object  必有字段  备注:无
-                        "id":"1",                //类型:String  必有字段  备注:无
-                        "name":"正常使用"                //类型:String  必有字段  备注:无
-                    },
-                    {                //类型:Object  必有字段  备注:无
-                        "id":"2",                //类型:String  必有字段  备注:无
-                        "name":"维修中"                //类型:String  必有字段  备注:无
-                    }
-                ],
-                "mainCheckResult":  [                //类型:Array  必有字段  备注:无
-                      {                //类型:Object  必有字段  备注:无
-                        "id":"10",                //类型:String  必有字段  备注:无
-                        "name":"强检合格"                //类型:String  必有字段  备注:无
-                    },
-                    {                //类型:Object  必有字段  备注:无
-                        "id":"11",                //类型:String  必有字段  备注:无
-                        "name":"无强检及供方维保要求"                //类型:String  必有字段  备注:无
-                    },
-                    {                //类型:Object  必有字段  备注:无
-                        "id":"12",                //类型:String  必有字段  备注:无
-                        "name":"强检不合格"                //类型:String  必有字段  备注:无
-                    }
-                ]
-            // }
-        })
-    })
-    return httputils.postJson(`/data/statusCode/query`)
+export function queryFxbbOrderArray({ postParams }) {
+    // return new Promise((resolve,reject) => {
+    //     resolve({
+    //         "result":"success",                //类型:String  可有字段  备注:无
+    //         // "data":  {                //类型:Object  必有字段  备注:无
+    //             "currentStatus": [                //类型:Array  必有字段  备注:无
+    //                  {                //类型:Object  必有字段  备注:无
+    //                     "id":"1",                //类型:String  必有字段  备注:无
+    //                     "name":"正常使用"                //类型:String  必有字段  备注:无
+    //                 },
+    //                 {                //类型:Object  必有字段  备注:无
+    //                     "id":"2",                //类型:String  必有字段  备注:无
+    //                     "name":"维修中"                //类型:String  必有字段  备注:无
+    //                 }
+    //             ],
+    //             "mainCheckResult":  [                //类型:Array  必有字段  备注:无
+    //                   {                //类型:Object  必有字段  备注:无
+    //                     "id":"10",                //类型:String  必有字段  备注:无
+    //                     "name":"强检合格"                //类型:String  必有字段  备注:无
+    //                 },
+    //                 {                //类型:Object  必有字段  备注:无
+    //                     "id":"11",                //类型:String  必有字段  备注:无
+    //                     "name":"无强检及供方维保要求"                //类型:String  必有字段  备注:无
+    //                 },
+    //                 {                //类型:Object  必有字段  备注:无
+    //                     "id":"12",                //类型:String  必有字段  备注:无
+    //                     "name":"强检不合格"                //类型:String  必有字段  备注:无
+    //                 }
+    //             ]
+    //         // }
+    //     })
+    // })
+    return httputils.postJson(`/data/statusCode/query`,postParams)
 }

+ 2 - 2
src/api/equipmentList.js

@@ -21,8 +21,8 @@ export function queryMaterialList({ getParams }) {
 }
 
 // 设备设施-维保事项
-export function queryWbsms({ data, getParams }) {
-    return httputils.getJson(`/data/sms_wbsms/query`, data, getParams)
+export function queryWbsms({ postParams }) {
+    return httputils.postJson(`/data/sms_wbsms/query`, postParams)
 }
 
 // 设备设施-维修事项

+ 121 - 51
src/views/analysis/CoreDeviceReport.vue

@@ -43,28 +43,28 @@
           v-model="searchKey"
           placeholder="搜索"
           width="192"
-          @pressEnter="getTableData"
-          @clear="getTableData"
+          @pressEnter="getTableDatas"
+          @clear="getTableDatas"
         />
       </div>
-      <TableGrid
+      <div v-loading="loading">
+        <TableGrid
         :width="'100%'"
         :border="true"
         :setting="true"
         :header="header"
         :data="sbdata"
         @screenHandle="screenHandle"
+        @statusScreenHandle="statusScreenHandle"
         :key="tableGridCustom"
         render="custom"
       >
         <template v-for="th in header" #[th.key]="{item}">
           <!-- {{item}} -->
           <!-- 检测结果 -->
-          <span
-            :key="th.key"
-            class="span-text"
-            v-if="item.headerKey == 'testResult'"
-          >{{item.item[item.headerKey].text}}</span>
+          <span :key="th.key" class="span-text" v-if="item.headerKey == 'testResult'">
+            {{item.item[item.headerKey].text}}
+          </span>
           <!-- 重要检测证件和附件 -->
           <span :key="th.key" class="span-text" v-else-if="item.headerKey == 'importantTestImg'">
             <section style="width:60px">
@@ -114,20 +114,20 @@
           <!-- 最近一次重要维保完成时间 -->
           <span :key="th.key" class="span-text" v-else-if="item.headerKey == 'importantWbTime'">
             <span>{{item.item['importantWbTime'].text?formatter(item.item['importantWbTime'].text):'--'}}/</span>
-            <span class="codestyle">{{item.item['importantWbTaskCode']}}</span>
+            <span class="codestyle">{{item.item['importantWbTaskCode']|| '--'}}</span>
           </span>
           <!-- 最近一次重要维修完成时间 -->
           <span :key="th.key" class="span-text" v-else-if="item.headerKey == 'importantWxTime'">
             <span>{{item.item['importantWxTime'].text?formatter(item.item['importantWxTime'].text):'--'}}/</span>
-            <span class="codestyle">{{item.item['importantWxTaskCode']}}</span>
+            <span class="codestyle">{{item.item['importantWxTaskCode'] || '--'}}</span>
           </span>
           <!-- 最近一次专维完成时间 -->
           <span :key="th.key" class="span-text" v-else-if="item.headerKey == 'importantZwTime'">
             <span>{{item.item['importantZwTime'].text?formatter(item.item['importantZwTime'].text):'--'}}/</span>
-            <span class="codestyle">{{item.item['importantZwTaskCode']}}</span>
+            <span class="codestyle">{{item.item['importantZwTaskCode'] || '--'}}</span>
           </span>
           <!-- 维保照片 -->
-          <span :key="th.key" class="span-text" v-else-if="item.headerKey == 'importantWbimg'">
+          <span :key="th.key" class="span-text" v-else-if="item.headerKey == 'importantWbImg'">
             <span
               v-if="item.item[item.headerKey].length>0"
               class="imgspan"
@@ -139,7 +139,7 @@
             <span v-else>--</span>
           </span>
           <!-- 报修照片 -->
-          <span :key="th.key" class="span-text" v-else-if="item.headerKey == 'importantWximg'">
+          <span :key="th.key" class="span-text" v-else-if="item.headerKey == 'importantWxImg'">
             <span
               v-if="item.item[item.headerKey].length>0"
               class="imgspan"
@@ -178,6 +178,7 @@
         </template>
       </TableGrid>
 
+      </div>
       <div class="page">
         <el-pagination
           background
@@ -285,7 +286,7 @@
                       >已完工</Tag>
                       <span
                         class="successimg"
-                        v-if="this.curImg.childimg && this.curImg.childimg.length>0"
+                        v-if="this.curImg.childImg && this.curImg.childImg.length>0"
                         @click.self="lookChildImg"
                       >
                         查看完工照片
@@ -298,7 +299,7 @@
                               :initial-index="currentIndex"
                               arrow="always"
                             >
-                              <el-carousel-item v-for="item in this.curImg.childimg" :key="item.id">
+                              <el-carousel-item v-for="item in this.curImg.childImg" :key="item.id">
                                 <img class="smallimg" :src="item.url" alt />
                               </el-carousel-item>
                             </el-carousel>
@@ -375,7 +376,8 @@ export default {
   },
   data() {
     return {
-      tableGridCustom:0,
+      loading:false,
+      tableGridCustom: 0,
       imgUrl: [],
       formatter,
       changecar: 0,
@@ -426,15 +428,18 @@ export default {
         },
         {
           key: "equipmentName",
-          text: "设备名称"
+          text: "设备名称",
+           width: 320
         },
         {
           key: "equipmentCode",
-          text: "设备内码"
+          text: "设备内码",
+          width: 100
         },
         {
           key: "testResult",
           text: "重要检测结果",
+           width: 140,
           screen: {
             open: true,
             status: "multiple", // 筛选4种状态【'single', 'multiple', 'singleSearch', 'multipleSearch'】
@@ -450,6 +455,7 @@ export default {
         {
           key: "currentStatus",
           text: "当前状况",
+           width: 130,
           screen: {
             open: true,
             status: "multiple", // 筛选4种状态【'single', 'multiple', 'singleSearch', 'multipleSearch'】
@@ -459,19 +465,21 @@ export default {
         },
         {
           key: "importantWbTime",
-          text: "最近一次重要维保完成时间/任务编号"
+          text: "最近一次重要维保完成时间/任务编号",
+           width: 240
         },
         {
-          key: "importantWbimg",
+          key: "importantWbImg",
           text: "维保照片"
         },
         {
           key: "importantWxTime",
           text: "最近一次重要维修完成时间/工单编号",
-          checked: "uncheck"
+          checked: "uncheck",
+          width: 240
         },
         {
-          key: "importantWximg",
+          key: "importantWxImg",
           text: "报修照片",
           checked: "uncheck"
         },
@@ -483,6 +491,7 @@ export default {
         {
           key: "importantZwTime",
           text: "最后一次专维完成时间/任务编号",
+          width: 240,
           checked: "uncheck"
         },
         {
@@ -542,7 +551,7 @@ export default {
      */
     getOrderList() {
       const postParams = {};
-      queryFxbbOrderArray().then(res => {
+      queryFxbbOrderArray({ postParams }).then(res => {
         if (res.result == "success") {
           Object.keys(res).forEach(item => {
             if (Array.isArray(res[item])) {
@@ -557,9 +566,17 @@ export default {
           this.header[5].screen.data = JSON.parse(
             JSON.stringify(res.currentStatus)
           );
-          this.mainsort = JSON.parse(JSON.stringify(res.mainCheckResult));
+          this.mainsort = JSON.parse(JSON.stringify(res.mainCheckResult)).map(
+            item => {
+              return item.id;
+            }
+          );
           this.mainsortbank = JSON.parse(JSON.stringify(res.mainCheckResult));
-          this.currentsort = JSON.parse(JSON.stringify(res.currentStatus));
+          this.currentsort = JSON.parse(JSON.stringify(res.currentStatus)).map(
+            item => {
+              return item.id;
+            }
+          );
           this.currentsortbank = JSON.parse(JSON.stringify(res.currentStatus));
         }
       });
@@ -599,18 +616,16 @@ export default {
     },
     //重要检测结果筛选
     screenHandle() {
+      //  ["testResult", "2,3,4,5,6", undefined]
       const list = Array.from(arguments);
-      this.mainsortcurrentsort = JSON.parse(
-        JSON.stringify(list.slice(1, list.length - 1))
-      );
+      this.mainsort = list.slice(1, list.length - 1)[0].split(',').map(Number)
+      this.getTableData();
     },
     //当前状况筛选
     statusScreenHandle() {
       const list = Array.from(arguments);
-      this.currentsort = JSON.parse(
-        JSON.stringify(list.slice(1, list.length - 1))
-      );
-      console.log(list.slice(1, list.length - 1));
+      this.currentsort = list.slice(1, list.length - 1)[0].split(',').map(Number);
+      this.getTableData();
     },
     /**
      * 获取系统列表数据
@@ -641,14 +656,27 @@ export default {
      * 切换系统名称
      */
     changeCurSystem(val) {
-      console.log("val", val);
+      // console.log("val", val);
       this.curPage = 1;
+      this.searchKey = '';
       this.tableGridCustom++;
-      this.mainsort = JSON.parse(JSON.stringify(this.mainsortbank));
-      this.currentsort = JSON.parse(JSON.stringify(this.currentsortbank));
+      this.mainsort = JSON.parse(JSON.stringify(this.mainsortbank)).map(
+        item => {
+          return item.id;
+        }
+      );
+      this.currentsort = JSON.parse(JSON.stringify(this.currentsortbank)).map(
+        item => {
+          return item.id;
+        }
+      );
       // 切换设备,重置表头默认全选条件
-      this.header[3].screen.data = JSON.parse(JSON.stringify(this.mainsortbank))
-      this.header[5].screen.data = JSON.parse(JSON.stringify(this.currentsortbank))
+      this.header[3].screen.data = JSON.parse(
+        JSON.stringify(this.mainsortbank)
+      );
+      this.header[5].screen.data = JSON.parse(
+        JSON.stringify(this.currentsortbank)
+      );
       this.getEquipmentOfSystem();
     },
     /**
@@ -723,32 +751,56 @@ export default {
      */
     changeEquipment(id) {
       this.curPage = 1;
-       this.tableGridCustom++;
+      this.searchKey = '';
+      this.tableGridCustom++;
       _.map(this.systemContentData, o => {
         return (o.isActive = o.category_code === id);
       });
-      this.mainsort = JSON.parse(JSON.stringify(this.mainsortbank));
-      this.currentsort = JSON.parse(JSON.stringify(this.currentsortbank));
+      this.mainsort = JSON.parse(JSON.stringify(this.mainsortbank)).map(
+        item => {
+          return item.id;
+        }
+      );
+      this.currentsort = JSON.parse(JSON.stringify(this.currentsortbank)).map(
+        item => {
+          return item.id;
+        }
+      );
       // 切换设备,重置表头默认全选条件
-      this.header[3].screen.data = JSON.parse(JSON.stringify(this.mainsortbank))
-      this.header[5].screen.data = JSON.parse(JSON.stringify(this.currentsortbank))
+      this.header[3].screen.data = JSON.parse(
+        JSON.stringify(this.mainsortbank)
+      );
+      this.header[5].screen.data = JSON.parse(
+        JSON.stringify(this.currentsortbank)
+      );
+      this.getTableData();
+    },
+    /**
+     * @description 搜索按钮事件
+     */
+    getTableDatas(){
+      this.curPage =1;
       this.getTableData();
     },
     /**
      * 获取表数据
      */
     getTableData() {
+      this.loading = true;
       const postParams = {
         category_code: _.find(this.systemContentData, o => {
           return o.isActive;
         }).category_code,
+        onlyMainAsset: true,
+        testResult: this.mainsort,
+        status: this.currentsort,
         plazaId: this.plazaId, //类型:String  必有字段  备注:项目编码
         equipmentName: this.searchKey, //设备名称
         pageSize: this.pageSize, //类型:Number  必有字段  备注:记录条数
         pageNum: this.curPage //类型:Number  必有字段  备注:页码数
       };
       queryFxbbList({ postParams }).then(res => {
-        this.drawtotalcount = res.pageCount;
+        this.tatol = res.pageCount;
         const keys1 = ["importantWbTime", "importantWxTime", "importantZwTime"];
         const keys2 = ["testResult", "currentStatus"];
         //合并状态数组,从中对应ID和name
@@ -759,20 +811,32 @@ export default {
           Object.keys(item).forEach(jtem => {
             if (keys1.includes(jtem)) {
               item[jtem] = {
-                text: item[jtem] || "--"
+                text: item[jtem]
               };
             }
-            if (keys2.includes(jtem)) {
+            if (jtem == "currentStatus") {
+              const obj = this.header[5].screen.data.find(n => {
+                return n.id == item[jtem];
+              });
               item[jtem] = {
-                text: arrList.find(n => {
-                  return n.id == item[jtem];
-                }).name
+                text: obj.name
+              };
+            }
+            if (jtem == "testResult") {
+              const obj = this.header[3].screen.data.find(n => {
+                return n.id == item[jtem];
+              });
+              item[jtem] = {
+                text: obj.name
               };
             }
           });
         });
-        console.log(res.data);
         this.sbdata = JSON.parse(JSON.stringify(res.data));
+        this.loading = false;
+      }).catch( err => {
+        console.log(err);
+        this.loading = false;
       });
     },
     /**
@@ -992,7 +1056,8 @@ export default {
 .filestyspan {
   cursor: pointer;
   color: #0091ff;
-  line-height: 36px;
+  line-height: 25px;
+  display: inline-block;
 }
 .el-tooltip__popper {
   min-width: 120px;
@@ -1273,7 +1338,12 @@ export default {
 /deep/ .el-carousel__indicators {
   display: none;
 }
-
+/deep/ .p-table-td-last-child{
+  padding-right: 0px !important;
+}
+/deep/ .p-table-header-span{
+  white-space:normal !important;
+}
 .imgdes {
   padding-left: 10%;
   padding-top: 15px;

+ 25 - 18
src/views/equipment/eqDialog.vue

@@ -97,6 +97,7 @@
               :smsxt="smsxt"
               :tabLabel="tabLabel"
               :assetnum="''"
+              :defaultSblist="defaultSblist"
               :diff="diff"
               :mattertype="mattertype"
               :sbname="smsasset"
@@ -118,6 +119,7 @@
               :tabLabel="tabLabel"
               :diff="diff"
               :assetnum="''"
+              :defaultSblist="defaultSblist"
               :size="10"></newrcwb-table>
             <!-- 重要维修的表格 -->
             <wx-table
@@ -126,6 +128,7 @@
               :smsxt="smsxt"
               :tabLabel="tabLabel"
               :assetnum='""'
+              :defaultSblist="defaultSblist"
               :diff="diff"
               :size="10"
             ></wx-table>
@@ -251,6 +254,7 @@ export default {
       key: 1, //弹窗key值,重新渲染table组件
       smsasset:'',
       mattertype:'',
+      defaultSblist:[]
     };
   },
   computed: {
@@ -335,25 +339,29 @@ export default {
     handleClick(tab) {
       //判断是否从重要维保页面跳转进来,如果是,根据tab_code 筛选出当天得tab。
       if ("from_mainpage" in tab) {
-        this.dialogInfo.children.forEach((item, index) => {
-          if (item.param.tab_code == tab.tab_code) {
-            tab.name = tab.tab_code;
-            tab.index = index;
-            tab.label = item.label;
-          }
-        });
-        this.smsasset = tab.smsasset
-        this.mattertype = tab.marks
-        // this.paramsdata.val1 = tab.smsasset
-        //  this.paramsdata.val2 = tab.marks
+        if (tab.lable == 1) {
+            this.dialogInfo.children.forEach((item, index) => {
+              if (item.param.tab_code == tab.tab_code) {
+                  tab.name = tab.tab_code;
+                  tab.index = index;
+                  tab.label = item.label;
+               }
+            });
+        } else {
+        const ll = this.dialogInfo.children.length;
+        //新增项跳转日常维保
+        tab.name = this.dialogInfo.children[ll-1].param.tab_code;
+        tab.index = ll-1;
+        tab.label = this.dialogInfo.children[ll-1].label;
+      }
+        this.defaultSblist = tab.sblist || [];
+        this.smsasset = tab.smsasset;
+        this.mattertype = tab.marks;
       }else{
-        this.smsasset = ''
-        this.mattertype = ''
-        //  this.paramsdata.val1 = ''
-        //  this.paramsdata.val2 = ''
+        this.smsasset = '';
+        this.mattertype = '';
+        this.defaultSblist = [];
       }
-      console.log(tab);
-      // debugger
       this.key++;
       if (this.param) {
         this.param = tab.name;
@@ -366,7 +374,6 @@ export default {
             this.typecode = el.param.type_code;
           }
         });
-        //this.typecode = this.dialogInfo.children[`${tab.index}`].param.type_code
         this.diff = this.dialogInfo.children[`${tab.index}`].param.diff;
         this.difference = this.dialogInfo.children[
           `${tab.index}`

+ 66 - 26
src/views/equipment/table/mainWbTable.vue

@@ -5,7 +5,7 @@
     <div class="bottom-table" style="height: 100%;">
       <el-table
         :data="tableData"
-        :height="tableHeight"
+        :height="800"
         :border="true"
         style="width: 100%; margin-bottom: 12px;"
         :span-method="objectSpanMethod"
@@ -18,11 +18,39 @@
           <template slot-scope="{ row }">{{ row.smsasset || '--' }}</template>
         </el-table-column>
         <el-table-column label="记录事项" show-overflow-tooltip resizable>
+          <template slot="header" slot-scope="scope">
+            <div style="display:flex;justify-content:space-between">
+              <div>记录事项</div>
+              <div v-if="showMore">
+                <p>
+                  <span
+                    class="morestyle"
+                    @click="changeOpensta()"
+                    v-show="showNewlist"
+                  >
+                    <i>展开全部</i>
+                    <i class="el-icon-caret-bottom"></i>
+                  </span>
+                </p>
+                <p>
+                  <span
+                    class="morestyle"
+                    @click="changeOpensta()"
+                     v-show="!showNewlist"
+                  >
+                    <i>收起</i>
+                    <i class="el-icon-caret-top"></i>
+                  </span>
+                </p>
+              </div>
+            </div>
+          </template>
           <template slot-scope="{ row , $index }">
-            <p class="p-style" v-for="(item, index) in row.children" :key="item.sn">
+            <p class="p-style" v-for="(item, index) in row.children" :key="item.id">
               <span v-if="item.lable==1">{{ index + 1 }}) {{ item.matter }}</span>
             </p>
-            <p>
+            <!-- showNewlist 表示是否有新增记录事项如果有,才展示跟多收起功能 -->
+            <!-- <p>
               <span
                 class="morestyle"
                 @click="changeOpensta($index)"
@@ -31,22 +59,12 @@
                 <i>更多</i>
                 <i v-if="row.close" class="el-icon-caret-bottom"></i>
               </span>
-            </p>
-            <section>
-              <p class="p-style" v-for="(item, index) in row.children" :key="item.sn">
-                <span v-if="item.lable==2 && !row.close">{{ index + 1 }}) {{ item.matter }}</span>
+            </p>-->
+            <section v-if="!showNewlist">
+              <p class="p-style" style="color:#025baa" v-for="(item, index) in row.children" :key="item.id">
+                <span v-if="item.lable==2">{{ index + 1 }}) {{ item.matter }}</span>
               </p>
             </section>
-            <p>
-              <span
-                class="morestyle"
-                @click="changeOpensta($index)"
-                v-if="row.showNewlist && !row.close"
-              >
-                <i>收起</i>
-                <i class="el-icon-caret-top"></i>
-              </span>
-            </p>
           </template>
         </el-table-column>
         <el-table-column show-overflow-tooltip resizable>
@@ -59,14 +77,14 @@
               class="p-style"
               v-for="(item, index) in row.children"
               @click="goTabs(row,item)"
-              :key="index"
+              :key="item.id"
             >
               <span class="lastp">
                 <span
                   v-if="item.lable==1"
                 >{{ item.workNum?item.workNum:'-' }} / {{ item.equipmentNum?item.equipmentNum:'-'}}</span>
                 <span
-                  v-if="item.lable==2 && !row.close"
+                  v-if="item.lable==2 && !showNewlist"
                 >{{ item.workNum?item.workNum:'-' }} / {{ item.equipmentNum?item.equipmentNum:'-'}}</span>
               </span>
             </p>
@@ -97,7 +115,8 @@ export default {
       visible: false,
       major: "",
       tabName: "",
-      tableData: []
+      tableData: [],
+      showNewlist:true
     };
   },
   computed: {
@@ -109,10 +128,30 @@ export default {
           plazaId: this.$store.state.plazaId,
           wznw: item.param.wznw,
           difference: item.param.difference,
-          tab_code: item.param.tab_code
+          tab_code: item.param.tab_code,
+          onlyMainAsset: this.smsxt != "1008" ? true : false, //类型:Boolean  必有字段  备注:土建装饰为false,其他为true
         };
       });
     },
+    /**
+     * @description 计算是否展示展开跟多按钮,当所有设备中存在一个新的扩充项,tableData.children中某一项的labal为2
+     * 则代表有新增
+     */
+    showMore(){
+      let falg = false;
+      for (let index = 0; index < this.tableData.length; index++) {
+        const element = this.tableData[index];
+        if(element.children.some(k => {
+          if (k.lable == 2) {
+            return true;
+          }
+        })){
+          falg = true;
+          break;
+        }
+      };
+      return falg
+    },
     tableHeight() {
       if (window.screen.height <= 768) {
         return 560;
@@ -129,15 +168,17 @@ export default {
     }
   },
   methods: {
-    changeOpensta(v) {
-      this.tableData[v].close = !this.tableData[v].close;
+    changeOpensta() {
+      this.showNewlist = !this.showNewlist;
     },
     goTabs(val, val2) {
       this.$emit("change-table", {
         tab_code: val.tab_code,
         from_mainpage: true,
         smsasset: val.smsasset,
-        marks: val2.matter
+        marks: val2.matter,
+        lable:val2.lable,
+        sblist:val2.equipmentCode || []
       });
     },
     async addGetRecordList() {
@@ -256,12 +297,11 @@ export default {
     color: #fff !important;
   }
   .el-dialog__close {
-    // color: #909399 !important;
+    // color: #909399 !important ;
   }
   /deep/.el-dialog {
     margin-top: 7vh !important;
     padding-bottom: 5px;
-    // overflow-y: scroll !important;
   }
 }
 </style>

+ 25 - 26
src/views/equipment/table/newrcwbTable.vue

@@ -208,14 +208,14 @@ export default {
       count: 0,
       orderkey:{
         realStartTime:0,
-        realEndTime:0,
-        executeDays:0
+        realEndTime:null,
+        executeDays:null
       }
     };
   },
-  props: ["smsxt", "diff", "tabLabel", "size", "assetnum"],
+  props: ["smsxt", "diff", "tabLabel", "size", "assetnum","defaultSblist"],
   computed: {
-    ...mapGetters(["floorSelect", "plazaId"])
+    ...mapGetters(["floorSelect", "plazaId"]),
   },
   methods: {
     /**
@@ -224,6 +224,7 @@ export default {
      * @return {void}
      */
     changeSort(val) {
+      Object.keys(this.orderkey).forEach(key=>{this.orderkey[key]=null})
       this.orderkey[val.prop] = val.order == 'ascending'?1:0;
       this.getList();
     },
@@ -264,8 +265,6 @@ export default {
     },
     objectSpanMethod({ row, column, rowIndex, columnIndex }) {
       if (columnIndex === 0 || columnIndex === 1 || columnIndex === 2) {
-        //   if(columnIndex === 0) {
-        // this.id_array[rowIndex] 取出当前存放行的合并状态
         const _row = this.id_array[rowIndex];
         // 判断当前的 列是否需要显示
         const _col = _row > 0 ? 1 : 0;
@@ -276,9 +275,7 @@ export default {
         //   }
       }
     },
-    testConfirm() {},
     confirmSel(val) {
-      console.log("确定按钮回调", val);
       this.sbdata = [];
       if (val && val.length > 0) {
         val.forEach(item => {
@@ -287,19 +284,6 @@ export default {
         this.getList();
       }
     },
-    //序号的方法
-    indexMethod(index) {
-      // const resdata = this.id_array.filter( item => {
-      //     return item
-      // })
-      //   console.log(resdata);
-      // this.count+=1;
-      // this.pageCount.push(index)
-      return 1;
-      // console.log('index',index);
-      // if(index ==0)return 1;
-      //   return (this.currentPage - 1) * this.size + index + 1;
-    },
     //工单详情
     innerTable(row) {
       if (row.apptype == "外委" || row.apptype == "自维") {
@@ -337,6 +321,7 @@ export default {
       this.pageChanged(1);
     },
     pageChanged(page) {
+      // this.defaultSblist = []
       this.currentPage = page;
       this.getList();
     },
@@ -391,7 +376,7 @@ export default {
       this.loading = true;
       const that = this;
       let postParams = {
-        ...this.orderkey,
+        ...this.orderkey,//排序相关字段
         plazaId: this.plazaId, //类型:String  必有字段  备注:项目编码
         systemCode: this.smsxt, //类型:String  必有字段  备注:系统编码
         equipmentId: this.sbdata, //类型:Array  必有字段  备注:设备编码
@@ -419,6 +404,9 @@ export default {
         this.tableData = res.data ? res.data : [];
         that.id_init();
         this.loading = false;
+      }).catch( err => {
+        this.loading = false;
+        this.$message.error('服务器异常');
       });
     },
     clickPic(row) {
@@ -472,8 +460,11 @@ export default {
         delete item.equipmentCode;
         if (item.children && item.children.length > 0) {
           item.children.forEach(jtem => {
-            that.sbdata.push(jtem.equipmentCode);
-            that.allsbdata = JSON.parse(JSON.stringify(that.sbdata));
+            if(that.defaultSblist.length>0){
+              that.sbdata = JSON.parse(JSON.stringify(that.defaultSblist));
+            }else{
+              that.sbdata.push(jtem.equipmentCode);
+            }
           });
           this.formatTree(item.children);
         }
@@ -519,7 +510,6 @@ export default {
     },
     assetnum(newV, oldV) {
       if (newV !== oldV) {
-        // this.tabFind()
         this.startMethods();
       }
     },
@@ -531,10 +521,19 @@ export default {
     },
     ischange() {
       this.startMethods();
+    },
+    defaultSblist(newV, oldV){
+      if (JSON.stringify(newV) !== JSON.stringify(oldV)) {
+        this.startMethods();
+      }
     }
   },
   mounted() {
-    console.log(DrawTable);
+     if(this.defaultSblist && this.defaultSblist.length>0){
+       this.complete = [moment().year()+'-01-01',moment().format("YYYY-MM-DD")]
+     }else{
+       this.complete = [moment().subtract(90, 'days').format("YYYY-MM-DD"),moment().format("YYYY-MM-DD")]
+     }
     this.startMethods();
   }
 };

+ 53 - 7
src/views/equipment/table/rcwbTable.vue

@@ -2,7 +2,7 @@
 <template>
     <div class='rcwb-list'>
         <div class='eq-list-top'>
-            <el-input
+            <!-- <el-input
                 @keyup.enter.native='pageChanged(1)'
                 @blur='pageChanged(1)'
                 clearable
@@ -11,7 +11,17 @@
                 prefix-icon='el-icon-search'
                 v-model='sbjc'
                 style='margin-right:12px;width:192px;'
-            ></el-input>
+            ></el-input> -->
+            <!-- 设备名称筛选 -->
+      <Cascader
+        :key="changeid"
+        :excludeTop="true"
+        v-model="sbdata"
+        @confirm="confirmSel"
+        multiple
+        :data="cascaderData"
+        width="192"
+      ></Cascader>
             <el-input
                 @keyup.enter.native='pageChanged(1)'
                 @blur='pageChanged(1)'
@@ -149,17 +159,20 @@
     </div>
 </template>
 <script>
-import { queryWb } from '@/api/room.js'
+import { queryWb,querySblist } from '@/api/room.js'
 import { mapGetters } from 'vuex'
-import { Select } from 'meri-design'
+import { Select,Cascader } from 'meri-design'
 import moment from 'moment'
 import inputDialog from './inputDIalog'
 import { formatterTime, number_format } from '@/utils/format.js'
 import { querySelect } from '@/api/public.js'
 export default {
-    components: { Select, inputDialog },
+    components: { Select, inputDialog ,Cascader},
     data() {
         return {
+            changeid: 0,
+            sbdata:[],//设备列表,默认选中数据
+            cascaderData: [],//设备列表数据
             tableData: [],
             total: 0,
             currentPage: 1,
@@ -196,6 +209,34 @@ export default {
         ...mapGetters(['floorSelect', 'plazaId']),
     },
     methods: {
+        confirmSel(val) {
+            this.sbdata = [];
+            if (val && val.length > 0) {
+                val.forEach(item => {
+                    this.sbdata.push(item.id);
+                });
+                this.getList();
+            }
+        },
+        //获取所有设备列表
+        getSbList() {
+            const postParams = {
+                plazaId: this.plazaId, //类型:String  必有字段  备注:项目编码
+                systemId: this.smsxt
+            };
+            return new Promise((resolve, reject) => {
+                querySblist({ postParams }).then(res => {
+                if (res.result == "success" && res.data.length > 0) {
+                    this.sbdata = [];
+                    this.cascaderData = JSON.parse(
+                    JSON.stringify(this.formatTree(res.data))
+                    );
+                    this.changeid++;
+                    resolve();
+                }
+                });
+            });
+        },
         //序号的方法
         indexMethod(index) {
             return (this.currentPage - 1) * this.size + index + 1
@@ -359,9 +400,14 @@ export default {
             }
             this.$refs.picLargeOpen.open(this.imgUrl)
         },
-        startMethods() {
+        async startMethods() {
             this.changeSelect()
-            this.getList()
+           try {
+        await this.getSbList();
+        this.getList();
+      } catch (error) {
+        console.log(error);
+      }
         },
     },
     watch: {

+ 112 - 71
src/views/equipment/table/wbTable.vue

@@ -2,7 +2,16 @@
 <template>
   <div class="wb-list">
     <div class="eq-list-top">
-      <el-input
+       <Cascader
+        :key="changeid"
+        :excludeTop="true"
+        v-model="sbdata"
+        @confirm="confirmSel"
+        multiple
+        :data="cascaderData"
+        width="192"
+      ></Cascader>
+      <!-- <el-input
         placeholder="搜索设备名称或内码"
         size="small"
         @keyup.enter.native="pageChanged(1)"
@@ -11,7 +20,7 @@
         v-model="childrensbname"
         clearable
         style="width:192px;margin-right:12px"
-      ></el-input>
+      ></el-input> -->
       <el-input
         placeholder="搜索事项类型事项描述"
         size="small"
@@ -20,7 +29,7 @@
         clearable
         prefix-icon="el-icon-search"
         v-model="matters"
-        style="width:192px;margin-right:12px"
+        style="width:192px;margin:0 12px"
       ></el-input>
       <Select
         @change="pageChanged(1)"
@@ -165,6 +174,9 @@
   </div>
 </template>
 <script>
+import {
+  querySblist,
+} from "@/api/room.js";
 import moment from "moment";
 import { queryWbsms } from "@/api/equipmentList.js";
 import { mapGetters } from "vuex";
@@ -175,6 +187,10 @@ export default {
   components: { Select, inputDialog },
   data() {
     return {
+       changeid: 0,
+        sbdata: [],
+      allsbdata: [],
+      cascaderData: [],
       tableData: [],
       total: 0,
       currentPage: 1,
@@ -194,15 +210,14 @@ export default {
           name: "是"
         },
         {
-          id: " 0",
+          id: "0",
           name: "否"
         }
       ],
       imgUrl: [],
       shjc: "",
       childrensbname:'',
-      matters:""
-      // matters: '',
+      matters:"",
     };
   },
   props: [
@@ -213,11 +228,61 @@ export default {
     "assetnum",
     "sbname",
     "mattertype",
+    "defaultSblist"
   ],
   computed: {
-    ...mapGetters(["floorSelect"]),
+    ...mapGetters(["floorSelect","plazaId"]),
   },
   methods: {
+     confirmSel(val) {
+      this.sbdata = [];
+      if (val && val.length > 0) {
+        val.forEach(item => {
+          this.sbdata.push(item.id);
+        });
+        this.getList();
+      }
+    },
+    //获取所有设备列表
+    getSbList() {
+      const postParams = {
+        plazaId: this.plazaId, //类型:String  必有字段  备注:项目编码
+        systemId: this.smsxt
+      };
+      return new Promise((resolve, reject) => {
+        querySblist({ postParams }).then(res => {
+          if (res.result == "success" && res.data.length > 0) {
+            this.sbdata = [];
+            this.cascaderData = JSON.parse(
+              JSON.stringify(this.formatTree(res.data))
+            );
+            this.changeid++;
+            resolve();
+          }
+        });
+      });
+    },
+    //格式化后台返回得设备列表,
+    formatTree(arr) {
+      const that = this;
+      arr.forEach(item => {
+        that.$set(item, "title", item.equipmentName);
+        that.$set(item, "id", item.equipmentCode);
+        delete item.equipmentName;
+        delete item.equipmentCode;
+        if (item.children && item.children.length > 0) {
+          item.children.forEach(jtem => {
+            if(that.defaultSblist && that.defaultSblist.length>0){
+              that.sbdata = JSON.parse(JSON.stringify(that.defaultSblist));
+            }else{
+              that.sbdata.push(jtem.equipmentCode);
+            }
+          });
+          this.formatTree(item.children);
+        }
+      });
+      return arr;
+    },
     //序号的方法
     indexMethod(index) {
       return (this.currentPage - 1) * this.size + index + 1;
@@ -251,72 +316,33 @@ export default {
         );
       }
     },
-    //多余输入框监听
-    // confirm(gzglid) {
-    //     this.gzglid = gzglid
-    //     this.pageChanged(1)
-    // },
     pageChanged(page) {
-      // debugger
       this.currentPage = page;
       this.getList();
     },
     getList() {
-      let getParams = {
-        data: {
+      let postParams = {
+          page: this.currentPage,
+          size: this.size,
           smsxt: this.smsxt,
           plazaId: this.$store.state.plazaId,
-          page: this.currentPage,
-          size: this.size
-        }
-      };
-      //区分主要设备和全部设备
-      if (this.smsxt != "1008") {
-        getParams.data.onlyMainAsset = true;
-      }
-      if (this.diff) {
-        getParams.data.diff = this.diff;
-      }
-      if (this.assetnum) {
-        getParams.data.assetnum = this.assetnum;
-      }
-      //下拉
-      if (this.ischange && this.ischange != 2) {
-        // getParams.data.ischangepj = this.ischange
-        getParams.data.ismodel = this.ischange;
-      }
-      // 验收日期
-      if (this.sjjssj) {
-        getParams.data.sjjssjStartDate = this.sjjssj[0] + "000000";
-        // getParams.data.sjjssjEndDate = this.sjjssj[1] + '000000'
-        getParams.data.sjjssjEndDate = moment(this.sjjssj[1]).format(
+        onlyMainAsset:this.smsxt != "1008"?true:false,
+        diff:this.diff,
+        assetnum:this.assetnum,
+        ismodel:this.ischange != 2?this.ischange:'',
+        sjjssjStartDate:this.sjjssj?this.sjjssj[0] + "000000":'',
+        sjjssjEndDate:this.sjjssj?moment(this.sjjssj[1]).format(
           "YYYYMMDD235959"
-        );
-      }
-      // 填报时间
-      if (this.reportdate) {
-        getParams.data.reportdateStartDate = this.reportdate[0] + "000000";
-        // getParams.data.reportdateEndDate = this.reportdate[1] + '000000'
-        getParams.data.reportdateEndDate = moment(this.reportdate[1]).format(
+        ):'',
+        reportdateStartDate:this.reportdate?this.reportdate[0] + "000000":'',
+        reportdateEndDate:this.reportdate?moment(this.reportdate[1]).format(
           "YYYYMMDD235959"
-        );
+        ):'',
+        equipmentId: this.sbdata, 
+        matters:this.matters,
+        gzglid:this.gzglid
       }
-      //输入框
-      getParams.data.keyword = "";
-      if (this.childrensbname) {
-        console.log(this.childrensbname);
-        getParams.data.keyword += `${this.childrensbname}:sbmc,assetnum;`;
-      }
-      if (this.matters) {
-        getParams.data.keyword += `${this.matters}:description,matters;`;
-      }
-      if (this.gzglid) {
-        getParams.data.keyword += `${this.gzglid}:wb_gzglid;`;
-      }
-      if (getParams.data.keyword == "") {
-        delete getParams.data.keyword;
-      }
-      queryWbsms(getParams).then(res => {
+      queryWbsms({postParams}).then(res => {
         this.tableData = res.data || [];
         this.total = res.count;
       });
@@ -334,47 +360,62 @@ export default {
       }
       this.$refs.picLargeOpen.open(this.imgUrl);
     },
-    startMethods() {
-      this.getList();
+    async startMethods() {
+      try {
+        await this.getSbList();
+        this.getList();
+      } catch (error) {
+        console.log(error);
+      }
     }
   },
   watch: {
     sbname(newV, oldV) {
       this.childrensbname = newV;
       if (newV !== oldV) {
-        this.getList();
+        this.startMethods();
       }
     },
     mattertype(newV, oldV) {
       this.matters = newV;
       if (newV !== oldV) {
-        this.getList();
+        this.startMethods();
       }
     },
     diff(newV, oldV) {
       if (newV !== oldV) {
-        this.getList();
+        this.startMethods();
       }
     },
     tabLabel(newV, oldV) {
       if (newV !== oldV) {
         // this.tabFind()
-        this.getList();
+        this.startMethods();
       }
     },
     assetnum(newV, oldV) {
       if (newV !== oldV) {
         // this.tabFind()
-        this.getList();
+        this.startMethods();
       }
     },
     ischange() {
-      this.getList();
+      this.startMethods();
+    },
+    defaultSblist(newV, oldV){
+      if (JSON.stringify(newV) !== JSON.stringify(oldV)) {
+        this.startMethods();
+      }
     }
   },
   mounted() {
     this.childrensbname = this.sbname;
     this.matters = this.mattertype;
+    if(this.defaultSblist && this.defaultSblist.length>0){
+       this.reportdate = [moment().year()+'0101',moment().format("YYYYMMDD")]
+     }else{
+       this.reportdate = '';
+     }
     this.startMethods();
   }
 };