import { layuiObj } from "../index.js"; import { stationurl } from "../../../../public/js/url.js"; function showSchoolSignature(currentStation,currentTime,signatureImage,signatureImageSchool){ layuiObj.layer.open({ type: 1, title: `${currentStation}【${currentTime}】-签名`, //不显示标题栏 area: ['600px', '400px'], shade: 0.6, id:new Date().getTime(), //设定一个id,防止重复弹出 btnAlign: 'c', moveType: 1, //拖拽模式,0或者1 content: `
${getSignatureImg(signatureImage,signatureImageSchool)}
`, success: function(layero){ showImgViewer(signatureImage) showImgViewer(signatureImageSchool) } }); } //获取签名的照片 function getSignatureImg(signatureImage,signatureImageSchool){ var div=""; if(signatureImage!=null){ div+=`

派出所签名:

` } if(signatureImageSchool!=null){ div+=`

学校签名:

` } return div; } //图片放大器 function showImgViewer(img){ var box=document.getElementById(`schoolSignature${img}`); new Viewer(box, { inline: false, // 是否启用 inline 模式 title: true, // 是否显示当前图片的标题 }) } export {showSchoolSignature}