mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-09 03:22:51 +08:00
增加formFullScreen配置项
This commit is contained in:
@@ -11,6 +11,7 @@ define(["jquery", "easy-admin"], function ($, ea) {
|
|||||||
modify_url: 'mall.goods/modify',
|
modify_url: 'mall.goods/modify',
|
||||||
stock_url: 'mall.goods/stock',
|
stock_url: 'mall.goods/stock',
|
||||||
read_url: 'mall.goods/read',
|
read_url: 'mall.goods/read',
|
||||||
|
formFullScreen: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
var Controller = {
|
var Controller = {
|
||||||
@@ -19,17 +20,6 @@ define(["jquery", "easy-admin"], function ($, ea) {
|
|||||||
ea.table.render({
|
ea.table.render({
|
||||||
init: init,
|
init: init,
|
||||||
totalRow: true,
|
totalRow: true,
|
||||||
toolbar: ['refresh',
|
|
||||||
[{
|
|
||||||
text: '添加',
|
|
||||||
url: init.add_url,
|
|
||||||
method: 'open',
|
|
||||||
auth: 'add',
|
|
||||||
class: 'layui-btn layui-btn-normal layui-btn-sm',
|
|
||||||
icon: 'fa fa-plus ',
|
|
||||||
extend: 'data-full="true"',
|
|
||||||
}],
|
|
||||||
'delete', 'export'],
|
|
||||||
cols: [[
|
cols: [[
|
||||||
{ type: "checkbox" },
|
{ type: "checkbox" },
|
||||||
{ field: 'id', width: 80, title: 'ID', totalRowText: '合计:' },
|
{ field: 'id', width: 80, title: 'ID', totalRowText: '合计:' },
|
||||||
@@ -72,14 +62,8 @@ define(["jquery", "easy-admin"], function ($, ea) {
|
|||||||
templet: ea.table.tool,
|
templet: ea.table.tool,
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
operat: [
|
operat: [
|
||||||
|
'edit',
|
||||||
[{
|
[{
|
||||||
text: '编辑',
|
|
||||||
url: init.edit_url,
|
|
||||||
method: 'open',
|
|
||||||
auth: 'edit',
|
|
||||||
class: 'layui-btn layui-btn-xs layui-btn-success',
|
|
||||||
extend: 'data-full="true"',
|
|
||||||
}, {
|
|
||||||
text: '入库',
|
text: '入库',
|
||||||
url: init.stock_url,
|
url: init.stock_url,
|
||||||
method: 'open',
|
method: 'open',
|
||||||
|
|||||||
@@ -387,6 +387,12 @@ define(["jquery", "tableSelect", "ckeditor", 'miniTheme', 'tableData', 'citypick
|
|||||||
options.height = 'full-85'
|
options.height = 'full-85'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (options.init.formFullScreen == true) {
|
||||||
|
options.init.formFullScreen = 'true'
|
||||||
|
} else {
|
||||||
|
options.init.formFullScreen = 'false'
|
||||||
|
}
|
||||||
|
|
||||||
options.toolbar = admin.table.renderToolbar(options.toolbar, options.elem, options.id, options.init);
|
options.toolbar = admin.table.renderToolbar(options.toolbar, options.elem, options.id, options.init);
|
||||||
|
|
||||||
// 判断是否有操作列表权限
|
// 判断是否有操作列表权限
|
||||||
@@ -458,7 +464,7 @@ define(["jquery", "tableSelect", "ckeditor", 'miniTheme', 'tableData', 'citypick
|
|||||||
toolbarHtml += ' <button class="layui-btn layui-btn-sm layuimini-btn-primary" data-table-refresh="' + tableId + '"><i class="fa fa-refresh"></i> </button>\n';
|
toolbarHtml += ' <button class="layui-btn layui-btn-sm layuimini-btn-primary" data-table-refresh="' + tableId + '"><i class="fa fa-refresh"></i> </button>\n';
|
||||||
} else if (v === 'add') {
|
} else if (v === 'add') {
|
||||||
if (admin.checkAuth('add', elem)) {
|
if (admin.checkAuth('add', elem)) {
|
||||||
toolbarHtml += '<button class="layui-btn layui-btn-normal layui-btn-sm" data-open="' + init.add_url + '" data-title="添加"><i class="fa fa-plus"></i> 添加</button>\n';
|
toolbarHtml += '<button class="layui-btn layui-btn-normal layui-btn-sm" data-open="' + init.add_url + '" data-title="添加" data-full="' + init.formFullScreen + '"><i class="fa fa-plus"></i> 添加</button>\n';
|
||||||
}
|
}
|
||||||
} else if (v === 'delete') {
|
} else if (v === 'delete') {
|
||||||
if (admin.checkAuth('delete', elem)) {
|
if (admin.checkAuth('delete', elem)) {
|
||||||
@@ -952,7 +958,7 @@ define(["jquery", "tableSelect", "ckeditor", 'miniTheme', 'tableData', 'citypick
|
|||||||
title: '编辑信息',
|
title: '编辑信息',
|
||||||
auth: 'edit',
|
auth: 'edit',
|
||||||
url: option.init.edit_url,
|
url: option.init.edit_url,
|
||||||
extend: ""
|
extend: option.init.formFullScreen == 'true' ? ' data-full="true"' : ''
|
||||||
};
|
};
|
||||||
operat.url = admin.table.toolSpliceUrl(operat.url, operat.field, data);
|
operat.url = admin.table.toolSpliceUrl(operat.url, operat.field, data);
|
||||||
if (admin.checkAuth(operat.auth, elem)) {
|
if (admin.checkAuth(operat.auth, elem)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user