hn_cloud_web/czl-screen/pages/home/preReleaseResourceList.html

229 lines
8.3 KiB
HTML
Raw Permalink Normal View History

2025-11-27 16:55:35 +08:00
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
<meta charset="UTF-8">
<title>预释放资源列表</title>
<link rel="stylesheet" type="text/css" media="screen" href="../../layui/css/layui.css">
<link rel="stylesheet" href="../../css/mainList.css">
</head>
<style type="text/css">
/*.table-bordered, .table-bordered>tbody>tr>td, .table-bordered>tbody>tr>th, .table-bordered>tfoot>tr>td, .table-bordered>tfoot>tr>th, .table-bordered>thead>tr>td, .table-bordered>thead>tr>th {*/
/* border: 0px solid #ddd;*/
/*}*/
th {
text-align: center;
}
.layui-table-tool {
display: none;
}
.layui-table thead th {
background-color: #0A2559;
color: white;
border: 0px;
}
.layui-table-cell {
color: white;
}
/*.layui-laydate-content>table>tbody>tr>td{*/
/* background-color: white;*/
/*}*/
#layui-laydate1 {
left: 534.578px;
top: 171.484px;
background: #020B31;
color: white;
}
.laydate-footer-btns span {
height: 26px;
line-height: 26px;
margin: 0 0 0 -1px;
padding: 0 10px;
border: 1px solid #C9C9C9;
background-color: #020B31!important;
white-space: nowrap;
vertical-align: top;
border-radius: 2px;
}
.layui-btn {
background-color: #2a91d3;
}
.layui-btn-sm {
height: 36px;
line-height: 30px;
padding: 0 10px;
font-size: 12px;
width: 75px;
border-radius: 9px;
}
.clickable-text {
cursor: pointer;
}
.layui-table-view{
overflow-y: auto;
height: 80%;
}
.layui-table-fixed-r{
right: -150px !important;
}
#layui-layer1{
width:95% !important;
height:95% !important
}
/*#layui-layer-iframe1{*/
/* width:100% !important;*/
/*}*/
/*.layui-layer-setwin {*/
/* position: absolute!important;*/
/* top: 0 !important;*/
/* right: 0!important;*/
/*}*/
</style>
<body style="margin-left: 15px">
<form class="layui-form" action="" onsubmit="return false">
<div class="layui-form-item" style="margin-bottom: 0px;">
<div class="layui-inline" style="margin-top: 10px;">
<div class="layui-input-inline">
<input type="text" id="proName" placeholder="请输入工程名称" autocomplete="off" class="layui-input">
</div>
<div class="layui-input-inline" style="width: 70px;margin-top: 2px">
<button id="searchBt" class="layui-btn layui-btn-sm">查询</button>
</div>
<div class="layui-input-inline" style="width: 70px;margin-top: 2px">
<button id="resetBt" class="layui-btn layui-btn-sm">重置</button>
</div>
<!-- <div class="layui-input-inline" style="width: 70px;margin-top: 2px">-->
<!-- <button id="exportBt" class="layui-btn layui-btn-sm">导出</button>-->
<!-- </div>-->
</div>
</div>
</form>
<table id="demo" lay-filter="test" style="overflow:auto;"></table>
<script type="text/html" id="toolsBar">
<a lay-event="view" style="color: #009688;cursor: pointer;font-size: 15px">详情</a>
</script>
</body>
</html>
2025-12-09 18:44:29 +08:00
<script type="text/javascript" src="../../../public/public.js"></script>
2025-11-27 16:55:35 +08:00
<script type="text/javascript" src="../../js/publicJs.js"></script>
<script type="text/javascript" src="../../js/libs/jquery.min.js"></script>
<script type="text/javascript" src="../../js/jq.js"></script>
<script type="text/javascript" src="../../js/layui-v2.8.18/layui/layui.js"></script>
<script type="text/javascript" src="../../js/select.js"></script>
<script type="text/javascript" src="../../js/my/permission.js"></script>
<script type="text/javascript" src="../../js/dict.js"></script>
<script>
var Jump_release = localStorage.getItem("Jump_release");
let form;
var table;
$("#resetBt").click(function(){
table.reload('menuTable', {
2025-12-09 18:44:29 +08:00
url: czl_url + '/dataDetail/getReleaseDataList'
2025-11-27 16:55:35 +08:00
, method: 'post' //方式默认是get
, page: true
, where: {
proName: "",
releaseData: Jump_release == "1" ? "90" : "",
progress : Jump_release == "2" ? "90" : ""
} //设定异步数据接口的额外参数
});
$("#proName").val("");
})
$("#searchBt").click(function(){
table.reload('menuTable', {
2025-12-09 18:44:29 +08:00
url: czl_url + '/dataDetail/getReleaseDataList'
2025-11-27 16:55:35 +08:00
, method: 'post' //方式默认是get
, page: true
, where: {
proName: $("#proName").val(),
releaseData: Jump_release == "1" ? "90" : "",
progress : Jump_release == "2" ? "90" : ""
} //设定异步数据接口的额外参数
});
})
layui.use(['table', 'form'], function () {
table = layui.table;
form = layui.form;
//渲染表格
table.render({
elem: '#demo'
2025-12-09 18:44:29 +08:00
, url: czl_url + '/dataDetail/getReleaseDataList' //数据接口
2025-11-27 16:55:35 +08:00
, method: 'post' //方式默认是get
, toolbar: 'default' //开启工具栏,此处显示默认图标,可以自定义模板,详见文档
, where: {
releaseData: Jump_release == "1" ? "90" : "",
progress : Jump_release == "2" ? "90" : ""
} //post请求必须加where post请求需要的参数
, cellMinWidth: 80
, cols: [[ //表头
{
field: 'number', width:80,title: '序号', align: 'center', type: 'numbers'
}
, {field: 'proName', align: 'center', title: '工程名称'}
, {field: 'endTime', align: 'center', title: '计划完工时间'}
, {field: 'teamNum', align: 'center',title: '管理团队数量'}
, {field: 'subTeamNum', align: 'center', title: '分包班组'}
, {field: 'basicNum', align: 'center',width: 240, title: '基础班组'}
, {field: 'groupTowerNum', align: 'center', title: '组塔班组'}
, {field: 'lineNum', align: 'center', title: '架线班组'}
, {fixed: 'right', title: '操作', align: 'center',width: 200, toolbar: '#toolsBar'}
]]
,done: function (res, curr, count) {
}
, id: 'menuTable'
, page: true //开启分页
, loading: true //数据加载中。。。
, limits: [5, 10, 20, 100] //一页选择显示3,5或10条数据
, limit: 10 //一页显示5条数据
, response: {
statusCode: 200 //规定成功的状态码默认0
}, parseData: function (res) { //将原始数据解析成 table 组件所规定的数据res为从url中get到的数据
let result;
if (res.data !== '' && res.data != null && res.data !== "null") {
if (this.page.curr) {
result = res.data.slice(this.limit * (this.page.curr - 1), this.limit * this.page.curr);
} else {
result = res.data.slice(0, this.limit);
}
}
return {
"code": res.code, //解析接口状态
"msg": res.msg, //解析提示文本
"count": res.count, //解析数据长度
"data": result, //解析数据列表
};
},
toolbar: "#toolbar"
});
//监听工具条
table.on('tool(test)', function (obj) {
var data = obj.data; //当前行数据
var rowIndex = obj.index;
var layEvent = obj.event; //当前点击的事件名
if (layEvent === 'view') {
localStorage.setItem("releaseProId",data.proId)
layerOpenProgressView("详情","./preReleaseResourceView.html");
}
});
});
function layerOpenProgressView(title,contentUrl){
var index = parent.layer.open({
type: 2,
content: contentUrl,
title: false,
area: ['90%', '95%'],
maxmin: false,
});
}
</script>