代码提交

This commit is contained in:
liang.chao 2025-07-24 13:34:17 +08:00
parent dced4092de
commit a2bdda9a96
2 changed files with 42 additions and 4 deletions

View File

@ -161,7 +161,7 @@ function initTable(type, bidCode) {
// { field: 'contractorName', title: '承包商名称', align: 'center',},
// { field: 'qualityLevel', title: '质量等级', align: 'center'},
{ field: "projectManager", title: "项目经理", align: "center" },
{ field: "team", title: "专业队伍", align: "center" },
{ field: "team", title: "施工队伍", align: "center" },
{ field: "startTime", title: "开始时间", align: "center" },
{ field: "checkNum", title: "检查数量", align: "center" },
{ field: "passNum", title: "合格数量", align: "center" },
@ -172,7 +172,7 @@ function initTable(type, bidCode) {
title: "不合格原因",
align: "center",
},
{
/* {
title: "操作",
align: "center",
templet: function (row) {
@ -183,7 +183,7 @@ function initTable(type, bidCode) {
</button>
`;
},
},
},*/
];
}
}
@ -200,6 +200,39 @@ function initEcharts(data) {
initEchartsTwo(data);
}
layui.use('upload', function () {
var upload = layui.upload;
// 执行上传
upload.render({
elem: '#uploadBtn', // 绑定元素
url: commonUrl + "screen/largeScreen/dataAnalysis/uploadProQuality",
accept: 'file', // 允许上传任意文件
exts: 'docx', // 允许的文件类型
size: 1024 * 10, // 限制文件大小,单位 KB10MB
headers: {
decrypt: "decrypt",
Authorization: token,
},
before: function (obj) {
// 上传前回调
layer.msg('上传中...', { icon: 16, time: 0 });
},
done: function (res) {
// 上传完成后回调(成功)
layer.closeAll('loading');
layer.msg('上传成功');
console.log('服务器返回:', res);
// 显示文件名或路径
document.getElementById('fileName').innerText = '已上传文件:' + res.fileName;
},
error: function () {
// 上传失败回调
layer.msg('上传失败', { icon: 5 });
}
});
});
function initEchartsOne(passRate, noPassRate) {
// 从传入的数据中提取 passRate 和 noPassRate并转为数字

View File

@ -33,6 +33,7 @@
<div class="leftBox">
<button class="layui-btn" onclick="upload(1)" id="uploadBtn">上传</button>
<table id="demo2" lay-filter="test"></table>
</div>
@ -70,7 +71,11 @@
width: 75%;
}
#uploadBtn{
margin-top: 40px;
margin-bottom: -14px;
margin-left: 20px;
}
.rightBox {
width: 25%;
height: 500px;