diff --git a/.eslintrc b/.eslintrc index a6a6e44..ed35560 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,19 +2,26 @@ "extends": "@antfu", "rules": { "curly": ["error", "all"], - "no-tabs":"off", + "no-tabs": "off", "no-const-assign": "off", + "no-constant-condition": "off", + "no-parsing-error": "off", "no-console": "off", "eqeqeq": "off", - "vars-on-top":"off", - "no-var":"off", - "array-callback-return":"off", + "vars-on-top": "off", + "no-var": "off", + "array-callback-return": "off", "@typescript-eslint/no-this-alias": "off", - "no-unused-expressions":"off", + "no-unused-expressions": "off", "vue/no-mutating-props": "off", - "vue/component-name-in-template-casing": ["error", "kebab-case", { - "registeredComponentsOnly": false, - "ignores": [] - }] + "no-duplicate-selectors": "off", + "vue/component-name-in-template-casing": [ + "error", + "kebab-case", + { + "registeredComponentsOnly": false, + "ignores": [] + } + ] } } diff --git a/.eslintrc b/.eslintrc index a6a6e44..ed35560 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,19 +2,26 @@ "extends": "@antfu", "rules": { "curly": ["error", "all"], - "no-tabs":"off", + "no-tabs": "off", "no-const-assign": "off", + "no-constant-condition": "off", + "no-parsing-error": "off", "no-console": "off", "eqeqeq": "off", - "vars-on-top":"off", - "no-var":"off", - "array-callback-return":"off", + "vars-on-top": "off", + "no-var": "off", + "array-callback-return": "off", "@typescript-eslint/no-this-alias": "off", - "no-unused-expressions":"off", + "no-unused-expressions": "off", "vue/no-mutating-props": "off", - "vue/component-name-in-template-casing": ["error", "kebab-case", { - "registeredComponentsOnly": false, - "ignores": [] - }] + "no-duplicate-selectors": "off", + "vue/component-name-in-template-casing": [ + "error", + "kebab-case", + { + "registeredComponentsOnly": false, + "ignores": [] + } + ] } } diff --git a/20240821.zip b/20240821.zip new file mode 100644 index 0000000..36831cf --- /dev/null +++ b/20240821.zip Binary files differ diff --git a/.eslintrc b/.eslintrc index a6a6e44..ed35560 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,19 +2,26 @@ "extends": "@antfu", "rules": { "curly": ["error", "all"], - "no-tabs":"off", + "no-tabs": "off", "no-const-assign": "off", + "no-constant-condition": "off", + "no-parsing-error": "off", "no-console": "off", "eqeqeq": "off", - "vars-on-top":"off", - "no-var":"off", - "array-callback-return":"off", + "vars-on-top": "off", + "no-var": "off", + "array-callback-return": "off", "@typescript-eslint/no-this-alias": "off", - "no-unused-expressions":"off", + "no-unused-expressions": "off", "vue/no-mutating-props": "off", - "vue/component-name-in-template-casing": ["error", "kebab-case", { - "registeredComponentsOnly": false, - "ignores": [] - }] + "no-duplicate-selectors": "off", + "vue/component-name-in-template-casing": [ + "error", + "kebab-case", + { + "registeredComponentsOnly": false, + "ignores": [] + } + ] } } diff --git a/20240821.zip b/20240821.zip new file mode 100644 index 0000000..36831cf --- /dev/null +++ b/20240821.zip Binary files differ diff --git a/package.json b/package.json index 02e0868..cce282a 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "@antfu/eslint-config": "^0.29.4", "@iconify-json/ep": "^1.1.8", "@iconify/vue": "^4.0.0", + "@types/leaflet": "^1.9.12", "@types/nprogress": "^0.2.0", "@types/path-browserify": "^1.0.0", "@types/qrcode": "^1.5.0", diff --git a/.eslintrc b/.eslintrc index a6a6e44..ed35560 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,19 +2,26 @@ "extends": "@antfu", "rules": { "curly": ["error", "all"], - "no-tabs":"off", + "no-tabs": "off", "no-const-assign": "off", + "no-constant-condition": "off", + "no-parsing-error": "off", "no-console": "off", "eqeqeq": "off", - "vars-on-top":"off", - "no-var":"off", - "array-callback-return":"off", + "vars-on-top": "off", + "no-var": "off", + "array-callback-return": "off", "@typescript-eslint/no-this-alias": "off", - "no-unused-expressions":"off", + "no-unused-expressions": "off", "vue/no-mutating-props": "off", - "vue/component-name-in-template-casing": ["error", "kebab-case", { - "registeredComponentsOnly": false, - "ignores": [] - }] + "no-duplicate-selectors": "off", + "vue/component-name-in-template-casing": [ + "error", + "kebab-case", + { + "registeredComponentsOnly": false, + "ignores": [] + } + ] } } diff --git a/20240821.zip b/20240821.zip new file mode 100644 index 0000000..36831cf --- /dev/null +++ b/20240821.zip Binary files differ diff --git a/package.json b/package.json index 02e0868..cce282a 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "@antfu/eslint-config": "^0.29.4", "@iconify-json/ep": "^1.1.8", "@iconify/vue": "^4.0.0", + "@types/leaflet": "^1.9.12", "@types/nprogress": "^0.2.0", "@types/path-browserify": "^1.0.0", "@types/qrcode": "^1.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8407695..4afe118 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,6 +6,7 @@ '@iconify-json/ep': ^1.1.8 '@iconify/vue': ^4.0.0 '@tinymce/tinymce-vue': ^5.0.0 + '@types/leaflet': ^1.9.12 '@types/nprogress': ^0.2.0 '@types/path-browserify': ^1.0.0 '@types/qrcode': ^1.5.0 @@ -122,6 +123,7 @@ '@antfu/eslint-config': 0.29.4_4lxgoysztp3gakdxqfzw7vhg4u '@iconify-json/ep': 1.1.16 '@iconify/vue': 4.1.2_vue@3.4.38 + '@types/leaflet': 1.9.12 '@types/nprogress': 0.2.3 '@types/path-browserify': 1.0.2 '@types/qrcode': 1.5.5 @@ -1018,6 +1020,10 @@ resolution: {integrity: sha512-2N93vadEGDFhASTIRbizbl4bNqpMOId5zZfj6hHqYZfEzEfO9onnU4Im8xvzo8uudySDveDHBOOSlTWf38ErfQ==} dev: true + /@types/geojson/7946.0.14: + resolution: {integrity: sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==} + dev: true + /@types/inquirer/8.2.10: resolution: {integrity: sha512-IdD5NmHyVjWM8SHWo/kPBgtzXatwPkfwzyP3fN1jF2g9BWt5WO+8hL2F4o2GKIYsU40PpqeevuUWvkS/roXJkA==} dependencies: @@ -1033,6 +1039,12 @@ resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true + /@types/leaflet/1.9.12: + resolution: {integrity: sha512-BK7XS+NyRI291HIo0HCfE18Lp8oA30H1gpi1tf0mF3TgiCEzanQjOqNZ4x126SXzzi2oNSZhZ5axJp1k0iM6jg==} + dependencies: + '@types/geojson': 7946.0.14 + dev: true + /@types/liftoff/4.0.3: resolution: {integrity: sha512-UgbL2kR5pLrWICvr8+fuSg0u43LY250q7ZMkC+XKC3E+rs/YBDEnQIzsnhU5dYsLlwMi3R75UvCL87pObP1sxw==} dependencies: diff --git a/.eslintrc b/.eslintrc index a6a6e44..ed35560 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,19 +2,26 @@ "extends": "@antfu", "rules": { "curly": ["error", "all"], - "no-tabs":"off", + "no-tabs": "off", "no-const-assign": "off", + "no-constant-condition": "off", + "no-parsing-error": "off", "no-console": "off", "eqeqeq": "off", - "vars-on-top":"off", - "no-var":"off", - "array-callback-return":"off", + "vars-on-top": "off", + "no-var": "off", + "array-callback-return": "off", "@typescript-eslint/no-this-alias": "off", - "no-unused-expressions":"off", + "no-unused-expressions": "off", "vue/no-mutating-props": "off", - "vue/component-name-in-template-casing": ["error", "kebab-case", { - "registeredComponentsOnly": false, - "ignores": [] - }] + "no-duplicate-selectors": "off", + "vue/component-name-in-template-casing": [ + "error", + "kebab-case", + { + "registeredComponentsOnly": false, + "ignores": [] + } + ] } } diff --git a/20240821.zip b/20240821.zip new file mode 100644 index 0000000..36831cf --- /dev/null +++ b/20240821.zip Binary files differ diff --git a/package.json b/package.json index 02e0868..cce282a 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "@antfu/eslint-config": "^0.29.4", "@iconify-json/ep": "^1.1.8", "@iconify/vue": "^4.0.0", + "@types/leaflet": "^1.9.12", "@types/nprogress": "^0.2.0", "@types/path-browserify": "^1.0.0", "@types/qrcode": "^1.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8407695..4afe118 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,6 +6,7 @@ '@iconify-json/ep': ^1.1.8 '@iconify/vue': ^4.0.0 '@tinymce/tinymce-vue': ^5.0.0 + '@types/leaflet': ^1.9.12 '@types/nprogress': ^0.2.0 '@types/path-browserify': ^1.0.0 '@types/qrcode': ^1.5.0 @@ -122,6 +123,7 @@ '@antfu/eslint-config': 0.29.4_4lxgoysztp3gakdxqfzw7vhg4u '@iconify-json/ep': 1.1.16 '@iconify/vue': 4.1.2_vue@3.4.38 + '@types/leaflet': 1.9.12 '@types/nprogress': 0.2.3 '@types/path-browserify': 1.0.2 '@types/qrcode': 1.5.5 @@ -1018,6 +1020,10 @@ resolution: {integrity: sha512-2N93vadEGDFhASTIRbizbl4bNqpMOId5zZfj6hHqYZfEzEfO9onnU4Im8xvzo8uudySDveDHBOOSlTWf38ErfQ==} dev: true + /@types/geojson/7946.0.14: + resolution: {integrity: sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==} + dev: true + /@types/inquirer/8.2.10: resolution: {integrity: sha512-IdD5NmHyVjWM8SHWo/kPBgtzXatwPkfwzyP3fN1jF2g9BWt5WO+8hL2F4o2GKIYsU40PpqeevuUWvkS/roXJkA==} dependencies: @@ -1033,6 +1039,12 @@ resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true + /@types/leaflet/1.9.12: + resolution: {integrity: sha512-BK7XS+NyRI291HIo0HCfE18Lp8oA30H1gpi1tf0mF3TgiCEzanQjOqNZ4x126SXzzi2oNSZhZ5axJp1k0iM6jg==} + dependencies: + '@types/geojson': 7946.0.14 + dev: true + /@types/liftoff/4.0.3: resolution: {integrity: sha512-UgbL2kR5pLrWICvr8+fuSg0u43LY250q7ZMkC+XKC3E+rs/YBDEnQIzsnhU5dYsLlwMi3R75UvCL87pObP1sxw==} dependencies: diff --git a/public/config/config.json b/public/config/config.json index 1452d58..973ce85 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { - "title":"安全生产智慧监管系统", - "baseUrl": "http://192.168.83.42:6909/safe-server/", + "title": "安全生产智慧监管系统", + "baseUrl": "https://10.20.100.52:1614/safe-server", "lat": "39.908447", "lng": "116.258555", "minZoom": "5", diff --git a/.eslintrc b/.eslintrc index a6a6e44..ed35560 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,19 +2,26 @@ "extends": "@antfu", "rules": { "curly": ["error", "all"], - "no-tabs":"off", + "no-tabs": "off", "no-const-assign": "off", + "no-constant-condition": "off", + "no-parsing-error": "off", "no-console": "off", "eqeqeq": "off", - "vars-on-top":"off", - "no-var":"off", - "array-callback-return":"off", + "vars-on-top": "off", + "no-var": "off", + "array-callback-return": "off", "@typescript-eslint/no-this-alias": "off", - "no-unused-expressions":"off", + "no-unused-expressions": "off", "vue/no-mutating-props": "off", - "vue/component-name-in-template-casing": ["error", "kebab-case", { - "registeredComponentsOnly": false, - "ignores": [] - }] + "no-duplicate-selectors": "off", + "vue/component-name-in-template-casing": [ + "error", + "kebab-case", + { + "registeredComponentsOnly": false, + "ignores": [] + } + ] } } diff --git a/20240821.zip b/20240821.zip new file mode 100644 index 0000000..36831cf --- /dev/null +++ b/20240821.zip Binary files differ diff --git a/package.json b/package.json index 02e0868..cce282a 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "@antfu/eslint-config": "^0.29.4", "@iconify-json/ep": "^1.1.8", "@iconify/vue": "^4.0.0", + "@types/leaflet": "^1.9.12", "@types/nprogress": "^0.2.0", "@types/path-browserify": "^1.0.0", "@types/qrcode": "^1.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8407695..4afe118 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,6 +6,7 @@ '@iconify-json/ep': ^1.1.8 '@iconify/vue': ^4.0.0 '@tinymce/tinymce-vue': ^5.0.0 + '@types/leaflet': ^1.9.12 '@types/nprogress': ^0.2.0 '@types/path-browserify': ^1.0.0 '@types/qrcode': ^1.5.0 @@ -122,6 +123,7 @@ '@antfu/eslint-config': 0.29.4_4lxgoysztp3gakdxqfzw7vhg4u '@iconify-json/ep': 1.1.16 '@iconify/vue': 4.1.2_vue@3.4.38 + '@types/leaflet': 1.9.12 '@types/nprogress': 0.2.3 '@types/path-browserify': 1.0.2 '@types/qrcode': 1.5.5 @@ -1018,6 +1020,10 @@ resolution: {integrity: sha512-2N93vadEGDFhASTIRbizbl4bNqpMOId5zZfj6hHqYZfEzEfO9onnU4Im8xvzo8uudySDveDHBOOSlTWf38ErfQ==} dev: true + /@types/geojson/7946.0.14: + resolution: {integrity: sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==} + dev: true + /@types/inquirer/8.2.10: resolution: {integrity: sha512-IdD5NmHyVjWM8SHWo/kPBgtzXatwPkfwzyP3fN1jF2g9BWt5WO+8hL2F4o2GKIYsU40PpqeevuUWvkS/roXJkA==} dependencies: @@ -1033,6 +1039,12 @@ resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true + /@types/leaflet/1.9.12: + resolution: {integrity: sha512-BK7XS+NyRI291HIo0HCfE18Lp8oA30H1gpi1tf0mF3TgiCEzanQjOqNZ4x126SXzzi2oNSZhZ5axJp1k0iM6jg==} + dependencies: + '@types/geojson': 7946.0.14 + dev: true + /@types/liftoff/4.0.3: resolution: {integrity: sha512-UgbL2kR5pLrWICvr8+fuSg0u43LY250q7ZMkC+XKC3E+rs/YBDEnQIzsnhU5dYsLlwMi3R75UvCL87pObP1sxw==} dependencies: diff --git a/public/config/config.json b/public/config/config.json index 1452d58..973ce85 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { - "title":"安全生产智慧监管系统", - "baseUrl": "http://192.168.83.42:6909/safe-server/", + "title": "安全生产智慧监管系统", + "baseUrl": "https://10.20.100.52:1614/safe-server", "lat": "39.908447", "lng": "116.258555", "minZoom": "5", diff --git a/src/assets/icons/icon-focusIn.svg b/src/assets/icons/icon-focusIn.svg new file mode 100644 index 0000000..b4f3441 --- /dev/null +++ b/src/assets/icons/icon-focusIn.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.eslintrc b/.eslintrc index a6a6e44..ed35560 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,19 +2,26 @@ "extends": "@antfu", "rules": { "curly": ["error", "all"], - "no-tabs":"off", + "no-tabs": "off", "no-const-assign": "off", + "no-constant-condition": "off", + "no-parsing-error": "off", "no-console": "off", "eqeqeq": "off", - "vars-on-top":"off", - "no-var":"off", - "array-callback-return":"off", + "vars-on-top": "off", + "no-var": "off", + "array-callback-return": "off", "@typescript-eslint/no-this-alias": "off", - "no-unused-expressions":"off", + "no-unused-expressions": "off", "vue/no-mutating-props": "off", - "vue/component-name-in-template-casing": ["error", "kebab-case", { - "registeredComponentsOnly": false, - "ignores": [] - }] + "no-duplicate-selectors": "off", + "vue/component-name-in-template-casing": [ + "error", + "kebab-case", + { + "registeredComponentsOnly": false, + "ignores": [] + } + ] } } diff --git a/20240821.zip b/20240821.zip new file mode 100644 index 0000000..36831cf --- /dev/null +++ b/20240821.zip Binary files differ diff --git a/package.json b/package.json index 02e0868..cce282a 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "@antfu/eslint-config": "^0.29.4", "@iconify-json/ep": "^1.1.8", "@iconify/vue": "^4.0.0", + "@types/leaflet": "^1.9.12", "@types/nprogress": "^0.2.0", "@types/path-browserify": "^1.0.0", "@types/qrcode": "^1.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8407695..4afe118 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,6 +6,7 @@ '@iconify-json/ep': ^1.1.8 '@iconify/vue': ^4.0.0 '@tinymce/tinymce-vue': ^5.0.0 + '@types/leaflet': ^1.9.12 '@types/nprogress': ^0.2.0 '@types/path-browserify': ^1.0.0 '@types/qrcode': ^1.5.0 @@ -122,6 +123,7 @@ '@antfu/eslint-config': 0.29.4_4lxgoysztp3gakdxqfzw7vhg4u '@iconify-json/ep': 1.1.16 '@iconify/vue': 4.1.2_vue@3.4.38 + '@types/leaflet': 1.9.12 '@types/nprogress': 0.2.3 '@types/path-browserify': 1.0.2 '@types/qrcode': 1.5.5 @@ -1018,6 +1020,10 @@ resolution: {integrity: sha512-2N93vadEGDFhASTIRbizbl4bNqpMOId5zZfj6hHqYZfEzEfO9onnU4Im8xvzo8uudySDveDHBOOSlTWf38ErfQ==} dev: true + /@types/geojson/7946.0.14: + resolution: {integrity: sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==} + dev: true + /@types/inquirer/8.2.10: resolution: {integrity: sha512-IdD5NmHyVjWM8SHWo/kPBgtzXatwPkfwzyP3fN1jF2g9BWt5WO+8hL2F4o2GKIYsU40PpqeevuUWvkS/roXJkA==} dependencies: @@ -1033,6 +1039,12 @@ resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true + /@types/leaflet/1.9.12: + resolution: {integrity: sha512-BK7XS+NyRI291HIo0HCfE18Lp8oA30H1gpi1tf0mF3TgiCEzanQjOqNZ4x126SXzzi2oNSZhZ5axJp1k0iM6jg==} + dependencies: + '@types/geojson': 7946.0.14 + dev: true + /@types/liftoff/4.0.3: resolution: {integrity: sha512-UgbL2kR5pLrWICvr8+fuSg0u43LY250q7ZMkC+XKC3E+rs/YBDEnQIzsnhU5dYsLlwMi3R75UvCL87pObP1sxw==} dependencies: diff --git a/public/config/config.json b/public/config/config.json index 1452d58..973ce85 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { - "title":"安全生产智慧监管系统", - "baseUrl": "http://192.168.83.42:6909/safe-server/", + "title": "安全生产智慧监管系统", + "baseUrl": "https://10.20.100.52:1614/safe-server", "lat": "39.908447", "lng": "116.258555", "minZoom": "5", diff --git a/src/assets/icons/icon-focusIn.svg b/src/assets/icons/icon-focusIn.svg new file mode 100644 index 0000000..b4f3441 --- /dev/null +++ b/src/assets/icons/icon-focusIn.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-focusOut.svg b/src/assets/icons/icon-focusOut.svg new file mode 100644 index 0000000..d0bcbed --- /dev/null +++ b/src/assets/icons/icon-focusOut.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.eslintrc b/.eslintrc index a6a6e44..ed35560 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,19 +2,26 @@ "extends": "@antfu", "rules": { "curly": ["error", "all"], - "no-tabs":"off", + "no-tabs": "off", "no-const-assign": "off", + "no-constant-condition": "off", + "no-parsing-error": "off", "no-console": "off", "eqeqeq": "off", - "vars-on-top":"off", - "no-var":"off", - "array-callback-return":"off", + "vars-on-top": "off", + "no-var": "off", + "array-callback-return": "off", "@typescript-eslint/no-this-alias": "off", - "no-unused-expressions":"off", + "no-unused-expressions": "off", "vue/no-mutating-props": "off", - "vue/component-name-in-template-casing": ["error", "kebab-case", { - "registeredComponentsOnly": false, - "ignores": [] - }] + "no-duplicate-selectors": "off", + "vue/component-name-in-template-casing": [ + "error", + "kebab-case", + { + "registeredComponentsOnly": false, + "ignores": [] + } + ] } } diff --git a/20240821.zip b/20240821.zip new file mode 100644 index 0000000..36831cf --- /dev/null +++ b/20240821.zip Binary files differ diff --git a/package.json b/package.json index 02e0868..cce282a 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "@antfu/eslint-config": "^0.29.4", "@iconify-json/ep": "^1.1.8", "@iconify/vue": "^4.0.0", + "@types/leaflet": "^1.9.12", "@types/nprogress": "^0.2.0", "@types/path-browserify": "^1.0.0", "@types/qrcode": "^1.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8407695..4afe118 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,6 +6,7 @@ '@iconify-json/ep': ^1.1.8 '@iconify/vue': ^4.0.0 '@tinymce/tinymce-vue': ^5.0.0 + '@types/leaflet': ^1.9.12 '@types/nprogress': ^0.2.0 '@types/path-browserify': ^1.0.0 '@types/qrcode': ^1.5.0 @@ -122,6 +123,7 @@ '@antfu/eslint-config': 0.29.4_4lxgoysztp3gakdxqfzw7vhg4u '@iconify-json/ep': 1.1.16 '@iconify/vue': 4.1.2_vue@3.4.38 + '@types/leaflet': 1.9.12 '@types/nprogress': 0.2.3 '@types/path-browserify': 1.0.2 '@types/qrcode': 1.5.5 @@ -1018,6 +1020,10 @@ resolution: {integrity: sha512-2N93vadEGDFhASTIRbizbl4bNqpMOId5zZfj6hHqYZfEzEfO9onnU4Im8xvzo8uudySDveDHBOOSlTWf38ErfQ==} dev: true + /@types/geojson/7946.0.14: + resolution: {integrity: sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==} + dev: true + /@types/inquirer/8.2.10: resolution: {integrity: sha512-IdD5NmHyVjWM8SHWo/kPBgtzXatwPkfwzyP3fN1jF2g9BWt5WO+8hL2F4o2GKIYsU40PpqeevuUWvkS/roXJkA==} dependencies: @@ -1033,6 +1039,12 @@ resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true + /@types/leaflet/1.9.12: + resolution: {integrity: sha512-BK7XS+NyRI291HIo0HCfE18Lp8oA30H1gpi1tf0mF3TgiCEzanQjOqNZ4x126SXzzi2oNSZhZ5axJp1k0iM6jg==} + dependencies: + '@types/geojson': 7946.0.14 + dev: true + /@types/liftoff/4.0.3: resolution: {integrity: sha512-UgbL2kR5pLrWICvr8+fuSg0u43LY250q7ZMkC+XKC3E+rs/YBDEnQIzsnhU5dYsLlwMi3R75UvCL87pObP1sxw==} dependencies: diff --git a/public/config/config.json b/public/config/config.json index 1452d58..973ce85 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { - "title":"安全生产智慧监管系统", - "baseUrl": "http://192.168.83.42:6909/safe-server/", + "title": "安全生产智慧监管系统", + "baseUrl": "https://10.20.100.52:1614/safe-server", "lat": "39.908447", "lng": "116.258555", "minZoom": "5", diff --git a/src/assets/icons/icon-focusIn.svg b/src/assets/icons/icon-focusIn.svg new file mode 100644 index 0000000..b4f3441 --- /dev/null +++ b/src/assets/icons/icon-focusIn.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-focusOut.svg b/src/assets/icons/icon-focusOut.svg new file mode 100644 index 0000000..d0bcbed --- /dev/null +++ b/src/assets/icons/icon-focusOut.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-refresh.svg b/src/assets/icons/icon-refresh.svg new file mode 100644 index 0000000..af71d10 --- /dev/null +++ b/src/assets/icons/icon-refresh.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.eslintrc b/.eslintrc index a6a6e44..ed35560 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,19 +2,26 @@ "extends": "@antfu", "rules": { "curly": ["error", "all"], - "no-tabs":"off", + "no-tabs": "off", "no-const-assign": "off", + "no-constant-condition": "off", + "no-parsing-error": "off", "no-console": "off", "eqeqeq": "off", - "vars-on-top":"off", - "no-var":"off", - "array-callback-return":"off", + "vars-on-top": "off", + "no-var": "off", + "array-callback-return": "off", "@typescript-eslint/no-this-alias": "off", - "no-unused-expressions":"off", + "no-unused-expressions": "off", "vue/no-mutating-props": "off", - "vue/component-name-in-template-casing": ["error", "kebab-case", { - "registeredComponentsOnly": false, - "ignores": [] - }] + "no-duplicate-selectors": "off", + "vue/component-name-in-template-casing": [ + "error", + "kebab-case", + { + "registeredComponentsOnly": false, + "ignores": [] + } + ] } } diff --git a/20240821.zip b/20240821.zip new file mode 100644 index 0000000..36831cf --- /dev/null +++ b/20240821.zip Binary files differ diff --git a/package.json b/package.json index 02e0868..cce282a 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "@antfu/eslint-config": "^0.29.4", "@iconify-json/ep": "^1.1.8", "@iconify/vue": "^4.0.0", + "@types/leaflet": "^1.9.12", "@types/nprogress": "^0.2.0", "@types/path-browserify": "^1.0.0", "@types/qrcode": "^1.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8407695..4afe118 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,6 +6,7 @@ '@iconify-json/ep': ^1.1.8 '@iconify/vue': ^4.0.0 '@tinymce/tinymce-vue': ^5.0.0 + '@types/leaflet': ^1.9.12 '@types/nprogress': ^0.2.0 '@types/path-browserify': ^1.0.0 '@types/qrcode': ^1.5.0 @@ -122,6 +123,7 @@ '@antfu/eslint-config': 0.29.4_4lxgoysztp3gakdxqfzw7vhg4u '@iconify-json/ep': 1.1.16 '@iconify/vue': 4.1.2_vue@3.4.38 + '@types/leaflet': 1.9.12 '@types/nprogress': 0.2.3 '@types/path-browserify': 1.0.2 '@types/qrcode': 1.5.5 @@ -1018,6 +1020,10 @@ resolution: {integrity: sha512-2N93vadEGDFhASTIRbizbl4bNqpMOId5zZfj6hHqYZfEzEfO9onnU4Im8xvzo8uudySDveDHBOOSlTWf38ErfQ==} dev: true + /@types/geojson/7946.0.14: + resolution: {integrity: sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==} + dev: true + /@types/inquirer/8.2.10: resolution: {integrity: sha512-IdD5NmHyVjWM8SHWo/kPBgtzXatwPkfwzyP3fN1jF2g9BWt5WO+8hL2F4o2GKIYsU40PpqeevuUWvkS/roXJkA==} dependencies: @@ -1033,6 +1039,12 @@ resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true + /@types/leaflet/1.9.12: + resolution: {integrity: sha512-BK7XS+NyRI291HIo0HCfE18Lp8oA30H1gpi1tf0mF3TgiCEzanQjOqNZ4x126SXzzi2oNSZhZ5axJp1k0iM6jg==} + dependencies: + '@types/geojson': 7946.0.14 + dev: true + /@types/liftoff/4.0.3: resolution: {integrity: sha512-UgbL2kR5pLrWICvr8+fuSg0u43LY250q7ZMkC+XKC3E+rs/YBDEnQIzsnhU5dYsLlwMi3R75UvCL87pObP1sxw==} dependencies: diff --git a/public/config/config.json b/public/config/config.json index 1452d58..973ce85 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { - "title":"安全生产智慧监管系统", - "baseUrl": "http://192.168.83.42:6909/safe-server/", + "title": "安全生产智慧监管系统", + "baseUrl": "https://10.20.100.52:1614/safe-server", "lat": "39.908447", "lng": "116.258555", "minZoom": "5", diff --git a/src/assets/icons/icon-focusIn.svg b/src/assets/icons/icon-focusIn.svg new file mode 100644 index 0000000..b4f3441 --- /dev/null +++ b/src/assets/icons/icon-focusIn.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-focusOut.svg b/src/assets/icons/icon-focusOut.svg new file mode 100644 index 0000000..d0bcbed --- /dev/null +++ b/src/assets/icons/icon-focusOut.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-refresh.svg b/src/assets/icons/icon-refresh.svg new file mode 100644 index 0000000..af71d10 --- /dev/null +++ b/src/assets/icons/icon-refresh.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index 318f822..7222afd 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -102,7 +102,7 @@ - + diff --git a/.eslintrc b/.eslintrc index a6a6e44..ed35560 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,19 +2,26 @@ "extends": "@antfu", "rules": { "curly": ["error", "all"], - "no-tabs":"off", + "no-tabs": "off", "no-const-assign": "off", + "no-constant-condition": "off", + "no-parsing-error": "off", "no-console": "off", "eqeqeq": "off", - "vars-on-top":"off", - "no-var":"off", - "array-callback-return":"off", + "vars-on-top": "off", + "no-var": "off", + "array-callback-return": "off", "@typescript-eslint/no-this-alias": "off", - "no-unused-expressions":"off", + "no-unused-expressions": "off", "vue/no-mutating-props": "off", - "vue/component-name-in-template-casing": ["error", "kebab-case", { - "registeredComponentsOnly": false, - "ignores": [] - }] + "no-duplicate-selectors": "off", + "vue/component-name-in-template-casing": [ + "error", + "kebab-case", + { + "registeredComponentsOnly": false, + "ignores": [] + } + ] } } diff --git a/20240821.zip b/20240821.zip new file mode 100644 index 0000000..36831cf --- /dev/null +++ b/20240821.zip Binary files differ diff --git a/package.json b/package.json index 02e0868..cce282a 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "@antfu/eslint-config": "^0.29.4", "@iconify-json/ep": "^1.1.8", "@iconify/vue": "^4.0.0", + "@types/leaflet": "^1.9.12", "@types/nprogress": "^0.2.0", "@types/path-browserify": "^1.0.0", "@types/qrcode": "^1.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8407695..4afe118 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,6 +6,7 @@ '@iconify-json/ep': ^1.1.8 '@iconify/vue': ^4.0.0 '@tinymce/tinymce-vue': ^5.0.0 + '@types/leaflet': ^1.9.12 '@types/nprogress': ^0.2.0 '@types/path-browserify': ^1.0.0 '@types/qrcode': ^1.5.0 @@ -122,6 +123,7 @@ '@antfu/eslint-config': 0.29.4_4lxgoysztp3gakdxqfzw7vhg4u '@iconify-json/ep': 1.1.16 '@iconify/vue': 4.1.2_vue@3.4.38 + '@types/leaflet': 1.9.12 '@types/nprogress': 0.2.3 '@types/path-browserify': 1.0.2 '@types/qrcode': 1.5.5 @@ -1018,6 +1020,10 @@ resolution: {integrity: sha512-2N93vadEGDFhASTIRbizbl4bNqpMOId5zZfj6hHqYZfEzEfO9onnU4Im8xvzo8uudySDveDHBOOSlTWf38ErfQ==} dev: true + /@types/geojson/7946.0.14: + resolution: {integrity: sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==} + dev: true + /@types/inquirer/8.2.10: resolution: {integrity: sha512-IdD5NmHyVjWM8SHWo/kPBgtzXatwPkfwzyP3fN1jF2g9BWt5WO+8hL2F4o2GKIYsU40PpqeevuUWvkS/roXJkA==} dependencies: @@ -1033,6 +1039,12 @@ resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true + /@types/leaflet/1.9.12: + resolution: {integrity: sha512-BK7XS+NyRI291HIo0HCfE18Lp8oA30H1gpi1tf0mF3TgiCEzanQjOqNZ4x126SXzzi2oNSZhZ5axJp1k0iM6jg==} + dependencies: + '@types/geojson': 7946.0.14 + dev: true + /@types/liftoff/4.0.3: resolution: {integrity: sha512-UgbL2kR5pLrWICvr8+fuSg0u43LY250q7ZMkC+XKC3E+rs/YBDEnQIzsnhU5dYsLlwMi3R75UvCL87pObP1sxw==} dependencies: diff --git a/public/config/config.json b/public/config/config.json index 1452d58..973ce85 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { - "title":"安全生产智慧监管系统", - "baseUrl": "http://192.168.83.42:6909/safe-server/", + "title": "安全生产智慧监管系统", + "baseUrl": "https://10.20.100.52:1614/safe-server", "lat": "39.908447", "lng": "116.258555", "minZoom": "5", diff --git a/src/assets/icons/icon-focusIn.svg b/src/assets/icons/icon-focusIn.svg new file mode 100644 index 0000000..b4f3441 --- /dev/null +++ b/src/assets/icons/icon-focusIn.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-focusOut.svg b/src/assets/icons/icon-focusOut.svg new file mode 100644 index 0000000..d0bcbed --- /dev/null +++ b/src/assets/icons/icon-focusOut.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-refresh.svg b/src/assets/icons/icon-refresh.svg new file mode 100644 index 0000000..af71d10 --- /dev/null +++ b/src/assets/icons/icon-refresh.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index 318f822..7222afd 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -102,7 +102,7 @@ - + diff --git a/src/router/modules/home.ts b/src/router/modules/home.ts index 3164531..2afcdb8 100644 --- a/src/router/modules/home.ts +++ b/src/router/modules/home.ts @@ -69,6 +69,7 @@ { path: 'control', name: 'control', + // component: () => import('@/views/ycjg/ssjk/control-noPlugin.vue'), component: () => import('@/views/ycjg/ssjk/control.vue'), meta: { title: '实时监控', diff --git a/.eslintrc b/.eslintrc index a6a6e44..ed35560 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,19 +2,26 @@ "extends": "@antfu", "rules": { "curly": ["error", "all"], - "no-tabs":"off", + "no-tabs": "off", "no-const-assign": "off", + "no-constant-condition": "off", + "no-parsing-error": "off", "no-console": "off", "eqeqeq": "off", - "vars-on-top":"off", - "no-var":"off", - "array-callback-return":"off", + "vars-on-top": "off", + "no-var": "off", + "array-callback-return": "off", "@typescript-eslint/no-this-alias": "off", - "no-unused-expressions":"off", + "no-unused-expressions": "off", "vue/no-mutating-props": "off", - "vue/component-name-in-template-casing": ["error", "kebab-case", { - "registeredComponentsOnly": false, - "ignores": [] - }] + "no-duplicate-selectors": "off", + "vue/component-name-in-template-casing": [ + "error", + "kebab-case", + { + "registeredComponentsOnly": false, + "ignores": [] + } + ] } } diff --git a/20240821.zip b/20240821.zip new file mode 100644 index 0000000..36831cf --- /dev/null +++ b/20240821.zip Binary files differ diff --git a/package.json b/package.json index 02e0868..cce282a 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "@antfu/eslint-config": "^0.29.4", "@iconify-json/ep": "^1.1.8", "@iconify/vue": "^4.0.0", + "@types/leaflet": "^1.9.12", "@types/nprogress": "^0.2.0", "@types/path-browserify": "^1.0.0", "@types/qrcode": "^1.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8407695..4afe118 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,6 +6,7 @@ '@iconify-json/ep': ^1.1.8 '@iconify/vue': ^4.0.0 '@tinymce/tinymce-vue': ^5.0.0 + '@types/leaflet': ^1.9.12 '@types/nprogress': ^0.2.0 '@types/path-browserify': ^1.0.0 '@types/qrcode': ^1.5.0 @@ -122,6 +123,7 @@ '@antfu/eslint-config': 0.29.4_4lxgoysztp3gakdxqfzw7vhg4u '@iconify-json/ep': 1.1.16 '@iconify/vue': 4.1.2_vue@3.4.38 + '@types/leaflet': 1.9.12 '@types/nprogress': 0.2.3 '@types/path-browserify': 1.0.2 '@types/qrcode': 1.5.5 @@ -1018,6 +1020,10 @@ resolution: {integrity: sha512-2N93vadEGDFhASTIRbizbl4bNqpMOId5zZfj6hHqYZfEzEfO9onnU4Im8xvzo8uudySDveDHBOOSlTWf38ErfQ==} dev: true + /@types/geojson/7946.0.14: + resolution: {integrity: sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==} + dev: true + /@types/inquirer/8.2.10: resolution: {integrity: sha512-IdD5NmHyVjWM8SHWo/kPBgtzXatwPkfwzyP3fN1jF2g9BWt5WO+8hL2F4o2GKIYsU40PpqeevuUWvkS/roXJkA==} dependencies: @@ -1033,6 +1039,12 @@ resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true + /@types/leaflet/1.9.12: + resolution: {integrity: sha512-BK7XS+NyRI291HIo0HCfE18Lp8oA30H1gpi1tf0mF3TgiCEzanQjOqNZ4x126SXzzi2oNSZhZ5axJp1k0iM6jg==} + dependencies: + '@types/geojson': 7946.0.14 + dev: true + /@types/liftoff/4.0.3: resolution: {integrity: sha512-UgbL2kR5pLrWICvr8+fuSg0u43LY250q7ZMkC+XKC3E+rs/YBDEnQIzsnhU5dYsLlwMi3R75UvCL87pObP1sxw==} dependencies: diff --git a/public/config/config.json b/public/config/config.json index 1452d58..973ce85 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { - "title":"安全生产智慧监管系统", - "baseUrl": "http://192.168.83.42:6909/safe-server/", + "title": "安全生产智慧监管系统", + "baseUrl": "https://10.20.100.52:1614/safe-server", "lat": "39.908447", "lng": "116.258555", "minZoom": "5", diff --git a/src/assets/icons/icon-focusIn.svg b/src/assets/icons/icon-focusIn.svg new file mode 100644 index 0000000..b4f3441 --- /dev/null +++ b/src/assets/icons/icon-focusIn.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-focusOut.svg b/src/assets/icons/icon-focusOut.svg new file mode 100644 index 0000000..d0bcbed --- /dev/null +++ b/src/assets/icons/icon-focusOut.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-refresh.svg b/src/assets/icons/icon-refresh.svg new file mode 100644 index 0000000..af71d10 --- /dev/null +++ b/src/assets/icons/icon-refresh.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index 318f822..7222afd 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -102,7 +102,7 @@ - + diff --git a/src/router/modules/home.ts b/src/router/modules/home.ts index 3164531..2afcdb8 100644 --- a/src/router/modules/home.ts +++ b/src/router/modules/home.ts @@ -69,6 +69,7 @@ { path: 'control', name: 'control', + // component: () => import('@/views/ycjg/ssjk/control-noPlugin.vue'), component: () => import('@/views/ycjg/ssjk/control.vue'), meta: { title: '实时监控', diff --git a/src/utils/Dispatch706.ts b/src/utils/Dispatch706.ts index b150db2..c5d8b97 100644 --- a/src/utils/Dispatch706.ts +++ b/src/utils/Dispatch706.ts @@ -29,7 +29,7 @@ export function init(pagename: string, callBack: any) { user.initCallBack = callBack - var retCode = DispatchCtrlLib.Initialize(DispatchCallBack, 0) //, pagename) + var retCode = DispatchCtrlLib.Initialize(DispatchCallBack, 0) // , pagename) if (retCode === 0) { console.log('初始化成功, casic203') if (window.location.href.indexOf('https') == 0) { @@ -108,12 +108,17 @@ return null } else { + console.log('------------------------拉取视频成功--------------------------------') + console.log(videoLib) + console.log('------------------------res--------------------------------') + console.log(res) videoLib.StartDisplay(res) console.log('start display, casic203', res) return res } } +// 挂断视频 export function unSipVideo(callId: Number, videoLib: any) { const retCode = DispatchCtrlLib.MonitorVideoHangup(callId) if (retCode == 0) { @@ -124,3 +129,18 @@ } videoLib.StopDisplay() } + +// 控制摄像头 +/** + * 控制摄像头 + * @param Number 目标终端号码 + * @param Command 操作类型 + * @param Direction 方向 + * @param Speed 速度 + */ +export function controlCamera(number: any, command: any, direction?: any, speed?: any) { + const res = DispatchCtrlLib.MonitorVideoPtz(number, command, direction, speed) + if (res === 0) { + console.log('请求成功') + } +} diff --git a/.eslintrc b/.eslintrc index a6a6e44..ed35560 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,19 +2,26 @@ "extends": "@antfu", "rules": { "curly": ["error", "all"], - "no-tabs":"off", + "no-tabs": "off", "no-const-assign": "off", + "no-constant-condition": "off", + "no-parsing-error": "off", "no-console": "off", "eqeqeq": "off", - "vars-on-top":"off", - "no-var":"off", - "array-callback-return":"off", + "vars-on-top": "off", + "no-var": "off", + "array-callback-return": "off", "@typescript-eslint/no-this-alias": "off", - "no-unused-expressions":"off", + "no-unused-expressions": "off", "vue/no-mutating-props": "off", - "vue/component-name-in-template-casing": ["error", "kebab-case", { - "registeredComponentsOnly": false, - "ignores": [] - }] + "no-duplicate-selectors": "off", + "vue/component-name-in-template-casing": [ + "error", + "kebab-case", + { + "registeredComponentsOnly": false, + "ignores": [] + } + ] } } diff --git a/20240821.zip b/20240821.zip new file mode 100644 index 0000000..36831cf --- /dev/null +++ b/20240821.zip Binary files differ diff --git a/package.json b/package.json index 02e0868..cce282a 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "@antfu/eslint-config": "^0.29.4", "@iconify-json/ep": "^1.1.8", "@iconify/vue": "^4.0.0", + "@types/leaflet": "^1.9.12", "@types/nprogress": "^0.2.0", "@types/path-browserify": "^1.0.0", "@types/qrcode": "^1.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8407695..4afe118 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,6 +6,7 @@ '@iconify-json/ep': ^1.1.8 '@iconify/vue': ^4.0.0 '@tinymce/tinymce-vue': ^5.0.0 + '@types/leaflet': ^1.9.12 '@types/nprogress': ^0.2.0 '@types/path-browserify': ^1.0.0 '@types/qrcode': ^1.5.0 @@ -122,6 +123,7 @@ '@antfu/eslint-config': 0.29.4_4lxgoysztp3gakdxqfzw7vhg4u '@iconify-json/ep': 1.1.16 '@iconify/vue': 4.1.2_vue@3.4.38 + '@types/leaflet': 1.9.12 '@types/nprogress': 0.2.3 '@types/path-browserify': 1.0.2 '@types/qrcode': 1.5.5 @@ -1018,6 +1020,10 @@ resolution: {integrity: sha512-2N93vadEGDFhASTIRbizbl4bNqpMOId5zZfj6hHqYZfEzEfO9onnU4Im8xvzo8uudySDveDHBOOSlTWf38ErfQ==} dev: true + /@types/geojson/7946.0.14: + resolution: {integrity: sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==} + dev: true + /@types/inquirer/8.2.10: resolution: {integrity: sha512-IdD5NmHyVjWM8SHWo/kPBgtzXatwPkfwzyP3fN1jF2g9BWt5WO+8hL2F4o2GKIYsU40PpqeevuUWvkS/roXJkA==} dependencies: @@ -1033,6 +1039,12 @@ resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true + /@types/leaflet/1.9.12: + resolution: {integrity: sha512-BK7XS+NyRI291HIo0HCfE18Lp8oA30H1gpi1tf0mF3TgiCEzanQjOqNZ4x126SXzzi2oNSZhZ5axJp1k0iM6jg==} + dependencies: + '@types/geojson': 7946.0.14 + dev: true + /@types/liftoff/4.0.3: resolution: {integrity: sha512-UgbL2kR5pLrWICvr8+fuSg0u43LY250q7ZMkC+XKC3E+rs/YBDEnQIzsnhU5dYsLlwMi3R75UvCL87pObP1sxw==} dependencies: diff --git a/public/config/config.json b/public/config/config.json index 1452d58..973ce85 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { - "title":"安全生产智慧监管系统", - "baseUrl": "http://192.168.83.42:6909/safe-server/", + "title": "安全生产智慧监管系统", + "baseUrl": "https://10.20.100.52:1614/safe-server", "lat": "39.908447", "lng": "116.258555", "minZoom": "5", diff --git a/src/assets/icons/icon-focusIn.svg b/src/assets/icons/icon-focusIn.svg new file mode 100644 index 0000000..b4f3441 --- /dev/null +++ b/src/assets/icons/icon-focusIn.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-focusOut.svg b/src/assets/icons/icon-focusOut.svg new file mode 100644 index 0000000..d0bcbed --- /dev/null +++ b/src/assets/icons/icon-focusOut.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-refresh.svg b/src/assets/icons/icon-refresh.svg new file mode 100644 index 0000000..af71d10 --- /dev/null +++ b/src/assets/icons/icon-refresh.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index 318f822..7222afd 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -102,7 +102,7 @@ - + diff --git a/src/router/modules/home.ts b/src/router/modules/home.ts index 3164531..2afcdb8 100644 --- a/src/router/modules/home.ts +++ b/src/router/modules/home.ts @@ -69,6 +69,7 @@ { path: 'control', name: 'control', + // component: () => import('@/views/ycjg/ssjk/control-noPlugin.vue'), component: () => import('@/views/ycjg/ssjk/control.vue'), meta: { title: '实时监控', diff --git a/src/utils/Dispatch706.ts b/src/utils/Dispatch706.ts index b150db2..c5d8b97 100644 --- a/src/utils/Dispatch706.ts +++ b/src/utils/Dispatch706.ts @@ -29,7 +29,7 @@ export function init(pagename: string, callBack: any) { user.initCallBack = callBack - var retCode = DispatchCtrlLib.Initialize(DispatchCallBack, 0) //, pagename) + var retCode = DispatchCtrlLib.Initialize(DispatchCallBack, 0) // , pagename) if (retCode === 0) { console.log('初始化成功, casic203') if (window.location.href.indexOf('https') == 0) { @@ -108,12 +108,17 @@ return null } else { + console.log('------------------------拉取视频成功--------------------------------') + console.log(videoLib) + console.log('------------------------res--------------------------------') + console.log(res) videoLib.StartDisplay(res) console.log('start display, casic203', res) return res } } +// 挂断视频 export function unSipVideo(callId: Number, videoLib: any) { const retCode = DispatchCtrlLib.MonitorVideoHangup(callId) if (retCode == 0) { @@ -124,3 +129,18 @@ } videoLib.StopDisplay() } + +// 控制摄像头 +/** + * 控制摄像头 + * @param Number 目标终端号码 + * @param Command 操作类型 + * @param Direction 方向 + * @param Speed 速度 + */ +export function controlCamera(number: any, command: any, direction?: any, speed?: any) { + const res = DispatchCtrlLib.MonitorVideoPtz(number, command, direction, speed) + if (res === 0) { + console.log('请求成功') + } +} diff --git a/src/views/map/map.vue b/src/views/map/map.vue index c4d851c..1969afc 100644 --- a/src/views/map/map.vue +++ b/src/views/map/map.vue @@ -9,7 +9,7 @@ import type { lineDataI } from '@/components/Echart/echart-interface' import 'leaflet/dist/leaflet.css' import 'leaflet.label' -import {getDevListPage} from "@/api/ycjg/dev"; +import { getDevListPage } from '@/api/ycjg/dev' const { proxy } = getCurrentInstance() const websocket = useWebsocketStore() @@ -87,8 +87,13 @@ }) refreshMarker.value = true // 定位 + console.log('----------------------------------定位---------------------------------------') + console.log(res.data.rows) + console.log(res.data.rows[0]) if (res.data.length > 0) { - map.value.setView({ lat: res.data[0].latitude, lng: res.data[0].longitude }) + // map.value.setView({ lat: res.data[0].latitude, lng: res.data[0].longitude }) + // map.value.setView([res.data.rows[0].latitude, res.data.rows[0].longitude]) + map.value.setView({ lat: res.data.rows[0].latitude, lng: res.data.rows[0].longitude }) } }) } @@ -108,6 +113,7 @@ attributionControl: false, crs: L.CRS.EPSG3857, }) + // z 缩放级别, x:新坐标, y: y坐标 const str = '/static/tiles/{z}/{x}/{y}.png' baseLayer.value.push(L.tileLayer(str).addTo(map.value)) search() @@ -118,7 +124,7 @@ - + @@ -135,8 +141,7 @@ 离线 - - + + diff --git a/.eslintrc b/.eslintrc index a6a6e44..ed35560 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,19 +2,26 @@ "extends": "@antfu", "rules": { "curly": ["error", "all"], - "no-tabs":"off", + "no-tabs": "off", "no-const-assign": "off", + "no-constant-condition": "off", + "no-parsing-error": "off", "no-console": "off", "eqeqeq": "off", - "vars-on-top":"off", - "no-var":"off", - "array-callback-return":"off", + "vars-on-top": "off", + "no-var": "off", + "array-callback-return": "off", "@typescript-eslint/no-this-alias": "off", - "no-unused-expressions":"off", + "no-unused-expressions": "off", "vue/no-mutating-props": "off", - "vue/component-name-in-template-casing": ["error", "kebab-case", { - "registeredComponentsOnly": false, - "ignores": [] - }] + "no-duplicate-selectors": "off", + "vue/component-name-in-template-casing": [ + "error", + "kebab-case", + { + "registeredComponentsOnly": false, + "ignores": [] + } + ] } } diff --git a/20240821.zip b/20240821.zip new file mode 100644 index 0000000..36831cf --- /dev/null +++ b/20240821.zip Binary files differ diff --git a/package.json b/package.json index 02e0868..cce282a 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "@antfu/eslint-config": "^0.29.4", "@iconify-json/ep": "^1.1.8", "@iconify/vue": "^4.0.0", + "@types/leaflet": "^1.9.12", "@types/nprogress": "^0.2.0", "@types/path-browserify": "^1.0.0", "@types/qrcode": "^1.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8407695..4afe118 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,6 +6,7 @@ '@iconify-json/ep': ^1.1.8 '@iconify/vue': ^4.0.0 '@tinymce/tinymce-vue': ^5.0.0 + '@types/leaflet': ^1.9.12 '@types/nprogress': ^0.2.0 '@types/path-browserify': ^1.0.0 '@types/qrcode': ^1.5.0 @@ -122,6 +123,7 @@ '@antfu/eslint-config': 0.29.4_4lxgoysztp3gakdxqfzw7vhg4u '@iconify-json/ep': 1.1.16 '@iconify/vue': 4.1.2_vue@3.4.38 + '@types/leaflet': 1.9.12 '@types/nprogress': 0.2.3 '@types/path-browserify': 1.0.2 '@types/qrcode': 1.5.5 @@ -1018,6 +1020,10 @@ resolution: {integrity: sha512-2N93vadEGDFhASTIRbizbl4bNqpMOId5zZfj6hHqYZfEzEfO9onnU4Im8xvzo8uudySDveDHBOOSlTWf38ErfQ==} dev: true + /@types/geojson/7946.0.14: + resolution: {integrity: sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==} + dev: true + /@types/inquirer/8.2.10: resolution: {integrity: sha512-IdD5NmHyVjWM8SHWo/kPBgtzXatwPkfwzyP3fN1jF2g9BWt5WO+8hL2F4o2GKIYsU40PpqeevuUWvkS/roXJkA==} dependencies: @@ -1033,6 +1039,12 @@ resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true + /@types/leaflet/1.9.12: + resolution: {integrity: sha512-BK7XS+NyRI291HIo0HCfE18Lp8oA30H1gpi1tf0mF3TgiCEzanQjOqNZ4x126SXzzi2oNSZhZ5axJp1k0iM6jg==} + dependencies: + '@types/geojson': 7946.0.14 + dev: true + /@types/liftoff/4.0.3: resolution: {integrity: sha512-UgbL2kR5pLrWICvr8+fuSg0u43LY250q7ZMkC+XKC3E+rs/YBDEnQIzsnhU5dYsLlwMi3R75UvCL87pObP1sxw==} dependencies: diff --git a/public/config/config.json b/public/config/config.json index 1452d58..973ce85 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { - "title":"安全生产智慧监管系统", - "baseUrl": "http://192.168.83.42:6909/safe-server/", + "title": "安全生产智慧监管系统", + "baseUrl": "https://10.20.100.52:1614/safe-server", "lat": "39.908447", "lng": "116.258555", "minZoom": "5", diff --git a/src/assets/icons/icon-focusIn.svg b/src/assets/icons/icon-focusIn.svg new file mode 100644 index 0000000..b4f3441 --- /dev/null +++ b/src/assets/icons/icon-focusIn.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-focusOut.svg b/src/assets/icons/icon-focusOut.svg new file mode 100644 index 0000000..d0bcbed --- /dev/null +++ b/src/assets/icons/icon-focusOut.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-refresh.svg b/src/assets/icons/icon-refresh.svg new file mode 100644 index 0000000..af71d10 --- /dev/null +++ b/src/assets/icons/icon-refresh.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index 318f822..7222afd 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -102,7 +102,7 @@ - + diff --git a/src/router/modules/home.ts b/src/router/modules/home.ts index 3164531..2afcdb8 100644 --- a/src/router/modules/home.ts +++ b/src/router/modules/home.ts @@ -69,6 +69,7 @@ { path: 'control', name: 'control', + // component: () => import('@/views/ycjg/ssjk/control-noPlugin.vue'), component: () => import('@/views/ycjg/ssjk/control.vue'), meta: { title: '实时监控', diff --git a/src/utils/Dispatch706.ts b/src/utils/Dispatch706.ts index b150db2..c5d8b97 100644 --- a/src/utils/Dispatch706.ts +++ b/src/utils/Dispatch706.ts @@ -29,7 +29,7 @@ export function init(pagename: string, callBack: any) { user.initCallBack = callBack - var retCode = DispatchCtrlLib.Initialize(DispatchCallBack, 0) //, pagename) + var retCode = DispatchCtrlLib.Initialize(DispatchCallBack, 0) // , pagename) if (retCode === 0) { console.log('初始化成功, casic203') if (window.location.href.indexOf('https') == 0) { @@ -108,12 +108,17 @@ return null } else { + console.log('------------------------拉取视频成功--------------------------------') + console.log(videoLib) + console.log('------------------------res--------------------------------') + console.log(res) videoLib.StartDisplay(res) console.log('start display, casic203', res) return res } } +// 挂断视频 export function unSipVideo(callId: Number, videoLib: any) { const retCode = DispatchCtrlLib.MonitorVideoHangup(callId) if (retCode == 0) { @@ -124,3 +129,18 @@ } videoLib.StopDisplay() } + +// 控制摄像头 +/** + * 控制摄像头 + * @param Number 目标终端号码 + * @param Command 操作类型 + * @param Direction 方向 + * @param Speed 速度 + */ +export function controlCamera(number: any, command: any, direction?: any, speed?: any) { + const res = DispatchCtrlLib.MonitorVideoPtz(number, command, direction, speed) + if (res === 0) { + console.log('请求成功') + } +} diff --git a/src/views/map/map.vue b/src/views/map/map.vue index c4d851c..1969afc 100644 --- a/src/views/map/map.vue +++ b/src/views/map/map.vue @@ -9,7 +9,7 @@ import type { lineDataI } from '@/components/Echart/echart-interface' import 'leaflet/dist/leaflet.css' import 'leaflet.label' -import {getDevListPage} from "@/api/ycjg/dev"; +import { getDevListPage } from '@/api/ycjg/dev' const { proxy } = getCurrentInstance() const websocket = useWebsocketStore() @@ -87,8 +87,13 @@ }) refreshMarker.value = true // 定位 + console.log('----------------------------------定位---------------------------------------') + console.log(res.data.rows) + console.log(res.data.rows[0]) if (res.data.length > 0) { - map.value.setView({ lat: res.data[0].latitude, lng: res.data[0].longitude }) + // map.value.setView({ lat: res.data[0].latitude, lng: res.data[0].longitude }) + // map.value.setView([res.data.rows[0].latitude, res.data.rows[0].longitude]) + map.value.setView({ lat: res.data.rows[0].latitude, lng: res.data.rows[0].longitude }) } }) } @@ -108,6 +113,7 @@ attributionControl: false, crs: L.CRS.EPSG3857, }) + // z 缩放级别, x:新坐标, y: y坐标 const str = '/static/tiles/{z}/{x}/{y}.png' baseLayer.value.push(L.tileLayer(str).addTo(map.value)) search() @@ -118,7 +124,7 @@ - + @@ -135,8 +141,7 @@ 离线 - - + + diff --git a/src/views/ycjg/ssjk/control.vue b/src/views/ycjg/ssjk/control.vue index 3953a38..210d2b2 100644 --- a/src/views/ycjg/ssjk/control.vue +++ b/src/views/ycjg/ssjk/control.vue @@ -18,10 +18,9 @@ import { base64ToBlob, exportFile } from '@/utils/exportUtils' import { log } from '@/utils/log' import { getPreviewUrl } from '@/utils/hik' -import { initPlugin, login, logout, preview, stop } from '@/utils/HKVideo' -import { loginDH } from '@/utils/DHVideo' -const { proxy } = getCurrentInstance() - +import { controlCamera, init, login, logout, sipVideoFn, unInit, unSipVideo, videoInit } from '@/utils/Dispatch706' +const videoLib: any = [''] +const callId: any = [''] const websocket = useWebsocketStore() const $route = useRoute() const deviceData: Ref = ref({}) @@ -30,12 +29,7 @@ const loading = ref(false) const total = ref(0) const list = ref([]) -const refreshHK = ref(true) -const hkPlugin: any = ref(null) -const dhVideo: any = ref(null) -const lineList: Ref = ref([]) const timeRange = ref<[any, any]>(['', '']) - const defaultQuery = { devId: '', startTime: '', @@ -78,24 +72,24 @@ // 调整大小 const resize = debounce(() => { - if (deviceData.value.nvrManufacture === 'HIKVISION') { - stop(0) - refreshHK.value = true - nextTick(() => { - initPlugin(hkPlugin.value.clientWidth, hkPlugin.value.clientHeight, 1, '', false, () => { - setTimeout(() => { - preview(deviceData.value.nvrIp, '80', deviceData.value.nvrUser, deviceData.value.nvrPassword, 0, true, deviceData.value.nvrChannel) - }, 1000) - }, () => { + nextTick(() => { + setTimeout(() => { + // handleResize() + init('ssjk/page', () => { + videoLib[0] = videoInit(0) + login() + // 退出上一个callId + if (callId[0] !== '' && callId[0] !== null) { + unSipVideo(callId[0], videoLib[0]) // 挂断 + } + callId[0] = sipVideoFn(videoLib[0], deviceData.value.cameraIndexCode, 6) // 拉取视频 }) - }) - } + window.addEventListener('resize', handleResize) + }, 200) + }) }, 1000) -const handleResize = () => { - if (deviceData.value.nvrManufacture === 'HIKVISION') { - refreshHK.value = false - } +function handleResize() { resize() } @@ -116,35 +110,15 @@ const time = dayjs() log('视频抓拍', `${deviceData.value.monitorName}_抓拍时间:${time.format('YYYY-MM-DD HH:mm:ss')}`) const name = `${deviceData.value.monitorName}_${time.format('YYYY-MM-DD HH_mm_ss')}` - if (deviceData.value.nvrManufacture === 'HIKVISION') { - WebVideoCtrl.I2_CapturePic(`${name}.jpeg`, { - bDateDir: true, - }).then((e: any) => { - var blob = new Blob([e], { type: 'image/jpeg' }) - var reader = new FileReader() - reader.readAsDataURL(blob) - reader.onload = function (base64: any) { - pictureAdd({ - devId: $route.query.id, - picture: base64.target.result, - }).then((res: any) => { - ElMessage.success('抓图成功') - search() - }) - } - }, () => {}) - } - else { - window.player.capture(`${name}.png`) - pictureAdd({ - devId: $route.query.id, - picture: window.player.getCapture(), - }).then((res: any) => { - ElMessage.success('抓图成功') - search() - }) - // domToPic(dhVideo.value, time) - } + window.player.capture(`${name}.png`) + pictureAdd({ + devId: $route.query.id, + picture: window.player.getCapture(), + }).then((res: any) => { + ElMessage.success('抓图成功') + search() + }) + // domToPic(dhVideo.value, time) } function domToPic(dom: any, time: any) { html2canvas(dom).then((res) => { @@ -173,46 +147,44 @@ } /* 预览&对讲 */ async function realplay() { - if (deviceData.value.nvrManufacture === 'HIKVISION') { - const canvas = document.getElementById('canvas1') - canvas.id = 'canvas0' - } - else { - window.player.play() - } + window.player.play() } function stopPlay() { - if (deviceData.value.nvrManufacture === 'HIKVISION') { - const canvas = document.getElementById('canvas0') - canvas.id = 'canvas1' - } - else { - window.player.pause() - } + window.player.pause() } -// 放大 -function zoomIn(action: string) { - const params = { - command: action, - horizonSpeed: '30', - verticalSpeed: '30', - zoomSpeed: '30', - } - ptzControl(deviceData.value.nvrIndexCode, deviceData.value.cameraIndexCode, params).then(() => {}) +// 放大/缩小、调近\调远 +function controlFocus(command: number, action: number) { + controlCamera(deviceData.value.cameraIndexCode, command, action, 30) } +const cameraParam = { + up: { + command: 1, + direction: 0, + }, + down: { + command: 1, + direction: 1, + }, + left: { + command: 2, + direction: 0, + }, + right: { + command: 2, + direction: 1, + }, +} as any + // 上下左右 -function controlWithSpeed(event: any, type: any) { - if (event.detail === 1) { - const params = { - command: type, - zoomSpeed: '30', - horizonSpeed: '30', - verticalSpeed: '30', - } - ptzControl(deviceData.value.nvrIndexCode, deviceData.value.cameraIndexCode, params).then(() => {}) - } +function controlWithSpeed(event: any, type: string) { + controlCamera(deviceData.value.cameraIndexCode, cameraParam.type.command, cameraParam.type.direction, 30) +} + +// 停止 +function stopControlCamera(event: any, type: string) { + controlCamera(deviceData.value.cameraIndexCode, 0) } function handleSizeChange(val: number) { @@ -228,17 +200,6 @@ search(true) } -function loginDevice() { - login( - deviceData.value.nvrIp, - 80, - deviceData.value.nvrUser, - deviceData.value.nvrPassword, - 0, - true, - deviceData.value.nvrChannel) -} - const disabledPastDateStart = (date: any) => { if (listQuery.endTime !== '') { return date.getTime() > new Date(`${listQuery.endTime} 23:59:59`).getTime() @@ -263,15 +224,15 @@ getDevInfo(listQuery.devId).then((response) => { deviceData.value = response.data setTimeout(() => { - if (response.data.nvrManufacture === 'HIKVISION') { - initPlugin(hkPlugin.value.clientWidth, hkPlugin.value.clientHeight, 1, '', false, loginDevice, null) - } - else { - nextTick(() => { - loginDH(deviceData.value.nvrIp, '80', deviceData.value.nvrUser, deviceData.value.nvrPassword, deviceData.value.nvrChannel, 0) - }) - } handleResize() + init('ssjk/page', () => { + videoLib[0] = videoInit(0) + if (callId[0] !== '' && callId[0] !== null) { + unSipVideo(callId[0], videoLib[0]) // 挂断 + } + callId[0] = sipVideoFn(videoLib[0], deviceData.value.cameraIndexCode, 6) // 拉取视频 + login() + }) window.addEventListener('resize', handleResize) }, 200) }) @@ -280,25 +241,18 @@ }) onBeforeUnmount(() => { - try { - window.play = null - } - catch (e) {} unwatch() - try { - logout(deviceData.value.nvrIp) - } - catch (e) {} + logout() + unInit() window.removeEventListener('resize', handleResize) }) - - - - + + + - + + + + - + {{ deviceData.monitorName }} @@ -420,17 +384,28 @@ + diff --git a/src/views/ycjg/ssjk/control.vue b/src/views/ycjg/ssjk/control.vue index 3953a38..210d2b2 100644 --- a/src/views/ycjg/ssjk/control.vue +++ b/src/views/ycjg/ssjk/control.vue @@ -18,10 +18,9 @@ import { base64ToBlob, exportFile } from '@/utils/exportUtils' import { log } from '@/utils/log' import { getPreviewUrl } from '@/utils/hik' -import { initPlugin, login, logout, preview, stop } from '@/utils/HKVideo' -import { loginDH } from '@/utils/DHVideo' -const { proxy } = getCurrentInstance() - +import { controlCamera, init, login, logout, sipVideoFn, unInit, unSipVideo, videoInit } from '@/utils/Dispatch706' +const videoLib: any = [''] +const callId: any = [''] const websocket = useWebsocketStore() const $route = useRoute() const deviceData: Ref = ref({}) @@ -30,12 +29,7 @@ const loading = ref(false) const total = ref(0) const list = ref([]) -const refreshHK = ref(true) -const hkPlugin: any = ref(null) -const dhVideo: any = ref(null) -const lineList: Ref = ref([]) const timeRange = ref<[any, any]>(['', '']) - const defaultQuery = { devId: '', startTime: '', @@ -78,24 +72,24 @@ // 调整大小 const resize = debounce(() => { - if (deviceData.value.nvrManufacture === 'HIKVISION') { - stop(0) - refreshHK.value = true - nextTick(() => { - initPlugin(hkPlugin.value.clientWidth, hkPlugin.value.clientHeight, 1, '', false, () => { - setTimeout(() => { - preview(deviceData.value.nvrIp, '80', deviceData.value.nvrUser, deviceData.value.nvrPassword, 0, true, deviceData.value.nvrChannel) - }, 1000) - }, () => { + nextTick(() => { + setTimeout(() => { + // handleResize() + init('ssjk/page', () => { + videoLib[0] = videoInit(0) + login() + // 退出上一个callId + if (callId[0] !== '' && callId[0] !== null) { + unSipVideo(callId[0], videoLib[0]) // 挂断 + } + callId[0] = sipVideoFn(videoLib[0], deviceData.value.cameraIndexCode, 6) // 拉取视频 }) - }) - } + window.addEventListener('resize', handleResize) + }, 200) + }) }, 1000) -const handleResize = () => { - if (deviceData.value.nvrManufacture === 'HIKVISION') { - refreshHK.value = false - } +function handleResize() { resize() } @@ -116,35 +110,15 @@ const time = dayjs() log('视频抓拍', `${deviceData.value.monitorName}_抓拍时间:${time.format('YYYY-MM-DD HH:mm:ss')}`) const name = `${deviceData.value.monitorName}_${time.format('YYYY-MM-DD HH_mm_ss')}` - if (deviceData.value.nvrManufacture === 'HIKVISION') { - WebVideoCtrl.I2_CapturePic(`${name}.jpeg`, { - bDateDir: true, - }).then((e: any) => { - var blob = new Blob([e], { type: 'image/jpeg' }) - var reader = new FileReader() - reader.readAsDataURL(blob) - reader.onload = function (base64: any) { - pictureAdd({ - devId: $route.query.id, - picture: base64.target.result, - }).then((res: any) => { - ElMessage.success('抓图成功') - search() - }) - } - }, () => {}) - } - else { - window.player.capture(`${name}.png`) - pictureAdd({ - devId: $route.query.id, - picture: window.player.getCapture(), - }).then((res: any) => { - ElMessage.success('抓图成功') - search() - }) - // domToPic(dhVideo.value, time) - } + window.player.capture(`${name}.png`) + pictureAdd({ + devId: $route.query.id, + picture: window.player.getCapture(), + }).then((res: any) => { + ElMessage.success('抓图成功') + search() + }) + // domToPic(dhVideo.value, time) } function domToPic(dom: any, time: any) { html2canvas(dom).then((res) => { @@ -173,46 +147,44 @@ } /* 预览&对讲 */ async function realplay() { - if (deviceData.value.nvrManufacture === 'HIKVISION') { - const canvas = document.getElementById('canvas1') - canvas.id = 'canvas0' - } - else { - window.player.play() - } + window.player.play() } function stopPlay() { - if (deviceData.value.nvrManufacture === 'HIKVISION') { - const canvas = document.getElementById('canvas0') - canvas.id = 'canvas1' - } - else { - window.player.pause() - } + window.player.pause() } -// 放大 -function zoomIn(action: string) { - const params = { - command: action, - horizonSpeed: '30', - verticalSpeed: '30', - zoomSpeed: '30', - } - ptzControl(deviceData.value.nvrIndexCode, deviceData.value.cameraIndexCode, params).then(() => {}) +// 放大/缩小、调近\调远 +function controlFocus(command: number, action: number) { + controlCamera(deviceData.value.cameraIndexCode, command, action, 30) } +const cameraParam = { + up: { + command: 1, + direction: 0, + }, + down: { + command: 1, + direction: 1, + }, + left: { + command: 2, + direction: 0, + }, + right: { + command: 2, + direction: 1, + }, +} as any + // 上下左右 -function controlWithSpeed(event: any, type: any) { - if (event.detail === 1) { - const params = { - command: type, - zoomSpeed: '30', - horizonSpeed: '30', - verticalSpeed: '30', - } - ptzControl(deviceData.value.nvrIndexCode, deviceData.value.cameraIndexCode, params).then(() => {}) - } +function controlWithSpeed(event: any, type: string) { + controlCamera(deviceData.value.cameraIndexCode, cameraParam.type.command, cameraParam.type.direction, 30) +} + +// 停止 +function stopControlCamera(event: any, type: string) { + controlCamera(deviceData.value.cameraIndexCode, 0) } function handleSizeChange(val: number) { @@ -228,17 +200,6 @@ search(true) } -function loginDevice() { - login( - deviceData.value.nvrIp, - 80, - deviceData.value.nvrUser, - deviceData.value.nvrPassword, - 0, - true, - deviceData.value.nvrChannel) -} - const disabledPastDateStart = (date: any) => { if (listQuery.endTime !== '') { return date.getTime() > new Date(`${listQuery.endTime} 23:59:59`).getTime() @@ -263,15 +224,15 @@ getDevInfo(listQuery.devId).then((response) => { deviceData.value = response.data setTimeout(() => { - if (response.data.nvrManufacture === 'HIKVISION') { - initPlugin(hkPlugin.value.clientWidth, hkPlugin.value.clientHeight, 1, '', false, loginDevice, null) - } - else { - nextTick(() => { - loginDH(deviceData.value.nvrIp, '80', deviceData.value.nvrUser, deviceData.value.nvrPassword, deviceData.value.nvrChannel, 0) - }) - } handleResize() + init('ssjk/page', () => { + videoLib[0] = videoInit(0) + if (callId[0] !== '' && callId[0] !== null) { + unSipVideo(callId[0], videoLib[0]) // 挂断 + } + callId[0] = sipVideoFn(videoLib[0], deviceData.value.cameraIndexCode, 6) // 拉取视频 + login() + }) window.addEventListener('resize', handleResize) }, 200) }) @@ -280,25 +241,18 @@ }) onBeforeUnmount(() => { - try { - window.play = null - } - catch (e) {} unwatch() - try { - logout(deviceData.value.nvrIp) - } - catch (e) {} + logout() + unInit() window.removeEventListener('resize', handleResize) }) - - - - + + + - + + + + - + {{ deviceData.monitorName }} @@ -420,17 +384,28 @@