远程巡视修改
This commit is contained in:
parent
2cecb97652
commit
3b0c8fe230
|
|
@ -28,6 +28,7 @@
|
||||||
|
|
||||||
<script src="../../../js/public/public.js" type="text/javascript" charset="utf-8"></script>
|
<script src="../../../js/public/public.js" type="text/javascript" charset="utf-8"></script>
|
||||||
<script src="../../../js/public/sm3.js" type="text/javascript" charset="utf-8"></script>
|
<script src="../../../js/public/sm3.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<script src="../../../js/system/sm4.js" type="text/javascript" charset="utf-8"></script>
|
||||||
<script src="../../../js/public/permission.js" type="text/javascript" charset="utf-8"></script>
|
<script src="../../../js/public/permission.js" type="text/javascript" charset="utf-8"></script>
|
||||||
<script src="../../../js/layui/layui.js" charset="utf-8"></script>
|
<script src="../../../js/layui/layui.js" charset="utf-8"></script>
|
||||||
<script src="../../../js/public/select.js" charset="utf-8"></script>
|
<script src="../../../js/public/select.js" charset="utf-8"></script>
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 300 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 205 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 94 KiB |
|
|
@ -306,7 +306,7 @@ function setClassDetailData(result) {
|
||||||
}
|
}
|
||||||
$('#content').html(setValue2(data.workType) + '' + setValue2(data.workGx) + '' + setValue2(data.workContent))
|
$('#content').html(setValue2(data.workType) + '' + setValue2(data.workGx) + '' + setValue2(data.workContent))
|
||||||
$('#workManager').html(data.workManager)
|
$('#workManager').html(data.workManager)
|
||||||
$('#workManagePhone').html(data.workManagePhone)
|
$('#workManagePhone').html(phoneHide(data.workManagePhone))
|
||||||
$(safetyManagers(data.safetyManager)).appendTo('#addPostion')
|
$(safetyManagers(data.safetyManager)).appendTo('#addPostion')
|
||||||
$('#controll').html(setValue(data.controll))
|
$('#controll').html(setValue(data.controll))
|
||||||
$('#changes').html(setValue(data.changes))
|
$('#changes').html(setValue(data.changes))
|
||||||
|
|
@ -492,13 +492,15 @@ function setWorkPhoto(imgPath, color, item) {
|
||||||
|
|
||||||
/*到岗到位签到表赋值*/
|
/*到岗到位签到表赋值*/
|
||||||
function setDutyTableData(result) {
|
function setDutyTableData(result) {
|
||||||
|
let list = handleDecryptData(sm4.decryptDefault_CBC(result.data));
|
||||||
|
let dataList =JSON.parse(list);
|
||||||
let html = '<tr><td>职务</td><td>姓名</td><td>手机号</td><td>签到时间</td></tr>';
|
let html = '<tr><td>职务</td><td>姓名</td><td>手机号</td><td>签到时间</td></tr>';
|
||||||
if (result.data.length) {
|
if (dataList.length) {
|
||||||
$.each(result.data, function (index, item) {
|
$.each(dataList, function (index, item) {
|
||||||
html += '<tr>' +
|
html += '<tr>' +
|
||||||
'<td>' + transformNull(item.peopleType) + '</td>' +
|
'<td>' + transformNull(item.peopleType) + '</td>' +
|
||||||
'<td>' + item.userName + '</td>' +
|
'<td>' + item.userName + '</td>' +
|
||||||
'<td>' + item.phone + '</td>' +
|
'<td>' + phoneHide(item.phone) + '</td>' +
|
||||||
'<td>' + item.inTime + '</td>' +
|
'<td>' + item.inTime + '</td>' +
|
||||||
'</tr>';
|
'</tr>';
|
||||||
})
|
})
|
||||||
|
|
@ -576,8 +578,17 @@ function setPhoto(data, index) {
|
||||||
})
|
})
|
||||||
$('.key-point-photo-type').eq(index).empty().append(html)
|
$('.key-point-photo-type').eq(index).empty().append(html)
|
||||||
} else {
|
} else {
|
||||||
$('.key-point-photo-type').eq(index).empty().append('<p>暂无数据</p>').css('justify-content', 'center')
|
let imgPath = '<img src="">'
|
||||||
$('.key-point-photo-type').eq(index).find('p').eq(0).css('margin-top', '10px');
|
if(index === 0){
|
||||||
|
imgPath = '<img src="../../../img/demo_img/img.png">'
|
||||||
|
}else if(index === 1){
|
||||||
|
imgPath = '<img src="../../../img/demo_img/img2.png">'
|
||||||
|
}else if(index === 2){
|
||||||
|
imgPath = '<img src="../../../img/demo_img/img3.png">'
|
||||||
|
}
|
||||||
|
$('.key-point-photo-type').eq(index).empty().append(imgPath)
|
||||||
|
/* $('.key-point-photo-type').eq(index).empty().append('<p>暂无数据</p>').css('justify-content', 'center')
|
||||||
|
$('.key-point-photo-type').eq(index).find('p').eq(0).css('margin-top', '10px'); */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
var sm4 = new SM4Util();
|
||||||
/*站班会详情-请求*/
|
/*站班会详情-请求*/
|
||||||
function getZbhDetailAjax() {
|
function getZbhDetailAjax() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|
@ -12,8 +13,9 @@ function getZbhDetailAjax() {
|
||||||
},
|
},
|
||||||
type: 'post',
|
type: 'post',
|
||||||
async: true,
|
async: true,
|
||||||
success: function (result) {
|
success: function (res) {
|
||||||
if (result !== 'null') {
|
let result = handleDecryptData(sm4.decryptDefault_CBC(res));
|
||||||
|
if (result !== 'null' && result) {
|
||||||
setClassDetailData(result);
|
setClassDetailData(result);
|
||||||
} else {
|
} else {
|
||||||
setClassDetailData(null);
|
setClassDetailData(null);
|
||||||
|
|
@ -38,7 +40,9 @@ function getZbhPeopleAjax() {
|
||||||
},
|
},
|
||||||
type: 'post',
|
type: 'post',
|
||||||
async: true,
|
async: true,
|
||||||
success: function (result) {
|
success: function (res) {
|
||||||
|
let result = handleDecryptData(sm4.decryptDefault_CBC(res));
|
||||||
|
|
||||||
setWorkerPersonData(result);
|
setWorkerPersonData(result);
|
||||||
}, error: function () {
|
}, error: function () {
|
||||||
setWorkerPersonData(null);
|
setWorkerPersonData(null);
|
||||||
|
|
@ -58,7 +62,6 @@ function getClassMettingSignAjax() {
|
||||||
data: {
|
data: {
|
||||||
classId: idParam
|
classId: idParam
|
||||||
},
|
},
|
||||||
contentType: 'application/json; charset=utf-8', // 指定内容类型和编码
|
|
||||||
dataType:'JSON',
|
dataType:'JSON',
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
async: true,
|
async: true,
|
||||||
|
|
|
||||||
|
|
@ -30,25 +30,25 @@ let getImportComfrimWidth = () => {
|
||||||
return $(top.window).width() * 0.3125;
|
return $(top.window).width() * 0.3125;
|
||||||
};
|
};
|
||||||
let autoResizeWidth = (index) => {
|
let autoResizeWidth = (index) => {
|
||||||
layer.style(index, {width: getDefaultWidth().toFixed(0) + 'px'});
|
layer.style(index, { width: getDefaultWidth().toFixed(0) + 'px' });
|
||||||
};
|
};
|
||||||
let autoNewResizeWidth = (index) => {
|
let autoNewResizeWidth = (index) => {
|
||||||
layer.style(index, {width: getNewDefaultWidth().toFixed(0) + 'px'});
|
layer.style(index, { width: getNewDefaultWidth().toFixed(0) + 'px' });
|
||||||
};
|
};
|
||||||
let autoMoreResizeWidth = (index) => {
|
let autoMoreResizeWidth = (index) => {
|
||||||
layer.style(index, {width: getMoreWidth().toFixed(0) + 'px'});
|
layer.style(index, { width: getMoreWidth().toFixed(0) + 'px' });
|
||||||
};
|
};
|
||||||
let autoChooseResizeWidth = (index) => {
|
let autoChooseResizeWidth = (index) => {
|
||||||
layer.style(index, {width: getChooseWidth().toFixed(0) + 'px'});
|
layer.style(index, { width: getChooseWidth().toFixed(0) + 'px' });
|
||||||
};
|
};
|
||||||
let autoSecondaryResizeWidth = (index) => {
|
let autoSecondaryResizeWidth = (index) => {
|
||||||
layer.style(index, {width: getSecondaryWidth().toFixed(0) + 'px'});
|
layer.style(index, { width: getSecondaryWidth().toFixed(0) + 'px' });
|
||||||
};
|
};
|
||||||
let autoComfrimResizeWidth = (index) => {
|
let autoComfrimResizeWidth = (index) => {
|
||||||
layer.style(index, {width: getComfrimWidth().toFixed(0) + 'px'});
|
layer.style(index, { width: getComfrimWidth().toFixed(0) + 'px' });
|
||||||
};
|
};
|
||||||
let autoImportComfrimResizeWidth = (index) => {
|
let autoImportComfrimResizeWidth = (index) => {
|
||||||
layer.style(index, {width: getImportComfrimWidth().toFixed(0) + 'px'});
|
layer.style(index, { width: getImportComfrimWidth().toFixed(0) + 'px' });
|
||||||
};
|
};
|
||||||
let getDefaultHeight = () => {
|
let getDefaultHeight = () => {
|
||||||
return $(top.window).height() * 0.7759259;
|
return $(top.window).height() * 0.7759259;
|
||||||
|
|
@ -74,31 +74,31 @@ let getImportConfirmHeight = () => {
|
||||||
return $(top.window).height() * 0.4694444;
|
return $(top.window).height() * 0.4694444;
|
||||||
};
|
};
|
||||||
let autoResizeHeight = (index) => {
|
let autoResizeHeight = (index) => {
|
||||||
layer.style(index, {height: getDefaultHeight().toFixed(0) + 'px'});
|
layer.style(index, { height: getDefaultHeight().toFixed(0) + 'px' });
|
||||||
};
|
};
|
||||||
let autoNewResizeHeight = (index) => {
|
let autoNewResizeHeight = (index) => {
|
||||||
layer.style(index, {height: getNewDefaultHeight().toFixed(0) + 'px'});
|
layer.style(index, { height: getNewDefaultHeight().toFixed(0) + 'px' });
|
||||||
};
|
};
|
||||||
let autoMoreResizeHeight = (index) => {
|
let autoMoreResizeHeight = (index) => {
|
||||||
layer.style(index, {height: getMoreHeight().toFixed(0) + 'px'});
|
layer.style(index, { height: getMoreHeight().toFixed(0) + 'px' });
|
||||||
};
|
};
|
||||||
let autoChooseResizeHeight = (index) => {
|
let autoChooseResizeHeight = (index) => {
|
||||||
layer.style(index, {height: getChooseHeight().toFixed(0) + 'px'});
|
layer.style(index, { height: getChooseHeight().toFixed(0) + 'px' });
|
||||||
};
|
};
|
||||||
let autoSecondaryResizeHeight = (index) => {
|
let autoSecondaryResizeHeight = (index) => {
|
||||||
layer.style(index, {height: getSecondaryHeight().toFixed(0) + 'px'});
|
layer.style(index, { height: getSecondaryHeight().toFixed(0) + 'px' });
|
||||||
};
|
};
|
||||||
let autoConfrimResizeHeight = (index) => {
|
let autoConfrimResizeHeight = (index) => {
|
||||||
layer.style(index, {height: getConfirmHeight().toFixed(0) + 'px'});
|
layer.style(index, { height: getConfirmHeight().toFixed(0) + 'px' });
|
||||||
};
|
};
|
||||||
let autoImportConfrimResizeHeight = (index) => {
|
let autoImportConfrimResizeHeight = (index) => {
|
||||||
layer.style(index, {height: getImportConfirmHeight().toFixed(0) + 'px'});
|
layer.style(index, { height: getImportConfirmHeight().toFixed(0) + 'px' });
|
||||||
};
|
};
|
||||||
let autoParentResizeWidth = (index) => {
|
let autoParentResizeWidth = (index) => {
|
||||||
parent.layer.style(index, {width: getDefaultWidth().toFixed(0) + 'px'});
|
parent.layer.style(index, { width: getDefaultWidth().toFixed(0) + 'px' });
|
||||||
};
|
};
|
||||||
let autoParentResizeHeight = (index) => {
|
let autoParentResizeHeight = (index) => {
|
||||||
parent.layer.style(index, {height: getDefaultHeight().toFixed(0) + 'px'});
|
parent.layer.style(index, { height: getDefaultHeight().toFixed(0) + 'px' });
|
||||||
};
|
};
|
||||||
|
|
||||||
// 根据身份证获取年龄
|
// 根据身份证获取年龄
|
||||||
|
|
@ -291,8 +291,8 @@ function getNowTime() {
|
||||||
var dateStr = year + "-" + month + "-" + day;
|
var dateStr = year + "-" + month + "-" + day;
|
||||||
return dateStr;
|
return dateStr;
|
||||||
}
|
}
|
||||||
function getyesDay(){
|
function getyesDay() {
|
||||||
var nowDate = new Date( new Date().setHours(0)-24*60*60*1000);
|
var nowDate = new Date(new Date().setHours(0) - 24 * 60 * 60 * 1000);
|
||||||
var year = nowDate.getFullYear();
|
var year = nowDate.getFullYear();
|
||||||
var month = nowDate.getMonth() + 1 < 10 ? "0" + (nowDate.getMonth() + 1) :
|
var month = nowDate.getMonth() + 1 < 10 ? "0" + (nowDate.getMonth() + 1) :
|
||||||
nowDate.getMonth() + 1;
|
nowDate.getMonth() + 1;
|
||||||
|
|
@ -308,25 +308,25 @@ function getyesDay(){
|
||||||
function getStartTime() {
|
function getStartTime() {
|
||||||
let date = new Date()
|
let date = new Date()
|
||||||
date.setDate(1) // 将当前时间的日期设置成第一天
|
date.setDate(1) // 将当前时间的日期设置成第一天
|
||||||
let year= date.getFullYear() // 得到当前年份
|
let year = date.getFullYear() // 得到当前年份
|
||||||
let month = date.getMonth() + 1 // 得到当前月份(0-11月份,+1是当前月份)
|
let month = date.getMonth() + 1 // 得到当前月份(0-11月份,+1是当前月份)
|
||||||
month = month >= 10 ? month :'0' + month // 补零
|
month = month >= 10 ? month : '0' + month // 补零
|
||||||
let day = date.getDate() // 得到当前天数,实际是本月第一天,因为前面setDate(1) 设置过了
|
let day = date.getDate() // 得到当前天数,实际是本月第一天,因为前面setDate(1) 设置过了
|
||||||
day = day >= 10 ? day :'0' + day // 补零
|
day = day >= 10 ? day : '0' + day // 补零
|
||||||
return year +'-'+ month +'-'+ day // 这里传入的是字符串
|
return year + '-' + month + '-' + day // 这里传入的是字符串
|
||||||
};
|
};
|
||||||
/*获取当前月的最后一天*/
|
/*获取当前月的最后一天*/
|
||||||
function getEndTime(){
|
function getEndTime() {
|
||||||
let date = new Date()
|
let date = new Date()
|
||||||
let year = date.getFullYear()
|
let year = date.getFullYear()
|
||||||
let month = date.getMonth() +1
|
let month = date.getMonth() + 1
|
||||||
month = month >= 10 ? month :'0' + month // 补零
|
month = month >= 10 ? month : '0' + month // 补零
|
||||||
// 这里传入的是整数时间,返回的是下个月的第一天,因为月份是0-11
|
// 这里传入的是整数时间,返回的是下个月的第一天,因为月份是0-11
|
||||||
let nextMonthFirthDay = new Date(year,month,1) // 下个月的第一天
|
let nextMonthFirthDay = new Date(year, month, 1) // 下个月的第一天
|
||||||
let oneDay = 1000*60 * 60 * 24 // 一天的时间毫秒数
|
let oneDay = 1000 * 60 * 60 * 24 // 一天的时间毫秒数
|
||||||
let endDay = new Date(nextMonthFirthDay - oneDay)
|
let endDay = new Date(nextMonthFirthDay - oneDay)
|
||||||
let day = endDay.getDate() // 本月最后一天
|
let day = endDay.getDate() // 本月最后一天
|
||||||
day = day >= 10 ? day :'0' + day // 补零
|
day = day >= 10 ? day : '0' + day // 补零
|
||||||
// 这里传入的是字符串格式的时间,返回的是传入字符串的时间
|
// 这里传入的是字符串格式的时间,返回的是传入字符串的时间
|
||||||
return year + '-' + month + '-' + day
|
return year + '-' + month + '-' + day
|
||||||
};
|
};
|
||||||
|
|
@ -394,8 +394,8 @@ function ajaxRequest(url, type, data, async, beforeFn, successFn, errorFn, conte
|
||||||
async: async,
|
async: async,
|
||||||
beforeSend: beforeFn,
|
beforeSend: beforeFn,
|
||||||
contentType: contentType || "application/x-www-form-urlencoded; charset=utf-8",
|
contentType: contentType || "application/x-www-form-urlencoded; charset=utf-8",
|
||||||
success: function (event, xhr, settings, data){
|
success: function (event, xhr, settings, data) {
|
||||||
event=modifyResponseData(event);
|
event = modifyResponseData(event);
|
||||||
if (event.code === 401) {
|
if (event.code === 401) {
|
||||||
logout(1);
|
logout(1);
|
||||||
}
|
}
|
||||||
|
|
@ -416,4 +416,13 @@ function errorFn(xhr, status, error) {
|
||||||
// 请求出现其他错误
|
// 请求出现其他错误
|
||||||
console.error("ajax请求错误:" + error);
|
console.error("ajax请求错误:" + error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* 处理解密的sm4数据*/
|
||||||
|
/* function handleDecryptData(str){
|
||||||
|
if(str){
|
||||||
|
return str.replace(/\|\|\|\|\/g, '');
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
} */
|
||||||
|
|
|
||||||
|
|
@ -410,3 +410,39 @@ function setRiskLevelColor(value) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 处理解密的sm4数据*/
|
||||||
|
function handleDecryptData(decrypted) {
|
||||||
|
const lastByte = decrypted.charCodeAt(decrypted.length - 1);
|
||||||
|
if (lastByte <= 16) {
|
||||||
|
for (let i = decrypted.length - lastByte; i < decrypted.length; i++) {
|
||||||
|
if (decrypted.charCodeAt(i) !== lastByte) {
|
||||||
|
return decrypted; // 如果填充不正确,返回原始字符串
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return decrypted.slice(0, -lastByte);
|
||||||
|
}
|
||||||
|
return decrypted;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 手机号脱敏
|
||||||
|
function phoneHide(phone) {
|
||||||
|
if(!phone){
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
let phoneStr = phone.replace(/(\d{3})\d*(\d{4})/, '$1****$2')
|
||||||
|
return phoneStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 身份证号脱敏 */
|
||||||
|
function desensitizeIDCard(idCard) {
|
||||||
|
if (!idCard || idCard.length < 6) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
// 中国大陆的身份证号码长度为18位
|
||||||
|
const idLength = 18;
|
||||||
|
// 保留前6位和后4位,中间替换为星号
|
||||||
|
const prefix = idCard.substr(0, 6);
|
||||||
|
const suffix = idCard.substr(idLength - 4);
|
||||||
|
const middle = '*'.repeat(idLength - 10);
|
||||||
|
return prefix + middle + suffix;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue