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://192.168.0.14:2024/line"
|
||||
|
||||
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 IMG_URL="http://127.0.0.1:1911/bmw/"
|
||||
// let IMG_URL="http://192.168.0.14:1911/bmw/"s
|
||||
// let IMG_URL="http://192.168.0.14:1909/file/"
|
||||
|
||||
|
||||
//正式环境 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 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",
|
||||
async:false,
|
||||
data:{
|
||||
"gtId": gtIds,
|
||||
gtId: gtIds,
|
||||
gtName:gtNames,
|
||||
userId:localStorage.getItem("resultUserId"),
|
||||
makeMonth:localStorage.getItem("resultMakeMonth"),
|
||||
|
|
|
|||
|
|
@ -185,7 +185,8 @@ function insertSpecial(obj){
|
|||
userId: localStorage.getItem("resultUserId"),
|
||||
proId:localStorage.getItem("resultProId"),
|
||||
makeMonth:formatYearMonth,
|
||||
ysUrl:ysurld,url:urld,
|
||||
ysUrl:ysurld,
|
||||
url:urld,
|
||||
remarks:$("#remark").val(),
|
||||
makeTime:makeTime
|
||||
},
|
||||
|
|
|
|||
|
|
@ -109,11 +109,14 @@ function uploadFile(){
|
|||
ysUrls="";
|
||||
urls="";
|
||||
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) {
|
||||
console.log(data,"donedata");
|
||||
urls=data.data.url;
|
||||
ysUrls=data.data.ysUrl;
|
||||
},
|
||||
|
|
@ -121,10 +124,14 @@ function uploadFile(){
|
|||
console.log(data,"allDonedata");
|
||||
if(ysUrls!=null&&urls!=null){
|
||||
insertMakeGt();
|
||||
setTimeout(function(){
|
||||
layer.close(loadingMsg);
|
||||
var iframeWindow = parent.window['layui-layer-iframe' + localStorage.getItem("resultindex")];
|
||||
iframeWindow.reloadData();
|
||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||
parent.layer.close(index);
|
||||
},1500)
|
||||
|
||||
}else{
|
||||
layer.msg("上传错误!")
|
||||
}
|
||||
|
|
@ -146,16 +153,17 @@ function insertMakeGt(){
|
|||
url : PATH_URL + "/makeInfo/insertMakeGt",
|
||||
async:false,
|
||||
data:{
|
||||
"gtId": gtId,
|
||||
gtId:gtId,
|
||||
userId:userId,
|
||||
makeMonth:month,
|
||||
sFilePath:ysUrls,
|
||||
filePath:urls,makeType:makeType,proId:proId,
|
||||
filePath:urls,
|
||||
makeType:makeType,
|
||||
proId:proId,
|
||||
numTimes:numTimes
|
||||
},
|
||||
dataType:"json",
|
||||
success:function(res){
|
||||
layer.close(loadingMsg);
|
||||
console.log(res,"res")
|
||||
if(res.code==500){
|
||||
parent.layer.msg(res.msg)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ var month = currentDate.getMonth() + 1;//当前第几月
|
|||
var year = currentDate.getFullYear();
|
||||
var resultUserId;
|
||||
var resultProId;
|
||||
var resultMonth;
|
||||
var resultMonth = localStorage.getItem("resultMakeMonth");
|
||||
layui.use(['form','layer','table','laydate','element'], function () {
|
||||
table = layui.table;
|
||||
form = layui.form;
|
||||
|
|
@ -27,10 +27,15 @@ layui.use(['form','layer','table','laydate','element'], function () {
|
|||
init(date.year,date.month);
|
||||
}
|
||||
});
|
||||
$("#month").val(localStorage.getItem("resultMakeMonth"));
|
||||
resultMonth=localStorage.getItem("resultMakeMonth")
|
||||
init(year,month)
|
||||
// $("#month").val(localStorage.getItem("resultMakeMonth"));
|
||||
// resultMonth=localStorage.getItem("resultMakeMonth")
|
||||
// init(year,month)
|
||||
// setData()
|
||||
|
||||
$("#month").val(resultMonth);
|
||||
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) {
|
||||
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/del_white.png" onclick="towerDel(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,${viewList2[i].gtId},1)" style="cursor: pointer;width: 14px;height:16px" alt="">
|
||||
`
|
||||
}
|
||||
html += `</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue