Compare commits

...

5 Commits

2 changed files with 56 additions and 14 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

@ -8,7 +8,7 @@
<link rel="stylesheet" href="../../plugin/layui-v2.9.7/layui/css/layui.css">
<link rel="stylesheet" href="../../css/dataAnalysis/dataAnalysis.css">
<link rel="stylesheet" href="../../css/shuiYin/shuiYin.css">
<link rel="stylesheet" href="../../css/coreTable.css" />
<link rel="stylesheet" href="../../css/coreTable.css"/>
<link rel="stylesheet" href="../../css/accessMge/accessMge.css">
<script src="../../js/publics/sm4.js" type="text/javascript"></script>
<script src="../../js/publics/jquery-3.6.0.min.js" type="text/javascript"></script>
@ -29,21 +29,22 @@
</script>
<body>
<div id="proQuality">
<div id="proQuality">
<div class="leftBox">
<table id="demo2" lay-filter="test"></table>
</div>
<div class="leftBox">
<button class="layui-btn" onclick="upload(1)" id="uploadBtn">上传</button>
<table id="demo2" lay-filter="test"></table>
</div>
<div class="rightBox" id="rightLineBox">
</div>
<div class="rightBox" id="rightLineBox">
</div>
<!-- <div id="oneEcharts">
</div> -->
</div>
<!-- <div id="oneEcharts">
</div> -->
</body>
@ -62,11 +63,19 @@
display: flex;
}
#rightLineBox {
margin-top: 100px;
}
.leftBox {
width: 75%;
}
#uploadBtn{
margin-top: 40px;
margin-bottom: -14px;
margin-left: 20px;
}
.rightBox {
width: 25%;
height: 500px;