main
王文龙 2023-11-16 17:30:53 +08:00
parent 06a7306603
commit 4d66be55fd
4 changed files with 46 additions and 17 deletions

View File

@ -368,7 +368,7 @@ const thisSelect = (e) => {
<th>交涉</th>
<td :rowspan="disList[0].budget ==disList[1].budget?'2':''">{{disList[0].budget}}%</td>
<td :rowspan="disList[0].monthOne ==disList[1].monthOne?'2':''">{{disList[0].monthOne}}%</td>
<td :rowspan="disList[0].budget ==disList[1].budget?'2':''">{{disList[0].monthTwo}}%</td>
<td :rowspan="disList[0].monthTwo ==disList[1].monthTwo?'2':''">{{disList[0].monthTwo}}%</td>
</tr>
<tr>
<th>THEME</th>

View File

@ -28,6 +28,7 @@ const dataB = ref([])
const dataD = ref([])
const dataC = ref([])
const dataE = ref([])
const SCMData = ref([])
onMounted(async () => {
getData()
})

View File

@ -11,6 +11,7 @@ import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
const { chartRef, option } = charData()
const { chartRef: chartRef1, option: option1 } = charData2()
const { chartRef: chartRefP1, option: optionP1 } = pieData1()
import { NNumberAnimation } from "naive-ui";
const locale = computed(() => zhCn)
const YearTime1 = ref('2020')
@ -129,16 +130,31 @@ const cardsClick = (it) => {
</div>
<div class="m20px h-100px bg-#F5F8FF p10px">
<div class="py5px">
<!-- <n-number-animation show-separator :from="0" :to="10700"/>碳排放量159,158-->
<span class="text-18px font-bold text-#3164BF"></span
><span class="ml5px">使用量0.000碳排放量0.000</span>
>
<span class="ml5px">使用量
<n-number-animation show-separator :from="0" :duration="0" :to="10700"/>碳排放量
<n-number-animation show-separator :from="0" :duration="0" :to="159158"/>
</span>
</div>
<div class="py5px">
<span class="text-18px font-bold text-#3164BF"></span
><span class="ml5px">使用量0.000碳排放量0.000</span>
<span class="text-18px font-bold text-#3164BF"></span
>
<!-- <span class="ml5px">使用量72,645碳排放量165,731</span> -->
<span class="ml5px">使用量
<n-number-animation show-separator :from="0" :duration="0" :to="72645"/>碳排放量
<n-number-animation show-separator :from="0" :duration="0" :to="165731"/>
</span>
</div>
<div class="py5px">
<span class="text-18px font-bold text-#3164BF"></span
><span class="ml5px">使用量0.000碳排放量0.000</span>
<span class="text-18px font-bold text-#3164BF"></span
>
<!-- <span class="ml5px">使用量0.000碳排放量0.000</span> -->
<span class="ml5px">使用量
<n-number-animation show-separator :from="0" :duration="0" :to="14682"/>碳排放量
<n-number-animation show-separator :from="0" :duration="0" :to="78942"/>
</span>
</div>
</div>
</div>

View File

@ -342,15 +342,16 @@ export function pieData1() {
containLabel: true
},
// legend: {
// orient: 'vertical',
// left: 'left'
// // orient: 'vertical',
// left: 'left',
// padding: [30, 0, 0, 20]
// },
series: [
{
name: 'Access From',
name: '',
type: 'pie',
selectedMode: 'single',
radius: [0, '30%'],
radius: [0, '50%'],
label: {
position: 'inner',
fontSize: 14
@ -360,19 +361,24 @@ export function pieData1() {
},
data: [
{
value: 1548,
value: 159158,
name: '铝',
label: { color: '#fff', fontSize: '16px', fontWeight: 'bold' }
},
{
value: 775,
value: 165731,
name: '铁',
label: { color: '#fff', fontSize: '16px', fontWeight: 'bold' }
},
{
value: 679,
value: 78942,
name: '铜',
selected: true,
// selected: true,
label: { color: '#fff', fontSize: '16px', fontWeight: 'bold' }
},
{
value: 10000,
name: '树脂',
label: { color: '#fff', fontSize: '16px', fontWeight: 'bold' }
}
],
@ -386,14 +392,19 @@ export function pieData1() {
normal: {
// 自定义每个扇形的颜色
color: function (params) {
const colorList = ['#3EC22B', '#3EC22B', '#3EC22B']
const colorList = ['#3EC22B', '#3EC22B', '#3EC22B', '#3EC22B']
return colorList[params.dataIndex]
}
}
},
hoverOffset: 0,
hoverAnimation: false,
emphasis: {
scale: false
}
},
{
name: 'Access From',
name: '',
type: 'pie',
radius: ['45%', '60%'],
avoidLabelOverlap: false,
@ -441,7 +452,8 @@ export function pieData1() {
data: [
{ value: 0.0, name: '铝' },
{ value: 0.0, name: '铁' },
{ value: 0.0, name: '铜' }
{ value: 0.0, name: '铜' },
{ value: 0.0, name: '树脂' }
]
// 自定义颜色
// itemStyle: {