From 0175cda6150656bc74b34c6f6c71edd1e1fc653c Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@iotlink.com> Date: 星期四, 04 二月 2021 18:22:54 +0800 Subject: [PATCH] treee, 修复tab切换时树的选中状态.添加区域 --- src/pages/shuohuangMonitorAnalyze/components/searchForVideoAnalyze.vue | 95 +++++++++++++++++++++++++++-------------------- 1 files changed, 54 insertions(+), 41 deletions(-) diff --git a/src/pages/shuohuangMonitorAnalyze/components/searchForVideoAnalyze.vue b/src/pages/shuohuangMonitorAnalyze/components/searchForVideoAnalyze.vue index 033f1e5..e4b36d7 100644 --- a/src/pages/shuohuangMonitorAnalyze/components/searchForVideoAnalyze.vue +++ b/src/pages/shuohuangMonitorAnalyze/components/searchForVideoAnalyze.vue @@ -117,14 +117,14 @@ <div class="header-bar clearfix"> <div class="left"> <div> - <el-select v-model="watch" size="mini"> - <el-option value label="鍏ㄩ儴"></el-option> - <el-option value="1" label="鏈叧娉�"></el-option> - <el-option value="2" label="宸插叧娉�"></el-option> + <el-select v-model="IsFollow" size="mini" @change="filterSearchData"> + <el-option value='' label="鍏ㄩ儴"></el-option> + <el-option :value="false" label="鏈叧娉�"></el-option> + <el-option :value="true" label="宸插叧娉�"></el-option> </el-select> </div> <div> - <el-select v-model="settle" size="mini"> + <el-select v-model="settle" size="mini" > <el-option value label="鍏ㄩ儴"></el-option> <el-option value="1" label="鏈鐞�"></el-option> <el-option value="2" label="宸插鐞�"></el-option> @@ -169,8 +169,8 @@ </div> </div> <div class="mark-info"> - <div class="abnormal" v-if="data.IsUnusual==='1'"> - <span v-for="(mark,index) in data.marks" :key="index">{{mark}}</span> + <div class="abnormal" v-if="data.LableLst&&data.LableLst.length"> + <span v-for="(label,index) in data.LableLst" :key="index">{{label.Desc}}</span> </div> <div v-else> <span>鏃犲紓甯�</span> @@ -229,7 +229,6 @@ class="dialog-video" :visible="videoDialogVisible" @close="videoDialogVisible=false" - :append-to-body="false" > <div slot="title" class="title"> <div class="center"> @@ -237,7 +236,6 @@ <span>鎾斁瑙嗛</span> </div> </div> - <video-analyze :videoDetails="selectedVideo" /> </el-dialog> </div> @@ -253,10 +251,11 @@ components: { VideoAnalyze }, - data() { + data () { return { CLIP: 'http://192.168.20.113/', 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")], curTabPage: 1, curTablePage: 1, @@ -269,7 +268,7 @@ pickerOptions: { shortcuts: [{ text: '浠婂ぉ', - onClick(picker) { + onClick (picker) { const end = new Date(); const start = new Date(); start.setHours(0, 0, 0); @@ -277,7 +276,7 @@ } }, { text: '鏄ㄥぉ', - onClick(picker) { + onClick (picker) { const end = new Date(); const start = new Date(); start.setTime(start.getTime() - 3600 * 1000 * 24); @@ -288,7 +287,7 @@ } }, { text: '杩戜笁澶�', - onClick(picker) { + onClick (picker) { const end = new Date(); const start = new Date(); start.setTime(start.getTime() - 3600 * 1000 * 24 * 3); @@ -296,7 +295,7 @@ } }, { text: '杩戜竴鍛�', - onClick(picker) { + onClick (picker) { const end = new Date(); const start = new Date(); start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); @@ -310,7 +309,6 @@ highLevelConfigs: [], showAdvance: true, fixedOneLineHeight: 40, - watch: '', settle: '', showType: 'menu', tableData: [ @@ -320,8 +318,7 @@ 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 } - ], - + ], videoDialogVisible: false, hiddenDanger: 1, labelDialogVisible: false, @@ -330,38 +327,46 @@ }, watch: { checkedConfigs: { - handler(n, o) { + handler (n, o) { this.filterSearchData() }, deep: true } }, - mounted() { + mounted () { this.init(); }, methods: { - handleTabSizeChange(size) { - debugger + 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 === ''){ + isFollow = '' + }else if(!!this.IsFollow){ + isFollow = '1' + }else{ + isFollow = '0' + } let query = { KeyWord: this.keyword, StartDate: this.searchTime[0], EndDate: this.searchTime[1], PageIndex: this.showType == 'list' ? this.curTablePage : this.showType == 'list', PageSize: this.showType == 'list' ? this.tablePageSize : this.tabPageSize, - IsDetail: this.showType == 'list' + IsDetail: this.showType == 'list', + IsFollow: isFollow }; let filterQuerys = []; this.checkedConfigs.forEach(config => { @@ -387,7 +392,7 @@ }) }, //涓�绾ф煡璇� - init() { + init () { let _this = this; let query = { KeyWord: this.keyword, @@ -395,7 +400,8 @@ EndDate: this.searchTime[1], PageIndex: this.showType == 'list' ? this.curTablePage : this.showType == 'list', PageSize: this.showType == 'list' ? this.tablePageSize : this.tabPageSize, - IsDetail: this.showType == 'list' + IsDetail: this.showType == 'list', + IsFollow: this.IsFollow }; this.optionalConfigs = []; this.highLevelConfigs = []; @@ -443,7 +449,7 @@ }) }, - toggleFollow(data) { + toggleFollow (data) { data.IsFollow = !data.IsFollow; this.updataVideo(data); if (data.IsFollow) { @@ -453,26 +459,27 @@ }); } }, - 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 => { @@ -482,7 +489,7 @@ this.checkedConfigs = []; this.showAdvance = true; }, - removeCheckedConfig(config) { + removeCheckedConfig (config) { config.isShow = true; if (config.IsAdvanced) { this.showAdvance = true; @@ -493,7 +500,7 @@ 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; } @@ -510,20 +517,20 @@ }, - cancleMultCheck(config) { + cancleMultCheck (config) { config.isMultCheck = false; config.data.forEach(opt => { opt.isChecked = false; }); }, - handleSelect(key, keyPath) { + handleSelect (key, keyPath) { }, - showMore(config) { + 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) { @@ -532,7 +539,7 @@ conf.isMultCheck = false; }) }, - dataSearch() { + dataSearch () { console.log(this.checkedConfigs); this.$forceUpdate(); }, @@ -544,6 +551,9 @@ <style lang="scss"> .search-for-video-analyze { padding: 20px 30px; + .flex-box{ + display: flex; + } .filter-area { .input-area { display: flex; @@ -732,6 +742,7 @@ text-align: left; border: 1px solid #dedede; border-radius: 5px; + height: 350px; .video-wrap { background: aliceblue; border-radius: 3px; @@ -792,8 +803,10 @@ } } .dialog-video { + z-index: 2096 !important; .el-dialog { width: 1180px; + height: 918px; } .el-dialog__body { background: #f5f5f5; -- Gitblit v1.8.0