赣州市洪水风险预警系统三维版本
guoshilong
2023-02-21 b307682754a926f5bf626ca54147b6a314dab64d
widgets/FloodAnalysis/Widget.js
@@ -56,7 +56,7 @@
        currentNearPoint:null,
        evaluateLayerIndex:"",
        //收起框打开状态
        isOpen: true,
        popupLayer: null,
        //api接口
        url: {
            riverwaySelectName: "http://localhost:82/blade-ycreal/riverway/selectName",
@@ -162,6 +162,7 @@
                if (self.evaluateLayerIndex){
                    layer.close(self.evaluateLayerIndex)
                    self.evaluateLayerIndex = ""
                    $('#restore-icon').css('display','none')
                }
                setTimeout(function(){//有bug 需要延迟执行隐藏
                    $("#hd-select").hide()
@@ -233,9 +234,10 @@
                self.loadPagination(filterArray, "history-pagination")
            })
            $('#save-button').click(function () {
                self.confirmPopup()
                // self.floodAnalysisPopup()
            $('#restore-icon').click(function () {
                if (self.popupLayer){
                    self.popupLayer.css('display',"")
                }
            })
        },
@@ -320,6 +322,7 @@
            $('#search-name').val("")
            $('#glzd').val("")
            $('#qdj').val('')
            $('.restore-icon').css('display','none')
            this.isOpen = true
            this.analysisBtn.addClass('choose-button')
@@ -675,7 +678,7 @@
            let isAnalysis = flag == 'analysis'?true:false
            let parentData = {}
            let btnGroup = []
            if (isAnalysis){
                parentData.data = this.evaluateData
                parentData.hd = this.currentHd
@@ -706,17 +709,20 @@
                closeBtn: 0,
                shade: 0,
                move:false,
                maxmin: true,
                maxmin: false,
                //设置默认不在左下角
                minStack:false,
                min: function(layero,index){
                    setTimeout(function(){
                        layero.css({
                            'width':'50px',
                            'top': '83px',
                            'left':'inherit',
                            'right':'0px',
                        })
                        // layero.css({
                        //     'width':'50px',
                        //     'top': '83px',
                        //     'left':'inherit',
                        //     'right':'0px',
                        // })
                        self.popupLayer = $('.layui-layer')
                        layero.css('display','none')
                        $('#restore-icon').css('display','')
                    })
                    //显示最大化icon
                    $('.layui-layer-max').css("display","")
@@ -724,6 +730,7 @@
                    $('.layui-layer-title').css({
                        'background-color':'rgb(255,255,255)'
                    })
                    return false
                },
                restore: function(layero,index) {
                    //隐藏最大化icon
@@ -739,9 +746,7 @@
                    })
                },
                success:function (layero,index) {
                    $('.layui-layer-setwin .layui-layer-min cite').css("background-color",'white')
                    //绑定父子之间的关系,用于数据传递,缺少则无法传递
                    var body = layer.getChildFrame("body", index);
                    //得到iframe页的窗口对象
@@ -753,6 +758,11 @@
                    }else {
                        iframeWin.$('#save-btn').hide()
                    }
                    iframeWin.$('#close-btn').click(function () {
                        self.popupLayer = $('.layui-layer')
                        self.popupLayer.css('display','none')
                        $('#restore-icon').css('display','')
                    })
                    if ($('.layui-layer-max').hasClass('layui-layer-maxmin')){
                        $('.layui-layer-max').css("display","")
@@ -885,6 +895,7 @@
            //关闭分析窗口
            if (this.evaluateLayerIndex){
                layer.close(this.evaluateLayerIndex)
                $('#restore-icon').css('display','none')
                this.evaluateLayerIndex = ""
            }