增加密码本上传功能
This commit is contained in:
parent
5fddd90564
commit
5a95da724d
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>评价模板配置</title>
|
<title>评价模板配置</title>
|
||||||
<link rel="stylesheet" href="../../../layui/css/layui.css"/>
|
<link rel="stylesheet" href="../../../layui/css/layui.css" />
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.widget-toolbar a {
|
.widget-toolbar a {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
|
@ -26,7 +26,8 @@
|
||||||
.ui-state-focus {
|
.ui-state-focus {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
.layui-btn{
|
|
||||||
|
.layui-btn {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -36,24 +37,47 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 7px;
|
padding: 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.password-book-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.password-book-item span {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.password-book-item span:last-child {
|
||||||
|
cursor: pointer;
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="layui-container" style="width: 100%;height: 100%;padding: 10px">
|
<div class="layui-container" style="width: 100%;height: 100%;padding: 10px">
|
||||||
<form id="baseForm" class="layui-form" method="POST" onsubmit="return false;">
|
<form id="baseForm" class="layui-form" method="POST" onsubmit="return false;">
|
||||||
<div>人员密码本:</div>
|
<div>人员密码本:</div>
|
||||||
|
<div class="password-book-list">
|
||||||
|
<!-- <div class="password-book-item">
|
||||||
|
<span>密码1</span>
|
||||||
|
<span>删除</span>
|
||||||
|
</div> -->
|
||||||
|
</div>
|
||||||
<button class="layui-btn" title="上传" type="button" id="upload-btn">上传</button>
|
<button class="layui-btn" title="上传" type="button" id="upload-btn">上传</button>
|
||||||
<button class="layui-btn" title="查看" type="button" onclick="viewBook(2)">查看</button>
|
<!-- <button class="layui-btn" title="查看" type="button" onclick="viewBook(2)">查看</button> -->
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script src="../../../js/publicJs.js"></script>
|
<script src="../../../js/publicJs.js"></script>
|
||||||
<script type="text/javascript" src="../../../js/libs/jquery-2.1.1.min.js"></script>
|
<script type="text/javascript" src="../../../js/libs/jquery-2.1.1.min.js"></script>
|
||||||
<script type="text/javascript" src="../../../js/jq.js"></script>
|
<script type="text/javascript" src="../../../js/jq.js"></script>
|
||||||
<script type="text/javascript" src="../../../js/my/permission.js"></script>
|
<script type="text/javascript" src="../../../js/my/permission.js"></script>
|
||||||
<script src="../../../layui/layui.js"></script>
|
<script src="../../../layui/layui.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
let layer, laydate, table;
|
let layer, laydate, table;
|
||||||
let obj = {};
|
let obj = {};
|
||||||
$(function () {
|
$(function () {
|
||||||
|
|
@ -74,15 +98,21 @@
|
||||||
multiple: false,
|
multiple: false,
|
||||||
done: function (res) {
|
done: function (res) {
|
||||||
// 上传完毕回调
|
// 上传完毕回调
|
||||||
console.log(res,'上传成功')
|
console.log(res, '上传成功')
|
||||||
debugger
|
debugger
|
||||||
if (res.code === 0) { // 假设返回数据中有code字段,0表示成功
|
if (res.code === 0) { // 假设返回数据中有code字段,0表示成功
|
||||||
// 在"人员密码本"后面添加文件名
|
|
||||||
$("form#baseForm div:first").append(
|
|
||||||
'<span style="margin-left: 10px; color: #1761c1;">' +
|
console.log(res, 'res.message')
|
||||||
res.message +
|
|
||||||
'</span>'
|
// $('.password-book-list').append(
|
||||||
);
|
// '<div class="password-book-item">' +
|
||||||
|
// '<span>' + res.message + '</span>' +
|
||||||
|
// '<span>删除</span>' +
|
||||||
|
// '</div>'
|
||||||
|
// );
|
||||||
|
|
||||||
|
getUploadFile()
|
||||||
layer.msg('上传成功');
|
layer.msg('上传成功');
|
||||||
} else {
|
} else {
|
||||||
layer.msg(res.resMsg || '上传失败');
|
layer.msg(res.resMsg || '上传失败');
|
||||||
|
|
@ -94,10 +124,21 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 获取上传的文件
|
||||||
|
function getUploadFile() {
|
||||||
|
$.ajax({
|
||||||
|
url: ctxPath + '/upload/getFile',
|
||||||
|
type: 'GET',
|
||||||
|
success: function (res) {
|
||||||
|
console.log(res, 'res文件列表')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
Loading…
Reference in New Issue