diff --git a/src/main/resources/static/pages/evaluate/passwordBook/personnelPasswordBook.html b/src/main/resources/static/pages/evaluate/passwordBook/personnelPasswordBook.html
index b713234..eda1af4 100644
--- a/src/main/resources/static/pages/evaluate/passwordBook/personnelPasswordBook.html
+++ b/src/main/resources/static/pages/evaluate/passwordBook/personnelPasswordBook.html
@@ -43,7 +43,7 @@
@@ -57,12 +57,43 @@
let layer, laydate, table;
let obj = {};
$(function () {
- layui.use(['layer', 'laydate', 'table'], function () {
- layer = layui.layer;
- laydate = layui.laydate;
- table = layui.table;
- initTable();
- });
+ // layui.use(['layer', 'laydate', 'table'], function () {
+ // layer = layui.layer;
+ // laydate = layui.laydate;
+ // table = layui.table;
+ // initTable();
+ // });
+
+ layui.use('upload', function () {
+ var upload = layui.upload;
+ // 执行上传功能
+ var uploadInst = upload.render({
+ elem: '#upload-btn',
+ url: ctxPath + '/upload/file',
+ accept: 'file',
+ multiple: false,
+ done: function (res) {
+ // 上传完毕回调
+ console.log(res,'上传成功')
+ debugger
+ if (res.code === 0) { // 假设返回数据中有code字段,0表示成功
+ // 在"人员密码本"后面添加文件名
+ $("form#baseForm div:first").append(
+ '
' +
+ res.message +
+ ''
+ );
+ layer.msg('上传成功');
+ } else {
+ layer.msg(res.resMsg || '上传失败');
+ }
+ },
+ error: function () {
+
+ layer.msg('请求失败')
+ }
+ })
+ })
});