| | |
| | | margin-left: 3px; |
| | | width: 1.6rem; |
| | | height: 1.6rem; |
| | | // border-radius: 50%; |
| | | // flex-shrink: 0; |
| | | background-position: center; |
| | | background-repeat: no-repeat; |
| | | background-size: contain; |
| | | } |
| | | |
| | | .content-wrapper { |
| | |
| | | industryJobNumPieChart(params).then(res => { |
| | | const resList = res?.data?.data || []; |
| | | jcOrder.value = resList; |
| | | if (resList.length > 0) { |
| | | nextTick(() => { |
| | | nextTick(() => { |
| | | initChart() |
| | | pieInit(resList) |
| | | }) |
| | | } |
| | | }); |
| | | }; |
| | | watch( |
| | |
| | | { immediate: true } |
| | | ); |
| | | const pieInit = resList => { |
| | | if (!jcchart.value || !resList?.length) return |
| | | |
| | | // if (!jcchart.value || !resList?.length) return |
| | | const validData = resList?.filter(item => item.name).sort((a, b) => b.value - a.value); // 从大到小排序 |
| | | const colors = [ |
| | | '#F87E04', // 橙色 |
| | |
| | | yAxisData: validData.map(item => item.name), |
| | | seriesData: validData.map(item => item.value), |
| | | }; |
| | | |
| | | |
| | | const option = { |
| | | title: { |
| | | text: optionData.seriesData?.length ? '' :'暂无数据', |
| | | text: resList.length ? '' :'暂无数据', |
| | | left: 'center', |
| | | top: 'center', |
| | | textStyle: { |
| | |
| | | |
| | | const getStaticsList = () => { |
| | | getStatics(userInfo.value.detail.areaCode).then(res => { |
| | | // console.log('permission.value', permission.value); |
| | | console.log('permission.value', permission.value); |
| | | // console.log('设备', res.data.data); |
| | | if (permission.value?.device_statistics_six) { |
| | | const { move_list, monitor_list, ...filteredData } = res.data.data; |