瀏覽代碼

添加druid为忽略文件取消pom操作

ZZW 1 年之前
父節點
當前提交
5661102f5c
共有 78 個文件被更改,包括 436 次插入45 次删除
  1. 1 0
      .gitignore
  2. 5 0
      .idea/jarRepositories.xml
  3. 1 1
      .idea/misc.xml
  4. 31 31
      springboot/pom.xml
  5. 2 1
      springboot/src/main/resources/application-druid.yml
  6. 1 1
      springboot/target/classes/application-druid.yml
  7. 二進制
      springboot/target/classes/com/example/SpringbootApplication.class
  8. 二進制
      springboot/target/classes/com/example/common/Constants.class
  9. 二進制
      springboot/target/classes/com/example/common/Result.class
  10. 二進制
      springboot/target/classes/com/example/common/config/CorsConfig.class
  11. 二進制
      springboot/target/classes/com/example/common/config/DruidConfig$1.class
  12. 二進制
      springboot/target/classes/com/example/common/config/DruidConfig.class
  13. 二進制
      springboot/target/classes/com/example/common/config/JwtInterceptor.class
  14. 二進制
      springboot/target/classes/com/example/common/config/Properties/DruidProperties.class
  15. 二進制
      springboot/target/classes/com/example/common/config/WebConfig.class
  16. 二進制
      springboot/target/classes/com/example/common/enums/OrderStatusDELIVERY.class
  17. 二進制
      springboot/target/classes/com/example/common/enums/OrderStatusToShop.class
  18. 二進制
      springboot/target/classes/com/example/common/enums/OrderType.class
  19. 二進制
      springboot/target/classes/com/example/common/enums/ResultCodeEnum.class
  20. 二進制
      springboot/target/classes/com/example/common/enums/RoleEnum.class
  21. 二進制
      springboot/target/classes/com/example/controller/AdminController.class
  22. 二進制
      springboot/target/classes/com/example/controller/AdminstoreController.class
  23. 二進制
      springboot/target/classes/com/example/controller/AuditsController.class
  24. 二進制
      springboot/target/classes/com/example/controller/FileController.class
  25. 二進制
      springboot/target/classes/com/example/controller/NoticeController.class
  26. 二進制
      springboot/target/classes/com/example/controller/OrdersController.class
  27. 二進制
      springboot/target/classes/com/example/controller/ProductController.class
  28. 二進制
      springboot/target/classes/com/example/controller/ProductypeController.class
  29. 二進制
      springboot/target/classes/com/example/controller/SaleStatementController.class
  30. 二進制
      springboot/target/classes/com/example/controller/StoreController.class
  31. 二進制
      springboot/target/classes/com/example/controller/UserController.class
  32. 二進制
      springboot/target/classes/com/example/controller/WebController.class
  33. 二進制
      springboot/target/classes/com/example/entity/Account.class
  34. 二進制
      springboot/target/classes/com/example/entity/Admin.class
  35. 二進制
      springboot/target/classes/com/example/entity/Adminstore.class
  36. 二進制
      springboot/target/classes/com/example/entity/Audits.class
  37. 二進制
      springboot/target/classes/com/example/entity/Notice.class
  38. 二進制
      springboot/target/classes/com/example/entity/Orders.class
  39. 二進制
      springboot/target/classes/com/example/entity/Product.class
  40. 二進制
      springboot/target/classes/com/example/entity/Productype.class
  41. 二進制
      springboot/target/classes/com/example/entity/SaleStatement.class
  42. 二進制
      springboot/target/classes/com/example/entity/Store.class
  43. 二進制
      springboot/target/classes/com/example/entity/User.class
  44. 二進制
      springboot/target/classes/com/example/exception/CustomException.class
  45. 二進制
      springboot/target/classes/com/example/exception/GlobalExceptionHandler.class
  46. 二進制
      springboot/target/classes/com/example/mapper/AdminMapper.class
  47. 二進制
      springboot/target/classes/com/example/mapper/AdminstoreMapper.class
  48. 二進制
      springboot/target/classes/com/example/mapper/AuditsMapper.class
  49. 二進制
      springboot/target/classes/com/example/mapper/NoticeMapper.class
  50. 二進制
      springboot/target/classes/com/example/mapper/OrdersMapper.class
  51. 二進制
      springboot/target/classes/com/example/mapper/ProductMapper.class
  52. 二進制
      springboot/target/classes/com/example/mapper/ProductypeMapper.class
  53. 二進制
      springboot/target/classes/com/example/mapper/SaleStatementMapper.class
  54. 二進制
      springboot/target/classes/com/example/mapper/StoreMapper.class
  55. 二進制
      springboot/target/classes/com/example/mapper/UserMapper.class
  56. 二進制
      springboot/target/classes/com/example/service/AdminService.class
  57. 二進制
      springboot/target/classes/com/example/service/AdminStoreService.class
  58. 二進制
      springboot/target/classes/com/example/service/AuditsService.class
  59. 二進制
      springboot/target/classes/com/example/service/NoticeService.class
  60. 二進制
      springboot/target/classes/com/example/service/OrdersService.class
  61. 二進制
      springboot/target/classes/com/example/service/ProductService.class
  62. 二進制
      springboot/target/classes/com/example/service/ProductypeService.class
  63. 二進制
      springboot/target/classes/com/example/service/SaleStatementService.class
  64. 二進制
      springboot/target/classes/com/example/service/StoreService.class
  65. 二進制
      springboot/target/classes/com/example/service/UserService.class
  66. 二進制
      springboot/target/classes/com/example/utils/TokenUtils.class
  67. 二進制
      springboot/target/classes/com/example/utils/generate/CodeGenerator.class
  68. 二進制
      springboot/target/classes/com/example/utils/generate/ControllerGenerator.class
  69. 二進制
      springboot/target/classes/com/example/utils/generate/EntityGenerator.class
  70. 二進制
      springboot/target/classes/com/example/utils/generate/MapperGenerator.class
  71. 二進制
      springboot/target/classes/com/example/utils/generate/ServiceGenerator.class
  72. 二進制
      springboot/target/classes/com/example/utils/generate/Table.class
  73. 二進制
      springboot/target/classes/com/example/utils/generate/TableColumn.class
  74. 二進制
      springboot/target/classes/com/example/utils/generate/VueGenerator.class
  75. 6 0
      vue/package-lock.json
  76. 1 0
      vue/package.json
  77. 1 1
      vue/src/router/index.js
  78. 387 10
      vue/src/views/manager/Shop/ShopStatements.vue

+ 1 - 0
.gitignore

@@ -1 +1,2 @@
 /vue/node_modules/
+/springboot/src/main/resources/application-druid.yml

+ 5 - 0
.idea/jarRepositories.xml

@@ -1,6 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="RemoteRepositoriesConfiguration">
+    <remote-repository>
+      <option name="id" value="central" />
+      <option name="name" value="Central Repository" />
+      <option name="url" value="https://repo.maven.apache.org/maven2" />
+    </remote-repository>
     <remote-repository>
       <option name="id" value="spring-milestones" />
       <option name="name" value="Spring Milestones" />

+ 1 - 1
.idea/misc.xml

@@ -12,7 +12,7 @@
       </list>
     </option>
   </component>
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_18" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
     <output url="file://$PROJECT_DIR$/out" />
   </component>
 </project>

+ 31 - 31
springboot/pom.xml

@@ -70,10 +70,10 @@
             <version>1.2.8</version>
         </dependency>
 <!--        openai      -->
-        <dependency>
-            <groupId>org.springframework.ai</groupId>
-            <artifactId>spring-ai-openai-spring-boot-starter</artifactId>
-        </dependency>
+<!--        <dependency>-->
+<!--            <groupId>org.springframework.ai</groupId>-->
+<!--            <artifactId>spring-ai-openai-spring-boot-starter</artifactId>-->
+<!--        </dependency>-->
     </dependencies>
 
     <build>
