From d74b495736f0c04522ec54274b70fed0ded2878d Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Tue, 27 Jun 2023 11:30:06 +0800
Subject: [PATCH] 任务新增导出

---
 public/map/core/BaseWidget.js |   71 +++++++++++++++++++++++++++++++++++
 1 files changed, 71 insertions(+), 0 deletions(-)

diff --git a/public/map/core/BaseWidget.js b/public/map/core/BaseWidget.js
new file mode 100644
index 0000000..0705be8
--- /dev/null
+++ b/public/map/core/BaseWidget.js
@@ -0,0 +1,71 @@
+/**
+ * widget基类
+ * @author Wenyb
+ * @date 2015/6/30
+ */
+define([
+  "dojo/_base/declare",
+  "base/BaseControl",
+  "base/ConfigData",
+  "base/AppEvent",
+  "dojo/domReady!",
+], function (
+  declare,
+  BaseControl,
+  ConfigData,
+  AppEvent
+  ){
+	var Widget = declare("BaseWidget",[BaseControl],
+		{
+			widgetName:"BaseWidget",
+			label:"widget基类",
+			moudleId:"0",
+			/**
+			 * 部件的布局类型:top:顶部布局、sider:侧面布局、cover:浮动在地图显示区域的布局
+			 */
+			widgetLayoutType:"",
+			_isOpen:false,
+			constructor:function(options)
+			{
+				declare.safeMixin(this, options);
+			},
+			startup:function()
+			{
+				this.inherited(arguments);
+				AppEvent.dispatchAppEvent(AppEvent.WIDGET_LOADED,{name:this.id,instance:this});
+			},
+			/**
+			 * Widget打开
+			 * @return boolean
+			 */
+			open:function()
+			{
+				this.show();
+				this._isOpen=true;
+				AppEvent.dispatchAppEvent(AppEvent.WIDGET_OPENED,{name:this.id,instance:this});
+			},
+			/**
+			 * Widget关闭
+			 * @return boolean
+			 */
+			close:function()
+			{
+				if(ConfigData.selectLayer!=null){
+					this.map.removeLayer(ConfigData.selectLayer);
+				}
+				ConfigData.selectLayer==null;
+				this.hide();
+				this._isOpen=false;
+				AppEvent.dispatchAppEvent(AppEvent.WIDGET_CLOSED,{name:this.id,instance:this});
+			},
+			/**
+			 * 是否需要验证用户权限
+			 * @return boolean
+			 */
+			confirmUserRight:function()
+			{
+				return false;
+			}
+		});
+	return Widget;
+});

--
Gitblit v1.9.3