修改统计图饼图

This commit is contained in:
471615499@qq.com 2024-11-05 18:21:42 +08:00
parent 72d8a4352e
commit 4035a349e5
3 changed files with 17 additions and 17 deletions

View File

@ -1,4 +1,4 @@
NODE_ENV=development NODE_ENV=development
VUE_APP_PREVIEW=true VUE_APP_PREVIEW=true
VUE_APP_API_BASE_URL=/api VUE_APP_API_BASE_URL=/api
VUE_APP_MODEL_BASE_URL=https://company.haxy.com.cn:4443/shoot-hand VUE_APP_MODEL_BASE_URL=https://jgsw.haxy.com.cn/shoot-hand

View File

@ -504,31 +504,30 @@ export default {
// //
let chartServe = echarts.init(document.getElementById('chartServe')) let chartServe = echarts.init(document.getElementById('chartServe'))
let serveData = data.serve let serveData = data.serve
let newServeData = []
let serveNumAll = 0 let serveNumAll = 0
for (let key in serveData) { for (let key in serveData) {
let eachNum = serveData[key].value let eachNum = serveData[key].value
let eachName = serveData[key].name
eachName = eachName.replaceAll('(请在备注中说明视频会议保障运营商)', '')
serveNumAll = serveNumAll + eachNum serveNumAll = serveNumAll + eachNum
newServeData.push({
name: eachName,
value: eachNum
})
} }
let chartServeOp = { let chartServeOp = {
tooltip: { tooltip: {
trigger: 'item' trigger: 'item'
}, },
legend: { legend: {
orient: 'vertical', // // orient: 'vertical', //
right: 10, // 10px bottom: 0, //
top: 'bottom' //
}, // }, //
grid: {
top: '0',
left: '2%',
right: '2%',
bottom: '1%',
containLabel: true
},
graphic: { graphic: {
type: 'text', type: 'text',
left: 'center', left: 'center',
top: 'center', top: '35%',
style: { style: {
text: serveNumAll, // text: serveNumAll, //
textAlign: 'center', textAlign: 'center',
@ -542,17 +541,18 @@ export default {
type: 'pie', type: 'pie',
radius: ['50%', '70%'], radius: ['50%', '70%'],
avoidLabelOverlap: false, avoidLabelOverlap: false,
center: ['50%', '40%'],
label: { label: {
show: true show: false
}, },
emphasis: { emphasis: {
label: { label: {
show: true, show: false,
fontSize: 40, fontSize: 40,
fontWeight: 'bold' fontWeight: 'bold'
} }
}, },
data: serveData data: newServeData
} }
] ]
} }

View File

@ -110,8 +110,8 @@ const vueConfig = {
port: 8000, port: 8000,
proxy: { proxy: {
'/api': { '/api': {
target: 'http://127.0.0.1:9227', //target: 'http://127.0.0.1:9227',
// target: 'https://baoxiu.jsgdha.com/shoot-hand', target: 'https://jgsw.haxy.com.cn/shoot-hand',
pathRewrite: { '^/api': '' }, pathRewrite: { '^/api': '' },
ws: false, ws: false,
changeOrigin: true changeOrigin: true