| | |
| | | flag: false, |
| | | flags: false, |
| | | megflag: false, |
| | | floodAnalysisFlag:false, |
| | | |
| | | postCreate: function () { |
| | | this.inherited(arguments); |
| | |
| | | } else { |
| | | iconUrl = iconConfig.icon; |
| | | } |
| | | if (iconConfig.name == "AnalysisOfBarrierLake" || iconConfig.name == 'ThematicDynamicRiver' || iconConfig.name == "MapSection") { |
| | | if (iconConfig.name == "AnalysisOfBarrierLake" || iconConfig.name == 'ThematicDynamicRiver' || iconConfig.name == "MapSection" || iconConfig.name == "FloodAnalysis") { |
| | | node = null; |
| | | return; |
| | | } else { |
| | |
| | | 'position': "absolute", |
| | | 'top': "45px", |
| | | 'left': "0px", |
| | | 'height': '135px', |
| | | 'height': '180px', |
| | | 'width': '126px', |
| | | 'background': 'rgb(0,23,54)', |
| | | 'z-index': '50' |
| | |
| | | var firstNode = null; |
| | | var middleNode = null; |
| | | var lastNode = null; |
| | | var finalNode = null; |
| | | for (var i = 0; i < iconNode.length; i++) { |
| | | if (iconNode[i].name == 'AnalysisOfBarrierLake') { |
| | | firstNode = html.create('li', { |
| | |
| | | if (!that.flags) { |
| | | $(event.target).parent().parent().siblings().toggleClass('click-icon-node'); |
| | | } |
| | | console.log(self.openedId,"8888") |
| | | if (self.openedId && self.openedId === firstNode.config.id) { |
| | | self._switchNodeToClose(self.openedId); |
| | | return; |
| | |
| | | } |
| | | that.flag = true; |
| | | that.megflag = true; |
| | | that.floodAnalysisFlag = true; |
| | | } |
| | | }) |
| | | firstNode.config = iconNode[i]; |
| | |
| | | this._createDropTriangle(firstNode); |
| | | } |
| | | } |
| | | |
| | | |
| | | if (iconNode[i].name == 'ThematicDynamicRiver') { |
| | | middleNode = html.create('li', { |
| | | 'class': 'icon-node jimu-float-trailing openli', |
| | |
| | | } |
| | | that.flags = true; |
| | | that.megflag = true; |
| | | that.floodAnalysisFlag = true |
| | | } |
| | | }) |
| | | middleNode.config = iconNode[i]; |
| | |
| | | } |
| | | that.flag = true; |
| | | that.flags = true; |
| | | that.floodAnalysisFlag = true; |
| | | } |
| | | }) |
| | | lastNode.config = iconNode[i]; |
| | |
| | | this._createDropTriangle(lastNode); |
| | | } |
| | | } |
| | | |
| | | if (iconNode[i].name == 'FloodAnalysis'){ |
| | | finalNode = html.create('li', { |
| | | 'class': 'icon-node jimu-float-trailing openli', |
| | | title: iconNode[i].label, |
| | | settingId: iconNode[i].id, |
| | | 'data-widget-name': iconNode[i].name, |
| | | innerHTML: iconNode[i].label |
| | | }, optionLi[0]); |
| | | var self = this; |
| | | $(node).on('click', finalNode, function (event) { |
| | | if (event.target.innerText == "洪水淹没分析") { |
| | | $(event.target).parent().parent().stop().hide(); |
| | | if (!finalNode.config.widgets || finalNode.config.widgets.length === 1 || |
| | | finalNode.config.openType === 'openAll') { |
| | | //widget or group with 'openAll' open type |
| | | if (!that.floodAnalysisFlag) { |
| | | $(event.target).parent().parent().siblings().toggleClass('click-icon-node'); |
| | | } |
| | | if (self.openedId && self.openedId === finalNode.config.id) { |
| | | self._switchNodeToClose(self.openedId); |
| | | return; |
| | | } else { |
| | | if (self.openedId) { |
| | | self._switchNodeToClose(self.openedId).then(lang.hitch(self, function () { |
| | | self._closeDropMenu(); |
| | | self._switchNodeToOpen(finalNode.config.id); |
| | | })); |
| | | } else { |
| | | self._switchNodeToOpen(finalNode.config.id); |
| | | } |
| | | } |
| | | } else { |
| | | if (self.dropMenuNode) { |
| | | self._closeDropMenu(); |
| | | |
| | | } else { |
| | | self._openDropMenu(finalNode); |
| | | } |
| | | } |
| | | that.flag = true; |
| | | that.flags = true; |
| | | that.megflag = true; |
| | | } |
| | | }) |
| | | finalNode.config = iconNode[i]; |
| | | if (finalNode.config.widgets && finalNode.config.widgets.length > 1 && |
| | | finalNode.config.openType === 'dropDown') { |
| | | this._createDropTriangle(finalNode); |
| | | } |
| | | } |
| | | |
| | | } |
| | | $(node).mouseover(function () { |
| | | $(dropDownDisplay).stop().show(); |
| | |
| | | this.flag = false; |
| | | this.flags = false; |
| | | this.megflag = false; |
| | | this.floodAnalysisFlag = false; |
| | | if (this.openedId && this.openedId === node.config.id) { |
| | | this._switchNodeToClose(this.openedId); |
| | | return; |
| | |
| | | for (i = this.headerIconCount; i < allIconConfigs.length; i++) { |
| | | // 做修改得地方 |
| | | iconConfig = allIconConfigs[i]; |
| | | if (iconConfig.name == "AnalysisOfBarrierLake" || iconConfig.name == "ThematicDynamicRiver" || iconConfig.name == "MapSection") { |
| | | if (iconConfig.name == "AnalysisOfBarrierLake" || iconConfig.name == "ThematicDynamicRiver" || iconConfig.name == "MapSection" || iconConfig.name == "FloodAnalysis") { |
| | | continue; |
| | | } else { |
| | | moreItems.push(iconConfig); |
| | |
| | | } |
| | | }); |
| | | return clazz; |
| | | }); |
| | | }); |