yanghao 1 tydzień temu
rodzic
commit
6f6c4c96a0
1 zmienionych plików z 31 dodań i 31 usunięć
  1. 31 31
      src/views/pms/stat/rhkb/inventorySituation.vue

+ 31 - 31
src/views/pms/stat/rhkb/inventorySituation.vue

@@ -71,7 +71,7 @@ function getChartLayout(chartRef: Ref<HTMLDivElement | undefined>) {
     distributionTitleTop: compact ? 6 : 18,
     distributionTitleFontSize: compact ? 12 : 14,
     distributionTitleLineHeight: compact ? 14 : 16,
-    distributionPieRadius: compact ? ['36%', '54%'] : ['48%', '68%'],
+    distributionPieRadius: compact ? ['42%', '56%'] : ['50%', '62%'],
     distributionPieCenterY: compact ? '62%' : '57%',
     distributionLegendBottom: compact ? 0 : 10,
     distributionLegendItemSize: compact ? 9 : 13,
@@ -174,6 +174,36 @@ function getDistributionOption(
         fontFamily: FONT_FAMILY
       }
     }),
+    graphic: [
+      {
+        type: 'text',
+        left: '21%',
+        top: '45%',
+        style: {
+          text: `总库存\n${formatAmount(inventoryTotal)}万元`,
+          textAlign: 'center',
+          fill: THEME.text.strong,
+          fontSize: layout.compact ? 8 : 10,
+          fontWeight: 700,
+          lineHeight: layout.distributionTitleLineHeight + 6,
+          fontFamily: FONT_FAMILY
+        }
+      },
+      {
+        type: 'text',
+        left: '67%',
+        top: '45%',
+        style: {
+          text: `总积压\n${formatAmount(backlogTotal)}万元`,
+          textAlign: 'center',
+          fill: THEME.text.strong,
+          fontSize: layout.compact ? 8 : 10,
+          fontWeight: 700,
+          lineHeight: layout.distributionTitleLineHeight + 6,
+          fontFamily: FONT_FAMILY
+        }
+      }
+    ],
     series: [
       {
         name: '库存',
@@ -337,36 +367,6 @@ function getTrendOption(data: InventoryItem[]): echarts.EChartsOption {
         align: 'right'
       }
     },
-    graphic: [
-      {
-        type: 'text',
-        left: '26.5%',
-        top: '39%',
-        style: {
-          text: `总库存\n${formatAmount(inventoryTotal)}万元`,
-          textAlign: 'center',
-          fill: THEME.text.strong,
-          fontSize: layout.distributionTitleFontSize + 2,
-          fontWeight: 700,
-          lineHeight: layout.distributionTitleLineHeight + 6,
-          fontFamily: FONT_FAMILY
-        }
-      },
-      {
-        type: 'text',
-        left: '72.5%',
-        top: '39%',
-        style: {
-          text: `总积压\n${formatAmount(backlogTotal)}万元`,
-          textAlign: 'center',
-          fill: THEME.text.strong,
-          fontSize: layout.distributionTitleFontSize + 2,
-          fontWeight: 700,
-          lineHeight: layout.distributionTitleLineHeight + 6,
-          fontFamily: FONT_FAMILY
-        }
-      }
-    ],
     series: [
       {
         name: '年初积压',