bill 1 éve
szülő
commit
3d3c783784
4 módosított fájl, 55 hozzáadás és 27 törlés
  1. 22 0
      pnpm-lock.yaml
  2. 2 0
      src/view/case/help.ts
  3. 30 26
      src/view/statistics/statisticsInject.ts
  4. 1 1
      vite.config.ts

+ 22 - 0
pnpm-lock.yaml

@@ -6,6 +6,7 @@ specifiers:
   '@types/node': ^20.4.5
   '@types/qs': ^6.9.7
   '@vitejs/plugin-vue': ^4.2.3
+  '@vueuse/core': ^10.11.0
   '@vueuse/router': ^10.11.0
   axios: ^1.4.0
   echarts: ^5.4.3
@@ -32,6 +33,7 @@ dependencies:
   '@amap/amap-jsapi-loader': 1.0.1
   '@element-plus/icons-vue': 2.3.1_vue@3.4.31
   '@types/qs': 6.9.15
+  '@vueuse/core': 10.11.0_vue@3.4.31
   '@vueuse/router': 10.11.0_t6yugvvfk3qpnriubpgidwndjm
   axios: 1.7.2
   echarts: 5.5.1
@@ -368,6 +370,10 @@ packages:
     resolution: {integrity: sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==}
     dev: false
 
+  /@types/web-bluetooth/0.0.20:
+    resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==}
+    dev: false
+
   /@vitejs/plugin-vue/4.6.2_vite@4.5.3+vue@3.4.31:
     resolution: {integrity: sha512-kqf7SGFoG+80aZG6Pf+gsZIVvGSCKE98JbiWqcCV9cThtg91Jav0yvYFC9Zb+jKetNGF6ZKeoaxgZfND21fWKw==}
     engines: {node: ^14.18.0 || >=16.0.0}
@@ -507,6 +513,18 @@ packages:
   /@vue/shared/3.4.31:
     resolution: {integrity: sha512-Yp3wtJk//8cO4NItOPpi3QkLExAr/aLBGZMmTtW9WpdwBCJpRM6zj9WgWktXAl8IDIozwNMByT45JP3tO3ACWA==}
 
+  /@vueuse/core/10.11.0_vue@3.4.31:
+    resolution: {integrity: sha512-x3sD4Mkm7PJ+pcq3HX8PLPBadXCAlSDR/waK87dz0gQE+qJnaaFhc/dZVfJz+IUYzTMVGum2QlR7ImiJQN4s6g==}
+    dependencies:
+      '@types/web-bluetooth': 0.0.20
+      '@vueuse/metadata': 10.11.0
+      '@vueuse/shared': 10.11.0_vue@3.4.31
+      vue-demi: 0.14.8_vue@3.4.31
+    transitivePeerDependencies:
+      - '@vue/composition-api'
+      - vue
+    dev: false
+
   /@vueuse/core/9.13.0_vue@3.4.31:
     resolution: {integrity: sha512-pujnclbeHWxxPRqXWmdkKV5OX4Wk4YeK7wusHqRwU0Q7EFusHoqNA/aPhB6KCh9hEqJkLAJo7bb0Lh9b+OIVzw==}
     dependencies:
@@ -519,6 +537,10 @@ packages:
       - vue
     dev: false
 
+  /@vueuse/metadata/10.11.0:
+    resolution: {integrity: sha512-kQX7l6l8dVWNqlqyN3ePW3KmjCQO3ZMgXuBMddIu83CmucrsBfXlH+JoviYyRBws/yLTQO8g3Pbw+bdIoVm4oQ==}
+    dev: false
+
   /@vueuse/metadata/9.13.0:
     resolution: {integrity: sha512-gdU7TKNAUVlXXLbaF+ZCfte8BjRJQWPCa2J55+7/h+yDtzw3vOoGQDRXzI6pyKyo6bXFT5/QoPE4hAknExjRLQ==}
     dev: false

+ 2 - 0
src/view/case/help.ts

@@ -301,6 +301,8 @@ export enum OpenType {
 export const openSceneUrl = async (scene: Scene, type: OpenType) => {
   const pathname = SceneTypePaths[scene.type][type];
   const url = new URL(pathname || "", window.location.href);
+
+  url.searchParams.append("lang", "zh");
   if (scene.type === SceneType.SWMX) {
     url.searchParams.append(
       "modelId",

+ 30 - 26
src/view/statistics/statisticsInject.ts

@@ -162,30 +162,30 @@ export const statisticsConfigs: ConfigItem[] = reactive([
       ],
     },
   },
-  // {
-  //   title: "火灾原因统计",
-  //   data: {
-  //     tooltip: {
-  //       trigger: "axis",
-  //     },
-  //     xAxis: {
-  //       type: "category",
-  //       data: [],
-  //     },
-  //     yAxis: {
-  //       type: "value",
-  //     },
-  //     series: [
-  //       {
-  //         label: {
-  //           show: true,
-  //         },
-  //         data: [],
-  //         type: "bar",
-  //       },
-  //     ],
-  //   },
-  // },
+  {
+    title: "火灾原因统计",
+    data: {
+      tooltip: {
+        trigger: "axis",
+      },
+      xAxis: {
+        type: "category",
+        data: [],
+      },
+      yAxis: {
+        type: "value",
+      },
+      series: [
+        {
+          label: {
+            show: true,
+          },
+          data: [],
+          type: "bar",
+        },
+      ],
+    },
+  },
 ]);
 
 const numRotate = 8;
@@ -212,7 +212,9 @@ export const updateParams = async (params: StatisticsParams) => {
       }));
       console.log(statisticsConfigs[ndx].data);
     } else {
-      statisticsConfigs[ndx].data.xAxis.data = items.map((item) => item.groupKey);
+      statisticsConfigs[ndx].data.xAxis.data = items.map(
+        (item) => item.groupKey
+      );
       statisticsConfigs[ndx].data.xAxis.axisLabel = {
         interval: "auto",
         rotate: 0,
@@ -263,7 +265,9 @@ export const updateParams = async (params: StatisticsParams) => {
           },
         ];
       }
-      statisticsConfigs[ndx].data.series![0].data = items.map((item) => item.dataCount);
+      statisticsConfigs[ndx].data.series![0].data = items.map(
+        (item) => item.dataCount
+      );
     }
   }
 };

+ 1 - 1
vite.config.ts

@@ -45,7 +45,7 @@ export default defineConfig({
     host: "0.0.0.0",
     proxy: {
       "/api": {
-        target: dev ? "http://192.168.50.101:14000/" : "mix3d.4dkankan.com",
+        target: dev ? "https://xj-mix3d.4dkankan.com" : "mix3d.4dkankan.com",
         changeOrigin: true,
         rewrite: (path) => path.replace(new RegExp(`^/api`), ""),
       },