save
This commit is contained in:
parent
e5fdfc2bc4
commit
22b9b7bf71
@ -12,8 +12,6 @@ use plugin\admin\app\model\Option;
|
||||
use Support\Exception\BusinessException;
|
||||
use Support\Request;
|
||||
use support\Response;
|
||||
use function config;
|
||||
use function json;
|
||||
|
||||
class TableController extends Base
|
||||
{
|
||||
|
@ -116,8 +116,6 @@
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- 表单属性 -->
|
||||
<div class="layui-tab-item">
|
||||
|
||||
@ -219,7 +217,7 @@
|
||||
<script src="/app/admin/component/pear/pear.js"></script>
|
||||
<script>
|
||||
|
||||
let create_api = '/app/admin/table/create';
|
||||
const CREATE_API = '/app/admin/table/create';
|
||||
|
||||
// 字段设置
|
||||
layui.use(['table', 'common', 'popup'], function () {
|
||||
@ -721,7 +719,7 @@
|
||||
syncTableData();
|
||||
let data = layui.form.val('create-table-form');
|
||||
layui.jquery.ajax({
|
||||
url: create_api,
|
||||
url: CREATE_API,
|
||||
type: 'POST',
|
||||
dateType: 'json',
|
||||
data: data,
|
||||
@ -739,8 +737,6 @@
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
@ -69,7 +69,7 @@
|
||||
<script src="/app/admin/component/pear/pear.js"></script>
|
||||
<script>
|
||||
|
||||
let crud_api = "/app/admin/table/crud";
|
||||
const CRUD_API = "/app/admin/table/crud";
|
||||
|
||||
layui.use(['jquery', 'xmSelect'], function() {
|
||||
layui.jquery.ajax({
|
||||
@ -106,7 +106,7 @@
|
||||
//提交事件
|
||||
layui.form.on('submit(save)', function (data) {
|
||||
layui.jquery.ajax({
|
||||
url: crud_api,
|
||||
url: CRUD_API,
|
||||
type: 'POST',
|
||||
dateType: 'json',
|
||||
data: data.field,
|
||||
|
@ -37,13 +37,13 @@
|
||||
<script src="/app/admin/component/pear/pear.js"></script>
|
||||
<script>
|
||||
|
||||
// 相关接口
|
||||
const SELECT_API = "/app/admin/table/show";
|
||||
let drop_api = "/app/admin/table/drop";
|
||||
|
||||
let view_url = "/app/admin/table/view";
|
||||
let create_url = "/app/admin/table/create";
|
||||
let modify_url = "/app/admin/table/modify";
|
||||
let crud_url = "/app/admin/table/crud";
|
||||
const DROP_API = "/app/admin/table/drop";
|
||||
const VIEW_URL = "/app/admin/table/view";
|
||||
const CREATE_URL = "/app/admin/table/create";
|
||||
const MODIFY_URL = "/app/admin/table/modify";
|
||||
const CRUD_URL = "/app/admin/table/crud";
|
||||
|
||||
layui.use(['table', 'form', 'jquery', 'common', 'popup'], function() {
|
||||
let table = layui.table;
|
||||
@ -58,7 +58,7 @@
|
||||
title: '表名',
|
||||
field: 'TABLE_NAME',
|
||||
templet: function (d) {
|
||||
return '<a class="tab-link" src="' + view_url + '?table=' + d.TABLE_NAME + '">' + d.TABLE_NAME + '</a>';
|
||||
return '<a class="tab-link" src="' + VIEW_URL + '?table=' + d.TABLE_NAME + '">' + d.TABLE_NAME + '</a>';
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -151,7 +151,7 @@
|
||||
shade: 0.1,
|
||||
maxmin: true,
|
||||
area: [common.isModile()?'100%':'98%', common.isModile()?'100%':'95%'],
|
||||
content: create_url
|
||||
content: CREATE_URL
|
||||
});
|
||||
}
|
||||
|
||||
@ -163,7 +163,7 @@
|
||||
shade: 0.1,
|
||||
maxmin: true,
|
||||
area: [common.isModile()?'100%':'98%', common.isModile()?'100%':'95%'],
|
||||
content: modify_url + '?table=' + table
|
||||
content: MODIFY_URL + '?table=' + table
|
||||
});
|
||||
}
|
||||
|
||||
@ -175,7 +175,7 @@
|
||||
shade: 0.1,
|
||||
maxmin: true,
|
||||
area: [common.isModile()?'100%':'500px', common.isModile()?'100%':'500px'],
|
||||
content: crud_url + '?table=' + table
|
||||
content: CRUD_URL + '?table=' + table
|
||||
});
|
||||
}
|
||||
|
||||
@ -200,7 +200,7 @@
|
||||
layer.close(index);
|
||||
let loading = layer.load();
|
||||
$.ajax({
|
||||
url: drop_api,
|
||||
url: DROP_API,
|
||||
data: {tables: tables},
|
||||
dataType: 'json',
|
||||
type: 'post',
|
||||
|
@ -34,7 +34,7 @@
|
||||
<script src="/app/admin/component/pear/pear.js"></script>
|
||||
<script>
|
||||
|
||||
const INSERT_URL = "/app/admin/table/insert";
|
||||
const INSERT_API = "/app/admin/table/insert";
|
||||
|
||||
<?=$form->js(3)?>
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
//提交事件
|
||||
layui.form.on('submit(save)', function (data) {
|
||||
layui.jquery.ajax({
|
||||
url: INSERT_URL,
|
||||
url: INSERT_API,
|
||||
type: 'POST',
|
||||
dateType: 'json',
|
||||
data: data.field,
|
||||
|
@ -221,14 +221,14 @@
|
||||
<script src="/app/admin/component/pear/pear.js"></script>
|
||||
<script>
|
||||
|
||||
let modify_api = '/app/admin/table/modify';
|
||||
let schema_api = '/app/admin/table/schema';
|
||||
let table_name = '<?=htmlspecialchars($table)?>';
|
||||
const MODIFY_API = '/app/admin/table/modify';
|
||||
const SCHEMA_API = '/app/admin/table/schema';
|
||||
const TABLE_NAME = '<?=htmlspecialchars($table)?>';
|
||||
|
||||
layui.use(['jquery'], function () {
|
||||
let $ = layui.jquery;
|
||||
$.ajax({
|
||||
url: schema_api + '?table=' + table_name,
|
||||
url: SCHEMA_API + '?table=' + TABLE_NAME,
|
||||
dataType: 'json',
|
||||
success: function (res) {
|
||||
// 表信息
|
||||
@ -681,7 +681,7 @@
|
||||
syncTableData();
|
||||
let data = layui.form.val('create-table-form');
|
||||
layui.jquery.ajax({
|
||||
url: modify_api,
|
||||
url: MODIFY_API,
|
||||
type: 'POST',
|
||||
dateType: 'json',
|
||||
data: data,
|
||||
|
Loading…
Reference in New Issue
Block a user