一、海康插件浮窗的层级,会把项目中时间控件中的时间选择面板挡住,导致时间面板显示不全,无法选择时间。如图所示:
![](https://img-blog.csdnimg.cn/img_convert/7634ab83bc698b7e9f35a1220160a613.png)
二、解决办法:调用API中的JS_JS_CuttingPartWindow(iLeft, iTop, iWidth, iHeight )方法,
<el-date-picker
v-model="startTimeStamp"
type="datetime"
placeholder="选择日期时间"
size="small"
style="width:182px"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
@focus="startTimeFocus"
@blur="startTimeBlur"
>
</el-date-picker>
startTimeFocus() {
if (this.oWebControl) {
this.oWebControl.JS_CuttingPartWindow(0, 98, 134, 435);
}
},
startTimeBlur() {
if (this.oWebControl) {
this.oWebControl.JS_RepairPartWindow(0, 98, 134, 435);
}
}
三、效果图
![](https://img-blog.csdnimg.cn/img_convert/4f099c071626fec1a892037c2c6b0fb4.png)
四、API接口文档
![](https://img-blog.csdnimg.cn/img_convert/41e9d54a8911f779dcc5baa6187fc4a3.png)
![](https://img-blog.csdnimg.cn/img_convert/c5556f3626a441d177b96c03a216bcee.png)
大致意思就是当点击时间控件出现时间选择面板的时候把视频插件裁剪掉,时间控件失去焦点时再缝补回去,这种操作就不需要重新初始化插件的。
五、参考链接