Browse Source

月报周报修改

TANGSHIZHE 3 years ago
parent
commit
816be6e48b

+ 31 - 1
src/components/common/BigMemberEmpty.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-  <div class="empty-index-container">
+  <div class="empty-index-container" :class="classfuncType?'reportempty':''">
     <div class="empty-content-position">
     <div class="empty-content-position">
       <el-image v-if="imgShow" :src="require('@/assets/images/bmempty.png')"></el-image>
       <el-image v-if="imgShow" :src="require('@/assets/images/bmempty.png')"></el-image>
       <div class="empty-main">
       <div class="empty-main">
@@ -27,6 +27,15 @@ export default {
     setpageshow: {
     setpageshow: {
       type: String,
       type: String,
       default: ''
       default: ''
+    },
+    functype: {
+      type: String,
+      default: ''
+    }
+  },
+  computed: {
+    classfuncType () {
+      return this.functype === 'week' || this.functype === 'month'
     }
     }
   },
   },
   data () {
   data () {
@@ -106,4 +115,25 @@ export default {
       height: 148px;
       height: 148px;
     }
     }
   }
   }
+  .reportempty{
+    background: #ffffff;
+    height: 591px;
+    align-items: flex-start;
+    .empty-content-position{
+      margin-top: 80px;
+      flex-direction: column;
+      .el-image{
+        width: 200px;
+        height: 200px;
+      }
+      .empty-main{
+        font-size: 14px;
+        font-family: Microsoft YaHei, Microsoft YaHei-Regular;
+        font-weight: 400;
+        text-align: center;
+        color: #999999;
+        line-height: 22px;
+      }
+    }
+  }
 </style>
 </style>

+ 5 - 2
src/components/report-data/SelectMonth.vue

@@ -53,8 +53,8 @@ export default {
       isMany: false, // 是否显示更多按钮
       isMany: false, // 是否显示更多按钮
       btnText: '更多',
       btnText: '更多',
       iconClass: 'el-icon-arrow-down',
       iconClass: 'el-icon-arrow-down',
-      week_starttime: '', // 第一个周报的时间
-      month_starttime: '', // 第一个月报的时间
+      week_starttime: 0, // 第一个周报的时间
+      month_starttime: 0, // 第一个月报的时间
       lastIndex: 0
       lastIndex: 0
     }
     }
   },
   },
@@ -72,6 +72,8 @@ export default {
           } else if (res.data.week_firsttime !== 0) {
           } else if (res.data.week_firsttime !== 0) {
             this.week_starttime = res.data.week_firsttime
             this.week_starttime = res.data.week_firsttime
             this.getTimes(res.data.week_firsttime)
             this.getTimes(res.data.week_firsttime)
+          } else {
+            this.$emit('noReport')
           }
           }
         }
         }
       })
       })
@@ -177,6 +179,7 @@ export default {
   display: flex;
   display: flex;
   justify-content: flex-start;
   justify-content: flex-start;
   margin: 0 auto;
   margin: 0 auto;
+  margin-bottom: 24px;
   padding: 30px 40px 0;
   padding: 30px 40px 0;
   height: auto;
   height: auto;
   border-bottom: 1px solid #ececec;
   border-bottom: 1px solid #ececec;

+ 1 - 3
src/views/PotentialList.vue

@@ -104,9 +104,7 @@ export default {
           } else {
           } else {
             this.$toast('关注成功,可前往“我关注的客户”中查看')
             this.$toast('关注成功,可前往“我关注的客户”中查看')
           }
           }
