Commit 497005ae authored by yht15023815643's avatar yht15023815643

优化

parent 09dea24c
...@@ -166,7 +166,7 @@ export default { ...@@ -166,7 +166,7 @@ export default {
} }
}, },
grid:{ grid:{
left:'1', left:'1%',
top:'8%', top:'8%',
right:'5%', right:'5%',
bottom:'8%', bottom:'8%',
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<tables <tables
:tableLoading="tableLoading" :tableLoading="tableLoading"
:tableData="tableData" :tableData="tableData"
:tableDataTotal="tableDataTotal"
:forData="forData" :forData="forData"
:isIndex="false" :isIndex="false"
:queryParams="queryParams" :queryParams="queryParams"
......
...@@ -359,28 +359,20 @@ export default { ...@@ -359,28 +359,20 @@ export default {
value: "今天", value: "今天",
}, },
{ {
label: "近3日", label: "未来3天",
value: "近3日", value: "未来3天",
},
{
label: "近7日",
value: "近7日",
},
{
label: "近1个月",
value: "近1个月",
}, },
{ {
label: "近3个月", label: "未来7天",
value: "近3个月", value: "未来7天",
}, },
{ {
label: "近半年", label: "未来1个月",
value: "近半年", value: "未来1个月",
}, },
{ {
label: "近1年", label: "未来3个月",
value: "近1年", value: "未来3个月",
}, },
], ],
PlanTenderDateValue: "", PlanTenderDateValue: "",
...@@ -746,58 +738,30 @@ export default { ...@@ -746,58 +738,30 @@ export default {
startTime = Year + "-" + Month +"-" + Day; startTime = Year + "-" + Month +"-" + Day;
endTime = Year + "-" + Month + "-" + Day; endTime = Year + "-" + Month + "-" + Day;
break; break;
case "近3日": case "未来3天":
endTime = Year + "-" + Month + "-" + Day; startTime = Year + "-" + Month + "-" + Day;
if (Day > 3) { endTime = this.getDate(3)
startTime = Year + "-" + Month + "-" +(Day-3);
} else {
let newTime = datetime.getTime()-3*24*60*60*1000
Year = new Date(newTime).getFullYear();
Month = new Date(newTime).getMonth() + 1;
Day = new Date(newTime).getDate();
startTime = Year + "-" + Month +"-" + Day;
}
break; break;
case "近7日": case "未来7天":
endTime = Year + "-" + Month + "-" + Day; startTime = Year + "-" + Month + "-" + Day;
if (Day > 7) { endTime = this.getDate(7)
startTime = Year + "-" + Month + "-" +(Day-7);
} else {
let newTime = datetime.getTime()-7*24*60*60*1000
Year = new Date(newTime).getFullYear();
Month = new Date(newTime).getMonth() + 1;
Day = new Date(newTime).getDate();
startTime = Year + "-" + Month +"-" + Day;
}
break;
case "近1个月":
endTime = Year + "-" + Month + "-" + Day;
if (Month > 1) {
startTime = Year + "-" + (Month - 1) + "-1";
} else {
startTime = Year - 1 + "-" + (12 + Month - 1) + "-1";
}
break; break;
case "近3个月": case "未来1个月":
endTime = Year + "-" + Month + "-" + Day; startTime = Year + "-" + Month + "-" + Day;
if (Month > 3) { if (Month == 12) {
startTime = Year + "-" + (Month - 3) + "-1"; endTime = Year+1 + "-01-" + + Day;
} else { } else {
startTime = Year - 1 + "-" + (12 + Month - 3) + "-1"; endTime = Year + "-" + (Month + 1) + "-" + Day;
} }
break; break;
case "近半年": case "未来3个月":
endTime = Year + "-" + Month + "-" + Day; startTime = Year + "-" + Month + "-" + Day;
if (Month > 6) { if (Month >9) {
startTime = Year + "-" + (Month - 6) + "-1"; endTime = Year+1 + "-" + Month-9 + "-" + + Day;
} else { } else {
startTime = Year - 1 + "-" + (12 + Month - 6) + "-1"; endTime = Year + "-" + (Month + 3) + "-" + Day;
} }
break; break;
case "近1年":
startTime = Year - 1 + "-" + Month + "-" + Day;
endTime = Year + "-" + Month + "-" + Day;
break;
case "自定义": case "自定义":
if (!this.PlanTenderDate) { if (!this.PlanTenderDate) {
this.PlanTenderDateValue = ""; this.PlanTenderDateValue = "";
...@@ -839,6 +803,13 @@ export default { ...@@ -839,6 +803,13 @@ export default {
} }
this.jskBidPlanDto = obj; this.jskBidPlanDto = obj;
}, },
getDate(n){
let date1 = new Date();
let date2 = new Date(date1);
date2.setDate(date1.getDate() + n);
let time2 = date2.getFullYear() + "-" + ("0" + (date2.getMonth() + 1)).slice(-2) + "-" + ("0" + date2.getDate()).slice(-2);
return time2
},
changeIssueTime(type) { changeIssueTime(type) {
if(type=='bid'&&this.tenderDate){ if(type=='bid'&&this.tenderDate){
this.tenderDateValue = "自定义"; this.tenderDateValue = "自定义";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment