fly 修改了巡视结果上传模块的三个bug
This commit is contained in:
parent
c852a6a2f0
commit
b59743af9d
|
|
@ -1,13 +1,25 @@
|
||||||
//系统请求路径
|
//本地路径
|
||||||
let PATH_URL="http://127.0.0.1:2024/line"
|
let PATH_URL="http://127.0.0.1:2024/line"
|
||||||
// let PATH_URL="http://192.168.0.14:2024/line"
|
|
||||||
|
|
||||||
let FILE_URL="http://127.0.0.1:1909/file"
|
let FILE_URL="http://127.0.0.1:1909/file"
|
||||||
|
let IMG_URL="http://127.0.0.1:1909/file/"
|
||||||
|
|
||||||
|
|
||||||
|
//测试环境系统请求路径
|
||||||
|
// let PATH_URL="http://192.168.0.14:2024/line"
|
||||||
// let FILE_URL="http://192.168.0.14:1909/file"
|
// let FILE_URL="http://192.168.0.14:1909/file"
|
||||||
//系统请求路径
|
// let IMG_URL="http://192.168.0.14:1909/file/"
|
||||||
let IMG_URL="http://127.0.0.1:1911/bmw/"
|
|
||||||
// let IMG_URL="http://192.168.0.14:1911/bmw/"s
|
|
||||||
|
//正式环境 gateway
|
||||||
|
// let PATH_URL="http://112.29.103.165:1616/line"
|
||||||
|
// let FILE_URL="http://112.29.103.165:1616/file"
|
||||||
|
// let IMG_URL="http://112.29.103.165:1616/file/"
|
||||||
|
|
||||||
|
|
||||||
// let PATH_URL=getContextPath();
|
// let PATH_URL=getContextPath();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//登录页面路径
|
//登录页面路径
|
||||||
let LOGIN_PATH="http://127.0.0.1:8849/ah-bns-web/html/test/test.html";
|
let LOGIN_PATH="http://127.0.0.1:8849/ah-bns-web/html/test/test.html";
|
||||||
//加解密开关
|
//加解密开关
|
||||||
|
|
|
||||||
|
|
@ -205,7 +205,7 @@ function insertBatch(){
|
||||||
url : PATH_URL + "/makeInfo/insertBatchMakeGt",
|
url : PATH_URL + "/makeInfo/insertBatchMakeGt",
|
||||||
async:false,
|
async:false,
|
||||||
data:{
|
data:{
|
||||||
"gtId": gtIds,
|
gtId: gtIds,
|
||||||
gtName:gtNames,
|
gtName:gtNames,
|
||||||
userId:localStorage.getItem("resultUserId"),
|
userId:localStorage.getItem("resultUserId"),
|
||||||
makeMonth:localStorage.getItem("resultMakeMonth"),
|
makeMonth:localStorage.getItem("resultMakeMonth"),
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,8 @@ function insertSpecial(obj){
|
||||||
userId: localStorage.getItem("resultUserId"),
|
userId: localStorage.getItem("resultUserId"),
|
||||||
proId:localStorage.getItem("resultProId"),
|
proId:localStorage.getItem("resultProId"),
|
||||||
makeMonth:formatYearMonth,
|
makeMonth:formatYearMonth,
|
||||||
ysUrl:ysurld,url:urld,
|
ysUrl:ysurld,
|
||||||
|
url:urld,
|
||||||
remarks:$("#remark").val(),
|
remarks:$("#remark").val(),
|
||||||
makeTime:makeTime
|
makeTime:makeTime
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -109,11 +109,14 @@ function uploadFile(){
|
||||||
ysUrls="";
|
ysUrls="";
|
||||||
urls="";
|
urls="";
|
||||||
this.data = {
|
this.data = {
|
||||||
"gtId": gtId,uploadType:"one",photoType:"hxy",month:month,numTimes:numTimes
|
gtId:gtId,
|
||||||
|
uploadType:"one",
|
||||||
|
photoType:"hxy",
|
||||||
|
month:month,
|
||||||
|
numTimes:numTimes
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
done: function (data) {
|
done: function (data) {
|
||||||
console.log(data,"donedata");
|
|
||||||
urls=data.data.url;
|
urls=data.data.url;
|
||||||
ysUrls=data.data.ysUrl;
|
ysUrls=data.data.ysUrl;
|
||||||
},
|
},
|
||||||
|
|
@ -121,10 +124,14 @@ function uploadFile(){
|
||||||
console.log(data,"allDonedata");
|
console.log(data,"allDonedata");
|
||||||
if(ysUrls!=null&&urls!=null){
|
if(ysUrls!=null&&urls!=null){
|
||||||
insertMakeGt();
|
insertMakeGt();
|
||||||
var iframeWindow = parent.window['layui-layer-iframe' + localStorage.getItem("resultindex")];
|
setTimeout(function(){
|
||||||
iframeWindow.reloadData();
|
layer.close(loadingMsg);
|
||||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
var iframeWindow = parent.window['layui-layer-iframe' + localStorage.getItem("resultindex")];
|
||||||
parent.layer.close(index);
|
iframeWindow.reloadData();
|
||||||
|
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||||
|
parent.layer.close(index);
|
||||||
|
},1500)
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
layer.msg("上传错误!")
|
layer.msg("上传错误!")
|
||||||
}
|
}
|
||||||
|
|
@ -146,16 +153,17 @@ function insertMakeGt(){
|
||||||
url : PATH_URL + "/makeInfo/insertMakeGt",
|
url : PATH_URL + "/makeInfo/insertMakeGt",
|
||||||
async:false,
|
async:false,
|
||||||
data:{
|
data:{
|
||||||
"gtId": gtId,
|
gtId:gtId,
|
||||||
userId:userId,
|
userId:userId,
|
||||||
makeMonth:month,
|
makeMonth:month,
|
||||||
sFilePath:ysUrls,
|
sFilePath:ysUrls,
|
||||||
filePath:urls,makeType:makeType,proId:proId,
|
filePath:urls,
|
||||||
|
makeType:makeType,
|
||||||
|
proId:proId,
|
||||||
numTimes:numTimes
|
numTimes:numTimes
|
||||||
},
|
},
|
||||||
dataType:"json",
|
dataType:"json",
|
||||||
success:function(res){
|
success:function(res){
|
||||||
layer.close(loadingMsg);
|
|
||||||
console.log(res,"res")
|
console.log(res,"res")
|
||||||
if(res.code==500){
|
if(res.code==500){
|
||||||
parent.layer.msg(res.msg)
|
parent.layer.msg(res.msg)
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ var month = currentDate.getMonth() + 1;//当前第几月
|
||||||
var year = currentDate.getFullYear();
|
var year = currentDate.getFullYear();
|
||||||
var resultUserId;
|
var resultUserId;
|
||||||
var resultProId;
|
var resultProId;
|
||||||
var resultMonth;
|
var resultMonth = localStorage.getItem("resultMakeMonth");
|
||||||
layui.use(['form','layer','table','laydate','element'], function () {
|
layui.use(['form','layer','table','laydate','element'], function () {
|
||||||
table = layui.table;
|
table = layui.table;
|
||||||
form = layui.form;
|
form = layui.form;
|
||||||
|
|
@ -27,10 +27,15 @@ layui.use(['form','layer','table','laydate','element'], function () {
|
||||||
init(date.year,date.month);
|
init(date.year,date.month);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$("#month").val(localStorage.getItem("resultMakeMonth"));
|
// $("#month").val(localStorage.getItem("resultMakeMonth"));
|
||||||
resultMonth=localStorage.getItem("resultMakeMonth")
|
// resultMonth=localStorage.getItem("resultMakeMonth")
|
||||||
init(year,month)
|
// init(year,month)
|
||||||
|
// setData()
|
||||||
|
|
||||||
|
$("#month").val(resultMonth);
|
||||||
setData()
|
setData()
|
||||||
|
let result = getYearMonth(resultMonth);
|
||||||
|
init(result.oldYear, result.oldMonth);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -507,3 +512,14 @@ function patrolOutsideAdd(){
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getYearMonth(yearMonth) {
|
||||||
|
let date = new Date(yearMonth);
|
||||||
|
let oldYear = date.getFullYear();
|
||||||
|
let oldMonth = date.getMonth() + 1;
|
||||||
|
return {
|
||||||
|
oldYear,
|
||||||
|
oldMonth
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -380,8 +380,8 @@ function getView() {
|
||||||
`
|
`
|
||||||
if ("1" == viewList2[i].state || "1" == viewList2[i].makeType) {
|
if ("1" == viewList2[i].state || "1" == viewList2[i].makeType) {
|
||||||
html += `
|
html += `
|
||||||
<img src="../../../image/edit_white.png" onclick="towerEdit(this,${viewList1[i].gtId},1)" style="cursor: pointer;width: 14px;height:16px" alt="">
|
<img src="../../../image/edit_white.png" onclick="towerEdit(this,${viewList2[i].gtId},1)" style="cursor: pointer;width: 14px;height:16px" alt="">
|
||||||
<img src="../../../image/del_white.png" onclick="towerDel(this,${viewList1[i].gtId},1)" style="cursor: pointer;width: 14px;height:16px" alt="">
|
<img src="../../../image/del_white.png" onclick="towerDel(this,${viewList2[i].gtId},1)" style="cursor: pointer;width: 14px;height:16px" alt="">
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
html += `</div>
|
html += `</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue