Commit 986cef4d authored by 乐宝呗666's avatar 乐宝呗666

修改bug

parent c803917b
...@@ -87,6 +87,15 @@ export function getCashFlowYear (params) { ...@@ -87,6 +87,15 @@ export function getCashFlowYear (params) {
params params
}) })
} }
// 现金流组织机构
export function getCashFlowOrg (params) {
return request({
url: '/tp/operate/getCashFlowOrg',
method: 'get',
params
})
}
// 获取现金流图表数据 // 获取现金流图表数据
export function getCashFlow (params) { export function getCashFlow (params) {
return request({ return request({
......
...@@ -2,6 +2,7 @@ import axios from 'axios' ...@@ -2,6 +2,7 @@ import axios from 'axios'
import Adapter from 'axios-mock-adapter' import Adapter from 'axios-mock-adapter'
import { get } from 'lodash' import { get } from 'lodash'
import util from '@/libs/util' import util from '@/libs/util'
// import { Message, Loading } from 'element-ui'
import { Message } from 'element-ui' import { Message } from 'element-ui'
// import store from '../../store/index' // import store from '../../store/index'
// import { errorLog, errorCreate } from './tools' // import { errorLog, errorCreate } from './tools'
...@@ -17,10 +18,18 @@ function createService () { ...@@ -17,10 +18,18 @@ function createService () {
// withCredentials: true, // send cookies when cross-domain requests // withCredentials: true, // send cookies when cross-domain requests
timeout: 160000 // request timeout timeout: 160000 // request timeout
}) })
// var loading = null
// var needLoadingRequestCount = 0
// 请求拦截 // 请求拦截
service.interceptors.request.use( service.interceptors.request.use(
// config => config,
config => { config => {
// needLoadingRequestCount++
// loading = Loading.service({
// lock: true,
// text: 'Loading',
// spinner: 'el-icon-loading',
// background: 'rgba(0, 0, 0, 0.7)'
// })
const token = sessionStorage.getItem('token') const token = sessionStorage.getItem('token')
if (token) { if (token) {
config.headers.Authorization = token config.headers.Authorization = token
...@@ -28,6 +37,8 @@ function createService () { ...@@ -28,6 +37,8 @@ function createService () {
return config return config
}, },
error => { error => {
// needLoadingRequestCount--
// if (needLoadingRequestCount === 0) loading.close()
// 发送失败 // 发送失败
return Promise.reject(error) return Promise.reject(error)
} }
...@@ -35,6 +46,8 @@ function createService () { ...@@ -35,6 +46,8 @@ function createService () {
// 响应拦截 // 响应拦截
service.interceptors.response.use( service.interceptors.response.use(
response => { response => {
// needLoadingRequestCount--
// if (needLoadingRequestCount === 0) {loading.close()}
// dataAxios 是 axios 返回数据中的 data // dataAxios 是 axios 返回数据中的 data
const dataAxios = response.data const dataAxios = response.data
// 这个状态码是和后端约定的 // 这个状态码是和后端约定的
...@@ -61,6 +74,8 @@ function createService () { ...@@ -61,6 +74,8 @@ function createService () {
} }
}, },
error => { error => {
// needLoadingRequestCount--
// if (needLoadingRequestCount === 0) loading.close()
const status = get(error, 'response.status') const status = get(error, 'response.status')
switch (status) { switch (status) {
case 400: error.message = '请求错误'; break case 400: error.message = '请求错误'; break
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
color:rgba(48,221,244,1); color:rgba(48,221,244,1);
} }
.babelMsg{ .babelMsg{
float: right; // float: right;
font-weight:bold; font-weight:bold;
color:rgba(255,255,255,1); color:rgba(255,255,255,1);
} }
......
...@@ -30,12 +30,25 @@ ...@@ -30,12 +30,25 @@
.listTitleBox{ .listTitleBox{
width: 100%; width: 100%;
height: .32rem; height: .32rem;
display: inline-flex; display: flex;
.listTitle { .listTitle {
height: .32rem; height: .32rem;
line-height: .32rem; line-height: .32rem;
color:rgba(48,221,244,1); color:rgba(48,221,244,1);
flex-grow:1; // flex-grow:1;
text-align: center;
&:nth-child(1){
width: 0.8rem;
}
&:nth-child(2){
flex: 1;
}
&:nth-child(3){
width: 1rem;
}
&:nth-child(4){
width: 1rem;
}
} }
} }
ul{ ul{
...@@ -51,7 +64,7 @@ ...@@ -51,7 +64,7 @@
height:.2rem; height:.2rem;
line-height:.2rem; line-height:.2rem;
color:rgba(255,255,255,1); color:rgba(255,255,255,1);
flex-grow:1; // flex-grow:1;
} }
} }
} }
......
...@@ -182,6 +182,7 @@ ul{list-style: none; padding: 0} ...@@ -182,6 +182,7 @@ ul{list-style: none; padding: 0}
background: rgba(48,221,244,0.15); background: rgba(48,221,244,0.15);
border: 1px solid #77E2FF; border: 1px solid #77E2FF;
border-radius: 2px; border-radius: 2px;
cursor: pointer;
&.is-active{ &.is-active{
color: #000E42; color: #000E42;
background: #30DDF4; background: #30DDF4;
......
...@@ -29,14 +29,12 @@ export default { ...@@ -29,14 +29,12 @@ export default {
vm.chart.clear() vm.chart.clear()
vm.option = { vm.option = {
tooltip: { tooltip: {
transitionDuration: 0, trigger: 'axis'
trigger: 'item',
formatter: '{b}: {c}'
}, },
grid: { grid: {
top: '18%', top: '18%',
left: '15%', left: vm.idstr === 'lastMonthPerformance' || vm.idstr === 'peopleCenter' ? '9%' : '15%',
right: '10%', right: vm.idstr === 'lastMonthPerformance' || vm.idstr === 'peopleCenter' ? '2%' : '10%',
bottom: '30%' bottom: '30%'
}, },
xAxis: [ xAxis: [
...@@ -47,6 +45,7 @@ export default { ...@@ -47,6 +45,7 @@ export default {
type: 'shadow' type: 'shadow'
}, },
axisLabel: { axisLabel: {
interval: 0,
rotate: vm.message.xAxis.length > 4 ? 30 : 0 rotate: vm.message.xAxis.length > 4 ? 30 : 0
}, },
axisLine: { axisLine: {
......
...@@ -14,7 +14,7 @@ export default { ...@@ -14,7 +14,7 @@ export default {
chart: null chart: null
} }
}, },
props: ['message', 'idstr'], props: ['message', 'idstr', 'isLegend'],
mounted () { mounted () {
this.drawLine() this.drawLine()
}, },
...@@ -26,17 +26,16 @@ export default { ...@@ -26,17 +26,16 @@ export default {
// 清空图表 // 清空图表
vm.chart.clear() vm.chart.clear()
vm.option = { vm.option = {
color: ['#30DDF4', '#D6FFBA', '#E23AA2', '#F5A623'], color: ['#30DDF4', '#E23AA2', '#F5A623', '#4aa80b', '#f40'],
legend: { legend: {
show: !vm.message.isLegend,
data: vm.message.legend, data: vm.message.legend,
textStyle: { textStyle: {
color: '#ffffff' color: '#ffffff'
} }
}, },
tooltip: { tooltip: {
transitionDuration: 0, trigger: 'axis'
trigger: 'item',
formatter: '{a}:<br/>{b}: {c}'
}, },
grid: { grid: {
top: '25%', top: '25%',
......
...@@ -24,11 +24,11 @@ export default { ...@@ -24,11 +24,11 @@ export default {
// 清空图表 // 清空图表
vm.chart.clear() vm.chart.clear()
vm.option = { vm.option = {
color: ['#30DDF4', '#E23AA2', '#F5A623', '#D6FFBA'], color: ['#30DDF4', '#E23AA2', '#F5A623', '#4aa80b', '#f40'],
tooltip: { tooltip: {
transitionDuration: 0, transitionDuration: 0,
trigger: 'item', trigger: 'item',
formatter: '{b} : {c}' // a对应系列名称,b对应数据项名称,c对应数据项值 formatter: '{b}: {c} ({d}%)' // a对应系列名称,b对应数据项名称,c对应数据项值
}, },
legend: { legend: {
textStyle: { textStyle: {
...@@ -107,5 +107,7 @@ export default { ...@@ -107,5 +107,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
p {
color:#f40;
}
</style> </style>
...@@ -26,13 +26,17 @@ export default { ...@@ -26,13 +26,17 @@ export default {
item.itemStyle = { item.itemStyle = {
color: item.color color: item.color
} }
item.emphasis = { // item.label = {
focus: 'adjacency', // fontSize: 12,
label: { // position: 'top'
position: 'right', // }
show: true // item.emphasis = {
} // focus: 'adjacency',
} // label: {
// position: 'right',
// show: true
// }
// }
}) })
// const _list = { // const _list = {
// nodes: [ // nodes: [
...@@ -300,7 +304,7 @@ export default { ...@@ -300,7 +304,7 @@ export default {
series: [ series: [
{ {
type: 'graph', type: 'graph',
// layout: 'none', // 力引导布局 // layout: 'circular', // 环形布局
layout: 'force', // 力引导布局 layout: 'force', // 力引导布局
legendHoverLink: true, // 是否启用图例 hover(悬停) 时的联动高亮。 legendHoverLink: true, // 是否启用图例 hover(悬停) 时的联动高亮。
hoverAnimation: false, // 是否开启鼠标悬停节点的显示动画 hoverAnimation: false, // 是否开启鼠标悬停节点的显示动画
...@@ -308,14 +312,14 @@ export default { ...@@ -308,14 +312,14 @@ export default {
show: false show: false
}, },
force: { force: {
edgeLength: 50, edgeLength: vm.idstr === 'bigPic' ? [100, 200] : 50,
repulsion: 100 repulsion: vm.idstr === 'bigPic' ? 200 : 80
}, },
edgeSymbol: ['none', 'none'], edgeSymbol: ['none', 'none'],
roam: true, roam: true,
draggable: false, // 每个节点的拖拉 draggable: true, // 每个节点的拖拉
emphasis: { emphasis: {
scale: true, scale: false,
focus: 'series', focus: 'series',
blurScope: 'coordinateSystem' blurScope: 'coordinateSystem'
}, },
...@@ -328,14 +332,14 @@ export default { ...@@ -328,14 +332,14 @@ export default {
shadowOffsetX: 1, shadowOffsetX: 1,
shadowOffsetY: 1, shadowOffsetY: 1,
label: { label: {
show: false, show: true,
position: [-10, -20], position: 'top',
textStyle: { // 标签的字体样式 textStyle: { // 标签的字体样式
color: '#fff', // 字体颜色 color: 'rgba(255,255,255,1)', // 字体颜色
fontStyle: 'normal', // 文字字体的风格 'normal'标准 'italic'斜体 'oblique' 倾斜 fontStyle: 'normal', // 文字字体的风格 'normal'标准 'italic'斜体 'oblique' 倾斜
fontWeight: '500', // 'normal'标准'bold'粗的'bolder'更粗的'lighter'更细的或100 | 200 | 300 | 400... fontWeight: 'lighter', // 'normal'标准'bold'粗的'bolder'更粗的'lighter'更细的或100 | 200 | 300 | 400...
fontFamily: 'PingFangSC-Regular', // 文字的字体系列 fontFamily: 'PingFangSC-Regular', // 文字的字体系列
fontSize: 14, // 字体大小 fontSize: 8, // 字体大小
align: 'center' align: 'center'
} }
} }
......
...@@ -25,6 +25,9 @@ export default { ...@@ -25,6 +25,9 @@ export default {
vm.chart.clear() vm.chart.clear()
vm.option = { vm.option = {
color: ['#30DDF4', '#E23AA2', '#F5A623', '#D6FFBA'], color: ['#30DDF4', '#E23AA2', '#F5A623', '#D6FFBA'],
tooltip: {
trigger: 'axis'
},
legend: { legend: {
data: vm.message.legend, data: vm.message.legend,
top: 0, top: 0,
......
...@@ -24,7 +24,7 @@ export default { ...@@ -24,7 +24,7 @@ export default {
// 清空图表 // 清空图表
vm.chart.clear() vm.chart.clear()
vm.option = { vm.option = {
color: ['#30DDF4', '#D6FFBA', '#E23AA2', '#F5A623'], color: ['#30DDF4', '#E23AA2', '#F5A623', '#4aa80b', '#f40'],
legend: { legend: {
data: vm.message.legend, // ['新签预算', '新签实际', '完成比'], data: vm.message.legend, // ['新签预算', '新签实际', '完成比'],
textStyle: { textStyle: {
...@@ -32,9 +32,7 @@ export default { ...@@ -32,9 +32,7 @@ export default {
} }
}, },
tooltip: { tooltip: {
transitionDuration: 0, trigger: 'axis'
trigger: 'item',
formatter: '{a}:<br/>{b}: {c} ({d}%)'
}, },
grid: { grid: {
top: '20%', top: '20%',
......
...@@ -22,6 +22,9 @@ export default { ...@@ -22,6 +22,9 @@ export default {
// 清空图表 // 清空图表
vm.chart.clear() vm.chart.clear()
vm.option = { vm.option = {
tooltip: {
trigger: 'axis'
},
legend: { legend: {
data: vm.message.legend, data: vm.message.legend,
textStyle: { textStyle: {
......
...@@ -11,10 +11,12 @@ export default { ...@@ -11,10 +11,12 @@ export default {
return { return {
isShowBack: false, isShowBack: false,
option: {}, option: {},
chart: null recordList: [],
chart: null,
type: ''
} }
}, },
props: ['message', 'idstr', 'noDrill', 'isLeft'], props: ['message', 'idstr', 'noDrill', 'isRight'],
mounted () { mounted () {
this.drawLine() this.drawLine()
}, },
...@@ -23,19 +25,20 @@ export default { ...@@ -23,19 +25,20 @@ export default {
const vm = this const vm = this
// 基于准备好的dom,初始化echarts实例 // 基于准备好的dom,初始化echarts实例
vm.chart = this.$echarts.init(document.getElementById(vm.idstr)) vm.chart = this.$echarts.init(document.getElementById(vm.idstr))
const unit = vm.message.unit || ''
// 清空图表 // 清空图表
vm.chart.clear() vm.chart.clear()
vm.option = { vm.option = {
tooltip: { tooltip: {
transitionDuration: 0, transitionDuration: 0,
trigger: 'item', trigger: 'item',
formatter: '{b}: {c} ({d}%)' formatter: '{b}: {c}' + unit + ' ({d}%)'
}, },
color: ['#30DDF4', '#E23AA2', '#F5A623', '#D6FFBA', '#9FFED7'], color: ['#30DDF4', '#E23AA2', '#F5A623', '#D6FFBA', '#9FFED7'],
legend: { legend: {
orient: 'vertical', orient: 'vertical',
data: vm.message.legend, data: vm.message.legend,
right: 20, left: 10,
bottom: 10, bottom: 10,
textStyle: { textStyle: {
color: '#ffffff' color: '#ffffff'
...@@ -49,7 +52,7 @@ export default { ...@@ -49,7 +52,7 @@ export default {
{ {
type: 'pie', type: 'pie',
radius: ['40%', '70%'], radius: ['40%', '70%'],
center: vm.isLeft ? ['30%', '50%'] : ['50%', '50%'], center: vm.isRight ? ['70%', '50%'] : ['50%', '50%'],
label: { label: {
show: false show: false
}, },
...@@ -72,16 +75,28 @@ export default { ...@@ -72,16 +75,28 @@ export default {
vm.eventList() vm.eventList()
}, },
goBack () { goBack () {
this.isShowBack = false if (this.recordList.length) {
this.$emit('downData', '') const popItem = this.recordList.pop()
this.$emit('downData', popItem)
} else {
this.isShowBack = false
this.$emit('downData', '')
}
}, },
eventList () { eventList () {
const vm = this const vm = this
if (vm.noDrill) { return false } if (vm.noDrill) { return false }
vm.chart.off('click') vm.chart.off('click')
vm.chart.on('click', function (params) { vm.chart.on('click', function (params) {
if (vm.message.isLeaf) return
// 第一次点击 保存type
if (!vm.isShowBack) {
this.type = params.name
}
vm.isShowBack = true vm.isShowBack = true
vm.$emit('downData', params.name) const item = { name: params.data.name, id: params.data.id, type: this.type }
vm.recordList.push(item)
vm.$emit('downData', item)
}) })
} }
}, },
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</div> </div>
<div class="rightBlock"> <div class="rightBlock">
<div class="boxHeight-3"> <div class="boxHeight-3">
<div class="title">商机成功</div> <div class="title">商机预算及赢单</div>
<doubleYBarChart :message="successRatio" idstr="successRatio" class="heightCut44 mt-1"></doubleYBarChart> <doubleYBarChart :message="successRatio" idstr="successRatio" class="heightCut44 mt-1"></doubleYBarChart>
</div> </div>
<div class="boxHeight-3 mt-2"> <div class="boxHeight-3 mt-2">
...@@ -159,34 +159,43 @@ export default { ...@@ -159,34 +159,43 @@ export default {
// 商机统计 // 商机统计
async getOpportunitiesStatistics () { async getOpportunitiesStatistics () {
const _data = await API_BUSSINESS.getOpportunitiesStatistics() const _data = await API_BUSSINESS.getOpportunitiesStatistics()
if (!_data.data) { return false }
this.totalObj = _data.data[0] this.totalObj = _data.data[0]
}, },
// 行业分布 // 行业分布
async getDistribution () { async getDistribution () {
const _data = await API_BUSSINESS.getDistribution({ industry: this.industry || null }) const _data = await API_BUSSINESS.getDistribution({ industry: this.industry || null, deptId: this.clickDistributeId })
if (!_data.data) { return false }
let isLeaf = false
if (!_data.data.data.length) { if (!_data.data.data.length) {
return false // 下级无数据 即为叶子节点
} isLeaf = true
const _distribute = { this.typeDistribute.isLeaf = isLeaf
legend: _data.data.legend, } else {
data: _data.data.data.map(item => { this.typeDistribute = {
return { isLeaf: isLeaf,
name: item.industry, legend: _data.data.legend,
value: Number(item.value) data: _data.data.data.map(item => {
} return {
}) name: item.industry || item.name,
value: Number(item.value),
id: item.id || null
}
})
}
} }
this.typeDistribute = _distribute
}, },
// 商机分布 // 商机分布
async getOpportunitiesDistribution () { async getOpportunitiesDistribution () {
const _data = await API_BUSSINESS.getOpportunitiesDistribution() const _data = await API_BUSSINESS.getOpportunitiesDistribution()
if (!_data.data) { return false }
this.bussionDistribute = _data.data this.bussionDistribute = _data.data
this.bussionDistribute.yAxis = '单位 :个' this.bussionDistribute.yAxis = '单位 :个'
}, },
// 合同税率 // 合同税率
async getTaxRate () { async getTaxRate () {
const _data = await API_BUSSINESS.getTaxRate() const _data = await API_BUSSINESS.getTaxRate()
if (!_data.data) { return false }
this.taxRateDistribute = _data.data this.taxRateDistribute = _data.data
this.taxRateDistribute.data = this.taxRateDistribute.data.map(item => { this.taxRateDistribute.data = this.taxRateDistribute.data.map(item => {
item.barWidth = '25%' item.barWidth = '25%'
...@@ -195,24 +204,31 @@ export default { ...@@ -195,24 +204,31 @@ export default {
}, },
// 产品类型分析 // 产品类型分析
async getProductType () { async getProductType () {
const _data = await API_BUSSINESS.getProductType({ type: this.productType || null }) const _data = await API_BUSSINESS.getProductType({ type: this.productType || null, deptId: this.clickTypeId || null })
if (!_data.data) { return false }
let isLeaf = false
if (!_data.data.data.length) { if (!_data.data.data.length) {
return false // 下级无数据 即为叶子节点
} isLeaf = true
const _typeAnalysis = { this.typeAnalysis.isLeaf = isLeaf
legend: _data.data.legend, } else {
data: _data.data.data.map(item => { this.typeAnalysis = {
return { isLeaf: isLeaf,
name: item.productType || item.name, legend: _data.data.legend,
value: Number(item.number) data: _data.data.data.map(item => {
} return {
}) name: item.productType || item.name,
value: Number(item.number),
id: item.id || null
}
})
}
} }
this.typeAnalysis = _typeAnalysis
}, },
// 新商机分析 // 新商机分析
async getNewOpportunities () { async getNewOpportunities () {
const _data = await API_BUSSINESS.getNewOpportunities() const _data = await API_BUSSINESS.getNewOpportunities()
if (!_data.data) { return false }
this.newBussAnalysis = _data.data this.newBussAnalysis = _data.data
this.newBussAnalysis.data = this.newBussAnalysis.data.map(item => { this.newBussAnalysis.data = this.newBussAnalysis.data.map(item => {
item.barWidth = '25%' item.barWidth = '25%'
...@@ -222,12 +238,14 @@ export default { ...@@ -222,12 +238,14 @@ export default {
// 商机成功率 // 商机成功率
async getBillRate () { async getBillRate () {
const _data = await API_BUSSINESS.getBillRate() const _data = await API_BUSSINESS.getBillRate()
if (!_data.data) { return false }
this.successRatio = _data.data this.successRatio = _data.data
}, },
// q切换数量和金额 // q切换数量和金额
changeType (item) { changeType (item) {
this.chartActive = item this.chartActive = item
this.getOpportunitiesByNumberOrMoney() this.getOpportunitiesByNumberOrMoney()
this.getOpportunitiesByStep()
this.getOpportunitiesByDept() this.getOpportunitiesByDept()
}, },
// 点击漏斗图 切换饼图数据 // 点击漏斗图 切换饼图数据
...@@ -238,7 +256,9 @@ export default { ...@@ -238,7 +256,9 @@ export default {
// 商机阶段分析-中间饼图 // 商机阶段分析-中间饼图
async getOpportunitiesByNumberOrMoney () { async getOpportunitiesByNumberOrMoney () {
const _data = await API_BUSSINESS.getOpportunitiesByNumberOrMoney({ name: this.chartActive, step: this.stepActive || null }) const _data = await API_BUSSINESS.getOpportunitiesByNumberOrMoney({ name: this.chartActive, step: this.stepActive || null })
if (!_data.data) { return false }
this.bussionType = { this.bussionType = {
unit: this.chartActive === 'money' ? '万元' : '',
legend: _data.data.legend, legend: _data.data.legend,
data: _data.data.data.map(item => { data: _data.data.data.map(item => {
return { return {
...@@ -250,7 +270,8 @@ export default { ...@@ -250,7 +270,8 @@ export default {
}, },
// 商机阶段分析-中间漏斗图 // 商机阶段分析-中间漏斗图
async getOpportunitiesByStep () { async getOpportunitiesByStep () {
const _data = await API_BUSSINESS.getOpportunitiesByStep() const _data = await API_BUSSINESS.getOpportunitiesByStep({ name: this.chartActive })
if (!_data.data) { return false }
this.bussionStep = { this.bussionStep = {
legend: _data.data.legend, legend: _data.data.legend,
data: _data.data.data.map(item => { data: _data.data.data.map(item => {
...@@ -265,6 +286,7 @@ export default { ...@@ -265,6 +286,7 @@ export default {
async getOpportunitiesByDept (param) { async getOpportunitiesByDept (param) {
this.parentId = param || null this.parentId = param || null
const _data = await API_BUSSINESS.getOpportunitiesByDept({ parentId: this.parentId || null, type: this.chartActive }) const _data = await API_BUSSINESS.getOpportunitiesByDept({ parentId: this.parentId || null, type: this.chartActive })
if (!_data.data) { return false }
let isLeaf = false let isLeaf = false
if (!_data.data.idxs.length) { if (!_data.data.idxs.length) {
// 下级无数据 即为叶子节点 // 下级无数据 即为叶子节点
...@@ -272,6 +294,7 @@ export default { ...@@ -272,6 +294,7 @@ export default {
this.bussionAnalysis.isLeaf = isLeaf this.bussionAnalysis.isLeaf = isLeaf
} else { } else {
this.bussionAnalysis = { this.bussionAnalysis = {
isLegend: true,
parentId: param || '', parentId: param || '',
isLeaf: isLeaf, isLeaf: isLeaf,
xAxis: _data.data.xAxis, xAxis: _data.data.xAxis,
...@@ -289,13 +312,15 @@ export default { ...@@ -289,13 +312,15 @@ export default {
// 行业分布下钻数据 // 行业分布下钻数据
downDistributeData (item) { downDistributeData (item) {
// console.log('传来的值:', item) // console.log('传来的值:', item)
this.industry = item this.industry = item.type || null
this.clickDistributeId = item.id || null
this.getDistribution() this.getDistribution()
}, },
// 产品类型分析下钻数据 // 产品类型分析下钻数据
downTypeData (item) { downTypeData (item) {
// console.log('pie传来的值:', item) // console.log('pie传来的值:', item)
this.productType = item this.productType = item.type || null
this.clickTypeId = item.id || null
this.getProductType() this.getProductType()
} }
} }
......
...@@ -72,40 +72,38 @@ ...@@ -72,40 +72,38 @@
</div> </div>
</div> </div>
<div class="searchMsg d-flex flex-column"> <div class="searchMsg d-flex flex-column">
<div class="row-item d-flex jc-between"> <div class="row-item d-flex">
<div class="flex-1"> <div class="flex-1">
<span class="babel">客户名称</span> <span class="babel">客户名称</span>
<span class="babelMsg pr-24">{{ companyInfo.customerName|| '无' }}</span> <span class="babelMsg pr-24">{{ companyInfo.customerName|| '无' }}</span>
</div> </div>
<div class="flex-1">
<span class="babel">客户规模</span>
<span class="babelMsg">{{companyInfo.customerSize}}</span>
</div>
</div> </div>
<div class="row-item d-flex jc-between"> <div class="row-item d-flex">
<div class="flex-1"><span class="babel">客户属性</span><span class="babelMsg pr-24">{{companyInfo.customerAttribute}}</span></div> <div class="flex-1"><span class="babel">客户属性</span><span class="babelMsg pr-24">{{companyInfo.customerAttribute}}</span></div>
<div class="flex-1"><span class="babel">所在省份</span><span class="babelMsg">{{companyInfo.province}}</span></div> <div class="flex-1"><span class="babel">客户规模:</span><span class="babelMsg">{{companyInfo.customerSize}}</span></div>
</div> </div>
<div class="row-item d-flex jc-between"> <div class="row-item d-flex">
<div class="flex-1"><span class="babel">联系人</span><span class="babelMsg pr-24">{{ companyInfo.applicantName ||'无' }}</span></div> <div class="flex-1"><span class="babel">所在省份:</span><span class="babelMsg pr-24">{{companyInfo.province}}</span></div>
<div class="flex-1"><span class="babel">协同销售</span><span class="babelMsg">{{companyInfo.salesName}}</span></div> <div class="flex-1"><span class="babel">联系人:</span><span class="babelMsg">{{ companyInfo.applicantName ||'无' }}</span></div>
</div> </div>
<div class="row-item d-flex jc-between"> <div class="row-item d-flex">
<div class="flex-1"><span class="babel">主责任人</span><span class="babelMsg pr-24">{{ companyInfo.chargePersonName ||'无' }}</span></div> <div class="flex-1"><span class="babel">主责任人</span><span class="babelMsg pr-24">{{ companyInfo.chargePersonName ||'无' }}</span></div>
<div class="flex-1"><span class="babel">项目数</span><span class="babelMsg">{{companyInfo.projectNum}}</span></div> <div class="flex-1"><span class="babel">协同销售:</span><span class="babelMsg">{{companyInfo.salesName}}</span></div>
</div> </div>
<div class="row-item d-flex jc-between"> <div class="row-item d-flex">
<div class="flex-1"><span class="babel">商机数</span><span class="babelMsg">{{companyInfo.nicheNum}}</span></div> <div class="flex-1"><span class="babel">商机数:</span><span class="babelMsg">{{companyInfo.nicheNum}}</span></div>
<div class="flex-1"><span class="babel">项目数:</span><span class="babelMsg">{{companyInfo.projectNum}}</span></div>
</div> </div>
<div class="row-item d-flex jc-between"> <div class="row-item d-flex">
<div class="flex-1"> <div class="flex-1">
<span class="babel">联系方式</span> <span class="babel">联系方式</span>
<span class="babelMsg">{{companyInfo.postalAddress || '无'}}</span> <span class="babelMsg">{{companyInfo.postalAddress || '无'}}</span>
</div> </div>
</div> </div>
<div class="row-item d-flex jc-between"> <div class="row-item d-flex">
<div class="flex-1"> <div class="flex-1">
<span class="babel">备注说明</span> <span class="babel">备注说明</span>
<span class="babelMsg">{{companyInfo.remark || '无'}}</span> <span class="babelMsg">{{companyInfo.remark || '无'}}</span>
</div> </div>
</div> </div>
...@@ -213,11 +211,13 @@ export default { ...@@ -213,11 +211,13 @@ export default {
// 客户统计 // 客户统计
async getStatisticsCustomer () { async getStatisticsCustomer () {
const _data = await API_CLIENT.getStatisticsCustomer() const _data = await API_CLIENT.getStatisticsCustomer()
if (!_data.data) { return false }
this.totalObj = _data.data this.totalObj = _data.data
}, },
// 行业分布 // 行业分布
async getDistribution () { async getDistribution () {
const _data = await API_CLIENT.getCustomerByCustomerAttribute() const _data = await API_CLIENT.getCustomerByCustomerAttribute()
if (!_data.data) { return false }
const _distribute = { const _distribute = {
legend: _data.data.legend, legend: _data.data.legend,
data: _data.data.data.map(item => { data: _data.data.data.map(item => {
...@@ -232,17 +232,20 @@ export default { ...@@ -232,17 +232,20 @@ export default {
// 客户地区分布 // 客户地区分布
async getCustomerByProvince () { async getCustomerByProvince () {
const _data = await API_CLIENT.getCustomerByProvince() const _data = await API_CLIENT.getCustomerByProvince()
if (!_data.data) { return false }
this.customDistribute = _data.data this.customDistribute = _data.data
this.customDistribute.yAxis = '单位 :个' this.customDistribute.yAxis = '单位 :个'
}, },
// 合同分布 // 合同分布
async getCustomerByAmount () { async getCustomerByAmount () {
const _data = await API_CLIENT.getCustomerByAmount() const _data = await API_CLIENT.getCustomerByAmount()
if (!_data.data) { return false }
this.clientAnalysis = _data.data this.clientAnalysis = _data.data
}, },
// 中要客户 // 中要客户
async getImportantCus () { async getImportantCus () {
const _data = await API_CLIENT.getImportantCus({ type: this.selectYear }) const _data = await API_CLIENT.getImportantCus({ type: this.selectYear })
if (!_data.data) { return false }
this.customerList = _data.data.map(item => item.customerName) this.customerList = _data.data.map(item => item.customerName)
this.handleSelect(_data.data[0]) this.handleSelect(_data.data[0])
}, },
......
...@@ -42,13 +42,16 @@ export default { ...@@ -42,13 +42,16 @@ export default {
methods: { methods: {
async getCollectAgeYear () { async getCollectAgeYear () {
const _data = await API_OPERATION.getCollectAgeYear({ type: this.selectType }) const _data = await API_OPERATION.getCollectAgeYear({ type: this.selectType })
if (!_data.data) { return false }
this.yearList = _data.data this.yearList = _data.data
this.selectYear = _data.data[0] this.selectYear = _data.data[0]
this.getCollectAge() this.getCollectAge()
}, },
async getCollectAge () { async getCollectAge () {
const _data = await API_OPERATION.getCollectAge({ type: this.selectType, year: this.selectYear }) const _data = await API_OPERATION.getCollectAge({ type: this.selectType, year: this.selectYear })
if (!_data.data) { return false }
this.dataList = _data.data this.dataList = _data.data
this.dataList.unit = '万元'
// for (var i of _seriesData) { // for (var i of _seriesData) {
// for (var k in i) { // for (var k in i) {
// console.log('键:' + k) // console.log('键:' + k)
......
...@@ -33,6 +33,7 @@ export default { ...@@ -33,6 +33,7 @@ export default {
methods: { methods: {
async getYears () { async getYears () {
const _data = await API_OPERATION.getBudgetYear() const _data = await API_OPERATION.getBudgetYear()
if (!_data.data) { return false }
this.yearList = _data.data this.yearList = _data.data
this.selectYear = _data.data[0] this.selectYear = _data.data[0]
this.getBudget() this.getBudget()
...@@ -40,6 +41,7 @@ export default { ...@@ -40,6 +41,7 @@ export default {
async getBudget (param, isLeaf) { async getBudget (param, isLeaf) {
this.selectId = param || null this.selectId = param || null
const _data = await API_OPERATION.getBudget({ center: this.selectId, year: this.selectYear }) const _data = await API_OPERATION.getBudget({ center: this.selectId, year: this.selectYear })
if (!_data.data) { return false }
this.dataList = { this.dataList = {
parentId: param || '', parentId: param || '',
isLeaf: isLeaf, isLeaf: isLeaf,
......
...@@ -41,19 +41,22 @@ export default { ...@@ -41,19 +41,22 @@ export default {
}, },
methods: { methods: {
async getCashFlowList () { async getCashFlowList () {
const _data = await API_OPERATION.getCashFlowList() const _data = await API_OPERATION.getCashFlowOrg()
if (!_data.data) { return false }
this.typeList = _data.data this.typeList = _data.data
this.selectTypeId = this.typeList[0].id this.selectTypeId = this.typeList[0].id
this.getCashFlowYear() this.getCashFlowYear()
}, },
async getCashFlowYear () { async getCashFlowYear () {
const _data = await API_OPERATION.getCashFlowYear({ id: this.selectTypeId }) const _data = await API_OPERATION.getCashFlowYear({ id: this.selectTypeId })
if (!_data.data) { return false }
this.yearList = _data.data this.yearList = _data.data
this.selectYear = this.yearList[0] this.selectYear = this.yearList[0]
this.getCashFlow() this.getCashFlow()
}, },
async getCashFlow () { async getCashFlow () {
const _data = await API_OPERATION.getCashFlow({ id: this.selectTypeId, year: this.selectYear }) const _data = await API_OPERATION.getCashFlow({ id: this.selectTypeId, year: this.selectYear })
if (!_data.data) { return false }
this.dataList = _data.data this.dataList = _data.data
this.dataList.data.inflow = _data.data.data.inflow.map(item => item.value) this.dataList.data.inflow = _data.data.data.inflow.map(item => item.value)
this.dataList.data.flowOut = _data.data.data.flowOut.map(item => -item.value) this.dataList.data.flowOut = _data.data.data.flowOut.map(item => -item.value)
......
...@@ -47,12 +47,14 @@ export default { ...@@ -47,12 +47,14 @@ export default {
methods: { methods: {
async getContractYear () { async getContractYear () {
const _data = await API_OPERATION.getContractYear({ type: this.selectType }) const _data = await API_OPERATION.getContractYear({ type: this.selectType })
if (!_data.data) { return false }
this.yearList = _data.data this.yearList = _data.data
this.selectYear = _data.data[0] this.selectYear = _data.data[0]
this.getContract() this.getContract()
}, },
async getContract () { async getContract () {
const _data = await API_OPERATION.getContract({ type: this.selectType, year: this.selectYear }) const _data = await API_OPERATION.getContract({ type: this.selectType, year: this.selectYear })
if (!_data.data) { return false }
this.dataList = _data.data this.dataList = _data.data
} }
} }
......
...@@ -44,12 +44,14 @@ export default { ...@@ -44,12 +44,14 @@ export default {
methods: { methods: {
async getProjectYear () { async getProjectYear () {
const _data = await API_OPERATION.getProjectYear() const _data = await API_OPERATION.getProjectYear()
if (!_data.data) { return false }
this.yearList = _data.data this.yearList = _data.data
this.selectYear = _data.data[0] this.selectYear = _data.data[0]
this.getProject() this.getProject()
}, },
async getProject () { async getProject () {
const _data = await API_OPERATION.getProject({ date: this.selectYear }) const _data = await API_OPERATION.getProject({ date: this.selectYear })
if (!_data.data) { return false }
this.budgetBall = _data.data.budgetBall this.budgetBall = _data.data.budgetBall
this.acutalBall = _data.data.acutalBall this.acutalBall = _data.data.acutalBall
} }
......
...@@ -44,6 +44,7 @@ export default { ...@@ -44,6 +44,7 @@ export default {
methods: { methods: {
async getYears () { async getYears () {
const _data = await API_OPERATION.getCollectionYear() const _data = await API_OPERATION.getCollectionYear()
if (!_data.data) { return false }
this.yearList = _data.data this.yearList = _data.data
this.selectYear = _data.data[0] this.selectYear = _data.data[0]
this.getCollection() this.getCollection()
...@@ -53,6 +54,7 @@ export default { ...@@ -53,6 +54,7 @@ export default {
}, },
async getCollection () { async getCollection () {
const _data = await API_OPERATION.getCollection({ year: this.selectYear }) const _data = await API_OPERATION.getCollection({ year: this.selectYear })
if (!_data.data) { return false }
this.dataList = _data.data this.dataList = _data.data
this.waterBall = _data.data.waterBall this.waterBall = _data.data.waterBall
} }
......
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
<div class="listTitle" v-for="(item,index) in column" :key="index">{{item}}</div> <div class="listTitle" v-for="(item,index) in column" :key="index">{{item}}</div>
</div> </div>
<ul> <ul>
<li v-for="(item,index) in list" :key="index" @click="getDataById(item)"> <li v-for="(item,index) in list" :key="index" @click="getDataById(item)" class="d-flex text-center">
<div>{{Number(index)+1}}</div> <div class="index-width">{{Number(index)+1}}</div>
<div>{{item.name}}</div> <div class="name-width">{{item.name}}</div>
<div>{{item.autual}}</div> <div class="num-width">{{item.autual}}</div>
<div>{{item.rate}}</div> <div class="num-width">{{item.rate}}</div>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -48,12 +48,14 @@ export default { ...@@ -48,12 +48,14 @@ export default {
methods: { methods: {
async getRankYear () { async getRankYear () {
const _data = await API_OPERATION.getRankYear() const _data = await API_OPERATION.getRankYear()
if (!_data.data) { return false }
this.yearList = _data.data this.yearList = _data.data
this.selectYear = this.yearList[0] this.selectYear = this.yearList[0]
this.getRank() this.getRank()
}, },
async getRank () { async getRank () {
const _data = await API_OPERATION.getRank({ center: this.selectType || null, year: this.selectYear }) const _data = await API_OPERATION.getRank({ center: this.selectType || null, year: this.selectYear })
if (!_data.data) { return false }
this.list = _data.data this.list = _data.data
}, },
getDataById (item) { getDataById (item) {
...@@ -83,4 +85,13 @@ export default { ...@@ -83,4 +85,13 @@ export default {
padding-top: .05rem; padding-top: .05rem;
cursor: pointer; cursor: pointer;
} }
.index-width {
width:0.8rem;
}
.num-width {
width:1rem;
}
.name-width {
flex:1;
}
</style> </style>
...@@ -43,6 +43,7 @@ export default { ...@@ -43,6 +43,7 @@ export default {
methods: { methods: {
async getRevenueYear () { async getRevenueYear () {
const _data = await API_OPERATION.getRevenueYear({ type: this.selectType }) const _data = await API_OPERATION.getRevenueYear({ type: this.selectType })
if (!_data.data) { return false }
this.yearList = _data.data this.yearList = _data.data
this.selectYear = this.yearList[0] this.selectYear = this.yearList[0]
this.getRevenue() this.getRevenue()
...@@ -50,6 +51,7 @@ export default { ...@@ -50,6 +51,7 @@ export default {
async getRevenue (param, isLeaf) { async getRevenue (param, isLeaf) {
this.selectId = param || null this.selectId = param || null
const _data = await API_OPERATION.getRevenue({ center: this.selectId, type: this.selectType, date: this.selectYear }) const _data = await API_OPERATION.getRevenue({ center: this.selectId, type: this.selectType, date: this.selectYear })
if (!_data.data) { return false }
this.dataList = { this.dataList = {
parentId: param || '', parentId: param || '',
isLeaf: isLeaf, isLeaf: isLeaf,
......
...@@ -33,6 +33,7 @@ export default { ...@@ -33,6 +33,7 @@ export default {
methods: { methods: {
async getFeeYear () { async getFeeYear () {
const _data = await API_OPERATION.getFeeYear() const _data = await API_OPERATION.getFeeYear()
if (!_data.data) { return false }
this.yearList = _data.data this.yearList = _data.data
this.selectYear = this.yearList[0] this.selectYear = this.yearList[0]
this.getFee() this.getFee()
...@@ -40,6 +41,7 @@ export default { ...@@ -40,6 +41,7 @@ export default {
async getFee (param, isLeaf) { async getFee (param, isLeaf) {
this.selectId = param || null this.selectId = param || null
const _data = await API_OPERATION.getFee({ center: this.selectId, date: this.selectYear }) const _data = await API_OPERATION.getFee({ center: this.selectId, date: this.selectYear })
if (!_data.data) { return false }
this.dataList = { this.dataList = {
parentId: param || '', parentId: param || '',
isLeaf: isLeaf, isLeaf: isLeaf,
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
</div> </div>
<div class="item-box d-flex jc-between"> <div class="item-box d-flex jc-between">
<span class="label">司龄</span> <span class="label">司龄</span>
<span class="text">{{employeeInfo.hireDate}}</span> <span class="text">{{employeeInfo.timeCompany}}</span>
</div> </div>
</el-col> </el-col>
<el-col span="24"> <el-col span="24">
...@@ -67,13 +67,13 @@ ...@@ -67,13 +67,13 @@
<span class="text">{{item.company}}</span> <span class="text">{{item.company}}</span>
</div> </div>
<div> <div>
<el-col span="12" style="padding-left:0;"> <el-col span="10" style="padding-left:0;">
<div class="item-box d-flex jc-between"> <div class="item-box d-flex jc-between">
<span class="label">岗位</span> <span class="label">岗位</span>
<span class="text">{{item.position}}</span> <span class="text">{{item.position}}</span>
</div> </div>
</el-col> </el-col>
<el-col span="12" style="padding-right:0;"> <el-col span="14" style="padding-right:0;">
<div class="item-box d-flex jc-between"> <div class="item-box d-flex jc-between">
<span class="label">工作时间</span> <span class="label">工作时间</span>
<span class="text">{{item.hireDate.toString().substring(0,10)}}{{item.departureTime.toString().substring(0,10)}}</span> <span class="text">{{item.hireDate.toString().substring(0,10)}}{{item.departureTime.toString().substring(0,10)}}</span>
...@@ -96,17 +96,13 @@ ...@@ -96,17 +96,13 @@
<div class="content d-flex" v-if="isActive==3"> <div class="content d-flex" v-if="isActive==3">
<el-row :gutter="12" class="inner-content flex-1"> <el-row :gutter="12" class="inner-content flex-1">
<el-col span="24" v-for="item in employeeInfo.empProjects" :key="item.id"> <el-col span="24" v-for="item in employeeInfo.empProjects" :key="item.id">
<div class="item-box d-flex jc-between"> <div class="item-box d-flex jc-between mb-0">
<span class="label">项目名称</span> <span class="label">项目名称</span>
<span class="text">{{item.project}}</span> <span class="text">{{item.project}}</span>
</div> </div>
<div> <div class="item-box d-flex jc-between">
<el-col span="24" style="padding-left:0;"> <span class="label">服务时间</span>
<div class="item-box d-flex jc-between"> <span class="text">{{item.beginDate}}{{item.endDate}}</span>
<span class="label">服务时间</span>
<span class="text">{{item.beginDate}}{{item.endDate}}</span>
</div>
</el-col>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -208,19 +204,21 @@ export default { ...@@ -208,19 +204,21 @@ export default {
box-shadow: 0 0 20px 4px rgba(0,14,66,0.40); box-shadow: 0 0 20px 4px rgba(0,14,66,0.40);
border-radius: 2px; border-radius: 2px;
position: relative; position: relative;
&:after { overflow-y: auto;
content: ""; overflow-x: hidden;
position: absolute; // &:after {
bottom: -16px; // content: "";
left: -6px; // position: absolute;
right: -6px; // top: 5.16rem;
height: 10px; // left: -6px;
background: -webkit-linear-gradient(#30DDF4,transparent); // right: -6px;
background: -o-linear-gradient(#30DDF4,transparent); // height: 10px;
background: -moz-linear-gradient(#30DDF4,transparent); // background: -webkit-linear-gradient(#30DDF4,transparent);
background: -mos-linear-gradient(#30DDF4,transparent); // background: -o-linear-gradient(#30DDF4,transparent);
background: linear-gradient(#30DDF4,transparent); // background: -moz-linear-gradient(#30DDF4,transparent);
} // background: -mos-linear-gradient(#30DDF4,transparent);
// background: linear-gradient(#30DDF4,transparent);
// }
.el-image { .el-image {
width: 1.28rem; width: 1.28rem;
height: 1.64rem; height: 1.64rem;
...@@ -243,6 +241,9 @@ export default { ...@@ -243,6 +241,9 @@ export default {
color: #30DDF4; color: #30DDF4;
} }
} }
.mb-0 {
margin-bottom: 0;
}
} }
} }
} }
......
...@@ -73,8 +73,8 @@ ...@@ -73,8 +73,8 @@
<div class="px-24 heightCut68"> <div class="px-24 heightCut68">
<div class="select-box"> <div class="select-box">
<div class="tab-chart"> <div class="tab-chart">
<span class="tab-button" @click="changeTypeActive('1')" :class="{'is-active':performActive=== '1' }">按分数</span>
<span class="tab-button" @click="changeTypeActive('2')" :class="{'is-active':performActive=== '2' }">按部门</span> <span class="tab-button" @click="changeTypeActive('2')" :class="{'is-active':performActive=== '2' }">按部门</span>
<span class="tab-button" @click="changeTypeActive('1')" :class="{'is-active':performActive=== '1' }">按分数</span>
</div> </div>
</div> </div>
<barChart :message="dataList" idstr="lastMonthPerformance" @downData="downData" class="heightCut44"></barChart> <barChart :message="dataList" idstr="lastMonthPerformance" @downData="downData" class="heightCut44"></barChart>
...@@ -101,7 +101,7 @@ export default { ...@@ -101,7 +101,7 @@ export default {
data () { data () {
return { return {
dataList: {}, // 上月绩效 dataList: {}, // 上月绩效
performActive: '1', // 上月绩效 performActive: '2', // 上月绩效
distributeActive: '1', // 人员分布 distributeActive: '1', // 人员分布
jobDistribution: {}, // 人员分布 jobDistribution: {}, // 人员分布
refundAmountLine: {}, // 入离职统计 refundAmountLine: {}, // 入离职统计
...@@ -109,15 +109,18 @@ export default { ...@@ -109,15 +109,18 @@ export default {
} }
}, },
mounted () { mounted () {
this.recruitmentStatistics()
this.getYearRms()
this.getEmpEdacutionData() this.getEmpEdacutionData()
this.fractionLastCenterPerformance() this.lastCenterPerformance()
this.getYearRms()
this.recruitmentStatistics()
}, },
methods: { methods: {
// 获取人才招聘信息 // 获取人才招聘信息
async recruitmentStatistics () { async recruitmentStatistics () {
const _data = await API_ORGAN.recruitmentStatistics() const _data = await API_ORGAN.recruitmentStatistics()
if (!_data.data) {
return false
}
this.recruitment = _data.data this.recruitment = _data.data
this.recruitment.ball1 = { this.recruitment.ball1 = {
data: [_data.data.rmCompletionRate || '0.00'], data: [_data.data.rmCompletionRate || '0.00'],
...@@ -135,6 +138,7 @@ export default { ...@@ -135,6 +138,7 @@ export default {
// 获取入离职统计 // 获取入离职统计
async getYearRms () { async getYearRms () {
const _data = await API_ORGAN.getYearRms() const _data = await API_ORGAN.getYearRms()
if (!_data.data) { return false }
this.refundAmountLine = { this.refundAmountLine = {
legend: _data.data.legend, legend: _data.data.legend,
xAxis: _data.data.xAxis, xAxis: _data.data.xAxis,
...@@ -154,8 +158,10 @@ export default { ...@@ -154,8 +158,10 @@ export default {
// 人员分布 // 人员分布
async getEmpEdacutionData () { async getEmpEdacutionData () {
const _data = await API_ORGAN.getEmpEdacutionData({ type: this.distributeActive }) const _data = await API_ORGAN.getEmpEdacutionData({ type: this.distributeActive })
if (!_data.data) { return false }
this.jobDistribution = _data.data this.jobDistribution = _data.data
}, },
// 跳转组织机构详情 // 跳转组织机构详情
orgDetail () { orgDetail () {
this.$router.push('/orgDetail') this.$router.push('/orgDetail')
...@@ -175,6 +181,7 @@ export default { ...@@ -175,6 +181,7 @@ export default {
async fractionLastCenterPerformance (param) { async fractionLastCenterPerformance (param) {
this.parentId = param || null this.parentId = param || null
const _data = await API_ORGAN.fractionLastCenterPerformance({ type: this.parentId }) const _data = await API_ORGAN.fractionLastCenterPerformance({ type: this.parentId })
if (!_data.data) { return false }
let isLeaf = false let isLeaf = false
if (!_data.data.idxs.length) { if (!_data.data.idxs.length) {
// 下级无数据 即为叶子节点 // 下级无数据 即为叶子节点
...@@ -195,6 +202,7 @@ export default { ...@@ -195,6 +202,7 @@ export default {
async lastCenterPerformance (param) { async lastCenterPerformance (param) {
this.parentId = param || null this.parentId = param || null
const _data = await API_ORGAN.lastCenterPerformance({ deptId: this.parentId }) const _data = await API_ORGAN.lastCenterPerformance({ deptId: this.parentId })
if (!_data.data) { return false }
let isLeaf = false let isLeaf = false
if (!_data.data.idxs.length) { if (!_data.data.idxs.length) {
// 下级无数据 即为叶子节点 // 下级无数据 即为叶子节点
...@@ -210,6 +218,7 @@ export default { ...@@ -210,6 +218,7 @@ export default {
data: _data.data.data data: _data.data.data
} }
} }
console.log(this.dataList)
}, },
// 上月绩效下钻 // 上月绩效下钻
downData (item) { downData (item) {
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</template> </template>
<script> <script>
import { settings } from 'nprogress' // import { settings } from 'nprogress'
export default { export default {
data () { data () {
return { return {
...@@ -106,6 +106,7 @@ export default { ...@@ -106,6 +106,7 @@ export default {
padding: 0 .4rem; padding: 0 .4rem;
} }
.item-box { .item-box {
cursor: pointer;
p { p {
margin:0; margin:0;
} }
......
...@@ -61,5 +61,8 @@ export default { ...@@ -61,5 +61,8 @@ export default {
padding: .24rem; padding: .24rem;
width: 100%; width: 100%;
} }
::v-deep .dv-scroll-board .rows .row-item {
cursor: pointer;
}
} }
</style> </style>
...@@ -83,7 +83,7 @@ export default { ...@@ -83,7 +83,7 @@ export default {
const _data = await API_BASIC.getRevenueDataList({ time: this.dataActive }) const _data = await API_BASIC.getRevenueDataList({ time: this.dataActive })
this.statisticsChart = _data.data this.statisticsChart = _data.data
}, },
// 查询公司营收数据 // 查询客户增长分布数据
async getCustomer () { async getCustomer () {
const _data = await API_BASIC.getCustomer({ time: this.years }) const _data = await API_BASIC.getCustomer({ time: this.years })
this.distributedChart = _data.data this.distributedChart = _data.data
...@@ -102,7 +102,7 @@ export default { ...@@ -102,7 +102,7 @@ export default {
.tab-data { .tab-data {
margin-left: .4rem; margin-left: .4rem;
.el-select { .el-select {
width: .92rem; width: 1.2rem;
} }
} }
} }
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<ul> <ul>
<li v-for="(item,j) in arr" :key="j" @click="viewPDF(item)"> <li v-for="(item,j) in arr" :key="j" @click="viewPDF(item)">
<el-image :src="item.imageUrl"></el-image> <el-image :src="item.imageUrl"></el-image>
<p>{{item.projectName}}</p> <p class="solution-p">{{item.projectName}}</p>
</li> </li>
</ul> </ul>
...@@ -188,6 +188,7 @@ export default { ...@@ -188,6 +188,7 @@ export default {
overflow-y: hidden; overflow-y: hidden;
li{ li{
display: inline-block; display: inline-block;
font-size: 0;
padding-top:.2rem; padding-top:.2rem;
padding-left:.14rem; padding-left:.14rem;
&:last-child { &:last-child {
...@@ -197,18 +198,22 @@ export default { ...@@ -197,18 +198,22 @@ export default {
} }
.el-image { .el-image {
width: 1.15rem; width: 1.15rem;
height: .72rem; height: .7rem;
text-align: center; text-align: center;
} }
p{ .solution-p{
font-size:.12rem; font-size:.12rem;
font-family:PingFang-SC-Bold,PingFang-SC; font-family:PingFang-SC-Bold,PingFang-SC;
font-weight:bold; font-weight:bold;
color:$color-primary; color:$color-primary;
line-height:.12rem; line-height:1;
text-align: center; text-align: center;
margin-top: .12rem; margin-top: .1rem;
margin-bottom: 0; margin-bottom: 0;
width:1.15rem;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
} }
} }
.caseShow{ .caseShow{
...@@ -233,6 +238,14 @@ export default { ...@@ -233,6 +238,14 @@ export default {
float: left; float: left;
z-index: 9; z-index: 9;
p { p {
font-size:.12rem;
font-family:PingFang-SC-Bold,PingFang-SC;
font-weight:bold;
color:$color-primary;
line-height:1;
text-align: center;
margin-top: .1rem;
margin-bottom: 0;
text-align: left; text-align: left;
overflow: hidden; overflow: hidden;
text-overflow:ellipsis; text-overflow:ellipsis;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="title">全国</div> <div class="title">全国</div>
<div class="content d-flex"> <div class="content d-flex">
<div class="flex-1"> <div class="flex-1">
<pieChart :message="itemNationWide" :noDrill="true" :isLeft="type=='4'" idstr="itemNationWide" class="h-100"></pieChart> <pieChart :message="itemNationWide" :noDrill="true" :isRight="type=='4'" idstr="itemNationWide" class="h-100"></pieChart>
<p v-if="type=='4'">共计客户 <strong>{{message.allCustomerNumber}}</strong></p> <p v-if="type=='4'">共计客户 <strong>{{message.allCustomerNumber}}</strong></p>
<p v-if="type=='3'">共计商机 <strong>{{message.allOpportunitiesNumber}}</strong></p> <p v-if="type=='3'">共计商机 <strong>{{message.allOpportunitiesNumber}}</strong></p>
<p v-if="type=='1'">共计项目 <strong>{{message.allProjectNumber}}</strong></p> <p v-if="type=='1'">共计项目 <strong>{{message.allProjectNumber}}</strong></p>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
append-to-body class="knowledgeDialog"> append-to-body class="knowledgeDialog">
<div class="leftBox"> <div class="leftBox">
<!-- <div id="topo"></div> --> <!-- <div id="topo"></div> -->
<graphChart :message="mapData" @downData="downData" idstr="topo" style="height:58vh;"></graphChart> <graphChart :message="mapData" @downData="downData" idstr="bigPic" style="height:88vh;"></graphChart>
</div> </div>
<div class="rightBox"> <div class="rightBox">
<div class="search-box"> <div class="search-box">
...@@ -245,11 +245,13 @@ export default { ...@@ -245,11 +245,13 @@ export default {
</style> </style>
<style lang="scss"> <style lang="scss">
.el-dialog{ .el-dialog{
width: 60vw; width: 90vw;
height: 60vh; height: 90vh;
background: url("~@/assets/img/dialogBg.png") rgba(0,14,66,0.8); background: url("~@/assets/img/dialogBg.png") rgba(0,14,66,0.8);
background-size: 100% 100%; background-size: 100% 100%;
box-shadow:0px 0px 8px 4px rgba(10,18,35,0.5); box-shadow:0px 0px 8px 4px rgba(10,18,35,0.5);
margin: 0 auto;
margin-top:5vh !important;
.el-dialog__header{padding: 0;} .el-dialog__header{padding: 0;}
.el-dialog__body{ .el-dialog__body{
height: 100%; height: 100%;
......
...@@ -32,6 +32,9 @@ export default { ...@@ -32,6 +32,9 @@ export default {
return false return false
} }
vm.option = { vm.option = {
tooltip: {
trigger: 'axis'
},
xAxis: [ xAxis: [
{ {
type: 'category', type: 'category',
...@@ -91,6 +94,7 @@ export default { ...@@ -91,6 +94,7 @@ export default {
series: [ series: [
{ {
type: 'bar', type: 'bar',
name: '客户',
barWidth: '25%', barWidth: '25%',
itemStyle: { itemStyle: {
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [ color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
...@@ -102,6 +106,7 @@ export default { ...@@ -102,6 +106,7 @@ export default {
}, },
{ {
type: 'line', type: 'line',
name: '增长率',
yAxisIndex: 1, yAxisIndex: 1,
itemStyle: { // 线条样式 itemStyle: { // 线条样式
normal: { normal: {
......
<template>
<div :id="idstr"></div>
</template>
<script>
// 引入基本模板
const echarts = require('echarts/lib/echarts')
// 引入提示框和title组件
require('echarts/lib/component/tooltip')
require('echarts/lib/component/title')
export default {
data () {
return {
dataObj: {},
option: {},
chart: null,
clickNum: [1, 1, 1, 1, 1]
}
},
props: ['message', 'idstr'],
mounted () {
this.drawLine()
},
methods: {
drawLine () {
const vm = this
// 基于准备好的dom,初始化echarts实例
vm.chart = echarts.init(document.getElementById(vm.idstr))
// 清空图表
vm.chart.clear()
vm.option = {
tooltip: {
transitionDuration: 0,
trigger: 'item',
formatter: '{a} <br/>{b}: {c} ({d}%)'
},
color: ['#30DDF4', '#E23AA2', '#F5A623', '#D6FFBA', '#9FFED7'],
legend: {
orient: 'vertical',
data: ['技术岗', '销售岗', '管理岗', '职能岗', '其他岗'],
right: 0,
bottom: 5,
textStyle: {
color: '#ffffff'
}
},
series: [
{
name: '访问来源',
type: 'pie',
radius: ['40%', '60%'],
center: ['30%', '50%'],
avoidLabelOverlap: false,
label: {
show: false,
position: 'left'
},
emphasis: { // hover效果,已经关闭
label: {
show: false,
fontSize: '30',
fontWeight: 'bold'
}
},
labelLine: {
show: false
},
data: [
{ value: 335, name: '技术岗' },
{ value: 310, name: '销售岗' },
{ value: 234, name: '管理岗' },
{ value: 135, name: '职能岗' },
{ value: 1548, name: '其他岗' }
]
}
]
}
vm.drawBar()
// window.addEventListener("resize",()=>{
// chart.resize();
// });
},
drawBar () {
// 绘制图表
const vm = this
vm.chart.setOption(vm.option)
vm.eventList()
},
eventList () {
const vm = this
vm.chart.on('click', function (params) {
})
}
},
watch: {
message: function () {
const vm = this
setTimeout(function () {
vm.drawLine()
}, 1000)
// console.log(this.message)
}
}
}
</script>
<style lang="less">
</style>
...@@ -28,6 +28,9 @@ export default { ...@@ -28,6 +28,9 @@ export default {
// 清空图表 // 清空图表
vm.chart.clear() vm.chart.clear()
vm.option = { vm.option = {
tooltip: {
trigger: 'axis'
},
xAxis: { xAxis: {
type: 'category', type: 'category',
data: vm.message.xAxis, data: vm.message.xAxis,
...@@ -42,6 +45,7 @@ export default { ...@@ -42,6 +45,7 @@ export default {
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
name: '单位:万元',
axisLine: { axisLine: {
lineStyle: { lineStyle: {
color: '#FFF' color: '#FFF'
...@@ -55,14 +59,14 @@ export default { ...@@ -55,14 +59,14 @@ export default {
} }
}, },
grid: { grid: {
top: '10%', top: '24%',
left: '15%', left: '20%',
bottom: '10%', right: '10%',
width: '80%', // 图例宽度 bottom: '15%'
height: '75%' // 图例高度
}, },
series: [{ series: [{
data: vm.message.series, data: vm.message.series,
name: '营收额',
smooth: true, // 折线图平滑 smooth: true, // 折线图平滑
type: 'line', type: 'line',
areaStyle: { areaStyle: {
......
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