设备中台添加了国密种类

This commit is contained in:
骆乐 2022-07-21 14:21:23 +08:00
parent c0951b378b
commit e281d53283
17 changed files with 860 additions and 190 deletions

156
package-lock.json generated
View File

@ -16,8 +16,11 @@
"echarts4": "npm:echarts@^4.8.0",
"element-ui": "^2.4.5",
"ezuikit-js": "^0.1.7",
"flv.js": "^1.6.2",
"gantt-elastic": "^1.0.12",
"html2canvas": "^1.0.0-rc.7",
"js-base64": "^3.7.2",
"js-md5": "^0.7.3",
"moment": "^2.29.1",
"monitorjs_horse": "^2.2.1",
"mqtt": "^4.2.6",
@ -3050,6 +3053,11 @@
"node": ">=0.10.0"
}
},
"node_modules/autoprefixer-loader/node_modules/js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
},
"node_modules/autoprefixer-loader/node_modules/json5": {
"version": "0.5.1",
"resolved": "https://registry.npmmirror.com/json5/-/json5-0.5.1.tgz",
@ -3133,7 +3141,7 @@
"version": "0.19.2",
"resolved": "https://registry.npmmirror.com/axios/-/axios-0.19.2.tgz",
"integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==",
"license": "MIT",
"deprecated": "Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410",
"dependencies": {
"follow-redirects": "1.5.10"
}
@ -7429,6 +7437,11 @@
"event-emitter": "~0.3.5"
}
},
"node_modules/es6-promise": {
"version": "4.2.8",
"resolved": "https://registry.npmmirror.com/es6-promise/-/es6-promise-4.2.8.tgz",
"integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w=="
},
"node_modules/es6-set": {
"version": "0.1.5",
"resolved": "https://registry.npmmirror.com/es6-set/-/es6-set-0.1.5.tgz",
@ -8160,6 +8173,15 @@
"readable-stream": "^2.3.6"
}
},
"node_modules/flv.js": {
"version": "1.6.2",
"resolved": "https://registry.npmmirror.com/flv.js/-/flv.js-1.6.2.tgz",
"integrity": "sha512-xre4gUbX1MPtgQRKj2pxJENp/RnaHaxYvy3YToVVCrSmAWUu85b9mug6pTXF6zakUjNP2lFWZ1rkSX7gxhB/2A==",
"dependencies": {
"es6-promise": "^4.2.8",
"webworkify-webpack": "^2.1.5"
}
},
"node_modules/follow-redirects": {
"version": "1.12.1",
"funding": [
@ -9957,10 +9979,14 @@
}
},
"node_modules/js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
"license": "BSD-3-Clause"
"version": "3.7.2",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-3.7.2.tgz",
"integrity": "sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ=="
},
"node_modules/js-md5": {
"version": "0.7.3",
"resolved": "https://registry.npmmirror.com/js-md5/-/js-md5-0.7.3.tgz",
"integrity": "sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ=="
},
"node_modules/js-message": {
"version": "1.0.5",
@ -13118,6 +13144,11 @@
"node": ">=0.10.0"
}
},
"node_modules/postcss-discard-unused/node_modules/js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
},
"node_modules/postcss-discard-unused/node_modules/postcss": {
"version": "5.2.18",
"resolved": "https://registry.npmmirror.com/postcss/-/postcss-5.2.18.tgz",
@ -13218,6 +13249,11 @@
"node": ">=0.10.0"
}
},
"node_modules/postcss-filter-plugins/node_modules/js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
},
"node_modules/postcss-filter-plugins/node_modules/postcss": {
"version": "5.2.18",
"resolved": "https://registry.npmmirror.com/postcss/-/postcss-5.2.18.tgz",
@ -13449,6 +13485,11 @@
"node": ">=0.10.0"
}
},
"node_modules/postcss-merge-idents/node_modules/js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
},
"node_modules/postcss-merge-idents/node_modules/postcss": {
"version": "5.2.18",
"resolved": "https://registry.npmmirror.com/postcss/-/postcss-5.2.18.tgz",
@ -13985,6 +14026,11 @@
"node": ">=0.10.0"
}
},
"node_modules/postcss-reduce-idents/node_modules/js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
},
"node_modules/postcss-reduce-idents/node_modules/postcss": {
"version": "5.2.18",
"resolved": "https://registry.npmmirror.com/postcss/-/postcss-5.2.18.tgz",
@ -14130,6 +14176,11 @@
"node": ">=0.10.0"
}
},
"node_modules/postcss-safe-parser/node_modules/js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
},
"node_modules/postcss-safe-parser/node_modules/postcss": {
"version": "5.2.18",
"resolved": "https://registry.npmmirror.com/postcss/-/postcss-5.2.18.tgz",
@ -14286,6 +14337,11 @@
"node": ">=0.10.0"
}
},
"node_modules/postcss-zindex/node_modules/js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
},
"node_modules/postcss-zindex/node_modules/postcss": {
"version": "5.2.18",
"resolved": "https://registry.npmmirror.com/postcss/-/postcss-5.2.18.tgz",
@ -15466,6 +15522,11 @@
"source-map": "^0.7.1"
}
},
"node_modules/scss-tokenizer/node_modules/js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
},
"node_modules/scss-tokenizer/node_modules/source-map": {
"version": "0.7.3",
"license": "BSD-3-Clause",
@ -18683,6 +18744,11 @@
"node": ">=0.10.0"
}
},
"node_modules/vue-photo-preview/node_modules/js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
},
"node_modules/vue-photo-preview/node_modules/js-yaml": {
"version": "3.7.0",
"resolved": "https://registry.npmmirror.com/js-yaml/-/js-yaml-3.7.0.tgz",
@ -20933,6 +20999,11 @@
"node": ">=0.8.0"
}
},
"node_modules/webworkify-webpack": {
"version": "2.1.5",
"resolved": "https://registry.npmmirror.com/webworkify-webpack/-/webworkify-webpack-2.1.5.tgz",
"integrity": "sha512-2akF8FIyUvbiBBdD+RoHpoTbHMQF2HwjcxfDvgztAX5YwbZNyrtfUMgvfgFVsgDhDPVTlkbb5vyasqDHfIDPQw=="
},
"node_modules/when": {
"version": "3.6.4",
"resolved": "https://registry.npmmirror.com/when/-/when-3.6.4.tgz",
@ -23443,6 +23514,11 @@
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-1.0.0.tgz",
"integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA=="
},
"js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
},
"json5": {
"version": "0.5.1",
"resolved": "https://registry.npmmirror.com/json5/-/json5-0.5.1.tgz",
@ -26800,6 +26876,11 @@
"event-emitter": "~0.3.5"
}
},
"es6-promise": {
"version": "4.2.8",
"resolved": "https://registry.npmmirror.com/es6-promise/-/es6-promise-4.2.8.tgz",
"integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w=="
},
"es6-set": {
"version": "0.1.5",
"resolved": "https://registry.npmmirror.com/es6-set/-/es6-set-0.1.5.tgz",
@ -27359,6 +27440,15 @@
"readable-stream": "^2.3.6"
}
},
"flv.js": {
"version": "1.6.2",
"resolved": "https://registry.npmmirror.com/flv.js/-/flv.js-1.6.2.tgz",
"integrity": "sha512-xre4gUbX1MPtgQRKj2pxJENp/RnaHaxYvy3YToVVCrSmAWUu85b9mug6pTXF6zakUjNP2lFWZ1rkSX7gxhB/2A==",
"requires": {
"es6-promise": "^4.2.8",
"webworkify-webpack": "^2.1.5"
}
},
"follow-redirects": {
"version": "1.12.1"
},
@ -28597,9 +28687,14 @@
}
},
"js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
"version": "3.7.2",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-3.7.2.tgz",
"integrity": "sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ=="
},
"js-md5": {
"version": "0.7.3",
"resolved": "https://registry.npmmirror.com/js-md5/-/js-md5-0.7.3.tgz",
"integrity": "sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ=="
},
"js-message": {
"version": "1.0.5",
@ -30839,6 +30934,11 @@
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-1.0.0.tgz",
"integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA=="
},
"js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
},
"postcss": {
"version": "5.2.18",
"resolved": "https://registry.npmmirror.com/postcss/-/postcss-5.2.18.tgz",
@ -30910,6 +31010,11 @@
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-1.0.0.tgz",
"integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA=="
},
"js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
},
"postcss": {
"version": "5.2.18",
"resolved": "https://registry.npmmirror.com/postcss/-/postcss-5.2.18.tgz",
@ -31082,6 +31187,11 @@
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-1.0.0.tgz",
"integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA=="
},
"js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
},
"postcss": {
"version": "5.2.18",
"resolved": "https://registry.npmmirror.com/postcss/-/postcss-5.2.18.tgz",
@ -31519,6 +31629,11 @@
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-1.0.0.tgz",
"integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA=="
},
"js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
},
"postcss": {
"version": "5.2.18",
"resolved": "https://registry.npmmirror.com/postcss/-/postcss-5.2.18.tgz",
@ -31627,6 +31742,11 @@
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-1.0.0.tgz",
"integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA=="
},
"js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
},
"postcss": {
"version": "5.2.18",
"resolved": "https://registry.npmmirror.com/postcss/-/postcss-5.2.18.tgz",
@ -31742,6 +31862,11 @@
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-1.0.0.tgz",
"integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA=="
},
"js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
},
"postcss": {
"version": "5.2.18",
"resolved": "https://registry.npmmirror.com/postcss/-/postcss-5.2.18.tgz",
@ -32593,6 +32718,11 @@
"source-map": "^0.7.1"
},
"dependencies": {
"js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
},
"source-map": {
"version": "0.7.3"
}
@ -34926,6 +35056,11 @@
"html-comment-regex": "^1.1.0"
}
},
"js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
},
"js-yaml": {
"version": "3.7.0",
"resolved": "https://registry.npmmirror.com/js-yaml/-/js-yaml-3.7.0.tgz",
@ -36609,6 +36744,11 @@
"resolved": "https://registry.npmmirror.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz",
"integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg=="
},
"webworkify-webpack": {
"version": "2.1.5",
"resolved": "https://registry.npmmirror.com/webworkify-webpack/-/webworkify-webpack-2.1.5.tgz",
"integrity": "sha512-2akF8FIyUvbiBBdD+RoHpoTbHMQF2HwjcxfDvgztAX5YwbZNyrtfUMgvfgFVsgDhDPVTlkbb5vyasqDHfIDPQw=="
},
"when": {
"version": "3.6.4",
"resolved": "https://registry.npmmirror.com/when/-/when-3.6.4.tgz",

View File

@ -15,8 +15,11 @@
"echarts4": "npm:echarts@^4.8.0",
"element-ui": "^2.4.5",
"ezuikit-js": "^0.1.7",
"flv.js": "^1.6.2",
"gantt-elastic": "^1.0.12",
"html2canvas": "^1.0.0-rc.7",
"js-base64": "^3.7.2",
"js-md5": "^0.7.3",
"moment": "^2.29.1",
"monitorjs_horse": "^2.2.1",
"mqtt": "^4.2.6",

View File

@ -23,7 +23,7 @@ export default {
edit: '编辑',
delete: '删除',
video_type_tips: '视频类型(以下视频类型同时只可开启一种,如果当前有开启的视频,在选择其他视频类型时,该类型配置及所有信息将归零)',
videoTypeList: ['萤石云', '乐橙', 'ISC', '大华', '宇视', '国标'],
videoTypeList: ['萤石云', '乐橙', 'ISC', '大华', '宇视', '国标','国密'],
playTypeList: ['RTMP高清', 'RTMP流畅', 'HLS高清', 'HLS流畅', '高清轻量级插件(高清)', '流畅轻量级插件(流畅)'],
deviceType: ['枪机', '球机', '热成像', '单兵', '全景', '无人机'],
dialog_video_config: {

View File

@ -22,7 +22,7 @@ export default {
edit: '编辑',
delete: '删除',
video_type_tips: '视频类型(以下视频类型同时只可开启一种,如果当前有开启的视频,在选择其他视频类型时,该类型配置及所有信息将归零)',
videoTypeList: ['萤石云', '乐橙', 'ISC', '大华', '宇视', '国标'],
videoTypeList: ['萤石云', '乐橙', 'ISC', '大华', '宇视', '国标','国密'],
playTypeList: ['RTMP高清', 'RTMP流畅', 'HLS高清', 'HLS流畅', '高清轻量级插件(高清)', '流畅轻量级插件(流畅)'],
deviceType: ['枪机', '球机', '热成像', '单兵', '全景', '无人机'],
dialog_video_config: {

View File

@ -42,8 +42,8 @@ if (process.env.NODE_ENV == 'development') {
// axios.defaults.baseURL = 'http://192.168.34.125:6023/'
// axios.defaults.baseURL = 'http://124.71.178.44:100/' // 河南
// tag: 本地
axios.defaults.baseURL = 'http://192.168.34.174:6023/' // 老大本地
// axios.defaults.baseURL = 'http://192.168.34.125:6043/'; //杨意本地 http/1.1
// axios.defaults.baseURL = 'http://192.168.34.174:6023/' // 老大本地
axios.defaults.baseURL = 'http://192.168.34.125:6023/'; //杨意本地 http/1.1
// axios.defaults.baseURL = 'http://124.71.178.44:9500/'; // 星璇
// axios.defaults.baseURL = 'http://120.196.217.6:7000/';
// axios.defaults.baseURL = 'http://139.9.66.234:8/';

View File

@ -140,11 +140,21 @@ export default {
this.seeEquipment = this.$store.state.userInfo.seeEquipment;
this.loginData = JSON.parse(localStorage.getItem('systemInfo'))
console.log(' this.loginData', this.loginData)
if( this.loginData.headerConfiguration != null){
this.headerConfiguration = this.loginData.headerConfiguration
}
if( this.loginData.projectBackground != null){
this.projectBackground = this.loginData.projectBackground
}
if( this.loginData.enterpriseBackground != null){
this.enterpriseBackground = this.loginData.enterpriseBackground
this.dataCenter1 = this.loginData.dataCenter
}
if(this.loginData.equipmentChina !=null ){
this.equipmentChina = this.loginData.equipmentChina
}
if(this.loginData.dataCenter != null){
this.dataCenter1 = this.loginData.dataCenter
}
// console.log('',this.projectBackground)
// console.log('',this.enterpriseBackground)
},

View File

@ -1,42 +1,94 @@
<template>
<!-- 下拉框选择视频需传入视频列表 -->
<!-- 下拉框选择视频需传入视频列表 -->
<div class="fullHeight videoOverview" id="videoOverview">
<leCheng v-if="pluginType=='lecheng'" :url='urls' :token="lcToken"></leCheng>
<iscPlugin v-else-if="pluginType=='isc'" :type="type" :isIframe="isIframe" :devList="devList" :class="{'isDockingToWoer': isDockingToWoer, 'isLongguangIframe': isIframe, 'isFullScreen': isFullScreen}" :style="{left:worMenuWidth+'px'}"></iscPlugin>
<div v-else
:class="!bottomMod?'oneVideoContent videoContent'+winNum:'videoContent videoContent'+winNum"
<leCheng
v-if="pluginType == 'lecheng'"
:url="urls"
:token="lcToken"
></leCheng>
<iscPlugin
v-else-if="pluginType == 'isc'"
:type="type"
:isIframe="isIframe"
:devList="devList"
:class="{
isDockingToWoer: isDockingToWoer,
isLongguangIframe: isIframe,
isFullScreen: isFullScreen,
}"
:style="{ left: worMenuWidth + 'px' }"
></iscPlugin>
<div v-else-if="pluginType == 'xiongmai'">
<div id="wrapper" style="width: 1570px; height: 830px;"></div>
</div>
<div
v-else
:class="
!bottomMod
? 'oneVideoContent videoContent' + winNum
: 'videoContent videoContent' + winNum
"
>
<div
class="videoItem"
v-for="item in initDivNum"
:key="item"
:class="{'active': activeWinIndex==item}"
@click="activeWinIndex=item"
v-show="item<=winNum"
:class="{ active: activeWinIndex == item }"
@click="activeWinIndex = item"
v-show="item <= winNum"
>
<ysyPlayAndPlayback :ref="'ysy'+item" v-if="pluginType=='ysy'" :ysyParams="ysyParams"></ysyPlayAndPlayback>
<ckPlayer @selectWin="selectWin" :showSelectBtn="true" v-if="pluginType=='ckPlayer'" :url='urls[item]' :index="item"></ckPlayer>
<div class="videoInner2" v-if="pluginType=='videojs'">
<ysyPlayAndPlayback
:ref="'ysy' + item"
v-if="pluginType == 'ysy'"
:ysyParams="ysyParams"
></ysyPlayAndPlayback>
<ckPlayer
@selectWin="selectWin"
:showSelectBtn="true"
v-if="pluginType == 'ckPlayer'"
:url="urls[item]"
:index="item"
></ckPlayer>
<div class="videoInner2" v-if="pluginType == 'videojs'">
<div class="top">
<span
class="winNumName"
>{{$t('message.videoManage.video')}}{{$t('message.videoManage.window')}}{{item}}</span>
<img src="@/assets/images/overview3/close.png" class="close" @click="clocseVideo(item)" />
<span class="winNumName"
>{{ $t("message.videoManage.video")
}}{{ $t("message.videoManage.window") }}{{ item }}</span
>
<img
src="@/assets/images/overview3/close.png"
class="close"
@click="clocseVideo(item)"
/>
</div>
<div class="noVideoBox noVideoBox1">
<img src="@/assets/images/overview3/noVideo.png" class="close" />
<p>{{$t('message.videoManage.no')}}{{$t('message.videoManage.video')}}</p>
<p>
{{ $t("message.videoManage.no")
}}{{ $t("message.videoManage.video") }}
</p>
</div>
<div class="noVideoBox noVideoBox2" style="display:none;">
<img src="@/assets/images/longguang/loading.png" class="close" v-if="company=='longguang'" />
<img src="@/assets/images/overview3/loading.png" class="close" v-else />
<p>{{$t('message.videoManage.video')}}{{$t('message.videoManage.loading')}}...</p>
<img
src="@/assets/images/longguang/loading.png"
class="close"
v-if="company == 'longguang'"
/>
<img
src="@/assets/images/overview3/loading.png"
class="close"
v-else
/>
<p>
{{ $t("message.videoManage.video")
}}{{ $t("message.videoManage.loading") }}...
</p>
</div>
<div class="videoInner">
<video
width="100%"
height="100%"
:id="'myPlayer'+item"
:id="'myPlayer' + item"
autoplay="autoplay"
class="videoClass"
controls="controls"
@ -47,9 +99,14 @@
</div>
</div>
</div>
<div @mousemove="DisplayCoord" @click="getPlaybackTime" class="timeLineBox" id="timeLineBox">
<div
@mousemove="DisplayCoord"
@click="getPlaybackTime"
class="timeLineBox"
id="timeLineBox"
>
<div class="timeItem" v-for="item in 24" :key="item">
<span class="time" v-show="item!=24">{{item}}:00</span>
<span class="time" v-show="item != 24">{{ item }}:00</span>
</div>
<div class="mouseLine" id="mouseLine"></div>
</div>
@ -79,18 +136,28 @@
<span
v-show="showPlayback"
class="videoType"
:class="{'active':videoType==1}"
@click="videoType=1"
>{{$t('message.videoManage.live')}}</span>
:class="{ active: videoType == 1 }"
@click="videoType = 1"
>{{ $t("message.videoManage.live") }}</span
>
<span
v-show="showPlayback"
class="videoType"
:class="{'active':videoType==2}"
@click="videoType=2;winNum=1;activeWinIndex=1;"
>{{$t('message.videoManage.playback')}}</span>
:class="{ active: videoType == 2 }"
@click="
videoType = 2;
winNum = 1;
activeWinIndex = 1;
"
>{{ $t("message.videoManage.playback") }}</span
>
</div>
<div class="historyDate" v-show="videoType==2">
<img src="@/assets/images/overview3/forward.png" class="forward forward-l" srcset />
<div class="historyDate" v-show="videoType == 2">
<img
src="@/assets/images/overview3/forward.png"
class="forward forward-l"
srcset
/>
<i class="el-icon-caret-left"></i>
<el-date-picker
size="medium"
@ -101,33 +168,37 @@
value-format="yyyy-MM-dd hh:mm:ss"
></el-date-picker>
<i class="el-icon-caret-right"></i>
<img src="@/assets/images/overview3/forward.png" class="forward" srcset />
<img
src="@/assets/images/overview3/forward.png"
class="forward"
srcset
/>
</div>
<div class="operateBar">
<i
v-show="videoType==1&&showMoreWin"
v-show="videoType == 1 && showMoreWin"
class="one"
:class="{'active':winNum==1}"
:class="{ active: winNum == 1 }"
@click="changeWinNum(1)"
></i>
<i
v-show="videoType==1&&showMoreWin&&videoWinNum>1"
v-show="videoType == 1 && showMoreWin && videoWinNum > 1"
class="four"
:class="{'active':winNum==4}"
:class="{ active: winNum == 4 }"
@click="changeWinNum(4)"
></i>
<i
v-show="videoType==1&&showMoreWin&& videoWinNum>4"
v-show="videoType == 1 && showMoreWin && videoWinNum > 4"
class="nine"
:class="{'active':winNum==9}"
:class="{ active: winNum == 9 }"
@click="changeWinNum(9)"
></i>
<i v-show="showCaptrue&& videoWinNum>4" class="img"></i>
<i v-show="showCaptrue && videoWinNum > 4" class="img"></i>
<i
v-show="videoType==1&&showControl&& videoWinNum>4"
v-show="videoType == 1 && showControl && videoWinNum > 4"
class="control"
:class="{'active':showControlBox}"
@click="showControlBox=!showControlBox"
:class="{ active: showControlBox }"
@click="showControlBox = !showControlBox"
></i>
</div>
</div>
@ -144,15 +215,15 @@
<img src="@/assets/images/overview3/arrow.png" class="arrow arrow8" />
</div>
<div class="bar">
<span>{{$t('message.videoManage.changeTimes')}}</span>
<span>{{ $t("message.videoManage.changeTimes") }}</span>
<el-slider class="slider" v-model="bar1"></el-slider>
</div>
<div class="bar">
<span>{{$t('message.videoManage.focus')}}</span>
<span>{{ $t("message.videoManage.focus") }}</span>
<el-slider class="slider" v-model="bar2"></el-slider>
</div>
<div class="bar">
<span>{{$t('message.videoManage.aperture')}}</span>
<span>{{ $t("message.videoManage.aperture") }}</span>
<el-slider class="slider" v-model="bar3"></el-slider>
</div>
</div>
@ -163,26 +234,41 @@ import ysyPlayAndPlayback from "./ysyPlayAndPlayback";
import iscPlugin from "./isc_plugin/isc_plugin";
import ckPlayer from "./ckPlayer";
import leCheng from "./leCheng";
import {resizeFn, setOffset,hidePluginWindow,showPluginWindow} from './isc_plugin/video_isc_plugin.js'
import Live from "@/utils";
import {
resizeFn,
setOffset,
hidePluginWindow,
showPluginWindow,
} from "./isc_plugin/video_isc_plugin.js";
import { getVideoItemInfoApi } from "@/assets/js/api/equipmentCenter/cameraList";
export default {
props: ["value", "displayBottomMod", "winNumBer", "autoplay","hiddenSelectBox","type","scrrenPosition"],
components: { ysyPlayAndPlayback,ckPlayer,leCheng,iscPlugin },
props: [
"value",
"displayBottomMod",
"winNumBer",
"autoplay",
"hiddenSelectBox",
"type",
"scrrenPosition",
"xxx",
],
components: { ysyPlayAndPlayback, ckPlayer, leCheng, iscPlugin },
watch: {
//value
value: function (a, b) {
console.log('新的值',a)
value: function(a, b) {
console.log("新的值", a);
this.devList = a;
if(this.isDockingToWoer){
this.pluginType='isc'
}else{
this.getPlayType()
if (this.isDockingToWoer) {
this.pluginType = "isc";
} else {
this.getPlayType();
}
},
},
data() {
return {
screens: null,
bottomMod: false, // false true
videoWinNum: 1, // 1 1 4 4 9
showAutoplay: false, //
@ -210,29 +296,29 @@ export default {
showCaptrue: false, //
showControl: false, //
showPlayback: false, //
pluginType: "", //ysy: videojs ckPlayer lecheng isc
pluginType: "", //ysy: videojs ckPlayer lecheng isc xiongmai
initDivNum: 9,
ysyParams: {
url: "",
accessToken:
"at.3goo7ob2dic9amkg5ycg4n5yak9jtpf2-2dn1vwm6z3-134xqr4-td1bh38w2",
},
urls:['','','','','','','','',''],
lcToken:'',
urls: ["", "", "", "", "", "", "", "", ""],
lcToken: "",
isDockingToWoer: false,
worMenuWidth:0,//
company:'',
worMenuWidth: 0, //
company: "",
isIframe: false,
isFullScreen: false
isFullScreen: false,
};
},
destroy(){
hidePluginWindow()
destroy() {
hidePluginWindow();
},
created() {
this.company = COMPANY;
this.devList = this.$props.value;
// this.bottomMod = this.$props.displayBottomMod;
this.videoWinNum = this.$props.winNumBer;
this.showAutoplay = this.$props.autoplay;
@ -243,48 +329,46 @@ export default {
// if(this.$props.hiddenSelectBox){
// this.hiddenSelectBox = this.$props.hiddenSelectBox;
// }
this.isDockingToWoer=isDockingToWoer
this.isDockingToWoer = isDockingToWoer;
// lgzbdp
if(window.localStorage.getItem('isIframe')){
if(window.localStorage.getItem('isIframe') == '1'){
this.isIframe = true
if (window.localStorage.getItem("isIframe")) {
if (window.localStorage.getItem("isIframe") == "1") {
this.isIframe = true;
// this.$nextTick(()=>{
// setOffset(2180,360)
// })
}
console.log(window.localStorage.getItem('isIframe'))
console.log(window.localStorage.getItem("isIframe"));
}
if(this.isIframe && this.scrrenPosition){
if (this.isIframe && this.scrrenPosition) {
this.worMenuWidth = this.scrrenPosition;
// this.worMenuWidth = 2160
// this.worMenuWidth = 2160
}
if(this.isDockingToWoer){
this.worMenuWidth=(parseInt(document.body.clientWidth)*0.025 )+10
if (this.isDockingToWoer) {
this.worMenuWidth = parseInt(document.body.clientWidth) * 0.025 + 10;
// this.pluginType='isc'
}else{
} else {
// this.getPlayType()
}
},
mounted() {
if (this.pluginType == "ysy"||this.pluginType == "isc") {
if (this.pluginType == "ysy" || this.pluginType == "isc") {
this.showMoreWin = false;
this.showCaptrue = false;
this.showControl = false;
this.showPlayback = false;
this.bottomMod = false;
this.initDivNum = 1;
} else if(this.pluginType=='videojs'){
} else if (this.pluginType == "videojs") {
this.$nextTick(() => {
this.initVideo();
});
}else if(this.pluginType=='lecheng'){
} else if (this.pluginType == "lecheng") {
this.bottomMod = false;
}
// window.addEventListener('keydown',this.fullScreen)
// console.log(document.getElementById('videoOverview'))
},
destroyed() {
if (this.pluginType == "videojs") {
@ -292,85 +376,87 @@ export default {
this["videoObject" + index].dispose();
}
}
window.removeEventListener('keydown',this.fullScreen)
window.removeEventListener("keydown", this.fullScreen);
},
methods: {
fullScreen(e){
fullScreen(e) {
var e = event || window.event || arguments.callee.caller.arguments[0];
if(e && e.keyCode == 122){//F11
console.log(e.keyCode)
this.isFullScreen = !this.isFullScreen
if(this.isFullScreen){
if (e && e.keyCode == 122) {
//F11
console.log(e.keyCode);
this.isFullScreen = !this.isFullScreen;
if (this.isFullScreen) {
resizeFn(1);
}else{
} else {
// hidePluginWindow()
// showPluginWindow()
}
// setOffset(2180,360)
}
},
//
changeWinNum(num){
this.winNum=num;
this.activeWinIndex=1;
console.log('this.activeWinIndex',this.activeWinIndex)
if(this.pluginType=='ysy'){
this.$refs.ysy1.init2('')
changeWinNum(num) {
this.winNum = num;
this.activeWinIndex = 1;
console.log("this.activeWinIndex", this.activeWinIndex);
if (this.pluginType == "ysy") {
this.$refs.ysy1.init2("");
// this.$refs['ysy'+this.activeWinIndex].init()
}
},
//
getPlayType(){
console.log(this.devList, 123)
if(this.devList.length==0){
return
getPlayType() {
console.log(this.devList, 123);
if (this.devList.length == 0) {
return;
}
//videoType 123ISC456
//videoType 123ISC4567
switch (Number(this.devList[0].videoType)) {
case 1:
this.ysyParams = this.devList[0];
//playType 1RTMP,2RTMP,3HLS,4HLS,56
var videoType = this.devList[0].videoType
var playType = this.devList[0].playType
var videoType = this.devList[0].videoType;
var playType = this.devList[0].playType;
switch (Number(videoType)) {
case 1:
if(playType==1||playType==2){
this.bottomMod=true
this.pluginType='ckPlayer'
if (playType == 1 || playType == 2) {
this.bottomMod = true;
this.pluginType = "ckPlayer";
// console.log(this.devList[0].url)
this.urls[this.activeWinIndex]=this.devList[0].url
this.urls[this.activeWinIndex] = this.devList[0].url;
// console.log(this.urls)
// this.bottomMod=true
}
if(playType==3||playType==4){
this.bottomMod=true
this.pluginType='videojs'
if (playType == 3 || playType == 4) {
this.bottomMod = true;
this.pluginType = "videojs";
this.$nextTick(() => {
this.initVideo();
this.playVideoWithVideojs(this.devList[0].url)
this.playVideoWithVideojs(this.devList[0].url);
});
}
if(playType==5||playType==6){
this.bottomMod=false
this.pluginType='ysy'
if (playType == 5 || playType == 6) {
this.bottomMod = false;
this.pluginType = "ysy";
}
break;
case 2:
this.pluginType='videojs'
this.pluginType = "videojs";
break;
case 3:
this.pluginType='videojs'
this.pluginType = "videojs";
break;
case 4:
this.pluginType='videojs'
this.pluginType = "videojs";
break;
case 5:
this.pluginType='videojs'
this.pluginType = "videojs";
break;
case 6:
this.pluginType='videojs'
this.pluginType = "videojs";
break;
case 7:
this.pluginType = "xiongmai";
break;
}
break;
@ -387,30 +473,60 @@ export default {
// }
this.$nextTick(() => {
this.initVideo();
this.devList[0].winNum=1
this.playVideoWithVideojs(this.devList[0].url)
this.devList[0].winNum = 1;
this.playVideoWithVideojs(this.devList[0].url);
});
this.pluginType='videojs'
this.pluginType = "videojs";
break;
case 3:
this.bottomMod=false
// if(this.$props.type=='company'){
// this.bottomMod=false
// }else{
// this.bottomMod=true
// }
this.pluginType='isc'
this.bottomMod = false;
// if(this.$props.type=='company'){
// this.bottomMod=false
// }else{
// this.bottomMod=true
// }
this.pluginType = "isc";
break;
case 7:
this.bottomMod = false;
this.pluginType = "xiongmai";
}
console.log(this.pluginType)
console.log("当前点击的类型", this.pluginType);
setTimeout(() => {
if (
document.getElementById("wrapper") != null &&
this.screens == null
) {
this.screens = Live.init(document.getElementById("wrapper"));
}
let infor = JSON.parse(localStorage.getItem('configInfo'))
// console.log('------------------------------',infor)
Live.login(infor.appId, infor.appSecret, infor.account, infor.password)
//
this.screens.setOptions(
/* 这里传入配置对象 */ {
deviceId: "1202291000447",
channelNum: 1,
streamType: 0,
mediaType: "FLV",
recordTimeStart: "2022-07-16 04:00:00",
recordTimeEnd: "2022-07-16 06:00:00",
source: "device",
isDownload: 0,
tokenType: "Dynamic",
expireTime: "0",
https: false,
}
);
}, 100);
},
selectWin(data){
this.activeWinIndex=data
selectWin(data) {
this.activeWinIndex = data;
},
//
initVideo() {
console.log(this.devList);
//
//
for (let index = 1; index <= 9; index++) {
if (this["videoObject" + index] == "") {
this["videoObject" + index] = videojs(
@ -422,7 +538,7 @@ export default {
muted: this.showAutoplay ? true : false,
},
function onPlayerReady() {
this.on("error", function () {
this.on("error", function() {
//
var mediaError = this.error();
console.log("mediaError", mediaError);
@ -430,8 +546,8 @@ export default {
}
);
if(!this.bottomMod){
this["videoObject"+ 1].src([
if (!this.bottomMod) {
this["videoObject" + 1].src([
{
type: "application/x-mpegURL",
src: this.devList[0].url,
@ -475,12 +591,12 @@ export default {
"none";
document.getElementsByClassName("noVideoBox1")[item - 1].style.display =
"block";
this.$emit('closeVideoDialog',false)
this.$emit("closeVideoDialog", false);
},
handleSelect(item) {
console.log(item);
this.urls[this.activeWinIndex]=item.url
this.urls[this.activeWinIndex] = item.url;
this.devList.forEach((element) => {
if (element.value == item.value) {
element.winNum = this.activeWinIndex;
@ -494,18 +610,18 @@ export default {
});
console.log(this.devList);
this.selectDev = "";
if (this.pluginType == "ysy"){
this.getVideo(item)
if (this.pluginType == "ysy") {
this.getVideo(item);
}
if (this.pluginType != "videojs") {
return;
}
// var obj = this["videoObject" + this.activeWinIndex];
// console.log(obj)
this.playVideoWithVideojs(item.url)
this.playVideoWithVideojs(item.url);
},
//使videojs
playVideoWithVideojs(url){
playVideoWithVideojs(url) {
var el = document.getElementById("myPlayer" + this.activeWinIndex);
if (!el) {
var pEl = document.getElementsByClassName("videoInner")[
@ -532,7 +648,7 @@ export default {
},
]);
this["videoObject" + this.activeWinIndex].play();
document.getElementsByClassName("noVideoBox1")[
this.activeWinIndex - 1
].style.display = "none";
@ -569,44 +685,44 @@ export default {
// document.getElementById("mp_y").innerHTML = (event.clientY - top + document.documentElement.scrollTop) - 2 +
// "px";
},
//url
getVideo(item){
//url
getVideo(item) {
//videoType 123ISC456
//playType 1RTMP,2RTMP,3HLS,4HLS,56
getVideoItemInfoApi({
itemId: item.itemId
itemId: item.itemId,
}).then((res) => {
var result = res.result
var url = ''
if(item.videoType==1){
var result = res.result;
var url = "";
if (item.videoType == 1) {
switch (Number(result.projectVideoConfig.playType)) {
case 1:
url=result.videoInfo.rtmpHd
url = result.videoInfo.rtmpHd;
break;
case 2:
url=result.videoInfo.rtmp
url = result.videoInfo.rtmp;
break;
case 3:
url=result.videoInfo.hdFlvAddress
url = result.videoInfo.hdFlvAddress;
break;
case 4:
url=result.videoInfo.flvAddress
url = result.videoInfo.flvAddress;
break;
case 5:
url=`ezopen://open.ys7.com/${result.videoInfo.deviceSerial}/${result.videoInfo.channelNo}.hd.live`
url = `ezopen://open.ys7.com/${result.videoInfo.deviceSerial}/${result.videoInfo.channelNo}.hd.live`;
break;
case 6:
url=`ezopen://open.ys7.com/${result.videoInfo.deviceSerial}/${result.videoInfo.channelNo}.live`
url = `ezopen://open.ys7.com/${result.videoInfo.deviceSerial}/${result.videoInfo.channelNo}.live`;
break;
default:
url=`ezopen://open.ys7.com/${result.videoInfo.deviceSerial}/${result.videoInfo.channelNo}.live`
url = `ezopen://open.ys7.com/${result.videoInfo.deviceSerial}/${result.videoInfo.channelNo}.live`;
break;
}
this.ysyParams.url = url;
this.ysyParams.accessToken = result.accessToken
this.ysyParams.accessToken = result.accessToken;
// this.$emit('playParams',{accessToken:result.accessToken,url:url,videoType:videoType,playType:result.projectVideoConfig.playType})
}
// if(videoType==2){
// // url=`imou://open.lechange.com/${item.serialNumber}/${item.channelId}/1?streamId=1`
// // this.$emit('playParams',{accessToken:result.accessToken,url:url,videoType:item.videoType})
@ -620,12 +736,12 @@ export default {
</script>
<style lang="less" scoped>
@import "./videoModule.less";
.isDockingToWoer{
.isDockingToWoer {
position: relative;
left: 58px;
top: 83px;
}
.isLongguangIframe{
.isLongguangIframe {
position: relative;
left: 2180px;
top: 276px;
@ -634,4 +750,8 @@ export default {
// left: 2160px;
// top: 226px;
// }
</style>
#wrapper {
padding-top: 20px;
box-sizing: border-box;
}
</style>

61
src/utils/README.md Normal file
View File

@ -0,0 +1,61 @@
# lives
> A Vue.js project
## 使用
1. 安装依赖
```
// 安装
npm install --save flv.js
npm install --save js-md5
npm install --save js-base64
npm install --save axios
// 依赖包
"dependencies": {
"axios": "^0.27.2",
"flv.js": "^1.6.2",
"js-base64": "^3.7.2",
"js-md5": "^0.7.3",
}
```
2. 引入插件
```
// Test.vue
import Live from '@/utils'
```
3. 调用 api
```
<template>
<!-- 为需要注入分屏插件的容器元素设置 id并设定宽高 -->
<div id="wrapper" style="width: 1200px;height: 800px"> </div>
</template>
// 调用 init 方法,传入绑定的 dom 元素注入分屏插件
mounted () {
// 1. 登录
Live.login('http://122.112.239.62', '9000', 'jxj', 'admin123')
// 2. 绑定插件
this.screens = Live.init(document.getElementById('wrapper'))
// 3. 配置参数加载视频
this.screens.setOptions(/* 这里传入配置对象 */ {
deviceId: '1202291000447',
channelNum: 1,
streamType: 0,
mediaType: 'FLV',
recordTimeStart: '2022-07-16 04:00:00',
recordTimeEnd: '2022-07-16 06:00:00',
source: 'device',
isDownload: 0,
tokenType: 'Dynamic',
expireTime: '0',
https: false
})
},
```

25
src/utils/api.js Normal file
View File

@ -0,0 +1,25 @@
import http from './request'
export const apiLogin = (baseURL, Authorization, data = {}) => {
return http({
baseURL,
url: '/login',
method: 'post',
data,
headers: {
Authorization
}
})
}
export const apiQueryPlaybackUri = (baseURL, token, data) => {
return http({
baseURL,
url: '/queryPlaybackUri',
method: 'post',
data,
headers: {
token
}
})
}

39
src/utils/index.css Normal file
View File

@ -0,0 +1,39 @@
.live-screens-screen-wrap {
position: relative;
background-color: #000;
}
.live-screens-screen-item {
box-sizing: border-box;
border: 1px solid #fff;
}
.live-screens-screen-close {
position: absolute;
width: 60px;
height: 30px;
line-height: 30px;
text-align: center;
color: red;
cursor: pointer;
}
.live-setting-btn-wrap {
margin-top:8px;
display: flex;
justify-content: flex-end;
}
.live-setting-btn-item {
margin-right: 10px;
width: 60px;
height: 30px;
line-height: 30px;
text-align:center;
border: 1px solid #666;
cursor: pointer;
}
.actived {
border: 1px solid orangered !important;
}

204
src/utils/index.js Normal file
View File

@ -0,0 +1,204 @@
import flvjs from 'flv.js'
import md5 from 'js-md5'
import { encode } from 'js-base64'
import { apiLogin, apiQueryPlaybackUri } from './api'
import './index.css'
let baseURL = ''
let token = ''
let Authorization = ''
const screenTypes = [
{text: '一屏', value: 1},
{text: '二屏', value: 2},
{text: '四屏', value: 4},
{text: '六屏', value: 6}
]
const createVideoEl = (vm, index = 0, width = '100%', height = '100%') => {
const videoEl = document.createElement('video')
videoEl.setAttribute('muted', 'muted')
// videoEl.setAttribute('controls', 'controls')
videoEl.setAttribute('width', width)
videoEl.setAttribute('height', height)
videoEl.className = 'live-screens-screen-item'
videoEl.addEventListener('click', e => {
vm.currentScreen = e.target
vm.screenIndex = index
vm.screens.map(screen => screen.classList.remove('actived'))
e.target.classList.add('actived')
})
return videoEl
}
const createScreenWrap = (el) => {
const width = el.offsetWidth
const height = el.offsetHeight - 40
const screenWrap = document.createElement('div')
screenWrap.style.cssText = `width: ${width}px;height: ${height}px;`
screenWrap.className = 'live-screens-screen-wrap'
return screenWrap
}
const createScreens = (vm, screenWrapEl, screens, screenCount) => {
const w = screenWrapEl.offsetWidth
const h = screenWrapEl.offsetHeight
let width = ''
let height = ''
switch (screenCount) {
case 2:
width = w / 2 + 'px'
height = h + 'px'
break
case 4:
width = w / 2 + 'px'
height = h / 2 + 'px'
break
case 6:
width = w / 3 + 'px'
height = h / 2 + 'px'
break
default:
width = '100%'
height = '100%'
break
}
const list = new Array(screenCount).fill(0)
screens.map(child => screenWrapEl.removeChild(child))
screens.splice(0)
list.map((item, index) => {
const videoEl = createVideoEl(vm, index, width, height)
screenWrapEl.appendChild(videoEl)
screens.push(videoEl)
})
}
const createScreenBtns = (ins) => {
const screenBtnGroupEl = document.createElement('div')
screenBtnGroupEl.className = 'live-setting-btn-wrap'
screenTypes.map(type => {
const btnEl = document.createElement('div')
btnEl.className = 'live-setting-btn-item'
btnEl.innerText = type.text
btnEl.addEventListener('click', () => {
ins.setScreenCount(type.value)
})
screenBtnGroupEl.appendChild(btnEl)
})
return screenBtnGroupEl
}
const createCloseEl = (vm) => {
const w = vm.currentScreen.offsetWidth
// const h = vm.currentScreen.offsetHeight
const left = vm.currentScreen.offsetLeft
const top = vm.currentScreen.offsetTop
const el = document.createElement('div')
el.className = 'live-screens-screen-close'
el.innerText = '关闭'
el.style.top = top + 10 + 'px'
el.style.left = left + w - 60 + 'px'
el.setAttribute('data-index', vm.screenIndex)
el.addEventListener('click', e => {
const index = e.target.getAttribute('data-index')
const videoEl = vm.screens[index]
videoEl.removeAttribute('controls')
videoEl.removeAttribute('src')
vm.screenWrapEl.removeChild(e.target)
})
vm.screenWrapEl.appendChild(el)
vm.currentScreen = null
}
const Initial = class {
constructor (el) {
const screen1 = createVideoEl(this)
const screenWrapEl = createScreenWrap(el)
screenWrapEl.appendChild(screen1)
el.appendChild(screenWrapEl)
el.appendChild(createScreenBtns(this))
this.currentScreen = screen1
this.screenCount = 1
this.screenIndex = 0
this.wrapEl = el
this.screenWrapEl = screenWrapEl
this.screens = [screen1]
this.players = []
}
setOptions (options = {
deviceId: '1202291000447',
channelNum: 1,
streamType: 0,
mediaType: 'FLV',
recordTimeStart: '2022-07-16 04:00:00',
recordTimeEnd: '2022-07-16 06:00:00',
source: 'device',
isDownload: 0,
tokenType: 'Dynamic',
expireTime: '0',
https: false
}) {
if (!this.currentScreen || this.currentScreen.src) {
return false
}
(async () => {
const res = await apiQueryPlaybackUri(baseURL, token, options).catch(console.log)
if (res.status === 200) {
const url = res.data.uri
this.player = this.getVideoPlayer(url)
this.currentScreen.setAttribute('controls', 'controls')
createCloseEl(this)
}
})()
// return this
}
getVideoPlayer (url) {
if (flvjs.isSupported()) {
const videoEl = this.currentScreen
const flvPlayer = flvjs.createPlayer({
type: 'flv',
url: url.replace('http://:9050', 'http://122.112.239.62:9050')
})
flvPlayer.attachMediaElement(videoEl)
flvPlayer.load()
// flvPlayer.play()
return flvPlayer
}
}
setScreenCount (screenCount) {
this.screenCount = screenCount
const closeEls = document.getElementsByClassName('live-screens-screen-close')
;[].slice.call(closeEls).map(el => this.screenWrapEl.removeChild(el))
createScreens(this, this.screenWrapEl, this.screens, screenCount)
}
}
const init = (el) => {
const screen = new Initial(el)
return {
setOptions: screen.setOptions.bind(screen)
}
}
const encryption = (host, port, username, pwd) => {
baseURL = `${host}:${port}`
const md5Pwd = md5(pwd)
Authorization = 'Basic ' + encode(username + ':' + md5Pwd)
}
const login = async (host, port, username, pwd) => {
encryption(host, port, username, pwd)
const res = await apiLogin(baseURL, Authorization).catch(console.log)
if (res.status === 200) {
token = res.headers.token
}
}
export default {
login,
init
}

8
src/utils/request.js Normal file
View File

@ -0,0 +1,8 @@
import axios from 'axios'
const http = axios.create({
baseURL: 'http://122.112.239.62:9000'
// baseURL:'/china'
})
export default http

View File

@ -169,14 +169,15 @@
methods: {
setVideoInfo(obj) {
this.videoInfo = {videoType: obj.videoType, projectSn: obj.projectSn};
// console.log('setVideoInfo', this.videoInfo);
// console.log('', this.videoInfo);
this.getSelectVideoItemListByTypeApi();
},
getSelectVideoItemListByTypeApi(id) {
//
console.log('参数', this.videoInfo);
this.videoInfo.groupId=id
selectVideoItemListByTypeApi(this.videoInfo).then(result => {
if (result.success) {
console.log('下面的列表渲染',result)
this.cameraList = result.result;
// console.log('videoInfo', this.videoInfo, '', this.cameraList);
}

View File

@ -101,7 +101,7 @@
size="medium"
>{{$t('message.videoManage.configPlayMode')}}
</el-button>
<el-button
<el-button v-if="videoType!=7"
type="primary"
@click="uploadThirdParty"
size="medium"
@ -112,7 +112,7 @@
</div>
<vue-scroll style="height:calc(100% - 34px)">
<camera-list v-if="videoType===1" @editDevice="edit" ref="camera"></camera-list>
<camera-list-lc v-if="videoType===2||videoType===3" @editDevice="edit" ref="cameralc"></camera-list-lc>
<camera-list-lc v-if="videoType===2||videoType===3 || videoType===7 " @editDevice="edit" ref="cameralc"></camera-list-lc>
</vue-scroll>
</div>
@ -173,7 +173,7 @@
v-model="currentVideoTypeDetail.serialNumber"
:placeholder="$t('message.videoManage.dialog_newVideo.serialNumber_placeholder')"></el-input>
</el-form-item>
<el-form-item v-if="videoType=='3'" :label="$t('message.videoManage.dialog_newVideo.cameraCode')">
<el-form-item v-if="videoType=='3' || videoType=='7' " :label="$t('message.videoManage.dialog_newVideo.cameraCode')">
<el-input :disabled="operation==='edit'"
v-model="currentVideoTypeDetail.serialNumber"
:placeholder="$t('message.videoManage.placeholder')"></el-input>
@ -276,19 +276,27 @@
width="667px">
<div class="dialog_content">
<el-form label-width="100px" class="dialogFormBox" size="medium">
<el-form-item :label="videoType=='3'?'ip':$t('message.videoManage.dialog_account_config.account')">
<el-form-item :label="videoType=='3'?'ip' :$t('message.videoManage.dialog_account_config.account')">
<el-input v-model="currentVideoTypeDetail.account"
:placeholder="$t('message.videoManage.placeholder')"></el-input>
</el-form-item>
<el-form-item :label="videoType=='3'?'port':$t('message.videoManage.dialog_account_config.password')">
<el-form-item :label="videoType=='3'?'port' :$t('message.videoManage.dialog_account_config.password')">
<el-input v-model="currentVideoTypeDetail.password"
:placeholder="$t('message.videoManage.placeholder')"></el-input>
</el-form-item>
<el-form-item :label="videoType=='3'?'APP Key':$t('message.videoManage.dialog_account_config.appId')">
<el-form-item v-if="videoType!='7'" :label="videoType=='3'?'APP Key' :$t('message.videoManage.dialog_account_config.appId')">
<el-input v-model="currentVideoTypeDetail.appId"
:placeholder="$t('message.videoManage.placeholder')"></el-input>
</el-form-item>
<el-form-item :label="$t('message.videoManage.dialog_account_config.appSecret')">
<el-form-item v-if="videoType!='7'":label="$t('message.videoManage.dialog_account_config.appSecret')">
<el-input v-model="currentVideoTypeDetail.appSecret"
:placeholder="$t('message.videoManage.placeholder')"></el-input>
</el-form-item>
<el-form-item v-if="videoType=='7'" label="ip">
<el-input v-model="currentVideoTypeDetail.appId"
:placeholder="$t('message.videoManage.placeholder')"></el-input>
</el-form-item>
<el-form-item v-if="videoType=='7'" label="端口号">
<el-input v-model="currentVideoTypeDetail.appSecret"
:placeholder="$t('message.videoManage.placeholder')"></el-input>
</el-form-item>
@ -583,6 +591,7 @@
//
getVideoGroup(){
getVideoGroupApi({ projectSn: this.$store.state.projectSn }).then(res=>{
console.log('获取视频分组列表',res)
this.groupList=res.result
})
},
@ -652,7 +661,7 @@
if (this.videoType === 1) {//
this.$refs.camera.getSelectVideoItemListByTypeApi(id);
}
if (this.videoType === 2||this.videoType === 3) {//isc
if (this.videoType === 2||this.videoType === 3 || this.videoType === 7) {//isc
this.$refs.cameralc.getSelectVideoItemListByTypeApi(id);
}
})
@ -673,7 +682,8 @@
} else {
// this.currentVideoTypeDetail = res.result[0];
this.currentVideoTypeDetail = res.result;
console.log('配置信息', res.result);
console.log('配置信息', this.currentVideoTypeDetail);
localStorage.setItem('configInfo',JSON.stringify(this.currentVideoTypeDetail))
this.configInfoParams = res.result;
// this.videoType = res.result[0].videoType;
this.videoType = res.result.videoType;
@ -682,7 +692,7 @@
if (this.videoType === 1) {//
this.$refs.camera.setVideoInfo(res.result);
}
if (this.videoType === 2||this.videoType === 3) {//isc
if (this.videoType === 2||this.videoType === 3 || this.videoType === 7) {//isc xiongmai
this.$refs.cameralc.setVideoInfo(res.result);
}
})
@ -750,7 +760,7 @@
// this.currentVideoTypeDetail.appId = '66b4fc1d6703468c8ee93b2919a3f20b';
// this.currentVideoTypeDetail.appSecret = '0a5836c68a7edabcc78e6a18f05bb317';
editProjectVideoConfigApi(this.currentVideoTypeDetail).then(res => {
// console.log('res', res)
console.log('新添加服务配置', res)
this.Popup.playPattern=false
this.Popup.accountConfig=false
})

View File

@ -37,7 +37,7 @@
</vue-scroll>
</div>
</div>
<videoModule class="playVideoBox"
<videoModule class="playVideoBox"
:type="'project'"
:value="selectList"
:displayBottomMod="false"
@ -46,6 +46,7 @@
:showCaptrue="false"
:showControl="false"
:showPlayback="false"
:xxx="7"
></videoModule>
</div>
</div>
@ -61,7 +62,9 @@ export default {
devList: [],
selectList:[],
dataType:1,
activeNames: [0]
activeNames: [0],
screens:{},
pluginType:'',
};
},
mounted() {
@ -71,13 +74,14 @@ export default {
this.loadData()
}else{
this.loadData2()
}
}
},
methods: {
changeVideo(item){
console.log(item, 'xxxxxxxxxx');
this.selectList=[item]
console.log('右边的值',this.selectList)
},
loadData() {
selectProjectVideoListApi({
@ -85,6 +89,7 @@ export default {
}).then((res) => {
var DATA = res.result.videoList;
this.devList=DATA
console.log('视频的列表',res.result)
this.dataType=res.result.type
});
},

View File

@ -14,6 +14,17 @@ function addStyleResource (rule) {
}
module.exports = {
publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
// devServer:{
// proxy:{
// '/china' : {
// target: "http://122.112.239.62",
// changeOrigin:true,
// pathRewrite:{
// '^/china':"" //重写路径
// }
// }
// }
// },
pages:{
index: {
entry: "./src/pages/index/index.js",

View File

@ -4246,6 +4246,11 @@
"es6-symbol" "~3.1.1"
"event-emitter" "~0.3.5"
"es6-promise@^4.2.8":
"integrity" "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w=="
"resolved" "https://registry.npmmirror.com/es6-promise/-/es6-promise-4.2.8.tgz"
"version" "4.2.8"
"es6-set@~0.1.5":
"integrity" "sha512-7S8YXIcUfPMOr3rqJBVMePAbRsD1nWeSMQ86K/lDI76S3WKXz+KWILvTIPbTroubOkZTGh+b+7/xIIphZXNYbA=="
"resolved" "https://registry.npmmirror.com/es6-set/-/es6-set-0.1.5.tgz"
@ -4717,6 +4722,14 @@
"inherits" "^2.0.3"
"readable-stream" "^2.3.6"
"flv.js@^1.6.2":
"integrity" "sha512-xre4gUbX1MPtgQRKj2pxJENp/RnaHaxYvy3YToVVCrSmAWUu85b9mug6pTXF6zakUjNP2lFWZ1rkSX7gxhB/2A=="
"resolved" "https://registry.npmmirror.com/flv.js/-/flv.js-1.6.2.tgz"
"version" "1.6.2"
dependencies:
"es6-promise" "^4.2.8"
"webworkify-webpack" "^2.1.5"
"follow-redirects@^1.0.0":
"version" "1.12.1"
@ -5932,11 +5945,26 @@
"merge-stream" "^2.0.0"
"supports-color" "^7.0.0"
"js-base64@^2.1.9", "js-base64@^2.4.3":
"js-base64@^2.1.9":
"integrity" "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
"resolved" "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz"
"version" "2.6.4"
"js-base64@^2.4.3":
"integrity" "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
"resolved" "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz"
"version" "2.6.4"
"js-base64@^3.7.2":
"integrity" "sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ=="
"resolved" "https://registry.npmmirror.com/js-base64/-/js-base64-3.7.2.tgz"
"version" "3.7.2"
"js-md5@^0.7.3":
"integrity" "sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ=="
"resolved" "https://registry.npmmirror.com/js-md5/-/js-md5-0.7.3.tgz"
"version" "0.7.3"
"js-message@1.0.5":
"version" "1.0.5"
@ -10862,6 +10890,11 @@
"resolved" "https://registry.npmmirror.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz"
"version" "0.1.4"
"webworkify-webpack@^2.1.5":
"integrity" "sha512-2akF8FIyUvbiBBdD+RoHpoTbHMQF2HwjcxfDvgztAX5YwbZNyrtfUMgvfgFVsgDhDPVTlkbb5vyasqDHfIDPQw=="
"resolved" "https://registry.npmmirror.com/webworkify-webpack/-/webworkify-webpack-2.1.5.tgz"
"version" "2.1.5"
"when@~3.6.x":
"integrity" "sha512-d1VUP9F96w664lKINMGeElWdhhb5sC+thXM+ydZGU3ZnaE09Wv6FaS+mpM9570kcDs/xMfcXJBTLsMdHEFYY9Q=="
"resolved" "https://registry.npmmirror.com/when/-/when-3.6.4.tgz"