一、海康插件浮窗的层级,会把项目中时间控件中的时间选择面板挡住,导致时间面板显示不全,无法选择时间。如图所示:

二、解决办法:调用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);
}
}
三、效果图

四、API接口文档


大致意思就是当点击时间控件出现时间选择面板的时候把视频插件裁剪掉,时间控件失去焦点时再缝补回去,这种操作就不需要重新初始化插件的。
五、参考链接