From 91208e243830384c54657d4c2f81230d3230319b Mon Sep 17 00:00:00 2001
From: sunFlower <787203167@qq.com>
Date: Thu, 22 Sep 2022 11:16:28 +0800
Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E4=B8=89=E6=9C=9F=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=E7=82=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jero-web/src/common/lang/en-us.js | 4 +
jero-web/src/common/lang/zh-cn.js | 4 +
jero-web/src/components/search/index.vue | 88 ++++++++++++++++---
.../views/regulatoryEarlyWarning/index.vue | 63 ++++++++++---
4 files changed, 133 insertions(+), 26 deletions(-)
diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js
index 1547b8510..ee96eeee6 100644
--- a/jero-web/src/common/lang/en-us.js
+++ b/jero-web/src/common/lang/en-us.js
@@ -1301,4 +1301,8 @@ module.exports = {
exportFileName:'Export file name',
initiateSupplementaryProcess:'Initiate supplementary process',
whetherTheDisassemblySheetIncluded:'Whether the disassembly sheet is included',
+ inRecentMonths3:'In recent 3 months',
+ inRecentMonths6:'In recent 6 months',
+ inRecentYear1:'In recent 1 year',
+ inRecentYear2:'In recent 2 year',
}
\ 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 202ac4dda..f3c0d229a 100644
--- a/jero-web/src/common/lang/zh-cn.js
+++ b/jero-web/src/common/lang/zh-cn.js
@@ -1402,4 +1402,8 @@ module.exports = {
exportFileName:'导出文件名称',
initiateSupplementaryProcess:'发起补充流程',
whetherTheDisassemblySheetIncluded:'是否含有拆解单',
+ inRecentMonths3:'近3个月内',
+ inRecentMonths6:'近6个月内',
+ inRecentYear1:'近1年内',
+ inRecentYear2:'近2年内',
}
\ No newline at end of file
diff --git a/jero-web/src/components/search/index.vue b/jero-web/src/components/search/index.vue
index 6184eda9e..4bf3a540b 100644
--- a/jero-web/src/components/search/index.vue
+++ b/jero-web/src/components/search/index.vue
@@ -67,6 +67,24 @@
:type="'select'"
:triggerChange="false" :dictCode="item.dict_field"/>
+
+
+ {{item.db_field_txt}}
+
+
+
+
+ {{ item.name }}
+
+
+
+
@@ -133,6 +151,24 @@
:type="'select'"
:triggerChange="false" :dictCode="item.dict_field"/>
+
+
+ {{item.db_field_txt}}
+
+
+
+
+ {{ item.name }}
+
+
+
+
@@ -190,11 +226,12 @@
methods: {
searchQuery() {
if (this.isDefault) {
+ if (!this.queryParam['WarnTimeText']) {
+ this.queryParam['WarnTimeText'] = '2'
+ }
let startTime = moment(new Date()).format('YYYY-MM-DD')
let endTime = this.getNowdate()
- if (this.queryParam['WarnTime'].length == 0) {
- this.queryParam['WarnTime'] = [startTime, endTime]
- }
+ this.queryParam['WarnTime'] = [startTime, endTime]
this.queryParam = { ...this.queryParam }
}
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(this.queryParam)))
@@ -203,8 +240,8 @@
this.queryParam = {}
if (this.isDefault) {
let startTime = moment(new Date()).format('YYYY-MM-DD')
+ this.queryParam['WarnTimeText'] = '2'
let endTime = this.getNowdate()
- console.log(endTime)
this.queryParam['WarnTime'] = [startTime, endTime]
this.queryParam = { ...this.queryParam }
}
@@ -218,7 +255,17 @@
if (res.success) {
this.searchList = res.result
if (this.searchQueryList && this.searchQueryList.length > 0) {
- this.searchList = this.searchList.concat(this.searchQueryList)
+ for (let i = 0; i < this.searchList.length; i++) {
+ if (this.searchList[i].db_field_name == 'issue_time') {
+ this.searchList.splice(i, 1)
+ i--
+ }
+ if (this.searchList[i].db_field_name == 'title') {
+ let data = this.searchList[i + 1]
+ this.searchList[i + 1] = this.searchQueryList[0]
+ this.searchList.push(data)
+ }
+ }
if (this.isDefault) {
this.searchReset()
}
@@ -226,26 +273,41 @@
}
})
},
- getNowdate(){
+ getNowdate() {
+ let monthData
+ let yearData
+ if (this.queryParam['WarnTimeText'] == '1') {
+ monthData = 4
+ yearData = 1
+ } else if (this.queryParam['WarnTimeText'] == '2') {
+ monthData = 7
+ yearData = 1
+ } else if (this.queryParam['WarnTimeText'] == '3') {
+ monthData = 13
+ yearData = 1
+ } else if (this.queryParam['WarnTimeText'] == '4') {
+ monthData = 25
+ yearData = 2
+ }
var date_now = new Date()//获取当前时间
var year = date_now.getFullYear()//获取当前时间的年份
var month = date_now.getMonth()//获取当前时间的月份
var day = date_now.getDate()//获取当前时间的日
- var days = new Date(year,month,0)//将获取到的年月赋值给days
+ var days = new Date(year, month, 0)//将获取到的年月赋值给days
days = days.getDate()//获取当前年月的日
var year2 = year
- var month2 = parseInt(month+7)//获取当前月份的1一个月以后的月份
- if(month2 > 12){
- year2 = parseInt(year2) + 1
+ var month2 = parseInt(month + monthData)//获取当前月份的1一个月以后的月份
+ if (month2 > 12) {
+ year2 = parseInt(year2) + yearData
month2 = parseInt(month2) % 12
}//考虑到12月要是获取一个月以后,就是一月,年份需要加一 ,一年没有13月,所以%12,取得来年1月
var day2 = day
- var days2 = new Date(year2,month2,0)
+ var days2 = new Date(year2, month2, 0)
days2 = days2.getDate()
- if(day2>days2){
+ if (day2 > days2) {
day2 = days2
}//获取了当前年份的日和6个月以后的日,为的就是判断如果前一个月是有31号,后一个月没有,就将一个月以后的日期取到,赋值给day2
- if(month2 < 10){
+ if (month2 < 10) {
month2 = '0' + month2
}
var time = year2 + '-' + month2 + '-' + day2
diff --git a/jero-web/src/views/regulatoryEarlyWarning/index.vue b/jero-web/src/views/regulatoryEarlyWarning/index.vue
index 5920517da..dbb45982a 100644
--- a/jero-web/src/views/regulatoryEarlyWarning/index.vue
+++ b/jero-web/src/views/regulatoryEarlyWarning/index.vue
@@ -122,9 +122,27 @@
searchParmes: {},
searchQueryList: [
{
- field_show_type: 6,
+ field_show_type: 12,
db_field_txt: this.$t('warningTime'),
- db_field_name: 'WarnTime'
+ db_field_name: 'WarnTimeText',
+ option: [
+ {
+ value: '1',
+ name:this.$t('inRecentMonths3')
+ },
+ {
+ value: '2',
+ name: this.$t('inRecentMonths6')
+ },
+ {
+ value: '3',
+ name: this.$t('inRecentYear1')
+ },
+ {
+ value: '4',
+ name: this.$t('inRecentYear2')
+ }
+ ]
}
],
@@ -240,7 +258,7 @@
} else {
flag = 2
}
- this.$refs.libraryPushRef.getPush(JSON.parse(JSON.stringify(this.selectedRowKeys)),flag)
+ this.$refs.libraryPushRef.getPush(JSON.parse(JSON.stringify(this.selectedRowKeys)), flag)
})
} else {
this.$message.warning(this.$t('selectLeastOne'))
@@ -272,6 +290,9 @@
this.selectedRowKeys = []
},
clearSelected() {
+ if (!this.searchParmes['WarnTimeText']) {
+ this.searchParmes['WarnTimeText'] = '2'
+ }
let startTime = moment(new Date()).format('YYYY-MM-DD')
let endTime = this.getNowdate()
this.searchParmes['WarnTime'] = [startTime, endTime]
@@ -279,26 +300,41 @@
this.pageNo = 1
this.getList()
},
- getNowdate(){
+ getNowdate() {
+ let monthData
+ let yearData
+ if (this.searchParmes['WarnTimeText'] == '1') {
+ monthData = 4
+ yearData = 1
+ } else if (this.searchParmes['WarnTimeText'] == '2') {
+ monthData = 7
+ yearData = 1
+ } else if (this.searchParmes['WarnTimeText'] == '3') {
+ monthData = 13
+ yearData = 1
+ } else if (this.searchParmes['WarnTimeText'] == '4') {
+ monthData = 25
+ yearData = 2
+ }
var date_now = new Date()//获取当前时间
var year = date_now.getFullYear()//获取当前时间的年份
var month = date_now.getMonth()//获取当前时间的月份
var day = date_now.getDate()//获取当前时间的日
- var days = new Date(year,month,0)//将获取到的年月赋值给days
+ var days = new Date(year, month, 0)//将获取到的年月赋值给days
days = days.getDate()//获取当前年月的日
var year2 = year
- var month2 = parseInt(month+7)//获取当前月份的1一个月以后的月份
- if(month2 > 12){
- year2 = parseInt(year2) + 1
+ var month2 = parseInt(month + monthData)//获取当前月份的1一个月以后的月份
+ if (month2 > 12) {
+ year2 = parseInt(year2) + yearData
month2 = parseInt(month2) % 12
}//考虑到12月要是获取一个月以后,就是一月,年份需要加一 ,一年没有13月,所以%12,取得来年1月
var day2 = day
- var days2 = new Date(year2,month2,0)
+ var days2 = new Date(year2, month2, 0)
days2 = days2.getDate()
- if(day2>days2){
+ if (day2 > days2) {
day2 = days2
}//获取了当前年份的日和6个月以后的日,为的就是判断如果前一个月是有31号,后一个月没有,就将一个月以后的日期取到,赋值给day2
- if(month2 < 10){
+ if (month2 < 10) {
month2 = '0' + month2
}
var time = year2 + '-' + month2 + '-' + day2
@@ -350,12 +386,13 @@
text-align: right;
margin-top: 20px;
}
+
::v-deep .ant-table-row:first-child {
- background: #fff!important;
+ background: #fff !important;
opacity: 0.9;
}
::v-deep .ant-table-body {
- background: transparent!important;
+ background: transparent !important;
}
\ No newline at end of file