bmh_cesium/public/widgets/print/widget.js

60 lines
1.3 KiB
JavaScript
Raw Normal View History

2025-03-09 23:23:50 +00:00
//此方式弹窗非iframe模式
var toolPrint = xjsdk.widget.bindClass(xjsdk.widget.BaseWidget.extend({
options: {
resources: [
'view.css',
],
view: [
{ type: "append", url: "view.html" }
],
},
//初始化[仅执行1次]
create: function () {
},
winCreateOK: function (opt, result) {
var that = this;
$("#btn_print_expimg").click(function () {
that.expImg();
});
$("#btn_print_start").click(function () {
that.printview();
});
$("#btn_print_close").click(function () {
that.disableBase();
});
},
//激活插件
activate: function () {
//隐藏div
$(".no-print-view").hide();
$(".cesium-viewer-toolbar").hide();
$(".cesium-viewer-fullscreenContainer").hide();
},
//释放插件
disable: function () {
//还原显示div
$(".no-print-view").show();
$(".cesium-viewer-toolbar").show();
$(".cesium-viewer-fullscreenContainer").show();
},
printview: function () {
window.print();
},
expImg: function () {
haoutil.loading.show();
viewer.xjsdk.expImage();
haoutil.loading.hide();
}
}));