function updateResultDisplay(obj) {
    obj_label = document.getElementById("result");
    var jsonData = JSON.stringify(obj);// 转成JSON格式
    //  var result = $.parseJSON(jsonData);// 转成JSON对象
    obj_label.innerHTML = jsonData;
}

function showDialog(title, cb) {
    $("#dialogTitleH5").html(title);
    $("#dialogConfimBtn").off("click").on("click", cb);
    $("#dialog").modal("show");
}

function updateResultDisplayStr(str) {
    obj_label = document.getElementById("result");
    obj_label.innerHTML = str;
}

function alertNoPermission(message, title) {
    const noPermissionSpan = $("#nopermissionSpan");
    if (noPermissionSpan.length > 0) {
        console.log(message + " status:" + $("#dialog")[0].getAttribute("class"));
        noPermissionSpan.append("<br/>" + message);
    } else {
        var body = "<div class='row'><div class='col-sm-12'><span id='nopermissionSpan'>";
        body += message;
        body += "</span></div></div>";
        $("#dialogBodyDiv").html(body);
        showDialog("提示", function () {
            $("#dialogBodyDiv").html("");
        });
    }
}