|
@@ -146,7 +146,7 @@ export default {
|
|
let bMonth = newDate.getMonth() + 1;
|
|
let bMonth = newDate.getMonth() + 1;
|
|
let aMonth = bMonth < 10 ? "0" + bMonth : bMonth;
|
|
let aMonth = bMonth < 10 ? "0" + bMonth : bMonth;
|
|
let a = newDate.getFullYear() + "-" + aMonth;
|
|
let a = newDate.getFullYear() + "-" + aMonth;
|
|
- this.initData(null, a);
|
|
|
|
|
|
+ this.changeMonth(null);
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
initData(_istrue, yearMonth) {
|
|
initData(_istrue, yearMonth) {
|
|
@@ -176,13 +176,14 @@ export default {
|
|
// 判断是加载,还是调用
|
|
// 判断是加载,还是调用
|
|
if (istrue) {
|
|
if (istrue) {
|
|
date = new Date(istrue);
|
|
date = new Date(istrue);
|
|
|
|
+ // _this.currentMonth = date.getMonth();
|
|
} else {
|
|
} else {
|
|
date = new Date();
|
|
date = new Date();
|
|
|
|
+ // _this.currentMonth = date.getMonth() + 1;
|
|
}
|
|
}
|
|
// 获取年 月 日
|
|
// 获取年 月 日
|
|
- _this.currentDay = date.getDate();
|
|
|
|
- _this.currentMonth = date.getMonth() + 1;
|
|
|
|
- _this.currentYear = date.getFullYear();
|
|
|
|
|
|
+ // _this.currentDay = date.getDate();
|
|
|
|
+ // _this.currentYear = date.getFullYear();
|
|
// 获取当月的所有天数
|
|
// 获取当月的所有天数
|
|
var newdays = new Date(_this.currentYear, _this.currentMonth, 0);
|
|
var newdays = new Date(_this.currentYear, _this.currentMonth, 0);
|
|
var newPrevDays = new Date(
|
|
var newPrevDays = new Date(
|
|
@@ -270,7 +271,7 @@ export default {
|
|
if (isAB === "a") {
|
|
if (isAB === "a") {
|
|
// 记录减的月份;
|
|
// 记录减的月份;
|
|
let year = this.OriginalS.getFullYear();
|
|
let year = this.OriginalS.getFullYear();
|
|
- let month = this.OriginalS.getMonth();
|
|
|
|
|
|
+ let month = parseInt(this.currentMonth)-1
|
|
let day = this.OriginalS.getDate();
|
|
let day = this.OriginalS.getDate();
|
|
if (month == 0) {
|
|
if (month == 0) {
|
|
year = year - 1;
|
|
year = year - 1;
|
|
@@ -278,7 +279,7 @@ export default {
|
|
}
|
|
}
|
|
let amonth = month < 10 ? "0" + month : month;
|
|
let amonth = month < 10 ? "0" + month : month;
|
|
this.currentYear = year;
|
|
this.currentYear = year;
|
|
- this.currentMonth = month;
|
|
|
|
|
|
+ this.currentMonth = amonth;
|
|
this.OriginalS = new Date(year + "-" + month + "-" + day);
|
|
this.OriginalS = new Date(year + "-" + month + "-" + day);
|
|
// 判断月份是否是一月份
|
|
// 判断月份是否是一月份
|
|
this.initData(year + "-" + month + "-" + day, year + "-" + amonth);
|
|
this.initData(year + "-" + month + "-" + day, year + "-" + amonth);
|
|
@@ -286,7 +287,7 @@ export default {
|
|
this.dayNum = {};
|
|
this.dayNum = {};
|
|
// 记录减的月份;
|
|
// 记录减的月份;
|
|
let year = this.OriginalS.getFullYear();
|
|
let year = this.OriginalS.getFullYear();
|
|
- let month = this.OriginalS.getMonth() + 2;
|
|
|
|
|
|
+ let month = parseInt(this.currentMonth)+1;
|
|
let day = this.OriginalS.getDate();
|
|
let day = this.OriginalS.getDate();
|
|
if (month > 12) {
|
|
if (month > 12) {
|
|
year = year + 1;
|
|
year = year + 1;
|
|
@@ -294,14 +295,18 @@ export default {
|
|
}
|
|
}
|
|
let amonth = month < 10 ? "0" + month : month;
|
|
let amonth = month < 10 ? "0" + month : month;
|
|
this.currentYear = year;
|
|
this.currentYear = year;
|
|
- this.currentMonth = month;
|
|
|
|
|
|
+ this.currentMonth = amonth;
|
|
this.OriginalS = new Date(year + "-" + month + "-" + day);
|
|
this.OriginalS = new Date(year + "-" + month + "-" + day);
|
|
// 判断月份是否是一月份
|
|
// 判断月份是否是一月份
|
|
this.initData(year + "-" + month + "-" + day, year + "-" + amonth);
|
|
this.initData(year + "-" + month + "-" + day, year + "-" + amonth);
|
|
} else {
|
|
} else {
|
|
this.OriginalS = new Date();
|
|
this.OriginalS = new Date();
|
|
|
|
+ let year = this.OriginalS.getFullYear();
|
|
let bMonth = this.OriginalS.getMonth() + 1;
|
|
let bMonth = this.OriginalS.getMonth() + 1;
|
|
let aMonth = bMonth < 10 ? "0" + bMonth : bMonth;
|
|
let aMonth = bMonth < 10 ? "0" + bMonth : bMonth;
|
|
|
|
+ this.currentDay=this.OriginalS.getDate();
|
|
|
|
+ this.currentYear = this.OriginalS.getFullYear();
|
|
|
|
+ this.currentMonth = aMonth;
|
|
let a = this.OriginalS.getFullYear() + "-" + aMonth;
|
|
let a = this.OriginalS.getFullYear() + "-" + aMonth;
|
|
this.initData(null, a);
|
|
this.initData(null, a);
|
|
}
|
|
}
|
|
@@ -345,7 +350,6 @@ export default {
|
|
ymd[1] = parseInt(ymd[1]) < 10 ? `0${parseInt(ymd[1])}` : ymd[1];
|
|
ymd[1] = parseInt(ymd[1]) < 10 ? `0${parseInt(ymd[1])}` : ymd[1];
|
|
ymd[2] = parseInt(ymd[2]) < 10 ? `0${parseInt(ymd[2])}` : ymd[2];
|
|
ymd[2] = parseInt(ymd[2]) < 10 ? `0${parseInt(ymd[2])}` : ymd[2];
|
|
val.YMD = ymd.join("-");
|
|
val.YMD = ymd.join("-");
|
|
- console.log(val.YMD);
|
|
|
|
var url = "system/home/enterprise/calendar/taskLiftNum";
|
|
var url = "system/home/enterprise/calendar/taskLiftNum";
|
|
var param = {
|
|
var param = {
|
|
mtCompanyId: JSON.parse(sessionStorage.getItem("companyID")).id,
|
|
mtCompanyId: JSON.parse(sessionStorage.getItem("companyID")).id,
|
|
@@ -353,7 +357,6 @@ export default {
|
|
calendarLiftStatus: item.key
|
|
calendarLiftStatus: item.key
|
|
};
|
|
};
|
|
this.axios.post(url, param).then(res => {
|
|
this.axios.post(url, param).then(res => {
|
|
- console.log(res);
|
|
|
|
if (res.statusCode === "1") {
|
|
if (res.statusCode === "1") {
|
|
this.eleTableList = res.data;
|
|
this.eleTableList = res.data;
|
|
} else {
|
|
} else {
|