classServerDetails.js 2.0 KB
Newer Older
doc_wei's avatar
doc_wei 已提交
1 2

var objectId = "";
doc_wei's avatar
doc_wei 已提交
3
var appId = "";
doc_wei's avatar
doc_wei 已提交
4 5 6 7 8 9 10 11 12 13 14 15 16

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");
doc_wei's avatar
doc_wei 已提交
17
    appId = GetUrlParam("appId");
doc_wei's avatar
doc_wei 已提交
18 19 20 21 22
    if (isNull(objectId)) {
        winui.window.msg("请传入适用对象信息", {icon: 2, time: 2000});
        return false;
    }

23 24 25 26 27
    loadDetail();
    function loadDetail() {
        showGrid({
            id: "showForm",
            url: reqBasePath + "queryServiceBeanCustom",
doc_wei's avatar
doc_wei 已提交
28
            params: {className: objectId, appId: appId},
29 30 31 32 33 34
            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 ? '' : '';
35
                json.bean.serviceBean.teamAuthName = json.bean.serviceBean.teamAuth ? '' : '';
36 37 38 39 40 41 42 43 44
            },
            ajaxSendAfter: function (json) {
                matchingLanguage();
                form.render();
            }
        });
    }

    $("body").on("click", "#editBean", function() {
doc_wei's avatar
doc_wei 已提交
45
        parent._openNewWindows({
46 47 48 49 50 51 52 53
            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();
            }});
doc_wei's avatar
doc_wei 已提交
54 55
    });
});