| | |
| | | </div> |
| | | </div> |
| | | <div class="content" v-show="showType == 'menu'"> |
| | | <el-row :gutter="20" > |
| | | <el-row :gutter="20"> |
| | | <el-col :xs="8" :sm="6" :md="6" :lg="6" v-for="data in tabData" :key="data.id"> |
| | | <div class="card"> |
| | | <div class="video-wrap" @click="checkVideoDetail(data)"> |
| | | <img :src="data.VideoCover" alt /> |
| | | <img :src="data.VideoCover | fixPath" alt /> |
| | | </div> |
| | | <div class="video-info"> |
| | | <div class="base-info"> |
| | |
| | | class="abnormal-label" |
| | | v-for="(label, index) in data.LableLst" |
| | | :key="index" |
| | | >{{ label.Desc +(index==data.LableLst.length-1?"":",")}}</span> |
| | | > |
| | | {{ |
| | | label.Desc + |
| | | (index == data.LableLst.length - 1 ? "" : ",") |
| | | }} |
| | | </span> |
| | | </div> |
| | | <div v-else> |
| | | <span>无异常</span> |
| | |
| | | type="info" |
| | | v-for="(label, index) in data.EventLst" |
| | | :key="index" |
| | | style="margin-right:5px;margin-bottom:5px" |
| | | style="margin-right: 5px; margin-bottom: 5px" |
| | | @click="checkEventVideo(label)" |
| | | >{{ label.Event }}</el-tag> |
| | | </div> |
| | |
| | | ></el-pagination> |
| | | </div> |
| | | <div class="content" v-show="showType == 'list'"> |
| | | <el-table :data="tableData" fit ref="elTable" @row-click="checkVideoDetail" > |
| | | <el-table :data="tableData" fit ref="elTable" @row-click="checkVideoDetail"> |
| | | <el-table-column label="名称" prop="VideoName" sortable width="500"> |
| | | <template slot-scope="scope" style="cursor: pointer"> |
| | | <template slot-scope="scope" style="cursor: pointer"> |
| | | <div>{{ scope.row.VideoName }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="大小" prop="VideoSize" sortable></el-table-column> |
| | | <el-table-column label="修改日期" prop="VideoUpdateDate" sortable></el-table-column> |
| | | <el-table-column label="创建日期" prop="VideoCreateDate" sortable></el-table-column> |
| | | <el-table-column label="视频时间" prop="VideoDate" sortable></el-table-column> |
| | | <!-- <el-table-column label="创建日期" prop="VideoCreateDate" sortable></el-table-column> --> |
| | | |
| | | <el-table-column label="操作"> |
| | | <template slot-scope="scope"> |
| | | <div class="operation"> |
| | | <div class="star" > |
| | | <i class="iconfont" :class="[scope.row.IsFollow ? 'follow' : '', 'iconguanzhu']" @click.stop="toggleFollow(scope.row)"></i> |
| | | <div class="star"> |
| | | <i |
| | | class="iconfont" |
| | | :class="[scope.row.IsFollow ? 'follow' : '', 'iconguanzhu']" |
| | | @click.stop="toggleFollow(scope.row)" |
| | | ></i> |
| | | </div> |
| | | <!-- <i class="el-icon-star-off" @click="toggleFollow(scope.row)"></i> --> |
| | | </div> |
| | |
| | | :total="tableTotal" |
| | | ></el-pagination> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <el-dialog |
| | | <!-- |
| | | |
| | | v-drag v-resize |
| | | |
| | | --> |
| | | <!-- <div > --> |
| | | <!-- :modal="false" --> |
| | | <el-dialog |
| | | v-drag |
| | | v-resize |
| | | class="dialog-video" |
| | | :visible="videoDialogVisible" |
| | | @close="videoDialogVisible = false" |
| | | :modal="false" |
| | | destroy-on-close="true" |
| | | @close="closeDial" |
| | | :close-on-click-modal="false" |
| | | :destroy-on-close="true" |
| | | :modal-append-to-body="false" |
| | | > |
| | | <div slot="title" class="title"> |
| | | <div class="center"> |
| | |
| | | <span>播放视频</span> |
| | | </div> |
| | | </div> |
| | | <video-analyze :videoDetails="selectedVideo" /> |
| | | <video-analyze v-if="videoDialogVisible" :videoDetails="selectedVideo" /> |
| | | </el-dialog> |
| | | <!-- </div> --> |
| | | |
| | | <el-dialog |
| | | class="dialog-event" |
| | | :visible="eventDialogVisible" |
| | |
| | | > |
| | | <div class="title" slot="title"> |
| | | <i class="el-icon-connection"></i> |
| | | <span>{{curEvName}}视频</span> |
| | | <span>{{ curEvName }}视频</span> |
| | | </div> |
| | | <event-videos :eventVideoArr="eventVideoArr"></event-videos> |
| | | </el-dialog> |
| | | </div> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | getRelatedVideoInfo, |
| | | getLabelMap, |
| | | delLabel, |
| | | editLabel, |
| | | getEventVideo |
| | | getEventVideo, |
| | | } from "@/api/shuohuang"; |
| | | import VideoAnalyze from "./videoAnalyze"; |
| | | import EventVideos from "./eventVideos"; |
| | |
| | | VideoAnalyze, |
| | | EventVideos, |
| | | }, |
| | | data () { |
| | | filters: { |
| | | fixPath(str) { |
| | | if (!str || str == undefined) { |
| | | return "" |
| | | } |
| | | |
| | | return str.replace("/opt/vasystem", "") |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | CLIP: "http://", |
| | | keyword: "", |
| | | IsFollow: "", |
| | | //searchTime: [this.$moment(new Date().getTime() - 3600 * 1000 * 24 * 5).format("YYYY-MM-DD HH:mm:ss"), this.$moment(new Date()).format("YYYY-MM-DD HH:mm:ss")], |
| | | searchTime: [ |
| | | new Date(2020, 0, 1, 0, 0, 0), |
| | | new Date(2020, 11, 31, 23, 59, 59), |
| | | new Date(2021, 11, 31, 23, 59, 59), |
| | | ], |
| | | curTabPage: 1, |
| | | curTablePage: 1, |
| | | tabPageSize: 8, |
| | | pageSizes: [ 8, 12, 24], |
| | | pageSizes: [8, 12, 24], |
| | | tabTotal: 0, |
| | | tablePageSize: 8, |
| | | tableTotal: 0, |
| | |
| | | shortcuts: [ |
| | | { |
| | | text: "今天", |
| | | onClick (picker) { |
| | | onClick(picker) { |
| | | const end = new Date(); |
| | | const start = new Date(); |
| | | start.setHours(0, 0, 0); |
| | |
| | | }, |
| | | { |
| | | text: "昨天", |
| | | onClick (picker) { |
| | | onClick(picker) { |
| | | const end = new Date(); |
| | | const start = new Date(); |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24); |
| | |
| | | }, |
| | | { |
| | | text: "近三天", |
| | | onClick (picker) { |
| | | onClick(picker) { |
| | | const end = new Date(); |
| | | const start = new Date(); |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 3); |
| | |
| | | }, |
| | | { |
| | | text: "近一周", |
| | | onClick (picker) { |
| | | onClick(picker) { |
| | | const end = new Date(); |
| | | const start = new Date(); |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); |
| | |
| | | settle: "", |
| | | IsOperate: "", |
| | | showType: "menu", |
| | | tableData: [ |
| | | // { |
| | | // name: "SS4B115_06_B节二端司机室_20201115_091500.mp4", |
| | | // size: "17.66M", |
| | | // updateTime: "2020-11-04 15:41", |
| | | // createTime: "2020-11-04 15:41", |
| | | // }, |
| | | // { |
| | | // name: "SS4B115_06_B节二端司机室_20201115_091700.mp4", |
| | | // size: "17.76M", |
| | | // updateTime: "2020-11-04 15:41", |
| | | // createTime: "2020-11-07 17:41", |
| | | // }, |
| | | ], |
| | | tabData: [ |
| | | { |
| | | id: "ss1", |
| | | no: "SS4B115", |
| | | frequency: "8084", |
| | | time: "2020-09-21 20:45:08", |
| | | driver: "张三", |
| | | marks: ["未呼唤、呼唤不标准", "学习司机未应答"], |
| | | markType: 1, |
| | | tags: ["进出站", "司机离岗"], |
| | | follow: true, |
| | | }, |
| | | { |
| | | id: "ss2", |
| | | no: "SS4B115", |
| | | frequency: "8084", |
| | | time: "2020-09-21 20:45:08", |
| | | driver: "张三", |
| | | marks: [], |
| | | markType: 0, |
| | | tags: ["进出站", "司机离岗"], |
| | | follow: false, |
| | | }, |
| | | ], |
| | | tableData: [], |
| | | tabData: [], |
| | | videoDialogVisible: false, |
| | | hiddenDanger: 1, |
| | | labelDialogVisible: false, |
| | | selectedVideo: {}, |
| | | eventDialogVisible: false, |
| | | curEvName: '', |
| | | eventVideoArr: [] |
| | | curEvName: "", |
| | | eventVideoArr: [], |
| | | }; |
| | | }, |
| | | watch: { |
| | | checkedConfigs: { |
| | | handler (n, o) { |
| | | handler(n, o) { |
| | | this.filterSearchData(); |
| | | }, |
| | | deep: true, |
| | | }, |
| | | }, |
| | | mounted () { |
| | | mounted() { |
| | | this.init(); |
| | | }, |
| | | methods: { |
| | | checkEventVideo (label) { |
| | | checkEventVideo(label) { |
| | | this.eventDialogVisible = true; |
| | | this.curEventDetail = label; |
| | | let _this = this; |
| | | getEventVideo({ Event: label.Event, LkgID: label.ParentID }).then(res => { |
| | | _this.eventVideoArr = res.data; |
| | | _this.curEvName = label.Event; |
| | | }) |
| | | getEventVideo({ Event: label.Event, LkgID: label.ParentID }).then( |
| | | (res) => { |
| | | _this.eventVideoArr = res.data; |
| | | _this.curEvName = label.Event; |
| | | } |
| | | ); |
| | | }, |
| | | handleTabSizeChange (size) { |
| | | closeDial() { |
| | | this.videoDialogVisible = false |
| | | this.selectedVideo = {} |
| | | }, |
| | | handleTabSizeChange(size) { |
| | | this.tabPageSize = size; |
| | | this.filterSearchData(); |
| | | }, |
| | | handleTableSizeChange (size) { |
| | | handleTableSizeChange(size) { |
| | | this.tablePageSize = size; |
| | | this.filterSearchData(); |
| | | }, |
| | | handleCurrentChange () { |
| | | handleCurrentChange() { |
| | | this.filterSearchData(); |
| | | }, |
| | | //二级查询 |
| | | filterSearchData () { |
| | | filterSearchData() { |
| | | let _this = this; |
| | | let isFollow = ""; |
| | | if (this.IsFollow === "") { |
| | |
| | | if (_this.showType == "list") { |
| | | _this.tableTotal = res.total; |
| | | _this.tableData = res.data; |
| | | debugger |
| | | } else { |
| | | _this.tabTotal = res.total; |
| | | _this.tabData = res.data; |
| | | _this.tabData = _this.tabData.map(function (item) { |
| | | const set = new Set() |
| | | const set = new Set(); |
| | | item.LableLst.forEach(function (label) { |
| | | label.Desc.split(",").forEach(function (d) { |
| | | set.add(d) |
| | | }) |
| | | }) |
| | | const lblst = [] |
| | | set.add(d); |
| | | }); |
| | | }); |
| | | const lblst = []; |
| | | set.forEach(function (d) { |
| | | lblst.push({ Desc: d }) |
| | | }) |
| | | item.LableLst = lblst |
| | | return item |
| | | }) |
| | | lblst.push({ Desc: d }); |
| | | }); |
| | | item.LableLst = lblst; |
| | | return item; |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | //一级查询 |
| | | init () { |
| | | init() { |
| | | let _this = this; |
| | | let query = { |
| | | KeyWord: this.keyword, |
| | |
| | | _this.tabTotal = res.total; |
| | | _this.tabData = res.data; |
| | | _this.tabData = _this.tabData.map(function (item) { |
| | | const set = new Set() |
| | | const set = new Set(); |
| | | item.LableLst.forEach(function (label) { |
| | | label.Desc.split(",").forEach(function (d) { |
| | | set.add(d) |
| | | }) |
| | | }) |
| | | const lblst = [] |
| | | set.add(d); |
| | | }); |
| | | }); |
| | | const lblst = []; |
| | | set.forEach(function (d) { |
| | | lblst.push({ Desc: d }) |
| | | }) |
| | | item.LableLst = lblst |
| | | return item |
| | | }) |
| | | lblst.push({ Desc: d }); |
| | | }); |
| | | item.LableLst = lblst; |
| | | return item; |
| | | }); |
| | | } |
| | | |
| | | res.filterlst.forEach((config) => { |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | toggleFollow (data) { |
| | | toggleFollow(data) { |
| | | data.IsFollow = !data.IsFollow; |
| | | this.updataVideo(data); |
| | | if (data.IsFollow) { |
| | |
| | | }); |
| | | } |
| | | }, |
| | | updataVideo (data) { |
| | | updataVideo(data) { |
| | | let _this = this; |
| | | updateVideoAnalyze(data).then((res) => { |
| | | //二级查询 |
| | | }); |
| | | }, |
| | | |
| | | checkVideoDetail (data) { |
| | | checkVideoDetail(data) { |
| | | let _this = this; |
| | | _this.selectedVideo = data; |
| | | _this.videoDialogVisible = true; |
| | | }, |
| | | checkFollow () { }, |
| | | checkType (type) { |
| | | checkFollow() { }, |
| | | checkType(type) { |
| | | this.showType = type; |
| | | this.filterSearchData(); |
| | | }, |
| | | clearCheckedConfigs () { |
| | | clearCheckedConfigs() { |
| | | this.checkedConfigs.forEach((config) => { |
| | | config.isShow = true; |
| | | config.data.forEach((d) => { |
| | |
| | | this.checkedConfigs = []; |
| | | this.showAdvance = true; |
| | | }, |
| | | removeCheckedConfig (config) { |
| | | removeCheckedConfig(config) { |
| | | config.isShow = true; |
| | | if (config.IsAdvanced) { |
| | | this.showAdvance = true; |
| | |
| | | let index = this.checkedConfigs.findIndex((one) => one.id == config.id); |
| | | this.checkedConfigs.splice(index, 1); |
| | | }, |
| | | checkOption (config, option) { |
| | | checkOption(config, option) { |
| | | if (option) { |
| | | option.isChecked = true; |
| | | } |
| | |
| | | // }) |
| | | }, |
| | | |
| | | cancleMultCheck (config) { |
| | | cancleMultCheck(config) { |
| | | config.isMultCheck = false; |
| | | config.data.forEach((opt) => { |
| | | opt.isChecked = false; |
| | | }); |
| | | }, |
| | | handleSelect (key, keyPath) { }, |
| | | showMore (config) { |
| | | handleSelect(key, keyPath) { }, |
| | | showMore(config) { |
| | | config.isShowMore = !config.isShowMore; |
| | | this.$refs[`options${config.id}`][0].style.height = config.isShowMore |
| | | ? this.$refs[`options${config.id}`][0].scrollHeight + "px" |
| | | : this.fixedOneLineHeight + "px"; |
| | | }, |
| | | toggleMultCheck (config) { |
| | | toggleMultCheck(config) { |
| | | config.isMultCheck = !config.isMultCheck; |
| | | this.optionalConfigs.forEach((conf) => { |
| | | if (conf.id == config.id) { |
| | |
| | | conf.isMultCheck = false; |
| | | }); |
| | | }, |
| | | dataSearch () { |
| | | dataSearch() { |
| | | console.log(this.checkedConfigs); |
| | | this.$forceUpdate(); |
| | | }, |
| | | }, |
| | | directives: { |
| | | drag(el, binding) { |
| | | const dialogHeaderEl = el.querySelector(".el-dialog__header"); |
| | | const dragDom = el.querySelector(".el-dialog"); |
| | | dialogHeaderEl.style.cursor = "move"; |
| | | const sty = |
| | | dragDom.currentStyle || window.getComputedStyle(dragDom, null); |
| | | dialogHeaderEl.onmousedown = (e) => { |
| | | const disX = e.clientX - dialogHeaderEl.offsetLeft; |
| | | const disY = e.clientY - dialogHeaderEl.offsetTop; |
| | | let styL, styT; |
| | | |
| | | if (sty.left.includes("%")) { |
| | | styL = |
| | | +document.body.clientWidth * (+sty.left.replace(/\%/g, "") / 100); |
| | | styT = |
| | | +document.body.clientHeight * (+sty.top.replace(/\%/g, "") / 100); |
| | | } else { |
| | | styL = +sty.left.replace(/\px/g, ""); |
| | | styT = +sty.top.replace(/\px/g, ""); |
| | | } |
| | | document.onmousemove = function (e) { |
| | | const l = e.clientX - disX; |
| | | const t = e.clientY - disY; |
| | | dragDom.style.left = `${l + styL}px`; |
| | | dragDom.style.top = `${t + styT}px`; |
| | | }; |
| | | document.onmouseup = function (e) { |
| | | document.onmousemove = null; |
| | | document.onmouseup = null; |
| | | }; |
| | | }; |
| | | }, |
| | | resize(el, binding, vnode) { |
| | | const dragDom = el.querySelector('.el-dialog') |
| | | dragDom.style.overflow = 'hidden' |
| | | let minWidth = 400 |
| | | let minHeight = 300 // |
| | | |
| | | // 拉伸 |
| | | let resizeEl = document.createElement('div') |
| | | dragDom.appendChild(resizeEl) // 在弹窗右下角加上一个10-10px的控制块 |
| | | resizeEl.style.cursor = 'nwse-resize' |
| | | // resizeEl.style.cursor = 'se-resize' |
| | | resizeEl.style.position = 'absolute' |
| | | resizeEl.style.height = '12px' |
| | | resizeEl.style.width = '12px' |
| | | resizeEl.style.right = '0px' |
| | | resizeEl.style.bottom = '0px' //鼠标拉伸弹窗 |
| | | resizeEl.style.background = 'url("/images/desktop/resize.png") no-repeat' //鼠标拉伸弹窗 |
| | | |
| | | resizeEl.onmousedown = (e) => { |
| | | // 记录初始x位置 |
| | | const clientX = e.clientX // 鼠标按下,计算当前元素距离可视区的距离 |
| | | const disX = e.clientX - resizeEl.offsetLeft |
| | | const disY = e.clientY - resizeEl.offsetTop |
| | | |
| | | document.onmousemove = function (e) { |
| | | e.preventDefault() // 移动时禁用默认事件 // 通过事件委托,计算移动的距离 |
| | | |
| | | const x = e.clientX - disX + (e.clientX - clientX) //这里 由于elementUI的dialog控制居中的,所以水平拉伸效果是双倍 |
| | | const y = e.clientY - disY //比较是否小于最小宽高 |
| | | dragDom.style.width = x > minWidth ? `${x}px` : minWidth + 'px' |
| | | dragDom.style.height = |
| | | y > minHeight ? `${y}px` : minHeight + 'px' |
| | | } //拉伸结束 |
| | | document.onmouseup = function (e) { |
| | | document.onmousemove = null |
| | | document.onmouseup = null |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | |
| | | // display: flex; |
| | | // flex-wrap: wrap; |
| | | // } |
| | | .el-table__row{ |
| | | .el-table__row { |
| | | cursor: pointer; |
| | | } |
| | | .el-row { |
| | |
| | | } |
| | | .operation { |
| | | cursor: pointer; |
| | | .star{ |
| | | .star { |
| | | color: #ccc; |
| | | } |
| | | .follow{ |
| | | .follow { |
| | | color: #409eff; |
| | | } |
| | | } |
| | |
| | | background: #f5f5f5; |
| | | } |
| | | } |
| | | .el-dialog__wrapper { |
| | | top: -22px; |
| | | } |
| | | .dialog-video { |
| | | // z-index: 2020 !important; |
| | | .el-dialog { |
| | | width: 1180px; |
| | | height: 901px; |
| | | // height: 893px; |
| | | } |
| | | .el-dialog__body { |
| | | background: #f5f5f5; |
| | | background: #eaeaea; |
| | | padding: 0; |
| | | // height: 100%; |
| | | height: inherit; |
| | | } |
| | | .el-dialog__header { |
| | | padding: 3px; |
| | | .el-dialog__headerbtn { |
| | | top: 6px; |
| | | } |
| | | } |
| | | } |
| | | .title-partment { |
| | | font-size: 14px; |
| | | font-weight: 500; |
| | |
| | | } |
| | | } |
| | | } |
| | | .window-view { |
| | | .window-view { |
| | | width: 100%; |
| | | height: auto; |
| | | // height: 100%; |
| | | // min-height: 684px; |
| | | overflow: auto; |
| | | z-index: 2000; |
| | | } |
| | | } |
| | | </style> |