Browse Source

Merge branch 'master' of http://221.182.8.141:2300/zjz/mysyWebGIS

tengmingxue 2 years ago
parent
commit
8ee6741511

+ 0 - 1
src/layout/components/Header/index.vue

@@ -15,7 +15,6 @@
             <i class="el-icon-arrow-down" />
           </div>
           <el-dropdown-menu slot="dropdown" class="user-dropdown">
-            <el-dropdown-item v-if="showAccountApply" @click.native="openApply = true">账号申请</el-dropdown-item>
             <el-dropdown-item v-if="showUserInfoEdit" divided @click.native="userEdit = true">账号编辑</el-dropdown-item>
             <el-dropdown-item :divided="showAccountApply" @click.native="changePassword">修改密码</el-dropdown-item>
             <el-dropdown-item divided @click.native="logout">

+ 12 - 12
src/views/currentSystem/authorityManagement/userRights/index.vue

@@ -84,7 +84,7 @@
           :options="lockOptions"
           @changeSelectValue="changeSelectValue"
         />
-        <select-item
+        <!-- <select-item
           can-clear
           placeholder="请选择审核状态"
           title="审核状态:"
@@ -96,7 +96,7 @@
           :filterable="true"
           :options="auditOptions"
           @changeSelectValue="changeSelectValue"
-        />
+        /> -->
       </div>
       <div class="btn_box">
         <el-button type="primary" size="small" @click="onSubmit">查询用户</el-button>
@@ -111,7 +111,7 @@
         <!-- <el-button type="primary" size="small" @click="userUnlock">用户解锁</el-button> -->
         <!-- <el-button type="primary" size="small" :disabled="multipleSelection.length !== 1" @click="roleBinding">角色绑定</el-button> -->
         <el-button type="primary" size="small" :disabled="multipleSelection.length === 0" @click="roleBinding">角色绑定</el-button>
-        <el-button type="primary" size="small" :disabled="canAudit" @click="audit">审核</el-button>
+        <!-- <el-button type="primary" size="small" :disabled="canAudit" @click="audit">审核</el-button> -->
         <!-- <el-button type="primary" size="small" @click="batchImport">批量导入</el-button> -->
         <el-button type="primary" size="small" @click="templateDownload">模版下载</el-button>
         <el-upload action="fakeaction" style="margin: 0 10px; display: inline-block" :http-request="batchImport" :show-file-list="false" :file-list="files" accept=".xls, .xlsx">
@@ -301,7 +301,7 @@
             <span class="title">角色:</span><span>{{ detailInfo.roleName }}</span>
           </el-row>
         </el-collapse-item>
-        <el-collapse-item title="申请信息" name="applyInfo">
+        <el-collapse-item title="申请信息" name="applyInfo" style="display:none;">
           <el-row class="custom-row">
             <span class="title">申请人:</span><span>{{ detailInfo.createUserName }}</span>
           </el-row>
@@ -312,7 +312,7 @@
             <span class="title">申请说明:</span><span>{{ detailInfo.applystate }}</span>
           </el-row>
         </el-collapse-item>
-        <el-collapse-item title="审核信息" name="auditInfo">
+        <el-collapse-item title="审核信息" name="auditInfo" style="display:none;">
           <el-row class="custom-row">
             <span class="title">审核人:</span><span>{{ detailInfo.auditorname }}</span>
           </el-row>
@@ -476,12 +476,12 @@ export default {
           prop: 'loginTime',
           sortable: true
         },
-        {
-          label: 'APP版本',
-          width: 120,
-          prop: 'nowVersion',
-          sortable: true
-        }
+        // {
+        //   label: 'APP版本',
+        //   width: 120,
+        //   prop: 'nowVersion',
+        //   sortable: true
+        // }
       ],
       // 获取前等待
       listLoading: true,
@@ -1260,7 +1260,7 @@ export default {
      * 导出
      */
     exportDownload() {
-      debugger
+      // debugger
       const params = {
         templateFlag: 1,
         templateServiceType: 'userService'

+ 3 - 3
src/views/currentSystem/regionalMetering/DMAHomePage/components/dmadata/minnightflowchart.vue

@@ -44,7 +44,7 @@ export default {
     const that = this
     that.drawMyChart()
     const erd = elementResizeDetectorMaker()
-    erd.listenTo(this.$refs.chart, function(element) {
+    erd.listenTo(this.$refs.chartLine, function(element) {
       that.$nextTick(function() {
         that.chartReady.resize()
       })
@@ -163,10 +163,10 @@ export default {
           
         if(seriesName == "正常"){
           // alert(name)
-          that.$emit('dialogVisibleClick',{ isShow:true, monthday:name})
+          that.$emit('dialogVisibleClick',{ isShow:true, monthday:name , isState: '0'})
         }else if(seriesName == "异常"){
           // alert(name)
-          that.$emit('dialogVisibleClick',{ isShow:true, monthday:name})
+          that.$emit('dialogVisibleClick',{ isShow:true, monthday:name, isState: '1'})
         }
         // console.log("参数:"+JSON.stringify(params))
       });

+ 11 - 7
src/views/currentSystem/regionalMetering/DMAHomePage/index.vue

@@ -52,14 +52,14 @@
           <span>时间:</span>
           <el-date-picker v-model="querySearch.startDate" size="small" :type="timeType" placeholder="请选择开始时间" :picker-options="startOptions" :value-format="timeFormData" style="width:140px" /> ~
           <el-date-picker v-model="querySearch.endDate" size="small" :type="timeType" placeholder="请选择结束时间" :picker-options="endOptions" :value-format="timeFormData" style="width:140px" />
-          <span class="spanjg">设备名称:</span>
+          <!-- <span class="spanjg">设备名称:</span>
           <el-input
             v-model="querySearch.dmaName"
             size="small"
             placeholder="输入设备名称"
             style="width: 180px"
-          />
-          &nbsp;&nbsp;&nbsp;&nbsp;
+          /> -->
+          <!-- &nbsp;&nbsp;&nbsp;&nbsp; -->
           <el-button
             class="spanjg"
             type="primary"
@@ -252,8 +252,7 @@ export default {
         // 查询参数
         startDate: undefined,
         endDate: undefined,
-        dmaLevel: undefined,
-        dmaName: undefined
+        isState:undefined,
       },
 
       deviceIdAry:[]      //设备列表
@@ -277,7 +276,10 @@ export default {
      */
     getModuleTitleList(){
       const that = this
-      getModuleTitle({}).then(res=>{
+      let yesterDay = that.getDiffDay(1)
+      getModuleTitle({
+        minimumFlowDay: yesterDay
+      }).then(res=>{
         console.log("getSupplyWaterYear:"+ JSON.stringify(res))
         if(res.code == 1){
           const _result = res.result
@@ -488,10 +490,11 @@ export default {
      */
     dialogVisibleClick(model){
       const that = this
-      debugger
+      // debugger
       that.dialogVisible = model.isShow
       that.querySearch.startDate = model.monthday
       that.querySearch.endDate = model.monthday
+      that.querySearch.isState = model.isState
 
       that.getMinFLow()
     },
@@ -506,6 +509,7 @@ export default {
         flag:'2',
         startTime: that.querySearch.startDate +" 00:00:00",
         endTime: that.querySearch.endDate +" 23:59:59",
+        isState: that.querySearch.isState
       }
      Object.assign(searchParams, that.pageInfo)
       minStroomMeterSets(searchParams).then(res => {

+ 127 - 171
src/views/currentSystem/regionalMetering/statisticalReport/minuteWaterReport.vue

@@ -46,13 +46,13 @@
         <el-button
           size="small"
           type="primary"
-          @click="getWaterTimeTotalList(1)"
+          @click="getWaterTimeFlowDetailEchart(1)"
         >导出汇总</el-button>
 
         <el-button
           size="small"
           type="primary"
-          @click="getWaterTimeFlowDetailList(1)"
+          @click="getWaterTimeFlowDetailEchart(2)"
         >导出详情</el-button>
       </div>
     </div>
@@ -112,6 +112,9 @@ import comMixins from '@/views/mixins/comMixins'
 import { getWaterTimeTotal, getWaterTimeFlowDetail } from '@/api/DMA/workbench'
 import { queryDevice, queryAlarmManageList } from "@/api/shiYuan/scada";
 import { getDmaLevel, getYearReportForm, exportReportForm } from '@/api/DMA/zoningManage'
+
+const elementResizeDetectorMaker = require('element-resize-detector')
+
 export default {
   name: 'minuteWaterReport',
   components: { TableItem },
@@ -216,6 +219,8 @@ export default {
       detailTable: [], // table表格数据
       activeName: 'first',
       tempDeviceCode: '',   //临时数据
+
+      chartReady: {}
     }
   },
   watch: {
@@ -223,14 +228,17 @@ export default {
   },
   created() {
     this.initDate()
-    this.getWaterTimeTotalList()
-    this.getWaterTimeFlowDetailEchart()
-    this.getWaterTimeFlowDetailList()
+    this.reportQuery()
   },
   mounted() {
     this.getDeviceList()
-    // this.getData()
-    // this.loadChartLine({})
+
+    const erd = elementResizeDetectorMaker()
+    erd.listenTo(this.$refs.chartLine, function(element) {
+      that.$nextTick(function() {
+        that.chartReady.resize()
+      })
+    })
   },
   destroyed() {
     this.clearPageInfo()
@@ -240,15 +248,21 @@ export default {
      * @description 初始化时间
      */
      initDate(){
-      this.querySearch.startDate = this.getCurrentDay()
-      this.querySearch.endDate = this.getCurrentDay()
+      this.querySearch.startDate = this.getDiffDay(1)
+      this.querySearch.endDate = this.getDiffDay(1)
 
       this.querySearch.startHour = this.getCurrentDay()+" 00:00:00"
       this.querySearch.endHour = this.getCurrentDay()+" 23:59:59"
     },
 
     handleClick(tab, event) {
+      const that = this
       console.log(tab, event);
+      if (tab.name === 'first') {
+        that.$nextTick(() => {
+          that.chartReady.resize()
+        })
+      }
     },
 
     /* --------------------- 界面操作 ----------------*/
@@ -307,7 +321,7 @@ export default {
     /**
      * @description 获取分水用时列表合计统计
      */
-     getWaterTimeTotalList(isexport){
+     getWaterTimeTotalList(){
       const that = this
       let searchParams = {
         startDate:'',
@@ -316,23 +330,18 @@ export default {
         endTime:'',
         code:'',
       }
-      if (that.querySearch.startDate == '' || that.querySearch.endDate == '') {
-        that.$message.info('请选择开始日期和结束日期')
-        return
-      }else{
+      if (that.querySearch.startDate != '' && that.querySearch.endDate != '') {
         searchParams.startDate = that.querySearch.startDate
         searchParams.endDate = that.querySearch.endDate
       }
-      if (that.querySearch.startHour == '' || that.querySearch.endHour == '') {
-        that.$message.info('请选择开始时间和结束时间')
-        return
-      }else{
+      if (that.querySearch.startTime != '' && that.querySearch.endTime != '') {
         searchParams.startTime = that.querySearch.startHour.split(" ")[1]
         searchParams.endTime = that.querySearch.endHour.split(" ")[1]
       }
       if(that.querySearch.deviceId.length>0){
         searchParams.code = that.querySearch.deviceId.toString()
       }
+
       that.totalTable = []
       getWaterTimeTotal(searchParams).then(res=>{
         console.log("getWaterTimeTotal:"+ JSON.stringify(res))
@@ -351,12 +360,13 @@ export default {
       }).catch((err) => {
         console.log("getWaterTimeTotal:"+err)
       });
+    
     },
 
     /**
      * @description 获取分水用时列表详情 -> 图表
      */
-     getWaterTimeFlowDetailEchart(){
+     getWaterTimeFlowDetailEchart(isexport){
       const that = this
       let searchParams = {
         startDate:'',
@@ -391,57 +401,73 @@ export default {
         }
       }
 
-      getWaterTimeFlowDetail(searchParams).then(res=>{
-        console.log("getWaterTimeFlowDetail:"+ JSON.stringify(res))
-        if(res.code == 1){
-          const _result = res.result
-          // that.detailTable = _result
-          //拼接Ecahrt图形
-          let data = {
-            dataAry:[],
-            seriesAry:[]
-          }
-
-          _result.forEach((item,index)=>{
-            let deviceCode = item.deviceCode || ''
-            let deviceName = item.deviceName || ''
-            let seriesItem = {
-              name: deviceName,
-              data: [],
-              type: 'line',
-              symbolSize: 10,
-              symbol: 'rect',
-              stack: 'Total',
-              smooth: true
+      if(isexport){
+        Object.assign(searchParams, {export:isexport+""})
+        if(isexport == '1'){    //统计
+          Object.assign(searchParams, {isTotal:isexport+""})
+        }
+        getWaterTimeFlowDetail(searchParams,searchParams.export).then((res) => {
+          console.log(res)
+          const blob = URL.createObjectURL(new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }))
+          const a = document.createElement('a')
+          a.href = blob
+          a.download = isexport=='1'? '分时用水汇总报表.xlsx': '分时用水详情报表.xlsx'
+          a.click()
+        })
+      }else{
+        //查询
+        getWaterTimeFlowDetail(searchParams).then(res=>{
+          console.log("getWaterTimeFlowDetail:"+ JSON.stringify(res))
+          if(res.code == 1){
+            const _result = res.result
+            // that.detailTable = _result
+            //拼接Ecahrt图形
+            let data = {
+              dataAry:[],
+              seriesAry:[]
             }
-            item.flowDetailVoList.forEach((itemDetail,indexDetail)=>{
-              if(index==0){
-                data.dataAry.push(itemDetail.time)
+
+            _result.forEach((item,index)=>{
+              let deviceCode = item.deviceCode || ''
+              let deviceName = item.deviceName || ''
+              let seriesItem = {
+                name: deviceName,
+                data: [],
+                type: 'line',
+                symbolSize: 10,
+                symbol: 'rect',
+                stack: 'Total',
+                smooth: true
               }
-              seriesItem.data.push(itemDetail.flow)
+              item.flowDetailVoList.forEach((itemDetail,indexDetail)=>{
+                if(index==0){
+                  data.dataAry.push(itemDetail.time)
+                }
+                seriesItem.data.push(itemDetail.differenceValue)
+              })
+              data.seriesAry.push(seriesItem)
             })
-            data.seriesAry.push(seriesItem)
-          })
-          
-          if(data.dataAry.length>0){
-            that.loadChartLine(data)
+            
+            if(data.dataAry.length>0){
+              that.loadChartLine(data)
+            }else{
+              that.drawNull(that.$refs.chartLine);
+            }
           }else{
             that.drawNull(that.$refs.chartLine);
+            console.log("getWaterTimeFlowDetail:"+res.Message)
           }
-        }else{
+        }).catch((err) => {
           that.drawNull(that.$refs.chartLine);
-          console.log("getWaterTimeFlowDetail:"+res.Message)
-        }
-      }).catch((err) => {
-        that.drawNull(that.$refs.chartLine);
-        console.log("getWaterTimeFlowDetail:"+err)
-      });
+          console.log("getWaterTimeFlowDetail:"+err)
+        });
+      }
     },
 
     /**
      * @description 获取分水用时列表详情 -> 列表
      */
-     getWaterTimeFlowDetailList(isexport){
+     getWaterTimeFlowDetailList(){
       const that = this
       let searchParams = {
         flag:'1',
@@ -469,48 +495,35 @@ export default {
           searchParams.code = searchParams.code.substring(0,searchParams.code.length-1)
         }
       }
+      
       Object.assign(searchParams, that.pageInfo)
-      if(isexport){
-        Object.assign(searchParams, {export:isexport+""})
-        getWaterTimeFlowDetail(searchParams,searchParams.export).then((res) => {
-          console.log(res)
-          const blob = URL.createObjectURL(new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }))
-          const a = document.createElement('a')
-          a.href = blob
-          a.download = '分时用水报表.xlsx'
-          a.click()
-        })
-      }else{
-        //查询
-        getWaterTimeFlowDetail(searchParams).then(res=>{
-          console.log("getWaterTimeFlowDetail:"+ JSON.stringify(res))
-          if(res.code == 1){
-            const _result = res.result.records
-            // that.detailTable = _result
-            that.detailTable = []
-            that.pageInfo.tableTotal = res.result.total
+      getWaterTimeFlowDetail(searchParams).then(res=>{
+        console.log("getWaterTimeFlowDetail:"+ JSON.stringify(res))
+        if(res.code == 1){
+          const _result = res.result.records
+          // that.detailTable = _result
+          that.detailTable = []
+          that.pageInfo.tableTotal = res.result.total
 
-            _result.forEach((item,index)=>{
-              let deviceCode = item.deviceCode || ''
-              let deviceName = item.deviceName || ''
+          _result.forEach((item,index)=>{
+            let deviceCode = item.deviceCode || ''
+            let deviceName = item.deviceName || ''
 
-              item.flowDetailVoList.forEach((itemDetail,indexDetail)=>{
-                that.detailTable.push({
-                  deviceCode: deviceCode,
-                  deviceName: deviceName,
-                  flow: itemDetail.flow,
-                  time: itemDetail.time
-                })
+            item.flowDetailVoList.forEach((itemDetail,indexDetail)=>{
+              that.detailTable.push({
+                deviceCode: deviceCode,
+                deviceName: deviceName,
+                flow: itemDetail.differenceValue,
+                time: itemDetail.time
               })
             })
-          }else{
-            console.log("getWaterTimeFlowDetail:"+res.Message)
-          }
-        }).catch((err) => {
-          console.log("getWaterTimeFlowDetail:"+err)
-        });
-      }
-      
+          })
+        }else{
+          console.log("getWaterTimeFlowDetail:"+res.Message)
+        }
+      }).catch((err) => {
+        console.log("getWaterTimeFlowDetail:"+err)
+      });
     },
 
     /**
@@ -519,90 +532,32 @@ export default {
     reportQuery() {
       this.pageInfo.current = 1
       console.log(this.querySearch)
-      // this.getData()
       this.tempDeviceCode = ""
-      //分时用水列表合计
-      this.getWaterTimeTotalList()
-      this.getWaterTimeFlowDetailEchart()
-      this.getWaterTimeFlowDetailList()
-    },
 
-    /**
-     * @description 年度综合报表 导出
-     */
-    exportReport() {
-      const that = this
-      const searchParams = {
-        export: '1', // 1导出
-        startDate:'',
-        endDate:'',
-        code:'',
-      }
-      if (that.querySearch.startDate != '' && that.querySearch.endDate != '') {
-        // searchParams.startDate = that.querySearch.startDate+' 00:00:00'
-        // searchParams.endDate = that.querySearch.endDate+' 23:59:59'
-        searchParams.startDate = that.querySearch.startDate
-        searchParams.endDate = that.querySearch.endDate
-      }
-      if(!that.strIsNull(that.tempDeviceCode)){
-          searchParams.code = that.tempDeviceCode
-      }else{
-        if(that.querySearch.deviceId.length>0){
-          
-          that.querySearch.deviceId.forEach((item,index)=>{
-            searchParams.code += item+".LJL,"
-          })
-          if(searchParams.code.length>0){
-            searchParams.code = searchParams.code.substring(0,searchParams.code.length-1)
-          }
-        }
-      }
-      console.log('query参数:' + JSON.stringify(searchParams))
-      getWaterTimeFlowDetail(searchParams,searchParams.export).then((res) => {
-        console.log(res)
-        const blob = URL.createObjectURL(new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }))
-        const a = document.createElement('a')
-        a.href = blob
-        a.download = '分时用水报表.xlsx'
-        a.click()
-      })
-    },
-
-    /**
-     *  @description 查询年度综合报表
-     */
-    getData() {
-      var that = this
-      const query = that.pageInfo
-      const params = {
-        startDate: that.querySearch.startDate,
-        endDate: that.querySearch.endDate,
-        deviceIds: that.querySearch.deviceList.toString(),
+      if (this.strIsNull(this.querySearch.startDate) || 
+        this.strIsNull(this.querySearch.endDate))
+      {
+        this.$message.error('请选择开始日期和结束日期')
+        return
       }
-      if (!((!params.startDate && !params.endDate) || (params.startDate && params.endDate))) {
-        this.$message.info('时间段请选择完整!')
+      if (this.strIsNull(this.querySearch.startHour) || 
+        this.strIsNull(this.querySearch.endHour)) 
+      {
+        this.$message.error('请选择开始时间和结束时间')
         return
       }
-      Object.assign(query, params)
-      console.log('query参数:' + JSON.stringify(query))
-      that.detailTable = []
-      getYearReportForm(query).then((res) => {
-        if (res.code !== 1) {
-          that.$message.error('获取信息出错!')
-          return
-        }
-        // 数据总数
-        that.pageInfo.tableTotal = res.result.total
-        that.detailTable = res.result.records
-      })
+      //分时用水列表合计
+      this.getWaterTimeTotalList()
+      this.getWaterTimeFlowDetailEchart()
+      this.getWaterTimeFlowDetailList()
     },
 
     /**
      * @description 产销差 - 曲线
      */
-     loadChartLine(data) {
+    loadChartLine(data) {
       const that = this
-      const chartReady = that.$echarts.init(that.$refs.chartLine)
+      that.chartReady = that.$echarts.init(that.$refs.chartLine)
       const options = {
         tooltip: {
           trigger: 'axis'
@@ -631,6 +586,7 @@ export default {
         },
         yAxis: {
           type: 'value',
+          name: '单位:m³',
         },
         series: data.seriesAry
         // [
@@ -652,12 +608,12 @@ export default {
         // ]
       };
 
-      chartReady.setOption(options, true)
+      that.chartReady.setOption(options, true)
 
       // 自定义缩放
       window.addEventListener('resize', () => {
-        if (chartReady) {
-          chartReady.resize()
+        if (that.chartReady) {
+          that.chartReady.resize()
         }
       })
     },

+ 1 - 0
src/views/login/index.vue

@@ -169,6 +169,7 @@ export default {
                 this.$store.state.user.userId = undefined
               } else {
                 this.loading = false
+                this.$store.state.jumpText = ""
                 this.$router.push({ path: '/' })
               }
             }).catch(() => {

+ 7 - 1
src/views/shiYuan/monitoringCenter/dayilyReport/widget.vue

@@ -150,7 +150,8 @@ export default {
     this.startTime = data.now
     this.endTime = data.next
     //默认管网
-    this.selectChange('2');
+    this.selectChange('2')
+    
   },
   methods: {
     // 获取巡查日报信息
@@ -222,6 +223,11 @@ export default {
       // })
       getSysCommonCode({ pCid: '53400' }).then(res => {
         this.isSeletcSite = res.result[0].codeList
+        if(this.isSeletcSite.length>0){
+          this.deviceType = this.isSeletcSite[0].ccode
+
+          this.getDailyReportData()
+        }
       })
     },
 

+ 18 - 9
src/views/shiYuan/statisticalAnalysis/leakageRate/widget.vue

@@ -273,28 +273,37 @@ export default {
         // title: { text: '考核汇总统计' },
         tooltip: {
           trigger: 'axis',
-          axisPointer: {
-            type: 'cross',
-            crossStyle: {
-              color: '#999'
-            }
-          }
+          // axisPointer: {
+          //   type: 'cross',
+          //   crossStyle: {
+          //     color: '#999'
+          //   }
+          // }
         },
         legend: {
           x: 'center',
           type: 'scroll',
-          data: nameAry
+          data: nameAry,
+        },
+        toolbox: {
+          show: true,
+          feature: {
+            magicType: { type: ['line', 'bar'] },
+            saveAsImage: {}
+          }
         },
         grid: {
+          top:'9%',
           left: '3%',
-          right: '4%',
+          right: '3%',
           bottom: '3%',
           containLabel: true
         },
         xAxis: [
           {
             type: 'category',
-            data: dataAxis
+            data: dataAxis,
+            boundaryGap:false
           }
         ],
         yAxis: [

+ 25 - 16
src/views/shiYuan/statisticalAnalysis/minStroomAnalyse/widget.vue

@@ -92,6 +92,8 @@
 import WaterAmountAnalyse from '../../components/WaterAmountAnalyse'
 import VolatileDetail from '../../components/VolatileDetail'
 import Echarts from 'echarts'
+import comMixins from '@/views/mixins/comMixins'
+
 import {
   minStroomMeters,
   minStroomMeterSets
@@ -135,13 +137,14 @@ const detailColumns = [
 ]
 export default {
   components: { WaterAmountAnalyse, VolatileDetail },
+  mixins: [comMixins],
   data() {
     const that = this
     return {
       showChart: false,
       pickerdate: {
-        type: 'month',
-        format: 'yyyy-MM-01'
+        type: 'date',
+        format: 'yyyy-MM-dd'
       },
       startOptions: {
         disabledDate: time => {
@@ -292,16 +295,17 @@ export default {
   },
   created() {
     this.getLeftList()
-    const date = new Date()
-    const y = date.getFullYear()
-    let m = date.getMonth() + 1
-    m = m < 10 ? '0' + m : m
-    let d = date.getDate()
-    d = d < 10 ? '0' + d : d
-    this.querySearch.startDate = `${y}-${m}-01`
-    this.querySearch.endDate = `${y}-${m}-${d}`
+    this.initData()
   },
   methods: {
+    /**
+     * @description 初始化时间
+     */
+    initData(){
+      this.querySearch.startDate = this.getCurrentFirstDay()
+      this.querySearch.endDate = this.getCurrentDay()
+    },
+
     toDetails(type, data) {
       if (this.selectedKeys.length !== 0) {
         this.getMainList(false, true)
@@ -336,11 +340,13 @@ export default {
           this.chart.xAxis.data = times
         })
         .catch((err) => {
+          this.$message.error(err)
           console.log(err)
         })
     },
     // 夜间最小流量接口请求
     getMainList(exportData = false, detail = false) {
+      // debugger
       if (this.selectedKeys.length === 0) {
         // this.$message.error("请先选择表!");
         return new Promise((resolve, reject) => {
@@ -352,17 +358,20 @@ export default {
           reject('未选择表')
         })
       }
+      if (this.strIsNull(this.querySearch.startDate) || 
+        this.strIsNull(this.querySearch.endDate))
+      {
+        this.$message.error('请选择开始日期和结束日期')
+        return
+      }
       let params = {
-        startTime: this.querySearch.startDate,
-        endTime: this.querySearch.endDate,
+        startTime: this.querySearch.startDate+" 00:00:00",
+        endTime: this.querySearch.endDate+" 23:59:59",
         tableId: this.selectedKeys.join(','),
         flag: detail ? 2 : 1,
         templateFlag: exportData ? 1 : undefined
       }
-      if (this.querySearch.startDate == '' || this.querySearch.endDate == '') {
-        this.$message.info('请选择开始时间和结束时间')
-        return
-      }
+    
       if (detail) params = Object.assign(params, this.pagination)
       else params = Object.assign(params, this.pagiForOut)
       return minStroomMeterSets(params, exportData).then((res) => {