dev
xy 3 years ago
parent 93f48bcc50
commit adc2463c36

@ -140,6 +140,7 @@
<div class="base-info add-plan" style="margin-top: 20px;margin-bottom: 20px"> <div class="base-info add-plan" style="margin-top: 20px;margin-bottom: 20px">
<div class="base-info-title">付款计划</div> <div class="base-info-title">付款计划</div>
<Button type="primary" style="margin-left: 50px;" @click="isShowAddPlan = true">新增计划</Button> <Button type="primary" style="margin-left: 50px;" @click="isShowAddPlan = true">新增计划</Button>
<p style="font-weight: 600;zoom: .9;color: red;">如需分期付款,请分条填报付款计划</p>
</div> </div>
<xy-table :list="signList" :table-item="signTable" :show-index="false" :height="240" <xy-table :list="signList" :table-item="signTable" :show-index="false" :height="240"
@ -515,6 +516,8 @@
console.log(res) console.log(res)
this.form.number = "HT-"+res.flow?.serial this.form.number = "HT-"+res.flow?.serial
this.form.money = Number(res.flow_detail?.total) this.form.money = Number(res.flow_detail?.total)
this.form.supply = res.flow_detail?.yifang
this.form.carryDepartment = res.flow?.dept_name
}, },
//获取oa合同信息 //获取oa合同信息
// async getOaContractInfo() { // async getOaContractInfo() {

@ -370,19 +370,7 @@ export default {
label: "类型", label: "类型",
width: 100, width: 100,
sortable: false, sortable: false,
customFn: (row) => { prop: 'type_detail.value'
const typeSwitch = (type) => {
let res = this.planTypes.filter((item) => {
return item.id === type;
});
return res[0]?.value || "未知";
};
return (
<div>
<Tag color="primary"> {typeSwitch(row.type)} </Tag>{" "}
</div>
);
},
}, },
{ {
label: "项目", label: "项目",

@ -465,13 +465,7 @@ import { resetSelect } from '@/utils'
}, },
{ {
label: "分类", label: "分类",
prop: 'type', prop: 'type_detail.value',
formatter: (cell, data, value) => {
let res = this.moneyWay.filter(item => {
return item.id === value
})
return res[0]?.value || '未知'
}
}, },
{ {
label: "名称", label: "名称",

@ -507,7 +507,7 @@ export default {
yizhifucishu: this.actNumsTotal(), yizhifucishu: this.actNumsTotal(),
yizhifujine: this.totalMoney(), yizhifujine: this.totalMoney(),
zongjia: this.contract?.money, zongjia: this.contract?.money,
zhifucishu: this.payment.length, zhifucishu: this.contract?.sign_plan?.length || 0,
total: data.apply_money, total: data.apply_money,
out_pay_id: res out_pay_id: res
}); });

@ -1582,6 +1582,28 @@ export default {
} }
}, },
}, },
{
label: "合同预算价(元)",
width: 140,
prop: "plan_price",
align: "right",
formatter: (v1, v2, value) => {
return Number(value)
.toFixed(2)
.replace(/(\d)(?=(\d{3})+\.)/g, "$1,");
},
},
{
label: "合同签订价(元)",
width: 140,
prop: "money",
align: "right",
formatter: (cell, data, value) => {
return Number(value)
.toFixed(2)
.replace(/(\d)(?=(\d{3})+\.)/g, "$1,");
},
},
{ {
label: "已申请金额(元)", label: "已申请金额(元)",
prop: "apply_money_total", prop: "apply_money_total",
@ -1622,28 +1644,6 @@ export default {
); );
}, },
}, },
{
label: "合同预算价(元)",
width: 140,
prop: "plan_price",
align: "right",
formatter: (v1, v2, value) => {
return Number(value)
.toFixed(2)
.replace(/(\d)(?=(\d{3})+\.)/g, "$1,");
},
},
{
label: "合同签订价(元)",
width: 140,
prop: "money",
align: "right",
formatter: (cell, data, value) => {
return Number(value)
.toFixed(2)
.replace(/(\d)(?=(\d{3})+\.)/g, "$1,");
},
},
{ {
label: "合同状态", label: "合同状态",
width: 120, width: 120,
@ -1783,13 +1783,7 @@ export default {
}, },
{ {
label: "分类", label: "分类",
prop: "type", prop: "type_detail.value",
formatter: (cell, data, value) => {
let res = this.moneyWay.filter((item) => {
return item.id === value;
});
return res[0]?.value || "未知";
},
width: 100, width: 100,
fixed: "left", fixed: "left",
}, },
@ -2318,7 +2312,7 @@ export default {
let baseInfo = { let baseInfo = {
title: row?.name, title: row?.name,
执行部门: row?.carry_department, 执行部门: row?.carry_department,
total: row?.money, total: row?.money || row?.plan_price,
out_contract_id: row.id, out_contract_id: row.id,
//"承包商\\供应商":row.supply //"承包商\\供应商":row.supply
}; };

@ -593,6 +593,28 @@ export default {
} }
}, },
}, },
{
label: "合同预算价(元)",
width: 140,
prop: "plan_price",
align: "right",
formatter: (v1, v2, value) => {
return Number(value)
.toFixed(2)
.replace(/(\d)(?=(\d{3})+\.)/g, "$1,");
},
},
{
label: "合同签订价(元)",
width: 140,
prop: "money",
align: "right",
formatter: (cell, data, value) => {
return Number(value)
.toFixed(2)
.replace(/(\d)(?=(\d{3})+\.)/g, "$1,");
},
},
{ {
label: "已申请金额(元)", label: "已申请金额(元)",
prop: "apply_money_total", prop: "apply_money_total",
@ -633,28 +655,6 @@ export default {
); );
}, },
}, },
{
label: "合同预算价(元)",
width: 140,
prop: "plan_price",
align: "right",
formatter: (v1, v2, value) => {
return Number(value)
.toFixed(2)
.replace(/(\d)(?=(\d{3})+\.)/g, "$1,");
},
},
{
label: "合同签订价(元)",
width: 140,
prop: "money",
align: "right",
formatter: (cell, data, value) => {
return Number(value)
.toFixed(2)
.replace(/(\d)(?=(\d{3})+\.)/g, "$1,");
},
},
{ {
label: "合同状态", label: "合同状态",
width: 120, width: 120,

@ -694,6 +694,15 @@
} }
}, },
{
label: "合同预算价(元)",
width: 140,
prop: "plan_price",
align: 'right',
formatter: (v1, v2, value) => {
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
}
},
{ {
label: '已申请金额(元)', label: '已申请金额(元)',
prop: 'apply_money_total', prop: 'apply_money_total',
@ -730,15 +739,7 @@
) )
} }
}, },
{
label: "合同预算价(元)",
width: 140,
prop: "plan_price",
align: 'right',
formatter: (v1, v2, value) => {
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
}
},
{ {
label: '合同签订价(元)', label: '合同签订价(元)',
width: 140, width: 140,

@ -61,63 +61,64 @@
}, },
setOptions(chartdata) { setOptions(chartdata) {
console.log(chartdata.xArr) console.log(chartdata.xArr)
this.chart.clear();
this.chart.setOption({ this.chart.setOption({
dataZoom: [ // dataZoom: [
//给x轴设置滚动条 // //给x轴设置滚动条
// { // {
// startValue: 0, // startValue: 0,
// endValue: 6, // 显示条数 // endValue: 6, // 显示条数
// type: 'slider', // type: 'slider',
// show: true, // show: true,
// xAxisIndex: [0], // xAxisIndex: [0],
// // handleSize: 0, //滑动条的 左右2个滑动条的大小 // // handleSize: 0, //滑动条的 左右2个滑动条的大小
// height: 8, //组件高度 // height: 8, //组件高度
// left: 50, //左边的距离 // left: 50, //左边的距离
// right: 40, //右边的距离 // right: 40, //右边的距离
// bottom: 26, //右边的距离 // bottom: 26, //右边的距离
// handleColor: '#EFEFEF', //h滑动图标的颜色 // handleColor: '#EFEFEF', //h滑动图标的颜色
// handleStyle: { // handleStyle: {
// borderColor: '#409EFF', // borderColor: '#409EFF',
// borderWidth: '1', // borderWidth: '1',
// shadowBlur: 2, // shadowBlur: 2,
// background: '#EFEFEF', // background: '#EFEFEF',
// shadowColor: '#EFEFEF' // shadowColor: '#EFEFEF'
// }, // },
// fillerColor: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{ // fillerColor: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
// //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变 // //给颜色设置渐变色 前面4个参数,给第一个设置1,第四个设置0 ,就是水平渐变
// //给第一个设置0,第四个设置1,就是垂直渐变 // //给第一个设置0,第四个设置1,就是垂直渐变
// offset: 0, // offset: 0,
// color: '#409EFF' // color: '#409EFF'
// }, // },
// { // {
// offset: 1, // offset: 1,
// color: '#409EFF' // color: '#409EFF'
// } // }
// ]), // ]),
// backgroundColor: '#EFEFEF', //两边未选中的滑动条区域的颜色 // backgroundColor: '#EFEFEF', //两边未选中的滑动条区域的颜色
// showDataShadow: false, //是否显示数据阴影 默认auto // showDataShadow: false, //是否显示数据阴影 默认auto
// showDetail: false, //即拖拽时候是否显示详细数值信息 默认true // showDetail: false, //即拖拽时候是否显示详细数值信息 默认true
// handleIcon: 'M-292,322.2c-3.2,0-6.4-0.6-9.3-1.9c-2.9-1.2-5.4-2.9-7.6-5.1s-3.9-4.8-5.1-7.6c-1.3-3-1.9-6.1-1.9-9.3c0-3.2,0.6-6.4,1.9-9.3c1.2-2.9,2.9-5.4,5.1-7.6s4.8-3.9,7.6-5.1c3-1.3,6.1-1.9,9.3-1.9c3.2,0,6.4,0.6,9.3,1.9c2.9,1.2,5.4,2.9,7.6,5.1s3.9,4.8,5.1,7.6c1.3,3,1.9,6.1,1.9,9.3c0,3.2-0.6,6.4-1.9,9.3c-1.2,2.9-2.9,5.4-5.1,7.6s-4.8,3.9-7.6,5.1C-285.6,321.5-288.8,322.2-292,322.2z', // handleIcon: 'M-292,322.2c-3.2,0-6.4-0.6-9.3-1.9c-2.9-1.2-5.4-2.9-7.6-5.1s-3.9-4.8-5.1-7.6c-1.3-3-1.9-6.1-1.9-9.3c0-3.2,0.6-6.4,1.9-9.3c1.2-2.9,2.9-5.4,5.1-7.6s4.8-3.9,7.6-5.1c3-1.3,6.1-1.9,9.3-1.9c3.2,0,6.4,0.6,9.3,1.9c2.9,1.2,5.4,2.9,7.6,5.1s3.9,4.8,5.1,7.6c1.3,3,1.9,6.1,1.9,9.3c0,3.2-0.6,6.4-1.9,9.3c-1.2,2.9-2.9,5.4-5.1,7.6s-4.8,3.9-7.6,5.1C-285.6,321.5-288.8,322.2-292,322.2z',
// filterMode: 'filter' // filterMode: 'filter'
// } // },
//下面这个属性是里面拖到 // //下面这个属性是里面拖到
// { // {
// type: 'inside', // type: 'inside',
// show: true, // show: true,
// xAxisIndex: [0], // xAxisIndex: [0],
// start: 0, //默认为1 // start: 0, //默认为1
// end: 50, // end: 50,
// }, // },
], // ],
legendArr:[], legendArr:[],
legend: { legend: {
orient: 'horizontal', orient: 'horizontal',
bottom: '3%', bottom: '3%',
data:chartdata.legendArr data:chartdata.legendArr
}, },
tooltip: { tooltip: {
trigger: 'axis' trigger: 'axis'
}, },
backgroundColor:"#fff", backgroundColor:"#fff",
grid: { grid: {
top: '3%', top: '3%',
@ -127,13 +128,23 @@
containLabel: true containLabel: true
}, },
xAxis: [{ xAxis: [{
type: 'category', type: 'category',
axisLabel: {rotate: chartdata.rotate}, axisLabel: {
rotate: chartdata.rotate,
lineStyle: {
color: '#4d8bdc'
}
},
data: chartdata.xArr, data: chartdata.xArr,
}], }],
yAxis: [{ yAxis: [{
type: 'value', type: 'value',
minInterval: 1, minInterval: 1,
axisLabel: {
lineStyle: {
color: '#4d8bdc'
}
}
}], }],
series: chartdata.series series: chartdata.series
}) })
@ -141,4 +152,4 @@
} }
} }
} }
</script> </script>

@ -73,8 +73,8 @@
series: [{ series: [{
name: '数据', name: '数据',
type: 'pie', type: 'pie',
radius: ['60%', '90%'], radius: ['40%', '70%'],
center: ['50%', '50%'], //圆心坐标 center: ['50%', '45%'], //圆心坐标
avoidLabelOverlap: true, //是否启用防止标签重叠策略 avoidLabelOverlap: true, //是否启用防止标签重叠策略
label: { //每个数据的标签 label: { //每个数据的标签
show: true, //设置为true则显示第一个数据 show: true, //设置为true则显示第一个数据
@ -83,7 +83,7 @@
fontSize: 20, fontSize: 20,
fontWeight: 'bold' fontWeight: 'bold'
}, },
color: ['#695BF9', '#1E3E55'], //系列的颜色 color: ['#72d6d5','#4979b8'], //系列的颜色
emphasis: { //高亮,即鼠标经过时的样式 emphasis: { //高亮,即鼠标经过时的样式
scale: false //表示不放大item scale: false //表示不放大item
}, },

@ -2,7 +2,7 @@
<div> <div>
<el-drawer <el-drawer
size="800px" size="880px"
title="执行统计" title="执行统计"
:visible.sync="drawer" :visible.sync="drawer"
direction="rtl"> direction="rtl">
@ -30,19 +30,19 @@
<div class="content"> <div class="content">
<div class="item"> <div class="item">
<p class="item__title">年初预算合计金额(元)</p> <p class="item__title">年初预算合计金额(元)</p>
<div class="item__value">{{totalMoneyTotal1.toFixed(2)}}</div> <div class="item__value">{{moneyFormatter(totalMoneyTotal1)}}</div>
</div> </div>
<div class="item"> <div class="item">
<p class="item__title">调整后预算合计金额(元)</p> <p class="item__title">调整后预算合计金额(元)</p>
<div class="item__value">{{totalMoneyTotal2.toFixed(2)}}</div> <div class="item__value">{{moneyFormatter(totalMoneyTotal2)}}</div>
</div> </div>
<div class="item"> <div class="item">
<p class="item__title">已使用(元)</p> <p class="item__title">已使用(元)</p>
<div class="item__value">{{totalUseMoneyTotal.toFixed(2)}}</div> <div class="item__value">{{moneyFormatter(totalUseMoneyTotal)}}</div>
</div> </div>
<div class="item"> <div class="item">
<p class="item__title">执行情况</p> <p class="item__title">执行情况</p>
<el-progress class="item__value" :percentage="totalPercent"></el-progress> <el-progress class="item__value" text-inside :stroke-width="20" :percentage="totalPercent"></el-progress>
</div> </div>
</div> </div>
</Card> </Card>
@ -70,19 +70,19 @@
<div class="content"> <div class="content">
<div class="item"> <div class="item">
<p class="item__title">年初预算合计金额(元)</p> <p class="item__title">年初预算合计金额(元)</p>
<div class="item__value">{{totalMoneyTotal1Type.toFixed(2)}}</div> <div class="item__value">{{moneyFormatter(totalMoneyTotal1Type)}}</div>
</div> </div>
<div class="item"> <div class="item">
<p class="item__title">调整后预算合计金额(元)</p> <p class="item__title">调整后预算合计金额(元)</p>
<div class="item__value">{{totalMoneyTotal2Type.toFixed(2)}}</div> <div class="item__value">{{moneyFormatter(totalMoneyTotal2Type)}}</div>
</div> </div>
<div class="item"> <div class="item">
<p class="item__title">已使用(元)</p> <p class="item__title">已使用(元)</p>
<div class="item__value">{{totalUseMoneyTotalType.toFixed(2)}}</div> <div class="item__value">{{moneyFormatter(totalUseMoneyTotalType)}}</div>
</div> </div>
<div class="item"> <div class="item">
<p class="item__title">执行情况</p> <p class="item__title">执行情况</p>
<el-progress class="item__value" :percentage="totalPercent"></el-progress> <el-progress class="item__value" text-inside :stroke-width="20" :percentage="totalPercent"></el-progress>
</div> </div>
</div> </div>
</Card> </Card>
@ -93,6 +93,7 @@
</template> </template>
<script> <script>
import { moneyFormatter } from "@/utils"
import { typeCarry } from "@/api/dashboard/notice" import { typeCarry } from "@/api/dashboard/notice"
export default { export default {
props: { props: {
@ -116,6 +117,7 @@ export default {
} }
}, },
methods: { methods: {
moneyFormatter,
show () { show () {
this.drawer = true this.drawer = true
}, },
@ -151,10 +153,10 @@ export default {
return this.types.filter(i => this.typeSelect.find(j => j === i.id)) return this.types.filter(i => this.typeSelect.find(j => j === i.id))
}, },
totalMoneyTotal1Type () { totalMoneyTotal1Type () {
return this.selectedTypes.reduce((pre,cur)=>(pre+Number(cur.money_total||0)),0) || 0 return this.selectedTypes.reduce((pre,cur)=>(pre+Number(cur.money_total_1||0)),0) || 0
}, },
totalMoneyTotal2Type () { totalMoneyTotal2Type () {
return this.selectedTypes.reduce((pre,cur)=>(pre+Number(cur.update_money||0)),0) || 0 return this.selectedTypes.reduce((pre,cur)=>(pre+Number(cur.money_total_2||0)),0) || 0
}, },
totalUseMoneyTotalType () { totalUseMoneyTotalType () {
return this.selectedTypes.reduce((pre,cur)=>(pre+Number(cur.use_money_total||0)),0) || 0 return this.selectedTypes.reduce((pre,cur)=>(pre+Number(cur.use_money_total||0)),0) || 0
@ -177,26 +179,67 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.content { $color: linear-gradient(to top left, #ff6641, #ec3634),
padding: 0 20px; linear-gradient(to top left, #4bfbb2, #49f2ac),
linear-gradient(to top left, #efd458, #ba840a),
linear-gradient(to top left, #05e6ff, #0069fe),
linear-gradient(to top left, #a5ffff, #8fccd9),
linear-gradient(to top left, #fca7ff, #7a519a),
linear-gradient(to top left, #a4e829, #06ac2e);
.item { @for $index from 1 through length($color) {
.card#{$index} {
color: #fff;
display: flex; display: flex;
flex-direction: column;
justify-content: center;
background: nth($color, $index);
grid-area: card#{$index};
border-radius: 4px;
filter: drop-shadow(0 2px 8px #0004);
padding: 20px;
padding: 10px 0; .item__title {
&__title {
width: 200px;
font-weight: 600; font-weight: 600;
text-align: center;
padding-bottom: 20px;
position: relative;
padding-right: 20px; &::after {
content: '';
height: 2px;
background: linear-gradient(to right,#fff 40%,#0000);
position: absolute;
bottom: -1px;
left: 0;
right: 0;
}
} }
&__value { .item__value {
text-align: center;
flex: 1; flex: 1;
padding-top: 20px;
} }
}
}
.content {
display: grid;
grid-template-columns: repeat(4,1fr);
grid-gap: 20px;
& + & { padding: 20px 0;
margin-top: 20px; .item__title {
} text-align: center;
}
.item__value {
font-weight: 600;
font-size: 17px;
text-align: center;
padding-top: 20px;
} }
} }

@ -293,7 +293,7 @@
}"></el-date-picker> }"></el-date-picker>
</div> </div>
</template> </template>
<lineChart :chart-data="lineChartData"></lineChart> <lineChart height="500px" :chart-data="lineChartData"></lineChart>
</Card> </Card>
<detailContract ref="detailContract"></detailContract> <detailContract ref="detailContract"></detailContract>
@ -305,6 +305,7 @@
</template> </template>
<script> <script>
import echarts from 'echarts'
import detailContract from "@/views/contract/components/detailContract"; import detailContract from "@/views/contract/components/detailContract";
import LxHeader from "@/components/LxHeader/index.vue"; import LxHeader from "@/components/LxHeader/index.vue";
import Pagination from "@/components/Pagination"; import Pagination from "@/components/Pagination";
@ -509,58 +510,272 @@ export default {
methods: { methods: {
async getCarry () { async getCarry () {
const res = await carry(this.carrySelect); const res = await carry(this.carrySelect);
//组织数据
let setData = function(data, constData, showData) {
data.filter(function(item) {
if (item) {
constData.push(1);
showData.push(item);
} else {
constData.push(0);
showData.push({
value: 1,
itemStyle: {
normal: {
borderColor: "rgba(0,0,0,0)",
borderWidth: 2,
color: "rgba(0,0,0,0)",
},
},
});
}
});
}
//组织颜色
let setColor = function(colorArr) {
let color = {
type: "linear",
x: 0,
x2: 1,
y: 0,
y2: 0,
/* 此处决定阴暗面 若为横向柱状图则x,y轴调换
x: 0,
x2: 0,
y: 0,
y2: 1, */
colorStops: [{
offset: 0,
color: colorArr[0],
},
{
offset: 0.5,
color: colorArr[0],
},
{
offset: 0.5,
color: colorArr[1],
},
{
offset: 1,
color: colorArr[1],
},
],
};
return color
}
let curPlan = res?.map(i => {
const { use_money_total,paid_plan_total } = i
return paid_plan_total ? (Math.round((Number(use_money_total||0) / Number(paid_plan_total ||0)) * 10000) / 100) : 0;
});
let curAct = res?.map(i => {
const { use_money_total,money_total_2 } = i
return money_total_2 ? (Math.round((Number(use_money_total||0) / Number(money_total_2||0)) * 10000) / 100) : 0;
});
let nextPlan = res?.map(i => {
const { use_money_total_next,paid_plan_total_next } = i
return paid_plan_total_next ? (Math.round((Number(use_money_total_next||0) / Number(paid_plan_total_next||0)) * 10000) / 100) : 0;
});
let barWidth = 23;
let constData1 = [];
let showData1 = [];
let constData2 = [];
let showData2 = [];
let constData3 = [];
let showData3 = [];
setData(curPlan, constData1, showData1)
setData(curAct, constData2, showData2)
setData(nextPlan, constData3, showData3)
let colorArr1 = ["#345A8B", "#387ABD", "#398ac4"];
let colorArr2 = ["#51C0DB", "#42D9D6", "#45F5F1"];
let colorArr3 = ['#559372','#7ab798','#9edebc']
let color1 = setColor(colorArr1)
let color2 = setColor(colorArr2)
let color3 = setColor(colorArr3)
this.lineChartData = { this.lineChartData = {
rotate: 54, rotate: 54,
xArr: res?.map(i => i.plan_department?.name), xArr: res?.map(i => i.plan_department?.name),
series: [ series: [
{ {
name: `${this.carrySelect.month}计划`, z: 1,
type: 'bar', type: 'bar',
barGap: 0, barWidth: barWidth,
emphasis: { name: `${this.carrySelect.month}计划`,
focus: 'series' barGap: "96%", //相邻柱子间距
itemStyle: {
borderRadius: [0, 0, 0, 0],//柱子四周圆角
color: color1//柱子左右颜色(深,浅)
}, },
data: curPlan, //Y轴上的高度
label: {
show: true,
position: 'top',
textStyle: {//数值样式
fontSize: '5px',
color: '#4d8bdc',
},
formatter: params => `${params.value}%`
}
},
{
z: 2,
name: `${this.carrySelect.month}计划`,
type: "pictorialBar",
data: constData1,//此数据对应底部组件
symbol: "diamond",//底部组件形状,不写默认为椭圆
symbolOffset: ["-196%", "50%"],//与柱子的偏移角度
symbolSize: [barWidth, 10],//底面[宽,高]
itemStyle: { itemStyle: {
color: '#4d8bdc' normal: {
color: color1//底面左右颜色(深,浅)
},
},
tooltip: {
show: false,
}, },
data: res?.map(i => {
const { use_money_total,money_total_1 } = i
return Math.round((Number(use_money_total||0) / Number(money_total_1||0)) * 10000) / 100
})
}, },
{ {
name: `${this.carrySelect.month}实际`, z: 3,
name: `${this.carrySelect.month}计划`,
type: "pictorialBar",
symbolPosition: "end",
data: showData1,//此数据对应顶部组件
symbol: "diamond",
symbolOffset: ["-234%", "-50%"],
symbolSize: [barWidth - 4, (10 * (barWidth - 4)) / barWidth],
itemStyle: {
normal: {
borderColor: colorArr1[2],
borderWidth: 2,
color: colorArr1[2],
},
},
tooltip: {
show: false,
},
},
{
z: 4,
type: 'bar', type: 'bar',
barGap: 0, barWidth: barWidth,
emphasis: { name: `${this.carrySelect.month}实际`,
focus: 'series' itemStyle: {
borderRadius: [0, 0, 0, 0],
color: color2
}, },
data: curAct,
label: {
show: true,
position: 'top',
textStyle: {//数值样式
fontSize: '5px',
color: '#4d8bdc',
},
formatter: params => `${params.value}%`
}
},
{
z: 5,
name: `${this.carrySelect.month}实际`,
type: "pictorialBar",
data: constData2,
symbol: "diamond",
symbolOffset: ["0%", "50%"],
symbolSize: [barWidth, 10], //=========================
itemStyle: { itemStyle: {
color: '#7ab384' normal: {
color: color2
},
},
tooltip: {
show: false,
}, },
data: res?.map(i => {
const { use_money_total,money_total_2 } = i
return Math.round((Number(use_money_total||0) / Number(money_total_2||0)) * 10000) / 100
})
}, },
{ {
name: `${this.$moment(this.carrySelect.month).add(1,'months').format('YYYY-MM')}计划`, z: 6,
name: `${this.carrySelect.month}实际`,
type: "pictorialBar",
symbolPosition: "end",
data: showData2,
symbol: "diamond",
symbolOffset: ["0%", "-50%"],
symbolSize: [barWidth - 4, (10 * (barWidth - 4)) / barWidth],
itemStyle: {
normal: {
borderColor: colorArr2[2],
borderWidth: 2,
color: colorArr2[2]
},
},
tooltip: {
show: false,
},
},
{
z: 7,
type: 'bar', type: 'bar',
barGap: 0, barWidth: barWidth,
emphasis: { name: `${this.$moment(this.carrySelect.month).add(1,'months').format('YYYY-MM')}计划`,
focus: 'series' itemStyle: {
borderRadius: [0, 0, 0, 0],
color: color3
}, },
data: nextPlan,
label: {
show: true,
position: 'top',
textStyle: {//数值样式
fontSize: '5px',
color: '#4d8bdc',
},
formatter: params => `${params.value}%`
}
},
{
z: 8,
name: `${this.$moment(this.carrySelect.month).add(1,'months').format('YYYY-MM')}计划`,
type: "pictorialBar",
data: constData3,
symbol: "diamond",
symbolOffset: ["196%", "50%"],
symbolSize: [barWidth, 10],
itemStyle: { itemStyle: {
color: '#f7cb56' normal: {
color: color3
},
},
tooltip: {
show: false,
}, },
data: res?.map(i => {
const { use_money_total_next,money_total } = i
return Math.round((Number(use_money_total_next||0) / Number(money_total||0)) * 10000) / 100
})
}, },
{
z: 9,
name: `${this.$moment(this.carrySelect.month).add(1,'months').format('YYYY-MM')}计划`,
type: "pictorialBar",
symbolPosition: "end",
data: showData3,
symbol: "diamond",
symbolOffset: ["237%", "-50%"],
symbolSize: [barWidth - 4, (10 * (barWidth - 4)) / barWidth],
itemStyle: {
normal: {
borderColor: colorArr3[2],
borderWidth: 2,
color: colorArr3[2]
},
},
tooltip: {
show: false,
},
}
] ]
}; };
console.log(res)
}, },
changeYear(e) { changeYear(e) {

Loading…
Cancel
Save