فهرست منبع

Merge branch 'dev1.2.1' of http://192.168.3.207:8080/jianyu/page_bigmember_pc into dev1.2.1

yangfeng 3 سال پیش
والد
کامیت
e49952a408

BIN
src/assets/images/bmempty.png


+ 91 - 0
src/components/common/BigMemberEmpty.vue

@@ -0,0 +1,91 @@
+<template>
+  <div class="empty-index-container">
+    <div class="empty-content-position">
+      <el-image :src="require('@/assets/images/bmempty.png')"></el-image>
+      <div class="empty-main">
+        <slot name="default">{{ tip }}</slot>
+        <slot name="button"></slot>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { Image } from 'element-ui'
+export default {
+  name: 'empty',
+  components: {
+    [Image.name]: Image
+  },
+  props: {
+    tip: {
+      type: String,
+      default: '这里什么也没有'
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+  .empty-index-container {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    flex: 1;
+    padding: 16px;
+    box-sizing: border-box;
+    &.mtb60 {
+      margin: 60px auto;
+    }
+
+    .empty-content-position {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+    }
+
+    .mt50 {
+      margin-top: -50px;
+    }
+
+    .empty-main {
+      @extend .empty-content-position;
+      display: flex;
+      flex-direction: column;
+      align-items: flex-start;
+      font-family: Microsoft YaHei, Microsoft YaHei-Regular;
+      margin-top: 13px;
+      font-size: 14px;
+      font-weight: 400;
+      color: #999999;
+      line-height: 22px;
+      // 默认文字按钮组合样式
+      span + button {
+        margin-top: 32px;
+      }
+      ::v-deep.el-icon-plus {
+        font-weight: bold;
+      }
+      .el-button [class*=el-icon-]+span {
+        margin-left: 9px;
+      }
+      .setbtn{
+        margin-top: 12px;
+        padding: 4px 12px;
+        background: #2cb7ca;
+        border-radius: 4px;
+        font-size: 14px;
+        font-family: Microsoft YaHei, Microsoft YaHei-Regular;
+        font-weight: 400;
+        text-align: CENTER;
+        color: #ffffff;
+      }
+    }
+
+    .el-image {
+      margin-right: 16px;
+      width: 148px;
+      height: 148px;
+    }
+  }
+</style>

+ 14 - 4
src/components/time-line/PoverTimeLine.vue

@@ -3,8 +3,8 @@
     <el-popover
       popper-class="poverStep"
       placement="bottom-start"
-      :open-delay="200"
-      width="720"
+      :open-delay="300"
+      :width="poperWidth"
       @show="show"
       trigger="hover">
       <slot name="content" slot="reference"></slot>
@@ -35,6 +35,12 @@ export default {
       default () {
         return []
       }
+    },
+    poperWidth: {
+      type: String,
+      default () {
+        return '720'
+      }
     }
   },
   methods: {
@@ -45,15 +51,19 @@ export default {
 }
 </script>
 
-<style>
+<style lang="scss">
 .el-popover.poverStep {
   padding: 0;
   border: 0;
-  box-shadow: none;
+  .popper__arrow{
+    left: 100px!important;
+  }
 }
 </style>
 <style lang="scss" scoped>
 .project-content {
+  max-height: 516px;
+  overflow-y: auto;
   width: 100%;
   padding: 0 20px;
   .p-h-title {

+ 79 - 50
src/views/ProjectProgress.vue

@@ -14,8 +14,8 @@
           <div class="search_area">
             <div class="area_title">项目地区:</div>
             <div class="area_wrap">
-              <span class="area_tag" @click="focusArea('全国')" :class="areaItem == '全国'?'activeArea':''">全国</span>
-              <span class="area_tag" v-for="(item,index) in areaList" :key="index+'A'" v-show="item != '全国'" @click="focusArea(item)" :class="areaItem == item?'activeArea':''">{{item}}</span>
+              <span class="area_tag" @click="focusArea('全国')" :class="areaTagsList.indexOf('全国') !== -1 && areaTagsList.length === 1?'activeArea':''">全国</span>
+              <span class="area_tag" v-for="item in areaList" :key="item" v-show="item != '全国'" @click="focusArea(item)" :class="areaTagsList.indexOf(item) !== -1?'activeArea':''">{{item}}</span>
             </div>
           </div>
           <div class="search_wrap">
@@ -100,6 +100,7 @@ export default {
 
       areaList: [], // 筛选地区列表
       areaItem: '全国', // 选中的地区
+      areaTagsList: ['全国'], // 筛选地区多选
 
       projectTipsType: false // 筛选内容状态,false为有内容,true为没有内容
     }
@@ -150,32 +151,58 @@ export default {
       let thisList = []
       let thisTitle = ''
       let thisType = ''
-      if (name === '全国' && this.searchContent === '') {
-        thisList = this.dataList
-      } else if (name !== '全国' && this.searchContent === '') {
-        this.dataList.forEach(item => {
-          if (item.area === name) {
-            thisList.push(item)
-          }
-        })
-      } else if (name === '全国' && this.searchContent !== '') {
-        this.dataList.forEach(item => {
-          thisTitle = item.title
-          thisType = thisTitle.indexOf(this.searchContent)
-          if (thisType !== -1) {
-            thisList.push(item)
-          }
-        })
-      } else if (name !== '全国' && this.searchContent !== '') {
-        this.dataList.forEach(item => {
-          thisTitle = item.title
-          thisType = thisTitle.indexOf(this.searchContent)
-          if (thisType !== -1 && item.area === name) {
-            thisList.push(item)
+      let tagsList = []
+      let num = 0
+      if (name === '全国') {
+        this.areaTagsList = ['全国']
+      } else {
+        tagsList = this.areaTagsList
+        tagsList.forEach((item, index) => {
+          if (item === name) {
+            num++
+            tagsList.splice(index, 1)
+          } else {
+            if (num === 0) {
+              tagsList.push(name)
+              tagsList = [...new Set(tagsList)]
+            }
           }
         })
+        this.areaTagsList = tagsList
       }
-      this.showDataList = thisList
+      this.areaTagsList.forEach(itemA => {
+        if (name !== '全国' && this.searchContent === '') {
+          this.dataList.forEach(item => {
+            if (item.area === itemA) {
+              thisList.push(item)
+            }
+          })
+        } else if (name !== '全国' && this.searchContent !== '') {
+          this.dataList.forEach(item => {
+            thisTitle = item.title
+            thisType = thisTitle.indexOf(this.searchContent)
+            if (thisType !== -1 && item.area === itemA) {
+              thisList.push(item)
+            }
+          })
+        } else if (name === '全国' && this.searchContent === '') {
+          thisList = this.dataList
+        } else if (name === '全国' && this.searchContent !== '') {
+          this.dataList.forEach(item => {
+            thisTitle = item.title
+            thisType = thisTitle.indexOf(this.searchContent)
+            if (thisType !== -1) {
+              thisList.push(item)
+            }
+          })
+        }
+      })
+      if (this.areaTagsList.length === 1 && this.areaTagsList.indexOf('全国') !== -1) {
+        this.showDataList = this.dataList
+      } else {
+        this.showDataList = thisList
+      }
+      // this.showDataList = thisList
       if (this.showDataList.length) {
         this.projectTipsType = false
       } else {
@@ -195,31 +222,33 @@ export default {
       let thisList = []
       let thisTitle = ''
       let thisType = ''
-      if (this.areaItem === '全国' && this.searchContent === '') {
-        thisList = this.dataList
-      } else if (this.areaItem !== '全国' && this.searchContent === '') {
-        this.dataList.forEach(item => {
-          if (item.area === this.areaItem) {
-            thisList.push(item)
-          }
-        })
-      } else if (this.areaItem === '全国' && this.searchContent !== '') {
-        this.dataList.forEach(item => {
-          thisTitle = item.title
-          thisType = thisTitle.indexOf(this.searchContent)
-          if (thisType !== -1) {
-            thisList.push(item)
-          }
-        })
-      } else if (this.areaItem !== '全国' && this.searchContent !== '') {
-        this.dataList.forEach(item => {
-          thisTitle = item.title
-          thisType = thisTitle.indexOf(this.searchContent)
-          if (thisType !== -1 && item.area === this.areaItem) {
-            thisList.push(item)
-          }
-        })
-      }
+      this.areaTagsList.forEach(itemA => {
+        if (this.areaItem !== '全国' && this.searchContent === '') {
+          this.dataList.forEach(item => {
+            if (item.area === itemA) {
+              thisList.push(item)
+            }
+          })
+        } else if (this.areaItem !== '全国' && this.searchContent !== '') {
+          this.dataList.forEach(item => {
+            thisTitle = item.title
+            thisType = thisTitle.indexOf(this.searchContent)
+            if (thisType !== -1 && item.area === itemA) {
+              thisList.push(item)
+            }
+          })
+        } else if (this.areaItem === '全国' && this.searchContent === '') {
+          thisList = this.dataList
+        } else if (this.areaItem === '全国' && this.searchContent !== '') {
+          this.dataList.forEach(item => {
+            thisTitle = item.title
+            thisType = thisTitle.indexOf(this.searchContent)
+            if (thisType !== -1) {
+              thisList.push(item)
+            }
+          })
+        }
+      })
       this.showDataList = thisList
       if (this.showDataList.length) {
         this.projectTipsType = false