Browse Source

feat: 发票趋势图表

lanjianrong 4 năm trước cách đây
mục cha
commit
003033dac7

+ 2 - 1
src/components/RightContent/index.tsx

@@ -61,7 +61,8 @@ const GlobalHeaderRight: React.FC = () => {
       >
       >
         <QuestionCircleOutlined />
         <QuestionCircleOutlined />
       </span> */}
       </span> */}
-      {!isMobile() && <Book />}
+      {/* {!isMobile() && <Book />} */}
+      <Book />
 
 
       <Notify />
       <Notify />
       <Avatar />
       <Avatar />

+ 6 - 7
src/pages/Statistic/Product/InvoiceTrends/index.jsx

@@ -111,13 +111,15 @@ const InvoiceTrends = () => {
     data: [state.chart, state.chart],
     data: [state.chart, state.chart],
     xField: 'monthName',
     xField: 'monthName',
     yField: ['price', 'ring'],
     yField: ['price', 'ring'],
-    // appendPadding: [0, 32, 24, 32],
+    appendPadding: [0, 24, 12, 24],
     meta: {
     meta: {
       price: {
       price: {
         alias: '当月开票金额(元)'
         alias: '当月开票金额(元)'
       },
       },
       ring: {
       ring: {
-        alias: '环比增长(%)'
+        alias: '环比增长(%)',
+        formatter: v => `${v}%`,
+        tickInterval: 100
       }
       }
       // month: {
       // month: {
       //   formatter: v => `${v}月`
       //   formatter: v => `${v}月`
@@ -132,11 +134,7 @@ const InvoiceTrends = () => {
         }
         }
       },
       },
       ring: {
       ring: {
-        label: {
-          formatter: v => {
-            return `${v}%`
-          }
-        }
+        min: -100
       }
       }
     },
     },
     legend: {
     legend: {
@@ -189,6 +187,7 @@ const InvoiceTrends = () => {
             <OptionSelect onChange={optionChange} type="InvoiceTrends" key="op" multiple={false} />,
             <OptionSelect onChange={optionChange} type="InvoiceTrends" key="op" multiple={false} />,
             <div className="ml-2" key="pp">
             <div className="ml-2" key="pp">
               <Select
               <Select
+                defaultValue="invoice"
                 options={[
                 options={[
                   { label: '发票', value: 'invoice' },
                   { label: '发票', value: 'invoice' },
                   { label: '收款', value: 'receivables' },
                   { label: '收款', value: 'receivables' },