前端接口对接

This commit is contained in:
pengyb 2024-08-21 21:40:46 +08:00
parent 37b5bb0561
commit c9d843868f
7 changed files with 56 additions and 9 deletions

View File

@ -105,29 +105,29 @@
</div> </div>
<!-- 栏目2 --> <!-- 栏目2 -->
<div class="layui-tab-item"> <div class="layui-tab-item">
<iframe src="./viewPlan/viewPlanList.html" frameborder="0" width="100%" height="100%"></iframe> <iframe src="./viewPlan/viewPlanList.html" id="viewPlanFrame" frameborder="0" width="100%" height="100%"></iframe>
</div> </div>
<!-- 栏目3 --> <!-- 栏目3 -->
<div class="layui-tab-item"> <div class="layui-tab-item">
<iframe src="./staff/staffList.html" frameborder="0" width="100%" height="100%"></iframe> <iframe src="./staff/staffList.html" frameborder="0" id="staffFrame" width="100%" height="100%"></iframe>
</div> </div>
<!-- 栏目4 --> <!-- 栏目4 -->
<div class="layui-tab-item"> <div class="layui-tab-item">
<iframe src="./viewStatistics/viewStatisticsList.html" frameborder="0" width="100%" <iframe src="./viewStatistics/viewStatisticsList.html" id="viewStatisticsFrame" frameborder="0" width="100%"
height="100%"></iframe> height="100%"></iframe>
</div> </div>
<!-- 栏目5 --> <!-- 栏目5 -->
<div class="layui-tab-item"> <div class="layui-tab-item">
<iframe src="./workVisa/workVisaList.html" frameborder="0" width="100%" height="100%"></iframe> <iframe src="./workVisa/workVisaList.html" id="workVisaFrame" frameborder="0" width="100%" height="100%"></iframe>
</div> </div>
<!-- 栏目6 --> <!-- 栏目6 -->
<div class="layui-tab-item"> <div class="layui-tab-item">
<iframe src="./specialPatrol/specialPatrolList.html" frameborder="0" width="100%" <iframe src="./specialPatrol/specialPatrolList.html" id="specialPatrolFrame" frameborder="0" width="100%"
height="100%"></iframe> height="100%"></iframe>
</div> </div>
<!-- 栏目7 --> <!-- 栏目7 -->
<div class="layui-tab-item"> <div class="layui-tab-item">
<iframe src="./wagesStatistics/wagesStatisticsList.html" frameborder="0" width="100%" <iframe src="./wagesStatistics/wagesStatisticsList.html" id="wagesStatisticsFrame" frameborder="0" width="100%"
height="100%"></iframe> height="100%"></iframe>
</div> </div>
</div> </div>

View File

