• echarts 添加Loading 等待。


    capturedsDetailsEcharts: function(id) {
            if (!id) {
                id = mini.get("chnNameCaptureds").getValue();
            }
            let captureds = echarts.init(document.getElementById('capturedsDetails'));
            let beginTime = mini.get("beginTimeCaptureds").getValue();
            let endTime = mini.get("endTimeCaptureds").getValue();
            let timeGran = mini.get("timeGrainCaptureds").getValue();
            let tableName = mini.get("tableCaptureds").getValue();
    
            captureds.showLoading({
                text: '数据正在加载...',
                textStyle: { fontSize : 30 , color: '#444' },
                effectOption: {backgroundColor: 'rgba(0, 0, 0, 0)'}
            });
    
            $.ajax({
                url: contextPath + "/source-system/query-captured.html",
                dataType: "json",
                type: "post",
                data: {
                    jsonParam:  
                        Constants.encodeObjToJSON({
                                beginTime: beginTime,
                                endTime: endTime,
                                timeGran: timeGran,
                                id: id,
                                tableName: tableName
                            }
                        )
                },
                success: function(datas) {
                    let option = {
                    /*    title: {
                            text: "捕获数据曲线图"
                        },*/
                        legend: {
                            data: ["插入数量","更新数量","删除数量","捕获数量"],
                            right:30,
                            bottom:20
                        },
                        xAxis: {
                            type: "time",
                            min: beginTime,
                            max: endTime,
                            splitNumber: 20
                        },
                        yAxis: {
                            type: "value"
                        },
                        grid:{
                            top:20,
                            bottom:90,
                            left:80,
                            right:30
                        },
                        color:['#00B9FF','#AF00BC', '#00CA68', '#FF8C00', '#FF0000'],
                        series: datas
                    };
                    captureds.setOption(option);
                    captureds.hideLoading();
                }
            });
        },
  • 相关阅读:
    1836Alignment
    JS日期格式化
    excle自编公式方法
    excle的公式说明
    小技巧之一 string[]合并
    Nunit的使用小问题
    Ajax中上传文件的方式
    VSS也有BUG?
    SQL Server中将时间型的转为yyyyMMddhhmmss
    给已经存在的PDF文件加水印
  • 原文地址:https://www.cnblogs.com/qiaoyutao/p/11040408.html
Copyright © 2020-2023  润新知