diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js
index d156de901..cfdad6b29 100644
--- a/jero-web/src/common/lang/en-us.js
+++ b/jero-web/src/common/lang/en-us.js
@@ -954,4 +954,6 @@ module.exports = {
disableInput: 'Disable input',
OnlyOrTaskconfirmationOut: 'Only when the list confirmation status or task confirmation status is to be confirmed can the reminder be carried out',
or: 'or',
+ OnlyOrTaskconfirmationOut: 'Only when the list confirmation status or task confirmation status is to be confirmed can the reminder be carried out',
+ warningTime:'Warning time',
}
\ No newline at end of file
diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js
index 32a434bcd..302f569ab 100644
--- a/jero-web/src/common/lang/zh-cn.js
+++ b/jero-web/src/common/lang/zh-cn.js
@@ -959,4 +959,5 @@ module.exports = {
OnlyOrTaskconfirmationOut:'只有清单确认状态或任务确认状态为待确认时才可以进行催办',
disableInput:'禁止输入',
or: '或',
+ warningTime:'预警时间',
}
\ No newline at end of file
diff --git a/jero-web/src/components/layouts/Tabcrumbs.vue b/jero-web/src/components/layouts/Tabcrumbs.vue
index 4ff89fb50..42616fa75 100644
--- a/jero-web/src/components/layouts/Tabcrumbs.vue
+++ b/jero-web/src/components/layouts/Tabcrumbs.vue
@@ -26,7 +26,10 @@
},
watch: {
'$route': function(val) {
- if (val.meta.title == '首页' || val.meta.title === ' home page') {
+ if (val.meta.title == '首页' ||
+ val.meta.title === ' Home Page' ||
+ this.$route.meta.title === '法规预警' ||
+ this.$route.meta.title === 'Regulatory Early Warning') {
this.Navigation = val.meta.title
this.subNavigation = null
} else {
@@ -36,7 +39,10 @@
},
mounted() {
console.log(this.$route.meta)
- if (this.$route.meta.title === '首页' || this.$route.meta.title === ' home page') {
+ if (this.$route.meta.title === '首页' ||
+ this.$route.meta.title === ' Home Page' ||
+ this.$route.meta.title === '法规预警' ||
+ this.$route.meta.title === 'Regulatory Early Warning') {
this.Navigation = this.$route.meta.title
this.subNavigation = null
} else {
diff --git a/jero-web/src/components/search/index.vue b/jero-web/src/components/search/index.vue
index f8f97fe0e..629ef022d 100644
--- a/jero-web/src/components/search/index.vue
+++ b/jero-web/src/components/search/index.vue
@@ -165,6 +165,14 @@
flag: {
type: String,
default: ''
+ },
+ searchQueryList: {
+ type: Array,
+ default: []
+ },
+ isDefault: {
+ type: Boolean,
+ default: false
}
},
data() {
@@ -183,6 +191,12 @@
},
searchReset() {
this.queryParam = {}
+ if (this.isDefault) {
+ let startTime = moment(new Date()).format('YYYY-MM-DD')
+ let endTime = this.getNewDate('after', 6)
+ this.queryParam['warningTime'] = [startTime, endTime]
+ this.queryParam = { ...this.queryParam }
+ }
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(this.queryParam)))
},
getSeach() {
@@ -192,12 +206,79 @@
getAction(this.url.seachList, params).then((res) => {
if (res.success) {
this.searchList = res.result
+ if (this.searchQueryList && this.searchQueryList.length > 0) {
+ this.searchList = this.searchList.concat(this.searchQueryList)
+ let startTime = moment(new Date()).format('YYYY-MM-DD')
+ let endTime = this.getNewDate('after', 6)
+ this.queryParam['warningTime'] = [startTime, endTime]
+ this.queryParam = { ...this.queryParam }
+ }
}
})
},
- // handleToggleSearch() {
- // this.toggleSearchStatus = !this.toggleSearchStatus
- // },
+ getNewDate(flag, many) {
+
+ const thirtyDays = [4, 6, 9, 11] // 30天的月份
+
+ const thirtyOneDays = [1, 3, 5, 7, 8, 10, 12] // 31天的月份
+
+ const currDate = new Date() // 今天日期
+
+ const year = currDate.getFullYear()
+
+ let month = currDate.getMonth() + 1
+
+ let targetDateMilli = 0
+
+ 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)
+ }
+
+ targetDateMilli = currDate.setDate(
+ currDate.getDate() - (flag === 'before' ? countDays : countDays * -1)
+ )
+
+ 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) {
this.queryParam[item] = moment(this.queryParam[item]).format('YYYY-MM-DD')
},
@@ -216,7 +297,39 @@
}
}
+
\ No newline at end of file