You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
116 lines
3.6 KiB
116 lines
3.6 KiB
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title></title>
|
|
<link rel="stylesheet" href="../../../component/pear/css/pear.css" />
|
|
<style>
|
|
.layui-input-block {
|
|
margin-left: 80px;
|
|
min-height: 36px;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<form class="layui-form" action="">
|
|
<div class="mainBox">
|
|
<div class="main-container">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label" style="width: 50px !important;"><span
|
|
class="require-star"></span>描述:</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="memo" name="memo" autocomplete="off" placeholder="请输入描述"
|
|
class="layui-input input-width">
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="bottom">
|
|
<div class="button-container">
|
|
<button type="submit" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit="" lay-filter="save">
|
|
<i class="layui-icon layui-icon-ok"></i>
|
|
提交
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
|
|
|
|
<script src="../../../component/layui/layui.js"></script>
|
|
<script src="../../../component/pear/pear.js"></script>
|
|
|
|
<script>
|
|
layui.use(['table', 'form', 'jquery', 'common', 'laytpl'], function () {
|
|
var table = layui.table;
|
|
var form = layui.form;
|
|
var $ = layui.jquery;
|
|
var common = layui.common;
|
|
var laytpl = layui.laytpl;
|
|
|
|
var tableName = GetQueryString("table_name");
|
|
|
|
$.ajax({
|
|
type: "GET",
|
|
async: false,
|
|
url: "/dsBase/dataShare/getTable?table_name=" + tableName,
|
|
success: function (res) {
|
|
$("#memo").val(res.memo);
|
|
}
|
|
});
|
|
|
|
|
|
|
|
form.on('submit(save)', function (data) {
|
|
data.field['table_name'] = tableName;
|
|
$.ajax({
|
|
url: '/dsBase/dataShare/updateTable',
|
|
data: data.field,
|
|
type: 'post',
|
|
success: function (result) {
|
|
if (result.success) {
|
|
layer.msg("修改成功!", {
|
|
icon: 1,
|
|
time: 1300
|
|
}, function () {
|
|
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
|
parent.layui.table.reload("data-table");
|
|
});
|
|
} else {
|
|
layer.msg(result.message, {
|
|
icon: 2,
|
|
time: 2000
|
|
});
|
|
}
|
|
}
|
|
});
|
|
return false;
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function GetQueryString(name, istop) {
|
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
|
var r = window.location.search.substr(1).match(reg);
|
|
if (typeof (istop) != "undefined") r = top.location.search.substr(1).match(reg);
|
|
|
|
if (r != null) return unescape(r[2]);
|
|
return null;
|
|
}
|
|
|
|
});
|
|
</script>
|
|
</body>
|
|
|
|
</html> |