| | |
| | | <p class="title-partment">快速标注</p> |
| | | <div class="flex-box" style="height:28px;"> |
| | | <label style="padding-right:10px;">隐患问题:</label> |
| | | <el-radio v-model="curVideo.IsUnusual" label="0">无异常</el-radio> |
| | | <el-radio v-model="curVideo.IsUnusual" label="1">有异常</el-radio> |
| | | <el-radio-group v-model="isUnusual"> |
| | | <el-radio :label="0">无异常</el-radio> |
| | | <el-radio :label="1">有异常</el-radio> |
| | | </el-radio-group> |
| | | |
| | | <el-button |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | v-show="curVideo.IsUnusual==1" |
| | | v-show="isUnusual==1" |
| | | type="primary" |
| | | @click="addLabel(curVideo)" |
| | | >添加标注</el-button> |
| | | </div> |
| | | <div class="flex-box"> |
| | | <div class="flex-box fixed-height-box"> |
| | | <label>标注信息:</label> |
| | | <div class="mark-list"> |
| | | <div class="mark" v-for="mark in curVideo.LableLst" :key="mark.ID"> |
| | |
| | | @close="labelDialogVisible=false" |
| | | :append-to-body="false" |
| | | > |
| | | <div class="label-radio"> |
| | | <p class="label">选择将要标注的视频:</p> |
| | | <el-radio-group v-model="isCheckAllVideo"> |
| | | <el-radio :label="1">标注在全部位置的视频段</el-radio> |
| | | <el-radio :label="0">仅标注选中的视频段</el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | <div class="label-check"> |
| | | <p class="label">隐患问题:</p> |
| | | <el-checkbox-group v-model="labelCheckedList"> |
| | | <el-checkbox v-for="item in labelOptions" :key="item.ID" :label="item.ID">{{item.Name}}</el-checkbox> |
| | | </el-checkbox-group> |
| | |
| | | guid: 1, |
| | | labelDialogVisible: false, |
| | | curVideo: {}, |
| | | isUnusual: 0, |
| | | videoArrs: [], |
| | | relativeVideos: [], |
| | | labelCheckedList: [], |
| | |
| | | labelOptions: [], |
| | | selectedLabelId: '', |
| | | setLabelTime: 0, |
| | | isCheckAllVideo: 1, |
| | | } |
| | | }, |
| | | watch: { |
| | | 'curVideo.LableLst':{ |
| | | handler(n,o){ |
| | | if(n.length>0){ |
| | | this.isUnusual = 1 |
| | | }else{ |
| | | this.isUnusual = 0 |
| | | } |
| | | }, |
| | | deep:true |
| | | }, |
| | | videoDetails: { |
| | | handler(newVal, oldVal) { |
| | | this.getVideos(newVal) |
| | |
| | | let _this = this; |
| | | getRelatedVideoInfo({ UniqeID: video.UniqeID }).then(res => { |
| | | console.log(res) |
| | | _this.curVideo = res.data[0]; |
| | | _this.videoArrs = res.data; |
| | | // _this.videoWrapArr.push(res.data[0]); |
| | | // _this.setGuid(1) |
| | | |
| | | res.data.forEach(element => { |
| | | element.marks = _this.mergeMarks(element) |
| | | console.log(element.marks) |
| | | }); |
| | | |
| | | _this.curVideo = res.data[0]; |
| | | _this.videoArrs = res.data; |
| | | _this.relativeVideos = res.data; |
| | | debugger |
| | | |
| | | }) |
| | | }, |
| | |
| | | this.labelDialogVisible = false; |
| | | }, |
| | | submitLabelChecked() { |
| | | let _this = this; |
| | | let tempArr = []; |
| | | if (this.isCheckAllVideo == 1) { |
| | | tempArr = this.videoArrs.map(video => video.ID) |
| | | } |
| | | let desc = this.labelCheckedList.map(lableId => { |
| | | for (let label of this.labelOptions) { |
| | | if (label.ID == lableId) { |
| | |
| | | |
| | | let query = { |
| | | ID: this.selectedLabelId, |
| | | ParentID: this.curVideo.ID + '', |
| | | ParentID: this.isCheckAllVideo ? tempArr.join(',') : this.curVideo.ID + '', |
| | | Time: Math.round(this.setLabelTime) + '', |
| | | Codes: this.labelCheckedList.join(','), |
| | | Desc: desc.join(',') |
| | | }; |
| | | |
| | | editLabel(query).then(rsp => { |
| | | if (rsp && rsp.success) { |
| | | this.labelDialogVisible = false; |
| | | this.curVideo.LableLst = rsp.data; |
| | | _this.labelDialogVisible = false; |
| | | |
| | | _this.videoArrs.forEach(video=>{ |
| | | video.LableLst = [] |
| | | }); |
| | | rsp.data.forEach(label=>{ |
| | | let someVideo = _this.videoArrs.find(video=>video.ID === label.ParentID); |
| | | someVideo.LableLst.push(label); |
| | | }) |
| | | _this.curVideo.LableLst = rsp.data; |
| | | this.$message.success("添加成功") |
| | | |
| | | // 标注 |
| | | this.setMarks(this.curVideo) |
| | | _this.setMarks(this.curVideo) |
| | | } else { |
| | | this.$message.warning(rsp.msg) |
| | | } |
| | |
| | | background: black; |
| | | border: 1px solid #fff; |
| | | box-sizing: border-box; |
| | | & > div { |
| | | height: 100%; |
| | | & > div { |
| | | height: 100%; |
| | | } |
| | | } |
| | | .currentPlayer { |
| | | border: 2px solid aqua; |
| | | height: 100%; |
| | | box-sizing: border-box; |
| | | & > div { |
| | | height: 100%; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | span { |
| | | padding-right: 5px; |
| | | } |
| | | i[class^="el-icon"] { |
| | | i[class^='el-icon'] { |
| | | padding: 3px; |
| | | } |
| | | } |
| | |
| | | color: #888; |
| | | } |
| | | } |
| | | } |
| | | .fixed-height-box{ |
| | | height: 200px; |
| | | overflow-y: auto; |
| | | } |
| | | } |
| | | .bot-right { |
| | |
| | | |
| | | .label-dialog { |
| | | .el-dialog { |
| | | width: 700px; |
| | | width: 700px !important; |
| | | height: 670px !important; |
| | | .el-dialog__header { |
| | | height: 20px; |
| | | } |
| | | p.label { |
| | | line-height: 36px; |
| | | } |
| | | .label-radio { |
| | | padding: 20px; |
| | | } |
| | | .label-check { |
| | | padding: 20px; |
| | | min-height: 400px; |
| | | margin-bottom: 20px; |
| | | .el-checkbox-group { |
| | |
| | | width: 50%; |
| | | text-align: left; |
| | | margin: 0; |
| | | margin-bottom: 4px; |
| | | } |
| | | } |
| | | } |
| | | .btns { |
| | | display: flex; |
| | | justify-content: center; |
| | | padding: 20px; |
| | | } |
| | | } |
| | | } |
| | | } |