1 |
- {"remainingRequest":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/vue-loader/lib/index.js??vue-loader-options!/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/src/views/dataSimulation/playback.vue?vue&type=style&index=0&id=3c01fb6f&lang=css","dependencies":[{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/src/views/dataSimulation/playback.vue","mtime":1708395041887},{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/css-loader/dist/cjs.js","mtime":1708395146948},{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/vue-loader/lib/loaders/stylePostLoader.js","mtime":1708395147772},{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/postcss-loader/src/index.js","mtime":1708395147225},{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/cache-loader/dist/cjs.js","mtime":1708395146433},{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/vue-loader/lib/index.js","mtime":1708395147382}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKC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;;;;;;;;;;;;;;;;;;;;;;;;AAicA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"playback.vue","sourceRoot":"src/views/dataSimulation","sourcesContent":["<template>\n <el-container style=\"padding: 15px 10px\">\n <el-header style=\"padding: 0px; height: 35px\">\n <div\n style=\"\n display: flex;\n justify-content: space-between;\n align-items: center;\n \"\n >\n <div style=\"display: flex\">\n <div\n style=\"\n width: 100px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n \"\n :style=\"{\n backgroundColor: _videoType == 1 ? '#2766dd' : '',\n color: _videoType == 1 ? '#fff' : '',\n }\"\n @click=\"navClick(1)\"\n >\n 实时监测\n </div>\n <div\n style=\"\n width: 100px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n \"\n :style=\"{\n backgroundColor: _videoType == 2 ? '#2766dd' : '',\n color: _videoType == 2 ? '#fff' : '',\n }\"\n @click=\"navClick(2)\"\n >\n 回放视频\n </div>\n </div>\n <div v-if=\"videoType\">\n <!-- 4分屏已选中 -->\n <img\n v-if=\"videoListType == 1\"\n src=\"@/assets/tag-2-select.png\"\n class=\"button-base\"\n @click=\"videoListTypeChange(1)\"\n />\n <!-- 4分屏未选中 -->\n <img\n v-else\n src=\"@/assets/tag-2.png\"\n class=\"button-base\"\n @click=\"videoListTypeChange(1)\"\n />\n\n <!-- 一分屏已选中 -->\n <div\n v-if=\"videoListType == 0\"\n class=\"button-base\"\n style=\"background-color: #017ebc\"\n ></div>\n <!-- 一分屏未选中 -->\n <img\n v-else\n src=\"@/assets/tag-1.png\"\n class=\"button-base\"\n @click=\"videoListTypeChange(0)\"\n />\n <!-- 九分屏已选中 -->\n <!-- <img\n v-if=\"videoListType == 2\"\n src=\"@/assets/tag-3-select.png\"\n class=\"button-base\"\n @click=\"videoListTypeChange(2)\"\n /> -->\n <!-- 全屏 -->\n\n <img\n v-else\n src=\"@/assets/fagnda.png\"\n class=\"button-base\"\n @click=\"videoListTypeChange(2)\"\n />\n <img\n v-if=\"videoListMagnify == false\"\n src=\"@/assets/fagnda.png\"\n class=\"fangda\"\n style=\"margin-right: 0\"\n @click=\"videoFullScreen\"\n />\n <img\n v-if=\"videoListMagnify == true\"\n src=\"@/assets/fagnda.png\"\n class=\"fangda\"\n style=\"margin-right: 10px\"\n @click=\"fullScreenChange\"\n />\n <!-- <div @click=\"toggleFullScreen\">放大</div> -->\n <img\n src=\"../../assets/放大.png\"\n class=\"fangda\"\n style=\"margin-right: 10px\"\n @click.stop=\"toggleFullScreen\"\n />\n </div>\n </div>\n </el-header>\n <el-main style=\"padding: 0px; overflow: auto\" :class=\"'className' + 1\">\n <div\n :class=\"{ fullscreen: isFullScreen }\"\n ref=\"fullscreenModule\"\n class=\"videoDiv\"\n v-if=\"videoListType == 1\"\n style=\"\n width: 100%;\n height: 100%;\n display: flex;\n flex-wrap: wrap;\n flex-direction: row;\n \"\n >\n <div\n v-for=\"(item, index) in 4\"\n style=\"\n width: 50%;\n height: 50%;\n float: left;\n border: 5px solid #fff;\n \"\n >\n <videoLine\n :camera-code=\"\n checkboxArr[index]\n ? checkboxArr[index].cameraCode\n : ''\n \"\n :items=\"false\"\n :all-camera=\"getAllCamera\"\n ></videoLine>\n <Video\n :src=\"checkboxArr[index] ? checkboxArr[index].src : ''\"\n />\n </div>\n </div>\n <div\n :class=\"{ fullscreen: isFullScreen }\"\n ref=\"fullscreenModule\"\n class=\"videoDiv\"\n v-if=\"videoListType == 0\"\n style=\"width: 100%; height: 100%\"\n >\n <videoLine\n :items=\"false\"\n :camera-code=\"cameraCode ? checkboxArr[0].cameraCode : ''\"\n ></videoLine>\n <Video :src=\"checkboxArr[0].src\" />\n </div>\n </el-main>\n\n <!-- 回放功能 -->\n <el-dialog\n :visible.sync=\"playbackModal.show\"\n v-if=\"playbackModal.show\"\n :before-close=\"playbackModalClose\"\n title=\"视频详情\"\n width=\"900px\"\n >\n <div>\n <videoLine :camera-code=\"cameraCode\"></videoLine>\n <div ref=\"mse\" style=\"width: 100%\"></div>\n </div>\n </el-dialog>\n </el-container>\n</template>\n \n <script>\nimport videoLine from \"@/components/videoPlayer/videoLine\";\nimport videoPlayer from \"@/components/videoPlayer/videoPlayer\";\nimport { invite, baseCameraManagementPlay } from \"@/api/video\";\nimport Video from \"@/views/dashboard/Video\";\nimport { records, lineDate } from \"@/api/video\";\nvar dayjs = require(\"dayjs\");\n\n// palyAndPlayback\n// 播放与回放\nexport default {\n name: \"PalyAndPlayback\",\n components: { videoLine, videoPlayer, Video },\n data() {\n return {\n isFullScreen: false,\n };\n },\n props: {\n videoType: {\n // 菜单类型\n type: Number,\n default() {\n return 1;\n },\n },\n checkboxArr: {\n type: Array,\n default() {\n return \"\";\n },\n },\n getAllCamera: {\n type: Array,\n default() {\n return \"\";\n },\n },\n cameraCode: {\n // 摄像机code\n type: String,\n default() {\n return \"\";\n },\n },\n alarmTime: {\n // 报警时间\n type: String,\n default() {\n return \"\";\n },\n },\n },\n watch: {\n checkboxArr: {\n handler(res) {\n console.log(res);\n },\n deep: true,\n },\n cameraCode(newValue) {\n console.log(newValue, \"111\");\n this.cameraCodeVideo = newValue;\n },\n cameraCodeVideo(newValue) {\n records(newValue, true)?.then((res) => {\n this.src = res.data + \"?\" + Math.random();\n });\n },\n videoType(newValue) {\n this._videoType = newValue || 1;\n this.handleSelect(this._videoType);\n },\n videoListType() {\n console.log(this.videoListType);\n },\n },\n data() {\n return {\n videoListType: 0, // [右而]当前tab类型\n _videoType: 1,\n tableData: [],\n isTime: false,\n src: \"\",\n cameraCodeVideo: \"\",\n pickerOptions: {\n onPick: (time) => {\n console.log(time, \"time\");\n this.minDate = time.minDate;\n },\n disabledDate: (time, picker) => {\n if (\n this.minDate &&\n this.getTIme(this.minDate) != this.getTIme(time)\n ) {\n return true;\n }\n return time.getTime() > Date.now();\n },\n },\n cameraCodeUrl: \"\",\n emptyText: \"\",\n playbackModal: {\n // 回放模块\n show: false,\n date: \"\", // 日期\n time: \"\", // 时间\n },\n };\n },\n mounted() {\n this.handleSelect(this._videoType);\n this._videoType = this.videoType;\n },\n methods: {\n navClick(val) {\n this._videoType = val;\n Array.from(document.querySelectorAll(\".videoDiv video\")).map(\n (item) => {\n item.currentTime = 0;\n item.play();\n }\n );\n this.$forceUpdate();\n },\n toggleFullScreen() {\n const fullscreenModule = this.$refs.fullscreenModule;\n\n if (!this.isFullScreen) {\n fullscreenModule.requestFullscreen();\n } else {\n document.exitFullscreen();\n }\n\n this.isFullScreen = !this.isFullScreen;\n },\n // 视频模块切换\n videoListTypeChange(type, val) {\n this.numIndex = 0;\n console.log(\"[视频切换11111111]\", type);\n this.numberVideos = type;\n\n this.videoListType = type;\n var _index = type === 1 ? 4 : 1;\n this.$emit(\"getType\", type);\n setTimeout(() => {\n for (let index = 0; index < _index; index++) {\n var item = Array.from(\n document.querySelectorAll(\".el-menu .el-checkbox\")\n )[index];\n if (!item.querySelector(\"input\").checked) {\n item.click();\n }\n }\n }, 800);\n // this.videoInit();\n // this.videoTreeInit();\n },\n getTIme(time) {\n const date = new Date(time);\n const year = date.getFullYear(); // 获取年份\n const month = date.getMonth() + 1; // 获取月份,需要加1\n const day = date.getDate(); // 获取日期\n const fullDate = `${year}-${month < 10 ? \"0\" + month : month}-${\n day < 10 ? \"0\" + day : day\n }`;\n return new Date(fullDate).getTime();\n },\n handleSelect(val = 1) {\n console.log(\"[视频服务]tab切换\", val);\n if (val == 1 || val == 2) {\n this._videoType = val;\n this.cameraCodeUrl = \"\";\n this.cameraCodeVideo = this.cameraCode;\n this.tableData = [];\n this.playbackModal.time = \"\";\n this.isTime = false;\n this.videoListTypeChange(0, val);\n }\n\n this.$emit(\"tabChange\", val);\n },\n playbackModalShow() {\n this.playbackModal.show = true;\n },\n playbackModalClose() {\n this.cameraCodeUrl = \"\";\n this.cameraCodeVideo = \"\";\n this.playbackModal.show = false;\n },\n timeChage() {\n console.log(\"timeChage\", this.playbackModal);\n if (this.playbackModal.date && this.playbackModal.time.length > 1) {\n baseCameraManagementPlay({\n cameraCode: this.cameraCode,\n startTime:\n this.playbackModal.date +\n \" \" +\n this.playbackModal.time[0],\n entTime:\n this.playbackModal.date +\n \" \" +\n this.playbackModal.time[1],\n }).then((res) => {\n this.tableData = res.data || [];\n console.log(res, \"res\");\n // if (res.code == \"200\" && res.data) {\n // this.cameraCodeUrl = res.data;\n // this.cameraCodeVideo = \"\";\n // } else {\n // this.cameraCodeUrl = \"\";\n // this.cameraCodeVideo = \"\";\n // this.$message.error(res.msg);\n // }\n });\n }\n },\n playbackModalSuccess() {\n this.playbackModal.show = false;\n },\n play(row) {\n this.playbackModal.show = true;\n console.log(this.tableData);\n this.$nextTick(() => {\n const config = {\n el: this.$refs.mse,\n url: row.url,\n fluid: true,\n playnext: {\n urlList: this.tableData.map((item) => item.url),\n },\n poster: \"\",\n plugins: [],\n isLive: false,\n autoplay: true,\n autoplayMuted: true,\n };\n\n config.plugins.push(FlvPlayer);\n\n this.player = new Player(config);\n // this.player.on(Events.PlAY, () => {\n // // TODO\n // })\n });\n },\n invite(startTime, entTime) {\n invite({\n cameraCode: this.cameraCode,\n startTime: startTime,\n entTime: entTime,\n }).then((res) => {\n if (res.code == \"200\" && res.data) {\n this.cameraCodeUrl = res.data;\n this.cameraCodeVideo = \"\";\n } else {\n this.cameraCodeUrl = \"\";\n this.cameraCodeVideo = \"\";\n this.$message.error(res.msg);\n }\n });\n },\n },\n};\n</script>\n \n <style >\n.className2 {\n position: relative;\n}\n.button-base {\n width: 25px;\n height: 18px;\n margin-right: 10px;\n cursor: pointer;\n float: right;\n}\n\n.fangda {\n cursor: pointer;\n width: 18px;\n height: 18px;\n margin-right: 10px;\n}\n.homeRight-video-operation {\n text-align: right;\n background: red;\n}\n</style>\n "]}]}
|