write.js 1.7 KB
Newer Older
X
xqz 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34

// 以下两个参数开启团队权限时有值
var objectId = '', objectKey = '';
var objectParams = {};
// 根据以下两个参数判断:工作流的判断是否要根据serviceClassName的判断
var serviceClassName;

layui.config({
    base: basePath,
    version: skyeyeVersion
}).extend({
    window: 'js/winui.window'
}).define(['window', 'table', 'jquery'], function (exports) {
    winui.renderColor();
    var index = parent.layer.getFrameIndex(window.name);
    var $ = layui.$;
    var id = GetUrlParam("id");
    var objectId = GetUrlParam("objectId");
    var objectKey = GetUrlParam("objectKey");
    objectParams.subjectClassesId = GetUrlParam("subjectClassesId");

    if (isNull(id)) {
        dsFormUtil.initAddPageForStatic('content', 'FP2024072000001', {
            savePreParams: function (params) {
                params.objectId = objectId;
                params.objectKey = objectKey;
                params.subjectClassesId = objectParams.subjectClassesId;
            }
        });
    }else{
        AjaxPostUtil.request({
            url: sysMainMation.schoolBasePath + "queryDatumById",
            params: {id: id},
            type: 'json',
X
xqz 已提交
35
            method: 'POST',
X
xqz 已提交
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
            callback: function (json) {
                let data = json.bean;
                dsFormUtil.initEditPageForStatic('content', 'FP2024072000002', data, {
                    savePreParams: function (params) {
                        params.objectId = objectId;
                        params.objectKey = objectKey;
                        params.subjectClassesId = objectParams.subjectClassesId;
                    }
                });
            }
        });

    }

});