@@ -98,32 +98,32 @@
             </releases>
         </repository>
 <!--    openAi 下载仓库-->
-        <repository>
-            <id>spring-milestones</id>
-            <name>Spring Milestones</name>
-            <url>https://repo.spring.io/milestone</url>
-            <snapshots>
-                <enabled>false</enabled>
-            </snapshots>
-        </repository>
-        <repository>
-            <id>spring-snapshots</id>
-            <name>Spring Snapshots</name>
-            <url>https://repo.spring.io/snapshot</url>
-            <releases>
-                <enabled>false</enabled>
-            </releases>
-        </repository>
+<!--        <repository>-->
+<!--            <id>spring-milestones</id>-->
+<!--            <name>Spring Milestones</name>-->
+<!--            <url>https://repo.spring.io/milestone</url>-->
+<!--            <snapshots>-->
+<!--                <enabled>false</enabled>-->
+<!--            </snapshots>-->
+<!--        </repository>-->
+<!--        <repository>-->
+<!--            <id>spring-snapshots</id>-->
+<!--            <name>Spring Snapshots</name>-->
+<!--            <url>https://repo.spring.io/snapshot</url>-->
+<!--            <releases>-->
+<!--                <enabled>false</enabled>-->
+<!--            </releases>-->
+<!--        </repository>-->
     </repositories>
-    <dependencyManagement>
-        <dependencies>
-            <dependency>
-                <groupId>org.springframework.ai</groupId>
-                <artifactId>spring-ai-bom</artifactId>
-                <version>0.8.1-SNAPSHOT</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
+<!--    <dependencyManagement>-->
+<!--        <dependencies>-->
+<!--            <dependency>-->
+<!--                <groupId>org.springframework.ai</groupId>-->
+<!--                <artifactId>spring-ai-bom</artifactId>-->
+<!--                <version>0.8.1-SNAPSHOT</version>-->
+<!--                <type>pom</type>-->
+<!--                <scope>import</scope>-->
+<!--            </dependency>-->
+<!--        </dependencies>-->
+<!--    </dependencyManagement>-->
 </project>

+ 2 - 1
springboot/src/main/resources/application-druid.yml

@@ -1,6 +1,7 @@
 # 数据源配置
 spring:
   datasource:
+
     type: com.alibaba.druid.pool.DruidDataSource
     driverClassName: com.mysql.cj.jdbc.Driver
     druid:
@@ -8,7 +9,7 @@ spring:
       master:
         url: jdbc:mysql://localhost:3306/fruit_farmer?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2b8&allowPublicKeyRetrieval=true
         username: root
-        password: 0714@Xhy
+        password: 425605
       # 从库数据源
       slave:
         # 从数据源开关/默认关闭

+ 1 - 1
springboot/target/classes/application-druid.yml

@@ -8,7 +8,7 @@ spring:
       master:
         url: jdbc:mysql://localhost:3306/fruit_farmer?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2b8&allowPublicKeyRetrieval=true
         username: root
-        password: 0714@Xhy
+        password: 425605
       # 从库数据源
       slave:
         # 从数据源开关/默认关闭

二進制
springboot/target/classes/com/example/SpringbootApplication.class


二進制
springboot/target/classes/com/example/common/Constants.class


二進制
springboot/target/classes/com/example/common/Result.class


二進制
springboot/target/classes/com/example/common/config/CorsConfig.class


二進制
springboot/target/classes/com/example/common/config/DruidConfig$1.class


二進制
springboot/target/classes/com/example/common/config/DruidConfig.class


二進制
springboot/target/classes/com/example/common/config/JwtInterceptor.class


二進制
springboot/target/classes/com/example/common/config/Properties/DruidProperties.class


