IntelligentRecognition/ah-jjsp-web/.svn/pristine/ed/ed054eb1a785f39485967611e92...

269 lines
7.2 KiB
Plaintext

/*站班会详情-请求*/
function getZbhDetailAjax() {
$.ajax({
headers: {
"encrypt": sm3(JSON.stringify({
classId: idParam
}))
},
url: dataUrl + 'proteam/pot/todayTask/getZbhDetail?token=' + token,
data: {
classId: idParam
},
type: 'post',
async: true,
success: function (result) {
if (result !== 'null') {
setClassDetailData(result);
} else {
setClassDetailData(null);
}
}, error: function () {
setClassDetailData(null);
}
});
}
/*参与施工人员签名-请求*/
function getZbhPeopleAjax() {
$.ajax({
headers: {
"encrypt": sm3(JSON.stringify({
classId: idParam
}))
},
url: dataUrl + 'proteam/pot/todayTask/getZbhPeople?token=' + token,
data: {
classId: idParam
},
type: 'post',
async: true,
success: function (result) {
setWorkerPersonData(result);
}, error: function () {
setWorkerPersonData(null);
}
});
}
/*到岗到位签到表-请求*/
function getClassMettingSignAjax() {
$.ajax({
headers: {
"encrypt": sm3(JSON.stringify({
classId: idParam
}))
},
url: dataUrl + 'proteam/pot/todayTask/getClassMettingSign?token=' + token,
data: {
classId: idParam
},
type: 'POST',
async: true,
success: function (result) {
if (result.code === 200) {
setDutyTableData(result);
} else if (result.code === 500) {
layer.alert(result.msg, {icon: 2})
} else if (result.code === 401) {
logout(1)
}
}, error: function () {
setDutyTableData(null);
}
});
}
/*关键点措施图片-请求*/
function getZbhImageAjax() {
$.ajax({
headers: {
"encrypt": sm3(JSON.stringify({
classId: idParam
}))
},
url: dataUrl + 'proteam/pot/todayTask/getZbhImage?token=' + token,
data: {
classId: idParam
},
type: 'POST',
async: true,
success: function (result) {
setKeyPointPhoto(result);
}, error: function () {
setKeyPointPhoto(null);
}
});
}
/*站班会预警信息-请求*/
function getZbhWarnAjax() {
$.ajax({
headers: {
"encrypt": sm3(JSON.stringify({
classId: idParam
}))
},
url: dataUrl + 'proteam/pot/todayTask/getZbhWarn?token=' + token,
data: {
classId: idParam
},
type: 'POST',
async: true,
success: function (result) {
if (result.code === 200) {
setClassWarnInfo(result.data);
} else if (result.code === 500) {
layer.alert(result.msg, {icon: 2})
} else if (result.code === 401) {
logout(1)
}
}, error: function () {
setClassWarnInfo(null);
}
});
}
/*异常上报-请求*/
function getExceptionReportListAjax() {
$.ajax({
headers: {
"encrypt": sm3(JSON.stringify({
classId: idParam
}))
},
url: dataUrl + 'proteam/pot/todayTask/getExceptionReportList?token=' + token,
data: {
classId: idParam
},
type: 'POST',
async: true,
success: function (result) {
setExceptionReport(result.data);
}, error: function () {
setExceptionReport(null);
}
});
}
/*更新是否重点关注班组*/
function updateImportTeamAjax(focusTeam, workManagerNum) {
$.ajax({
headers: {
"encrypt": sm3(JSON.stringify({
importTeam: focusTeam,
idNumber: workManagerNum
}))
},
url: dataUrl + 'proteam/pot/todayTask/updateImportTeam?token=' + token,
data: {
importTeam: focusTeam,
idNumber: workManagerNum
},
type: 'POST',
async: true,
success: function (result) {
if (result.code === 200) {
if (focusTeam === '1') {
layer.msg('已标记为重点关注班组', {icon: 1})
} else {
layer.msg('已取消标记为重点关注班组', {icon: 1})
}
} else if (result.code === 500) {
layer.alert(result.msg, { icon: 2 })
resetFocusTeam(focusTeam);
} else if (result.code === 401) {
logout(1)
}
}, error: function () {
resetFocusTeam(focusTeam);
}
});
}
/*施工方案-请求*/
function getSgProgramAjax() {
$.ajax({
headers: {
"encrypt": sm3(JSON.stringify({
bidNo: bidNoParam
}))
},
url: dataUrl + 'proteam/pot/todayTask/getSgFa?token=' + token,
data: {
bidNo: bidNoParam
},
type: 'POST',
async: true,
success: function (result) {
setSgProgramData(result);
}, error: function (XMLHttpRequest, textStatus, errorThrown) {
// 状态码
console.log(XMLHttpRequest.status);
// 状态
console.log(XMLHttpRequest.readyState);
// 错误信息
console.log(textStatus);
setSgProgramData(null);
}
});
}
// 获取标段工程杆塔经纬度
function getBidTowerListAjax(signCode) {
console.error(signCode);
let params = {
'bidNo': signCode
}
$.ajax({
headers: {
"encrypt": sm3(JSON.stringify(params))
},
url: dataUrl + 'proteam/pot/bidTowerMain/getBidTowerList?token=' + token,
data: params,
type: 'POST',
async: true,
success: function (result) {
if (result.code === 200) {
if (result.data) {
setTowerData(result.data);
}
} else if (result.code === 500) {
layer.alert(result.msg, {icon: 2})
}else if (result.code === 401) {
logout(1)
}
}, error: function () {
setTowerData(null);
}
});
}
// 重新加载班组标签
function getTeamLabelsAjax(bidNo) {
console.log(teamId)
let params = {
'teamId': teamId
}
$.ajax({
headers: {
"encrypt": sm3(JSON.stringify(params))
},
url: dataUrl + 'proteam/pot/todayTask/getTeamLabels?token=' + token,
data: params,
type: 'POST',
async: true,
success: function (result) {
if (result.code === 200) {
if (result.data) {
setTeamLabelData(result.data.teamLabels);
}
} else if (result.code === 500) {
layer.alert(result.msg, {icon: 2})
}else if (result.code === 401) {
logout(1)
}
}, error: function () {
}
});
}