@ -10,12 +10,17 @@ layui.use(['element', 'layer', 'form', 'element','laypage'], function(){
}) })
//初始化云间公司 //初始化云间公司
function init(){ function init(){
var subComId = $(window.parent.document).find("select[id='subComId']").val();
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
url: PATH_URL + '/homePageSelect/getSubCom', // 请求地址 url: PATH_URL + '/homePageSelect/getSubCom', // 请求地址
contentType: "application/json; charset=utf-8", contentType: "application/json; charset=utf-8",
async: false, async: false,
data: {}, //获取提交的表单字段 data: {
fgsId: subComId
}, //获取提交的表单字段
success: function (data) { success: function (data) {
if(data.code == 200){ if(data.code == 200){
let html = ''; let html = '';
@ -36,9 +41,33 @@ function init(){
var iframe = $("#indexFrame")[0]; var iframe = $("#indexFrame")[0];
var iframeWindow = iframe.contentWindow; var iframeWindow = iframe.contentWindow;
iframeWindow.initStation(); iframeWindow.initStation();
iframeWindow.setData(); iframeWindow.setData();
var viewPlanFrame = $("#viewPlanFrame")[0];
var viewPlanWindow = viewPlanFrame.contentWindow;
viewPlanWindow.init();
var staffFrame = $("#staffFrame")[0];
var staffWindow = staffFrame.contentWindow;
staffWindow.init();
var viewStatisticsFrame = $("#viewStatisticsFrame")[0];
var viewStatisticsWindow = viewStatisticsFrame.contentWindow;
viewStatisticsWindow.init();
var workVisaFrame = $("#workVisaFrame")[0];
var workVisaWindow = workVisaFrame.contentWindow;
workVisaWindow.init();
var specialPatrolFrame = $("#specialPatrolFrame")[0];
var specialPatrolWindow = specialPatrolFrame.contentWindow;
specialPatrolWindow.init();
var wagesStatisticsFrame = $("#wagesStatisticsFrame")[0];
var wagesStatisticsWindow = wagesStatisticsFrame.contentWindow;
wagesStatisticsWindow.init();
}); });
}, },
error: function (XMLHttpRequest, textStatus, e) { error: function (XMLHttpRequest, textStatus, e) {

View File

@ -33,6 +33,7 @@ layui.use(['form', 'layer', 'table', 'laydate', 'excel'], function() {
function init() { function init() {
var subComId = $(window.parent.document).find("select[id='subComId']").val();
let userName = $('#userName').val(); let userName = $('#userName').val();
let proName = $('#proName').val(); let proName = $('#proName').val();
let yjName = $('#yjName').val(); let yjName = $('#yjName').val();
@ -84,7 +85,7 @@ function init() {
"proName": proName, "proName": proName,
"yjName": yjName, "yjName": yjName,
"makeMonth": makeMonth, "makeMonth": makeMonth,
"fgsId": "26" "fgsId": subComId
}, //获取提交的表单字段 }, //获取提交的表单字段
success: function(data) { success: function(data) {
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {

View File

@ -77,9 +77,14 @@ layui.use(['form','layer','table'], function () {
* 初始化数据 * 初始化数据
*/ */
function init(){ function init(){
var subComId = $(window.parent.document).find("select[id='subComId']").val();
// 渲染表格 // 渲染表格
table.render({ table.render({
elem: '#table', elem: '#table',
where: {
fgsId: subComId
},
// url: "/sys/achievement", // url: "/sys/achievement",
page: true, page: true,
skin: 'line', // 表格样式 skin: 'line', // 表格样式

View File

@ -180,9 +180,13 @@ var col = [
* 初始化数据 * 初始化数据
*/ */
function init(){ function init(){
var subComId = $(window.parent.document).find("select[id='subComId']").val();
// 渲染表格 // 渲染表格
table.render({ table.render({
elem: '#table', elem: '#table',
where: {
fgsId: subComId
}
// url: "/sys/achievement", // url: "/sys/achievement",
page: true, page: true,
border: true, border: true,

View File

@ -70,9 +70,13 @@ layui.use(['form','layer','table','laydate'], function () {
* 初始化数据 * 初始化数据
*/ */
function init(){ function init(){
var subComId = $(window.parent.document).find("select[id='subComId']").val();
// 渲染表格 // 渲染表格
table.render({ table.render({
elem: '#table', elem: '#table',
where: {
fgsId: subComId
},
// url: "/sys/achievement", // url: "/sys/achievement",
page: true, page: true,
skin: 'line', // 表格样式 skin: 'line', // 表格样式

View File

@ -77,9 +77,13 @@ layui.use(['form','layer','table','laydate'], function () {
* 初始化数据 * 初始化数据
*/ */
function init(){ function init(){
var subComId = $(window.parent.document).find("select[id='subComId']").val();
// 渲染表格 // 渲染表格
table.render({ table.render({
elem: '#table', elem: '#table',
where: {
fgsId: subComId
},
// url: "/sys/achievement", // url: "/sys/achievement",
page: true, page: true,
skin: 'line', // 表格样式 skin: 'line', // 表格样式