中扬CRM客户关系管理系统
#
luxiaotao1123
2022-11-22 45286ba61d7df92ca3d60bdf187b94d5a4349874
src/main/webapp/static/layui/lay/modules/formDesigner.js
@@ -78,6 +78,8 @@
                        return options || null;
                    }, getData: function () {
                        return options.data || null;
                    }, getHtmlData: function () {
                        return that.getHtmlData() || null;
                    }, geticeEditorObjects: function () {
                        return iceEditorObjects || null;
                    },getImages:function () {
@@ -172,7 +174,7 @@
                    $label.empty();
                    $label.css("width",json.labelWidth);
                    if (json.required) {
                        $label.append('<span style="color:red;">*</span>');
                        // $label.append('<span style="color:red;">*</span>');
                    }
                    $label.append(json.label + ":");
                    if (json.hideLabel) {
@@ -534,7 +536,7 @@
                    $label.empty();
                    $label.css("width",json.labelWidth);
                    if (json.required) {
                        $label.append('<span style="color:red;">*</span>');
                        // $label.append('<span style="color:red;">*</span>');
                    }
                    $label.append(json.label + ":");
                    if (json.hideLabel) {
@@ -662,7 +664,7 @@
                    $label.css({width: '{0}'.format(json.width)});
                    $block.css({width: '{0}'.format(json.width)});
                    if (json.required) {
                        $label.append('<span style="color:red;">*</span>');
                        // $label.append('<span style="color:red;">*</span>');
                    }
                    $label.append(json.label + ":");
                },
@@ -789,7 +791,7 @@
                    $('#' + json.id + ' .layui-input-block').append(_html);
                    $label.css("width",json.labelWidth);
                    if (json.required) {
                        $label.append('<span style="color:red;">*</span>');
                        // $label.append('<span style="color:red;">*</span>');
                    }
                    $label.append(json.label + ":");
                    form.render('select',json.id);
@@ -1063,7 +1065,7 @@
                        $block.css("margin-left",json.labelWidth);
                    }
                    if (json.required) {
                        $label.append('<span style="color:red;">*</span>');
                        // $label.append('<span style="color:red;">*</span>');
                    }
                    $label.append(json.label + ":");
                    form.render('checkbox');
@@ -1439,7 +1441,7 @@
                    }
                    $label.css("width",json.labelWidth);
                    if (json.required) {
                        $label.append('<span style="color:red;">*</span>');
                        // $label.append('<span style="color:red;">*</span>');
                    }
                    $label.append(json.label + ":");
                    var _html = '<input id="{0}" name="{0}"  lay-verify="{3}" class="layui-input icon-date widget-date {1}" style="line-height: 40px;{2}"></input>'.format(json.tag + json.id,_disabledClass,_disabledStyle,_required);
@@ -2877,7 +2879,7 @@
                    }
                    $label.css("width",json.labelWidth);
                    if (json.required) {
                        $label.append('<span style="color:red;">*</span>');
                        // $label.append('<span style="color:red;">*</span>');
                    }
                    $label.append(json.label + ":");
                    var _html = '';
@@ -4671,7 +4673,6 @@
                var _html = $('<div style="height:100%;width:100%;"></div>');
                var _script = $('<div style="height:100%;width:100%;"></div>');;
                that.generateHtml(options.data, _html,_script);
                console.log(_html.html());
                var _htmlCode = staticField.htmlCode.format(_html.html(),_script.html());
                document.getElementById('generate-code-view').value = style_html(_htmlCode, 4, ' ', 400);
                layer.open({
@@ -4694,11 +4695,10 @@
            });
            $('.generateHtml').on('click', function () {
            $('.generateHtmlData').on('click', function () {
                var _html = $('<div style="height:100%;width:100%;"></div>');
                var _script = $('<div style="height:100%;width:100%;"></div>');
                that.generateHtml(options.data, _html,_script);
                console.log(_html.html());
                return _html.html();
            });
@@ -4860,6 +4860,17 @@
                json[key] = signObjects[key];
            }
            return json;
        }
        //获取表单数据回调
        Class.prototype.getHtmlData = function () {
            var that = this,
                options = that.config;
            var _html = $('<div style="height:100%;width:100%;"></div>');
            var _script = $('<div style="height:100%;width:100%;"></div>');
            that.generateHtml(options.data, _html,_script);
            return _html.html();
        }
        //递归改变禁用属性
@@ -5210,4 +5221,4 @@
        exports('formDesigner'
            , formDesigner);
    });
    });