|
@@ -0,0 +1,1790 @@
|
|
|
+<template>
|
|
|
+ <div class="market-analysis-result">
|
|
|
+ <div class="analysis-result-anchors" v-loading="!sections.loaded.overview">
|
|
|
+ <div class="analysis-dimensions analysis-wrap" v-stickyed="stickyed">
|
|
|
+ <div class="analysis-label">报告分析维度:</div>
|
|
|
+ <div class="analysis-content">
|
|
|
+ <el-dropdown
|
|
|
+ class="dimensions-options"
|
|
|
+ @command="dropDownClick"
|
|
|
+ placement="bottom"
|
|
|
+ :class="{
|
|
|
+ highlight: value.dropDownShow
|
|
|
+ }"
|
|
|
+ v-for="(value, key) in dimensionsTitle"
|
|
|
+ :key="key"
|
|
|
+ size="small">
|
|
|
+ <span class="el-dropdown-link" @click="dropDownClick(value)">
|
|
|
+ <span class="dropdown-text">{{ value.name }}</span>
|
|
|
+ <i class="el-icon-caret-bottom" :class="{ highlight: value.dropDownShow }"></i>
|
|
|
+ </span>
|
|
|
+ <el-dropdown-menu slot="dropdown" class="report-dropdown-menu">
|
|
|
+ <el-dropdown-item
|
|
|
+ v-for="(item, index) in dimensionsOptions[key]"
|
|
|
+ :key="index"
|
|
|
+ v-show="item.show"
|
|
|
+ :command="item">
|
|
|
+ {{ item.name }}
|
|
|
+ </el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="analysis-limit-time analysis-wrap">
|
|
|
+ <div class="analysis-label">数据统计范围:</div>
|
|
|
+ <div class="analysis-content">
|
|
|
+ <span class="limit-time">{{ formatSelectTime(reportFilters.selectTime) }}</span>
|
|
|
+ <span>(注:分析报告涉及的排行完全依据您的分析条件)</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="bg-grey-h24"></div>
|
|
|
+ <div class="analysis-result-list">
|
|
|
+ <section class="analysis-result-section section-market">
|
|
|
+ <div class="analysis-result-title pd-lr20">市场规模</div>
|
|
|
+ <div class="analysis-result-content sub-section-list">
|
|
|
+ <!-- 市场概况 -->
|
|
|
+ <div class="sub-section market-overview" v-if="sections.market.overview.length">
|
|
|
+ <div class="sub-section-header">
|
|
|
+ <div class="sub-section-title">市场概况</div>
|
|
|
+ </div>
|
|
|
+ <div class="sub-section-content">
|
|
|
+ <MarketOverview :overviewList="sections.market.overview" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 项目规模分布 -->
|
|
|
+ <div class="sub-section project-scatter"
|
|
|
+ v-if="!sections.loaded.top3 || (sections.projectScatter.dataAlready && sections.loaded.top3)"
|
|
|
+ v-loading="!sections.loaded.top3">
|
|
|
+ <div class="sub-section-header">
|
|
|
+ <div class="sub-section-title">项目规模分布</div>
|
|
|
+ </div>
|
|
|
+ <div class="sub-section-content">
|
|
|
+ <ProjectScatter
|
|
|
+ v-if="sections.projectScatter.dataAlready"
|
|
|
+ :chartData="sections.projectScatter.chartData"
|
|
|
+ :tableData="sections.projectScatter.tableData"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 时间分布 -->
|
|
|
+ <div class="sub-section time-scatter" v-if="sections.timeScatter.dataAlready">
|
|
|
+ <div class="sub-section-header">
|
|
|
+ <div class="sub-section-title">时间分布</div>
|
|
|
+ <div class="sub-section-action">
|
|
|
+ <div
|
|
|
+ class="s-a-item"
|
|
|
+ :class="{
|
|
|
+ active: item.value === sections.timeScatter.activeAction
|
|
|
+ }"
|
|
|
+ v-for="(item, index) in sections.timeScatter.actionList"
|
|
|
+ :key="index"
|
|
|
+ @click="clickTimeScatterTab(item)"
|
|
|
+ >{{ item.label }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="sub-section-content" key="timeScatterChartsKey">
|
|
|
+ <MarketTimeScatter width="460px" :chartData="sections.timeScatter[sections.timeScatter.activeAction].count" />
|
|
|
+ <MarketTimeScatter width="460px" :chartData="sections.timeScatter[sections.timeScatter.activeAction].amount" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 地区分布 -->
|
|
|
+ <div class="sub-section area-scatter"
|
|
|
+ v-if="(!sections.loaded.top3 && notOneAreaFilter) || (sections.areaScatter.dataAlready && sections.loaded.top3 && notOneAreaFilter)"
|
|
|
+ v-loading="!sections.loaded.top3">
|
|
|
+ <div class="sub-section-header">
|
|
|
+ <div class="sub-section-title">地区分布</div>
|
|
|
+ </div>
|
|
|
+ <div class="sub-section-content">
|
|
|
+ <MarketAreaScatter
|
|
|
+ v-if="sections.areaScatter.dataAlready"
|
|
|
+ :chartData="sections.areaScatter.chartData"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="top3-table-list pd-lr20">
|
|
|
+ <div class="ar-table"
|
|
|
+ v-if="!sections.loaded.top3 || (sections.areaScatter.projectCountTop3 && sections.loaded.top3)"
|
|
|
+ v-loading="!sections.loaded.top3">
|
|
|
+ <p class="ar-table-title">项目数量TOP3地区的重点中标单位</p>
|
|
|
+ <Top3Table v-if="sections.areaScatter.projectCountTop3" :tableData="sections.areaScatter.projectCountTop3" />
|
|
|
+ </div>
|
|
|
+ <div class="ar-table"
|
|
|
+ v-if="!sections.loaded.top3 || (sections.areaScatter.projectAmountTop3 && sections.loaded.top3)"
|
|
|
+ v-loading="!sections.loaded.top3">
|
|
|
+ <p class="ar-table-title">项目金额TOP3地区的重点中标单位</p>
|
|
|
+ <Top3Table v-if="sections.areaScatter.projectAmountTop3" :tableData="sections.areaScatter.projectAmountTop3" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 客户分布 -->
|
|
|
+ <div class="sub-section user-scatter"
|
|
|
+ v-if="!sections.loaded.top3 || (sections.userScatter.list.length && sections.loaded.top3)"
|
|
|
+ v-loading="!sections.loaded.top3">
|
|
|
+ <div class="sub-section-header">
|
|
|
+ <div class="sub-section-title">客户分布</div>
|
|
|
+ </div>
|
|
|
+ <div class="sub-section-content">
|
|
|
+ <MarketUserScatter v-if="sections.userScatter.list.length" :chartData="sections.userScatter.list" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="top3-table-list pd-lr20">
|
|
|
+ <div class="ar-table"
|
|
|
+ v-if="!sections.loaded.top3 || (sections.userScatter.projectCountTop3 && sections.loaded.top3)"
|
|
|
+ v-loading="!sections.loaded.top3">
|
|
|
+ <p class="ar-table-title">项目数量TOP3客户类型的重点中标单位</p>
|
|
|
+ <Top3Table v-if="sections.userScatter.projectCountTop3" :tableData="sections.userScatter.projectCountTop3" />
|
|
|
+ </div>
|
|
|
+ <div class="ar-table"
|
|
|
+ v-if="!sections.loaded.top3 || (sections.userScatter.projectAmountTop3 && sections.loaded.top3)"
|
|
|
+ v-loading="!sections.loaded.top3">
|
|
|
+ <p class="ar-table-title">项目金额TOP3客户类型的重点中标单位</p>
|
|
|
+ <Top3Table v-if="sections.userScatter.projectAmountTop3" :tableData="sections.userScatter.projectAmountTop3" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 细分市场 -->
|
|
|
+ <div class="sub-section market-refine"
|
|
|
+ v-if="!sections.loaded.segment || (sections.market.refine.dataAlready && sections.loaded.segment)"
|
|
|
+ v-loading="!sections.loaded.segment">
|
|
|
+ <div class="sub-section-header">
|
|
|
+ <div class="sub-section-title">细分市场</div>
|
|
|
+ </div>
|
|
|
+ <div class="sub-section-content">
|
|
|
+ <MarketSegment
|
|
|
+ v-if="sections.market.refine.dataAlready"
|
|
|
+ :projectCountData="sections.market.refine.projectCountData"
|
|
|
+ :projectAmountData="sections.market.refine.projectAmountData"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="top3-table-list pd-lr20">
|
|
|
+ <div class="ar-table"
|
|
|
+ v-if="!sections.loaded.segment || (sections.market.refine.projectCountTop3 && sections.loaded.segment)"
|
|
|
+ v-loading="!sections.loaded.segment">
|
|
|
+ <p class="ar-table-title">细分市场的重点中标单位-项目数量</p>
|
|
|
+ <Top3Table v-if="sections.market.refine.projectCountTop3" :tableData="sections.market.refine.projectCountTop3" />
|
|
|
+ </div>
|
|
|
+ <div class="ar-table"
|
|
|
+ v-if="!sections.loaded.segment || (sections.market.refine.projectAmountTop3 && sections.loaded.segment)"
|
|
|
+ v-loading="!sections.loaded.segment">
|
|
|
+ <p class="ar-table-title">细分市场的重点中标单位-项目金额</p>
|
|
|
+ <Top3Table v-if="sections.market.refine.projectAmountTop3" :tableData="sections.market.refine.projectAmountTop3" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+ <div class="bg-grey-h24" v-if="!sections.loaded.buyerWinner || buyerclassSectionShow"></div>
|
|
|
+ <section class="analysis-result-section section-buyer"
|
|
|
+ v-if="!sections.loaded.buyerWinner || (buyerclassSectionShow && sections.loaded.buyerWinner)"
|
|
|
+ v-loading="!sections.loaded.buyerWinner">
|
|
|
+ <div class="analysis-result-title pd-lr20">采购单位</div>
|
|
|
+ <div class="analysis-result-content sub-section-list">
|
|
|
+ <!-- 采购规模分布 -->
|
|
|
+ <div class="sub-section buyerclass-scatter" v-if="sections.buyerclass.dataAlready">
|
|
|
+ <div class="sub-section-header">
|
|
|
+ <div class="sub-section-title">采购规模分布</div>
|
|
|
+ </div>
|
|
|
+ <div class="sub-section-content">
|
|
|
+ <BuyerScaleScatter v-if="buyerclassSectionShow" :chartData="sections.buyerclass.chartData" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="top3-table-list pd-lr20">
|
|
|
+ <div class="ar-table buyerclass-count-top3" v-if="sections.buyerclass.projectCountTop3">
|
|
|
+ <p class="ar-table-title">项目数量TOP3采购单位及其重点合作中标单位</p>
|
|
|
+ <Top3Table v-if="buyerclassSectionShow" :tableData="sections.buyerclass.projectCountTop3" />
|
|
|
+ </div>
|
|
|
+ <div class="ar-table buyerclass-amount-top3" v-if="sections.buyerclass.projectAmountTop3">
|
|
|
+ <p class="ar-table-title">采购金额TOP3采购单位及其重点合作中标单位</p>
|
|
|
+ <Top3Table v-if="buyerclassSectionShow" :tableData="sections.buyerclass.projectAmountTop3" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+ <div class="bg-grey-h24" v-if="!sections.loaded.buyerWinner || winnerSectionShow"></div>
|
|
|
+ <section class="analysis-result-section section-winner"
|
|
|
+ v-if="!sections.loaded.buyerWinner || (winnerSectionShow && sections.loaded.buyerWinner)"
|
|
|
+ v-loading="!sections.loaded.buyerWinner">
|
|
|
+ <div class="analysis-result-title pd-lr20">中标单位</div>
|
|
|
+ <div class="analysis-result-content sub-section-list">
|
|
|
+ <!-- 中标规模分布 -->
|
|
|
+ <div class="sub-section winner-scatter">
|
|
|
+ <div class="sub-section-header">
|
|
|
+ <div class="sub-section-title">中标规模分布</div>
|
|
|
+ </div>
|
|
|
+ <div class="sub-section-content">
|
|
|
+ <BidderScaleScatter v-if="sections.winner.dataAlready" :chartData="sections.winner.chartData" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="top3-table-list pd-lr20">
|
|
|
+ <div class="ar-table winner-count-top3">
|
|
|
+ <p class="ar-table-title">项目数量TOP3中标单位及其重点合作采购单位</p>
|
|
|
+ <Top3Table v-if="sections.winner.projectCountTop3" :tableData="sections.winner.projectCountTop3" />
|
|
|
+ </div>
|
|
|
+ <div class="ar-table winner-amount-top3">
|
|
|
+ <p class="ar-table-title">中标金额TOP3中标单位及其重点合作采购单位</p>
|
|
|
+ <Top3Table v-if="sections.winner.projectAmountTop3" :tableData="sections.winner.projectAmountTop3" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { Dropdown, DropdownMenu, DropdownItem, Icon } from 'element-ui'
|
|
|
+import MarketOverview from '@/views/analysisReport/components/MarketOverview.vue'
|
|
|
+import ProjectScatter from '@/views/analysisReport/components/ProjectScatter.vue'
|
|
|
+import MarketTimeScatter from '@/views/analysisReport/components/MarketTimeScatter.vue'
|
|
|
+import MarketAreaScatter from '@/views/analysisReport/components/MarketAreaScatter.vue'
|
|
|
+import MarketSegment from '@/views/analysisReport/components/MarketSegment.vue'
|
|
|
+import BuyerScaleScatter from '@/views/analysisReport/components/BuyerScaleScatter.vue'
|
|
|
+import BidderScaleScatter from '@/views/analysisReport/components/BidderScaleScatter.vue'
|
|
|
+import Top3Table from '@/views/analysisReport/components/MarketTop3Table'
|
|
|
+import MarketUserScatter from '@/views/analysisReport/components/MarketUserScatter'
|
|
|
+import { getReportAnalysisInfo } from '@/api/modules/'
|
|
|
+import { moneyUnit, dateFormatter, formatPrice } from '@/utils/globalFunctions'
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: 'analysis-report-result',
|
|
|
+ components: {
|
|
|
+ [Icon.name]: Icon,
|
|
|
+ [Dropdown.name]: Dropdown,
|
|
|
+ [DropdownMenu.name]: DropdownMenu,
|
|
|
+ [DropdownItem.name]: DropdownItem,
|
|
|
+ MarketOverview,
|
|
|
+ ProjectScatter,
|
|
|
+ MarketTimeScatter,
|
|
|
+ MarketAreaScatter,
|
|
|
+ MarketSegment,
|
|
|
+ BuyerScaleScatter,
|
|
|
+ BidderScaleScatter,
|
|
|
+ Top3Table,
|
|
|
+ MarketUserScatter
|
|
|
+ },
|
|
|
+ props: {
|
|
|
+ rid: String
|
|
|
+ },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ loaded: false,
|
|
|
+ loading: false,
|
|
|
+ stickyed: {
|
|
|
+ className: ['dim-fixed'],
|
|
|
+ startFixedTop: 0 // 从高度为startFixedTop处开始置顶
|
|
|
+ },
|
|
|
+ reportFilters: {
|
|
|
+ keys: [],
|
|
|
+ selectTime: '',
|
|
|
+ selectTimeExtra: '',
|
|
|
+ area: {},
|
|
|
+ industry: {},
|
|
|
+ buyerclass: []
|
|
|
+ },
|
|
|
+ dimensionsTitle: {
|
|
|
+ market: {
|
|
|
+ name: '市场规模',
|
|
|
+ anchor: 'section-market',
|
|
|
+ show: true,
|
|
|
+ dropDownShow: false
|
|
|
+ },
|
|
|
+ buyer: {
|
|
|
+ name: '采购单位',
|
|
|
+ anchor: 'section-buyer',
|
|
|
+ show: true,
|
|
|
+ dropDownShow: false
|
|
|
+ },
|
|
|
+ winner: {
|
|
|
+ name: '中标单位',
|
|
|
+ anchor: 'section-winner',
|
|
|
+ show: true,
|
|
|
+ dropDownShow: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ dimensionsOptions: {
|
|
|
+ market: [
|
|
|
+ {
|
|
|
+ name: '市场概况',
|
|
|
+ show: false,
|
|
|
+ anchor: 'market-overview'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '项目规模',
|
|
|
+ show: false,
|
|
|
+ anchor: 'project-scatter'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '时间分布',
|
|
|
+ show: false,
|
|
|
+ anchor: 'time-scatter'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '地区分布',
|
|
|
+ show: false,
|
|
|
+ anchor: 'area-scatter'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '客户分布',
|
|
|
+ show: false,
|
|
|
+ anchor: 'user-scatter'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '细分市场',
|
|
|
+ show: false,
|
|
|
+ anchor: 'market-refine'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ buyer: [
|
|
|
+ {
|
|
|
+ name: '采购规模分布',
|
|
|
+ show: false,
|
|
|
+ anchor: 'buyerclass-scatter'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '项目数量TOP3',
|
|
|
+ show: false,
|
|
|
+ anchor: 'buyerclass-count-top3'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '采购金额TOP3',
|
|
|
+ show: false,
|
|
|
+ anchor: 'buyerclass-amount-top3'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ winner: [
|
|
|
+ {
|
|
|
+ name: '中标规模分布',
|
|
|
+ show: false,
|
|
|
+ anchor: 'winner-scatter'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '项目数量TOP3',
|
|
|
+ show: false,
|
|
|
+ anchor: 'winner-count-top3'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '中标金额TOP3',
|
|
|
+ show: false,
|
|
|
+ anchor: 'winner-amount-top3'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ sections: {
|
|
|
+ loaded: {
|
|
|
+ overview: false, // 1, 市场概括与时间分布
|
|
|
+ top10: false, // 2, 项目规模Top10
|
|
|
+ top3: false, // 3, 项目规模分布/地区规模分布/客户分布/地区分布及客户分布&Top3(table+chart)
|
|
|
+ segment: false, // 4, 细分市场
|
|
|
+ buyerWinner: false // 5, 采购单位/中标单位&Top3(table+chart)
|
|
|
+ },
|
|
|
+ market: {
|
|
|
+ overview: [],
|
|
|
+ refine: {
|
|
|
+ dataAlready: false,
|
|
|
+ projectCountData: null,
|
|
|
+ projectAmountData: null,
|
|
|
+ // 项目数量Top3
|
|
|
+ projectCountTop3: null,
|
|
|
+ // 项目金额Top3
|
|
|
+ projectAmountTop3: null
|
|
|
+ }
|
|
|
+ },
|
|
|
+ projectScatter: {
|
|
|
+ dataAlready: false,
|
|
|
+ chartData: null,
|
|
|
+ tableData: []
|
|
|
+ },
|
|
|
+ timeScatter: {
|
|
|
+ dataAlready: false, // 数据准备好之后才能开始渲染
|
|
|
+ activeAction: 'month',
|
|
|
+ actionList: [
|
|
|
+ {
|
|
|
+ label: '月度数据',
|
|
|
+ value: 'month'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '年度数据',
|
|
|
+ value: 'year'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ month: {
|
|
|
+ count: {},
|
|
|
+ amount: {}
|
|
|
+ },
|
|
|
+ year: {
|
|
|
+ count: {},
|
|
|
+ amount: {}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ areaScatter: {
|
|
|
+ dataAlready: false,
|
|
|
+ chartData: null,
|
|
|
+ // 项目数量Top3
|
|
|
+ projectCountTop3: null,
|
|
|
+ // 项目金额Top3
|
|
|
+ projectAmountTop3: null
|
|
|
+ },
|
|
|
+ userScatter: {
|
|
|
+ list: [],
|
|
|
+ // 项目数量Top3
|
|
|
+ projectCountTop3: null,
|
|
|
+ // 项目金额Top3
|
|
|
+ projectAmountTop3: null
|
|
|
+ },
|
|
|
+ buyerclass: {
|
|
|
+ dataAlready: false,
|
|
|
+ chartData: null,
|
|
|
+ // 项目数量Top3
|
|
|
+ projectCountTop3: null,
|
|
|
+ // 项目金额Top3
|
|
|
+ projectAmountTop3: null
|
|
|
+ },
|
|
|
+ winner: {
|
|
|
+ dataAlready: false,
|
|
|
+ chartData: null,
|
|
|
+ // 项目数量Top3
|
|
|
+ projectCountTop3: null,
|
|
|
+ // 项目金额Top3
|
|
|
+ projectAmountTop3: null
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ notOneAreaFilter () {
|
|
|
+ const area = this.reportFilters.area
|
|
|
+ const showArea = area && (Object.keys(area).length > 1 || Object.keys(area).length === 0)
|
|
|
+ return showArea
|
|
|
+ },
|
|
|
+ buyerclassSectionShow () {
|
|
|
+ const winnerState = this.sections.buyerclass
|
|
|
+ return winnerState.dataAlready && winnerState.projectCountTop3 && winnerState.projectAmountTop3
|
|
|
+ },
|
|
|
+ winnerSectionShow () {
|
|
|
+ const winnerState = this.sections.winner
|
|
|
+ return winnerState.dataAlready && winnerState.projectCountTop3 && winnerState.projectAmountTop3
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {},
|
|
|
+ created () {
|
|
|
+ this.sendRequest()
|
|
|
+ },
|
|
|
+ mounted () {
|
|
|
+ setTimeout(this.calcStickyNav, 1000)
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ calcStickyNav () {
|
|
|
+ // const offset = $(`.${this.dimensionsTitle.market.anchor}`).offset()
|
|
|
+ const offset = $('.analysis-result-list').offset()
|
|
|
+ if (offset) {
|
|
|
+ this.stickyed.startFixedTop = offset.top + 5
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onEmpty (info) {
|
|
|
+ this.$emit('onEmpty', info)
|
|
|
+ },
|
|
|
+ async sendRequest () {
|
|
|
+ // 先请求概况(1),判断报告是否为空
|
|
|
+ const query = {
|
|
|
+ rid: this.rid,
|
|
|
+ flag: 1
|
|
|
+ }
|
|
|
+ if (!query.rid) {
|
|
|
+ return this.onEmpty()
|
|
|
+ }
|
|
|
+ const { data, error_code: code, error_msg: msg } = await getReportAnalysisInfo(query)
|
|
|
+
|
|
|
+ if (data && code === 0) {
|
|
|
+ const empty = this.formatterData(query.flag, data)
|
|
|
+ if (empty) {
|
|
|
+ return this.onEmpty()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (msg.indexOf('项目数量超出上限') === -1) {
|
|
|
+ return this.onEmpty()
|
|
|
+ } else {
|
|
|
+ return this.onEmpty({ msg: '当前分析条件涉及项目数量已超过最大限制,请修改分析条件进行精确分析' })
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ const flagArr = [
|
|
|
+ 0, // 筛选条件
|
|
|
+ // 1, // 市场概括与时间分布
|
|
|
+ 2, // 项目规模Top10
|
|
|
+ 3, // 项目规模分布/地区规模分布/客户分布/地区分布及客户分布&Top3(table+chart)
|
|
|
+ 4, // 细分市场
|
|
|
+ 5 // 采购单位/中标单位&Top3(table+chart)
|
|
|
+ ]
|
|
|
+
|
|
|
+ flagArr.forEach(this.getReport)
|
|
|
+ },
|
|
|
+ async getReport (flag) {
|
|
|
+ const query = {
|
|
|
+ rid: this.rid,
|
|
|
+ flag
|
|
|
+ }
|
|
|
+ if (!query.rid) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ this.loading = true
|
|
|
+ this.loaded = false
|
|
|
+
|
|
|
+ const { data, error_code: code } = await getReportAnalysisInfo(query)
|
|
|
+
|
|
|
+ this.loading = false
|
|
|
+ this.loaded = true
|
|
|
+
|
|
|
+ if (data && code === 0) {
|
|
|
+ this.formatterData(flag, data)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ clickTimeScatterTab (item) {
|
|
|
+ this.sections.timeScatter.activeAction = item.value
|
|
|
+ },
|
|
|
+ formatterData (flag, data) {
|
|
|
+ if (flag === 0) {
|
|
|
+ this.sortReportFilters(data)
|
|
|
+ } else if (flag === 1) {
|
|
|
+ // 市场概况
|
|
|
+ const totalCount = this.sortMarketOverview(data.market_profile)
|
|
|
+ if (!totalCount) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ // 时间分布
|
|
|
+ this.sortTimeScatter(data)
|
|
|
+ this.sections.loaded.overview = true
|
|
|
+ } else if (flag === 2) {
|
|
|
+ // 项目规模Top10
|
|
|
+ this.sortProjectTop10(data.ProjectTop10)
|
|
|
+ this.sections.loaded.top10 = true
|
|
|
+ } else if (flag === 3) {
|
|
|
+ // 项目规模分布/地区规模分布/客户分布/地区分布及客户分布&Top3(table+chart)
|
|
|
+ // 项目规模分布
|
|
|
+ this.sortProjectScatter(data.projectScale)
|
|
|
+ // 地区规模分布
|
|
|
+ this.sortAreaScatter(data.area_infos)
|
|
|
+ // 客户分布
|
|
|
+ this.sortUserScatter(data.customer_scale)
|
|
|
+ // 地区分布及客户分布Top3
|
|
|
+ this.sortAreaUserTop3(data)
|
|
|
+ this.sections.loaded.top3 = true
|
|
|
+ } else if (flag === 4) {
|
|
|
+ // 细分市场
|
|
|
+ this.sortMarketRefineData(data)
|
|
|
+ this.sections.loaded.segment = true
|
|
|
+ } else if (flag === 5) {
|
|
|
+ // 采购单位/中标单位&Top3(table+chart)
|
|
|
+ this.sortBuyerclassData(data)
|
|
|
+ // 中标单位分析
|
|
|
+ this.sortWinnerData(data)
|
|
|
+ this.sections.loaded.buyerWinner = true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ formatSelectTime (value) {
|
|
|
+ if (!value) return '-'
|
|
|
+ const timeArr = value.split('-')
|
|
|
+ return `${dateFormatter(timeArr[0] * 1000, 'yyyy/MM/dd')}-${dateFormatter(timeArr[1] * 1000, 'yyyy/MM/dd')}`
|
|
|
+ },
|
|
|
+ sortReportFilters (data) {
|
|
|
+ if (data.keysItems && data.keysItems !== '[]') {
|
|
|
+ this.reportFilters.keys = JSON.parse(data.keysItems)
|
|
|
+ }
|
|
|
+ if (data.rangeTime) {
|
|
|
+ this.reportFilters.selectTime = data.rangeTime
|
|
|
+ }
|
|
|
+ if (data.s_rangeTimeExtra) {
|
|
|
+ this.reportFilters.selectTimeExtra = data.s_rangeTimeExtra
|
|
|
+ }
|
|
|
+ if (data.area && data.area !== '{}') {
|
|
|
+ this.reportFilters.area = JSON.parse(data.area)
|
|
|
+ }
|
|
|
+ if (data.industry && data.industry !== '{}') {
|
|
|
+ this.reportFilters.industry = JSON.parse(data.industry)
|
|
|
+ }
|
|
|
+ if (data.buyerclass) {
|
|
|
+ this.reportFilters.buyerclass = data.buyerclass.split(',')
|
|
|
+ }
|
|
|
+ this.$emit('loadedFilters', this.reportFilters)
|
|
|
+ },
|
|
|
+ // 市场概况
|
|
|
+ sortMarketOverview (profile) {
|
|
|
+ if (!profile) return
|
|
|
+ const list = [
|
|
|
+ {
|
|
|
+ label: '项目总数',
|
|
|
+ unit: '个',
|
|
|
+ count: 0,
|
|
|
+ ringRatio: 0
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '项目总金额',
|
|
|
+ unit: '万元',
|
|
|
+ count: 0,
|
|
|
+ ringRatio: 0
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '项目平均金额',
|
|
|
+ unit: '万元',
|
|
|
+ count: 0,
|
|
|
+ ringRatio: 0
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '中标单位数',
|
|
|
+ unit: '家',
|
|
|
+ count: 10628,
|
|
|
+ ringRatio: 0
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '采购单位数',
|
|
|
+ unit: '家',
|
|
|
+ count: 16215,
|
|
|
+ ringRatio: 0
|
|
|
+ }
|
|
|
+ ]
|
|
|
+
|
|
|
+ // 项目总数
|
|
|
+ list[0].count = profile.project_count ? profile.project_count : 0
|
|
|
+ list[0].ringRatio = profile.project_count_ratio ? (profile.project_count_ratio * 100).toFixed(2) : 0
|
|
|
+ // 项目总金额
|
|
|
+ const projectTotalMoney = this.moneyUnit(profile.projctamout ? profile.projctamout : 0)
|
|
|
+ list[1].count = projectTotalMoney.count
|
|
|
+ list[1].unit = projectTotalMoney.unit
|
|
|
+
|
|
|
+ list[1].ringRatio = profile.projctamount_ratio ? (profile.projctamount_ratio * 100).toFixed(2) : 0
|
|
|
+ // 项目平均金额
|
|
|
+ const projectAvgMoney = this.moneyUnit(profile.projectavgmoney ? profile.projectavgmoney : 0)
|
|
|
+ list[2].count = projectAvgMoney.count
|
|
|
+ list[2].unit = projectAvgMoney.unit
|
|
|
+ list[2].ringRatio = profile.projectavgmoney_ratio ? (profile.projectavgmoney_ratio * 100).toFixed(2) : 0
|
|
|
+ // 中标单位数
|
|
|
+ list[3].count = profile.winnercount ? profile.winnercount : 0
|
|
|
+ list[3].ringRatio = profile.winnercount_ratio ? (profile.winnercount_ratio * 100).toFixed(2) : 0
|
|
|
+ // 采购单位数
|
|
|
+ list[4].count = profile.buyercount ? profile.buyercount : 0
|
|
|
+ list[4].ringRatio = profile.buyercount_ratio ? (profile.buyercount_ratio * 100).toFixed(2) : 0
|
|
|
+
|
|
|
+ const totalCount = list.reduce((total, item) => item.count + total, 0)
|
|
|
+
|
|
|
+ if (totalCount) {
|
|
|
+ this.sections.market.overview = list
|
|
|
+ this.showDimensionsOptions('market', 'market-overview')
|
|
|
+ }
|
|
|
+
|
|
|
+ return totalCount
|
|
|
+ },
|
|
|
+ // 时间分布
|
|
|
+ sortTimeScatter (data) {
|
|
|
+ const hasDataM = this.sortTimeScatterData('month', data.month_distribution)
|
|
|
+ const hasDataY = this.sortTimeScatterData('year', data.year_distribution)
|
|
|
+
|
|
|
+ const hasData = hasDataM && hasDataY
|
|
|
+ this.sections.timeScatter.dataAlready = hasData
|
|
|
+ if (hasData) {
|
|
|
+ this.showDimensionsOptions('market', 'time-scatter')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ sortTimeScatterData (type, data) {
|
|
|
+ // columns: ['日期', '项目规模', '环比增长率(%)'],
|
|
|
+ // rows: [
|
|
|
+ // {
|
|
|
+ // 日期: '6月',
|
|
|
+ // 项目规模: 0,
|
|
|
+ // '环比增长率(%)': -99
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // 日期: '7月',
|
|
|
+ // 项目规模: 736325,
|
|
|
+ // '环比增长率(%)': 0
|
|
|
+ // },
|
|
|
+ // ]
|
|
|
+ if (!data) return
|
|
|
+ // 项目数量
|
|
|
+ const mDCount = {
|
|
|
+ columns: ['日期', '项目数量(个)', '项目数量环比'],
|
|
|
+ rows: []
|
|
|
+ }
|
|
|
+ let mDCountTotal = 0
|
|
|
+ if (Array.isArray(data.project_count)) {
|
|
|
+ const field = {
|
|
|
+ [mDCount.columns[0]]: 'minth',
|
|
|
+ [mDCount.columns[1]]: 'value',
|
|
|
+ [mDCount.columns[2]]: 'ratio'
|
|
|
+ }
|
|
|
+ data.project_count.forEach(item => {
|
|
|
+ const row = {}
|
|
|
+ mDCount.columns.forEach(column => {
|
|
|
+ const value = item[field[column]]
|
|
|
+ if (value) {
|
|
|
+ if (field[column] === 'ratio') {
|
|
|
+ row[column] = formatPrice(value * 100) - 0
|
|
|
+ } else {
|
|
|
+ row[column] = value
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ row[column] = null
|
|
|
+ }
|
|
|
+
|
|
|
+ if (typeof value === 'number') {
|
|
|
+ mDCountTotal += value
|
|
|
+ }
|
|
|
+ })
|
|
|
+ mDCount.rows.push(row)
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ if (mDCountTotal || isNaN(mDCountTotal)) {
|
|
|
+ this.$set(this.sections.timeScatter[type], 'count', mDCount)
|
|
|
+ }
|
|
|
+
|
|
|
+ // 项目规模
|
|
|
+ const mDAmount = {
|
|
|
+ columns: ['日期', '项目金额(万元)', '项目金额环比'],
|
|
|
+ rows: []
|
|
|
+ }
|
|
|
+ let mDAmuntTotal = 0
|
|
|
+ if (Array.isArray(data.project_amount)) {
|
|
|
+ const field = {
|
|
|
+ [mDAmount.columns[0]]: 'minth',
|
|
|
+ [mDAmount.columns[1]]: 'value',
|
|
|
+ [mDAmount.columns[2]]: 'ratio'
|
|
|
+ }
|
|
|
+ data.project_amount.forEach(item => {
|
|
|
+ const row = {}
|
|
|
+ mDAmount.columns.forEach(column => {
|
|
|
+ const value = item[field[column]]
|
|
|
+ if (value) {
|
|
|
+ if (field[column] === 'value') {
|
|
|
+ row[column] = formatPrice(value / 10000) - 0
|
|
|
+ } else if (field[column] === 'ratio') {
|
|
|
+ row[column] = formatPrice(value * 100)
|
|
|
+ } else {
|
|
|
+ row[column] = value
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ row[column] = null
|
|
|
+ }
|
|
|
+
|
|
|
+ if (typeof value === 'number') {
|
|
|
+ mDAmuntTotal += value
|
|
|
+ }
|
|
|
+ })
|
|
|
+ mDAmount.rows.push(row)
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ if (mDAmuntTotal || !isNaN(mDAmuntTotal)) {
|
|
|
+ this.$set(this.sections.timeScatter[type], 'amount', mDAmount)
|
|
|
+ }
|
|
|
+
|
|
|
+ const r = !!(mDCountTotal + mDAmuntTotal)
|
|
|
+ const hasOneNaN = isNaN(mDCountTotal) || isNaN(mDAmuntTotal)
|
|
|
+ return hasOneNaN || r
|
|
|
+ },
|
|
|
+ // 项目规模分布
|
|
|
+ sortProjectScatter (data) {
|
|
|
+ // const chartData = {
|
|
|
+ // columns: ['项目规模', '项目总金额占比', '项目总数占比'],
|
|
|
+ // rows: [
|
|
|
+ // {
|
|
|
+ // 项目规模: '≥1亿',
|
|
|
+ // 项目总金额占比: 20,
|
|
|
+ // 项目总数占比: 10
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // 项目规模: '1000万-1亿',
|
|
|
+ // 项目总金额占比: 50,
|
|
|
+ // 项目总数占比: 40
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // 项目规模: '500万-1000万',
|
|
|
+ // 项目总金额占比: 20,
|
|
|
+ // 项目总数占比: 30
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // 项目规模: '100万-500万',
|
|
|
+ // 项目总金额占比: 20,
|
|
|
+ // 项目总数占比: 30
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // }
|
|
|
+
|
|
|
+ const scaleList = data
|
|
|
+ const scaleData = {
|
|
|
+ columns: ['项目规模', '项目总金额占比', '项目总数占比'],
|
|
|
+ rows: []
|
|
|
+ }
|
|
|
+ let total = 0
|
|
|
+
|
|
|
+ if (scaleList && Array.isArray(scaleList)) {
|
|
|
+ const field = {
|
|
|
+ [scaleData.columns[0]]: 'Name',
|
|
|
+ [scaleData.columns[1]]: 'Persent_c',
|
|
|
+ [scaleData.columns[2]]: 'Persent_a'
|
|
|
+ }
|
|
|
+ scaleList.forEach(item => {
|
|
|
+ const row = {}
|
|
|
+ scaleData.columns.forEach(column => {
|
|
|
+ if (field[column] === 'Persent_c' || field[column] === 'Persent_a') {
|
|
|
+ row[column] = (item[field[column]] * 100).toFixed(2)
|
|
|
+ total += (item[field[column]] - 0)
|
|
|
+ } else {
|
|
|
+ row[column] = item[field[column]]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ scaleData.rows.push(row)
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ if (total) {
|
|
|
+ scaleData.rows.reverse()
|
|
|
+ this.$set(this.sections.projectScatter, 'chartData', scaleData)
|
|
|
+ if (this.sections.projectScatter.tableData.length) {
|
|
|
+ this.showDimensionsOptions('market', 'project-scatter')
|
|
|
+ this.sections.projectScatter.dataAlready = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 项目规模Top10
|
|
|
+ sortProjectTop10 (top10List) {
|
|
|
+ if (!Array.isArray(top10List)) return
|
|
|
+
|
|
|
+ this.sections.projectScatter.tableData = top10List.map(top => {
|
|
|
+ let winners = top.winner_s ? top.winner_s.join(',') : ''
|
|
|
+ if (!winners) {
|
|
|
+ winners = []
|
|
|
+ } else {
|
|
|
+ winners = top.winner_s
|
|
|
+ }
|
|
|
+
|
|
|
+ winners = winners.map((item, index) => {
|
|
|
+ return {
|
|
|
+ name: item,
|
|
|
+ id: Array.isArray(top.eidlist) ? top.eidlist[index] : null
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ return {
|
|
|
+ ...top,
|
|
|
+ area: top.area ? top.area : '-',
|
|
|
+ city: top.city ? top.city : '-',
|
|
|
+ sortprice: top.sortprice ? formatPrice(top.sortprice / 10000) : '-',
|
|
|
+ jgtime: top.jgtime ? dateFormatter(top.jgtime * 1000, 'yyyy-MM-dd') : '-',
|
|
|
+ winner_s: winners
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ if (this.sections.projectScatter.chartData) {
|
|
|
+ this.showDimensionsOptions('market', 'project-scatter')
|
|
|
+ this.sections.projectScatter.dataAlready = true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 地区规模分布
|
|
|
+ sortAreaScatter (areaList) {
|
|
|
+ // const chartData = {
|
|
|
+ // columns: ['项目所在地', '项目数量', '项目金额'],
|
|
|
+ // rows: [
|
|
|
+ // {
|
|
|
+ // 项目所在地: '河南',
|
|
|
+ // 项目数量: 2,
|
|
|
+ // 项目金额: 2222
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // 项目所在地: '北京',
|
|
|
+ // 项目数量: 22,
|
|
|
+ // 项目金额: 565666
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // 项目所在地: '浙江',
|
|
|
+ // 项目数量: 22,
|
|
|
+ // 项目金额: 765666
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // }
|
|
|
+
|
|
|
+ const areaChartData = {
|
|
|
+ columns: ['项目所在地', '项目数量'],
|
|
|
+ sColumns: ['项目金额'],
|
|
|
+ rows: []
|
|
|
+ }
|
|
|
+ let total = 0
|
|
|
+
|
|
|
+ if (areaList && Array.isArray(areaList)) {
|
|
|
+ const field = {
|
|
|
+ [areaChartData.columns[0]]: 'area',
|
|
|
+ [areaChartData.columns[1]]: 'total',
|
|
|
+ [areaChartData.sColumns[0]]: 'amount'
|
|
|
+ }
|
|
|
+ areaList.forEach(item => {
|
|
|
+ const row = {}
|
|
|
+ areaChartData.columns.concat(areaChartData.sColumns).forEach(column => {
|
|
|
+ if (field[column] === 'amount') {
|
|
|
+ row[column] = formatPrice(item[field[column]] / 10000) - 0
|
|
|
+ } else {
|
|
|
+ row[column] = item[field[column]]
|
|
|
+ }
|
|
|
+
|
|
|
+ if (field[column] === 'amount' || field[column] === 'total') {
|
|
|
+ total += (item[field[column]] - 0)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ areaChartData.rows.push(row)
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ if (total) {
|
|
|
+ this.$set(this.sections.areaScatter, 'chartData', areaChartData)
|
|
|
+ this.sections.areaScatter.dataAlready = true
|
|
|
+ this.showDimensionsOptions('market', 'area-scatter')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 客户分布
|
|
|
+ sortUserScatter (userList) {
|
|
|
+ if (Array.isArray(userList)) {
|
|
|
+ this.sections.userScatter.list = userList.map(item => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ name: item.buyclass,
|
|
|
+ value: item.total,
|
|
|
+ amount: formatPrice(item.amount / 10000)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (this.sections.userScatter.list.length) {
|
|
|
+ this.showDimensionsOptions('market', 'user-scatter')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 地区分布及客户分布Top3
|
|
|
+ sortAreaUserTop3 (data) {
|
|
|
+ if (data.scaleAreaCountTop || data.scaleAreaAmountTop) {
|
|
|
+ this.sorAreaTop3(data)
|
|
|
+ }
|
|
|
+ if (data.scaleBuyclassCountTop || data.scaleBuyclassAmountTop) {
|
|
|
+ this.sorUserTop3(data)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ sorAreaTop3 (data) {
|
|
|
+ const tableDataCount = {
|
|
|
+ columns: ['序号', '地区:项目数量(个),占比', '前3中标单位:中标数量(个)'], // ,该地区占比
|
|
|
+ rows: []
|
|
|
+ }
|
|
|
+ const tableDataAmount = {
|
|
|
+ columns: ['序号', '地区:项目金额(万元),占比', '前3中标单位:中标金额(万元)'], // ,该地区占比
|
|
|
+ rows: []
|
|
|
+ }
|
|
|
+
|
|
|
+ const scaleAreaCountTop3 = data.scaleAreaCountTop
|
|
|
+ if (Array.isArray(scaleAreaCountTop3)) {
|
|
|
+ scaleAreaCountTop3.forEach((item, index) => {
|
|
|
+ if (Array.isArray(item.winner)) {
|
|
|
+ item.winner.forEach((w, i) => {
|
|
|
+ const row = {
|
|
|
+ index: index + 1,
|
|
|
+ name: item.name,
|
|
|
+ value: item.area_count + '个',
|
|
|
+ percent: item.area_scale ? `${formatPrice(item.area_scale * 100)}%` : '',
|
|
|
+ winner_id: w.id,
|
|
|
+ winner_type: 'winner', // 用于判断采购单位或者中标单位
|
|
|
+ winner_index: i + 1,
|
|
|
+ winner_name: w.winner,
|
|
|
+ winner_value: w.winner_total ? `${w.winner_total}个` : 0,
|
|
|
+ // winner_percent: w.total_scale ? `${formatPrice(w.total_scale * 100)}%` : 0,
|
|
|
+ rowspan: i === 0 ? item.winner.length : 0
|
|
|
+ }
|
|
|
+ tableDataCount.rows.push(row)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ const row = {
|
|
|
+ index: index + 1,
|
|
|
+ name: item.name,
|
|
|
+ value: item.area_count + '个',
|
|
|
+ percent: item.area_scale ? `${formatPrice(item.area_scale * 100)}%` : '',
|
|
|
+ rowspan: 1
|
|
|
+ }
|
|
|
+ tableDataCount.rows.push(row)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ const scaleAreaAmountTop3 = data.scaleAreaAmountTop
|
|
|
+ if (Array.isArray(scaleAreaAmountTop3)) {
|
|
|
+ scaleAreaAmountTop3.forEach((item, index) => {
|
|
|
+ if (Array.isArray(item.winner)) {
|
|
|
+ item.winner.forEach((w, i) => {
|
|
|
+ const row = {
|
|
|
+ index: index + 1,
|
|
|
+ name: item.name,
|
|
|
+ value: formatPrice(item.area_amount / 10000) + '万元',
|
|
|
+ percent: item.area_scale ? `${formatPrice(item.area_scale * 100)}%` : '',
|
|
|
+ winner_id: w.id,
|
|
|
+ winner_type: 'winner',
|
|
|
+ winner_index: i + 1,
|
|
|
+ winner_name: w.winner,
|
|
|
+ winner_value: w.winner_amount ? `${formatPrice(w.winner_amount / 10000)}万元` : '-',
|
|
|
+ // winner_percent: w.amount_scale ? `${formatPrice(w.amount_scale * 100)}%` : 0,
|
|
|
+ rowspan: i === 0 ? item.winner.length : 0
|
|
|
+ }
|
|
|
+ tableDataAmount.rows.push(row)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ const row = {
|
|
|
+ index: index + 1,
|
|
|
+ name: item.name,
|
|
|
+ value: formatPrice(item.area_amount / 10000) + '万元',
|
|
|
+ percent: item.area_scale ? `${formatPrice(item.area_scale * 100)}%` : '',
|
|
|
+ rowspan: 1
|
|
|
+ }
|
|
|
+ tableDataAmount.rows.push(row)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ if (tableDataCount.rows.length) {
|
|
|
+ this.$set(this.sections.areaScatter, 'projectCountTop3', tableDataCount)
|
|
|
+ }
|
|
|
+ if (tableDataAmount.rows.length) {
|
|
|
+ this.$set(this.sections.areaScatter, 'projectAmountTop3', tableDataAmount)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ sorUserTop3 (data) {
|
|
|
+ const tableDataCount = {
|
|
|
+ columns: ['序号', '客户类型:项目数量(个),占比', '前3中标单位:中标数量(个)'], // ,该客户类型占比
|
|
|
+ rows: []
|
|
|
+ }
|
|
|
+ const tableDataAmount = {
|
|
|
+ columns: ['序号', '客户类型:项目金额(万元),占比', '前3中标单位:中标金额(万元)'], // ,该客户类型占比
|
|
|
+ rows: []
|
|
|
+ }
|
|
|
+
|
|
|
+ const countTop3 = data.scaleBuyclassCountTop
|
|
|
+ if (Array.isArray(countTop3)) {
|
|
|
+ countTop3.forEach((item, index) => {
|
|
|
+ if (Array.isArray(item.winner)) {
|
|
|
+ item.winner.forEach((w, i) => {
|
|
|
+ const row = {
|
|
|
+ index: index + 1,
|
|
|
+ name: item.name,
|
|
|
+ value: item.buyclass_count + '个',
|
|
|
+ percent: item.buyclass_scale ? `${formatPrice(item.buyclass_scale * 100)}%` : '',
|
|
|
+ winner_id: w.id,
|
|
|
+ winner_type: 'winner', // 用于判断采购单位或者中标单位
|
|
|
+ winner_index: i + 1,
|
|
|
+ winner_name: w.winner,
|
|
|
+ winner_value: w.winner_total ? `${w.winner_total}个` : 0,
|
|
|
+ // winner_percent: w.total_scale ? `${formatPrice(w.total_scale * 100)}%` : 0,
|
|
|
+ rowspan: i === 0 ? item.winner.length : 0
|
|
|
+ }
|
|
|
+ tableDataCount.rows.push(row)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ const row = {
|
|
|
+ index: index + 1,
|
|
|
+ name: item.name,
|
|
|
+ value: item.area_count + '个',
|
|
|
+ percent: item.buyclass_scale ? `${formatPrice(item.buyclass_scale * 100)}%` : '',
|
|
|
+ rowspan: 1
|
|
|
+ }
|
|
|
+ tableDataCount.rows.push(row)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ const amountTop3 = data.scaleBuyclassAmountTop
|
|
|
+ if (Array.isArray(amountTop3)) {
|
|
|
+ amountTop3.forEach((item, index) => {
|
|
|
+ if (Array.isArray(item.winner)) {
|
|
|
+ item.winner.forEach((w, i) => {
|
|
|
+ const row = {
|
|
|
+ index: index + 1,
|
|
|
+ name: item.name,
|
|
|
+ value: formatPrice(item.buyclass_amount / 10000) + '万元',
|
|
|
+ percent: item.buyclass_scale ? `${formatPrice(item.buyclass_scale * 100)}%` : '',
|
|
|
+ winner_id: w.id,
|
|
|
+ winner_type: 'winner', // 用于判断采购单位或者中标单位
|
|
|
+ winner_index: i + 1,
|
|
|
+ winner_name: w.winner,
|
|
|
+ winner_value: w.winner_amount ? `${formatPrice(w.winner_amount / 10000)}万元` : '-',
|
|
|
+ // winner_percent: w.amount_scale ? `${formatPrice(w.amount_scale * 100)}%` : 0,
|
|
|
+ rowspan: i === 0 ? item.winner.length : 0
|
|
|
+ }
|
|
|
+ tableDataAmount.rows.push(row)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ const row = {
|
|
|
+ index: index + 1,
|
|
|
+ name: item.name,
|
|
|
+ value: formatPrice(item.area_amount / 10000) + '万元',
|
|
|
+ percent: item.buyclass_scale ? `${formatPrice(item.buyclass_scale * 100)}%` : '',
|
|
|
+ rowspan: 1
|
|
|
+ }
|
|
|
+ tableDataAmount.rows.push(row)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ if (tableDataCount.rows.length) {
|
|
|
+ this.$set(this.sections.userScatter, 'projectCountTop3', tableDataCount)
|
|
|
+ }
|
|
|
+ if (tableDataAmount.rows.length) {
|
|
|
+ this.$set(this.sections.userScatter, 'projectAmountTop3', tableDataAmount)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 细分市场
|
|
|
+ sortMarketRefineData (data) {
|
|
|
+ const refineCount = {
|
|
|
+ columns: ['行业', '项目数量'],
|
|
|
+ rows: []
|
|
|
+ }
|
|
|
+ const refineAmount = {
|
|
|
+ columns: ['行业', '项目金额'],
|
|
|
+ rows: []
|
|
|
+ }
|
|
|
+ let total = 0
|
|
|
+ const refineAll = data.scaleRefineAll
|
|
|
+ if (Array.isArray(refineAll)) {
|
|
|
+ const field = {
|
|
|
+ 行业: 'name',
|
|
|
+ 项目数量: 'total',
|
|
|
+ 项目金额: 'amount'
|
|
|
+ }
|
|
|
+ refineAll.forEach(item => {
|
|
|
+ const row = {}
|
|
|
+ for (const key in field) {
|
|
|
+ if (field[key] === 'amount') {
|
|
|
+ row[key] = formatPrice(item[field[key]] / 10000)
|
|
|
+ } else {
|
|
|
+ row[key] = item[field[key]]
|
|
|
+ }
|
|
|
+
|
|
|
+ if (field[key] === 'total' || field[key] === 'amount') {
|
|
|
+ total += (item[field[key]] - 0)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ refineCount.rows.push(row)
|
|
|
+ refineAmount.rows.push(row)
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ if (total) {
|
|
|
+ this.$set(this.sections.market.refine, 'projectCountData', refineCount)
|
|
|
+ this.$set(this.sections.market.refine, 'projectAmountData', refineAmount)
|
|
|
+
|
|
|
+ this.sections.market.refine.dataAlready = true
|
|
|
+ this.showDimensionsOptions('market', 'market-refine')
|
|
|
+ }
|
|
|
+
|
|
|
+ this.sortRefineTop3(data)
|
|
|
+ },
|
|
|
+ sortRefineTop3 (data) {
|
|
|
+ const tableDataCount = {
|
|
|
+ columns: ['序号', '细分市场:项目数量(个)', '前3中标单位:中标数量(个)'], // ,占比,该细分市场占比
|
|
|
+ rows: []
|
|
|
+ }
|
|
|
+ const tableDataAmount = {
|
|
|
+ columns: ['序号', '细分市场:项目金额(万元)', '前3中标单位:中标金额(万元)'], // ,占比 ,该细分市场占比
|
|
|
+ rows: []
|
|
|
+ }
|
|
|
+
|
|
|
+ const countTop3 = data.scaleRefineTotalTop
|
|
|
+ if (Array.isArray(countTop3)) {
|
|
|
+ countTop3.forEach((item, index) => {
|
|
|
+ if (Array.isArray(item.topList)) {
|
|
|
+ item.topList.forEach((w, i) => {
|
|
|
+ const row = {
|
|
|
+ index: index + 1,
|
|
|
+ name: item.name,
|
|
|
+ value: item.value + '个',
|
|
|
+ // percent: item.prop ? `${formatPrice(item.prop * 100)}%` : '',
|
|
|
+ winner_id: w.id,
|
|
|
+ winner_type: 'winner',
|
|
|
+ winner_index: i + 1,
|
|
|
+ winner_name: w.name,
|
|
|
+ winner_value: w.value ? `${w.value}个` : 0,
|
|
|
+ // winner_percent: w.prop ? `${formatPrice(w.prop * 100)}%` : 0,
|
|
|
+ rowspan: i === 0 ? item.topList.length : 0
|
|
|
+ }
|
|
|
+ tableDataCount.rows.push(row)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ const row = {
|
|
|
+ index: index + 1,
|
|
|
+ name: item.name,
|
|
|
+ value: item.value + '个',
|
|
|
+ // percent: item.prop ? `${formatPrice(item.prop * 100)}%` : '',
|
|
|
+ rowspan: 1
|
|
|
+ }
|
|
|
+ tableDataCount.rows.push(row)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ const amountTop3 = data.scaleRefineAmountTop
|
|
|
+ if (Array.isArray(amountTop3)) {
|
|
|
+ amountTop3.forEach((item, index) => {
|
|
|
+ if (Array.isArray(item.topList)) {
|
|
|
+ item.topList.forEach((w, i) => {
|
|
|
+ const row = {
|
|
|
+ index: index + 1,
|
|
|
+ name: item.name,
|
|
|
+ value: formatPrice(item.value / 10000) + '万元',
|
|
|
+ // percent: item.prop ? `${formatPrice(item.prop * 100)}%` : '',
|
|
|
+ winner_id: w.id,
|
|
|
+ winner_type: 'winner',
|
|
|
+ winner_index: i + 1,
|
|
|
+ winner_name: w.name,
|
|
|
+ winner_value: w.value ? `${formatPrice(w.value / 10000)}万元` : '-',
|
|
|
+ // winner_percent: w.prop ? `${formatPrice(w.prop * 100)}%` : 0,
|
|
|
+ rowspan: i === 0 ? item.topList.length : 0
|
|
|
+ }
|
|
|
+ tableDataAmount.rows.push(row)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ const row = {
|
|
|
+ index: index + 1,
|
|
|
+ name: item.name,
|
|
|
+ value: formatPrice(item.value / 10000) + '万元',
|
|
|
+ // percent: item.prop ? `${formatPrice(item.prop * 100)}%` : '',
|
|
|
+ rowspan: 1
|
|
|
+ }
|
|
|
+ tableDataAmount.rows.push(row)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ if (tableDataCount.rows.length) {
|
|
|
+ this.$set(this.sections.market.refine, 'projectCountTop3', tableDataCount)
|
|
|
+ }
|
|
|
+ if (tableDataAmount.rows.length) {
|
|
|
+ this.$set(this.sections.market.refine, 'projectAmountTop3', tableDataAmount)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 采购单位
|
|
|
+ sortBuyerclassData (data) {
|
|
|
+ const buyerclassChartData = {
|
|
|
+ columns: ['金额区间', '采购总金额占比', '采购单位数量占比'],
|
|
|
+ rows: []
|
|
|
+ }
|
|
|
+ let total = 0
|
|
|
+
|
|
|
+ const buyerclassList = data.buyer_time_distribution
|
|
|
+ if (Array.isArray(buyerclassList)) {
|
|
|
+ const field = {
|
|
|
+ [buyerclassChartData.columns[0]]: 'key',
|
|
|
+ [buyerclassChartData.columns[1]]: 'total_amount',
|
|
|
+ [buyerclassChartData.columns[2]]: 'total_number'
|
|
|
+ }
|
|
|
+ buyerclassList.forEach(item => {
|
|
|
+ const row = {}
|
|
|
+ buyerclassChartData.columns.forEach(column => {
|
|
|
+ if (field[column] === 'total_amount' || field[column] === 'total_number') {
|
|
|
+ row[column] = (item[field[column]] * 100).toFixed(2)
|
|
|
+ total += (item[field[column]] - 0)
|
|
|
+ } else {
|
|
|
+ row[column] = item[field[column]]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ buyerclassChartData.rows.push(row)
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ if (total) {
|
|
|
+ buyerclassChartData.rows.reverse()
|
|
|
+ this.$set(this.sections.buyerclass, 'chartData', buyerclassChartData)
|
|
|
+
|
|
|
+ this.sections.buyerclass.dataAlready = true
|
|
|
+ this.showDimensionsOptions('buyer', 'buyerclass-scatter')
|
|
|
+ }
|
|
|
+
|
|
|
+ this.sortBuyerclassTableData(data)
|
|
|
+ },
|
|
|
+ sortBuyerclassTableData (data) {
|
|
|
+ const dataCount = {
|
|
|
+ columns: ['序号', '采购单位:采购数量(个)', '前3中标单位:中标数量(个)'], // ,占比 | ,占该采购单位
|
|
|
+ rows: []
|
|
|
+ }
|
|
|
+ const dataAmount = {
|
|
|
+ columns: ['序号', '采购单位:采购金额(万元)', '前3中标单位:中标金额(万元)'], // ,占比 | ,占该采购单位
|
|
|
+ rows: []
|
|
|
+ }
|
|
|
+
|
|
|
+ const countTop3 = data.buyer_count_top3
|
|
|
+ if (Array.isArray(countTop3)) {
|
|
|
+ countTop3.forEach((item, index) => {
|
|
|
+ if (Array.isArray(item.winnertop3)) {
|
|
|
+ item.winnertop3.forEach((w, i) => {
|
|
|
+ const row = {
|
|
|
+ index: index + 1,
|
|
|
+ name: item.name,
|
|
|
+ name_type: 'buyer',
|
|
|
+ name_id: item.name,
|
|
|
+ value: item.number + '个',
|
|
|
+ // percent: item.accounted ? `${formatPrice(item.accounted * 100)}%` : '',
|
|
|
+ winner_id: w.id,
|
|
|
+ winner_type: 'winner',
|
|
|
+ winner_index: i + 1,
|
|
|
+ winner_name: w.name,
|
|
|
+ winner_value: w.number ? `${w.number}个` : 0,
|
|
|
+ // winner_percent: w.accounted ? `${formatPrice(w.accounted * 100)}%` : 0,
|
|
|
+ rowspan: i === 0 ? item.winnertop3.length : 0
|
|
|
+ }
|
|
|
+ dataCount.rows.push(row)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ const row = {
|
|
|
+ index: index + 1,
|
|
|
+ name: item.name,
|
|
|
+ name_type: 'buyer',
|
|
|
+ name_id: item.name,
|
|
|
+ value: item.number + '个',
|
|
|
+ // percent: item.accounted ? `${formatPrice(item.accounted * 100)}%` : '',
|
|
|
+ rowspan: 1
|
|
|
+ }
|
|
|
+ dataCount.rows.push(row)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ const amountTop3 = data.buyer_amount_top3
|
|
|
+ if (Array.isArray(amountTop3)) {
|
|
|
+ amountTop3.forEach((item, index) => {
|
|
|
+ if (Array.isArray(item.winnertop3)) {
|
|
|
+ item.winnertop3.forEach((w, i) => {
|
|
|
+ const row = {
|
|
|
+ index: index + 1,
|
|
|
+ name: item.name,
|
|
|
+ name_type: 'buyer',
|
|
|
+ name_id: item.name,
|
|
|
+ value: formatPrice(item.amount / 10000) + '万元',
|
|
|
+ // percent: item.accounted ? `${formatPrice(item.accounted * 100)}%` : '',
|
|
|
+ winner_id: w.id,
|
|
|
+ winner_type: 'winner',
|
|
|
+ winner_index: i + 1,
|
|
|
+ winner_name: w.name,
|
|
|
+ winner_value: w.amount ? `${formatPrice(w.amount / 10000)}万元` : '-',
|
|
|
+ // winner_percent: w.accounted ? `${formatPrice(w.accounted * 100)}%` : 0,
|
|
|
+ rowspan: i === 0 ? item.winnertop3.length : 0
|
|
|
+ }
|
|
|
+ dataAmount.rows.push(row)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ const row = {
|
|
|
+ index: index + 1,
|
|
|
+ name: item.name,
|
|
|
+ name_type: 'buyer',
|
|
|
+ name_id: item.name,
|
|
|
+ value: formatPrice(item.amount / 10000) + '万元',
|
|
|
+ // percent: item.accounted ? `${formatPrice(item.accounted * 100)}%` : '',
|
|
|
+ rowspan: 1
|
|
|
+ }
|
|
|
+ dataAmount.rows.push(row)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (dataCount.rows.length) {
|
|
|
+ this.$set(this.sections.buyerclass, 'projectCountTop3', dataCount)
|
|
|
+ this.showDimensionsOptions('buyer', 'buyerclass-count-top3')
|
|
|
+ }
|
|
|
+ if (dataAmount.rows.length) {
|
|
|
+ this.$set(this.sections.buyerclass, 'projectAmountTop3', dataAmount)
|
|
|
+ this.showDimensionsOptions('buyer', 'buyerclass-amount-top3')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 中标单位
|
|
|
+ sortWinnerData (data) {
|
|
|
+ const chartData = {
|
|
|
+ columns: ['金额区间', '中标总金额占比', '中标单位数量占比'],
|
|
|
+ rows: []
|
|
|
+ }
|
|
|
+ let total = 0
|
|
|
+
|
|
|
+ const chartLIst = data.winner_time_distribution
|
|
|
+ if (Array.isArray(chartLIst)) {
|
|
|
+ const field = {
|
|
|
+ [chartData.columns[0]]: 'key',
|
|
|
+ [chartData.columns[1]]: 'total_amount',
|
|
|
+ [chartData.columns[2]]: 'total_number'
|
|
|
+ }
|
|
|
+ chartLIst.forEach(item => {
|
|
|
+ const row = {}
|
|
|
+ chartData.columns.forEach(column => {
|
|
|
+ if (field[column] === 'total_amount' || field[column] === 'total_number') {
|
|
|
+ row[column] = (item[field[column]] * 100).toFixed(2)
|
|
|
+ total += (item[field[column]] - 0)
|
|
|
+ } else {
|
|
|
+ row[column] = item[field[column]]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ chartData.rows.push(row)
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ if (total) {
|
|
|
+ chartData.rows.reverse()
|
|
|
+ this.$set(this.sections.winner, 'chartData', chartData)
|
|
|
+
|
|
|
+ this.sections.winner.dataAlready = true
|
|
|
+ this.showDimensionsOptions('winner', 'winner-scatter')
|
|
|
+ }
|
|
|
+
|
|
|
+ this.sortWinnerTableData(data)
|
|
|
+ },
|
|
|
+ sortWinnerTableData (data) {
|
|
|
+ const dataCount = {
|
|
|
+ columns: ['序号', '中标单位:中标数量(个)', '前3采购单位:采购数量(个)'], // ,占比 | ,占该中标单位
|
|
|
+ rows: []
|
|
|
+ }
|
|
|
+ const dataAmount = {
|
|
|
+ columns: ['序号', '中标单位:中标金额(万元)', '前3采购单位:采购金额(万元)'], // ,占比 | ,占该中标单位
|
|
|
+ rows: []
|
|
|
+ }
|
|
|
+
|
|
|
+ const countTop3 = data.winner_count_top3
|
|
|
+ if (Array.isArray(countTop3)) {
|
|
|
+ countTop3.forEach((item, index) => {
|
|
|
+ if (Array.isArray(item.buyertop3)) {
|
|
|
+ item.buyertop3.forEach((w, i) => {
|
|
|
+ const row = {
|
|
|
+ index: index + 1,
|
|
|
+ name: item.name,
|
|
|
+ name_type: 'winner',
|
|
|
+ name_id: item.id,
|
|
|
+ value: item.number + '个',
|
|
|
+ // percent: item.accounted ? `${formatPrice(item.accounted * 100)}%` : '',
|
|
|
+ winner_id: w.name,
|
|
|
+ winner_type: 'buyer',
|
|
|
+ winner_index: i + 1,
|
|
|
+ winner_name: w.name,
|
|
|
+ winner_value: w.number ? `${w.number}个` : 0,
|
|
|
+ // winner_percent: w.accounted ? `${formatPrice(w.accounted * 100)}%` : 0,
|
|
|
+ rowspan: i === 0 ? item.buyertop3.length : 0
|
|
|
+ }
|
|
|
+ dataCount.rows.push(row)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ const row = {
|
|
|
+ index: index + 1,
|
|
|
+ name: item.name,
|
|
|
+ value: item.number + '个',
|
|
|
+ name_type: 'winner',
|
|
|
+ name_id: item.id,
|
|
|
+ // percent: item.accounted ? `${formatPrice(item.accounted * 100)}%` : '',
|
|
|
+ rowspan: 1
|
|
|
+ }
|
|
|
+ dataCount.rows.push(row)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ const amountTop3 = data.winner_amount_top3
|
|
|
+ if (Array.isArray(amountTop3)) {
|
|
|
+ amountTop3.forEach((item, index) => {
|
|
|
+ if (Array.isArray(item.buyertop3)) {
|
|
|
+ item.buyertop3.forEach((w, i) => {
|
|
|
+ const row = {
|
|
|
+ index: index + 1,
|
|
|
+ name: item.name,
|
|
|
+ name_type: 'winner',
|
|
|
+ name_id: item.id,
|
|
|
+ value: formatPrice(item.amount / 10000) + '万元',
|
|
|
+ // percent: formatPrice(item.accounted * 100) + '%',
|
|
|
+ winner_id: w.name,
|
|
|
+ winner_type: 'buyer',
|
|
|
+ winner_index: i + 1,
|
|
|
+ winner_name: w.name,
|
|
|
+ winner_value: w.amount ? `${formatPrice(w.amount / 10000)}万元` : '-',
|
|
|
+ // winner_percent: w.accounted ? `${formatPrice(w.accounted * 100)}%` : 0,
|
|
|
+ rowspan: i === 0 ? item.buyertop3.length : 0
|
|
|
+ }
|
|
|
+ dataAmount.rows.push(row)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ const row = {
|
|
|
+ index: index + 1,
|
|
|
+ name: item.name,
|
|
|
+ name_type: 'winner',
|
|
|
+ name_id: item.id,
|
|
|
+ value: formatPrice(item.amount / 10000) + '万元',
|
|
|
+ // percent: formatPrice(item.accounted * 100) + '%',
|
|
|
+ rowspan: 1
|
|
|
+ }
|
|
|
+ dataAmount.rows.push(row)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ if (dataCount.rows.length) {
|
|
|
+ this.$set(this.sections.winner, 'projectCountTop3', dataCount)
|
|
|
+ this.showDimensionsOptions('winner', 'winner-count-top3')
|
|
|
+ }
|
|
|
+ if (dataAmount.rows.length) {
|
|
|
+ this.$set(this.sections.winner, 'projectAmountTop3', dataAmount)
|
|
|
+ this.showDimensionsOptions('winner', 'winner-amount-top3')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ showDimensionsOptions (module, anchor) {
|
|
|
+ this.dimensionsOptions[module].find(item => {
|
|
|
+ if (item.anchor === anchor) {
|
|
|
+ item.show = true
|
|
|
+ }
|
|
|
+ return item.anchor === 'anchor'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ dropDownClick (item) {
|
|
|
+ if (!item.show) return
|
|
|
+ const anchor = item.anchor
|
|
|
+ const offset = $('.' + anchor).offset()
|
|
|
+ const headerH = 64
|
|
|
+ if (offset) {
|
|
|
+ $('body,html').animate({ scrollTop: offset.top - headerH - 64 })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ moneyUnit (...args) {
|
|
|
+ const m = moneyUnit(...args)
|
|
|
+ let unit = String(m).match(/[\u4e00-\u9fa5]/g)
|
|
|
+ if (unit && Array.isArray(unit)) {
|
|
|
+ unit = unit.join('')
|
|
|
+ } else {
|
|
|
+ unit = ''
|
|
|
+ }
|
|
|
+ let count = ''
|
|
|
+ if (unit) {
|
|
|
+ count = m.replace(unit, '') - 0
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ unit,
|
|
|
+ count
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+<style lang="scss">
|
|
|
+.report-dropdown-menu {
|
|
|
+ border-color: $color-text--highlight;
|
|
|
+ min-width: 100px;
|
|
|
+ .el-dropdown-menu__item {
|
|
|
+ padding-left: 0;
|
|
|
+ padding-right: 0;
|
|
|
+ text-align: center;
|
|
|
+ white-space: nowrap;
|
|
|
+ &:hover {
|
|
|
+ color: $color-text--highlight;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|
|
|
+<style lang="scss" scoped>
|
|
|
+::v-deep {
|
|
|
+ .el-button {
|
|
|
+ border-radius: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .cursor {
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+
|
|
|
+ .market-time-scatter {
|
|
|
+ display: inline-block;
|
|
|
+ // border: 1px dashed #000;
|
|
|
+ }
|
|
|
+
|
|
|
+ // reset-ele-table
|
|
|
+ .ar-table {
|
|
|
+ margin: 20px 0;
|
|
|
+ .ar-table-title {
|
|
|
+ padding: 10px 0;
|
|
|
+ font-size: 16px;
|
|
|
+ color: #1D1D1D;
|
|
|
+ line-height: 24px;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .ar-table-thead {
|
|
|
+ th {
|
|
|
+ background-color: #F9FAFB;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #686868;
|
|
|
+ line-height: 22px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .ar-table-row {
|
|
|
+ font-size: 14px;
|
|
|
+ color: #1d1d1d;
|
|
|
+ line-height: 22px;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 表格首页索引
|
|
|
+ .table-index-rect {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ margin: 0 auto;
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+ color: #fff;
|
|
|
+ font-size: 14px;
|
|
|
+ border-radius: 2px;
|
|
|
+ &.red {
|
|
|
+ background-color: #FF3A20;
|
|
|
+ }
|
|
|
+ &.orange {
|
|
|
+ background-color: #FF9F3F;
|
|
|
+ }
|
|
|
+ &.soft-orange {
|
|
|
+ background-color: #EED08C;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .j-tag {
|
|
|
+ padding: 2px 8px;
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 22px;
|
|
|
+ border-radius: 4px;
|
|
|
+ &:not(:last-of-type) {
|
|
|
+ margin-right: 6px;
|
|
|
+ }
|
|
|
+ &.tag-lightblue {
|
|
|
+ color: #2CB7CA;
|
|
|
+ background-color: rgba(44, 183, 202, 0.08);
|
|
|
+ }
|
|
|
+ &.tag-orange {
|
|
|
+ color: #F56500;
|
|
|
+ background-color: rgba(255, 159, 63, 0.08);
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.el-loading-parent--relative {
|
|
|
+ min-height: 300px;
|
|
|
+}
|
|
|
+
|
|
|
+.pd-lr20 {
|
|
|
+ padding: 0 20px;
|
|
|
+}
|
|
|
+
|
|
|
+i.el-icon-caret-bottom {
|
|
|
+ color: #686868;
|
|
|
+ &.highlight {
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.analysis-result-anchors {
|
|
|
+ padding: 20px;
|
|
|
+ height: 120px;
|
|
|
+ border-radius: 4px;
|
|
|
+}
|
|
|
+
|
|
|
+.analysis-wrap {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ padding: 6px 0;
|
|
|
+ color: #686868;
|
|
|
+ line-height: 22px;
|
|
|
+ .analysis-label {
|
|
|
+ font-size: 14px;
|
|
|
+ max-width: 130px;
|
|
|
+ }
|
|
|
+ .analysis-content {
|
|
|
+ margin-left: 20px;
|
|
|
+ font-size: 12px;
|
|
|
+ .limit-time {
|
|
|
+ color: #1d1d1d;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.analysis-result-section {
|
|
|
+ position: relative;
|
|
|
+ border-radius: 4px;
|
|
|
+ .analysis-result-title {
|
|
|
+ position: relative;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ height: 52px;
|
|
|
+ font-size: 18px;
|
|
|
+ color: #1D1D1D;
|
|
|
+ border-bottom: 1px solid #ECECEC;
|
|
|
+ &::before {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ left: 0;
|
|
|
+ width: 3px;
|
|
|
+ height: 24px;
|
|
|
+ background-color: $color-text--highlight;
|
|
|
+ border-radius: 2px;
|
|
|
+ transform: translateY(-50%);
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.sub-section {
|
|
|
+ padding: 20px;
|
|
|
+ .sub-section-header {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 20px 0;
|
|
|
+ .sub-section-title {
|
|
|
+ font-size: 16px;
|
|
|
+ color: #1D1D1D;
|
|
|
+ line-height: 24px;
|
|
|
+ }
|
|
|
+ .sub-section-action {
|
|
|
+ display: flex;
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 22px;
|
|
|
+ .s-a-item {
|
|
|
+ padding: 6px 16px;
|
|
|
+ color: #1D1D1D;
|
|
|
+ border: 1px solid #e0e0e0;
|
|
|
+ cursor: pointer;
|
|
|
+ &.active {
|
|
|
+ color: #fff;
|
|
|
+ border-color: #2CB7CA;
|
|
|
+ background-color: #2CB7CA;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.analysis-dimensions {
|
|
|
+ .dimensions-options {
|
|
|
+ position: relative;
|
|
|
+ padding: 4px 14px;
|
|
|
+ color: #1D1D1D;
|
|
|
+ border: 1px solid #E0E0E0;
|
|
|
+ &:not(:last-of-type) {
|
|
|
+ border-right: none;
|
|
|
+ }
|
|
|
+ &:hover,
|
|
|
+ &.highlight {
|
|
|
+ color: #fff;
|
|
|
+ background-color: #2CB7CA;
|
|
|
+ i {
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ &:first-of-child {
|
|
|
+ border-radius: 0px 2px 2px 0px;
|
|
|
+ }
|
|
|
+ &:last-of-child {
|
|
|
+ border-radius: 2px 0px 0px 2px;
|
|
|
+ }
|
|
|
+ &:not(:first-of-child) {
|
|
|
+ margin-left: -1px
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.dim-fixed {
|
|
|
+ left: calc(50% + 100px);
|
|
|
+ transform: translateX(-50%);
|
|
|
+ width: 1000px;
|
|
|
+ padding: 16px;
|
|
|
+ background-color: #fff;
|
|
|
+ box-shadow: 0px 4px 16px 1px rgba(0, 0, 0, 0.06);
|
|
|
+}
|
|
|
+</style>
|