接口联调
This commit is contained in:
parent
c9c946ae78
commit
3dc972b3f8
|
|
@ -159,7 +159,7 @@ function moreData() {
|
|||
}
|
||||
}); */
|
||||
|
||||
/* window.addEventListener('beforeunload', async function (event) {
|
||||
window.addEventListener('beforeunload', async function (event) {
|
||||
// 阻止默认行为以延迟页面卸载
|
||||
event.preventDefault();
|
||||
try {
|
||||
|
|
@ -183,4 +183,4 @@ async function saveImportantData() {
|
|||
destroyPlugin();
|
||||
resolve();
|
||||
});
|
||||
} */
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
let form, laydate, table, layer;
|
||||
let pageNum = 1, pageSize = 30; // 定义分页
|
||||
let form, laydate, table, layer, tableIns;
|
||||
let pageNum = 1; // 定义分页
|
||||
layui.use(["form", 'laydate', 'table', 'layer'], function () {
|
||||
form = layui.form;
|
||||
laydate = layui.laydate;
|
||||
|
|
@ -38,8 +38,8 @@ function reloadTable(pageNum) {
|
|||
}
|
||||
|
||||
function initTable(bidCode) {
|
||||
const url = commonUrl + "screen/largeScreen/dataAnalysis/getListByType";
|
||||
table.render({
|
||||
const url = commonUrl + "screen/largeScreen/workReport/getWorkLists";
|
||||
tableIns = table.render({
|
||||
elem: '#demo2',
|
||||
id: 'currentTableId',
|
||||
url: url,
|
||||
|
|
@ -52,25 +52,27 @@ function initTable(bidCode) {
|
|||
},
|
||||
where: {
|
||||
bidCode: bidCode,
|
||||
startDate: $('#startDate').val(),
|
||||
endDate: $('#endDate').val(),
|
||||
startTime: $('#startDate').val(),
|
||||
endTime: $('#endDate').val(),
|
||||
},
|
||||
cols: [[
|
||||
{ type: 'numbers', title: '序号', width: '10%' }, // 添加序号列
|
||||
{ field: 'date', title: '日期', align: 'center', width: '20%' },
|
||||
{ field: 'warnContent', title: '计划工作内容', align: 'center', width: '30%' },
|
||||
{ field: 'workDate', title: '日期', align: 'center', width: '20%' },
|
||||
{ field: 'completionStatus', title: '计划工作内容', align: 'center', width: '30%' },
|
||||
{ field: 'photo', title: '工作内容完成情况', align: 'center', width: '30%' },
|
||||
{
|
||||
field: 'status', title: '操作', align: 'center', width: '10%',
|
||||
templet: function (d) {
|
||||
let html = "";
|
||||
html += "<a onclick='fillWorkSituation(" + JSON.stringify(d) + ")'>填报工作情况</a>";
|
||||
if (d.fillStatus === '0') {
|
||||
html += "<a onclick='fillWorkSituation(" + JSON.stringify(d) + ")'>填报工作情况</a>";
|
||||
}
|
||||
return html;
|
||||
},
|
||||
}
|
||||
]],
|
||||
done: function (res, curr, count, origin) {
|
||||
// console.log(res);
|
||||
console.log(res);
|
||||
pageNum = tableIns.config.page.curr;
|
||||
table.resize("currentTableId");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,13 +44,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<button class="layui-btn" onclick="queryTable(1)"><i class="layui-icon"></i>
|
||||
<button class="layui-btn" onclick="reloadTable(1)"><i class="layui-icon"></i>
|
||||
搜 索</button>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<button class="layui-btn" onclick="fillWorkSituation({})"><i class="layui-icon"></i>
|
||||
搜 索2</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue