parent
188d289f05
commit
6513cb239f
@ -0,0 +1,133 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title></title>
|
||||
<link href="../js/layui/css/layui.css" rel="stylesheet">
|
||||
<style>
|
||||
.require-star {
|
||||
position: absolute;
|
||||
width: 3px;
|
||||
height: 14px;
|
||||
background-color: #ea4335;
|
||||
top: 12px;
|
||||
right: 8px;
|
||||
border-radius: 1.5px;
|
||||
}
|
||||
|
||||
.input-width {
|
||||
max-width: 455px
|
||||
}
|
||||
|
||||
.mainBox {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
bottom: 50px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.main-container {
|
||||
margin: 15px;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
background-color: #F8F8F8;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
|
||||
.button-container {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
}
|
||||
</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: auto;"><span class="require-star"></span>文件名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="fileName" lay-verify="required" autocomplete="off" placeholder="请输入文件名称"
|
||||
class="layui-input input-width">
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label" style="width: auto;"><span
|
||||
class="require-star"></span>上传数据文件</label>
|
||||
<div class="layui-input-block">
|
||||
<button type="button" class="layui-btn layui-btn-normal"
|
||||
id="ID-upload-demo-choose">选择数据文件</button>
|
||||
</div>
|
||||
<!-- <button type="button" class="layui-btn" id="ID-upload-demo-action">开始上传</button> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="button-container">
|
||||
<button type="button" class="layui-btn layui-btn-sm" id="ID-upload-demo-action">
|
||||
<i class="layui-icon layui-icon-upload-drag"></i>
|
||||
上传
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script src="../js/layui/layui.js"></script>
|
||||
|
||||
<script>
|
||||
layui.use(function () {
|
||||
var form = layui.form;
|
||||
var $ = layui.jquery;
|
||||
var laytpl = layui.laytpl;
|
||||
var upload = layui.upload;
|
||||
|
||||
var id = GetQueryString("id");
|
||||
|
||||
upload.render({
|
||||
elem: '#ID-upload-demo-choose',
|
||||
url: '/dsBase/dataease/uploadExcelByCity',
|
||||
data: {
|
||||
id,
|
||||
},
|
||||
accept: "file",
|
||||
exts: "xls|xlsx",
|
||||
auto: false,
|
||||
bindAction: '#ID-upload-demo-action',
|
||||
done: function (res) {
|
||||
layer.msg("上传成功!", {
|
||||
icon: 1,
|
||||
time: 1300
|
||||
}, function () {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
parent.layui.table.reload("data-table");
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
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>
|
||||
<script>
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in new issue