Monitor.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953
  1. <template>
  2. <div class="monitor-container">
  3. <div class="monitor-wrap">
  4. <div class="video-box">
  5. <div class="fbg" v-if="fScreen"></div>
  6. <div
  7. class="fbgBtn"
  8. @click="fScreenFun()"
  9. v-if="!oneFScreen && fScreen"
  10. ></div>
  11. <div
  12. :class="{ 'video-container': true, fScreen: fScreen }"
  13. ref="videoContainerRef"
  14. >
  15. <!-- 非插件播放 ,默认非插件播放-->
  16. <div
  17. :class="{
  18. videoItem: true,
  19. a1: divNum == 1,
  20. a2: divNum == 2,
  21. a9: divNum == 9,
  22. a12: divNum == 12,
  23. selected: count == selected,
  24. }"
  25. v-for="count in divNum"
  26. :key="String(count) + divNum"
  27. @click="selectVideo($event, count, 'my-video' + divNum + count)"
  28. >
  29. <span style="display: none" class="current">{{
  30. Idlist[count - 1]
  31. }}</span>
  32. <div class="vedio_btn_control">
  33. <div class="direc">
  34. <div
  35. @click.stop="configCamera(oneId, 'takephoto', '')"
  36. class="cameraCtr"
  37. ></div>
  38. <div
  39. @mousedown.stop="configCamera(oneId, 'move', 0)"
  40. @mouseup.stop="stopConfigCamera(oneId)"
  41. class="upCtr"
  42. ></div>
  43. <div
  44. @mousedown.stop="configCamera(oneId, 'move', 1)"
  45. @mouseup="stopConfigCamera(oneId)"
  46. class="downCtr"
  47. ></div>
  48. <div
  49. @mousedown.stop="configCamera(oneId, 'move', 2)"
  50. @mouseup="stopConfigCamera(oneId)"
  51. class="leftCtr"
  52. ></div>
  53. <div
  54. @mousedown.stop="configCamera(oneId, 'move', 3)"
  55. @mouseup="stopConfigCamera(oneId)"
  56. class="rightCtr"
  57. ></div>
  58. </div>
  59. <div class="zoom">
  60. <!-- 无论插件还是费插件都可以放大缩小 -->
  61. <span
  62. class="addCtr"
  63. @mousedown.stop="configCamera(oneId, 'move', 8)"
  64. @mouseup="stopConfigCamera(oneId)"
  65. ></span>
  66. <span
  67. class="reduceCtr"
  68. @mousedown.stop="configCamera(oneId, 'move', 9)"
  69. @mouseup="stopConfigCamera(oneId)"
  70. ></span>
  71. </div>
  72. </div>
  73. <i
  74. @click.stop="oneFullFun($event, count)"
  75. class="iconfont icon-quanping fSBtn"
  76. ></i>
  77. <div
  78. style="width: 100%; height: 100%"
  79. :id="'my-video' + divNum + count"
  80. ></div>
  81. </div>
  82. </div>
  83. <div class="split-screen">
  84. <span
  85. :class="divNum == 1 ? 'sp0 sp' : 'sp00 sp'"
  86. @click="splitView(1)"
  87. ></span>
  88. <span
  89. :class="divNum == 2 ? 'sp1 sp' : 'sp01 sp'"
  90. @click="splitView(2)"
  91. ></span>
  92. <span
  93. :class="divNum == 9 ? 'sp2 sp' : 'sp02 sp'"
  94. @click="splitView(9)"
  95. ></span>
  96. <span
  97. :class="divNum == 12 ? 'sp3 sp' : 'sp03 sp'"
  98. @click="splitView(12)"
  99. ></span>
  100. </div>
  101. </div>
  102. <div class="nav-box">
  103. <ul class="viewLists">
  104. <li
  105. v-for="(item, index) in Idlist"
  106. :key="index"
  107. :class="{ active: activeIndex == index }"
  108. @click="selectEquip(item.device_id, item.jktype, index)"
  109. >
  110. <span
  111. :class="['dot', item.status == 1 ? 'onLine' : 'outLine']"
  112. ></span>
  113. {{ item | formatName }}
  114. </li>
  115. </ul>
  116. <div class="splitPage" onselectstart="return false">
  117. <span
  118. class="arrow el-icon-caret-top"
  119. @click="splitPage('jian')"
  120. ></span>
  121. <span>{{ currPage }}</span>
  122. <span>/</span>
  123. <span>{{ totalPage }}</span>
  124. <span
  125. class="arrow el-icon-caret-bottom"
  126. @click="splitPage('jia')"
  127. ></span>
  128. </div>
  129. <div class="direc">
  130. <div
  131. @click="configCamera(id, 'takephoto', '')"
  132. class="cameraCtr"
  133. ></div>
  134. <div
  135. @mousedown="configCamera(id, 'move', 0)"
  136. @mouseup="stopConfigCamera(id)"
  137. class="upCtr"
  138. ></div>
  139. <div
  140. @mousedown="configCamera(id, 'move', 1)"
  141. @mouseup="stopConfigCamera(id)"
  142. class="downCtr"
  143. ></div>
  144. <div
  145. @mousedown="configCamera(id, 'move', 2)"
  146. @mouseup="stopConfigCamera(id)"
  147. class="leftCtr"
  148. ></div>
  149. <div
  150. @mousedown="configCamera(id, 'move', 3)"
  151. @mouseup="stopConfigCamera(id)"
  152. class="rightCtr"
  153. ></div>
  154. </div>
  155. <div class="btnBox">
  156. <div class="zoom">
  157. <!-- 无论插件还是费插件都可以放大缩小 -->
  158. <span
  159. class="addCtr"
  160. @mousedown="configCamera(id, 'move', 8)"
  161. @mouseup="stopConfigCamera(id)"
  162. ></span>
  163. <span
  164. class="reduceCtr"
  165. @mousedown="configCamera(id, 'move', 9)"
  166. @mouseup="stopConfigCamera(id)"
  167. ></span>
  168. </div>
  169. <div
  170. v-show="jktype == 1"
  171. class="playBack"
  172. @click="playBackDialogVisible = true"
  173. ></div>
  174. <div @click="addEquip()" class="addequip"></div>
  175. <div @click="fScreenFun()" class="fSBtn1"></div>
  176. </div>
  177. </div>
  178. </div>
  179. <!-- 拍照 -->
  180. <el-dialog
  181. title="手动下载"
  182. :visible.sync="takePhotoDialogVisible"
  183. width="30%"
  184. >
  185. <el-input type="textarea" id="picUrl" v-model="picUrl"></el-input>
  186. <span slot="footer" class="dialog-footer">
  187. <el-button @click="takePhotoDialogVisible = false">取 消</el-button>
  188. <el-button type="primary" @click="copyPicUrl">复制</el-button>
  189. </span>
  190. </el-dialog>
  191. <!-- 查看回放 -->
  192. <el-dialog
  193. title="查看回放"
  194. :visible.sync="playBackDialogVisible"
  195. width="600px"
  196. @close="palyBackClose"
  197. >
  198. <el-form
  199. ref="backFormRef"
  200. :model="backForm"
  201. :rules="backFormRules"
  202. label-width="80px"
  203. >
  204. <el-form-item label="时间范围" prop="time">
  205. <el-date-picker
  206. v-model="backForm.time"
  207. type="datetimerange"
  208. range-separator="至"
  209. start-placeholder="开始日期"
  210. end-placeholder="结束日期"
  211. >
  212. </el-date-picker>
  213. </el-form-item>
  214. <el-form-item label="通道" prop="aisle">
  215. <el-select v-model="backForm.aisle" placeholder="请选择">
  216. <el-option label="通道一" value="1"> </el-option>
  217. <el-option label="通道二" value="2"> </el-option>
  218. <el-option label="通道三" value="3"> </el-option>
  219. <el-option label="通道四" value="4"> </el-option>
  220. </el-select>
  221. </el-form-item>
  222. <el-form-item>
  223. <el-button type="default" @click="playBackDialogVisible = false"
  224. >取消</el-button
  225. >
  226. <el-button type="primary" @click="playBackSubmit">确定</el-button>
  227. </el-form-item>
  228. </el-form>
  229. <div id="videoBack">
  230. <div id="playWind"></div>
  231. </div>
  232. </el-dialog>
  233. </div>
  234. </template>
  235. <script>
  236. // import "@/plugin/ezuikit.js";
  237. export default {
  238. data() {
  239. return {
  240. currPage: 1, //当前分页
  241. totalPage: 0, //总分页
  242. id: "", //监控选中状态selected,右侧菜单控制的ID
  243. oneId: "", //单个监控全屏时的监控id
  244. activeIndex: null, //控制设备列表选中状态
  245. jktype: "", //为1有回放,否则无回放
  246. divNum: 1, //默认分屏数量
  247. hlsHdSrc: "",
  248. rtmpHdSrc: "",
  249. player: null, //videojs的对象
  250. takePhotoDialogVisible: false, //拍照弹框
  251. Idlist: [], //右侧设备列表
  252. divMainHeight: "", //视频盒子高度
  253. selected: "", //默认不选中视频窗口
  254. divName: "", //选中的监控的id
  255. html: "", //插件播放内容
  256. picUrl: "", //视频拍照地址
  257. playBackDialogVisible: false,
  258. fScreen: false, //默认多个监控非全屏
  259. oneFScreen: false, //单个监控全屏状态
  260. btnFlag: true, //全屏按钮显示控制
  261. backForm: {
  262. time: "",
  263. start: "",
  264. end: "",
  265. aisle: "",
  266. },
  267. backFormRules: {
  268. time: [
  269. { required: true, message: "请选择时间范围", trigger: "change" },
  270. ],
  271. aisle: [{ required: true, message: "请选择通道", trigger: "change" }],
  272. },
  273. playback: {}, //回放
  274. videoObj: {},
  275. };
  276. },
  277. filters: {
  278. formatName: function (value) {
  279. //设备名字
  280. if (value.device_name) {
  281. return value.device_name;
  282. } else {
  283. return "设备" + value.device_id;
  284. }
  285. },
  286. },
  287. created() {
  288. this.getJkList();
  289. },
  290. methods: {
  291. //获取视频列表
  292. getJkList() {
  293. this.$axios({
  294. method: "POST",
  295. url: "/api/list_camera",
  296. data: this.qs.stringify({ page: this.currPage }),
  297. }).then((res) => {
  298. this.Idlist = res.data.data;
  299. this.totalPage = Math.ceil(res.data.counts / 12);
  300. this.initMonitor(); //进入页面默认1屏都显示视频
  301. });
  302. },
  303. getJkList2() {
  304. this.$axios({
  305. method: "POST",
  306. url: "/api/list_camera",
  307. data: this.qs.stringify({ page: this.currPage }),
  308. }).then((res) => {
  309. this.Idlist = res.data.data;
  310. });
  311. },
  312. //视频分页
  313. splitPage(str) {
  314. this.selected = "";
  315. this.activeIndex = null;
  316. if (str == "jian") {
  317. if (this.currPage > 1) {
  318. this.currPage--;
  319. this.getJkList2();
  320. }
  321. } else {
  322. if (this.currPage < this.totalPage) {
  323. this.currPage++;
  324. this.getJkList2();
  325. }
  326. }
  327. },
  328. //上下左右和拍照
  329. configCamera(id, ctrl, movenum) {
  330. if (id != "") {
  331. if (ctrl == "takephoto") {
  332. this.$axios({
  333. method: "POST",
  334. url: "/api/camera_takephoto",
  335. data: this.qs.stringify({
  336. device_id: id,
  337. ctrl: ctrl,
  338. }),
  339. }).then((res) => {
  340. if (res.data.code == 200) {
  341. let data = res.data.data;
  342. this.picUrl = data.picUrl;
  343. this.takePhotoDialogVisible = true;
  344. } else {
  345. this.$message.error("设备网络异常!");
  346. }
  347. });
  348. } else {
  349. //上下左右、放大、缩小
  350. this.$axios({
  351. method: "POST",
  352. url: "/api/ctrl_camera",
  353. data: this.qs.stringify({
  354. device_id: id,
  355. ctrl: ctrl,
  356. movenum: movenum,
  357. }),
  358. }).then((res) => {
  359. if (res.data == 1) {
  360. this.$message.success("操作成功");
  361. } else {
  362. this.$message.error("操作失败");
  363. }
  364. });
  365. }
  366. } else {
  367. this.$message.error("请选中监控");
  368. }
  369. },
  370. //关闭方向
  371. stopConfigCamera(id) {
  372. if (id != "") {
  373. this.$axios({
  374. method: "POST",
  375. url: "/api/ctrl_camera",
  376. data: this.qs.stringify({
  377. device_id: id,
  378. ctrl: "stop",
  379. }),
  380. });
  381. }
  382. },
  383. //分屏默认显示视频
  384. initMonitor() {
  385. this.selected = ""; //取消监控选中
  386. this.activeIndex = null; //取消菜单选中
  387. for (let item = 0; item < this.divNum; item++) {
  388. if (this.Idlist[item]) {
  389. //避免右侧监控数量少于divNum
  390. this.$axios({
  391. url: "/api/addr_camera",
  392. method: "POST",
  393. data: this.qs.stringify({ device_id: this.Idlist[item].device_id }),
  394. }).then((res) => {
  395. var data = eval("(" + res.data + ")");
  396. var hlsHdSrc = data.hlsHd;
  397. var rtmpHdSrc = data.rtmp;
  398. this.$nextTick(() => {
  399. let playHtml = `<video id="videoitem${this.divNum}${item}"
  400. style='width: 100%;height: 100%;' src="${hlsHdSrc}" autoplay poster='' muted controls playsInline webkit-playsinline>
  401. </video>`;
  402. document.getElementById(
  403. "my-video" + this.divNum + (item + 1)
  404. ).innerHTML = playHtml;
  405. this.$nextTick(() => {
  406. this.videoObj[
  407. "videoitem" + this.divNum + item
  408. ] = new EZUIKit.EZUIPlayer("videoitem" + this.divNum + item);
  409. });
  410. });
  411. });
  412. }
  413. }
  414. },
  415. //选中右侧菜单设备
  416. selectEquip(device_id, jktype, index) {
  417. console.log(jktype);
  418. if (this.selected !== "") {
  419. //判断是否选中左侧监控
  420. document
  421. .getElementsByClassName("selected")[0]
  422. .getElementsByClassName("current")[0].innerHTML = device_id; //更换current里的设备id值
  423. console.log(device_id);
  424. this.jktype = jktype;
  425. this.activeIndex = index; //菜单选中状态
  426. this.id = device_id; //保存选中的设备id
  427. console.log(this.divName);
  428. this.$axios({
  429. url: "/api/addr_camera",
  430. method: "POST",
  431. data: this.qs.stringify({ device_id: device_id }),
  432. }).then((res) => {
  433. var data = eval("(" + res.data + ")");
  434. let hlsHdSrc = data.hlsHd;
  435. let playHtml = `<video id="n${this.divName}"
  436. style='width: 100%;height: 100%;' src="${hlsHdSrc}" autoplay poster='' muted controls playsInline webkit-playsinline>
  437. </video>`;
  438. let target = document.getElementById(this.divName);
  439. target.removeChild(target.childNodes[0]);
  440. target.innerHTML = playHtml;
  441. this.$nextTick(() => {
  442. new EZUIKit.EZUIPlayer(`n${this.divName}`);
  443. });
  444. });
  445. }
  446. },
  447. //点击分屏
  448. splitView(num) {
  449. this.divNum = num;
  450. for (let item in this.videoObj) {
  451. console.log(item);
  452. this.videoObj[item].stop();
  453. }
  454. this.$nextTick(() => {
  455. this.initMonitor();
  456. });
  457. },
  458. //点击视频
  459. selectVideo(e, i, divName) {
  460. console.log("外");
  461. let current = e.currentTarget.getElementsByClassName("current")[0]
  462. .innerHTML;
  463. if (current.indexOf("device_id") == -1) {
  464. this.id = current;
  465. } else {
  466. this.id = JSON.parse(current).device_id;
  467. }
  468. console.log(this.id);
  469. this.divName = divName; //视频外面div的id
  470. this.selected = i;
  471. },
  472. //复制拍照地址
  473. copyPicUrl() {
  474. document.getElementById("picUrl").select();
  475. this.$message({
  476. showClose: true,
  477. message: "手动复制,在浏览器打开,另存为",
  478. });
  479. },
  480. //添加设备
  481. addEquip() {
  482. this.$prompt("添加设备id", "提示", {
  483. confirmButtonText: "确定",
  484. cancelButtonText: "取消",
  485. })
  486. .then(({ value }) => {
  487. this.$axios({
  488. method: "POST",
  489. url: "/api/add_camera",
  490. data: this.qs.stringify({ device_id: value }),
  491. }).then((res) => {
  492. if (res.data == 1) {
  493. this.getJkList();
  494. } else {
  495. this.$message.error(res.data);
  496. }
  497. });
  498. })
  499. .catch(() => {
  500. this.$message({
  501. type: "info",
  502. message: "取消添加",
  503. });
  504. });
  505. },
  506. fScreenFun() {
  507. this.fScreen = !this.fScreen;
  508. },
  509. oneFullFun(el, i) {
  510. this.selected = i;
  511. let par = el.currentTarget.parentNode;
  512. let current = par.getElementsByClassName("current")[0].innerHTML;
  513. if (current == "") {
  514. return false;
  515. } else if (current.indexOf("device_id") == -1) {
  516. this.oneId = current;
  517. } else {
  518. this.oneId = JSON.parse(current).device_id;
  519. }
  520. this.$nextTick(() => {
  521. par.classList.toggle("fullScreen");
  522. this.oneFScreen = !this.oneFScreen; //点击菜单栏全屏按钮后,再点击单个监控全屏时,隐藏恢复按钮
  523. });
  524. },
  525. playBackSubmit() {
  526. this.$refs.backFormRef.validate((valid) => {
  527. if (!valid) {
  528. return false;
  529. }
  530. });
  531. let start = new Date(this.backForm.time[0]);
  532. let end = new Date(this.backForm.time[1]);
  533. let beginVal = "";
  534. let endVal = "";
  535. function checked(num) {
  536. if (num < 10) {
  537. num = "0" + num;
  538. }
  539. return num;
  540. }
  541. beginVal =
  542. beginVal +
  543. start.getFullYear() +
  544. checked(start.getMonth() + 1) +
  545. checked(start.getDate()) +
  546. checked(start.getHours()) +
  547. checked(start.getMinutes()) +
  548. checked(start.getSeconds());
  549. endVal =
  550. endVal +
  551. end.getFullYear() +
  552. checked(end.getMonth() + 1) +
  553. checked(end.getDate()) +
  554. checked(end.getHours()) +
  555. checked(end.getMinutes()) +
  556. checked(end.getSeconds());
  557. this.$axios({
  558. method: "POST",
  559. url: "/api/nvr_view",
  560. data: this.qs.stringify({
  561. e_id: this.id,
  562. }),
  563. }).then((res) => {
  564. if (!document.getElementById("playWind")) {
  565. document.getElementById("videoBack").innerHTML =
  566. '<div id="playWind"></div>';
  567. }
  568. let accessToken = res.data.jk_token;
  569. let url = `ezopen://open.ys7.com/${this.id}/${this.backForm.aisle}.local.rec?begin=${beginVal}&end=${endVal}`;
  570. this.playback = new EZUIKit.EZUIPlayer({
  571. id: "playWind",
  572. autoplay: true,
  573. url: url,
  574. accessToken: accessToken,
  575. decoderPath: "static/js/",
  576. width: 560,
  577. height: 460,
  578. });
  579. });
  580. },
  581. palyBackClose() {
  582. this.$refs.backFormRef.resetFields();
  583. this.playback.stop();
  584. document.getElementById("videoBack").innerHTML = "";
  585. },
  586. },
  587. destroyed() {
  588. for (let item in this.videoObj) {
  589. this.videoObj[item].stop();
  590. console.log(this.videoObj[item]);
  591. }
  592. },
  593. };
  594. </script>
  595. <style lang='less' scoped>
  596. ul,
  597. li {
  598. list-style-type: none;
  599. margin: 0;
  600. }
  601. .monitor-container {
  602. display: flex;
  603. flex-direction: column;
  604. height: 100%;
  605. .monitor-wrap {
  606. height: 100%;
  607. display: flex;
  608. justify-content: space-between;
  609. background: #000;
  610. flex: 1;
  611. .video-box {
  612. flex: 1;
  613. padding: 10px;
  614. .fScreen {
  615. position: absolute;
  616. z-index: 8;
  617. top: 0;
  618. left: 0;
  619. width: 100%;
  620. height: 100% !important;
  621. }
  622. .fbg {
  623. position: fixed;
  624. top: 0;
  625. bottom: 0;
  626. left: 0;
  627. right: 0;
  628. background: #000;
  629. z-index: 5;
  630. }
  631. .fbgBtn {
  632. position: fixed;
  633. z-index: 9;
  634. right: 20px;
  635. bottom: 20px;
  636. width: 100px;
  637. height: 100px;
  638. background: url(../assets/images/monitor/fS2.png);
  639. }
  640. .video-container {
  641. width: 100%;
  642. height: calc(100% - 45px);
  643. background: #000;
  644. display: flex;
  645. flex-wrap: wrap;
  646. .fullScreen {
  647. position: fixed !important;
  648. width: 100% !important;
  649. height: 100% !important;
  650. top: 0;
  651. right: 0;
  652. bottom: 0;
  653. left: 0;
  654. z-index: 10;
  655. background: #000;
  656. .vedio_btn_control {
  657. display: block;
  658. }
  659. }
  660. .videoItem {
  661. position: relative;
  662. border: 1px solid #000;
  663. box-sizing: border-box;
  664. .fSBtn {
  665. position: absolute;
  666. z-index: 2;
  667. top: 10px;
  668. right: 20px;
  669. color: #fff;
  670. font-size: 20px;
  671. cursor: pointer;
  672. }
  673. .fSBtn:hover {
  674. color: red;
  675. }
  676. }
  677. .videoItem:hover {
  678. border-color: aquamarine;
  679. }
  680. .selected {
  681. border: 1px solid aquamarine;
  682. }
  683. .a1 {
  684. width: 100%;
  685. height: 100%;
  686. }
  687. .a2 {
  688. width: 50%;
  689. height: 100%;
  690. }
  691. .a9 {
  692. width: 33.3%;
  693. height: 33.3%;
  694. }
  695. .a12 {
  696. width: 33.3%;
  697. height: 25%;
  698. }
  699. }
  700. .split-screen {
  701. display: flex;
  702. justify-content: flex-start;
  703. padding: 15px 0;
  704. .sp {
  705. width: 17px;
  706. height: 17px;
  707. display: inline-block;
  708. margin-right: 10px;
  709. cursor: pointer;
  710. }
  711. .sp00 {
  712. background: url(../assets/images/monitor/1.png);
  713. }
  714. .sp01 {
  715. background: url(../assets/images/monitor/2.png);
  716. }
  717. .sp02 {
  718. background: url(../assets/images/monitor/9.png);
  719. }
  720. .sp03 {
  721. background: url(../assets/images/monitor/12.png);
  722. }
  723. .sp0 {
  724. background: url(../assets/images/monitor/11.png);
  725. }
  726. .sp1 {
  727. background: url(../assets/images/monitor/22.png);
  728. }
  729. .sp2 {
  730. background: url(../assets/images/monitor/99.png);
  731. }
  732. .sp3 {
  733. background: url(../assets/images/monitor/122.png);
  734. }
  735. }
  736. }
  737. .nav-box {
  738. width: 240px;
  739. background: #474e60;
  740. color: #fff;
  741. font-size: 14px;
  742. .viewLists {
  743. height: 50%;
  744. overflow: auto;
  745. padding: 0;
  746. li {
  747. padding-left: 25px;
  748. padding-right: 25px;
  749. line-height: 34px;
  750. cursor: pointer;
  751. .viewPhoto {
  752. color: #eba219;
  753. float: right;
  754. font-size: 12px;
  755. cursor: pointer;
  756. }
  757. .viewPhoto:hover {
  758. text-decoration: underline;
  759. }
  760. .dot {
  761. display: inline-block;
  762. width: 7px;
  763. height: 7px;
  764. border-radius: 100%;
  765. margin-right: 15px;
  766. }
  767. .onLine {
  768. background: #15bb88;
  769. }
  770. .outLine {
  771. background: #c1c1c1;
  772. }
  773. }
  774. li.active {
  775. background: #37414d;
  776. color: yellow;
  777. }
  778. li:hover {
  779. background: #37414d;
  780. }
  781. }
  782. .splitPage {
  783. height: 3%;
  784. margin-top: 2%;
  785. text-align: center;
  786. color: #15bb88;
  787. -webkit-user-select: none;
  788. -moz-user-select: none;
  789. -ms-user-select: none;
  790. .arrow {
  791. font-size: 20px;
  792. cursor: pointer;
  793. }
  794. }
  795. .direc {
  796. position: relative;
  797. z-index: 0;
  798. text-align: center;
  799. width: 160px;
  800. height: 160px;
  801. margin: 10px auto;
  802. // position: relative;
  803. background: url(../assets/images/monitor/direction-btn.png)
  804. no-repeat center;
  805. background-size: contain;
  806. & > div {
  807. position: absolute;
  808. width: 53px;
  809. height: 53px;
  810. cursor: pointer;
  811. }
  812. .upCtr {
  813. top: 0px;
  814. transform: translateX(-50%);
  815. margin-left: 50%;
  816. }
  817. .downCtr {
  818. bottom: 0px;
  819. transform: translateX(-50%);
  820. margin-left: 50%;
  821. }
  822. .leftCtr {
  823. transform: translateY(-50%);
  824. left: 0;
  825. margin-top: 50%;
  826. }
  827. .rightCtr {
  828. transform: translateY(-50%);
  829. right: 0;
  830. margin-top: 50%;
  831. }
  832. .cameraCtr {
  833. top: 0;
  834. bottom: 0;
  835. left: 0;
  836. right: 0;
  837. margin: auto;
  838. }
  839. }
  840. .btnBox {
  841. .zoom,
  842. .playBack,
  843. .playtype0,
  844. .playtype1,
  845. .addequip,
  846. .fSBtn1,
  847. .fSBtn2 {
  848. width: 140px;
  849. height: 32px;
  850. margin: auto;
  851. margin-bottom: 5px;
  852. cursor: pointer;
  853. }
  854. .zoom {
  855. background: no-repeat center / 100%
  856. url(../assets/images/monitor/zoom-btn.png);
  857. display: flex;
  858. & > span {
  859. flex: 1;
  860. height: 32px;
  861. }
  862. }
  863. .playBack {
  864. background: url(../assets/images/monitor/playback-btn.png)
  865. no-repeat center;
  866. }
  867. .playtype0 {
  868. background: url(../assets/images/monitor/playtype0.png)
  869. no-repeat center;
  870. }
  871. .playtype1 {
  872. background: url(../assets/images/monitor/playtype1.png)
  873. no-repeat center;
  874. }
  875. .addequip {
  876. background: url(../assets/images/monitor/addequip.png) no-repeat
  877. center;
  878. }
  879. .fSBtn1 {
  880. background: url(../assets/images/monitor/fS.png) no-repeat
  881. center;
  882. position: relative;
  883. }
  884. }
  885. }
  886. }
  887. .vedio_btn_control {
  888. display: none;
  889. position: absolute;
  890. right: 10px;
  891. bottom: 10px;
  892. z-index: 20;
  893. width: 140px;
  894. height: 200px;
  895. .direc {
  896. position: relative;
  897. text-align: center;
  898. width: 100px;
  899. height: 100px;
  900. margin: 10px auto;
  901. background: url(../assets/images/monitor/direction-btn.png)
  902. no-repeat center;
  903. background-size: contain;
  904. & > div {
  905. position: absolute;
  906. width: 33px;
  907. height: 33px;
  908. cursor: pointer;
  909. }
  910. .upCtr {
  911. top: 0px;
  912. transform: translateX(-50%);
  913. margin-left: 50%;
  914. }
  915. .downCtr {
  916. bottom: 0px;
  917. transform: translateX(-50%);
  918. margin-left: 50%;
  919. }
  920. .leftCtr {
  921. transform: translateY(-50%);
  922. left: 0;
  923. margin-top: 50%;
  924. }
  925. .rightCtr {
  926. transform: translateY(-50%);
  927. right: 0;
  928. margin-top: 50%;
  929. }
  930. .cameraCtr {
  931. top: 0;
  932. bottom: 0;
  933. left: 0;
  934. right: 0;
  935. margin: auto;
  936. }
  937. }
  938. .zoom {
  939. width: 140px;
  940. height: 32px;
  941. background: no-repeat center / 100%
  942. url(../assets/images/monitor/zoom-btn.png);
  943. display: flex;
  944. & > span {
  945. flex: 1;
  946. height: 32px;
  947. }
  948. }
  949. }
  950. }
  951. </style>