Merge remote-tracking branch 'origin/master' into SCREEN

This commit is contained in:
fengchenchen
2022-12-02 10:59:01 +08:00
+20 -13
View File
@@ -26,6 +26,10 @@
</a-tooltip>
</template>
<span v-for="item in columns" :slot="item.dataIndex" :key="item.dataIndex">
<j-ellipsis :length="7" :value=" item[item.dataIndex] "></j-ellipsis>
</span>
<template slot="allMoney" slot-scope="text">
<a-tooltip>
<template slot="title">{{ formatMoney(text) }}</template>
@@ -139,16 +143,18 @@ export default {
{
title: '',
align: 'center',
width: 140,
width: 120,
dataIndex: 'indexName',
scopedSlots: {customRender: 'text'}
},
]
data.map((item, index) => {
this.columns.push({
title: item.name,
// title: item.name,
slots:{title: 'key' + index},
['key' + index]:item.name,
align: 'center',
width: index < 7 ? 190 : 120,
width: 130,
dataIndex: 'key' + index,
scopedSlots: {customRender: 'allMoney'}
},)
@@ -159,12 +165,12 @@ export default {
let xData = data.reduce((pre, val) => {
return pre.concat(val.name)
}, [])
xData = xData.slice(0,7)
xData = xData.filter(e => e !== '总数')
// 处理y轴数据
data.map((item,index) => {
if(index < 7){
this.echartsData.allMoney.push({value:item.allMoney,percent:item.value})
this.echartsData.confirmAmount.push({value:item.confirmAmount,percent:item.value})
data.map(item => {
if (item.name !== '总数') {
this.echartsData.allMoney.push({value: item.allMoney, percent: item.value})
this.echartsData.confirmAmount.push({value: item.confirmAmount, percent: item.value})
}
})
@@ -190,7 +196,7 @@ export default {
// 获取xAxis data中的数据
let dataStr = ''
params.forEach(item => {
dataStr += `<div>
dataStr += `<div>
<div style="margin: 0 8px;">
<div>
<span style="display:inline-block;margin-right:5px;width:15px;height:10px;background-color:${item.color};border-radius: 3px"></span>
@@ -304,7 +310,7 @@ export default {
* @param num1 确收金额
* @param num2 年度待确收金额
* */
calcPercent(num1,num2){
calcPercent(num1, num2) {
let pointNo = Number(num1) / Number(num2) * 100
return pointNo.toFixed(1) + '%'
}
@@ -335,19 +341,20 @@ export default {
/deep/ .ant-table-thead tr > th {
color: #050525;
font-weight: bold;
background: rgb(245,245,246);
background: rgb(245, 245, 246);
border: none;
}
/deep/ .ant-table-tbody tr > td {
color: rgba(5, 5, 37, 0.8);
border: none;
border-bottom: 1px solid rgb(245,245,246);
border-bottom: 1px solid rgb(245, 245, 246);
}
/deep/ .ant-table-tbody tr > td:first-child {
color: #050525;
font-weight: bold;
background: rgb(245,245,246);
background: rgb(245, 245, 246);
}
</style>