Browse Source

perf: 优化基础信息年代分布时间轴

TwoKe945 1 year ago
parent
commit
5d122811bf

+ 3 - 2
app/src/views/Basic/components/ChronologicDistributionStatistics.vue

@@ -10,7 +10,7 @@ export default {
   props: {
     list: {
       type: Array,
-      default: [],
+      default: () => [],
     },
   },
   watch: {
@@ -40,6 +40,7 @@ export default {
         const iData = [new Date(`${p.jcnd}-01-01 00:00:00`), p.sl];
         data.push(iData);
       });
+      console.log(data.length)
       chart.setOption({
         tooltip: {
           trigger: "axis",
@@ -81,7 +82,7 @@ export default {
           {
             type: "time",
             gridIndex: 0,
-            splitNumber: data.length / 10,
+            splitNumber: data.length / ( data.length / 5 ),
             splitLine: {
               show: true,
               lineStyle: {

+ 1 - 0
app/src/views/Basic/index.vue

@@ -141,6 +141,7 @@ export default {
       });
       getGdfbtj({
         ...this.params,
+        pageSize: 1000,
         qx: this.qy === "重庆市" ? "" : this.qy,
       }).then((res) => {
         this.gdfbtjList = res.data.rows;