bmh_cesium/public/widgets/print/widget.js
2025-03-10 07:23:50 +08:00

60 lines
1.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//此方式弹窗非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();
}
}));