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

修改bug

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