import {
|
getBigPic,
|
getVideoByCServer
|
} from '../../../server/searchList/commomList.js'
|
export function LayerModel(json) {
|
this.BigPicParam = json.BigPicParam ? json.BigPicParam : {}
|
this.$layer = json.layer
|
this.videoUrl = null
|
/** 数据准备 */
|
this.init = async function () {
|
const _this = this
|
let res = await getBigPic(_this.BigPicParam)
|
if (res && res.success) {
|
_this.BigPicUrl = res.data.img_url
|
console.log(_this.BigPicUrl, '大图路径')
|
}
|
let res2 = await getVideoByCServer(_this.BigPicParam)
|
if (res2 && res.success) {
|
_this.videoUrl = res2.data.filepath
|
}
|
}
|
|
/** 打开弹框 */
|
this.openModel = function () {
|
console.log(this.$layer, 'layer js')
|
const _this = this
|
let htmlString = `
|
<div class="d-flex">
|
<div
|
variant="link"
|
:class="['table-type-btns',tableType === 'catch'?'active':'']"
|
click="tableType='catch'"
|
>大图</div>
|
<div class="flex-vertical-center px-3">
|
<span class="text-light">|</span>
|
</div>
|
<div
|
variant="link"
|
:class="['table-type-btns',tableType === 'alarm'?'active':'']"
|
click="tableType='alarm'"
|
>视频</div>
|
</div>
|
`
|
_this.$layer.open({
|
title: '调试',
|
type: 0,
|
area: '600px',
|
shade: false,
|
zIndex: _this.$layer.zIndex,
|
content: htmlString,
|
success: function (layero) {
|
_this.$layer.setTop(layero)
|
}
|
})
|
}
|
}
|