Hwt 2 سال پیش
والد
کامیت
c3dc486fe3

+ 1 - 1
commandCenter/src/views/communityAssets/assembly/indexOptionChart.js

@@ -272,7 +272,7 @@ export const ringTypeEnlarges = (color = [], data = [], title = {}, legendFcunti
         series: [
             {
                 type: 'pie',
-                radius: ['50%', '65%'],
+                radius: ['50%', '64%'],
                 avoidLabelOverlap: false,
                 center: ['25%', '50%'],
                 label: {

+ 1 - 1
commandCenter/src/views/communityAssets/assembly/rentalAndSaleRate.vue

@@ -19,7 +19,7 @@
   </div>
 </template>
 <script>
-import { ringType, ringTypeEnlarge, ringTypeEnlarges } from './indexOptionChart';
+import { ringType, ringTypeEnlarges } from './indexOptionChart';
 import index from './allcommunit'
 let defaultTitle = {
   text: `{a|租售率}`,

+ 3 - 3
commandCenter/src/views/financialAnalysis/smallModuleIndex/incomeMode.vue

@@ -38,7 +38,7 @@
   </div>
 </template>
 <script>
-import { GradualChange, ringTypes, ringTypeEnlarge } from './indexOptionChart';
+import { GradualChange, ringTypes, ringTypeEnlarges } from './indexOptionChart';
 const colors = [
   GradualChange('#22D8FF', '#00B2FF'),
   GradualChange('#F0646C', '#F4994E'),
@@ -82,7 +82,7 @@ export default {
           if (window.screen.width == 1920 || window.screen.width < 1920) {
             this.clientOptions = ringTypes(colors, this.eachartObj(data), {}, { type: '%', total: this.total });
           } else if (window.screen.width == 2560 || window.screen.width > 1920) {
-            this.clientOptions = ringTypeEnlarge(colors, this.eachartObj(data), {}, { type: '%', total: this.total });
+            this.clientOptions = ringTypeEnlarges(colors, this.eachartObj(data), {}, { type: '%', total: this.total });
           }
         }
       });
@@ -130,7 +130,7 @@ export default {
       );
     } else if (window.screen.width == 2560 || window.screen.width > 1920) {
       this.valueClass = 2;
-      this.clientOptions = ringTypeEnlarge(
+      this.clientOptions = ringTypeEnlarges(
         colors,
         [
           { value: 0, name: '微信' },

+ 76 - 0
commandCenter/src/views/financialAnalysis/smallModuleIndex/indexOptionChart.js

@@ -289,6 +289,82 @@ export const ringTypeEnlarge = (color = [], data = [], title = {}, legendFcuntio
         ]
     };
 };
+export const ringTypeEnlarges = (color = [], data = [], title = {}, legendFcuntion = {}) => {
+    let legendFcuntionValue = (v) => {
+        let val = '';
+        data.map((item) => {
+            if (item.name == v) {
+                if (legendFcuntion.type == '%') {
+                    val = `{a|${v}} · · · · · · {b|${parseInt((item.value / legendFcuntion.total).toFixed(2) * 100) || 0}%}`;
+                } else {
+                    if (v.length > 5 || v.length == 5) {
+                        let va = v.substr(0, 3) + '…';
+                        val = `{a|${va}} · · · · {b|${item.value}}`;
+                    } else if (item.value.length == 4 || item.value.length > 4) {
+                        let itval = item.value.substr(0, 4) + '…';
+                        val = `{a|${v}} · · · · {b|${itval}}`;
+                    } else if ((v.length > 5 || v.length == 5) && (item.value.length == 4 || item.value.length > 4)) {
+                        let va = v.substr(0, 3) + '…';
+                        let itval = item.value.substr(0, 4) + '…';
+                        val = `{a|${va}} · · · · {b|${itval}}`;
+                    } else {
+                        val = `{a|${v}} · · · · {b|${item.value}}`;
+                    }
+                }
+            }
+        });
+        return val;
+    };
+    return {
+        tooltip: {
+            trigger: 'item'
+        },
+        legend: {
+            orient: 'vertical',
+            right: 30,
+            top: 70,
+            itemGap: 10,
+            itemWidth: 12, // 图例图形宽度
+            itemHeight: 8,
+            type: 'scroll',
+            formatter: (v) => {
+                return legendFcuntionValue(v);
+            },
+            textStyle: {
+                rich: {
+                    a: {
+                        fontSize: 12,
+                        color: '#858892',
+                        padding: [0, 5, 0, 0]
+                    },
+                    b: {
+                        fontSize: 14,
+                        color: '#fff',
+                        padding: [0, 0, 0, 5]
+                    }
+                }
+            }
+        },
+        title,
+        color: !!color.length ? color : defaultColor,
+        series: [
+            {
+                type: 'pie',
+                radius: ['53%', '68%'],
+                avoidLabelOverlap: false,
+                center: ['25%', '50%'],
+                label: {
+                    show: false,
+                    position: 'center'
+                },
+                labelLine: {
+                    show: false
+                },
+                data: data
+            }
+        ]
+    };
+};
 
 // 折现波浪
 export const discountedWave = (name = '', xAxis = [], series = [], legendShow = false, color = []) => {

+ 1 - 1
commandCenter/src/views/operationalServices/assembly/indexOptionChart.js

@@ -273,7 +273,7 @@ export const ringTypeEnlarges = (color = [], data = [], title = {}, legendFcunti
         series: [
             {
                 type: 'pie',
-                radius: ['48%', '62%'],
+                radius: ['46%', '60%'],
                 avoidLabelOverlap: false,
                 center: ['25%', '50%'],
                 label: {