main
			
			
		
		
							parent
							
								
									44f628ce78
								
							
						
					
					
						commit
						8a5ab2fcb6
					
				| 
						 | 
				
			
			@ -1,7 +1,6 @@
 | 
			
		|||
import { createApp } from 'vue'
 | 
			
		||||
 | 
			
		||||
import Cookies from 'js-cookie'
 | 
			
		||||
import "echarts-gl";
 | 
			
		||||
import ElementPlus from 'element-plus'
 | 
			
		||||
import locale from 'element-plus/lib/locale/lang/zh-cn' // 中文语言
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -112,23 +112,26 @@ const getPie3D = (pieData, internalDiameterRatio, rateName) => {
 | 
			
		|||
          fontSize: 14
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
    //   formatter: data => {
 | 
			
		||||
    //     return data.value ? `{title|${data.data.name}:}{rich|${data.value}}(次)\n{title|${rateName || '整改率'}:}{rich|${data.data.rate}%}` : ''
 | 
			
		||||
    //   } // 值为0的就不展示默认的示例
 | 
			
		||||
      formatter: data => {
 | 
			
		||||
        return data.value ? `{title|${data.data.name}:}
 | 
			
		||||
        {rich|${data.data.rate}%}` : ''
 | 
			
		||||
      } // 值为0的就不展示默认的示例
 | 
			
		||||
    },
 | 
			
		||||
    tooltip: {
 | 
			
		||||
      show: true,
 | 
			
		||||
      formatter: params => {
 | 
			
		||||
        if (params.seriesName !== 'mouseoutSeries' && params.seriesName !== 'pie2d') {
 | 
			
		||||
          console.log(option.series[params.seriesIndex].pieData)
 | 
			
		||||
          let bfb = ((option.series[params.seriesIndex].pieData.endRatio - option.series[params.seriesIndex].pieData.startRatio) *
 | 
			
		||||
            100).toFixed(2)
 | 
			
		||||
          if (bfb === 'NaN') {
 | 
			
		||||
            bfb = 0
 | 
			
		||||
          }
 | 
			
		||||
          // let bfb = ((option.series[params.seriesIndex].pieData.endRatio - option.series[params.seriesIndex].pieData.startRatio) *
 | 
			
		||||
          //   100).toFixed(2)
 | 
			
		||||
          // if (bfb === 'NaN') {
 | 
			
		||||
          //   bfb = 0
 | 
			
		||||
          // }
 | 
			
		||||
 | 
			
		||||
          const rate = option.series[params.seriesIndex].pieData.rate;
 | 
			
		||||
          return `${params.seriesName}: ${option.series[params.seriesIndex].pieData.value}<br/>` +
 | 
			
		||||
            `<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${params.color};"></span>占比:` +
 | 
			
		||||
            `${bfb}%`
 | 
			
		||||
            `${rate}%`
 | 
			
		||||
        }
 | 
			
		||||
      } // hover示例
 | 
			
		||||
    },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -43,7 +43,7 @@ const { buildInfo } = toRefs(data);
 | 
			
		|||
    right: 10px;
 | 
			
		||||
    // background: #0a1f2e;
 | 
			
		||||
    // border: 1px solid red;
 | 
			
		||||
    width: 280px;
 | 
			
		||||
    width: 320px;
 | 
			
		||||
    height: 340px;
 | 
			
		||||
    display: flex;
 | 
			
		||||
    flex-direction: column;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -69,7 +69,7 @@ const openDialog = () => {
 | 
			
		|||
    position: absolute;
 | 
			
		||||
    top: 410px;
 | 
			
		||||
    right: 10px;
 | 
			
		||||
    width: 280px;
 | 
			
		||||
    width: 360px;
 | 
			
		||||
    // height: 460px;
 | 
			
		||||
    display: flex;
 | 
			
		||||
    flex-direction: column;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -36,7 +36,7 @@ const { deviceInfo } = toRefs(data);
 | 
			
		|||
    position: absolute;
 | 
			
		||||
    top: 10px;
 | 
			
		||||
    right: 10px;
 | 
			
		||||
    width: 280px;
 | 
			
		||||
    width: 360px;
 | 
			
		||||
    height: 340px;
 | 
			
		||||
    display: flex;
 | 
			
		||||
    flex-direction: column;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -34,7 +34,7 @@ const { optionsData } = toRefs(data);
 | 
			
		|||
const optionData = optionsData.value.map((item) => {
 | 
			
		||||
    return {
 | 
			
		||||
        ...item,
 | 
			
		||||
        rate: item.value / 181,
 | 
			
		||||
        rate: (item.value / 100) *100,
 | 
			
		||||
    };
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -69,8 +69,8 @@ const openDialog = () => {
 | 
			
		|||
    position: absolute;
 | 
			
		||||
    top: 410px;
 | 
			
		||||
    right: 10px;
 | 
			
		||||
    width: 280px;
 | 
			
		||||
    height: 420px;
 | 
			
		||||
    width: 360px;
 | 
			
		||||
    height: 460px;
 | 
			
		||||
    display: flex;
 | 
			
		||||
    flex-direction: column;
 | 
			
		||||
    align-items: center;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -38,7 +38,7 @@ const { equipmentInfo } = toRefs(data);
 | 
			
		|||
    position: absolute;
 | 
			
		||||
    top: 10px;
 | 
			
		||||
    right: 10px;
 | 
			
		||||
    width: 280px;
 | 
			
		||||
    width: 320px;
 | 
			
		||||
    height: 340px;
 | 
			
		||||
    display: flex;
 | 
			
		||||
    flex-direction: column;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -63,7 +63,7 @@ const openDialog = () => {
 | 
			
		|||
    position: absolute;
 | 
			
		||||
    top: 410px;
 | 
			
		||||
    right: 10px;
 | 
			
		||||
    width: 280px;
 | 
			
		||||
    width: 320px;
 | 
			
		||||
    display: flex;
 | 
			
		||||
    flex-direction: column;
 | 
			
		||||
    align-items: center;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,7 +12,7 @@ const props = defineProps({
 | 
			
		|||
</script>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.top-div {
 | 
			
		||||
    width: 280px;
 | 
			
		||||
    width: 360px;
 | 
			
		||||
    height: 56px;
 | 
			
		||||
    background-size: 100% 100% !important;
 | 
			
		||||
    background: url(@/assets/images/top.png) no-repeat;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue