|
@@ -490,6 +490,16 @@
|
|
};
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 获取地址上的参数
|
|
|
|
+ getUrlKey(name) {
|
|
|
|
+ return (
|
|
|
|
+ decodeURIComponent(
|
|
|
|
+ (new RegExp("[?|&]" + name + "=" + "([^&;]+?)(&|#|;|$)").exec(
|
|
|
|
+ location.href
|
|
|
|
+ ) || [, ""])[1].replace(/\+/g, "%20")
|
|
|
|
+ ) || null
|
|
|
|
+ );
|
|
|
|
+ },
|
|
getRecentlyProject() {
|
|
getRecentlyProject() {
|
|
this.$axios.post('/project/nearProject',{})
|
|
this.$axios.post('/project/nearProject',{})
|
|
.then(res => {
|
|
.then(res => {
|
|
@@ -672,6 +682,7 @@
|
|
// }else{
|
|
// }else{
|
|
// this.weekIndex = 5
|
|
// this.weekIndex = 5
|
|
// }
|
|
// }
|
|
|
|
+ const { enableNewWeeklyfill } = this.user.timeType // 针对物奇
|
|
if(this.user.timeType.alertNonWorkday) {
|
|
if(this.user.timeType.alertNonWorkday) {
|
|
if(this.user.timeType.alertNonWorkday == '110' || this.user.timeType.alertNonWorkday == '10') {
|
|
if(this.user.timeType.alertNonWorkday == '110' || this.user.timeType.alertNonWorkday == '10') {
|
|
this.weekIndex = 7
|
|
this.weekIndex = 7
|
|
@@ -684,6 +695,17 @@
|
|
}
|
|
}
|
|
|
|
|
|
let nowDate = new Date()
|
|
let nowDate = new Date()
|
|
|
|
+
|
|
|
|
+ console.log(nowDate, '<=== nowDate')
|
|
|
|
+ // 针对物奇
|
|
|
|
+ if(enableNewWeeklyfill == 1) {
|
|
|
|
+ const urldate = this.getUrlKey('date')
|
|
|
|
+ if(urldate) {
|
|
|
|
+ nowDate = new Date(urldate)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
let nowWeekday = nowDate.getDay()
|
|
let nowWeekday = nowDate.getDay()
|
|
|
|
|
|
let shuldDate
|
|
let shuldDate
|
|
@@ -697,10 +719,10 @@
|
|
|
|
|
|
// 时间段数组
|
|
// 时间段数组
|
|
let date = new Date(shuldDate.getFullYear(),shuldDate.getMonth(),shuldDate.getDate()-shuldDate.getDay()+1)
|
|
let date = new Date(shuldDate.getFullYear(),shuldDate.getMonth(),shuldDate.getDate()-shuldDate.getDay()+1)
|
|
-
|
|
|
|
- const { enableNewWeeklyfill } = this.user.timeType // 针对物奇
|
|
|
|
|
|
+ console.log(this.formatDate(date), '<=== date', this.formatDate(shuldDate), this.formatDate(nowWeekday))
|
|
this.dateRange = []
|
|
this.dateRange = []
|
|
- if(enableNewWeeklyfill) {
|
|
|
|
|
|
+
|
|
|
|
+ if(enableNewWeeklyfill) { // 针对物奇
|
|
let { data } = await this.$axios.post('/report/getWeeklyFillReportData', {
|
|
let { data } = await this.$axios.post('/report/getWeeklyFillReportData', {
|
|
targetDate: this.formatDate(date)
|
|
targetDate: this.formatDate(date)
|
|
})
|
|
})
|
|
@@ -2284,6 +2306,15 @@
|
|
},
|
|
},
|
|
|
|
|
|
mounted() {
|
|
mounted() {
|
|
|
|
+ this.getUrlKey('date')
|
|
|
|
+ const { enableNewWeeklyfill } = this.user.timeType // 针对物奇
|
|
|
|
+ // if(enableNewWeeklyfill == 1) {
|
|
|
|
+ // const urldate = this.getUrlKey('date')
|
|
|
|
+ // if(urldate) {
|
|
|
|
+ // this.nowTime = this.formatTime(urldate)
|
|
|
|
+ // console.log(this.nowTime, '时间')
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
this.timeRange = []
|
|
this.timeRange = []
|
|
for(let i=0.5; i<=20; i+=0.5){
|
|
for(let i=0.5; i<=20; i+=0.5){
|
|
this.timeRange.push(i)
|
|
this.timeRange.push(i)
|