TVWalls.vue 27 KB

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