From ebdad1c997a7fb09b191e5212559bb7d74d1dfe4 Mon Sep 17 00:00:00 2001
From: "liang.chao" <1360241448@qq.com>
Date: Fri, 23 May 2025 15:42:07 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=AF=86=E7=A0=81=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../passwordBook/personnelPasswordBook.html | 45 ++++++++++++++++---
1 file changed, 38 insertions(+), 7 deletions(-)
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('请求失败')
+ }
+ })
+ })
});