前端接口对接
This commit is contained in:
parent
70dd098a82
commit
ee03de8f4c
|
|
@ -83,12 +83,12 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- 栏目5 -->
|
<!-- 栏目5 -->
|
||||||
<div class="layui-tab-item">
|
<div class="layui-tab-item">
|
||||||
<iframe src="./project/projectList.html" frameborder="0" width="100%"
|
<iframe src="./project/projectList.html" id="projectFrame" frameborder="0" width="100%"
|
||||||
height="100%"></iframe>
|
height="100%"></iframe>
|
||||||
</div>
|
</div>
|
||||||
<!-- 栏目6 -->
|
<!-- 栏目6 -->
|
||||||
<div class="layui-tab-item">
|
<div class="layui-tab-item">
|
||||||
<iframe src="./attendance/attendance.html" frameborder="0" width="100%"
|
<iframe src="./attendance/attendance.html" id="attendanceFrame" frameborder="0" width="100%"
|
||||||
height="100%"></iframe>
|
height="100%"></iframe>
|
||||||
</div>
|
</div>
|
||||||
<!-- 栏目7 -->
|
<!-- 栏目7 -->
|
||||||
|
|
|
||||||
|
|
@ -115,6 +115,8 @@ function resetClick(){
|
||||||
* 初始化数据 全部
|
* 初始化数据 全部
|
||||||
*/
|
*/
|
||||||
function initTable1(){
|
function initTable1(){
|
||||||
|
var yjId = $(window.parent.document).find("input[id='taskSourceId']").attr("stationId");
|
||||||
|
|
||||||
console.log('全部')
|
console.log('全部')
|
||||||
table.render({
|
table.render({
|
||||||
id: 'layui_table1',
|
id: 'layui_table1',
|
||||||
|
|
@ -122,7 +124,8 @@ function initTable1(){
|
||||||
url: PATH_URL + '/attendance/getAllInspectionList',
|
url: PATH_URL + '/attendance/getAllInspectionList',
|
||||||
where: {
|
where: {
|
||||||
startMakeMonth: $('#makeMonth').val(),
|
startMakeMonth: $('#makeMonth').val(),
|
||||||
endMakeMonth: $('#makeMonth').val()
|
endMakeMonth: $('#makeMonth').val(),
|
||||||
|
yjId: yjId
|
||||||
},
|
},
|
||||||
page: true, //开启分页
|
page: true, //开启分页
|
||||||
method:'post',
|
method:'post',
|
||||||
|
|
@ -165,6 +168,7 @@ function initTable1(){
|
||||||
*/
|
*/
|
||||||
function initTable2(){
|
function initTable2(){
|
||||||
console.log('正常巡视统计')
|
console.log('正常巡视统计')
|
||||||
|
var yjId = $(window.parent.document).find("input[id='taskSourceId']").attr("stationId");
|
||||||
// 渲染表格
|
// 渲染表格
|
||||||
table.render({
|
table.render({
|
||||||
id: 'layui_table2',
|
id: 'layui_table2',
|
||||||
|
|
@ -172,7 +176,8 @@ function initTable2(){
|
||||||
url: PATH_URL + '/attendance/getNormalInspectionList',
|
url: PATH_URL + '/attendance/getNormalInspectionList',
|
||||||
where: {
|
where: {
|
||||||
startMakeMonth: $('#makeMonth').val(),
|
startMakeMonth: $('#makeMonth').val(),
|
||||||
endMakeMonth: $('#makeMonth').val()
|
endMakeMonth: $('#makeMonth').val(),
|
||||||
|
yjId: yjId
|
||||||
},
|
},
|
||||||
page: true, //开启分页
|
page: true, //开启分页
|
||||||
method:'post',
|
method:'post',
|
||||||
|
|
@ -212,7 +217,7 @@ function initTable2(){
|
||||||
*/
|
*/
|
||||||
function initTable3(userName,proName,yjName,makeMonth){
|
function initTable3(userName,proName,yjName,makeMonth){
|
||||||
console.log('特巡统计')
|
console.log('特巡统计')
|
||||||
|
var yjId = $(window.parent.document).find("input[id='taskSourceId']").attr("stationId");
|
||||||
//保存数据
|
//保存数据
|
||||||
var tableData = []
|
var tableData = []
|
||||||
|
|
||||||
|
|
@ -225,6 +230,7 @@ function initTable3(userName,proName,yjName,makeMonth){
|
||||||
align: 'center',
|
align: 'center',
|
||||||
type: 'numbers'
|
type: 'numbers'
|
||||||
},
|
},
|
||||||
|
{field:'userId', style: 'display:none'},
|
||||||
{field:'userName', title: '姓 名',align: 'center', width: '80'},
|
{field:'userName', title: '姓 名',align: 'center', width: '80'},
|
||||||
{field:'proName', title: '管辖线路名称',align: 'center', width: '200'},
|
{field:'proName', title: '管辖线路名称',align: 'center', width: '200'},
|
||||||
{field:'yjName', title: '所属运检站',align: 'center', width: '200'},
|
{field:'yjName', title: '所属运检站',align: 'center', width: '200'},
|
||||||
|
|
@ -238,12 +244,13 @@ function initTable3(userName,proName,yjName,makeMonth){
|
||||||
userName: userName,
|
userName: userName,
|
||||||
proName: proName,
|
proName: proName,
|
||||||
yjName: yjName,
|
yjName: yjName,
|
||||||
makeMonth: $('#makeMonth').val()
|
makeMonth: $('#makeMonth').val(),
|
||||||
|
yjId: yjId
|
||||||
}, //获取提交的表单字段
|
}, //获取提交的表单字段
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
for (var i = 0; i < data.length; i++) {
|
for (var i = 0; i < data.length; i++) {
|
||||||
var json =
|
var json =
|
||||||
{'userName': data[i].userName, 'proName': data[i].proName, 'yjName': data[i].yjName, 'special': data[i].special, 'makeMonth': data[i].makeMonth, 'proId': data[i].proId }
|
{'userId': data[i].userId, 'userName': data[i].userName, 'proName': data[i].proName, 'yjName': data[i].yjName, 'special': data[i].special, 'makeMonth': data[i].makeMonth, 'proId': data[i].proId }
|
||||||
var spMakeList = data[i].spMakeList;
|
var spMakeList = data[i].spMakeList;
|
||||||
for (var j = 0; j < spMakeList.length; j++) {
|
for (var j = 0; j < spMakeList.length; j++) {
|
||||||
json[`${ spMakeList[j].currDay }`] = spMakeList[j].isAtt;
|
json[`${ spMakeList[j].currDay }`] = spMakeList[j].isAtt;
|
||||||
|
|
@ -294,6 +301,7 @@ function initTable3(userName,proName,yjName,makeMonth){
|
||||||
* 详情
|
* 详情
|
||||||
* */
|
* */
|
||||||
function checkView(obj) {
|
function checkView(obj) {
|
||||||
|
debugger
|
||||||
let height = '98%';
|
let height = '98%';
|
||||||
let width = '95%';
|
let width = '95%';
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|
@ -302,7 +310,8 @@ function checkView(obj) {
|
||||||
contentType: "application/json; charset=utf-8",
|
contentType: "application/json; charset=utf-8",
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
makeMonth: $("#makeMonth").val(),
|
makeMonth: $("#makeMonth").val(),
|
||||||
proId: obj.data.proId
|
proId: obj.data.proId,
|
||||||
|
userId: obj.data.userId
|
||||||
}),
|
}),
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
console.log("dataaaaaa:", data)
|
console.log("dataaaaaa:", data)
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,8 @@ function getView(data){
|
||||||
}
|
}
|
||||||
$("#firstViewBox").append(html1);
|
$("#firstViewBox").append(html1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var twoMakeList = data.data.twoMakeList;
|
var twoMakeList = data.data.twoMakeList;
|
||||||
$("#secondViewBox").html('');
|
$("#secondViewBox").html('');
|
||||||
let html2 = ``;
|
let html2 = ``;
|
||||||
|
|
|
||||||
|
|
@ -36,10 +36,23 @@ function init(){
|
||||||
$("#taskSourceId").attr("gsName", item.parentName);
|
$("#taskSourceId").attr("gsName", item.parentName);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 选择运检站后会根据运检id重新查询页面内容
|
||||||
|
*/
|
||||||
localStorage.setItem("selectyj", item.id)
|
localStorage.setItem("selectyj", item.id)
|
||||||
var iframe = $("#indexFrame")[0];
|
var iframe = $("#indexFrame")[0];
|
||||||
var iframeWindow = iframe.contentWindow;
|
var iframeWindow = iframe.contentWindow;
|
||||||
iframeWindow.setData();
|
iframeWindow.setData();
|
||||||
|
|
||||||
|
|
||||||
|
var projectFrame = $("#projectFrame")[0];
|
||||||
|
var projectWindow = projectFrame.contentWindow;
|
||||||
|
projectWindow.init();
|
||||||
|
|
||||||
|
var attendanceFrame = $("#attendanceFrame")[0];
|
||||||
|
var attendanceWindow = attendanceFrame.contentWindow;
|
||||||
|
attendanceWindow.init();
|
||||||
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -52,12 +52,14 @@ function resetClick(){
|
||||||
* 初始化数据
|
* 初始化数据
|
||||||
*/
|
*/
|
||||||
function init(){
|
function init(){
|
||||||
|
var yjId = $(window.parent.document).find("input[id='taskSourceId']").attr("stationId");
|
||||||
// 渲染表格
|
// 渲染表格
|
||||||
table.render({
|
table.render({
|
||||||
id: 'layui_table',
|
id: 'layui_table',
|
||||||
elem: '#table',
|
elem: '#table',
|
||||||
url: PATH_URL + '/lineProject/getLineProjectList',
|
url: PATH_URL + '/lineProject/getLineProjectList',
|
||||||
where: {
|
where: {
|
||||||
|
'yjId': yjId
|
||||||
},
|
},
|
||||||
page: true, //开启分页
|
page: true, //开启分页
|
||||||
method:'post',
|
method:'post',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue