| | |
| | | dframe.order = 0; |
| | | dframe.isShow = true; |
| | | let curDframe = state.docks.find(dock => dock.id == dframe.id); |
| | | //读取当前屏幕分辨率 |
| | | console.log(window.screen.availWidth); |
| | | console.log(window.screen.availHeight); |
| | | |
| | | debugger; |
| | | dframe.width = curDframe.width; |
| | | dframe.height = curDframe.height; |
| | | //根据分辨率动态调整(摄像机配置,数据栈配置,比对库管理,算力管理,实时监控) |
| | | //获取原始宽高比 |
| | | let ratio = curDframe.width/curDframe.height; |
| | | if(curDframe.name == 'cameraAccess' || curDframe.name == 'dataStack' || curDframe.name == 'library' || curDframe.name == 'analysisPower' || curDframe.name == 'cameraVideo'){ |
| | | //处理富余高度大于140的窗口 |
| | | if(window.screen.availHeight - curDframe.height > 140){ |
| | | dframe.height = (window.screen.availHeight - curDframe.height)/2 + curDframe.height; |
| | | dframe.width = dframe.height*ratio; |
| | | } |
| | | } |
| | | //全部绝对居中 |
| | | dframe.leftOffset = (document.body.offsetWidth - dframe.width)/2; |
| | | dframe.topOffset = (document.body.offsetHeight - dframe.height)/2; |
| | |
| | | |
| | | return true; |
| | | }, |
| | | |
| | | addMinDock: (state, dock) => { |
| | | |
| | | let ids = state.minDocks.map(item => item.id); |
| | | |
| | | if (ids.indexOf(dock.id) > -1) { |