-          setTimeout(() => {
-            this.$refs.pushList.doQuery(this.filters)
-          }, 2000)
+          this.$refs.pushList.doQuery(this.filters)
         })
         })
       } else {
       } else {
         // 潜在竞争对手 / 合作伙伴挖掘 -- 关注
         // 潜在竞争对手 / 合作伙伴挖掘 -- 关注

+ 21 - 6
src/views/reportData/pageMonth.vue

@@ -2,11 +2,12 @@
   <Layout class="page_week">
   <Layout class="page_week">
     <div class="page_week_main">
     <div class="page_week_main">
       <!-- 选择月报时间 -->
       <!-- 选择月报时间 -->
-      <div class="week_time">
-        <SelectMonth :queryDate="getQueryTime" :getTypeTime="{judgeTime: 'month'}" @selectYm="selectYear"></SelectMonth>
+      <div class="week_time" v-if="!nonereport">
+        <SelectMonth :queryDate="getQueryTime" @noReport="noReport" :getTypeTime="{judgeTime: 'month'}" @selectYm="selectYear"></SelectMonth>
       </div>
       </div>
-      <Empty tip="暂无数据" v-if="nodata"></Empty>
-      <div v-else>
+      <bmEmpty functype="month" tip="本月结束后,将为您推送月报,敬请期待~" v-if="nonereport"></bmEmpty>
+      <Empty tip="暂无数据" v-if="nodata && !nonereport"></Empty>
+      <div v-else-if="!nodata && !nonereport">
         <!-- 数据报告-周报 -->
         <!-- 数据报告-周报 -->
         <div class="dataReport">
         <div class="dataReport">
           <div class="dataReport_main">
           <div class="dataReport_main">
@@ -115,6 +116,7 @@ import { dateFormatter } from '@/utils/globalFunctions'
 import BarLineChart from '@/components/chart/BarLineChart'
 import BarLineChart from '@/components/chart/BarLineChart'
 import DuoToneChart from '@/components/chart/DuoToneChart'
 import DuoToneChart from '@/components/chart/DuoToneChart'
 import MapChart from '@/components/chart/MapChart'
 import MapChart from '@/components/chart/MapChart'
+import bmEmpty from '@/components/common/BigMemberEmpty'
 import Empty from '@/components/common/Empty'
 import Empty from '@/components/common/Empty'
 
 
 export default {
 export default {
@@ -125,6 +127,7 @@ export default {
     ProjectTop,
     ProjectTop,
     BarLineChart,
     BarLineChart,
     DuoToneChart,
     DuoToneChart,
+    bmEmpty,
     Empty,
     Empty,
     MapChart
     MapChart
   },
   },
@@ -136,6 +139,7 @@ export default {
       start: 0,
       start: 0,
       end: 0,
       end: 0,
       nodata: false,
       nodata: false,
+      nonereport: false,
       keywordsGroup: '', // 关键词组
       keywordsGroup: '', // 关键词组
       // 项目数量  1
       // 项目数量  1
       pCount: {
       pCount: {
@@ -326,6 +330,10 @@ export default {
       }
       }
       this.getReportList(time)
       this.getReportList(time)
     },
     },
+    // 没有一条数据显示bmEmpty空状态组件
+    noReport () {
+      this.nonereport = true
+    },
     // 选择月报
     // 选择月报
     selectYear (data) {
     selectYear (data) {
       this.isFinish = false
       this.isFinish = false
@@ -358,6 +366,8 @@ export default {
           } else {
           } else {
             this.nodata = false
             this.nodata = false
           }
           }
+        } else {
+          this.nodata = true
         }
         }
       })
       })
     },
     },
@@ -801,8 +811,13 @@ export default {
   .page_week{
   .page_week{
     margin: 32px auto;
     margin: 32px auto;
     .page_week_main{
     .page_week_main{
-      ::v-deep .getlastmonth{
-        display: none;
+      ::v-deep {
+        .getlastmonth{
+          display: none;
+        }
+        .empty-container{
+          background: #ffffff;
+        }
       }
       }
       .week_time{
       .week_time{
         // padding-bottom: 24px;
         // padding-bottom: 24px;

+ 12 - 4
src/views/reportData/pageWeek.vue

@@ -3,7 +3,7 @@
     <div class="page_week_main">
     <div class="page_week_main">
       <!-- 选择周报时间 -->
       <!-- 选择周报时间 -->
       <div class="week_time">
       <div class="week_time">
-        <SelectMonth ref="selectMonth" :queryDate="getQueryTime" @selectYm="getSelectTime"></SelectMonth>
+        <SelectMonth v-if="!nonereport" ref="selectMonth" @noReport="noReport" :queryDate="getQueryTime" @selectYm="getSelectTime"></SelectMonth>
         <div class="select_report">
         <div class="select_report">
           <div class="week_report" v-for="(item, index) in weekList" :key="index" @click="selectWeek(index, item)" :class="{weekActive:index==isWeekIndex}">
           <div class="week_report" v-for="(item, index) in weekList" :key="index" @click="selectWeek(index, item)" :class="{weekActive:index==isWeekIndex}">
             <div class="week_report_main">
             <div class="week_report_main">
@@ -24,11 +24,12 @@
               </div>
               </div>
             </div>
             </div>
           </div>
           </div>
-          <Empty tip="暂无数据" v-if="!nodata"></Empty>
+          <bmEmpty v-if="nonereport" functype="week" tip="本周结束后,将为您推送周报,敬请期待~"></bmEmpty>
+          <Empty tip="暂无数据" v-if="!nodata && !nonereport"></Empty>
         </div>
         </div>
       </div>
       </div>
       <!-- 数据报告-周报 -->
       <!-- 数据报告-周报 -->
-      <div class="dataReport" v-if="nodata">
+      <div class="dataReport" v-if="nodata && !nonereport">
         <div class="dataReport_main">
         <div class="dataReport_main">
           <div class="data_r_head">
           <div class="data_r_head">
             <div class="data_r_title">数据报告-周报</div>
             <div class="data_r_title">数据报告-周报</div>
@@ -99,6 +100,7 @@ import { getReportDetail, getReportIndex } from '@/api/modules'
 import { dateFormatter } from '@/utils/globalFunctions'
 import { dateFormatter } from '@/utils/globalFunctions'
 import DuoToneChart from '@/components/chart/DuoToneChart'
 import DuoToneChart from '@/components/chart/DuoToneChart'
 import BarLineChart from '@/components/chart/BarLineChart'
 import BarLineChart from '@/components/chart/BarLineChart'
+import bmEmpty from '@/components/common/BigMemberEmpty'
 import Empty from '@/components/common/Empty'
 import Empty from '@/components/common/Empty'
 export default {
 export default {
   name: 'page_week',
   name: 'page_week',
@@ -108,6 +110,7 @@ export default {
     ProjectTop,
     ProjectTop,
     DuoToneChart,
     DuoToneChart,
     BarLineChart,
     BarLineChart,
+    bmEmpty,
     Empty,
     Empty,
     Layout
     Layout
   },
   },
@@ -120,6 +123,7 @@ export default {
       keywordsGroup: '',
       keywordsGroup: '',
       weekList: [],
       weekList: [],
       nodata: false, // ,没有周报列表显示空组件
       nodata: false, // ,没有周报列表显示空组件
+      nonereport: false, // ,没有周报列表显示空组件
       // 本周新增招标项目数量
       // 本周新增招标项目数量
       newDrawCount: {
       newDrawCount: {
         show: false,
         show: false,
@@ -206,6 +210,10 @@ export default {
   },
   },
   methods: {
   methods: {
     dateFormatter,
     dateFormatter,
+    // 没有一条数据显示bmEmpty空状态组件
+    noReport () {
+      this.nonereport = true
+    },
     // 周报列表
     // 周报列表
     getReportList (time) {
     getReportList (time) {
       getReportIndex({ ym: time }).then((res) => {
       getReportIndex({ ym: time }).then((res) => {
@@ -511,7 +519,7 @@ export default {
         }
         }
         .select_report{
         .select_report{
           padding: 0 40px;
           padding: 0 40px;
-          margin: 24px auto;
+          margin: 0 auto;
           display: flex;
           display: flex;
           justify-content: space-between;
           justify-content: space-between;
           align-content: space-between;
           align-content: space-between;