Ver Fonte

画像修改

TANGSHIZHE há 3 anos atrás
pai
commit
b3f3ba2684

+ 2 - 2
src/components/chart/ProgressChart.vue

@@ -66,10 +66,10 @@ export default {
       return moneyUnit(money)
     },
     goEntInfo (name) {
-      window.open('/unit_portrayal/' + encodeURIComponent(name))
+      window.open('/swordfish/page_big_pc/unit_portrayal/' + encodeURIComponent(name))
     },
     goEnt (id) {
-      window.open('/ent_portrait/' + id)
+      window.open('/swordfish/page_big_pc/ent_portrait/' + id)
     }
   }
 }

+ 2 - 2
src/components/common/Empty.vue

@@ -77,8 +77,8 @@ export default {
     }
 
     .el-image {
-      width: 160px;
-      height: 160px;
+      width: 200px;
+      height: 200px;
     }
   }
 </style>

+ 7 - 2
src/views/portrayal/EntPortrayal.vue

@@ -23,7 +23,7 @@
         @onConfirm="setFollowConfirmed"
       ></GroupSelector>
     </el-dialog>
-    <div class="ent-content">
+    <div class="ent-content" v-loading="loading">
       <div class="tab-header" :class="{'fixed-nav': navFixed}" id="entTabNav">
         <a :class="[activeName == '1' ? 'active' : '']" @click="handleClick('1')">企业信息</a>
         <a :class="[activeName == '2' ? 'active' : '']" @click="handleClick('2')">中标信息</a>
@@ -58,7 +58,7 @@
               <div :style="{margin: !isConf4 ? '40px 40px 0' : '64px 0 0'}" v-if="showConf13">
                 <ProActive :isactive="isActive" ref="myList" title="项目动态" @onPageChange="getProActivcList" :screenList="ScreenList" :projectData="project"></ProActive>
               </div>
-              <ent-chart :params="bidInfoParams" v-on:entInfo="getEntInfo"></ent-chart>
+              <ent-chart @loadingChart="loadingChart" :params="bidInfoParams" v-on:entInfo="getEntInfo"></ent-chart>
               <!-- 遮罩主要是商机版、自定义版没有画像权限的用户显示 -->
               <div v-if="!isConf4" >
                 <MaskCard @click="openBigPage(item)" v-for="(item, k) in getVipUpgradeMap" :key="k + item.button + item.title" :k="k" :item="item"></MaskCard>
