影像上传bug修改
This commit is contained in:
parent
b000767268
commit
1e5692eb8d
|
|
@ -107,10 +107,10 @@ layui.use(['laydate', 'upload'], function () {
|
||||||
let files = obj.pushFile();
|
let files = obj.pushFile();
|
||||||
obj.preview(function (index, file, result) {
|
obj.preview(function (index, file, result) {
|
||||||
var length = $('#demo2 img').length;
|
var length = $('#demo2 img').length;
|
||||||
if (length > 8) {
|
if (length > 49) {
|
||||||
delete files[index];//删除指定图片
|
delete files[index];//删除指定图片
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
return layer.msg("附件为1-9张,请勿过多上传", {icon: 5});
|
return layer.msg("附件为1-50张,请勿过多上传", {icon: 5});
|
||||||
}
|
}
|
||||||
const uniqueId = new Date().getTime() + '-' + index;
|
const uniqueId = new Date().getTime() + '-' + index;
|
||||||
$('#demo2').append(
|
$('#demo2').append(
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ layui.use(['form', 'layer', 'table', 'laydate'], function () {
|
||||||
table = layui.table;
|
table = layui.table;
|
||||||
layui.form.render();
|
layui.form.render();
|
||||||
getProSelected();
|
getProSelected();
|
||||||
getProTypeSelected();
|
|
||||||
getProcessIdSelected();
|
getProcessIdSelected();
|
||||||
pages(1, 10, 1);
|
pages(1, 10, 1);
|
||||||
|
|
||||||
|
|
@ -74,15 +73,15 @@ function initTable(dataList, limit, page) {
|
||||||
return (page - 1) * limit + d.LAY_INDEX;
|
return (page - 1) * limit + d.LAY_INDEX;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: "proName", title: "项目名称",width: 310, unresize: true, align: "center" },
|
{field: "proName", title: "项目名称", unresize: true, align: "center" },
|
||||||
{field: "gxName", title: "工序",width: 110, unresize: true, align: "center"},
|
{field: "gxName", title: "工序", unresize: true, align: "center"},
|
||||||
{field: "buildPlace", title: "违章地点",width: 230, unresize: true, align: "center"},
|
{field: "buildPlace", title: "违章地点", unresize: true, align: "center"},
|
||||||
{title: "建设阶段", width: 110, unresize: true, align: "center",
|
{title: "建设阶段", unresize: true, align: "center",
|
||||||
templet: function(d) {
|
templet: function(d) {
|
||||||
return '建设前<br><br>建设中<br><br>恢复后';
|
return '建设前<br><br>建设中<br><br>恢复后';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{title: "建设照片", width: 110, unresize: true, align: "center",
|
{title: "建设照片", unresize: true, align: "center",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
// 统计各阶段的照片数量
|
// 统计各阶段的照片数量
|
||||||
let beforeCount = countPhotosBySourceType(d, "6");
|
let beforeCount = countPhotosBySourceType(d, "6");
|
||||||
|
|
@ -96,13 +95,13 @@ function initTable(dataList, limit, page) {
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{title: "建设描述", width: 310, unresize: true, align: "center",
|
{title: "建设描述", unresize: true, align: "center",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
return d.buildBeforeDesc + '<br><br>' + d.buildUnderDesc + '<br><br>' + d.buildAfterDesc;
|
return d.buildBeforeDesc + '<br><br>' + d.buildUnderDesc + '<br><br>' + d.buildAfterDesc;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: "createUserName", title: "更新人",width: 110, unresize: true, align: "center"},
|
{field: "createUserName", title: "更新人", unresize: true, align: "center"},
|
||||||
{field: "createTime", title: "更新时间 ",width: 110, unresize: true, align: "center"},
|
{field: "createTime", title: "更新时间 ", unresize: true, align: "center"},
|
||||||
{title: "操作", unresize: true, width: 170, align: "center",
|
{title: "操作", unresize: true, width: 170, align: "center",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
let html = '';
|
let html = '';
|
||||||
|
|
@ -131,7 +130,6 @@ function getReqParams(page, limit, type) {
|
||||||
if (type === 2) {
|
if (type === 2) {
|
||||||
$('#keyWord').val('')
|
$('#keyWord').val('')
|
||||||
$('#proId').val('')
|
$('#proId').val('')
|
||||||
$('#proTypeId').val('')
|
|
||||||
$('#processId').val('')
|
$('#processId').val('')
|
||||||
layui.form.render();
|
layui.form.render();
|
||||||
}
|
}
|
||||||
|
|
@ -140,7 +138,6 @@ function getReqParams(page, limit, type) {
|
||||||
limit: limit + "",
|
limit: limit + "",
|
||||||
keyWord: $('#keyWord').val(),
|
keyWord: $('#keyWord').val(),
|
||||||
proId: $('#proId').val(),
|
proId: $('#proId').val(),
|
||||||
proType: $('#proTypeId').val(),
|
|
||||||
gxId: $('#processId').val()
|
gxId: $('#processId').val()
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
@ -242,27 +239,6 @@ function getProSelected() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取工程类型
|
|
||||||
*/
|
|
||||||
function getProTypeSelected() {
|
|
||||||
let url = dataUrl + '/sys/select/getDictSelectByType';
|
|
||||||
|
|
||||||
let data={
|
|
||||||
encryptedData:encryptCBC(JSON.stringify({"code":"pro_type"}))
|
|
||||||
}
|
|
||||||
ajaxRequest(url, "GET", data, true, function () {
|
|
||||||
}, function (result) {
|
|
||||||
if (result.code === 200) {
|
|
||||||
setSelectValue(result.data, 'proTypeId','请选择工程类型');
|
|
||||||
} else {
|
|
||||||
layer.alert(result.msg, {icon: 2})
|
|
||||||
}
|
|
||||||
}, function (xhr) {
|
|
||||||
error(xhr)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取工序
|
* 获取工序
|
||||||
*/
|
*/
|
||||||
|
|
@ -308,7 +284,6 @@ function exportExcel() {
|
||||||
let obj = {
|
let obj = {
|
||||||
keyWord: $('#keyWord').val(),
|
keyWord: $('#keyWord').val(),
|
||||||
proId: $('#proId').val(),
|
proId: $('#proId').val(),
|
||||||
proType: $('#proTypeId').val(),
|
|
||||||
gxId: $('#processId').val(),
|
gxId: $('#processId').val(),
|
||||||
};
|
};
|
||||||
let loadingMsg = layer.msg("数据导出中,请稍候...", {icon: 16, scrollbar: false, time: 0,});
|
let loadingMsg = layer.msg("数据导出中,请稍候...", {icon: 16, scrollbar: false, time: 0,});
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ layui.use(['form', 'layer', 'table', 'laydate'], function () {
|
||||||
table = layui.table;
|
table = layui.table;
|
||||||
layui.form.render();
|
layui.form.render();
|
||||||
getProSelected();
|
getProSelected();
|
||||||
getProTypeSelected();
|
|
||||||
getProcessIdSelected();
|
getProcessIdSelected();
|
||||||
pages(1, 10, 1);
|
pages(1, 10, 1);
|
||||||
|
|
||||||
|
|
@ -70,18 +69,18 @@ function initTable(dataList, limit, page) {
|
||||||
return (page - 1) * limit + d.LAY_INDEX;
|
return (page - 1) * limit + d.LAY_INDEX;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: "proName", title: "项目名称",width: 310, unresize: true, align: "center" },
|
{field: "proName", title: "项目名称", unresize: true, align: "center" },
|
||||||
{field: "gxName", title: "工序",width: 200, unresize: true, align: "center"},
|
{field: "gxName", title: "工序", unresize: true, align: "center"},
|
||||||
{field: "title", title: "标题",width: 210, unresize: true, align: "center"},
|
{field: "title", title: "标题", unresize: true, align: "center"},
|
||||||
{field: "content", title: "内容",width: 310, unresize: true, align: "center"},
|
{field: "content", title: "内容", unresize: true, align: "center"},
|
||||||
{field: "", title: "照片",width: 150, unresize: true, align: "center",
|
{field: "", title: "照片", unresize: true, align: "center",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
let html="<a style='cursor:pointer;' title='照片' onclick='violationPhoto("+JSON.stringify(d)+")' >"+d.sysFileResourceList.length+"</a>";
|
let html="<a style='cursor:pointer;' title='照片' onclick='violationPhoto("+JSON.stringify(d)+")' >"+d.sysFileResourceList.length+"</a>";
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: "createUserName", title: "上传人",width: 110, unresize: true, align: "center"},
|
{field: "createUserName", title: "上传人", unresize: true, align: "center"},
|
||||||
{field: "createTime", title: "更新时间",width: 140, unresize: true, align: "center"},
|
{field: "createTime", title: "更新时间", unresize: true, align: "center"},
|
||||||
{title: "操作", unresize: true, width: 170, align: "center",
|
{title: "操作", unresize: true, width: 170, align: "center",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
let html = '';
|
let html = '';
|
||||||
|
|
@ -111,7 +110,6 @@ function getReqParams(page, limit, type) {
|
||||||
if (type === 2) {
|
if (type === 2) {
|
||||||
$('#keyWord').val('')
|
$('#keyWord').val('')
|
||||||
$('#proId').val('')
|
$('#proId').val('')
|
||||||
$('#proTypeId').val('')
|
|
||||||
$('#processId').val('')
|
$('#processId').val('')
|
||||||
layui.form.render();
|
layui.form.render();
|
||||||
}
|
}
|
||||||
|
|
@ -121,7 +119,6 @@ function getReqParams(page, limit, type) {
|
||||||
limit: limit + "",
|
limit: limit + "",
|
||||||
keyWord: $('#keyWord').val(),
|
keyWord: $('#keyWord').val(),
|
||||||
proId: $('#proId').val(),
|
proId: $('#proId').val(),
|
||||||
majorId: $('#proTypeId').val(),
|
|
||||||
gxId: $('#processId').val(),
|
gxId: $('#processId').val(),
|
||||||
};
|
};
|
||||||
console.log(obj)
|
console.log(obj)
|
||||||
|
|
@ -222,27 +219,6 @@ function getProSelected() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取工程类型
|
|
||||||
*/
|
|
||||||
function getProTypeSelected() {
|
|
||||||
let url = dataUrl + '/sys/select/getDictSelectByType';
|
|
||||||
|
|
||||||
let data={
|
|
||||||
encryptedData:encryptCBC(JSON.stringify({"code":"pro_type"}))
|
|
||||||
}
|
|
||||||
ajaxRequest(url, "GET", data, true, function () {
|
|
||||||
}, function (result) {
|
|
||||||
if (result.code === 200) {
|
|
||||||
setSelectValue(result.data, 'proTypeId','请选择工程类型');
|
|
||||||
} else {
|
|
||||||
layer.alert(result.msg, {icon: 2})
|
|
||||||
}
|
|
||||||
}, function (xhr) {
|
|
||||||
error(xhr)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取工序
|
* 获取工序
|
||||||
*/
|
*/
|
||||||
|
|
@ -286,7 +262,6 @@ function exportExcel() {
|
||||||
let obj = {
|
let obj = {
|
||||||
keyWord: $('#keyWord').val(),
|
keyWord: $('#keyWord').val(),
|
||||||
proId: $('#proId').val(),
|
proId: $('#proId').val(),
|
||||||
majorId: $('#proTypeId').val(),
|
|
||||||
gxId: $('#processId').val(),
|
gxId: $('#processId').val(),
|
||||||
};
|
};
|
||||||
let loadingMsg = layer.msg("数据导出中,请稍候...", {icon: 16, scrollbar: false, time: 0,});
|
let loadingMsg = layer.msg("数据导出中,请稍候...", {icon: 16, scrollbar: false, time: 0,});
|
||||||
|
|
|
||||||
|
|
@ -296,10 +296,10 @@ function setFormData(data) {
|
||||||
var demo1 = $("#demo1");
|
var demo1 = $("#demo1");
|
||||||
for (var i = 0; i < vioPhotoListEdit.length; i++) {
|
for (var i = 0; i < vioPhotoListEdit.length; i++) {
|
||||||
let filePath = imgUrl + data.vioPhotoList[i].originalFilePath + "?token=" + tokens
|
let filePath = imgUrl + data.vioPhotoList[i].originalFilePath + "?token=" + tokens
|
||||||
html = html + '<div id="img-' + i + '" style="display: inline-block; position: relative; margin: 5px 5px">' +
|
html = html + '<div id="imga-' + i + '" style="display: inline-block; position: relative; margin: 5px 5px">' +
|
||||||
'<img src="' + filePath + '" alt="' + data.vioPhotoList[i].fileName + '" style="width: 90px; height: 90px;">' ;
|
'<img src="' + filePath + '" alt="' + data.vioPhotoList[i].fileName + '" style="width: 90px; height: 90px;">' ;
|
||||||
if (details != 1) {
|
if (details != 1) {
|
||||||
html = html + '<button class="layui-btn layui-btn-xs layui-btn-danger" style="position: absolute; top: 0; right: 0;" onclick="removeImageUpdate(\'' + i + '\',\'' + data.vioPhotoList[i].id + '\')">删除</button>';
|
html = html + '<button class="layui-btn layui-btn-xs layui-btn-danger" style="position: absolute; top: 0; right: 0;" onclick="removeImageUpdate1(\'' + i + '\',\'' + data.vioPhotoList[i].id + '\')">删除</button>';
|
||||||
}
|
}
|
||||||
html = html + '</div>';
|
html = html + '</div>';
|
||||||
}
|
}
|
||||||
|
|
@ -312,10 +312,10 @@ function setFormData(data) {
|
||||||
var html = "";
|
var html = "";
|
||||||
for (var i = 0; i < rectPhotoListEdit.length; i++) {
|
for (var i = 0; i < rectPhotoListEdit.length; i++) {
|
||||||
let filePath = imgUrl + data.rectPhotoList[i].originalFilePath + "?token=" + tokens
|
let filePath = imgUrl + data.rectPhotoList[i].originalFilePath + "?token=" + tokens
|
||||||
html = html + '<div id="img-' + i + '" style="display: inline-block; position: relative; margin: 5px 5px">' +
|
html = html + '<div id="imgb-' + i + '" style="display: inline-block; position: relative; margin: 5px 5px">' +
|
||||||
'<img src="' + filePath + '" alt="' + data.rectPhotoList[i].fileName + '" style="width: 90px; height: 90px;">';
|
'<img src="' + filePath + '" alt="' + data.rectPhotoList[i].fileName + '" style="width: 90px; height: 90px;">';
|
||||||
if (details != 1) {
|
if (details != 1) {
|
||||||
html = html + '<button class="layui-btn layui-btn-xs layui-btn-danger" style="position: absolute; top: 0; right: 0;" onclick="removeImageUpdate(\'' + i + '\',\'' + data.rectPhotoList[i].id + '\')">删除</button>';
|
html = html + '<button class="layui-btn layui-btn-xs layui-btn-danger" style="position: absolute; top: 0; right: 0;" onclick="removeImageUpdate2(\'' + i + '\',\'' + data.rectPhotoList[i].id + '\')">删除</button>';
|
||||||
}
|
}
|
||||||
html = html + '</div>';
|
html = html + '</div>';
|
||||||
}
|
}
|
||||||
|
|
@ -337,8 +337,14 @@ function setFormData(data) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeImageUpdate(uniqueId, id) {
|
function removeImageUpdate1(uniqueId, id) {
|
||||||
$('#img-' + uniqueId).remove();
|
$('#imga-' + uniqueId).remove();
|
||||||
|
let ids = {"id":id}
|
||||||
|
deleteFileList.push(ids)
|
||||||
|
};
|
||||||
|
|
||||||
|
function removeImageUpdate2(uniqueId, id) {
|
||||||
|
$('#imgb-' + uniqueId).remove();
|
||||||
let ids = {"id":id}
|
let ids = {"id":id}
|
||||||
deleteFileList.push(ids)
|
deleteFileList.push(ids)
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ layui.use(['form', 'layer', 'table', 'laydate'], function () {
|
||||||
table = layui.table;
|
table = layui.table;
|
||||||
layui.form.render();
|
layui.form.render();
|
||||||
getProSelected();
|
getProSelected();
|
||||||
getProTypeSelected();
|
|
||||||
getProcessIdSelected();
|
getProcessIdSelected();
|
||||||
getStateIdSelected();
|
getStateIdSelected();
|
||||||
pages(1, 10, 1);
|
pages(1, 10, 1);
|
||||||
|
|
@ -71,20 +70,20 @@ function initTable(dataList, limit, page) {
|
||||||
return (page - 1) * limit + d.LAY_INDEX;
|
return (page - 1) * limit + d.LAY_INDEX;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: "proName", title: "项目名称",width: 110, unresize: true, align: "center" },
|
{field: "proName", title: "项目名称", unresize: true, align: "center" },
|
||||||
{field: "gxName", title: "工序",width: 110, unresize: true, align: "center"},
|
{field: "gxName", title: "工序",unresize: true, align: "center"},
|
||||||
{field: "vioPlace", title: "检查地点",width: 110, unresize: true, align: "center"},
|
{field: "vioPlace", title: "检查地点", unresize: true, align: "center"},
|
||||||
{field: "vioDesc", title: "检查描述",width: 110, unresize: true, align: "center"},
|
{field: "vioDesc", title: "检查描述",unresize: true, align: "center"},
|
||||||
{field: "", title: "缺陷问题照片",width: 150, unresize: true, align: "center",
|
{field: "", title: "缺陷问题照片", unresize: true, align: "center",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
let html="<a style='cursor:pointer;' title='检查照片' onclick='violationPhoto("+JSON.stringify(d)+")'>"+d.vioPhotoNum+"</a>";
|
let html="<a style='cursor:pointer;' title='检查照片' onclick='violationPhoto("+JSON.stringify(d)+")'>"+d.vioPhotoNum+"</a>";
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: "checkUserName", title: "检查人",width: 90, unresize: true, align: "center"},
|
{field: "checkUserName", title: "检查人", unresize: true, align: "center"},
|
||||||
{field: "vioDate", title: "检查时间",width: 110, unresize: true, align: "center"},
|
{field: "vioDate", title: "检查时间", unresize: true, align: "center"},
|
||||||
{field: "rectDate", title: "整改期限",width: 110, unresize: true, align: "center"},
|
{field: "rectDate", title: "整改期限", unresize: true, align: "center"},
|
||||||
{field: "", title: "整改状态",width: 110, unresize: true, align: "center",
|
{field: "", title: "整改状态", unresize: true, align: "center",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
var html="";
|
var html="";
|
||||||
if (d.rectStatus == 0) {
|
if (d.rectStatus == 0) {
|
||||||
|
|
@ -136,7 +135,6 @@ function getReqParams(page, limit, type) {
|
||||||
if (type === 2) {
|
if (type === 2) {
|
||||||
$('#keyWord').val('')
|
$('#keyWord').val('')
|
||||||
$('#proId').val('')
|
$('#proId').val('')
|
||||||
$('#proTypeId').val('')
|
|
||||||
$('#processId').val('')
|
$('#processId').val('')
|
||||||
$('#stateId').val('')
|
$('#stateId').val('')
|
||||||
layui.form.render();
|
layui.form.render();
|
||||||
|
|
@ -146,7 +144,6 @@ function getReqParams(page, limit, type) {
|
||||||
limit: limit + "",
|
limit: limit + "",
|
||||||
keyWord: $('#keyWord').val(),
|
keyWord: $('#keyWord').val(),
|
||||||
proId: $('#proId').val(),
|
proId: $('#proId').val(),
|
||||||
proType: $('#proTypeId').val(),
|
|
||||||
gxId: $('#processId').val(),
|
gxId: $('#processId').val(),
|
||||||
proStatus: $('#stateId').val()
|
proStatus: $('#stateId').val()
|
||||||
};
|
};
|
||||||
|
|
@ -248,27 +245,6 @@ function getProSelected() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取工程类型
|
|
||||||
*/
|
|
||||||
function getProTypeSelected() {
|
|
||||||
let url = dataUrl + '/sys/select/getDictSelectByType';
|
|
||||||
|
|
||||||
let data={
|
|
||||||
encryptedData:encryptCBC(JSON.stringify({"code":"pro_type"}))
|
|
||||||
}
|
|
||||||
ajaxRequest(url, "GET", data, true, function () {
|
|
||||||
}, function (result) {
|
|
||||||
if (result.code === 200) {
|
|
||||||
setSelectValue(result.data, 'proTypeId','请选择工程类型');
|
|
||||||
} else {
|
|
||||||
layer.alert(result.msg, {icon: 2})
|
|
||||||
}
|
|
||||||
}, function (xhr) {
|
|
||||||
error(xhr)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取工序
|
* 获取工序
|
||||||
*/
|
*/
|
||||||
|
|
@ -342,7 +318,6 @@ function exportExcel() {
|
||||||
let obj = {
|
let obj = {
|
||||||
keyWord: $('#keyWord').val(),
|
keyWord: $('#keyWord').val(),
|
||||||
proId: $('#proId').val(),
|
proId: $('#proId').val(),
|
||||||
proType: $('#proTypeId').val(),
|
|
||||||
gxId: $('#processId').val(),
|
gxId: $('#processId').val(),
|
||||||
proStatus: $('#stateId').val()
|
proStatus: $('#stateId').val()
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ layui.use(['form', 'layer', 'table', 'laydate'], function () {
|
||||||
table = layui.table;
|
table = layui.table;
|
||||||
layui.form.render();
|
layui.form.render();
|
||||||
getProSelected();
|
getProSelected();
|
||||||
getProTypeSelected();
|
|
||||||
getProcessIdSelected();
|
getProcessIdSelected();
|
||||||
pages(1, 10, 1);
|
pages(1, 10, 1);
|
||||||
|
|
||||||
|
|
@ -70,18 +69,18 @@ function initTable(dataList, limit, page) {
|
||||||
return (page - 1) * limit + d.LAY_INDEX;
|
return (page - 1) * limit + d.LAY_INDEX;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: "proName", title: "项目名称",width: 310, unresize: true, align: "center" },
|
{field: "proName", title: "项目名称", unresize: true, align: "center" },
|
||||||
{field: "gxName", title: "工序",width: 200, unresize: true, align: "center"},
|
{field: "gxName", title: "工序", unresize: true, align: "center"},
|
||||||
{field: "checkPlace", title: "检查地点",width: 210, unresize: true, align: "center"},
|
{field: "checkPlace", title: "检查地点", unresize: true, align: "center"},
|
||||||
{field: "checkDesc", title: "问题描述",width: 310, unresize: true, align: "center"},
|
{field: "checkDesc", title: "问题描述", unresize: true, align: "center"},
|
||||||
{field: "", title: "现场照片",width: 150, unresize: true, align: "center",
|
{field: "", title: "现场照片", unresize: true, align: "center",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
let html="<a style='cursor:pointer;' title='检查照片' onclick='violationPhoto("+JSON.stringify(d)+")'>"+d.sysFileResourceList.length+"</a>";
|
let html="<a style='cursor:pointer;' title='检查照片' onclick='violationPhoto("+JSON.stringify(d)+")'>"+d.sysFileResourceList.length+"</a>";
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: "checkUserName", title: "检查人",width: 110, unresize: true, align: "center"},
|
{field: "checkUserName", title: "检查人", unresize: true, align: "center"},
|
||||||
{field: "checkDate", title: "检查时间",width: 140, unresize: true, align: "center"},
|
{field: "checkDate", title: "检查时间", unresize: true, align: "center"},
|
||||||
{title: "操作", unresize: true, width: 170, align: "center",
|
{title: "操作", unresize: true, width: 170, align: "center",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
let html = '';
|
let html = '';
|
||||||
|
|
@ -111,7 +110,6 @@ function getReqParams(page, limit, type) {
|
||||||
if (type === 2) {
|
if (type === 2) {
|
||||||
$('#keyWord').val('')
|
$('#keyWord').val('')
|
||||||
$('#proId').val('')
|
$('#proId').val('')
|
||||||
$('#proTypeId').val('')
|
|
||||||
$('#processId').val('')
|
$('#processId').val('')
|
||||||
layui.form.render();
|
layui.form.render();
|
||||||
}
|
}
|
||||||
|
|
@ -121,7 +119,6 @@ function getReqParams(page, limit, type) {
|
||||||
limit: limit + "",
|
limit: limit + "",
|
||||||
keyWord: $('#keyWord').val(),
|
keyWord: $('#keyWord').val(),
|
||||||
proId: $('#proId').val(),
|
proId: $('#proId').val(),
|
||||||
majorId: $('#proTypeId').val(),
|
|
||||||
gxId: $('#processId').val(),
|
gxId: $('#processId').val(),
|
||||||
};
|
};
|
||||||
console.log(obj)
|
console.log(obj)
|
||||||
|
|
@ -222,27 +219,6 @@ function getProSelected() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取工程类型
|
|
||||||
*/
|
|
||||||
function getProTypeSelected() {
|
|
||||||
let url = dataUrl + '/sys/select/getDictSelectByType';
|
|
||||||
|
|
||||||
let data={
|
|
||||||
encryptedData:encryptCBC(JSON.stringify({"code":"pro_type"}))
|
|
||||||
}
|
|
||||||
ajaxRequest(url, "GET", data, true, function () {
|
|
||||||
}, function (result) {
|
|
||||||
if (result.code === 200) {
|
|
||||||
setSelectValue(result.data, 'proTypeId','请选择工程类型');
|
|
||||||
} else {
|
|
||||||
layer.alert(result.msg, {icon: 2})
|
|
||||||
}
|
|
||||||
}, function (xhr) {
|
|
||||||
error(xhr)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取工序
|
* 获取工序
|
||||||
*/
|
*/
|
||||||
|
|
@ -287,7 +263,6 @@ function exportExcel() {
|
||||||
let obj = {
|
let obj = {
|
||||||
keyWord: $('#keyWord').val(),
|
keyWord: $('#keyWord').val(),
|
||||||
proId: $('#proId').val(),
|
proId: $('#proId').val(),
|
||||||
majorId: $('#proTypeId').val(),
|
|
||||||
gxId: $('#processId').val(),
|
gxId: $('#processId').val(),
|
||||||
};
|
};
|
||||||
let loadingMsg = layer.msg("数据导出中,请稍候...", {icon: 16, scrollbar: false, time: 0,});
|
let loadingMsg = layer.msg("数据导出中,请稍候...", {icon: 16, scrollbar: false, time: 0,});
|
||||||
|
|
|
||||||
|
|
@ -304,10 +304,10 @@ function setFormData(data) {
|
||||||
var demo1 = $("#demo1");
|
var demo1 = $("#demo1");
|
||||||
for (var i = 0; i < vioPhotoListEdit.length; i++) {
|
for (var i = 0; i < vioPhotoListEdit.length; i++) {
|
||||||
let filePath = imgUrl + data.vioPhotoList[i].originalFilePath + "?token=" + tokens
|
let filePath = imgUrl + data.vioPhotoList[i].originalFilePath + "?token=" + tokens
|
||||||
html = html + '<div id="img-' + i + '" style="display: inline-block; position: relative; margin: 5px 5px">' +
|
html = html + '<div id="imga-' + i + '" style="display: inline-block; position: relative; margin: 5px 5px">' +
|
||||||
'<img src="' + filePath + '" alt="' + data.vioPhotoList[i].fileName + '" style="width: 90px; height: 90px;">' ;
|
'<img src="' + filePath + '" alt="' + data.vioPhotoList[i].fileName + '" style="width: 90px; height: 90px;">' ;
|
||||||
if (details != 1) {
|
if (details != 1) {
|
||||||
html = html + '<button class="layui-btn layui-btn-xs layui-btn-danger" style="position: absolute; top: 0; right: 0;" onclick="removeImageUpdate(\'' + i + '\',\'' + data.vioPhotoList[i].id + '\')">删除</button>';
|
html = html + '<button class="layui-btn layui-btn-xs layui-btn-danger" style="position: absolute; top: 0; right: 0;" onclick="removeImageUpdate1(\'' + i + '\',\'' + data.vioPhotoList[i].id + '\')">删除</button>';
|
||||||
}
|
}
|
||||||
html = html + '</div>';
|
html = html + '</div>';
|
||||||
}
|
}
|
||||||
|
|
@ -320,10 +320,10 @@ function setFormData(data) {
|
||||||
var html = "";
|
var html = "";
|
||||||
for (var i = 0; i < rectPhotoListEdit.length; i++) {
|
for (var i = 0; i < rectPhotoListEdit.length; i++) {
|
||||||
let filePath = imgUrl + data.rectPhotoList[i].originalFilePath + "?token=" + tokens
|
let filePath = imgUrl + data.rectPhotoList[i].originalFilePath + "?token=" + tokens
|
||||||
html = html + '<div id="img-' + i + '" style="display: inline-block; position: relative; margin: 5px 5px">' +
|
html = html + '<div id="imgb-' + i + '" style="display: inline-block; position: relative; margin: 5px 5px">' +
|
||||||
'<img src="' + filePath + '" alt="' + data.rectPhotoList[i].fileName + '" style="width: 90px; height: 90px;">';
|
'<img src="' + filePath + '" alt="' + data.rectPhotoList[i].fileName + '" style="width: 90px; height: 90px;">';
|
||||||
if (details != 1) {
|
if (details != 1) {
|
||||||
html = html + '<button class="layui-btn layui-btn-xs layui-btn-danger" style="position: absolute; top: 0; right: 0;" onclick="removeImageUpdate(\'' + i + '\',\'' + data.rectPhotoList[i].id + '\')">删除</button>';
|
html = html + '<button class="layui-btn layui-btn-xs layui-btn-danger" style="position: absolute; top: 0; right: 0;" onclick="removeImageUpdate2(\'' + i + '\',\'' + data.rectPhotoList[i].id + '\')">删除</button>';
|
||||||
}
|
}
|
||||||
html = html + '</div>';
|
html = html + '</div>';
|
||||||
}
|
}
|
||||||
|
|
@ -345,8 +345,14 @@ function setFormData(data) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeImageUpdate(uniqueId, id) {
|
function removeImageUpdate1(uniqueId, id) {
|
||||||
$('#img-' + uniqueId).remove();
|
$('#imga-' + uniqueId).remove();
|
||||||
|
let ids = {"id":id}
|
||||||
|
deleteFileList.push(ids)
|
||||||
|
};
|
||||||
|
|
||||||
|
function removeImageUpdate2(uniqueId, id) {
|
||||||
|
$('#imgb-' + uniqueId).remove();
|
||||||
let ids = {"id":id}
|
let ids = {"id":id}
|
||||||
deleteFileList.push(ids)
|
deleteFileList.push(ids)
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ layui.use(['form', 'layer', 'table', 'laydate'], function () {
|
||||||
table = layui.table;
|
table = layui.table;
|
||||||
layui.form.render();
|
layui.form.render();
|
||||||
getProSelected();
|
getProSelected();
|
||||||
getProTypeSelected();
|
|
||||||
getProcessIdSelected();
|
getProcessIdSelected();
|
||||||
getStateIdSelected();
|
getStateIdSelected();
|
||||||
pages(1, 10, 1);
|
pages(1, 10, 1);
|
||||||
|
|
@ -70,20 +69,20 @@ function initTable(dataList, limit, page) {
|
||||||
return (page - 1) * limit + d.LAY_INDEX;
|
return (page - 1) * limit + d.LAY_INDEX;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: "proName", title: "项目名称",width: 110, unresize: true, align: "center" },
|
{field: "proName", title: "项目名称", unresize: true, align: "center" },
|
||||||
{field: "gxName", title: "工序",width: 110, unresize: true, align: "center"},
|
{field: "gxName", title: "工序", unresize: true, align: "center"},
|
||||||
{field: "vioPlace", title: "违章地点",width: 110, unresize: true, align: "center"},
|
{field: "vioPlace", title: "违章地点",unresize: true, align: "center"},
|
||||||
{field: "vioDesc", title: "违章描述",width: 110, unresize: true, align: "center"},
|
{field: "vioDesc", title: "违章描述",unresize: true, align: "center"},
|
||||||
{field: "", title: "违章照片",width: 110, unresize: true, align: "center",
|
{field: "", title: "违章照片", unresize: true, align: "center",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
let html="<a style='cursor:pointer;' title='违章照片' onclick='violationPhoto("+JSON.stringify(d)+")' >"+d.vioPhotoNum+"</a>";
|
let html="<a style='cursor:pointer;' title='违章照片' onclick='violationPhoto("+JSON.stringify(d)+")' >"+d.vioPhotoNum+"</a>";
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: "checkUserName", title: "检查人",width: 110, unresize: true, align: "center"},
|
{field: "checkUserName", title: "检查人", unresize: true, align: "center"},
|
||||||
{field: "vioDate", title: "违章时间",width: 110, unresize: true, align: "center"},
|
{field: "vioDate", title: "违章时间",unresize: true, align: "center"},
|
||||||
{field: "rectDate", title: "整改期限",width: 110, unresize: true, align: "center"},
|
{field: "rectDate", title: "整改期限",unresize: true, align: "center"},
|
||||||
{field: "", title: "整改状态",width: 110, unresize: true, align: "center",
|
{field: "", title: "整改状态", unresize: true, align: "center",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
var html="";
|
var html="";
|
||||||
if (d.rectStatus == 0) {
|
if (d.rectStatus == 0) {
|
||||||
|
|
@ -98,15 +97,15 @@ function initTable(dataList, limit, page) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: "", title: "整改照片",width: 110, unresize: true, align: "center",
|
{field: "", title: "整改照片", unresize: true, align: "center",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
let html="<a style='cursor:pointer;' title='整改照片' onclick='correctionPhoto("+JSON.stringify(d)+")' >"+d.rectPhotoNum+"</a>";
|
let html="<a style='cursor:pointer;' title='整改照片' onclick='correctionPhoto("+JSON.stringify(d)+")' >"+d.rectPhotoNum+"</a>";
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: "rectDesc", title: "整改说明",width: 110, unresize: true, align: "center"},
|
{field: "rectDesc", title: "整改说明", unresize: true, align: "center"},
|
||||||
{field: "rectUserName", title: "整改人",width: 110, unresize: true, align: "center"},
|
{field: "rectUserName", title: "整改人", unresize: true, align: "center"},
|
||||||
{field: "rectTime", title: "整改时间",width: 110, unresize: true, align: "center"},
|
{field: "rectTime", title: "整改时间", unresize: true, align: "center"},
|
||||||
{title: "操作", unresize: true, width: 170, align: "center",
|
{title: "操作", unresize: true, width: 170, align: "center",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
let html = '';
|
let html = '';
|
||||||
|
|
@ -135,7 +134,6 @@ function getReqParams(page, limit, type) {
|
||||||
if (type === 2) {
|
if (type === 2) {
|
||||||
$('#keyWord').val('')
|
$('#keyWord').val('')
|
||||||
$('#proId').val('')
|
$('#proId').val('')
|
||||||
$('#proTypeId').val('')
|
|
||||||
$('#processId').val('')
|
$('#processId').val('')
|
||||||
$('#stateId').val('')
|
$('#stateId').val('')
|
||||||
layui.form.render();
|
layui.form.render();
|
||||||
|
|
@ -145,7 +143,6 @@ function getReqParams(page, limit, type) {
|
||||||
limit: limit + "",
|
limit: limit + "",
|
||||||
keyWord: $('#keyWord').val(),
|
keyWord: $('#keyWord').val(),
|
||||||
proId: $('#proId').val(),
|
proId: $('#proId').val(),
|
||||||
proType: $('#proTypeId').val(),
|
|
||||||
gxId: $('#processId').val(),
|
gxId: $('#processId').val(),
|
||||||
proStatus: $('#stateId').val()
|
proStatus: $('#stateId').val()
|
||||||
|
|
||||||
|
|
@ -248,27 +245,6 @@ function getProSelected() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取工程类型
|
|
||||||
*/
|
|
||||||
function getProTypeSelected() {
|
|
||||||
let url = dataUrl + '/sys/select/getDictSelectByType';
|
|
||||||
|
|
||||||
let data={
|
|
||||||
encryptedData:encryptCBC(JSON.stringify({"code":"pro_type"}))
|
|
||||||
}
|
|
||||||
ajaxRequest(url, "GET", data, true, function () {
|
|
||||||
}, function (result) {
|
|
||||||
if (result.code === 200) {
|
|
||||||
setSelectValue(result.data, 'proTypeId','请选择工程类型');
|
|
||||||
} else {
|
|
||||||
layer.alert(result.msg, {icon: 2})
|
|
||||||
}
|
|
||||||
}, function (xhr) {
|
|
||||||
error(xhr)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取工序
|
* 获取工序
|
||||||
*/
|
*/
|
||||||
|
|
@ -342,7 +318,6 @@ function exportExcel() {
|
||||||
let obj = {
|
let obj = {
|
||||||
keyWord: $('#keyWord').val(),
|
keyWord: $('#keyWord').val(),
|
||||||
proId: $('#proId').val(),
|
proId: $('#proId').val(),
|
||||||
proType: $('#proTypeId').val(),
|
|
||||||
gxId: $('#processId').val(),
|
gxId: $('#processId').val(),
|
||||||
proStatus: $('#stateId').val()
|
proStatus: $('#stateId').val()
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -32,14 +32,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-inline" style="padding: 0 0 0 10px;">
|
|
||||||
<div class="layui-input-inline">
|
|
||||||
<select id="proTypeId" name="proTypeName" class="form-control input-sm">
|
|
||||||
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="layui-inline" style="padding: 0 0 0 10px;">
|
<div class="layui-inline" style="padding: 0 0 0 10px;">
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<select id="processId" name="processName" class="form-control input-sm">
|
<select id="processId" name="processName" class="form-control input-sm">
|
||||||
|
|
|
||||||
|
|
@ -32,14 +32,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-inline" style="padding: 0 0 0 10px;">
|
|
||||||
<div class="layui-input-inline">
|
|
||||||
<select id="proTypeId" name="proTypeName" class="form-control input-sm">
|
|
||||||
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="layui-inline" style="padding: 0 0 0 10px;">
|
<div class="layui-inline" style="padding: 0 0 0 10px;">
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<select id="processId" name="processName" class="form-control input-sm">
|
<select id="processId" name="processName" class="form-control input-sm">
|
||||||
|
|
|
||||||
|
|
@ -32,14 +32,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-inline" style="padding: 0 0 0 10px;">
|
|
||||||
<div class="layui-input-inline">
|
|
||||||
<select id="proTypeId" name="proTypeName" class="form-control input-sm">
|
|
||||||
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="layui-inline" style="padding: 0 0 0 10px;">
|
<div class="layui-inline" style="padding: 0 0 0 10px;">
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<select id="processId" name="processName" class="form-control input-sm">
|
<select id="processId" name="processName" class="form-control input-sm">
|
||||||
|
|
|
||||||
|
|
@ -32,14 +32,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-inline" style="padding: 0 0 0 10px;">
|
|
||||||
<div class="layui-input-inline">
|
|
||||||
<select id="proTypeId" name="proTypeName" class="form-control input-sm">
|
|
||||||
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="layui-inline" style="padding: 0 0 0 10px;">
|
<div class="layui-inline" style="padding: 0 0 0 10px;">
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<select id="processId" name="processName" class="form-control input-sm">
|
<select id="processId" name="processName" class="form-control input-sm">
|
||||||
|
|
|
||||||
|
|
@ -32,14 +32,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-inline" style="padding: 0 0 0 10px;">
|
|
||||||
<div class="layui-input-inline">
|
|
||||||
<select id="proTypeId" name="proTypeName" class="form-control input-sm">
|
|
||||||
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="layui-inline" style="padding: 0 0 0 10px;">
|
<div class="layui-inline" style="padding: 0 0 0 10px;">
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<select id="processId" name="processName" class="form-control input-sm">
|
<select id="processId" name="processName" class="form-control input-sm">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue