Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
This commit is contained in:
@@ -195,7 +195,7 @@
|
|||||||
this.queryParam = {}
|
this.queryParam = {}
|
||||||
if (this.isDefault) {
|
if (this.isDefault) {
|
||||||
let startTime = moment(new Date()).format('YYYY-MM-DD')
|
let startTime = moment(new Date()).format('YYYY-MM-DD')
|
||||||
let endTime = this.getNewDate('after', 6)
|
let endTime = this.haflYear()
|
||||||
this.queryParam['WarnTime'] = [startTime, endTime]
|
this.queryParam['WarnTime'] = [startTime, endTime]
|
||||||
this.queryParam = { ...this.queryParam }
|
this.queryParam = { ...this.queryParam }
|
||||||
}
|
}
|
||||||
@@ -217,68 +217,26 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getNewDate(flag, many) {
|
haflYear() {
|
||||||
|
// 先获取当前时间
|
||||||
const thirtyDays = [4, 6, 9, 11] // 30天的月份
|
var curDate = (new Date()).getTime()
|
||||||
|
// 将半年的时间单位换算成毫秒
|
||||||
const thirtyOneDays = [1, 3, 5, 7, 8, 10, 12] // 31天的月份
|
var halfYear = 365 / 2 * 24 * 3600 * 1000
|
||||||
|
// 半年前的时间(毫秒单位)
|
||||||
const currDate = new Date() // 今天日期
|
var pastResult = curDate - halfYear
|
||||||
|
// 日期函数,定义起点为半年前
|
||||||
const year = currDate.getFullYear()
|
var pastDate = new Date(pastResult)
|
||||||
|
var pastYear = pastDate.getFullYear()
|
||||||
let month = currDate.getMonth() + 1
|
var pastMonth = pastDate.getMonth() + 1
|
||||||
|
var pastDay = pastDate.getDate()
|
||||||
let targetDateMilli = 0
|
if (pastMonth >= 1 && pastMonth <= 9) {
|
||||||
|
pastMonth = '0' + pastMonth
|
||||||
let GMTDate = '' // 中国标准时间
|
|
||||||
|
|
||||||
let targetYear = '' // 年
|
|
||||||
|
|
||||||
let targetMonth = '' // 月
|
|
||||||
|
|
||||||
let targetDate = '' // 日
|
|
||||||
|
|
||||||
let dealTargetDays = '' // 目标日期
|
|
||||||
|
|
||||||
const isLeapYear = !!((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) // 是否是闰年
|
|
||||||
|
|
||||||
let countDays = 0 // 累计天数
|
|
||||||
|
|
||||||
for (let i = 0; i < many; i++) {
|
|
||||||
|
|
||||||
if (flag === 'before') {
|
|
||||||
|
|
||||||
month = month - 1 <= 0 ? 12 : month - 1
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
month = month + 1 > 12 ? 1 : month + 1
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
thirtyDays.includes(month) ? (countDays += 30) : thirtyOneDays.includes(month) ? (countDays += 31) : isLeapYear ? (countDays += 29) : (countDays += 28)
|
|
||||||
}
|
}
|
||||||
|
if (pastDay >= 0 && pastDay <= 9) {
|
||||||
targetDateMilli = currDate.setDate(
|
pastDay = '0' + pastDay
|
||||||
currDate.getDate() - (flag === 'before' ? countDays : countDays * -1)
|
}
|
||||||
)
|
var endDate = pastYear + '-' + pastMonth + '-' + pastDay
|
||||||
|
return endDate
|
||||||
GMTDate = new Date(targetDateMilli)
|
|
||||||
|
|
||||||
targetYear = GMTDate.getFullYear()
|
|
||||||
|
|
||||||
targetMonth = GMTDate.getMonth() + 1
|
|
||||||
|
|
||||||
targetDate = GMTDate.getDate()
|
|
||||||
|
|
||||||
targetMonth = targetMonth.toString().padStart(2, '0')
|
|
||||||
|
|
||||||
targetDate = targetDate.toString().padStart(2, '0')
|
|
||||||
|
|
||||||
dealTargetDays = `${targetYear}-${targetMonth}-${targetDate}`
|
|
||||||
|
|
||||||
return dealTargetDays
|
|
||||||
},
|
},
|
||||||
dateChange(item) {
|
dateChange(item) {
|
||||||
this.queryParam[item] = moment(this.queryParam[item]).format('YYYY-MM-DD')
|
this.queryParam[item] = moment(this.queryParam[item]).format('YYYY-MM-DD')
|
||||||
|
|||||||
+14
-2
@@ -123,8 +123,8 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
classificationMaintenanceModelForm(){
|
classificationMaintenanceModelForm() {
|
||||||
this.replacePage()
|
this.replacePage()
|
||||||
},
|
},
|
||||||
onSearch() {
|
onSearch() {
|
||||||
this.pageNo = 1
|
this.pageNo = 1
|
||||||
@@ -361,6 +361,18 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 10;
|
line-height: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::v-deep .ant-tag {
|
||||||
|
padding: 2px 4px;
|
||||||
|
background: #9B9DA9;
|
||||||
|
color: #fff!important;
|
||||||
|
}
|
||||||
|
::v-deep .ant-tag-checkable:not(.ant-tag-checkable-checked):hover{
|
||||||
|
color: #fff!important;
|
||||||
|
}
|
||||||
|
::v-deep .ant-tag-checkable-checked{
|
||||||
|
background: #21c9cc;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<style>
|
<style>
|
||||||
.box-content-left .ant-tag {
|
.box-content-left .ant-tag {
|
||||||
|
|||||||
@@ -1239,7 +1239,10 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
::v-deep .ant-modal-body {
|
||||||
|
max-height: 500px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
///deep/ .ant-table-body {
|
///deep/ .ant-table-body {
|
||||||
// overflow: hidden !important; ?????
|
// overflow: hidden !important; ?????
|
||||||
//}
|
//}
|
||||||
@@ -1350,10 +1353,10 @@ export default {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-modal-body {
|
/*.ant-modal-body {*/
|
||||||
max-height: 500px;
|
/* max-height: 500px;*/
|
||||||
overflow-y: auto;
|
/* overflow-y: auto;*/
|
||||||
}
|
/*}*/
|
||||||
|
|
||||||
.split-detail-table {
|
.split-detail-table {
|
||||||
.ant-table-body {
|
.ant-table-body {
|
||||||
|
|||||||
@@ -232,74 +232,32 @@
|
|||||||
},
|
},
|
||||||
clearSelected() {
|
clearSelected() {
|
||||||
let startTime = moment(new Date()).format('YYYY-MM-DD')
|
let startTime = moment(new Date()).format('YYYY-MM-DD')
|
||||||
let endTime = this.getNewDate('after', 6)
|
let endTime = this.haflYear()
|
||||||
this.searchParmes['WarnTime'] = [startTime, endTime]
|
this.searchParmes['WarnTime'] = [startTime, endTime]
|
||||||
this.searchParmes = { ...this.searchParmes }
|
this.searchParmes = { ...this.searchParmes }
|
||||||
this.pageNo = 1
|
this.pageNo = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
getNewDate(flag, many) {
|
haflYear() {
|
||||||
|
// 先获取当前时间
|
||||||
const thirtyDays = [4, 6, 9, 11] // 30天的月份
|
var curDate = (new Date()).getTime()
|
||||||
|
// 将半年的时间单位换算成毫秒
|
||||||
const thirtyOneDays = [1, 3, 5, 7, 8, 10, 12] // 31天的月份
|
var halfYear = 365 / 2 * 24 * 3600 * 1000
|
||||||
|
// 半年前的时间(毫秒单位)
|
||||||
const currDate = new Date() // 今天日期
|
var pastResult = curDate - halfYear
|
||||||
|
// 日期函数,定义起点为半年前
|
||||||
const year = currDate.getFullYear()
|
var pastDate = new Date(pastResult)
|
||||||
|
var pastYear = pastDate.getFullYear()
|
||||||
let month = currDate.getMonth() + 1
|
var pastMonth = pastDate.getMonth() + 1
|
||||||
|
var pastDay = pastDate.getDate()
|
||||||
let targetDateMilli = 0
|
if (pastMonth >= 1 && pastMonth <= 9) {
|
||||||
|
pastMonth = '0' + pastMonth
|
||||||
let GMTDate = '' // 中国标准时间
|
|
||||||
|
|
||||||
let targetYear = '' // 年
|
|
||||||
|
|
||||||
let targetMonth = '' // 月
|
|
||||||
|
|
||||||
let targetDate = '' // 日
|
|
||||||
|
|
||||||
let dealTargetDays = '' // 目标日期
|
|
||||||
|
|
||||||
const isLeapYear = !!((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) // 是否是闰年
|
|
||||||
|
|
||||||
let countDays = 0 // 累计天数
|
|
||||||
|
|
||||||
for (let i = 0; i < many; i++) {
|
|
||||||
|
|
||||||
if (flag === 'before') {
|
|
||||||
|
|
||||||
month = month - 1 <= 0 ? 12 : month - 1
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
month = month + 1 > 12 ? 1 : month + 1
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
thirtyDays.includes(month) ? (countDays += 30) : thirtyOneDays.includes(month) ? (countDays += 31) : isLeapYear ? (countDays += 29) : (countDays += 28)
|
|
||||||
}
|
}
|
||||||
|
if (pastDay >= 0 && pastDay <= 9) {
|
||||||
targetDateMilli = currDate.setDate(
|
pastDay = '0' + pastDay
|
||||||
currDate.getDate() - (flag === 'before' ? countDays : countDays * -1)
|
}
|
||||||
)
|
var endDate = pastYear + '-' + pastMonth + '-' + pastDay
|
||||||
|
return endDate
|
||||||
GMTDate = new Date(targetDateMilli)
|
|
||||||
|
|
||||||
targetYear = GMTDate.getFullYear()
|
|
||||||
|
|
||||||
targetMonth = GMTDate.getMonth() + 1
|
|
||||||
|
|
||||||
targetDate = GMTDate.getDate()
|
|
||||||
|
|
||||||
targetMonth = targetMonth.toString().padStart(2, '0')
|
|
||||||
|
|
||||||
targetDate = targetDate.toString().padStart(2, '0')
|
|
||||||
|
|
||||||
dealTargetDays = `${targetYear}-${targetMonth}-${targetDate}`
|
|
||||||
|
|
||||||
return dealTargetDays
|
|
||||||
},
|
},
|
||||||
pageOnChange(page) {
|
pageOnChange(page) {
|
||||||
this.pageNo = page
|
this.pageNo = page
|
||||||
|
|||||||
Reference in New Issue
Block a user