对接法规预警

This commit is contained in:
qq787203167
2022-06-23 18:01:25 +08:00
parent 84c6f03ee3
commit 07476d3550
@@ -73,7 +73,8 @@
return { return {
//url传参严格按照当前命名 //url传参严格按照当前命名
url: { url: {
seachList: 'document/bussDocumentLibraryEO/queryCondition' //搜索字段 seachList: 'document/bussDocumentLibraryEO/queryCondition', //搜索字段
list: '/LawsWarn/queryPageInfo'
}, },
activeTab: this.$t('ImplementationDate'), activeTab: this.$t('ImplementationDate'),
loading: false, loading: false,
@@ -82,11 +83,12 @@
total: 0, total: 0,
pageSize: 10, pageSize: 10,
pageNo: 1, pageNo: 1,
searchParmes: {},
searchQueryList: [ searchQueryList: [
{ {
field_show_type: 6, field_show_type: 6,
db_field_txt: this.$t('warningTime'), db_field_txt: this.$t('warningTime'),
db_field_name: 'warningTime' db_field_name: 'WarnTime'
} }
], ],
@@ -165,23 +167,27 @@
} }
}, },
mounted() { mounted() {
this.getList()
eventBUs.$on('searchQuery', search => { eventBUs.$on('searchQuery', search => {
Object.keys(search).forEach(res => { Object.keys(search).forEach(res => {
if (search[res] instanceof Array) { if (search[res] instanceof Array) {
search[res] = search[res].join(',') search[res] = search[res].join(',')
} }
}) })
this.pageNo = 1
this.searchParmes = search this.searchParmes = search
this.getList() this.getList()
}) })
eventBUs.$on('searchReset', target => { eventBUs.$on('searchReset', target => {
this.searchParmes = {} this.searchParmes = {}
this.pageNo = 1
this.getList() this.getList()
}) })
}, },
methods: { methods: {
callback(tab) { callback(tab) {
this.activeTab = tab this.activeTab = tab
this.getList()
}, },
onSelectChange(value) { onSelectChange(value) {
this.selectedRowKeys = value this.selectedRowKeys = value
@@ -205,7 +211,30 @@
this.getList() this.getList()
}, },
getList() { getList() {
let flag
if (this.activeTab == this.$t('ImplementationDate')) {
flag = 0
} else {
flag = 1
}
let params = {
...this.searchParmes,
pageNo: this.pageNo,
pageSize: this.pageSize,
flag: flag
}
this.loading = true
postAction(this.url.list, params).then((res) => {
if (res.success) {
this.dataSource = res.result.records
this.total = res.result.total
this.loading = false
} else {
this.loading = false
}
}).finally(() => {
this.loading = false
})
} }
} }
} }