classServerDetails.js 1.9 KB
Newer Older
Skyeye云's avatar
Skyeye云 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

var objectId = "";

layui.config({
    base: basePath,
    version: skyeyeVersion
}).extend({
    window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'form'], function (exports) {
    winui.renderColor();
    var index = parent.layer.getFrameIndex(window.name);
    var $ = layui.$,
        form = layui.form;

    objectId = GetUrlParam("objectId");
    if (isNull(objectId)) {
        winui.window.msg("请传入适用对象信息", {icon: 2, time: 2000});
        return false;
    }

21 22 23 24 25 26 27 28 29 30 31 32
    loadDetail();
    function loadDetail() {
        showGrid({
            id: "showForm",
            url: reqBasePath + "queryServiceBeanCustom",
            params: {className: objectId},
            pagination: false,
            method: 'GET',
            template: $("#beanTemplate").html(),
            ajaxSendLoadBefore: function (hdb, json) {
                json.bean.serviceBean.tenantName = skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("tenantEnum", 'enumFiledName', json.bean.serviceBean.tenant, 'name');
                json.bean.serviceBean.flowableName = json.bean.serviceBean.flowable ? '' : '';
33
                json.bean.serviceBean.teamAuthName = json.bean.serviceBean.teamAuth ? '' : '';
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
            },
            ajaxSendAfter: function (json) {
                matchingLanguage();
                form.render();
            }
        });
    }

    $("body").on("click", "#editBean", function() {
        _openNewWindows({
            url: "../../tpl/classServer/classServerEdit.html?objectId=" + objectId,
            title: systemLanguage["com.skyeye.editPageTitle"][languageType],
            pageId: "classServerEdit",
            area: ['90vw', '90vh'],
            callBack: function (refreshCode) {
                winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
                loadDetail();
            }});
Skyeye云's avatar
Skyeye云 已提交
52 53
    });
});