| | |
| | | <template> |
| | | <div class="charts-cont"> |
| | | <!-- <div class="pro" :id="pro">--> |
| | | <div class="pro" :id="pro"> |
| | | |
| | | <!-- </div>--> |
| | | <dv-active-ring-chart :config="config" style="width:100%;height:100%" /> |
| | | </div> |
| | | <!-- <dv-active-ring-chart :config="config" style="width:100%;height:100%" />--> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | lineWidth: fontSize(25), |
| | | digitalFlopStyle: { |
| | | fontSize: 16, |
| | | fill: '#fff' |
| | | fill: '#999' |
| | | } |
| | | } |
| | | }) |
| | | // type EChartsOption = echarts.EChartsOption |
| | | // // 隐患整改情况 |
| | | // const initPro =()=>{ |
| | | // let dom = document.getElementById(pro.value); |
| | | // let myChart = echarts.init(dom); |
| | | // |
| | | // let option: EChartsOption; |
| | | // |
| | | // option = { |
| | | // tooltip: { |
| | | // trigger: 'item' |
| | | // }, |
| | | // legend: { |
| | | // top: '0', |
| | | // left: 'center', |
| | | // textStyle:{ |
| | | // color: '#fff', |
| | | // fontSize: fontSize(11) |
| | | // } |
| | | // }, |
| | | // series: [ |
| | | // { |
| | | // name: 'Access From', |
| | | // type: 'pie', |
| | | // radius: ['45%', '70%'], |
| | | // avoidLabelOverlap: false, |
| | | // itemStyle: { |
| | | // borderRadius: 4 |
| | | // }, |
| | | // label: { |
| | | // show: true, |
| | | // position: 'outer', |
| | | // fontSize: fontSize(12), |
| | | // color: '#ffffff', |
| | | // textBorderWidth: 0, |
| | | // width: 30, |
| | | // overflow: 'break' |
| | | // }, |
| | | // labelLine: { |
| | | // show: true, |
| | | // length: 10, |
| | | // length2: 10 |
| | | // }, |
| | | // emphasis: { |
| | | // label: { |
| | | // show: true, |
| | | // fontSize: fontSize(22), |
| | | // fontWeight: 'bold' |
| | | // } |
| | | // }, |
| | | // data: [ |
| | | // { value: 1048, name: '持证人员' }, |
| | | // { value: 735, name: '非持证人员' } |
| | | // ], |
| | | // center: ['50%','55%'] |
| | | // } |
| | | // ] |
| | | // }; |
| | | // |
| | | // option && myChart.setOption(option); |
| | | // window.addEventListener("resize",function (){ |
| | | // myChart.resize(); |
| | | // }); |
| | | // } |
| | | type EChartsOption = echarts.EChartsOption |
| | | // 隐患整改情况 |
| | | const initPro =()=>{ |
| | | let dom = document.getElementById(pro.value); |
| | | let myChart = echarts.init(dom); |
| | | |
| | | let option: EChartsOption; |
| | | |
| | | option = { |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | legend: { |
| | | top: '0', |
| | | left: 'center', |
| | | textStyle:{ |
| | | color: '#999', |
| | | fontSize: fontSize(11) |
| | | } |
| | | }, |
| | | series: [ |
| | | { |
| | | name: 'Access From', |
| | | type: 'pie', |
| | | radius: ['45%', '70%'], |
| | | avoidLabelOverlap: false, |
| | | itemStyle: { |
| | | borderRadius: 4 |
| | | }, |
| | | label: { |
| | | show: true, |
| | | position: 'outer', |
| | | fontSize: fontSize(12), |
| | | color: '#999', |
| | | textBorderWidth: 0, |
| | | width: 30, |
| | | overflow: 'break' |
| | | }, |
| | | labelLine: { |
| | | show: true, |
| | | length: 10, |
| | | length2: 10 |
| | | }, |
| | | emphasis: { |
| | | label: { |
| | | show: true, |
| | | fontSize: fontSize(22), |
| | | fontWeight: 'bold' |
| | | } |
| | | }, |
| | | data: [ |
| | | { value: 1048, name: '持证人员' }, |
| | | { value: 735, name: '非持证人员' } |
| | | ], |
| | | center: ['50%','55%'] |
| | | } |
| | | ] |
| | | }; |
| | | |
| | | option && myChart.setOption(option); |
| | | window.addEventListener("resize",function (){ |
| | | myChart.resize(); |
| | | }); |
| | | } |
| | | function fontSize(val){ |
| | | let nowClientWidth = document.documentElement.clientWidth; |
| | | return val * (nowClientWidth/1920) * Number(props.size); |
| | |
| | | |
| | | // 页面载入时执行方法 |
| | | onMounted(() => { |
| | | initPro() |
| | | }); |
| | | |
| | | return { |