1 |
- {"remainingRequest":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/vue-loader/lib/index.js??vue-loader-options!/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/src/components/videoPlayer/playback.vue?vue&type=style&index=0&id=552ae89e&lang=css","dependencies":[{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/src/components/videoPlayer/playback.vue","mtime":1708395041800},{"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:CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgo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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqcA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA","file":"playback.vue","sourceRoot":"src/components/videoPlayer","sourcesContent":["<template>\n <el-container style=\"padding: 15px 10px\">\n <el-header style=\"padding: 0px; height: 35px\">\n <div style=\"\n display: flex;\n justify-content: space-between;\n align-items: center;\n \">\n <div style=\"display: flex\">\n <div style=\"\n width: 100px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n \" :style=\"{\n backgroundColor: _videoType == 1 ? '#2766dd' : '',\n color: _videoType == 1 ? '#fff' : '',\n }\" @click=\"handleSelect(1)\">\n 实时监测\n </div>\n <div style=\"\n width: 100px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n \" :style=\"{\n backgroundColor: _videoType == 2 ? '#2766dd' : '',\n color: _videoType == 2 ? '#fff' : '',\n }\" @click=\"handleSelect(2)\">\n 回放视频\n </div>\n </div>\n <div v-if=\"videoType != 2\">\n <!-- 4分屏已选中 -->\n <img v-if=\"videoListType == 1\" src=\"@/assets/tag-2-select.png\" class=\"button-base\"\n @click=\"videoListTypeChange(1)\" />\n <!-- 4分屏未选中 -->\n <img v-else src=\"@/assets/tag-2.png\" class=\"button-base\" @click=\"videoListTypeChange(1)\" />\n\n <!-- 一分屏已选中 -->\n <div v-if=\"videoListType == 0\" class=\"button-base\" style=\"background-color: #017ebc\"></div>\n <!-- 一分屏未选中 -->\n <img v-else src=\"@/assets/tag-1.png\" class=\"button-base\" @click=\"videoListTypeChange(0)\" />\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 v-else src=\"@/assets/fagnda.png\" class=\"button-base\" @click=\"videoListTypeChange(2)\" />\n <img v-if=\"videoListMagnify == false\" src=\"@/assets/fagnda.png\" class=\"fangda\" style=\"margin-right: 0\"\n @click=\"videoFullScreen\" />\n <img v-if=\"videoListMagnify == true\" src=\"@/assets/fagnda.png\" class=\"fangda\" style=\"margin-right: 10px\"\n @click=\"fullScreenChange\" />\n <!-- <div @click=\"toggleFullScreen\">放大</div> -->\n <img src=\"../../assets/放大.png\" class=\"fangda\" style=\"margin-right: 10px\"\n @click.stop=\"toggleFullScreen\" />\n </div>\n <!-- <el-date-picker\n style=\"position: relative; top: -5px\"\n v-model=\"playbackModal.time\"\n @change=\"timeChage\"\n v-if=\"videoType == 2\"\n :picker-options=\"pickerOptions\"\n type=\"datetimerange\"\n range-separator=\"至\"\n value-format=\"yyyy-MM-dd HH:mm:ss\"\n format=\"yyyy-MM-dd HH:mm\"\n start-placeholder=\"开始日期\"\n end-placeholder=\"结束日期\"\n /> -->\n\n <template v-if=\"videoType == 2\">\n <div>\n <el-date-picker size=\"small\" value-format=\"yyyy-MM-dd\" @change=\"timeChage\"\n v-model=\"playbackModal.date\" type=\"date\" placeholder=\"选择日期\"\n style=\"width: 150px\"></el-date-picker>\n -\n <el-time-picker size=\"small\" value-format=\"HH:mm:ss\" @change=\"timeChage\"\n v-model=\"playbackModal.time\" is-range range-separator=\"至\" start-placeholder=\"开始时间\"\n end-placeholder=\"结束时间\" placeholder=\"选择时间范围\" style=\"width: 230px\"></el-time-picker>\n </div>\n </template>\n </div>\n </el-header>\n <el-main style=\"padding: 0px; overflow: auto\" :class=\"'className' + this._videoType\" v-if=\"this.videoType != 2\">\n <div :class=\"{ fullscreen: isFullScreen }\" ref=\"fullscreenModule\" class=\"videoDiv\" 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 <div v-for=\"(item, index) in 4\" style=\"\n width: 50%;\n height: 50%;\n float: left;\n border: 5px solid #fff;\n \">\n <videoLine :camera-code=\"checkboxArr[index]\n ? checkboxArr[index].cameraCode\n : ''\n \" :items=\"false\" :all-camera=\"getAllCamera\"></videoLine>\n <Video :src=\"checkboxArr[index] ? checkboxArr[index].src : ''\" />\n </div>\n </div>\n <div :class=\"{ fullscreen: isFullScreen }\" ref=\"fullscreenModule\" class=\"videoDiv\" v-if=\"videoListType == 0\"\n style=\"width: 100%; height: 100%\">\n <videoLine :items=\"false\" :camera-code=\"cameraCode ? checkboxArr[0].cameraCode : ''\"></videoLine>\n <Video :src=\"checkboxArr[0].src\" />\n </div>\n </el-main>\n <el-main style=\"padding: 0px\" :class=\"'className' + this.videoType\" v-else>\n\n <!-- <el-table\n :empty-text=\"emptyText\"\n :data=\"tableData\"\n height=\"530px\"\n style=\"width: 100%\"\n >\n <el-table-column label=\"序号\" width=\"80\">\n <template slot-scope=\"scope\">\n <span>{{ scope.$index + 1 }}</span>\n </template>\n </el-table-column>\n <el-table-column prop=\"startTime\" label=\"开始时间\" width=\"180\">\n </el-table-column>\n <el-table-column prop=\"entTime\" label=\"结束时间\">\n </el-table-column>\n <el-table-column label=\"播放视频\">\n <template slot-scope=\"scope\">\n <div style=\"color: #0065ff\" @click=\"play(scope.row)\">\n 播放\n </div>\n </template>\n </el-table-column>\n </el-table> -->\n <!-- <div\n style=\"\n position: absolute;\n left: 0px;\n top: 117px;\n width: 100%;\n text-align: center;\n \"\n >\n <img\n src=\"19241681291305_.pic.jpg\"\n v-if=\"tableData.length === 0\"\n style=\"width: 213px; left: 39%\"\n alt=\"No Data\"\n />\n </div> -->\n <div style=\"padding-bottom: 14px;background-color: #000;height:100%\">\n <videoLine :showElectric=\"false\" :items=\"false\" :camera-code=\"cameraCode\">\n </videoLine>\n <Video :src=\"tableData\"></Video>\n </div>\n </el-main>\n\n <!-- 回放功能 -->\n <el-dialog :visible.sync=\"playbackModal.show\" v-if=\"playbackModal.show\" :before-close=\"playbackModalClose\"\n title=\"视频详情\" width=\"900px\">\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 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) {\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 }, 500);\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}-${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) {\n this.videoType = 1;\n this.cameraCodeUrl = \"\";\n this.cameraCodeVideo = this.cameraCode;\n this.tableData = [];\n this.playbackModal.time = \"\";\n this.isTime = false;\n this.videoListTypeChange(0);\n } else if (val == 2) {\n this.videoType = 2;\n this.cameraCodeVideo = \"\";\n // this.isTime = true;\n // console.log(\"报警时间\", this.alarmTime);\n // // 带有报警时间\n // if (this.alarmTime) {\n // const beginTime = dayjs(new Date(this.alarmTime))\n // .subtract(10, \"minute\")\n // .format(\"YYYY-MM-DD HH:mm:ss\");\n // const endTime = dayjs().format(\"YYYY-MM-DD HH:mm:ss\");\n // this.playbackModal.time = [beginTime, endTime];\n // console.log(this.playbackModal.time);\n // } else {\n // this.playbackModal.time = [];\n // }\n\n // this.playbackModalShow();\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\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\n.homeRight-video-operation {\n text-align: right;\n background: red;\n}\n</style>\n"]}]}
|