@@ -105,6 +105,7 @@ export default {
   },
   data () {
     return {
+      loading: true,
       activeName: '1',
       proData: [],
       project: {
@@ -273,6 +274,9 @@ export default {
         this.activeName = '1'
       }
     },
+    loadingChart (data) {
+      this.loading = data
+    },
     // 点击切换
     handleClick (index) {
       this.activeName = index
@@ -284,6 +288,7 @@ export default {
     },
     // 中标信息-筛选
     onLimitChange (data) {
+      this.loading = true
       this.bidInfoParams = JSON.parse(data)
       this.getProActivcList()
     },

+ 12 - 9
src/views/portrayal/EntSearchPortrayal.vue

@@ -3,7 +3,7 @@
     <div class="ent-header">
       <div class="name">{{entName}}</div>
     </div>
-    <div class="ent-content">
+    <div class="ent-content" v-loading="loading">
       <div class="tab-header" :class="{'fixed-nav': navFixed}" id="entTabNav">
         <a :class="[activeName == '1' ? 'active' : '']" @click="handleClick('1')">企业信息</a>
         <a :class="[activeName == '2' ? 'active' : '']" @click="handleClick('2')">中标信息</a>
@@ -39,7 +39,7 @@
               <div class="pro_info_tip">数据统计范围:{{dateRange.start}}-{{dateRange.end}}</div>
             </div>
             <ProActive :isactive="isActive" title="项目动态" ref="myList" @onScreenChange="getScreenChange" :screenList="ScreenList" @onPageChange="getProActivcList" :projectData="project"></ProActive>
-            <ent-chart :params="bidInfoParams" v-if="showConf4" :active="activeName" v-on:entInfo="getEntInfo"></ent-chart>
+            <ent-chart @loadingChart="loadingChart" :params="bidInfoParams" v-if="showConf4" :active="activeName" v-on:entInfo="getEntInfo"></ent-chart>
           </div>
           <div class="ent-vip-upgrade-group" v-else key="tab2">
             <!-- 占位dom 解决锚点tab有fixed定位 scrollview位置会偏移 同时作为tab1和tab2的间距 -->
@@ -92,6 +92,7 @@ export default {
   },
   data () {
     return {
+      loading: true,
       isInit: false,
       activeName: '1',
       proData: [],
@@ -209,13 +210,6 @@ export default {
       isActive: false
     }
   },
-  watch: {
-    bidInfoParams (newval) {
-      if (newval) {
-        this.isActive = true
-      }
-    }
-  },
   computed: {
     ...mapState({
       info: state => state.user.info
@@ -305,6 +299,11 @@ export default {
       if (newVal) {
         this.getProActivcList()
       }
+    },
+    bidInfoParams (newval) {
+      if (newval) {
+        this.isActive = true
+      }
     }
   },
   created () {
@@ -354,6 +353,9 @@ export default {
         this.activeName = '1'
       }
     },
+    loadingChart (data) {
+      this.loading = data
+    },
     // 点击切换
     handleClick (index) {
       this.activeName = index
@@ -379,6 +381,7 @@ export default {
     },
     // 中标信息-筛选项
     onLimitChange (data) {
+      this.loading = true
       this.bidInfoParams = JSON.parse(data)
       this.getProActivcList()
     },

+ 50 - 7
src/views/portrayal/UnitPortrayal.vue

@@ -29,7 +29,7 @@
         <div class="bidcomp">
           <BidInfoActive whichPor="unitpor" @onPageChange="onLimitChange" :canselect="canSelect" title="采购单位分析"></BidInfoActive>
         </div>
-        <div class="u-i-box">
+        <div class="u-i-box" v-if="baseShow">
           <div class="b-item">
             <span>{{ info.buyerCount }}</span>
             <span>采购项目数量</span>
@@ -51,15 +51,21 @@
             <span>流标记录数</span>
           </div>
         </div>
-        <div class="u-i-tip">数据统计范围:{{ info.start }}-{{ info.end }}</div>
+        <div class="u-i-tip" v-if="baseShow">数据统计范围:{{ info.start }}-{{ info.end }}</div>
       </div>
       <!-- 招标动态 -->
-      <unit-list :bidparams="bidInfoParams" v-on:list="getList" @click="openCheckPop"></unit-list>
-      <unit-chart :params="bidInfoParams" v-on:baseInfo="getBaseInfo"></unit-chart>
+      <unit-list :bidparams="bidInfoParams" @list="getList" @click="openCheckPop"></unit-list>
+      <unit-chart @baseInfoBool="baseInfoBool" @showEmpty="showEmpty" :params="bidInfoParams" v-on:baseInfo="getBaseInfo"></unit-chart>
       <div class="unit-big-upgrade-group" v-show="!canShowChart">
         <MaskCard @click="openBigPage(k, item)" v-for="(item, k) in bigUpgradeMap" :key="k + item.button + item.title"
                   :k="k" :item="item"></MaskCard>
       </div>
+      <Empty v-show="emptyShow" :images="require('@/assets/images/empty/jy-chagrin.png')">
+        <div slot="default" style="text-align:center">
+          <span>对不起,没有匹配到相关信息,</span><br/>
+          <span>修改时间范围或换个搜索词试试吧</span>
+        </div>
+      </Empty>
     </div>
     <el-dialog
       class="unit-dialog-group"
@@ -79,6 +85,7 @@ import BidInfoActive from './components/BidInfoActive'
 import ContactList from '@/components/contact-info/ContactInfo'
 import MaskCard from '@/components/mask-card/MaskCard.vue'
 import CollectInfo from '@/components/collect-info/CollectInfo.vue'
+import Empty from '@/components/common/Empty'
 import { Dialog } from 'element-ui'
 import { setLogs, getStatusCustomer, setStatusCustomer, getBuyerSelect } from '@/api/modules'
 import { mapState } from 'vuex'
@@ -98,7 +105,8 @@ export default {
     MaskCard,
     CollectInfo,
     BidInfoActive,
-    [Dialog.name]: Dialog
+    [Dialog.name]: Dialog,
+    Empty
   },
   data () {
     return {
@@ -213,7 +221,20 @@ export default {
         }
       },
       bidInfoParams: {},
-      canSelect: {}
+      canSelect: {},
+      baseShow: true,
+      chartShowArr: [],
+      emptyShow: false,
+      unitlistshow: true
+    }
+  },
+  watch: {
+    chartShowArr (newval) {
+      if (newval.indexOf(true) !== -1) {
+        this.emptyShow = false
+      } else {
+        this.emptyShow = true
+      }
     }
   },
   computed: {
@@ -292,8 +313,16 @@ export default {
   methods: {
     // 采购单位-筛选项
     onLimitChange (data) {
+      this.loading = true
       this.bidInfoParams = JSON.parse(data)
     },
+    showEmpty (data) {
+      console.log(data)
+      this.chartShowArr = data
+    },
+    baseInfoBool (data) {
+      this.baseShow = data
+    },
     getSelect () {
       getBuyerSelect({ buyer: this.$route.params.entName }).then(res => {
         if (res.error_code === 0) {
@@ -341,7 +370,16 @@ export default {
       }
     },
     getList (data) {
-      if (!data) return
+      if (!data) {
+        this.chartShowArr.push(false)
+        if (this.emptyShow) {
+          this.unitlistshow = false
+        } else {
+          this.unitlistshow = true
+        }
+      } else {
+        this.chartShowArr.push(true)
+      }
       this.loading = false
     },
     getBaseInfo (data) {
@@ -418,6 +456,11 @@ export default {
 }
 
 .unit-portrayal {
+  .empty-container.mtb60 {
+    background: #fff;
+    margin: 0 auto;
+    padding: 0 0 60px 0;
+  }
   // width: 1200px;
   .mask-bg-group {
     margin-top: 16px;

+ 8 - 6
src/views/portrayal/components/AnalysisList.vue

@@ -12,38 +12,38 @@
         <div class="company-info regcapital">
           <span>注册资本:<em>{{formatterMoney(hs.capital)}}</em></span>
         </div>
-        <div class="company-info-div">
+        <div class="company-info-div" @click="getProDetailMore('default', hs.key)">
           <div class="company-title">类似项目明细</div>
           <div class="company-info">
             <span>项目数量:<em>{{hs.doc_count}}个</em> </span>
             <span>项目金额:<em>{{formatterMoney(hs.total_project)}}</em></span>
             <span>最近中标时间:<em>{{dateFormatter(hs.max_jytime * 1000, 'yyyy/MM/dd')}}</em></span>
           </div>
-          <div class="company-more" @click="getProDetailMore('default', hs.key)">
+          <div class="company-more">
             <span>更多</span>
             <img style="width:12px;height:12px" src="@/assets/images/icon/d.png" alt="">
           </div>
         </div>
-        <div class="same-history" v-if="hs.buyer_similar_list.doc_count > 0 || hs.buyer_similar_list.total_project > 0">
+        <div class="same-history" @click="getProDetailMore('history', hs.key)" v-if="hs.buyer_similar_list.doc_count > 0 || hs.buyer_similar_list.total_project > 0">
           <div class="same-title">与{{hs.buyer_similar_list.buyer}}有<span class="simalar-pro">类似项目合作历史</span></div>
           <div class="same-info">
             <span>项目数量:<span class="same-num">{{hs.buyer_similar_list.doc_count}}个</span></span>
             <span>项目金额:<span class="same-num">{{formatterMoney(hs.buyer_similar_list.total_project)}}</span></span>
             <span>最近中标时间:<span class="same-num">{{hs.buyer_similar_list.bid_winner_time || '--'}}</span></span>
           </div>
-          <div class="company-more" @click="getProDetailMore('history', hs.key)">
+          <div class="company-more">
             <span>更多</span>
             <img style="width:12px;height:12px" src="@/assets/images/icon/d.png" alt="">
           </div>
         </div>
-        <div class="other-history" v-if="hs.buyer_other_list.doc_count > 0 || hs.buyer_other_list.total_project > 0">
+        <div class="other-history" @click="getProDetailMore('other', hs.key)" v-if="hs.buyer_other_list.doc_count > 0 || hs.buyer_other_list.total_project > 0">
           <div class="other-title">与{{hs.buyer_other_list.buyer}}有<span class="simalar-pro">其他项目合作历史</span></div>
           <div class="other-info">
             <span>项目数量:<span class="same-num">{{hs.buyer_other_list.doc_count}}个</span></span>
             <span>项目金额:<span class="same-num">{{formatterMoney(hs.buyer_other_list.total_project)}}</span></span>
             <span>最近中标时间:<span class="same-num">{{hs.buyer_other_list.bid_winner_time || '--'}}</span></span>
           </div>
-          <div class="company-more" @click="getProDetailMore('other', hs.key)">
+          <div class="company-more">
             <span>更多</span>
             <img style="width:12px;height:12px" src="@/assets/images/icon/d.png" alt="">
           </div>
@@ -149,6 +149,7 @@ export default {
     height: 62px;
     background: rgba(44,183,202,0.08);
     border-radius: 8px;
+    cursor: pointer;
   }
   .company-more{
     position: absolute;
@@ -195,6 +196,7 @@ export default {
     padding: 8px 24px;
     border-radius: 8px;
     background: #fafafa;
+    cursor: pointer;
   }
   // .same-history{
   //   background: rgba(251, 72, 61, 0.06);

+ 1 - 1
src/views/portrayal/components/BidInfoActive.vue

@@ -71,7 +71,7 @@
                 <li class="yearlist" @click="setAnalySisYear(item, 'start')" v-for="(item, index) in startYearRage" :key="index">{{item}}</li>
               </ul>
             </template>
-            <el-input size="small" :disabled="true" style="cursor: pointer;" v-model="startModel" slot="reference" placeholder="请选择年份">
+            <el-input size="small" style="cursor: pointer;" v-model="startModel" slot="reference" placeholder="请选择年份">
             </el-input>
             <img slot="reference" v-show="startYearShow" style="position:absolute;width:12px;height:12px;ling-height:32px;cursor: pointer;top:10px;right:10px;" src="@/assets/images/icon/cancel.png" @click="cancelClick('2')" class="inputcancel" />
           </el-popover>

+ 1 - 0
src/views/portrayal/components/EntChart.vue

@@ -186,6 +186,7 @@ export default {
       this.getEntPortraitInfoTimes++
       if (this.haveGetData === '0') {
         const res = await getEntChart(newval)
+        this.$emit('loadingChart', false)
         if (res.error_code === 0) {
           if (res.data && Object.keys(res.data).length !== 0) {
             // 将数据保存到data中

+ 1 - 0
src/views/portrayal/components/EntSubVipChart.vue

@@ -186,6 +186,7 @@ export default {
       this.getEntPortraitInfoTimes++
       if (this.haveGetData === '0') {
         const res = await getSubVipEntChart(newval)
+        this.$emit('loadingChart', false)
         if (res.error_code === 0) {
           if (res.data && Object.keys(res.data).length !== 0) {
             // 将数据保存到data中

+ 94 - 11
src/views/portrayal/components/UnitChart.vue

@@ -95,6 +95,7 @@ export default {
   },
   data () {
     return {
+      allBool: [],
       showChart: false,
       // 年度项目统计
       years: {
@@ -251,9 +252,15 @@ export default {
   watch: {
     params (newval) {
       this.getChartData(newval)
+    },
+    allBool: {
+      handler (newval) {
+        console.log(newval)
+        this.$emit('showEmpty', newval)
+      },
+      deep: true
     }
   },
-  computed: {},
   mounted () {
     this.getChartData(this.initParams)
   },
@@ -318,26 +325,26 @@ export default {
     },
     // 画像数据
     async getChartData (newval) {
-      // {
-      //   buyer: decodeURIComponent(this.$route.params.entName)
-      // }
+      this.allBool = []
       const res = await getUnitChart(newval)
       if (res.error_code === 0) {
         if (res.data && Object.keys(res.data).length > 0) {
           this.showChart = true
           this.initData('', res.data)
         } else {
-          this.getSectionChartData('a')
+          this.getSectionChartData('a', newval)
         }
       } else {
         this.showChart = false
       }
     },
-    getSectionChartData (type) {
-      getUnitChart({
+    getSectionChartData (type, newval) {
+      const flagAjaxParams = {
         buyer: decodeURIComponent(this.$route.params.entName),
         flag: type
-      }).then((res) => {
+      }
+      Object.assign(flagAjaxParams, newval)
+      getUnitChart(flagAjaxParams).then((res) => {
         if (res.error_code === 0) {
           this.reqCount++
           if (res.data && Object.keys(res.data).length > 0) {
@@ -345,14 +352,14 @@ export default {
             this.initData(type, res.data)
             if (type === 'a') {
               this.reqCount = 0
-              this.getSectionChartData('b')
+              this.getSectionChartData('b', newval)
             } else if (type === 'b') {
               this.reqCount = 0
-              this.getSectionChartData('c')
+              this.getSectionChartData('c', newval)
             }
           } else {
             if (this.reqCount < 5) {
-              this.getSectionChartData(type)
+              this.getSectionChartData(type, newval)
             } else {
               this.showChart = false
             }
@@ -622,6 +629,16 @@ export default {
         info.buyerScale = res.bidamount_count ? moneyUnit(res.bidamount_count) : '--'
         info.fail_count = res.fail_count ? res.fail_count + '条' : '--'
         this.$emit('baseInfo', info)
+        if (!res.project_count && !res.winner_count && !res.otherProvincesWinnerCount && !res.bidamount_count && !res.fail_count) {
+          this.$emit('baseInfoBool', false)
+          this.allBool.push(false)
+        } else {
+          this.$emit('baseInfoBool', true)
+          this.allBool.push(true)
+        }
+      } else {
+        this.$emit('baseInfoBool', false)
+        this.allBool.push(false)
       }
     },
     // 格式化年度项目统计数据
@@ -643,9 +660,14 @@ export default {
           this.years.data.columns = ['年份', '项目数量', '项目金额']
           this.years.data.rows = rows
           this.years.show = true
+          this.allBool.push(true)
         } else {
+          this.allBool.push(false)
           this.years.show = false
         }
+      } else {
+        this.years.show = false
+        this.allBool.push(false)
       }
     },
     // 格式化月度采购规模数据
@@ -689,9 +711,14 @@ export default {
           this.monthScale.data.columns = columns
           this.monthScale.data.rows = rows
           this.monthScale.show = true
+          this.allBool.push(true)
         } else {
           this.monthScale.show = false
+          this.allBool.push(false)
         }
+      } else {
+        this.monthScale.show = false
+        this.allBool.push(false)
       }
     },
     // 格式化采购规模分布(热力图)数据
@@ -714,6 +741,12 @@ export default {
         this.buyScaleFb.flag = true
         this.buyScaleFb.data = data
         this.buyScaleFb.show = true
+        this.allBool.push(true)
+      } else {
+        this.allBool.push(false)
+        this.buyScaleFb.flag = false
+        this.buyScaleFb.data = []
+        this.buyScaleFb.show = false
       }
     },
     // 格式化各类招标方式占比数据(双向柱图)
@@ -753,6 +786,11 @@ export default {
         })
         this.bidType.data = newData
         this.bidType.show = true
+        this.allBool.push(true)
+      } else {
+        this.allBool.push(false)
+        this.bidType.data = []
+        this.bidType.show = false
       }
     },
     // 格式化平均节支率数据
@@ -786,9 +824,14 @@ export default {
           this.savingsRate.data.rows = rows
           this.savingsRate.show = true
           this.savingsRate.flag = true
+          this.allBool.push(true)
         } else {
           this.savingsRate.show = false
+          this.allBool.push(false)
         }
+      } else {
+        this.savingsRate.show = false
+        this.allBool.push(false)
       }
     },
     // 格式化各行业项目规模占比数据
@@ -821,6 +864,12 @@ export default {
         this.projectScale.flag = true
         this.projectScale.data = newArr
         this.projectScale.show = true
+        this.allBool.push(true)
+      } else {
+        this.allBool.push(false)
+        this.projectScale.flag = false
+        this.projectScale.data = []
+        this.projectScale.show = false
       }
     },
     // 格式化注册资本数据
@@ -850,6 +899,14 @@ export default {
         this.capital.data.customData = capData
         this.capital.show = true
         this.capital.flag = true
+        this.allBool.push(true)
+      } else {
+        this.allBool.push(false)
+        this.capital.data.columns = []
+        this.capital.data.rows = []
+        this.capital.data.customData = []
+        this.capital.show = false
+        this.capital.flag = false
       }
     },
     // 格式化企业年龄分布数据
@@ -882,6 +939,13 @@ export default {
         this.age.data.customData = customRows
         this.age.show = true
         this.age.flag = true
+        this.allBool.push(true)
+      } else {
+        this.allBool.push(false)
+        this.age.data.rows = []
+        this.age.data.customData = []
+        this.age.show = false
+        this.age.flag = false
       }
     },
     // 格式化企业注册地分布数据
@@ -908,6 +972,13 @@ export default {
         this.area.data.customData = custom
         this.area.show = true
         this.area.flag = true
+        this.allBool.push(true)
+      } else {
+        this.allBool.push(false)
+        this.area.data.rows = []
+        this.area.data.customData = []
+        this.area.show = false
+        this.area.flag = false
       }
     },
     // 格式化重点合作企业数据
@@ -930,6 +1001,12 @@ export default {
         this.client.data = newData
         this.client.flag = true
         this.client.show = true
+        this.allBool.push(true)
+      } else {
+        this.allBool.push(false)
+        this.client.data = []
+        this.client.flag = false
+        this.client.show = false
       }
     },
     // 格式化重点合作代理机构数据
@@ -949,6 +1026,12 @@ export default {
         this.agency.data = arr
         this.agency.flag = true
         this.agency.show = true
+        this.allBool.push(true)
+      } else {
+        this.allBool.push(false)
+        this.agency.data = []
+        this.agency.flag = false
+        this.agency.show = false
       }
     },
     /* ******** 公共函数部分 ******* */

+ 1 - 1
src/views/portrayal/components/UnitList.vue

@@ -123,13 +123,13 @@ export default {
           }
           this.dt.pageCount = res.data.count
           this.dt.list = res.data.list
-          this.$emit('list', res.data.list)
         } else {
           this.showDt = false
           if (this.reqCount < 3) {
             this.getUnitDtFn(newval)
           }
         }
+        this.$emit('list', res.data.list)
       } else {
         this.showDt = false
       }