二進制
springboot/target/classes/com/example/common/config/WebConfig.class


二進制
springboot/target/classes/com/example/common/enums/OrderStatusDELIVERY.class


二進制
springboot/target/classes/com/example/common/enums/OrderStatusToShop.class


二進制
springboot/target/classes/com/example/common/enums/OrderType.class


二進制
springboot/target/classes/com/example/common/enums/ResultCodeEnum.class


二進制
springboot/target/classes/com/example/common/enums/RoleEnum.class


二進制
springboot/target/classes/com/example/controller/AdminController.class


二進制
springboot/target/classes/com/example/controller/AdminstoreController.class


二進制
springboot/target/classes/com/example/controller/AuditsController.class


二進制
springboot/target/classes/com/example/controller/FileController.class


二進制
springboot/target/classes/com/example/controller/NoticeController.class


二進制
springboot/target/classes/com/example/controller/OrdersController.class


二進制
springboot/target/classes/com/example/controller/ProductController.class


二進制
springboot/target/classes/com/example/controller/ProductypeController.class


二進制
springboot/target/classes/com/example/controller/SaleStatementController.class


二進制
springboot/target/classes/com/example/controller/StoreController.class


二進制
springboot/target/classes/com/example/controller/UserController.class


二進制
springboot/target/classes/com/example/controller/WebController.class


二進制
springboot/target/classes/com/example/entity/Account.class


二進制
springboot/target/classes/com/example/entity/Admin.class


二進制
springboot/target/classes/com/example/entity/Adminstore.class


二進制
springboot/target/classes/com/example/entity/Audits.class


二進制
springboot/target/classes/com/example/entity/Notice.class


二進制
springboot/target/classes/com/example/entity/Orders.class


二進制
springboot/target/classes/com/example/entity/Product.class


二進制
springboot/target/classes/com/example/entity/Productype.class


二進制
springboot/target/classes/com/example/entity/SaleStatement.class


二進制
springboot/target/classes/com/example/entity/Store.class


二進制
springboot/target/classes/com/example/entity/User.class


二進制
springboot/target/classes/com/example/exception/CustomException.class


二進制
springboot/target/classes/com/example/exception/GlobalExceptionHandler.class


二進制
springboot/target/classes/com/example/mapper/AdminMapper.class


二進制
springboot/target/classes/com/example/mapper/AdminstoreMapper.class


二進制
springboot/target/classes/com/example/mapper/AuditsMapper.class


二進制
springboot/target/classes/com/example/mapper/NoticeMapper.class


二進制
springboot/target/classes/com/example/mapper/OrdersMapper.class


二進制
springboot/target/classes/com/example/mapper/ProductMapper.class


二進制
springboot/target/classes/com/example/mapper/ProductypeMapper.class


二進制
springboot/target/classes/com/example/mapper/SaleStatementMapper.class


二進制
springboot/target/classes/com/example/mapper/StoreMapper.class


二進制
springboot/target/classes/com/example/mapper/UserMapper.class


二進制
springboot/target/classes/com/example/service/AdminService.class


二進制
springboot/target/classes/com/example/service/AdminStoreService.class


二進制
springboot/target/classes/com/example/service/AuditsService.class


二進制
springboot/target/classes/com/example/service/NoticeService.class


二進制
springboot/target/classes/com/example/service/OrdersService.class


二進制
springboot/target/classes/com/example/service/ProductService.class


二進制
springboot/target/classes/com/example/service/ProductypeService.class


二進制
springboot/target/classes/com/example/service/SaleStatementService.class


二進制
springboot/target/classes/com/example/service/StoreService.class


二進制
springboot/target/classes/com/example/service/UserService.class


二進制
springboot/target/classes/com/example/utils/TokenUtils.class


二進制
springboot/target/classes/com/example/utils/generate/CodeGenerator.class


二進制
springboot/target/classes/com/example/utils/generate/ControllerGenerator.class


二進制
springboot/target/classes/com/example/utils/generate/EntityGenerator.class


二進制
springboot/target/classes/com/example/utils/generate/MapperGenerator.class


二進制
springboot/target/classes/com/example/utils/generate/ServiceGenerator.class


二進制
springboot/target/classes/com/example/utils/generate/Table.class


二進制
springboot/target/classes/com/example/utils/generate/TableColumn.class


二進制
springboot/target/classes/com/example/utils/generate/VueGenerator.class


+ 6 - 0
vue/package-lock.json

@@ -11,6 +11,7 @@
         "axios": "^1.5.1",
         "core-js": "^3.8.3",
         "element-ui": "^2.15.14",
+        "highcharts": "^11.4.1",
         "vue": "^2.6.14",
         "vue-router": "^3.5.1"
       },
@@ -5494,6 +5495,11 @@
         "he": "bin/he"
       }
     },
+    "node_modules/highcharts": {
+      "version": "11.4.1",
+      "resolved": "https://registry.npmjs.org/highcharts/-/highcharts-11.4.1.tgz",
+      "integrity": "sha512-t+BjB4hba5rNheczCrpyDz8BJrqGdgECHaaXQrgbf1mRdPMPemlOfo08/kTMgZ/Kp/Xfj015atdXpUFdwUU12Q=="
+    },
     "node_modules/highlight.js": {
       "version": "10.7.3",
       "resolved": "https://registry.npmmirror.com/highlight.js/-/highlight.js-10.7.3.tgz",

+ 1 - 0
vue/package.json

@@ -10,6 +10,7 @@
     "axios": "^1.5.1",
     "core-js": "^3.8.3",
     "element-ui": "^2.15.14",
+    "highcharts": "^11.4.1",
     "vue": "^2.6.14",
     "vue-router": "^3.5.1"
   },

+ 1 - 1
vue/src/router/index.js

