Commit 872bec7b authored by 乐宝呗666's avatar 乐宝呗666

修改饼图点击控制

parent 324c721d
import { service, request, serviceForMock, requestForMock, mock } from './service'
import { request } from './service'
// 用户端客户行业分布
export function getCustomerByCustomerAttribute () {
return request({
url: '/tp/customerInformation/getCustomerByCustomerAttribute',
method: 'get'
})
}
// 用户端客户地区分布
export function getCustomerByProvince () {
return request({
url: '/tp/customerInformation/getCustomerByProvince',
method: 'get'
})
}
// 获取客户图标信息
export function GetClientList () {
return request({
......
......@@ -14,7 +14,7 @@ export default {
chart: null
}
},
props: ['message', 'idstr'],
props: ['message', 'idstr', 'noDrill'],
mounted () {
this.drawLine()
},
......@@ -77,6 +77,7 @@ export default {
},
eventList () {
const vm = this
if (vm.noDrill) { return false }
vm.chart.off('click')
vm.chart.on('click', function (params) {
vm.isShowBack = true
......
......@@ -69,7 +69,7 @@
</div>
<div class="flex-1">
<div class="title">商机类型</div>
<pieChart :message="bussionType" idstr="bussionType" class="heightCut44"></pieChart>
<pieChart :message="bussionType" :noDrill="true" idstr="bussionType" class="heightCut44"></pieChart>
</div>
</div>
<div class="flex-1">
......@@ -163,6 +163,9 @@ export default {
// 行业分布
async getDistribution () {
const _data = await API_BUSSINESS.getDistribution({ industry: this.industry || null })
if (!_data.data.data.length) {
return false
}
const _distribute = {
legend: _data.data.legend,
data: _data.data.data.map(item => {
......@@ -191,6 +194,9 @@ export default {
// 产品类型分析
async getProductType () {
const _data = await API_BUSSINESS.getProductType({ type: this.productType || null })
if (!_data.data.data.length) {
return false
}
const _typeAnalysis = {
legend: _data.data.legend,
data: _data.data.data.map(item => {
......
......@@ -10,7 +10,7 @@
</el-option>
</el-select>
</div>
<pieChart :message="dataList" idstr="serviceAnalysis" class="heightCut68"></pieChart>
<pieChart :message="dataList" :noDrill="true" idstr="serviceAnalysis" class="heightCut68"></pieChart>
</div>
</template>
......
......@@ -47,7 +47,7 @@
</div>
<div class="boxHeight-3 mt-2">
<div class="title">行业分布</div>
<pieChart :message="typeDistribute" idstr="customTypeDistribute" class="heightCut44"></pieChart>
<pieChart :message="typeDistribute" :noDrill="true" idstr="customTypeDistribute" class="heightCut44"></pieChart>
</div>
<div class="boxHeight-3 mt-2">
<div class="title">地区分布</div>
......@@ -238,7 +238,7 @@ export default {
clientData: {}, // 客户数据
clientObj: {}, // 客户数据
typeDistribute: {}, // 业务分布
customDistribute: {}, // 客户分布
customDistribute: {}, // 地区分布
clientAnalysis: {}, // 客户分析
input: '',
state: '',
......@@ -255,8 +255,29 @@ export default {
mounted () {
this.getClientList()
this.GetCustomerInfo()
this.getCustomerByProvince()
this.getDistribution()
},
methods: {
// 行业分布
async getDistribution () {
const _data = await API_CLIENT.getCustomerByCustomerAttribute()
const _distribute = {
legend: _data.data.legend,
data: _data.data.data.map(item => {
return {
name: item.name,
value: Number(item.number)
}
})
}
this.typeDistribute = _distribute
},
// 客户地区分布
async getCustomerByProvince () {
const _data = await API_CLIENT.getCustomerByProvince()
this.customDistribute = _data.data
},
// 默认展示公司信息
GetCustomerInfo () {
API_CLIENT.CustomerInfo().then(res => {
......@@ -286,25 +307,25 @@ export default {
this.clientData = res
this.clientObj = this.clientData.data
// 行业分布
const arg = this.clientObj.status
const title = []
const da = []
arg.forEach(element => {
title.push(element.status)
var jso = { name: element.status, value: element.num }
da.push(jso)
})
this.typeDistribute = { legend: title, data: da }
// const arg = this.clientObj.status
// const title = []
// const da = []
// arg.forEach(element => {
// title.push(element.status)
// var jso = { name: element.status, value: element.num }
// da.push(jso)
// })
// this.typeDistribute = { legend: title, data: da }
// 客户地区分布
const argdis = this.clientObj.area
const titdis = []
const dadis = []
argdis.forEach(e => {
titdis.push(e.area)
var dis = { name: e.area, value: e.num }
dadis.push(dis)
})
this.customDistribute = { xAxis: titdis, data: dadis }
// const argdis = this.clientObj.area
// const titdis = []
// const dadis = []
// argdis.forEach(e => {
// titdis.push(e.area)
// var dis = { name: e.area, value: e.num }
// dadis.push(dis)
// })
// this.customDistribute = { xAxis: titdis, data: dadis }
// 客户合同分析
const legend = this.clientObj.analysis.title
const seriesData = this.clientObj.analysis.data
......@@ -322,7 +343,6 @@ export default {
}
_data.push(_obj)
}
console.log(_data)
this.clientAnalysis = {
legend: legend,
xAxis: xAxis,
......
......@@ -18,7 +18,7 @@
</el-option>
</el-select>
</div>
<pieChart :message="dataList" idstr="agingAnalysis" class="heightCut68"></pieChart>
<pieChart :message="dataList" :noDrill="true" idstr="agingAnalysis" class="heightCut68"></pieChart>
</div>
</template>
......
......@@ -18,7 +18,7 @@
</el-option>
</el-select>
</div>
<pieChart :message="dataList" idstr="contractAmount" class="heightCut68"></pieChart>
<pieChart :message="dataList" :noDrill="true" idstr="contractAmount" class="heightCut68"></pieChart>
</div>
</template>
......
......@@ -34,7 +34,7 @@
<span class="tab-button" @click="distributeActive=5" :class="{'is-active':distributeActive=== 5 }">司龄</span>
</div>
</div>
<pieChart :message="jobDistribution" idstr="jobDistribution" class="jobDistribution heightCut42"></pieChart>
<pieChart :message="jobDistribution" :noDrill="true" idstr="jobDistribution" class="jobDistribution heightCut42"></pieChart>
</div>
</div>
<div class="boxHeight-3 mt-2">
......
......@@ -6,7 +6,7 @@
<label>{{titleList[type]}}</label>
<span @click="goBack">&lt; 返回</span>
</div>
<div class="news-content" v-if="type===0 ||type===3|| type===4|| type===5 ">
<div class="news-content" v-if="type===0 ||type===2|| type===3|| type===4 ">
<h3>{{contentData.name}}</h3>
<div v-html="contentData.content"></div>
</div>
......@@ -46,11 +46,11 @@ export default {
this.getIntroductionById()
} else if (this.type === 1) {
this.getCertificationList()
} else if (this.type === 3) {
} else if (this.type === 2) {
this.getMainBusinessById()
} else if (this.type === 4) {
} else if (this.type === 3) {
this.getGloryById()
} else if (this.type === 5) {
} else if (this.type === 4) {
this.getCultureById()
}
},
......
......@@ -3,7 +3,7 @@
<div class="title">全国</div>
<div class="content d-flex">
<div class="flex-1">
<pieChart :message="itemNationWide" idstr="itemNationWide" class="heightCut44"></pieChart>
<pieChart :message="itemNationWide" :noDrill="true" idstr="itemNationWide" class="heightCut44"></pieChart>
<p v-if="type=='4'">共计客户 <strong>{{message.allCustomerNumber}}</strong></p>
<p v-if="type=='3'">共计商机 <strong>{{message.allOpportunitiesNumber}}</strong></p>
<p v-if="type=='1'">共计项目 <strong>{{message.allProjectNumber}}</strong></p>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment