将扩展名通过ua暴露;更改js的编码规范

This commit is contained in:
2023-11-28 10:16:27 +08:00
parent b67c75a667
commit a75ff465d0
14 changed files with 136 additions and 132 deletions

View File

@@ -1,10 +1,10 @@
var init = { var init = {
table_elem: '#currentTable', tableElem: '#currentTable',
table_render_id: 'currentTableRenderId', tableRenderId: 'currentTableRenderId',
index_url: '{{controllerUrl}}/index', indexUrl: '{{controllerUrl}}/index',
add_url: '{{controllerUrl}}/add', addUrl: '{{controllerUrl}}/add',
edit_url: '{{controllerUrl}}/edit', editUrl: '{{controllerUrl}}/edit',
delete_url: '{{controllerUrl}}/delete', deleteUrl: '{{controllerUrl}}/delete',
export_url: '{{controllerUrl}}/export', exportUrl: '{{controllerUrl}}/export',
modify_url: '{{controllerUrl}}/modify', modifyUrl: '{{controllerUrl}}/modify',
}; };

View File

@@ -1,13 +1,13 @@
$(function () { $(function () {
var init = { var init = {
table_elem: '#currentTable', tableElem: '#currentTable',
table_render_id: 'currentTableRenderId', tableRenderId: 'currentTableRenderId',
index_url: 'debug.log/index', indexUrl: 'debug.log/index',
add_url: 'debug.log/add', addUrl: 'debug.log/add',
edit_url: 'debug.log/edit', editUrl: 'debug.log/edit',
delete_url: 'debug.log/delete', deleteUrl: 'debug.log/delete',
export_url: 'debug.log/export', exportUrl: 'debug.log/export',
modify_url: 'debug.log/modify', modifyUrl: 'debug.log/modify',
}; };
var uidList = []; var uidList = [];

View File

@@ -1,10 +1,10 @@
var init = { var init = {
table_elem: '#currentTable', tableElem: '#currentTable',
table_render_id: 'currentTableRenderId', tableRenderId: 'currentTableRenderId',
index_url: 'mall.cate/index', indexUrl: 'mall.cate/index',
add_url: 'mall.cate/add', addUrl: 'mall.cate/add',
edit_url: 'mall.cate/edit', editUrl: 'mall.cate/edit',
delete_url: 'mall.cate/delete', deleteUrl: 'mall.cate/delete',
export_url: 'mall.cate/export', exportUrl: 'mall.cate/export',
modify_url: 'mall.cate/modify', modifyUrl: 'mall.cate/modify',
}; };

View File

@@ -1,12 +1,12 @@
var init = { var init = {
table_elem: '#currentTable', tableElem: '#currentTable',
table_render_id: 'currentTableRenderId', tableRenderId: 'currentTableRenderId',
index_url: 'mall.goods/index', indexUrl: 'mall.goods/index',
add_url: 'mall.goods/add', addUrl: 'mall.goods/add',
edit_url: 'mall.goods/edit', editUrl: 'mall.goods/edit',
delete_url: 'mall.goods/delete', deleteUrl: 'mall.goods/delete',
export_url: 'mall.goods/export', exportUrl: 'mall.goods/export',
modify_url: 'mall.goods/modify', modifyUrl: '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, formFullScreen: true,

View File

@@ -1,10 +1,10 @@
var init = { var init = {
table_elem: '#currentTable', tableElem: '#currentTable',
table_render_id: 'currentTableRenderId', tableRenderId: 'currentTableRenderId',
index_url: 'mall.tag/index', indexUrl: 'mall.tag/index',
add_url: 'mall.tag/add', addUrl: 'mall.tag/add',
edit_url: 'mall.tag/edit', editUrl: 'mall.tag/edit',
delete_url: 'mall.tag/delete', deleteUrl: 'mall.tag/delete',
export_url: 'mall.tag/export', exportUrl: 'mall.tag/export',
modify_url: 'mall.tag/modify', modifyUrl: 'mall.tag/modify',
}; };

View File

@@ -1,11 +1,11 @@
var init = { var init = {
table_elem: '#currentTable', tableElem: '#currentTable',
table_render_id: 'currentTableRenderId', tableRenderId: 'currentTableRenderId',
index_url: 'system.admin/index', indexUrl: 'system.admin/index',
add_url: 'system.admin/add', addUrl: 'system.admin/add',
edit_url: 'system.admin/edit', editUrl: 'system.admin/edit',
delete_url: 'system.admin/delete', deleteUrl: 'system.admin/delete',
modify_url: 'system.admin/modify', modifyUrl: 'system.admin/modify',
export_url: 'system.admin/export', exportUrl: 'system.admin/export',
password_url: 'system.admin/password', password_url: 'system.admin/password',
}; };

View File

@@ -1,11 +1,11 @@
var init = { var init = {
table_elem: '#currentTable', tableElem: '#currentTable',
table_render_id: 'currentTableRenderId', tableRenderId: 'currentTableRenderId',
index_url: 'system.auth/index', indexUrl: 'system.auth/index',
add_url: 'system.auth/add', addUrl: 'system.auth/add',
edit_url: 'system.auth/edit', editUrl: 'system.auth/edit',
delete_url: 'system.auth/delete', deleteUrl: 'system.auth/delete',
export_url: 'system.auth/export', exportUrl: 'system.auth/export',
modify_url: 'system.auth/modify', modifyUrl: 'system.auth/modify',
authorize_url: 'system.auth/authorize', authorize_url: 'system.auth/authorize',
}; };

View File

@@ -4,11 +4,11 @@ iconPickerFa = layui.iconPickerFa,
autocomplete = layui.autocomplete; autocomplete = layui.autocomplete;
var init = { var init = {
table_elem: '#currentTable', tableElem: '#currentTable',
table_render_id: 'currentTableRenderId', tableRenderId: 'currentTableRenderId',
index_url: 'system.menu/index', indexUrl: 'system.menu/index',
add_url: 'system.menu/add', addUrl: 'system.menu/add',
delete_url: 'system.menu/delete', deleteUrl: 'system.menu/delete',
edit_url: 'system.menu/edit', editUrl: 'system.menu/edit',
modify_url: 'system.menu/modify', modifyUrl: 'system.menu/modify',
}; };

View File

@@ -8,9 +8,9 @@ $(function () {
homdPid: 99999999, homdPid: 99999999,
treeIdName: 'id', treeIdName: 'id',
treePidName: 'pid', treePidName: 'pid',
url: ua.url(init.index_url), url: ua.url(init.indexUrl),
elem: init.table_elem, elem: init.tableElem,
id: init.table_render_id, id: init.tableRenderId,
toolbar: '#toolbar', toolbar: '#toolbar',
page: false, page: false,
skin: 'line', skin: 'line',
@@ -46,7 +46,7 @@ $(function () {
operat: [ operat: [
[{ [{
text: '添加下级', text: '添加下级',
url: init.add_url, url: init.addUrl,
method: 'open', method: 'open',
auth: 'add', auth: 'add',
class: 'layui-btn layui-btn-xs layui-btn-normal', class: 'layui-btn layui-btn-xs layui-btn-normal',
@@ -61,7 +61,7 @@ $(function () {
}, { }, {
text: '编辑', text: '编辑',
url: init.edit_url, url: init.editUrl,
method: 'open', method: 'open',
auth: 'edit', auth: 'edit',
class: 'layui-btn layui-btn-xs layui-btn-success', class: 'layui-btn layui-btn-xs layui-btn-success',
@@ -72,7 +72,7 @@ $(function () {
method: 'none', method: 'none',
auth: 'delete', auth: 'delete',
class: 'layui-btn layui-btn-xs layui-btn-danger', class: 'layui-btn layui-btn-xs layui-btn-danger',
extend: 'data-treetable-delete-item="1" data-url="' + init.delete_url + '"', extend: 'data-treetable-delete-item="1" data-url="' + init.deleteUrl + '"',
data: ['id', 'title'], data: ['id', 'title'],
_if(data) { _if(data) {
@@ -127,7 +127,7 @@ $(function () {
$('body').on('click', '[data-treetable-delete]', function () { $('body').on('click', '[data-treetable-delete]', function () {
var tableId = $(this).attr('data-treetable-delete'), var tableId = $(this).attr('data-treetable-delete'),
url = $(this).attr('data-url'); url = $(this).attr('data-url');
tableId = tableId || init.table_render_id; tableId = tableId || init.tableRenderId;
url = url != undefined ? ua.url(url) : window.location.href; url = url != undefined ? ua.url(url) : window.location.href;
var checkStatus = table.checkStatus(tableId), var checkStatus = table.checkStatus(tableId),
data = checkStatus.data; data = checkStatus.data;
@@ -154,9 +154,9 @@ $(function () {
return false; return false;
}); });
ua.table.listenSwitch({ filter: 'status', url: init.modify_url }); ua.table.listenSwitch({ filter: 'status', url: init.modifyUrl });
ua.table.listenEdit(init, 'currentTable', init.table_render_id, false); ua.table.listenEdit(init, 'currentTable', init.tableRenderId, false);
ua.listen(); ua.listen();
}); });

View File

@@ -1,9 +1,9 @@
var init = { var init = {
table_elem: '#currentTable', tableElem: '#currentTable',
table_render_id: 'currentTableRenderId', tableRenderId: 'currentTableRenderId',
index_url: 'system.node/index', indexUrl: 'system.node/index',
add_url: 'system.node/add', addUrl: 'system.node/add',
edit_url: 'system.node/edit', editUrl: 'system.node/edit',
delete_url: 'system.node/delete', deleteUrl: 'system.node/delete',
modify_url: 'system.node/modify', modifyUrl: 'system.node/modify',
}; };

View File

@@ -13,7 +13,7 @@ $(function () {
auth: 'refresh', auth: 'refresh',
class: 'layui-btn layui-btn-success layui-btn-sm', class: 'layui-btn layui-btn-success layui-btn-sm',
icon: 'fa fa-hourglass', icon: 'fa fa-hourglass',
extend: 'data-table="' + init.table_render_id + '"', extend: 'data-table="' + init.tableRenderId + '"',
}, { }, {
text: '强制更新节点', text: '强制更新节点',
title: '该操作会覆盖已存在的节点信息。<br>确定强制更新节点?', title: '该操作会覆盖已存在的节点信息。<br>确定强制更新节点?',
@@ -22,7 +22,7 @@ $(function () {
auth: 'refresh', auth: 'refresh',
class: 'layui-btn layui-btn-sm layui-btn-normal', class: 'layui-btn layui-btn-sm layui-btn-normal',
icon: 'fa fa-hourglass', icon: 'fa fa-hourglass',
extend: 'data-table="' + init.table_render_id + '"', extend: 'data-table="' + init.tableRenderId + '"',
}, { }, {
text: '清除失效节点', text: '清除失效节点',
@@ -32,7 +32,7 @@ $(function () {
auth: 'clear', auth: 'clear',
class: 'layui-btn layui-btn-sm layui-btn-danger', class: 'layui-btn layui-btn-sm layui-btn-danger',
icon: 'fa fa-trash-o', icon: 'fa fa-trash-o',
extend: 'data-table="' + init.table_render_id + '"', extend: 'data-table="' + init.tableRenderId + '"',
} }
]], ]],
cols: [[ cols: [[

View File

@@ -2,12 +2,12 @@ var iconPickerFa = layui.iconPickerFa,
autocomplete = layui.autocomplete; autocomplete = layui.autocomplete;
var init = { var init = {
table_elem: '#currentTable', tableElem: '#currentTable',
table_render_id: 'currentTableRenderId', tableRenderId: 'currentTableRenderId',
index_url: 'system.quick/index', indexUrl: 'system.quick/index',
add_url: 'system.quick/add', addUrl: 'system.quick/add',
edit_url: 'system.quick/edit', editUrl: 'system.quick/edit',
delete_url: 'system.quick/delete', deleteUrl: 'system.quick/delete',
export_url: 'system.quick/export', exportUrl: 'system.quick/export',
modify_url: 'system.quick/modify', modifyUrl: 'system.quick/modify',
}; };

View File

@@ -1,10 +1,10 @@
var init = { var init = {
table_elem: '#currentTable', tableElem: '#currentTable',
table_render_id: 'currentTableRenderId', tableRenderId: 'currentTableRenderId',
index_url: 'system.uploadfile/index', indexUrl: 'system.uploadfile/index',
add_url: 'system.uploadfile/add', addUrl: 'system.uploadfile/add',
edit_url: 'system.uploadfile/edit', editUrl: 'system.uploadfile/edit',
delete_url: 'system.uploadfile/delete', deleteUrl: 'system.uploadfile/delete',
modify_url: 'system.uploadfile/modify', modifyUrl: 'system.uploadfile/modify',
export_url: 'system.uploadfile/export', exportUrl: 'system.uploadfile/export',
}; };

View File

@@ -30,10 +30,11 @@
}); });
var init = { var init = {
table_elem: '#currentTable', tableElem: '#currentTable',
table_render_id: 'currentTableRenderId', tableRenderId: 'currentTableRenderId',
upload_url: 'ajax/upload', uploadUrl: 'ajax/upload',
upload_exts: '', uploadExts: '',
extGroup:{}
}; };
var table; var table;
@@ -78,12 +79,15 @@
} }
} }
init.upload_exts += allExtGroup.join('|');
extGroup['office'] = [].concat(extGroup['word'], extGroup['excel'], extGroup['ppt'], extGroup['pdf']); extGroup['office'] = [].concat(extGroup['word'], extGroup['excel'], extGroup['ppt'], extGroup['pdf']);
extGroup['media'] = [].concat(extGroup['image'], extGroup['music'], extGroup['video']); extGroup['media'] = [].concat(extGroup['image'], extGroup['music'], extGroup['video']);
init.uploadExts += allExtGroup.join('|');
init.extGroup = extGroup;
var admin = { var admin = {
init: init,
config: { config: {
shade: [0.02, '#000'], shade: [0.02, '#000'],
}, },
@@ -256,11 +260,11 @@
render: function (options) { render: function (options) {
options.init = options.init || init; options.init = options.init || init;
options.modifyReload = admin.parame(options.modifyReload, true); options.modifyReload = admin.parame(options.modifyReload, true);
options.elem = options.elem || options.init.table_elem; options.elem = options.elem || options.init.tableElem;
options.id = options.id || options.init.table_render_id; options.id = options.id || options.init.tableRenderId;
options.scrollPos = options.scrollPos || 'fixed'; options.scrollPos = options.scrollPos || 'fixed';
options.layFilter = options.id + '_LayFilter'; options.layFilter = options.id + '_LayFilter';
options.url = options.url || admin.url(options.init.index_url); options.url = options.url || admin.url(options.init.indexUrl);
options.headers = admin.headers(); options.headers = admin.headers();
options.page = admin.parame(options.page, true); options.page = admin.parame(options.page, true);
options.search = admin.parame(options.search, true); options.search = admin.parame(options.search, true);
@@ -437,15 +441,15 @@
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="添加" data-full="' + init.formFullScreen + '"><i class="fa fa-plus"></i> 添加</button>\n'; toolbarHtml += '<button class="layui-btn layui-btn-normal layui-btn-sm" data-open="' + init.addUrl + '" 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)) {
toolbarHtml += '<button class="layui-btn layui-btn-sm layui-btn-danger" data-url="' + init.delete_url + '" data-table-delete="' + tableId + '"><i class="fa fa-trash-o"></i> 删除</button>\n'; toolbarHtml += '<button class="layui-btn layui-btn-sm layui-btn-danger" data-url="' + init.deleteUrl + '" data-table-delete="' + tableId + '"><i class="fa fa-trash-o"></i> 删除</button>\n';
} }
} else if (v === 'export') { } else if (v === 'export') {
if (admin.checkAuth('export', elem)) { if (admin.checkAuth('export', elem)) {
toolbarHtml += '<button class="layui-btn layui-btn-sm layui-btn-success easyadmin-export-btn" data-url="' + init.export_url + '" data-table-export="' + tableId + '"><i class="fa fa-file-excel-o"></i> 导出</button>\n'; toolbarHtml += '<button class="layui-btn layui-btn-sm layui-btn-success easyadmin-export-btn" data-url="' + init.exportUrl + '" data-table-export="' + tableId + '"><i class="fa fa-file-excel-o"></i> 导出</button>\n';
} }
} else if (v === 'selectConfirm') { } else if (v === 'selectConfirm') {
toolbarHtml += '<button class="layui-btn layui-btn-sm layui-btn-success select-confirm" data-table-target="' + tableId + '"> 确定选择</button>\n'; toolbarHtml += '<button class="layui-btn layui-btn-sm layui-btn-success select-confirm" data-table-target="' + tableId + '"> 确定选择</button>\n';
@@ -633,14 +637,14 @@
return options; return options;
}, },
renderSwitch: function (cols, tableInit, tableId, modifyReload) { renderSwitch: function (cols, tableInit, tableId, modifyReload) {
tableInit.modify_url = tableInit.modify_url || false; tableInit.modifyUrl = tableInit.modifyUrl || false;
cols = cols[0] || {}; cols = cols[0] || {};
tableId = tableId || init.table_render_id; tableId = tableId || init.tableRenderId;
if (cols.length > 0) { if (cols.length > 0) {
$.each(cols, function (i, v) { $.each(cols, function (i, v) {
v.filter = v.filter || false; v.filter = v.filter || false;
if (v.filter !== false && tableInit.modify_url !== false) { if (v.filter !== false && tableInit.modifyUrl !== false) {
admin.table.listenSwitch({ filter: v.filter, url: tableInit.modify_url, tableId: tableId, modifyReload: modifyReload }); admin.table.listenSwitch({ filter: v.filter, url: tableInit.modifyUrl, tableId: tableId, modifyReload: modifyReload });
} }
}); });
} }
@@ -926,7 +930,7 @@
tool: function (data) { tool: function (data) {
var option = data.LAY_COL; var option = data.LAY_COL;
option.operat = option.operat || ['edit', 'delete']; option.operat = option.operat || ['edit', 'delete'];
var elem = option.init.table_elem || init.table_elem; var elem = option.init.tableElem || init.tableElem;
var html = ''; var html = '';
$.each(option.operat, function (i, item) { $.each(option.operat, function (i, item) {
if (typeof item === 'string') { if (typeof item === 'string') {
@@ -940,7 +944,7 @@
text: '编辑', text: '编辑',
title: '编辑信息', title: '编辑信息',
auth: 'edit', auth: 'edit',
url: option.init.edit_url, url: option.init.editUrl,
extend: option.init.formFullScreen == 'true' ? ' data-full="true"' : '' 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);
@@ -957,7 +961,7 @@
text: '删除', text: '删除',
title: '确定删除?', title: '确定删除?',
auth: 'delete', auth: 'delete',
url: option.init.delete_url, url: option.init.deleteUrl,
extend: "" extend: ""
}; };
operat.url = admin.table.toolSpliceUrl(operat.url, operat.field, data); operat.url = admin.table.toolSpliceUrl(operat.url, operat.field, data);
@@ -1114,7 +1118,7 @@
switch: function (data) { switch: function (data) {
var option = data.LAY_COL; var option = data.LAY_COL;
if (!admin.checkAuth('modify', option.init.table_elem)) { if (!admin.checkAuth('modify', option.init.tableElem)) {
return admin.table.list(data); return admin.table.list(data);
} }
@@ -1230,7 +1234,7 @@
option.filter = option.filter || ''; option.filter = option.filter || '';
option.url = option.url || ''; option.url = option.url || '';
option.field = option.field || option.filter || ''; option.field = option.field || option.filter || '';
option.tableId = option.tableId || init.table_render_id; option.tableId = option.tableId || init.tableRenderId;
option.modifyReload = option.modifyReload || false; option.modifyReload = option.modifyReload || false;
form.on('switch(' + option.filter + ')', function (obj) { form.on('switch(' + option.filter + ')', function (obj) {
var checked = obj.elem.checked ? 1 : 0; var checked = obj.elem.checked ? 1 : 0;
@@ -1298,9 +1302,9 @@
}); });
}, },
listenEdit: function (tableInit, layFilter, tableId, modifyReload) { listenEdit: function (tableInit, layFilter, tableId, modifyReload) {
tableInit.modify_url = tableInit.modify_url || false; tableInit.modifyUrl = tableInit.modifyUrl || false;
tableId = tableId || init.table_render_id; tableId = tableId || init.tableRenderId;
if (tableInit.modify_url !== false) { if (tableInit.modifyUrl !== false) {
table.on('edit(' + layFilter + ')', function (obj) { table.on('edit(' + layFilter + ')', function (obj) {
var value = obj.value, var value = obj.value,
data = obj.data, data = obj.data,
@@ -1312,7 +1316,7 @@
value: value, value: value,
}; };
admin.request.post({ admin.request.post({
url: tableInit.modify_url, url: tableInit.modifyUrl,
prefix: true, prefix: true,
data: _data, data: _data,
}, function (res) { }, function (res) {
@@ -1547,7 +1551,7 @@
tableId = $(this).attr('data-table'); tableId = $(this).attr('data-table');
if (checkbox === 'true') { if (checkbox === 'true') {
tableId = tableId || init.table_render_id; tableId = tableId || init.tableRenderId;
var checkStatus = table.checkStatus(tableId), var checkStatus = table.checkStatus(tableId),
data = checkStatus.data; data = checkStatus.data;
if (data.length <= 0) { if (data.length <= 0) {
@@ -1658,7 +1662,7 @@
$('body').on('click', '[data-table-refresh]', function () { $('body').on('click', '[data-table-refresh]', function () {
var tableId = $(this).attr('data-table-refresh'); var tableId = $(this).attr('data-table-refresh');
if (tableId === undefined || tableId === '' || tableId == null) { if (tableId === undefined || tableId === '' || tableId == null) {
tableId = init.table_render_id; tableId = init.tableRenderId;
} }
table.reloadData(tableId); table.reloadData(tableId);
}); });
@@ -1667,7 +1671,7 @@
$('body').on('click', '[data-table-reset]', function () { $('body').on('click', '[data-table-reset]', function () {
var tableId = $(this).attr('data-table-reset'); var tableId = $(this).attr('data-table-reset');
if (tableId === undefined || tableId === '' || tableId == null) { if (tableId === undefined || tableId === '' || tableId == null) {
tableId = init.table_render_id; tableId = init.tableRenderId;
} }
var where = { var where = {
filter: '{}', filter: '{}',
@@ -1702,7 +1706,7 @@
var postData = {}; var postData = {};
if (checkbox === 'true') { if (checkbox === 'true') {
tableId = tableId || init.table_render_id; tableId = tableId || init.tableRenderId;
var checkStatus = table.checkStatus(tableId), var checkStatus = table.checkStatus(tableId),
data = checkStatus.data; data = checkStatus.data;
if (data.length <= 0) { if (data.length <= 0) {
@@ -1725,7 +1729,7 @@
}, function (res) { }, function (res) {
admin.msg.success(res.msg, function () { admin.msg.success(res.msg, function () {
if (endMethod == 'reload-table') { if (endMethod == 'reload-table') {
tableId = tableId || init.table_render_id; tableId = tableId || init.tableRenderId;
table.reloadData(tableId); table.reloadData(tableId);
} else if (endMethod == 'refresh-page') { } else if (endMethod == 'refresh-page') {
location.reload(); location.reload();
@@ -1742,7 +1746,7 @@
$('body').on('click', '[data-table-delete]', function () { $('body').on('click', '[data-table-delete]', function () {
var tableId = $(this).attr('data-table-delete'), var tableId = $(this).attr('data-table-delete'),
url = $(this).attr('data-url'); url = $(this).attr('data-url');
tableId = tableId || init.table_render_id; tableId = tableId || init.tableRenderId;
url = url !== undefined ? admin.url(url) : window.location.href; url = url !== undefined ? admin.url(url) : window.location.href;
var checkStatus = table.checkStatus(tableId), var checkStatus = table.checkStatus(tableId),
data = checkStatus.data; data = checkStatus.data;
@@ -1800,7 +1804,7 @@
option.refreshTable = option.refreshTable || false; option.refreshTable = option.refreshTable || false;
option.refreshFrame = option.refreshFrame || false; option.refreshFrame = option.refreshFrame || false;
if (option.refreshTable === true) { if (option.refreshTable === true) {
option.refreshTable = init.table_render_id; option.refreshTable = init.tableRenderId;
} }
var index = parent.layer.getFrameIndex(window.name); var index = parent.layer.getFrameIndex(window.name);
parent.layer.close(index); parent.layer.close(index);
@@ -2016,7 +2020,7 @@
var elemFilenameField = "input[name='" + uploadFilenameField + "']"; var elemFilenameField = "input[name='" + uploadFilenameField + "']";
} }
if (uploadExts == '*') { if (uploadExts == '*') {
uploadExts = init.upload_exts; uploadExts = init.uploadExts;
} else if (uploadExts.charAt(0) == '*') { } else if (uploadExts.charAt(0) == '*') {
var extGroupName = uploadExts.slice(1); var extGroupName = uploadExts.slice(1);
if (extGroup[extGroupName]) { if (extGroup[extGroupName]) {
@@ -2027,7 +2031,7 @@
// 监听上传事件 // 监听上传事件
upload.render({ upload.render({
elem: this, elem: this,
url: admin.url(init.upload_url), url: admin.url(init.uploadUrl),
exts: uploadExts, exts: uploadExts,
accept: uploadAccept,//指定允许上传时校验的文件类型 accept: uploadAccept,//指定允许上传时校验的文件类型
acceptMime: uploadAcceptMime,//规定打开文件选择框时,筛选出的文件类型 acceptMime: uploadAcceptMime,//规定打开文件选择框时,筛选出的文件类型