大屏
Showing
1 changed file
with
161 additions
and
33 deletions
| ... | @@ -2,29 +2,22 @@ | ... | @@ -2,29 +2,22 @@ |
| 2 | <div class="pd20"> | 2 | <div class="pd20"> |
| 3 | <div class="chartCard"> | 3 | <div class="chartCard"> |
| 4 | <div class="title">应收款余额</div> | 4 | <div class="title">应收款余额</div> |
| 5 | <!-- <div class="po_right">--> | ||
| 6 | <!-- <el-radio-group v-model="radioA" size="small" @change="radioAChange">--> | ||
| 7 | <!-- <el-radio-button label="本月" value="month"/>--> | ||
| 8 | <!-- <el-radio-button label="本季度" value="quarter"/>--> | ||
| 9 | <!-- <el-radio-button label="本年" value="year"/>--> | ||
| 10 | <!-- </el-radio-group>--> | ||
| 11 | <!-- </div>--> | ||
| 12 | <div ref="zhuRef" style="width: 100%; height: 24vh;"></div> | 5 | <div ref="zhuRef" style="width: 100%; height: 24vh;"></div> |
| 13 | </div> | 6 | </div> |
| 14 | 7 | ||
| 15 | <div class="chartCard mt30"> | 8 | <div class="chartCard mt30"> |
| 16 | <div> | 9 | <div> |
| 17 | <div class="title">应收账款余额与收入</div> | 10 | <div class="title">应收账款余额与收入</div> |
| 18 | <!-- <div class="title">--> | 11 | <div class="po_right"> |
| 19 | <!-- <el-select>--> | 12 | <el-select v-model="queryParams.select"> |
| 20 | <!-- <el-option label="全部基地(可多选)" value="month"/>--> | 13 | <el-option label="全部基地(可多选)" value="month"/> |
| 21 | <!-- </el-select>--> | 14 | </el-select> |
| 22 | <!-- </div>--> | 15 | </div> |
| 23 | <!-- <div class="title">--> | 16 | <div class="po_right"> |
| 24 | <!-- <el-select>--> | 17 | <el-select> |
| 25 | <!-- <el-option label="数据因素(可多选)" value="month"/>--> | 18 | <el-option label="数据因素(可多选)" value="month"/> |
| 26 | <!-- </el-select>--> | 19 | </el-select> |
| 27 | <!-- </div>--> | 20 | </div> |
| 28 | 21 | ||
| 29 | </div> | 22 | </div> |
| 30 | <!-- <div class="po_right">--> | 23 | <!-- <div class="po_right">--> |
| ... | @@ -67,11 +60,13 @@ | ... | @@ -67,11 +60,13 @@ |
| 67 | 60 | ||
| 68 | <script setup> | 61 | <script setup> |
| 69 | import {onMounted, ref, onUnmounted} from 'vue' | 62 | import {onMounted, ref, onUnmounted} from 'vue' |
| 70 | |||
| 71 | import {autoToolTip} from "@/plugins/auto-toolTip"; | 63 | import {autoToolTip} from "@/plugins/auto-toolTip"; |
| 72 | import * as echarts from "echarts"; | 64 | import * as echarts from "echarts"; |
| 73 | import * as api from "@/apiPc/common" | 65 | import * as api from "@/apiPc/common" |
| 74 | 66 | ||
| 67 | const queryParams = ref({ | ||
| 68 | select: '' | ||
| 69 | }) | ||
| 75 | const zhuRef = ref(null) | 70 | const zhuRef = ref(null) |
| 76 | const lineRef = ref(null) | 71 | const lineRef = ref(null) |
| 77 | const payeeRef = ref(null) | 72 | const payeeRef = ref(null) |
| ... | @@ -138,7 +133,7 @@ const setA = () => { | ... | @@ -138,7 +133,7 @@ const setA = () => { |
| 138 | chartA = echarts.init(zhuRef.value) | 133 | chartA = echarts.init(zhuRef.value) |
| 139 | const option = { | 134 | const option = { |
| 140 | tooltip: { | 135 | tooltip: { |
| 141 | trigger: 'item' | 136 | trigger: 'item', |
| 142 | }, | 137 | }, |
| 143 | legend: { | 138 | legend: { |
| 144 | orient: 'vertical', | 139 | orient: 'vertical', |
| ... | @@ -177,7 +172,10 @@ const setA = () => { | ... | @@ -177,7 +172,10 @@ const setA = () => { |
| 177 | emphasis: { | 172 | emphasis: { |
| 178 | show: false | 173 | show: false |
| 179 | } | 174 | } |
| 180 | } | 175 | }, |
| 176 | tooltip: { | ||
| 177 | trigger: 'axis', | ||
| 178 | }, | ||
| 181 | }, | 179 | }, |
| 182 | { | 180 | { |
| 183 | type: 'pie', | 181 | type: 'pie', |
| ... | @@ -192,6 +190,9 @@ const setA = () => { | ... | @@ -192,6 +190,9 @@ const setA = () => { |
| 192 | emphasis: { | 190 | emphasis: { |
| 193 | scale: false | 191 | scale: false |
| 194 | }, | 192 | }, |
| 193 | tooltip: { | ||
| 194 | trigger: 'axis', | ||
| 195 | }, | ||
| 195 | data: [ | 196 | data: [ |
| 196 | {value: 12, name: ''}, | 197 | {value: 12, name: ''}, |
| 197 | ] | 198 | ] |
| ... | @@ -204,7 +205,14 @@ const setA = () => { | ... | @@ -204,7 +205,14 @@ const setA = () => { |
| 204 | avoidLabelOverlap: false, | 205 | avoidLabelOverlap: false, |
| 205 | itemStyle: { | 206 | itemStyle: { |
| 206 | borderWidth: 2, | 207 | borderWidth: 2, |
| 207 | opacity: 0.8, | 208 | borderColor: 'rgba(255,0,0,0.05)', |
| 209 | color: function (params) { | ||
| 210 | // 自定义颜色 | ||
| 211 | let colorList = [ | ||
| 212 | '#8791FD', '#E35E1C', '#E47B75', '#F4AB09', '#F7E10F', '#068EEF', '#1050E4', '#01D7F0', '#46E874' | ||
| 213 | ]; | ||
| 214 | return colorList[params.dataIndex] | ||
| 215 | } | ||
| 208 | // borderColor: '#fff', | 216 | // borderColor: '#fff', |
| 209 | }, | 217 | }, |
| 210 | label: { | 218 | label: { |
| ... | @@ -230,7 +238,7 @@ const setA = () => { | ... | @@ -230,7 +238,7 @@ const setA = () => { |
| 230 | {value: 484, name: '合肥'}, | 238 | {value: 484, name: '合肥'}, |
| 231 | {value: 484, name: '武汉'}, | 239 | {value: 484, name: '武汉'}, |
| 232 | {value: 300, name: '新疆'} | 240 | {value: 300, name: '新疆'} |
| 233 | ] | 241 | ], |
| 234 | } | 242 | } |
| 235 | ] | 243 | ] |
| 236 | }; | 244 | }; |
| ... | @@ -248,7 +256,7 @@ const setB = () => { | ... | @@ -248,7 +256,7 @@ const setB = () => { |
| 248 | } | 256 | } |
| 249 | }, | 257 | }, |
| 250 | legend: { | 258 | legend: { |
| 251 | top: '10%', | 259 | top: '3%', |
| 252 | textStyle: { | 260 | textStyle: { |
| 253 | color: '#FFF' | 261 | color: '#FFF' |
| 254 | }, | 262 | }, |
| ... | @@ -262,23 +270,55 @@ const setB = () => { | ... | @@ -262,23 +270,55 @@ const setB = () => { |
| 262 | xAxis: [ | 270 | xAxis: [ |
| 263 | { | 271 | { |
| 264 | type: 'category', | 272 | type: 'category', |
| 265 | data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'] | 273 | data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], |
| 274 | axisLine: { | ||
| 275 | show: true, | ||
| 276 | lineStyle: { | ||
| 277 | color: '#fff', | ||
| 278 | width: 2, | ||
| 279 | type: 'solid' | ||
| 266 | } | 280 | } |
| 281 | }, | ||
| 282 | |||
| 283 | }, | ||
| 267 | ], | 284 | ], |
| 268 | yAxis: [ | 285 | yAxis: [ |
| 269 | { | 286 | { |
| 270 | type: 'value', | 287 | type: 'value', |
| 271 | name: '金额(万元)', | 288 | name: '金额(W)', |
| 289 | axisLine: { | ||
| 290 | show: true, | ||
| 291 | lineStyle: { | ||
| 292 | color: '#fff', | ||
| 293 | width: 1, | ||
| 294 | type: 'solid' | ||
| 272 | } | 295 | } |
| 296 | }, | ||
| 297 | } | ||
| 298 | |||
| 273 | ], | 299 | ], |
| 274 | series: [ | 300 | series: [ |
| 275 | { | 301 | { |
| 276 | name: '2025年应收账款余额', | 302 | name: '2025年应收账款余额', |
| 277 | type: 'bar', | 303 | type: 'bar', |
| 304 | barGap: 0, | ||
| 278 | emphasis: { | 305 | emphasis: { |
| 279 | focus: 'series' | 306 | focus: 'series' |
| 280 | }, | 307 | }, |
| 281 | data: [320, 332, 301, 334, 390, 330, 320, 320, 332, 301, 334, 390] | 308 | data: [320, 332, 301, 334, 390, 330, 320, 320, 332, 301, 334, 390], |
| 309 | itemStyle: { | ||
| 310 | color: { | ||
| 311 | type: 'linear', | ||
| 312 | x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变 | ||
| 313 | colorStops: [ | ||
| 314 | {offset: 0, color: 'rgba(32, 217, 170, 1)'}, // 顶部颜色 | ||
| 315 | {offset: 1, color: 'rgba(8, 130, 160, 1)'} // 底部颜色 | ||
| 316 | ], | ||
| 317 | }, | ||
| 318 | borderColor: '#00FFBE', | ||
| 319 | borderWidth: 1 | ||
| 320 | }, | ||
| 321 | barWidth: '15%' | ||
| 282 | }, | 322 | }, |
| 283 | { | 323 | { |
| 284 | name: '2024年应收账款余额', | 324 | name: '2024年应收账款余额', |
| ... | @@ -286,7 +326,20 @@ const setB = () => { | ... | @@ -286,7 +326,20 @@ const setB = () => { |
| 286 | emphasis: { | 326 | emphasis: { |
| 287 | focus: 'series' | 327 | focus: 'series' |
| 288 | }, | 328 | }, |
| 289 | data: [120, 132, 101, 134, 90, 230, 210, 101, 134, 90, 230, 210] | 329 | data: [120, 132, 101, 134, 90, 230, 210, 101, 134, 90, 230, 210], |
| 330 | itemStyle: { | ||
| 331 | color: { | ||
| 332 | type: 'linear', | ||
| 333 | x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变 | ||
| 334 | colorStops: [ | ||
| 335 | {offset: 0, color: 'rgba(32, 217, 170, .5)'}, // 顶部颜色 | ||
| 336 | {offset: 1, color: 'rgba(8, 130, 160, .5)'} // 底部颜色 | ||
| 337 | ], | ||
| 338 | borderColor: '#00FFBE', | ||
| 339 | borderWidth: 1 | ||
| 340 | } | ||
| 341 | }, | ||
| 342 | barWidth: '15%' | ||
| 290 | }, | 343 | }, |
| 291 | { | 344 | { |
| 292 | name: '2025年收入', | 345 | name: '2025年收入', |
| ... | @@ -294,7 +347,20 @@ const setB = () => { | ... | @@ -294,7 +347,20 @@ const setB = () => { |
| 294 | emphasis: { | 347 | emphasis: { |
| 295 | focus: 'series' | 348 | focus: 'series' |
| 296 | }, | 349 | }, |
| 297 | data: [220, 182, 191, 234, 290, 330, 310, 220, 182, 191, 234, 290,] | 350 | data: [220, 182, 191, 234, 290, 330, 310, 220, 182, 191, 234, 290,], |
| 351 | itemStyle: { | ||
| 352 | color: { | ||
| 353 | type: 'linear', | ||
| 354 | x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变 | ||
| 355 | colorStops: [ | ||
| 356 | {offset: 0, color: '#F2C400'}, // 顶部颜色 | ||
| 357 | {offset: 1, color: '#996500'} // 底部颜色 | ||
| 358 | ] | ||
| 359 | }, | ||
| 360 | borderColor: '#F0FF00', | ||
| 361 | borderWidth: 1 | ||
| 362 | }, | ||
| 363 | barWidth: '15%' | ||
| 298 | }, | 364 | }, |
| 299 | { | 365 | { |
| 300 | name: '2024年收入', | 366 | name: '2024年收入', |
| ... | @@ -302,7 +368,20 @@ const setB = () => { | ... | @@ -302,7 +368,20 @@ const setB = () => { |
| 302 | emphasis: { | 368 | emphasis: { |
| 303 | focus: 'series' | 369 | focus: 'series' |
| 304 | }, | 370 | }, |
| 305 | data: [150, 232, 201, 154, 190, 330, 410, 201, 154, 190, 330, 410] | 371 | data: [150, 232, 201, 154, 190, 330, 410, 201, 154, 190, 330, 410], |
| 372 | itemStyle: { | ||
| 373 | color: { | ||
| 374 | type: 'linear', | ||
| 375 | x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变 | ||
| 376 | colorStops: [ | ||
| 377 | {offset: 0, color: 'rgba(242, 196, 0,.5 )'}, // 顶部颜色 | ||
| 378 | {offset: 1, color: 'rgba(153, 101, 0,.5 )'} // 底部颜色 | ||
| 379 | ] | ||
| 380 | }, | ||
| 381 | borderColor: '#F0FF00', | ||
| 382 | borderWidth: 1 | ||
| 383 | }, | ||
| 384 | barWidth: '15%' | ||
| 306 | }, | 385 | }, |
| 307 | ] | 386 | ] |
| 308 | } | 387 | } |
| ... | @@ -334,13 +413,29 @@ const setC = () => { | ... | @@ -334,13 +413,29 @@ const setC = () => { |
| 334 | { | 413 | { |
| 335 | type: 'category', | 414 | type: 'category', |
| 336 | stack: 'Ad', | 415 | stack: 'Ad', |
| 337 | data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'] | 416 | data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], |
| 417 | axisLine: { | ||
| 418 | show: true, | ||
| 419 | lineStyle: { | ||
| 420 | color: '#fff', | ||
| 421 | width: 2, | ||
| 422 | type: 'solid' | ||
| 423 | } | ||
| 424 | }, | ||
| 338 | } | 425 | } |
| 339 | ], | 426 | ], |
| 340 | yAxis: [ | 427 | yAxis: [ |
| 341 | { | 428 | { |
| 342 | type: 'value', | 429 | type: 'value', |
| 343 | name: '金额(万元)', | 430 | name: '金额(万元)', |
| 431 | axisLine: { | ||
| 432 | show: true, | ||
| 433 | lineStyle: { | ||
| 434 | color: '#fff', | ||
| 435 | width: 2, | ||
| 436 | type: 'solid' | ||
| 437 | } | ||
| 438 | }, | ||
| 344 | } | 439 | } |
| 345 | ], | 440 | ], |
| 346 | series: [ | 441 | series: [ |
| ... | @@ -351,7 +446,18 @@ const setC = () => { | ... | @@ -351,7 +446,18 @@ const setC = () => { |
| 351 | emphasis: { | 446 | emphasis: { |
| 352 | focus: 'series' | 447 | focus: 'series' |
| 353 | }, | 448 | }, |
| 354 | data: [320, 332, 301, 334, 390, 330, 320, 320, 332, 301, 334, 390] | 449 | data: [320, 332, 301, 334, 390, 330, 320, 320, 332, 301, 334, 390], |
| 450 | itemStyle: { | ||
| 451 | color: { | ||
| 452 | type: 'linear', | ||
| 453 | x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变 | ||
| 454 | colorStops: [ | ||
| 455 | {offset: 0, color: 'rgba(17, 201, 104,1 )'}, // 顶部颜色 | ||
| 456 | {offset: 1, color: 'rgba(70, 232, 116,1 )'} // 底部颜色 | ||
| 457 | ] | ||
| 458 | }, | ||
| 459 | }, | ||
| 460 | barWidth: '40%' | ||
| 355 | }, | 461 | }, |
| 356 | { | 462 | { |
| 357 | name: '收费单待签', | 463 | name: '收费单待签', |
| ... | @@ -360,7 +466,18 @@ const setC = () => { | ... | @@ -360,7 +466,18 @@ const setC = () => { |
| 360 | emphasis: { | 466 | emphasis: { |
| 361 | focus: 'series' | 467 | focus: 'series' |
| 362 | }, | 468 | }, |
| 363 | data: [120, 132, 101, 134, 90, 230, 210, 101, 134, 90, 230, 210] | 469 | data: [120, 132, 101, 134, 90, 230, 210, 101, 134, 90, 230, 210], |
| 470 | itemStyle: { | ||
| 471 | color: { | ||
| 472 | type: 'linear', | ||
| 473 | x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变 | ||
| 474 | colorStops: [ | ||
| 475 | {offset: 0, color: 'rgba(244, 171, 9, 1)'}, // 顶部颜色 | ||
| 476 | {offset: 1, color: 'rgba(234, 216, 18, 1)'} // 底部颜色 | ||
| 477 | ] | ||
| 478 | }, | ||
| 479 | }, | ||
| 480 | barWidth: '40%' | ||
| 364 | }, | 481 | }, |
| 365 | { | 482 | { |
| 366 | name: '合同待签', | 483 | name: '合同待签', |
| ... | @@ -369,7 +486,18 @@ const setC = () => { | ... | @@ -369,7 +486,18 @@ const setC = () => { |
| 369 | emphasis: { | 486 | emphasis: { |
| 370 | focus: 'series' | 487 | focus: 'series' |
| 371 | }, | 488 | }, |
| 372 | data: [220, 182, 191, 234, 290, 330, 310, 220, 182, 191, 234, 290,] | 489 | data: [220, 182, 191, 234, 290, 330, 310, 220, 182, 191, 234, 290,], |
| 490 | itemStyle: { | ||
| 491 | color: { | ||
| 492 | type: 'linear', | ||
| 493 | x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变 | ||
| 494 | colorStops: [ | ||
| 495 | {offset: 0, color: 'rgba(0, 168, 255, 1)'}, // 顶部颜色 | ||
| 496 | {offset: 1, color: 'rgba(77, 197, 243, 1)'} // 底部颜色 | ||
| 497 | ] | ||
| 498 | }, | ||
| 499 | }, | ||
| 500 | barWidth: '40%' | ||
| 373 | }, | 501 | }, |
| 374 | ] | 502 | ] |
| 375 | } | 503 | } | ... | ... |
-
Please register or sign in to post a comment