diff --git a/js/pages/newDataAnalysis/projectManagement.js b/js/pages/newDataAnalysis/projectManagement.js index 825ba16..dbc38b2 100644 --- a/js/pages/newDataAnalysis/projectManagement.js +++ b/js/pages/newDataAnalysis/projectManagement.js @@ -75,6 +75,16 @@ function initTable(type, bidCode) { }, done: function (res, curr, count, origin) { // console.log(res); + + $(".layui-table-body table.layui-table tbody tr #exportBtn").on( + "click", + function () { + // 获取当前行的数据 + var index = $(this).index(); + var rowData = res.rows[index]; // 获取对应行的数据 + console.log(rowData, "rowData导出"); + } + ); }, }); diff --git a/js/pages/newDataAnalysis/projectProgress.js b/js/pages/newDataAnalysis/projectProgress.js index 9b1d63d..a30de1a 100644 --- a/js/pages/newDataAnalysis/projectProgress.js +++ b/js/pages/newDataAnalysis/projectProgress.js @@ -26,7 +26,16 @@ function setCols(type) { { field: "processDiff", title: "进度偏差", align: "center" }, { field: "completeEffort", title: "已完成工程量", align: "center" }, { field: "totalEffort", title: "总工程量", align: "center" }, - { field: "delayActor", title: "延误因素分析", align: "center" }, + { + title: "延误因素分析", + align: "center", + templet: (d) => { + let text = ""; + text += + '查看'; + return text; + }, + }, { field: "resourceMatchStatus", title: "资源匹配状态", @@ -114,6 +123,64 @@ function initTable(type, bidCode) { if (res.code !== 200 || !res.rows || res.rows.length === 0) { layer.msg("暂无数据", { icon: 2 }); } + + // 查看按钮点击 + $(".layui-table-body table.layui-table tbody tr #viewBtn").on( + "click", + function () { + // 获取当前行的数据 + var index = $(this).index(); + var rowData = res.rows[index]; // 获取对应行的数据 + + // 弹框配置 + layer.open({ + type: 1, + title: "分析查看", + content: + "
" + + "
延误原因:" + + rowData.delayActor + + "
" + + "
其他原因:" + + rowData.delayActor + + "
" + + "
分析结果:" + + rowData.delayActor + + "
" + + "
分析结论:" + + rowData.delayActor + + "
" + + "
", + area: ["600px", "auto"], + shade: 0.3, // 遮罩透明度 + skin: "custom-layer-style", // 自定义皮肤 + success: function (layero, index) { + // 修改弹框背景颜色 + $(layero).css( + "background", + "rgba(13, 34, 37, 0.9)" + ); // 半透明黑色背景 + $(layero).find(".layui-layer-title").css({ + fontSize: "18px", + color: "#fff", // 标题文字颜色 + background: "transparent", // 标题背景透明 + "border-bottom": + "1px solid rgba(255, 255, 255, 0.2)", // 标题底部边框 + }); + $(layero).find(".layui-layer-content").css({ + background: "transparent", // 内容区域透明 + }); + + $(layero) + .find(".layui-layer-setwin .layui-layer-close") + .css({ + color: "#fff", // 文字颜色 + "border-color": "#fff", // 边框颜色(如果按钮有边框) + }); + }, + }); + } + ); }, error: function () { layer.msg("数据加载失败", { icon: 2 }); @@ -121,6 +188,8 @@ function initTable(type, bidCode) { }); } +$(".chart-box").hide(); + $(".list-view").click(function () { if ($(this).hasClass("active")) return; @@ -255,6 +324,11 @@ function initPieChart() { top: "center", // 垂直居中 textStyle: { color: "#fff", // 图例文字颜色设为白色 + borderWidth: 0, + borderColor: "transparent", + }, + itemStyle: { + borderWidth: 0, // 关键点:去除 legend 图例项(小色块)的边框 }, data: ["大气影响", "设备判断延迟", "人员不足", "设计变更", "其他"], }, @@ -273,8 +347,8 @@ function initPieChart() { }, itemStyle: { borderRadius: 5, // 每块扇形圆角效果 - borderColor: "#000", // 边框颜色(用于间隙) - borderWidth: 1, // 边框宽度(1px 每边,形成 2px 间隙) + borderColor: "#333", // 边框颜色(用于间隙) + borderWidth: 2, // 边框宽度(1px 每边,形成 2px 间隙) }, data: [ {