TVWalls.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856
  1. <template>
  2. <div>
  3. <el-dialog :title="title" :visible.sync="TVWallVisible" v-if="TVWallVisible" customClass="TVWallCustomWidth"
  4. @close="cancelEventLocationShow()">
  5. <!--<div @click="findCameraByEventCoordinate()">视频联动</div>-->
  6. <!--<div class="forthis" style="width: 22%; position: absolute;left: 0;z-index: 9999999999999;">-->
  7. <!--<div class="i-list-con" style="height: 46vh; overflow-y: scroll;">-->
  8. <!--<span v-for="(item,index) in cameraList" :key="index">-->
  9. <!--<div class="d-l-con" @click="playhk(item.channelCode)">-->
  10. <!--<div class="d-l-l-text">-->
  11. <!--<i class="i-small"></i>-->
  12. <!--<h4>{{ item.cameraName }}</h4>-->
  13. <!--</div>-->
  14. <!--</div>-->
  15. <!--</span>-->
  16. <!--</div>-->
  17. <!--</div>-->
  18. <!--<div style="width:70%;height:400px;position:absolute;">-->
  19. <!--&lt;!&ndash;视频窗口展示-&#45;&#45;大华&ndash;&gt;-->
  20. <!--<div id="dom1" class="dom1"></div>-->
  21. <!--&lt;!&ndash;视频窗口展示-&#45;&#45;海康&ndash;&gt;-->
  22. <!--<div id="playWnd" class="playWnd" style="left: 0px; top: 0px;"></div>-->
  23. <!--</div>-->
  24. <div style="display: flex;">
  25. <div id="dom1" class="dom1"></div>
  26. <div class="leader-info-container" v-if="userDataShow">
  27. <div class="leader-info-list-con" v-for="user in userData">
  28. <h4 style="">{{user.position}}:{{user.name}}</h4>
  29. <h4>电话:{{user.phone}}</h4>
  30. </div>
  31. </div>
  32. </div>
  33. </el-dialog>
  34. </div>
  35. </template>
  36. <script>
  37. /** ----------------------------------摄像头预览开始------------------------------------- */
  38. import {
  39. getDahuaVideoServer,
  40. getTVWallList
  41. } from '@/api/dahua/dahua'
  42. import {
  43. tvCameraList
  44. } from '@/api/haikang/haikang'
  45. import {
  46. findCameraByEventCoordinate,
  47. rotation
  48. } from '@/api/monitor'
  49. import DHWs from '@/dahua/lib/DHWs'
  50. import Cookies from "js-cookie"
  51. /** ----------------------------------摄像头预览结束------------------------------------- */
  52. export default {
  53. dicts: ['event_source'],
  54. components: {},
  55. data() {
  56. return {
  57. title: ['365', '369', '371', '373', '372', '370'].includes(Cookies.get("deptId")) ? "电视墙" :
  58. "电视墙\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000您的所有操作痕迹已被后台记录,请谨慎操作。",
  59. tvListJson: [{
  60. 'switchTab': '1',
  61. 'treeLabels': [{
  62. 'labelCode': '123456',
  63. 'labelName': '视频场景',
  64. 'parentLabelCode': null
  65. },
  66. {
  67. 'labelCode': '5a81d1bd499b4940a21fc63ca51f4dfa',
  68. 'labelName': '标签2',
  69. 'parentLabelCode': 123456
  70. },
  71. {
  72. 'labelCode': 'd941adbbd3e64dac92cc448dec5293cd',
  73. 'labelName': '标签1',
  74. 'parentLabelCode': 123456
  75. }
  76. ],
  77. 'labelChannels': [{
  78. 'channelDates': [{
  79. 'channelCode': '6044981090191552',
  80. 'channelName': '复兴大桥中段-交通事故',
  81. 'channelSn': null,
  82. 'cameraType': 0,
  83. 'online': 1
  84. },
  85. {
  86. 'channelCode': 'ZgVzqsjwA1DTF561VGHK5E',
  87. 'channelName': '北京7青羊东二路77号2通道1',
  88. 'channelSn': null,
  89. 'cameraType': 1,
  90. 'online': 1
  91. }
  92. ],
  93. 'labelCode': 'd941adbbd3e64dac92cc448dec5293cd'
  94. },
  95. {
  96. 'channelDates': [{
  97. 'channelCode': 'ZgVzqsjwA1DTF561VGHKK7',
  98. 'channelName': '北京7青羊东二路77号2通道2',
  99. 'channelSn': null,
  100. 'cameraType': 2,
  101. 'online': 0
  102. }],
  103. 'labelCode': '5a81d1bd499b4940a21fc63ca51f4dfa'
  104. }
  105. ]
  106. },
  107. {
  108. 'switchTab': '2',
  109. 'labelChannels': [{
  110. 'channelDates': [{
  111. 'channelCode': 'ZgVzqsjwA1DTF561VGHK5E',
  112. 'channelName': '北京7青羊东二路77号2通道1',
  113. 'channelSn': null,
  114. 'cameraType': 1,
  115. 'online': 1
  116. },
  117. {
  118. 'channelCode': 'ZgVzqsjwA1DTF561VGHKK7',
  119. 'channelName': '北京7青羊东二路77号2通道2',
  120. 'channelSn': null,
  121. 'cameraType': 2,
  122. 'online': 0
  123. }
  124. ]
  125. }]
  126. }
  127. ],
  128. TVWallVisible: false,
  129. activeName: 'tv',
  130. channelId: ['ZgVzqsjwA1DTF561VHG69F'],
  131. /** ----------------------------------摄像头预览开始------------------------------------- */
  132. showModal: true,
  133. activePanel: 'key1',
  134. isLogin: false,
  135. loginType: '1',
  136. token: '',
  137. ctrlType: 'playerWin',
  138. https: 1,
  139. httpsList: [{
  140. value: 0,
  141. label: 0
  142. },
  143. {
  144. value: 1,
  145. label: 1
  146. }
  147. ],
  148. ctrlTypeList: [{
  149. value: 'playerWin',
  150. label: '播放控件'
  151. }, {
  152. value: 'realMonitorUI',
  153. label: '带设备树实时预览控件'
  154. }, {
  155. value: 'playbackUI',
  156. label: '带设备树视频回放控件'
  157. }, {
  158. value: 'TVWallUI',
  159. label: '视频上墙'
  160. }],
  161. ctrlList: [{
  162. value: 'ctrl1',
  163. label: '控件1'
  164. },
  165. {
  166. value: 'ctrl2',
  167. label: '控件2'
  168. },
  169. {
  170. value: 'ctrl3',
  171. label: '控件3'
  172. }
  173. ],
  174. splitList: [{
  175. value: 1,
  176. label: '1 * 1'
  177. },
  178. {
  179. value: 4,
  180. label: '2 * 2'
  181. },
  182. {
  183. value: 9,
  184. label: '3 * 3'
  185. }
  186. ],
  187. displayModeList: [{
  188. value: 1,
  189. label: '播放器预览模式'
  190. },
  191. {
  192. value: 2,
  193. label: '播放器回放模式'
  194. }
  195. ],
  196. mixedVideoDisplayModeList: [{
  197. value: 1,
  198. label: '播放实时视频'
  199. },
  200. {
  201. value: 2,
  202. label: '播放回放视频'
  203. }
  204. ],
  205. ctrl: 'ctrl1',
  206. splitNum: 1,
  207. displayMode: 1,
  208. displayTimeRange: [],
  209. modalDisplayTimeRange: [],
  210. mixedVideoTime: null,
  211. recordPath: 'C:\\DSS LightWeight\\DSS LightWeight Client\\Record\\',
  212. downloadName: '',
  213. downTimeRange: [],
  214. downloadFormat: 0,
  215. downloadFormatList: [{
  216. value: 0,
  217. label: 'dav'
  218. },
  219. {
  220. value: 1,
  221. label: 'avi'
  222. }, {
  223. value: 2,
  224. label: 'mp4'
  225. }
  226. ],
  227. downloadSource: 3,
  228. downloadSourceList: [{
  229. value: 3,
  230. label: '中心录像'
  231. }, {
  232. value: 2,
  233. label: '设备录像'
  234. }],
  235. showDownloadStreamType: false,
  236. downloadStreamType: 1,
  237. downloadStreamTypeList: [{
  238. value: 1,
  239. label: '主码流'
  240. },
  241. {
  242. value: 2,
  243. label: '辅码流'
  244. },
  245. {
  246. value: 3,
  247. label: '三码流'
  248. }
  249. ],
  250. downloadIsShow: true,
  251. downloadIsShowList: [{
  252. value: true,
  253. label: '是'
  254. },
  255. {
  256. value: false,
  257. label: '否'
  258. }
  259. ],
  260. crtPosX: 0,
  261. crtPosY: 0,
  262. crtWidth: 1148,
  263. crtHeight: 650,
  264. domId: 'dom1',
  265. mixedVideoDisplayMode: 2,
  266. isShowTipe: true,
  267. autoList: [],
  268. stringList: [],
  269. data: null,
  270. /** ----------------------------------摄像头预览结束------------------------------------- */
  271. cameraList: [],
  272. initCount: 0,
  273. pubKey: '',
  274. oWebControl: null,
  275. userData: [],
  276. userDataShow: false,
  277. }
  278. },
  279. created() {
  280. const DHWsInstance = DHWs.getInstance()
  281. this.ws = DHWsInstance
  282. },
  283. methods: {
  284. cancelEventLocationShow() {
  285. // this.activeName = 'tv'
  286. this.userData = []
  287. this.TVWallVisible = false
  288. this.destroy()
  289. if (this.oWebControl != null) {
  290. this.oWebControl.JS_HideWnd() // 先让窗口隐藏,规避可能的插件窗口滞后于浏览器消失问题
  291. this.oWebControl.JS_Disconnect().then(function() { // 断开与插件服务连接成功
  292. },
  293. function() { // 断开与插件服务连接失败
  294. })
  295. }
  296. },
  297. showTVWall(data, val, item) {
  298. selectConfigKey("DssVersion").then(res => {
  299. if (this.ws.getLocalDssVersion() != res.data) {
  300. this.$modal.confirm('系统检测到新客户端版本,请更新后使用', '系统提示', {
  301. confirmButtonText: '确定',
  302. cancelButtonText: '取消',
  303. type: 'warning'
  304. }).then(() => {
  305. window.open("https://pan.baidu.com/s/1MlWyhFw6pEYiaLvzsje-BA?pwd=3jps");
  306. }).catch(() => {
  307. return
  308. });
  309. return
  310. } else {
  311. if (item != null) {
  312. this.userData = item;
  313. this.userDataShow = true;
  314. }
  315. this.tvListJson = data
  316. this.data = val
  317. this.autoList = []
  318. this.stringList = []
  319. let length = data[0].treeLabels.length > 4 ? 5 : data[0].treeLabels.length
  320. for (let i = 1; i < length; i++) {
  321. this.autoList.push({
  322. "channelId": data[0].treeLabels[i].labelCode
  323. })
  324. this.stringList.push(data[0].treeLabels[i].labelCode)
  325. }
  326. console.log("this.autoList", this.autoList);
  327. console.log("this.stringList", this.stringList);
  328. // let that=this;
  329. /** ----------------------------------大华摄像头预览开始------------------------------------- */
  330. this.ws.addEventListener('connectStateChange', data => {
  331. if (data) {
  332. console.log('连接成功')
  333. } else {
  334. console.log('连接失败,下载客户端')
  335. this.alertReinstall()
  336. }
  337. })
  338. this.preview()
  339. /** ----------------------------------大华摄像头预览结束------------------------------------- */
  340. /** ----------------------------------海康摄像头预览开始------------------------------------- */
  341. // tvCameraList().then(response => {
  342. // this.cameraList=response.data
  343. // })
  344. // that.initPlugin()
  345. // setTimeout(function() {
  346. // that.playhk();
  347. // }, 5000)
  348. // /** ----------------------------------海康摄像头预览结束------------------------------------- */
  349. this.TVWallVisible = true
  350. }
  351. })
  352. },
  353. /** ----------------------------------大华摄像头预览开始------------------------------------- */
  354. alertLogin: function() {
  355. this.$modal.msg('登录中....')
  356. },
  357. alertLoginSuccess: function() {
  358. this.$modal.msgSuccess('登录成功!')
  359. },
  360. alertLoginFailed: function() {
  361. this.$modal.msgError('登陆失败!')
  362. },
  363. alertReinstall: function() {
  364. this.$modal.msgWarning('请重新安装客户端')
  365. },
  366. /** 预览按钮操作 */
  367. preview() {
  368. getDahuaVideoServer().then(newResponse => {
  369. this.ws.detectConnectQt().then(res => {
  370. if (res) { // 连接客户端成功
  371. this.alertLogin()
  372. this.ws.login({
  373. loginIp: newResponse.loginIp,
  374. loginPort: newResponse.loginPort,
  375. userName: newResponse.userName,
  376. userPwd: newResponse.userPwd,
  377. // loginIp: '192.168.100.100',
  378. // loginPort: 8314,
  379. // userName: 'system',
  380. // userPwd: 'Admin@123',
  381. token: '',
  382. https: 1
  383. })
  384. this.ws.on('loginState', (res) => {
  385. this.isLogin = res
  386. console.log('---res-----', res)
  387. if (res) {
  388. this.alertLoginSuccess()
  389. this.activePanel = 'key2'
  390. this.create(this.tvListJson)
  391. } else {
  392. this.alertLoginFailed()
  393. }
  394. })
  395. } else { // 连接客户端失败
  396. this.alertReinstall()
  397. }
  398. })
  399. })
  400. },
  401. playRealMonitorVideo() { // 自定义设备树自动播放指定通道编码视频
  402. const config = this.ws.config
  403. const {
  404. loginIp,
  405. userCode
  406. } = config
  407. this.ws.postMessage('playRealMonitorVideo', {
  408. loginIp,
  409. userCode,
  410. params: {
  411. ctrlCode: "ctrl1",
  412. array: this.autoList
  413. }
  414. })
  415. },
  416. realTimeVideoDialog(cameraParams) {
  417. // 调用弹窗实时播放接口
  418. if (!this.isLogin) {
  419. this.$Message.info("正在登陆客户端,请稍等......");
  420. return false;
  421. }
  422. this.ws.openVideo(cameraParams);
  423. },
  424. create(tvListJson) { // 调用创建控件接口
  425. let _this = this
  426. const params = [{
  427. 'ctrlType': 'realMonitorUI',
  428. 'ctrlCode': 'ctrl1',
  429. 'ctrlProperty': {
  430. 'displayMode': 1,
  431. 'splitNum': (this.autoList.length == 1 ? 1 : 4),
  432. 'channelList': [{
  433. 'channelId': ''
  434. }]
  435. },
  436. 'visible': true,
  437. 'domId': 'dom1'
  438. }]
  439. this.setPos()
  440. this.customizeTree(tvListJson);
  441. // if(_this.stringList.length == 1){
  442. // _this.realTimeVideoDialog([_this.stringList[0]]);
  443. // }else{
  444. _this.ws.createCtrl(params);
  445. _this.playRealMonitorVideo();
  446. // }
  447. if (_this.data != undefined && _this.data != null) {
  448. setTimeout(_this.rotation(_this.data.longitude, _this.data.latitude, _this.stringList), 5000)
  449. }
  450. },
  451. rotation(lng, lat, list) {
  452. rotation(lng, lat, list);
  453. },
  454. setPos() {
  455. let target = document.getElementById(this.domId)
  456. console.log(target, 'target')
  457. target.style.right = `${this.crtPosX}px`
  458. target.style.top = `${this.crtPosY}px`
  459. target.style.width = `${this.crtWidth}px`
  460. target.style.height = `${this.crtHeight}px`
  461. if (document.createEvent) {
  462. var event = document.createEvent('HTMLEvents')
  463. event.initEvent('resize', true, true)
  464. window.dispatchEvent(event)
  465. } else if (document.createEventObject) {
  466. window.fireEvent('onresize')
  467. }
  468. },
  469. destroy() { // 调用销毁控件接口
  470. if (!this.isLogin) {
  471. this.$modal.msgWarning('正在登陆客户端,请稍等......')
  472. return false
  473. }
  474. const ctrls = this.ws.ctrls.map(i => {
  475. if (i.ctrlCode === this.ctrl) {
  476. return i.ctrlCode
  477. }
  478. })
  479. this.ws.destroyCtrl(ctrls)
  480. },
  481. customizeTree(tvListJson) { // 调用控件接口树
  482. const config = this.ws.config
  483. const {
  484. loginIp,
  485. userCode
  486. } = config
  487. this.ws.postMessage('customizeTree', {
  488. loginIp,
  489. userCode,
  490. params: {
  491. array: tvListJson
  492. }
  493. })
  494. },
  495. /** ----------------------------------大华摄像头预览结束------------------------------------- */
  496. /** ----------------------------------海康摄像头预览开始------------------------------------- */
  497. // 创建播放实例
  498. initPlugin() {
  499. let that = this
  500. that.oWebControl = new WebControl({
  501. szPluginContainer: 'playWnd', // 指定容器id
  502. iServicePortStart: 15900, // 指定起止端口号,建议使用该值
  503. iServicePortEnd: 15909,
  504. szClassId: '23BF3B0A-2C56-4D97-9C03-0CB103AA8F11', // 用于IE10使用ActiveX的clsid
  505. cbConnectSuccess: function() { // 创建WebControl实例成功
  506. that.oWebControl.JS_StartService('window', { // WebControl实例创建成功后需要启动服务
  507. dllPath: './VideoPluginConnect.dll' // 值"./VideoPluginConnect.dll"写死
  508. }).then(function() { // 启动插件服务成功
  509. that.oWebControl.JS_SetWindowControlCallback({ // 设置消息回调
  510. cbIntegrationCallBack: cbIntegrationCallBack
  511. })
  512. that.oWebControl.JS_CreateWnd('playWnd', 850, 615).then(
  513. function() { //JS_CreateWnd创建视频播放窗口,宽高可设定
  514. that.init() // 创建播放实例成功后初始化
  515. })
  516. }, function() { // 启动插件服务失败
  517. })
  518. },
  519. cbConnectError: function() { // 创建WebControl实例失败
  520. that.oWebControl = null
  521. $('#playWnd').html('插件未启动,正在尝试启动,请稍候...<a href="./hk/VideoWebPlugin.exe">点击下载插件</a>')
  522. WebControl.JS_WakeUp('VideoWebPlugin://') // 程序未启动时执行error函数,采用wakeup来启动程序
  523. initCount++
  524. if (initCount < 3) {
  525. setTimeout(function() {
  526. that.initPlugin()
  527. }, 3000)
  528. } else {
  529. $('#playWnd').html('插件启动失败,请检查插件是否安装!<a href="./hk/VideoWebPlugin.exe">点击下载插件</a>')
  530. }
  531. },
  532. cbConnectClose: function(bNormalClose) {
  533. // 异常断开:bNormalClose = false
  534. // JS_Disconnect正常断开:bNormalClose = true
  535. console.log('cbConnectClose')
  536. that.oWebControl = null
  537. }
  538. })
  539. },
  540. //初始化
  541. init() {
  542. let that = this
  543. this.getPubKey(function() {
  544. ////////////////////////////////// 请自行修改以下变量值 ////////////////////////////////////
  545. var appkey = '24699060' //综合安防管理平台提供的appkey,必填
  546. var secret = that.setEncrypt('tt1pMbsrlwGZUWucdAPw') //综合安防管理平台提供的secret,必填
  547. var ip = '36.49.108.22' //综合安防管理平台IP地址,必填
  548. var playMode = 0 //初始播放模式:0-预览,1-回放
  549. var port = 1443 //综合安防管理平台端口,若启用HTTPS协议,默认443
  550. var snapDir = 'D:\\SnapDir' //抓图存储路径
  551. var videoDir = 'D:\\VideoDir' //紧急录像或录像剪辑存储路径
  552. var layout = '3x3' //playMode指定模式的布局
  553. var enableHTTPS = 1 //是否启用HTTPS协议与综合安防管理平台交互,这里总是填1
  554. var encryptedFields = 'secret' //加密字段,默认加密领域为secret
  555. var showToolbar = 1 //是否显示工具栏,0-不显示,非0-显示
  556. var showSmart = 1 //是否显示智能信息(如配置移动侦测后画面上的线框),0-不显示,非0-显示
  557. var buttonIDs = '0,16,256,257,258,259,260,512,513,514,515,516,517,768,769' //自定义工具条按钮
  558. ////////////////////////////////// 请自行修改以上变量值 ////////////////////////////////////
  559. that.oWebControl.JS_RequestInterface({
  560. funcName: 'init',
  561. argument: JSON.stringify({
  562. appkey: appkey, //API网关提供的appkey
  563. secret: secret, //API网关提供的secret
  564. ip: ip, //API网关IP地址
  565. playMode: playMode, //播放模式(决定显示预览还是回放界面)
  566. port: port, //端口
  567. snapDir: snapDir, //抓图存储路径
  568. videoDir: videoDir, //紧急录像或录像剪辑存储路径
  569. layout: layout, //布局
  570. enableHTTPS: enableHTTPS, //是否启用HTTPS协议
  571. encryptedFields: encryptedFields, //加密字段
  572. showToolbar: showToolbar, //是否显示工具栏
  573. showSmart: showSmart, //是否显示智能信息
  574. buttonIDs: buttonIDs //自定义工具条按钮
  575. })
  576. }).then(function(oData) {
  577. that.oWebControl.JS_Resize(850, 615) // 初始化后resize一次,规避firefox下首次显示窗口后插件窗口未与DIV窗口重合问题
  578. })
  579. })
  580. },
  581. //获取公钥
  582. getPubKey(callback) {
  583. let that = this
  584. that.oWebControl.JS_RequestInterface({
  585. funcName: 'getRSAPubKey',
  586. argument: JSON.stringify({
  587. keyLength: 1024
  588. })
  589. }).then(function(oData) {
  590. console.log(oData)
  591. if (oData.responseMsg.data) {
  592. that.pubKey = oData.responseMsg.data
  593. callback()
  594. }
  595. 125
  596. })
  597. },
  598. //RSA加密
  599. setEncrypt(value) {
  600. var encrypt = new JSEncrypt()
  601. encrypt.setPublicKey(this.pubKey)
  602. return encrypt.encrypt(value)
  603. },
  604. //播放海康摄像头
  605. playhk(channelCode) {
  606. var cameraIndexCode = channelCode //获取输入的监控点编号值,必填
  607. var streamMode = 0 //主子码流标识:0-主码流,1-子码流
  608. var transMode = 1 //传输协议:0-UDP,1-TCP
  609. var gpuMode = 0 //是否启用GPU硬解,0-不启用,1-启用
  610. var wndId = -1 //播放窗口序号(在2x2以上布局下可指定播放窗口)
  611. cameraIndexCode = cameraIndexCode.replace(/(^\s*)/g, '')
  612. cameraIndexCode = cameraIndexCode.replace(/(\s*$)/g, '')
  613. this.oWebControl.JS_RequestInterface({
  614. funcName: 'startPreview',
  615. argument: JSON.stringify({
  616. cameraIndexCode: cameraIndexCode, //监控点编号
  617. streamMode: streamMode, //主子码流标识
  618. transMode: transMode, //传输协议
  619. gpuMode: gpuMode, //是否开启GPU硬解
  620. wndId: wndId //可指定播放窗口
  621. })
  622. })
  623. }
  624. /** ----------------------------------海康摄像头预览结束------------------------------------- */
  625. }
  626. }
  627. // 推送消息
  628. function cbIntegrationCallBack(oData) {
  629. console.log(JSON.stringify(oData.responseMsg))
  630. }
  631. </script>
  632. <style rel="stylesheet/scss" lang="scss" scoped>
  633. @import '@/assets/styles/base.scss';
  634. .event-info-con {
  635. width: 100%;
  636. display: flex;
  637. .e-left {
  638. width: 32%;
  639. }
  640. .e-center {
  641. width: 30%;
  642. margin-left: 1%;
  643. .img-company {
  644. width: 100%;
  645. height: 18.3vh;
  646. img {}
  647. }
  648. }
  649. .e-right {
  650. margin-left: 1%;
  651. width: 45%;
  652. }
  653. .e-location-left {
  654. width: 28%;
  655. margin-top: 1rem;
  656. }
  657. .e-location-right {
  658. width: 71%;
  659. margin-top: 1.3rem;
  660. margin-left: 1rem;
  661. }
  662. }
  663. .el-dialog:not(.is-fullscreen) {
  664. margin-top: 5.5vh !important;
  665. }
  666. .bottom-menu-normal {
  667. max-width: 90%;
  668. padding: 0 3rem;
  669. position: absolute;
  670. left: 50%;
  671. transform: translateX(-50%);
  672. bottom: 0;
  673. z-index: 100000;
  674. border-radius: 5px;
  675. display: flex;
  676. justify-content: center;
  677. align-items: center;
  678. background: url(../assets/images/integrated/btm-menu.png) center no-repeat;
  679. background-size: cover;
  680. overflow: hidden;
  681. .btm-m-con {
  682. position: relative;
  683. color: $inBlue;
  684. font-size: .5rem;
  685. padding: 1rem 1.5rem;
  686. display: flex;
  687. align-items: center;
  688. justify-content: center;
  689. -webkit-transform: translateY(0);
  690. transform: translateY(0);
  691. transition: all 0.2s ease-in-out;
  692. cursor: pointer;
  693. white-space: nowrap;
  694. i {
  695. font-size: 1rem;
  696. color: $inBlue;
  697. text-shadow: 0 0 10px rgba($color: $inBlue, $alpha: .6);
  698. margin-right: 0.2rem;
  699. }
  700. }
  701. .btm-m-con:hover {
  702. text-shadow: 0 0 20px rgba($color: $inBlueHover, $alpha: 1.0);
  703. filter: brightness(2.3);
  704. -webkit-transform: translateX(0.2rem);
  705. transform: translateX(0.2rem);
  706. transition: all 0.2s ease-in-out;
  707. i {
  708. color: $inBlueHover;
  709. text-shadow: 0 0 20px rgba($color: $inBlueHover, $alpha: 1.0);
  710. }
  711. }
  712. .m-l-none {
  713. .el-input__inner {
  714. margin-left: 0 !important;
  715. }
  716. }
  717. }
  718. /*海康*/
  719. html,
  720. body {
  721. padding: 0;
  722. margin: 0;
  723. }
  724. .playWnd {
  725. margin: -13px 0 0 255px;
  726. width: 850px;
  727. /*播放容器的宽和高设定*/
  728. height: 615px;
  729. border: 1px solid red;
  730. }
  731. .operate {
  732. margin-top: 24px;
  733. }
  734. .operate::after {
  735. content: '';
  736. display: block;
  737. clear: both;
  738. }
  739. .module {
  740. float: left;
  741. width: 340px;
  742. /*min-height: 320px;*/
  743. margin-left: 16px;
  744. padding: 16px 8px;
  745. box-sizing: border-box;
  746. border: 1px solid #e5e5e5;
  747. }
  748. .module .item {
  749. margin-bottom: 4px;
  750. }
  751. .module input[type="text"] {
  752. box-sizing: border-box;
  753. display: inline-block;
  754. vertical-align: middle;
  755. margin-left: 0;
  756. width: 150px;
  757. min-height: 20px;
  758. }
  759. .module .btn {
  760. min-width: 80px;
  761. min-height: 24px;
  762. margin-top: 100px;
  763. margin-left: 80px;
  764. }
  765. //电视墙视频摄像头预览弹层样式chuanSet
  766. .TVWallCustomWidth {
  767. width: 1500px !important;
  768. height: 750px !important;
  769. background: #04080c !important;
  770. box-shadow: $barShadow !important;
  771. border: 1px $barBorder !important;
  772. .el-dialog__header {
  773. padding: 15px 20px !important;
  774. background-image: -moz-linear-gradient($GradualGreen) !important;
  775. background-image: -webkit-linear-gradient($GradualGreen) !important;
  776. background-image: linear-gradient($GradualGreen) !important;
  777. box-shadow: $shadowTitle !important;
  778. .el-dialog__title {
  779. font-weight: bolder !important;
  780. color: #3cd7ef !important;
  781. }
  782. }
  783. .leader-info-container {
  784. // padding: .5rem;
  785. display: flex;
  786. height: 650px;
  787. width: 20rem;
  788. overflow-y: scroll;
  789. flex-direction: column;
  790. padding: 0 1rem;
  791. .leader-info-list-con {
  792. width: 100%;
  793. padding: 1rem;
  794. margin-bottom: .5rem;
  795. background-image: -moz-linear-gradient($GradualGreen) !important;
  796. background-image: -webkit-linear-gradient($GradualGreen) !important;
  797. background-image: linear-gradient($GradualGreen) !important;
  798. border: solid 1px #7dc2eb;
  799. box-shadow: $shadowListHover !important;
  800. border-radius: 5px;
  801. h4 {
  802. margin: .4rem 0;
  803. color: $white;
  804. }
  805. }
  806. .leader-info-list-con:hover {
  807. background-image: -moz-linear-gradient($popupBG) !important;
  808. background-image: -webkit-linear-gradient($popupBG) !important;
  809. background-image: linear-gradient($popupBG) !important;
  810. }
  811. }
  812. }
  813. </style>