@@ -26,7 +26,7 @@ const routes = [
       { path: 'shopOrders', name: 'ShopOrders', meta: { name: '店铺订单' }, component: () => import('../views/manager/Shop/ShopOrders.vue') },
       { path: 'shopProducts', name: 'ShopProducts', meta: { name: '店铺产品' }, component: () => import('../views/manager/Shop/ShopProducts.vue') },
       { path: 'corpGrown', name: 'CorpGrown', meta: { name: '作物生长模块' }, component: () => import('../views/manager/AI/CorpGrown.vue') },
-      { path: 'shopStatements', name: 'ShopStatements', meta: { name: '店铺报表' }, component: () => import('../views/manager/AI/CorpGrown.vue') },
+      { path: 'shopStatements', name: 'ShopStatements', meta: { name: '店铺报表' }, component: () => import('../views/manager/Shop/ShopStatements.vue') },
       { path: 'monitor', name: 'Monitor', meta: { name: '农村监控模块' }, component: () => import('../views/manager/AI/Monitor.vue') },
       { path: 'pestAnalysis', name: 'PestAnalysis', meta: { name: '害虫识别模块' }, component: () => import('../views/manager/AI/PestAnalysis.vue') },
       // { path: 'audit', name: 'Audit', meta: { name: '店铺申请审核' }, component: () => import('../views/manager/Manager/Audit.vue') },

+ 387 - 10
vue/src/views/manager/Shop/ShopStatements.vue

@@ -1,17 +1,394 @@
+<template>
+  <div class="data-statistics">
+    <h2>数据统计</h2>
+    <div class="month-turnover-box">
+      <div class="month-turnover">
+        <h1>
+          本月营业额 <br>
+          <span>{{ monthTurnover }}</span>
+        </h1>
+      </div>
+      <div id="sales-category-chart"></div>
+    </div>
+    <h3>本月销售前二十商品</h3>
+    <div id="ranking-twenty-chart"></div>
+    <h3>年度销售统计</h3>
+    <div id="year-turnover-chart"></div>
+  </div>
+</template>
+
 <script>
+
+import Highcharts from 'highcharts/highstock'
+import HighchartsMore from 'highcharts/highcharts-more'
+import HighchartsDrilldown from 'highcharts/modules/drilldown'
+import Highcharts3D from 'highcharts/highcharts-3d'
+import Highmaps from 'highcharts/modules/map'
+
+HighchartsMore(Highcharts)
+HighchartsDrilldown(Highcharts)
+Highcharts3D(Highcharts)
+Highmaps(Highcharts)
+
 export default {
-  name: "ShopStatements"
+  data () {
+    return {
+      categoryChart: null,
+      rankingTwentyChart: null,
+      yearTurnoverChart: null,
+      cashRegisterList: this.$store.state.cashRegister.cashRegisterList
+    }
+  },
+  mounted () {
+    let _this = this;
+    this.categoryChart = new Highcharts.Chart(document.getElementById('sales-category-chart'), {
+      chart: {
+        plotBackgroundColor: null,
+        plotBorderWidth: null,
+        plotShadow: false
+      },
+      title: {
+        text: '本月各类商品销售占比图'
+      },
+      tooltip: {
+        headerFormat: '{series.name}<br>',
+        pointFormat: '{point.name}: <b>{point.percentage:.1f}%</b>'
+      },
+      plotOptions: {
+        pie: {
+          allowPointSelect: true,
+          cursor: 'pointer',
+          dataLabels: {
+            enabled: false
+          },
+          showInLegend: true
+        }
+      },
+      series: [
+        {
+          type: 'pie',
+          name: '商品销售占比',
+          data: [
+            ['休闲零食', _this.categoryTurnover[0] / _this.monthTurnover * 100],
+            ['酒水饮料', _this.categoryTurnover[1] / _this.monthTurnover * 100],
+            ['粮油副食', _this.categoryTurnover[2] / _this.monthTurnover * 100],
+            ['生鲜水果', _this.categoryTurnover[3] / _this.monthTurnover * 100],
+            ['日常洗护', _this.categoryTurnover[4] / _this.monthTurnover * 100],
+            ['厨卫用品', _this.categoryTurnover[5] / _this.monthTurnover * 100],
+            ['其它品类', _this.categoryTurnover[6] / _this.monthTurnover * 100]
+          ]
+        }
+      ]
+    });
+    this. rankingTwentyChart = new Highcharts.Chart(document.getElementById('ranking-twenty-chart'), {
+      chart: {
+        type: 'bar'
+      },
+      title: {
+        text: '本月销售前二十商品统计图'
+      },
+      xAxis: {
+        categories: _this.rankingTwentyName,
+        title: {
+          text: null
+        }
+      },
+      yAxis: {
+        min: 0,
+        title: {
+          text: '本月销售金额 (元)',
+          align: 'high'
+        },
+        labels: {
+          overflow: 'justify'
+        }
+      },
+      tooltip: {
+        valueSuffix: ' 元'
+      },
+      plotOptions: {
+        bar: {
+          dataLabels: {
+            enabled: true,
+            allowOverlap: true
+          }
+        }
+      },
+      legend: {
+        layout: 'vertical',
+        align: 'right',
+        verticalAlign: 'top',
+        x: -40,
+        y: 100,
+        floating: true,
+        borderWidth: 1,
+        backgroundColor: ((Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'),
+        shadow: true
+      },
+      credits: {
+        enabled: false
+      },
+      series: [
+        {
+          name: '销售金额',
+          data: _this.rankingTwentyTotal
+        },
+        // {
+        //     name: '销售数量',
+        //     data: _this.rankingTwentyCount
+        // }
+      ]
+    });
+    this.yearTurnoverChart = new Highcharts.Chart(document.getElementById('year-turnover-chart'), {
+      chart: {
+        type: 'column'
+      },
+      title: {
+        text: '年度销售统计图'
+      },
+      xAxis: {
+        categories: [
+          '一月',
+          '二月',
+          '三月',
+          '四月',
+          '五月',
+          '六月',
+          '七月',
+          '八月',
+          '九月',
+          '十月',
+          '十一月',
+          '十二月'
+        ],
+        crosshair: true
+      },
+      yAxis: {
+        min: 0,
+        title: {
+          text: '月销量 (件)'
+        }
+      },
+      tooltip: {
+        headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
+        pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
+            '<td style="padding:0"><b>{point.y:.1f} 元</b></td></tr>',
+        footerFormat: '</table>',
+        shared: true,
+        useHTML: true
+      },
+      plotOptions: {
+        column: {
+          pointPadding: 0.2,
+          borderWidth: 0
+        }
+      },
+      series: [
+        {
+          name: '本月营业额',
+          data: _this.yearTurnover
+        }
+      ]
+    });
+  },
+  computed: {
+    // 本月营业额
+    monthTurnover: function () {
+      let nowMonth = new Date().getMonth();
+      let all = 0;
+      for (let i = 0, len = this.cashRegisterList.length; i < len; i++) {
+        if (new Date(this.cashRegisterList[i].time).getMonth() === nowMonth) {
+          all += this.cashRegisterList[i].allTotal;
+        }
+      }
+      return all;
+    },
+    // 各类商品营业额
+    categoryTurnover: function () {
+      let arr = [0, 0, 0, 0, 0, 0, 0];
+      let nowYear = new Date().getFullYear();
+      let nowMonth = new Date().getMonth();
+      for (let i = 0, len = this.cashRegisterList.length; i < len; i++) {
+        if (new Date(this.cashRegisterList[i].time).getFullYear() === nowYear && new Date(this.cashRegisterList[i].time).getMonth() === nowMonth) {
+          for (let j = 0, len = this.cashRegisterList[i].goodsList.length; j < len; j++) {
+            switch (this.cashRegisterList[i].goodsList[j].category) {
+              case '休闲零食':
+                arr[0] += this.cashRegisterList[i].goodsList[j].total;
+                break;
+              case '酒水饮料':
+                arr[1] += this.cashRegisterList[i].goodsList[j].total;
+                break;
+              case '粮油副食':
+                arr[2] += this.cashRegisterList[i].goodsList[j].total;
+                break;
+              case '生鲜水果':
+                arr[3] += this.cashRegisterList[i].goodsList[j].total;
+                break;
+              case '日常洗护':
+                arr[4] += this.cashRegisterList[i].goodsList[j].total;
+                break;
+              case '厨卫用品':
+                arr[5] += this.cashRegisterList[i].goodsList[j].total;
+                break;
+              case '其它品类':
+                arr[6] += this.cashRegisterList[i].goodsList[j].total;
+                break;
+              default: break;
+            }
+          }
+        }
+      }
+      return arr;
+    },
+
+    // 本月销售排名前二十商品
+    rankingTwenty () {
+      let arr = [];
+      let nowYear = new Date().getFullYear();
+      let nowMonth = new Date().getMonth();
+      for (let i = 0, len = this.cashRegisterList.length; i < len; i++) {
+        if (new Date(this.cashRegisterList[i].time).getFullYear() === nowYear && new Date(this.cashRegisterList[i].time).getMonth() === nowMonth) {
+          for (let j = 0, len = this.cashRegisterList[i].goodsList.length; j < len; j++) {
+            let flag = true;
+            for (let z = 0, len = arr.length; z < len;  z++) {
+              if (this.cashRegisterList[i].goodsList[j].coding === arr[z].coding) {
+                arr[z].count += this.cashRegisterList[i].goodsList[j].count;
+                arr[z].total += this.cashRegisterList[i].goodsList[j].total;
+                flag = false;
+                break;
+              }
+            }
+            if (flag) {
+              let obj = new Object();
+              obj.coding = this.cashRegisterList[i].goodsList[j].coding;
+              obj.name = this.cashRegisterList[i].goodsList[j].name;
+              obj.count = this.cashRegisterList[i].goodsList[j].count;
+              obj.total = this.cashRegisterList[i].goodsList[j].total;
+              arr.push(obj);
+            }
+          }
+        }
+      }
+      return arr;
+    },
+    // 本月销售排名前二十商品名称
+    rankingTwentyName () {
+      let arr = [];
+      let rankingTwenty = this.rankingTwenty;
+      rankingTwenty.sort(function (a, b) {
+        return b.total - a.total;
+      });
+      rankingTwenty.slice(0, 20).forEach(function (element) {
+        arr.push(element.name);
+      });
+      return arr;
+    },
+    // 本月销售排名前二十商品销售额
+    rankingTwentyTotal () {
+      let arr = [];
+      let rankingTwenty = this.rankingTwenty;
+      rankingTwenty.sort(function (a, b) {
+        return b.total - a.total;
+      });
+      rankingTwenty.slice(0, 20).forEach(function (element) {
+        arr.push(element.total);
+      });
+      return arr;
+    },
+    // 本月销售排名前二十商品销售数量
+    rankingTwentyCount () {
+      let arr = [];
+      let rankingTwenty = this.rankingTwenty;
+      rankingTwenty.sort(function (a, b) {
+        return b.total - a.total;
+      });
+      rankingTwenty.slice(0, 20).forEach(function (element) {
+        arr.push(element.count);
+      });
+      return arr;
+    },
+    // 年度每月营业额
+    yearTurnover () {
+      let arr = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+      let nowYear = new Date().getFullYear();
+      for (let i = 0, len = this.cashRegisterList.length; i < len; i++) {
+        if (new Date(this.cashRegisterList[i].time).getFullYear() === nowYear) {
+          switch (new Date(this.cashRegisterList[i].time).getMonth()) {
+            case 0:
+              arr[0] += this.cashRegisterList[i].allTotal;
+              break;
+            case 1:
+              arr[1] += this.cashRegisterList[i].allTotal;
+              break;
+            case 2:
+              arr[2] += this.cashRegisterList[i].allTotal;
+              break;
+            case 3:
+              arr[3] += this.cashRegisterList[i].allTotal;
+              break;
+            case 4:
+              arr[4] += this.cashRegisterList[i].allTotal;
+              break;
+            case 5:
+              arr[5] += this.cashRegisterList[i].allTotal;
+              break;
+            case 6:
+              arr[6] += this.cashRegisterList[i].allTotal;
+              break;
+            case 7:
+              arr[7] += this.cashRegisterList[i].allTotal;
+              break;
+            case 8:
+              arr[8] += this.cashRegisterList[i].allTotal;
+              break;
+            case 9:
+              arr[9] += this.cashRegisterList[i].allTotal;
+              break;
+            case 10:
+              arr[10] += this.cashRegisterList[i].allTotal;
+              break;
+            case 11:
+              arr[11] += this.cashRegisterList[i].allTotal;
+              break;
+            default: break;
+          }
+        }
+      }
+      return arr;
+    }
+  }
 }
 </script>
 
-<template>
-<div>
-  店铺报表
-  店铺商品报表用echart绘制多张图找好看的背景扽等
-  实现选择框选择 日 | 月 | 年数据的展示
-</div>
-</template>
-
 <style scoped>
-
+.data-statistics h1 {
+  text-align: center;
+}
+.data-statistics h1 span {
+  color: #ff9900;
+}
+.data-statistics h2 {
+  padding: 10px;
+}
+.data-statistics h3 {
+  padding: 10px;
+}
+.month-turnover-box {
+  display: flex;
+  height: 400px;
+  align-content: center;
+  background-color: white;
+}
+.month-turnover {
+  width: 30%;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+#sales-category-chart {
+  width: 70%;
+}
+#ranking-twenty-chart {
+  height: 600px;
+}
 </style>