接口联调

This commit is contained in:
cwchen 2025-05-16 14:47:33 +08:00
parent 343369a060
commit 2c107b1d47
4 changed files with 40 additions and 21 deletions

View File

@ -62,4 +62,21 @@ body {
body .my-skin.child-skin {
background: url("../../img/video/child-back.png") no-repeat 0 0/100% 100% transparent;
}
.layui-layer-dialog .layui-layer-padding {
color: #000 !important;
}
/* 禁用所有悬浮提示 */
.layui-table-tool {
display: none !important;
}
/* 设置单元格换行显示 */
.layui-table-cell {
white-space: normal !important;
word-break: break-word !important;
height: auto !important;
overflow: visible !important;
}

View File

@ -6,9 +6,12 @@ function setParams(obj) {
form = layui.form;
layer = layui.layer;
layui.form.render();
form.on('submit(formData)', function (data) {
submitApply(data);
});
});
$('.content-info').eq(0).append('<p>2025-12-12 00:00:00</p>');
$('.content-info').eq(1).append('<p>打发打发打发打发的所发生的发的发的沙发上打算发多少发顺丰打发打发的身份打发打发打发打发的所发生的发的发的沙发上打算发多少发顺丰打发打发的身份打发打发打发打发的所发生的发的发的沙发上打算发多少发顺丰打发打发的身份打发打发打发打发的所发生的发的发的沙发上打算发多少发顺丰打发打发的身份打发打发打发打发的所发生的发的发的沙发上打算发多少发顺丰打发打发的身份打发打发打发打发的所发生的发的发的沙发上打算发多少发顺丰打发打发的身份</p>');
$('.content-info').eq(0).append('<p>' + objParams.workDate + '</p>');
$('.content-info').eq(1).append('<p>' + objParams.workContent + '</p>');
}
function saveData2() {
@ -17,8 +20,9 @@ function saveData2() {
// 保存数据
function submitApply(data) {
/* let field = data.field; // 获取表单字段值
const url = commonUrl + "screen/largeScreen/personnelControl/addNewFence";
let field = data.field; // 获取表单字段值
field.id = objParams.id;
const url = commonUrl + "screen/largeScreen/workReport/fillWorkSituation";
let encryptStr = encryptCBC(JSON.stringify(field));
let loadingMsg = layer.msg('正在提交保存,请稍等...', {
icon: 16,
@ -29,7 +33,8 @@ function submitApply(data) {
}, function (result) {
layer.close(loadingMsg); // 关闭提示层
if (result.code === 200) {
parent.layer.msg(result.msg, { icon: 1, offset: 't' });
parent.layer.msg(result.msg, { icon: 1});
closePage(1);
} else if (result.code === 500) {
layer.msg(result.msg, { icon: 2 });
} else if (result.code === 401) {
@ -38,15 +43,14 @@ function submitApply(data) {
}, function (xhr) {
layer.close(loadingMsg); // 关闭提示层
error(xhr)
}, "application/json", aqEnnable); */
closePage(1);
}, "application/json", aqEnnable);
}
// 关闭页面
function closePage(type) {
let index = parent.layer.getFrameIndex(window.name); // 先得到当前 iframe层的索引
if (type == 1) {
window.parent.changeData();
window.parent.reloadData();
}
parent.layer.close(index); // 再执行关闭
}

View File

@ -17,7 +17,7 @@ layui.use(["form", 'laydate', 'table', 'layer'], function () {
// 刷新页面数据
function reloadData() {
reloadTable(1);
reloadTable(pageNum);
}
// 重载表格
@ -27,11 +27,9 @@ function reloadTable(pageNum) {
curr: pageNum ? pageNum : 1,
},
where: {
encryptedData: JSON.stringify({
bidCode: parent.$('#bidPro').val(),
startDate: $('#startDate').val(),
endDate: $('#endDate').val(),
}),
bidCode: parent.$('#bidPro').val(),
startTime: $('#startDate').val(),
endTime: $('#endDate').val(),
},
},
);
@ -45,7 +43,7 @@ function initTable(bidCode) {
url: url,
skin: 'line',
page: true,
height: 'full-200',
height: 'full-180',
headers: {
"decrypt": "decrypt",
"Authorization": token
@ -57,15 +55,15 @@ function initTable(bidCode) {
},
cols: [[
{ type: 'numbers', title: '序号', width: '10%' }, // 添加序号列
{ field: 'workDate', title: '日期', align: 'center', width: '20%' },
{ field: 'completionStatus', title: '计划工作内容', align: 'center', width: '30%' },
{ field: 'photo', title: '工作内容完成情况', align: 'center', width: '30%' },
{ field: 'workDate', title: '日期', align: 'center', width: '20%' ,tooltip: false},
{ field: 'workContent', title: '计划工作内容', align: 'center', width: '30%' ,tooltip: false},
{ field: 'completionStatus', title: '工作内容完成情况', align: 'center', width: '30%',tooltip: false },
{
field: 'status', title: '操作', align: 'center', width: '10%',
field: 'status', title: '操作', align: 'center', width: '10%',tooltip: false,
templet: function (d) {
let html = "";
if (d.fillStatus === '0') {
html += "<a onclick='fillWorkSituation(" + JSON.stringify(d) + ")'>填报工作情况</a>";
html += "<a style='color:#1e9fff;' onclick='fillWorkSituation(" + JSON.stringify(d) + ")'>填报工作情况</a>";
}
return html;
},

View File

@ -34,7 +34,7 @@
<div class="layui-form-item layui-form-text" id="measures">
<label class="layui-form-label" style="text-align: left;padding: 9px 0;width: 100px;">工作完成情况:</label>
<div class="layui-input-block" style="margin-left: 0;">
<textarea placeholder="请输入工作完成情况" lay-verify="required" class="layui-textarea"
<textarea placeholder="请输入工作完成情况" name="completionStatus" lay-verify="required" class="layui-textarea"
maxlength="500"></textarea>
</div>
</div>