Explorar o código

摄像头管理-更新

lxh hai 1 día
pai
achega
a5862db7a2

+ 18 - 13
npminstall-debug.log

@@ -1,22 +1,14 @@
 {
   root: 'D:\\project\\ventsystem_2.0_front',
   registry: 'https://registry.npmmirror.com',
-  pkgs: [
-    {
-      name: 'uni-nfc',
-      version: 'latest',
-      type: 'tag',
-      alias: undefined,
-      arg: [Result]
-    }
-  ],
+  pkgs: [],
   production: false,
   cacheStrict: false,
   cacheDir: 'C:\\Users\\86175\\.npminstall_tarball',
   env: {
     npm_config_registry: 'https://registry.npmmirror.com',
-    npm_config_argv: '{"remain":[],"cooked":["--fix-bug-versions","--china","--userconfig=C:\\\\Users\\\\86175\\\\.cnpmrc","--disturl=https://cdn.npmmirror.com/binaries/node","--registry=https://registry.npmmirror.com","uni-nfc"],"original":["--fix-bug-versions","--china","--userconfig=C:\\\\Users\\\\86175\\\\.cnpmrc","--disturl=https://cdn.npmmirror.com/binaries/node","--registry=https://registry.npmmirror.com","uni-nfc"]}',
-    npm_config_user_agent: 'npminstall/7.8.0 npm/? node/v18.14.0 win32 x64',
+    npm_config_argv: '{"remain":[],"cooked":["--fix-bug-versions","--china","--userconfig=C:\\\\Users\\\\86175\\\\.cnpmrc","--disturl=https://cdn.npmmirror.com/binaries/node","--registry=https://registry.npmmirror.com"],"original":["--fix-bug-versions","--china","--userconfig=C:\\\\Users\\\\86175\\\\.cnpmrc","--disturl=https://cdn.npmmirror.com/binaries/node","--registry=https://registry.npmmirror.com"]}',
+    npm_config_user_agent: 'npminstall/7.8.0 npm/? node/v22.13.0 win32 x64',
     npm_config_cache: 'C:\\Users\\86175\\.npminstall_tarball',
     NODE: 'C:\\Program Files\\nodejs\\node.exe',
     npm_node_execpath: 'C:\\Program Files\\nodejs\\node.exe',
@@ -39,6 +31,8 @@
     NWJS_URLBASE: 'https://cdn.npmmirror.com/binaries/nwjs/v',
     PUPPETEER_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
     PUPPETEER_DOWNLOAD_BASE_URL: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
+    PUPPETEER_CHROME_DOWNLOAD_BASE_URL: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
+    PUPPETEER_CHROME_HEADLESS_SHELL_DOWNLOAD_BASE_URL: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
     PLAYWRIGHT_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/playwright',
     SENTRYCLI_CDNURL: 'https://cdn.npmmirror.com/binaries/sentry-cli',
     SAUCECTL_INSTALL_BINARY_MIRROR: 'https://cdn.npmmirror.com/binaries/saucectl',
@@ -46,10 +40,13 @@
     RE2_DOWNLOAD_SKIP_PATH: 'true',
     PRISMA_ENGINES_MIRROR: 'https://cdn.npmmirror.com/binaries/prisma',
     npm_config_better_sqlite3_binary_host: 'https://cdn.npmmirror.com/binaries/better-sqlite3',
+    npm_config_isolated_vm_binary_host: 'https://cdn.npmmirror.com/binaries/isolated-vm',
     npm_config_keytar_binary_host: 'https://cdn.npmmirror.com/binaries/keytar',
     npm_config_sharp_binary_host: 'https://cdn.npmmirror.com/binaries/sharp',
     npm_config_sharp_libvips_binary_host: 'https://cdn.npmmirror.com/binaries/sharp-libvips',
     npm_config_robotjs_binary_host: 'https://cdn.npmmirror.com/binaries/robotjs',
+    npm_config_gl_binary_host: 'https://cdn.npmmirror.com/binaries/gl',
+    RIPGREP_PREBUILT_BINARIES_MIRROR: 'https://registry.npmmirror.com/-/binary/ripgrep-prebuilt',
     npm_rootpath: 'D:\\project\\ventsystem_2.0_front',
     INIT_CWD: 'D:\\project\\ventsystem_2.0_front'
   },
@@ -70,6 +67,8 @@
       NWJS_URLBASE: 'https://cdn.npmmirror.com/binaries/nwjs/v',
       PUPPETEER_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
       PUPPETEER_DOWNLOAD_BASE_URL: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
+      PUPPETEER_CHROME_DOWNLOAD_BASE_URL: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
+      PUPPETEER_CHROME_HEADLESS_SHELL_DOWNLOAD_BASE_URL: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
       PLAYWRIGHT_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/playwright',
       SENTRYCLI_CDNURL: 'https://cdn.npmmirror.com/binaries/sentry-cli',
       SAUCECTL_INSTALL_BINARY_MIRROR: 'https://cdn.npmmirror.com/binaries/saucectl',
@@ -77,10 +76,13 @@
       RE2_DOWNLOAD_SKIP_PATH: 'true',
       PRISMA_ENGINES_MIRROR: 'https://cdn.npmmirror.com/binaries/prisma',
       npm_config_better_sqlite3_binary_host: 'https://cdn.npmmirror.com/binaries/better-sqlite3',
+      npm_config_isolated_vm_binary_host: 'https://cdn.npmmirror.com/binaries/isolated-vm',
       npm_config_keytar_binary_host: 'https://cdn.npmmirror.com/binaries/keytar',
       npm_config_sharp_binary_host: 'https://cdn.npmmirror.com/binaries/sharp',
       npm_config_sharp_libvips_binary_host: 'https://cdn.npmmirror.com/binaries/sharp-libvips',
-      npm_config_robotjs_binary_host: 'https://cdn.npmmirror.com/binaries/robotjs'
+      npm_config_robotjs_binary_host: 'https://cdn.npmmirror.com/binaries/robotjs',
+      npm_config_gl_binary_host: 'https://cdn.npmmirror.com/binaries/gl',
+      RIPGREP_PREBUILT_BINARIES_MIRROR: 'https://registry.npmmirror.com/-/binary/ripgrep-prebuilt'
     },
     '@ali/s2': { host: 'https://cdn.npmmirror.com/binaries/looksgood-s2' },
     sharp: { replaceHostFiles: [Array], replaceHostMap: [Object] },
@@ -119,7 +121,10 @@
     },
     fsevents: { host: 'https://cdn.npmmirror.com/binaries/fsevents' },
     nodejieba: { host: 'https://cdn.npmmirror.com/binaries/nodejieba' },
-    canvas: { host: 'https://cdn.npmmirror.com/binaries/canvas' },
+    canvas: {
+      host: 'https://cdn.npmmirror.com/binaries/canvas',
+      remote_path: 'v{version}'
+    },
     'skia-canvas': { host: 'https://cdn.npmmirror.com/binaries/skia-canvas' },
     'flow-bin': {
       replaceHost: 'https://github.com/facebook/flow/releases/download/v',

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 395 - 1503
pnpm-lock.yaml


+ 6 - 0
pnpm-workspace.yaml

@@ -4,6 +4,12 @@ allowBuilds:
   '@vue-office/excel': true
   '@vue-office/pdf': true
   core-js: true
+  cwebp-bin: false
   es5-ext: true
   esbuild: true
+  gifsicle: false
+  jpegtran-bin: false
+  mozjpeg: false
+  optipng-bin: false
+  pngquant-bin: false
   vue-demi: true

+ 1 - 5
src/views/vent/comment/EditRowTable.vue

@@ -244,11 +244,7 @@
       }
 
       function onEditChange({ column, value, record }) {
-        // 本例
-        // if (column.dataIndex === 'deviceid') {
-        //   record.editValueRefs.name.value = `${value}`;
-        // }
-        // console.log(column, value, record);
+        column?.onEditChange?.({ column, value, record });
       }
 
       watch(

+ 73 - 28
src/views/vent/deviceManager/comment/cameraTabel/camera.data.ts

@@ -1,5 +1,33 @@
 import { BasicColumn } from '/@/components/Table';
-export const columns: BasicColumn[] = [
+
+const MANUFACTURER_HIKVISION = 'rtsp://admin:admin123@192.168.0.64:554/Streaming/Channels/1';
+const MANUFACTURER_DAHUA = 'http://0.0.0.0:8080/live/';
+
+const manufacturerOptions = [
+  {
+    label: '海康',
+    value: MANUFACTURER_HIKVISION,
+  },
+  {
+    label: '大华',
+    value: MANUFACTURER_DAHUA,
+  },
+];
+
+/** 视频流类型 -> 厂家默认值 */
+const deviceKindManufacturerMap: Record<string, string> = {
+  rtsp: MANUFACTURER_HIKVISION,
+  flv: MANUFACTURER_DAHUA,
+};
+
+function syncManufacturerByDeviceKind(value: string, record: Recordable) {
+  const manufacturer = deviceKindManufacturerMap[value];
+  if (manufacturer && record?.editValueRefs?.label) {
+    record.editValueRefs.label.value = manufacturer;
+  }
+}
+
+export const columns = [
   {
     title: '设备id',
     dataIndex: 'deviceid',
@@ -52,6 +80,9 @@ export const columns: BasicColumn[] = [
         },
       ],
     },
+    onEditChange: ({ value, record }) => {
+      syncManufacturerByDeviceKind(value, record);
+    },
   },
   {
     title: '摄像头地址',
@@ -85,31 +116,45 @@ export const columns: BasicColumn[] = [
       ],
     },
   },
-  // {
-  //   title: '端口号',
-  //   width: 100,
-  //   dataIndex: 'port',
-  //   editRow: true,
-  //   editRule: true,
-  //   editComponent: 'InputNumber',
-  // },
-  // {
-  //   title: '摄像头名称',
-  //   dataIndex: 'name',
-  //   width: 100,
-  //   editRow: true,
-  // },
-  // {
-  //   title: '控制密码',
-  //   dataIndex: 'password',
-  //   width: 120,
-  //   editRow: true,
-  //   editRule: true,
-  // },
-  // {
-  //   title: '摄像头用户',
-  //   dataIndex: 'username',
-  //   width: 120,
-  //   editRow: true,
-  // },
+  {
+    title: 'IP',
+    dataIndex: 'ip',
+    width: 100,
+    editRow: true,
+    editRule: true,
+  },
+  {
+    title: '端口号',
+    width: 100,
+    dataIndex: 'port',
+    editRow: true,
+    editRule: true,
+    editComponent: 'InputNumber',
+  },
+  {
+    title: '摄像头用户',
+    dataIndex: 'username',
+    width: 120,
+    editRow: true,
+  },
+  {
+    title: '控制密码',
+    dataIndex: 'password',
+    width: 120,
+    editRow: true,
+    editRule: true,
+  },
+  {
+    title: '厂家',
+    dataIndex: 'label',
+    width: 100,
+    editRow: true,
+    editRule: true,
+    editComponent: 'Select',
+    editComponentProps: {
+      options: manufacturerOptions,
+    },
+  },
+
+
 ];

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio