|
|
@ -1839,7 +1839,8 @@ layui.config({base: './ayq/modules/'}).define(["layer",'flow', "laytpl", "elemen
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$label.css("display", "block");
|
|
|
|
$label.css("display", "block");
|
|
|
|
$block.css("margin-left", json.labelWidth);
|
|
|
|
$block.css("margin-left", json.labelWidth);
|
|
|
|
} $label.css("width",json.labelWidth);
|
|
|
|
}
|
|
|
|
|
|
|
|
$label.css("width", json.labelWidth);
|
|
|
|
$label.append(json.label + ":");
|
|
|
|
$label.append(json.label + ":");
|
|
|
|
if (json.disabled) {
|
|
|
|
if (json.disabled) {
|
|
|
|
$("#" + json.id).find(".layui-input-block").append('<div class="iceEditor-disabled" style="width: 10%;height: 89%;"></div>');
|
|
|
|
$("#" + json.id).find(".layui-input-block").append('<div class="iceEditor-disabled" style="width: 10%;height: 89%;"></div>');
|
|
|
@ -4100,7 +4101,6 @@ layui.config({base: './ayq/modules/'}).define(["layer",'flow', "laytpl", "elemen
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* 给字段属性绑定事件 实现双向绑定*/
|
|
|
|
/* 给字段属性绑定事件 实现双向绑定*/
|
|
|
|
Class.prototype.bindPropertyEvent = function (_json) {
|
|
|
|
Class.prototype.bindPropertyEvent = function (_json) {
|
|
|
|
var that = this
|
|
|
|
var that = this
|
|
|
@ -4649,28 +4649,36 @@ layui.config({base: './ayq/modules/'}).define(["layer",'flow', "laytpl", "elemen
|
|
|
|
});
|
|
|
|
});
|
|
|
|
//注册导出数据
|
|
|
|
//注册导出数据
|
|
|
|
$('.exportJson').on('click', function () {
|
|
|
|
$('.exportJson').on('click', function () {
|
|
|
|
document.getElementById('generate-code-view').value = JSON.stringify(options.data, null, 4);
|
|
|
|
//需要获取当前的url中参数module_id和page
|
|
|
|
|
|
|
|
let module_id = $.getUrlParam('module_id');
|
|
|
|
layer.open({
|
|
|
|
let page = $.getUrlParam('page');
|
|
|
|
type: 1
|
|
|
|
|
|
|
|
, title: 'JSON 数据导出'
|
|
|
|
|
|
|
|
, id: 'Lay_layer_htmlcodeview'
|
|
|
|
|
|
|
|
, content: $('.htmlcodeview')
|
|
|
|
|
|
|
|
, area: ['800px', '640px']
|
|
|
|
|
|
|
|
, shade: false
|
|
|
|
|
|
|
|
, resize: false
|
|
|
|
|
|
|
|
, success: function (layero, index) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let content = JSON.stringify(options.data, null, 4);
|
|
|
|
|
|
|
|
if (content.length == 2) {
|
|
|
|
|
|
|
|
layer.alert('内容不能为空', {icon: 0, title: '保存失败'})
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
, end: function () {
|
|
|
|
$.ajax({
|
|
|
|
$('.htmlcodeview').css("display","none")
|
|
|
|
type: "POST",
|
|
|
|
|
|
|
|
dataType: "json",
|
|
|
|
|
|
|
|
url: "/FengHuang/zjb/saveModulePage",
|
|
|
|
|
|
|
|
data: {
|
|
|
|
|
|
|
|
"module_id": module_id,
|
|
|
|
|
|
|
|
"page": page,
|
|
|
|
|
|
|
|
"json": content
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
async: false,
|
|
|
|
|
|
|
|
success: function (result) {
|
|
|
|
|
|
|
|
layer.alert('保存成功!', {icon: 1, title: '成功'})
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$('.generateCode').on('click', function () {
|
|
|
|
$('.generateCode').on('click', function () {
|
|
|
|
var _html = $('<div style="height:100%;width:100%;"></div>');
|
|
|
|
var _html = $('<div style="height:100%;width:100%;"></div>');
|
|
|
|
var _script = $('<div style="height:100%;width:100%;"></div>');;
|
|
|
|
var _script = $('<div style="height:100%;width:100%;"></div>');
|
|
|
|
|
|
|
|
;
|
|
|
|
that.generateHtml(options.data, _html, _script);
|
|
|
|
that.generateHtml(options.data, _html, _script);
|
|
|
|
var _htmlCode = staticField.htmlCode.format(_html.html(), _script.html());
|
|
|
|
var _htmlCode = staticField.htmlCode.format(_html.html(), _script.html());
|
|
|
|
document.getElementById('generate-code-view').value = style_html(_htmlCode, 4, ' ', 400);
|
|
|
|
document.getElementById('generate-code-view').value = style_html(_htmlCode, 4, ' ', 400);
|
|
|
@ -4748,7 +4756,8 @@ layui.config({base: './ayq/modules/'}).define(["layer",'flow', "laytpl", "elemen
|
|
|
|
//拖动结束
|
|
|
|
//拖动结束
|
|
|
|
onEnd: function (evt) {
|
|
|
|
onEnd: function (evt) {
|
|
|
|
//console.log(evt);
|
|
|
|
//console.log(evt);
|
|
|
|
}};
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
var gridSortable = Sortable.create(el, ops);
|
|
|
|
var gridSortable = Sortable.create(el, ops);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -5085,7 +5094,6 @@ layui.config({base: './ayq/modules/'}).define(["layer",'flow', "laytpl", "elemen
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* 复制json中的节点并返回上一个节点*/
|
|
|
|
/* 复制json中的节点并返回上一个节点*/
|
|
|
|
Class.prototype.copyJsonAfterItem = function (json, id) {
|
|
|
|
Class.prototype.copyJsonAfterItem = function (json, id) {
|
|
|
|
var that = this,
|
|
|
|
var that = this,
|
|
|
|