7e47ce238b
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
91 lines
3.3 KiB
HTML
91 lines
3.3 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="renderer" content="webkit">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
<title>数据导出-e订通后台</title>
|
|
<link rel="stylesheet" href="layuiadmin/layui/css/layui.css">
|
|
<link rel="stylesheet" href="index.css">
|
|
<script src="layuiadmin/layui/layui.js"></script>
|
|
<script src="js/function.js"></script>
|
|
</head>
|
|
<body>
|
|
<form class="layui-form" name="form1" action="./index.php" method="get">
|
|
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
|
|
<legend>说明</legend>
|
|
</fieldset>
|
|
<blockquote class="layui-elem-quote"><ul><li>数据导出功能是将服务器上的数据库下载到本地保存(文件后缀为.sql),该文件可用“数据库导入”功能或 phpMyAdmin 导入。</li><li>如果数据库较大,请耐心等待,下载。</li><li>为保证日志的连续性,日志表将不作备份或导入。</li></ul></blockquote>
|
|
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
|
|
<legend>数据导出</legend>
|
|
</fieldset>
|
|
<input type="hidden" id="_m" name="_m" value="database_export">
|
|
<input type="hidden" id="_a" name="_a" value="export_do">
|
|
<input type='checkbox' id='c_all' lay-filter="c_all" lay-skin="primary" checked><label for='col_main'>选择数据表</label> <input type='checkbox' id='structure_only' name='structure_only' value='y' lay-skin="primary"><label for='structure_only'>仅结构</label> <input type='checkbox' id='merged' name='merged' value='y' lay-skin="primary"><label for='merged'>可合并的</label>
|
|
<hr>
|
|
<blockquote class="layui-elem-quote">
|
|
<div id="div_select_col"></div>
|
|
</blockquote>
|
|
<div class=\"anniu\" style="padding-left:20px;">
|
|
<button id="form1_submit" class="layui-btn layui-btn-normal" lay-submit lay-filter="form1_submit"> 导出 </button>
|
|
</div>
|
|
<script>
|
|
layui.use(['form','layer','upload','jquery'],function(){
|
|
|
|
|
|
var form = layui.form,
|
|
layer = parent.layer === undefined ? layui.layer : top.layer,
|
|
laydate = layui.laydate,
|
|
$ = layui.jquery;
|
|
var url="./?_m=database_export";
|
|
$.ajax(
|
|
{
|
|
url:url,
|
|
contentType: "application/json",
|
|
method: 'POST',
|
|
success: function (res) {
|
|
var json_data=$.parseJSON(res);
|
|
//alert(JSON.stringify(json_data));
|
|
//加载选择字段的内容
|
|
var html1='';
|
|
for(var j=0;j<json_data.col.length;j++){
|
|
html1+='<input type="checkbox" class="xx" name=tables[] id="col_'+json_data.col[j].k+'" lay-skin="primary" value="'+json_data.col[j].t+'" checked />'+json_data.col[j].t+'<br>';
|
|
}
|
|
$("#div_select_col").html(html1);
|
|
form.render();
|
|
},
|
|
error: function () {
|
|
layui.layer.msg("与服务器通信失败!");
|
|
}
|
|
}
|
|
);
|
|
form.on('checkbox(t_main)', function(data){
|
|
console.log(data.elem);
|
|
});
|
|
//提交
|
|
form.on("submit(form1_submit)",function(data){
|
|
//弹出loading
|
|
//alert(JSON.stringify(data.field));
|
|
var index = layer.load(2, {time: 2*1000});
|
|
//提交
|
|
return true;
|
|
})
|
|
|
|
form.on('checkbox(c_all)', function (data) {
|
|
var a = data.elem.checked;
|
|
if (a == true) {
|
|
$(".xx").prop("checked", true);
|
|
form.render('checkbox');
|
|
}
|
|
else {
|
|
$(".xx").prop("checked", false);
|
|
form.render('checkbox');
|
|
}
|
|
});
|
|
|
|
});
|
|
</script>
|
|
</form>
|
|
</body>
|
|
</html>
|