arr rrr 页面筛选条件添加记录功能

This commit is contained in:
任珮宇 2024-01-15 17:17:11 +08:00
parent 20aa13cd82
commit eb70334a46
3 changed files with 45 additions and 22 deletions

View File

@ -55,7 +55,7 @@ export const JeecgListMixin = {
created() {
if (!this.disableMixinCreated) {
console.log(' -- mixin created -- ')
// this.loadData();
this.loadData();
//初始化字典配置 在自己页面定义
this.initDictConfig();
}

View File

@ -81,13 +81,13 @@ const columns = [
title: 'Analyst',
align: 'left',
dataIndex: 'analyst',
}
},
]
import { compareDate } from '../../commom'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { getAction, getFileAction } from '../../../../api/manage'
import dateFormat from '../../../../components/jeecg/JEasyCron/format-date'
import FileDetail from '../../fileDetail.vue'
import moment from 'moment'
export default {
name: 'menuTree',
mixins: [JeecgListMixin],
@ -100,9 +100,14 @@ export default {
isImmediate: true,
columns,
queryParam: {
startTime: dateFormat(new Date(), 'yyyy-MM-dd'),
endTime: dateFormat(new Date(), 'yyyy-MM-dd'),
startTime: sessionStorage.getItem('currStartDate')
? sessionStorage.getItem('currStartDate')
: moment().subtract(6, 'days').format('YYYY-MM-DD'),
endTime: sessionStorage.getItem('currEndDate')
? sessionStorage.getItem('currEndDate')
: moment().format('YYYY-MM-DD'),
stationIds: [],
qualifie: undefined,
},
url: {
list: '/radionuclide/findAutoPage',
@ -119,7 +124,7 @@ export default {
}
},
created() {
this.queryParam.startTime = this.getBeforeDate(9)
// this.queryParam.startTime = this.getBeforeDate(9)
this.findStationList()
},
methods: {
@ -192,8 +197,11 @@ export default {
if (res.result.length > 0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
//
this.queryParam.stationIds = this.stationList.map((item) => item.value)
this.allChecked = true
let arr = sessionStorage.getItem('selectedSta') ? sessionStorage.getItem('selectedSta').split(',') : []
this.queryParam.stationIds = arr.map((item) => Number(item))
this.queryParam.qualifie = sessionStorage.getItem('qualifie')
? sessionStorage.getItem('qualifie')
: undefined
this.searchQueryData()
} else {
this.stationList = []
@ -220,8 +228,9 @@ export default {
this.queryParam.stationIds = []
}
},
handleQualifieChange(val){
handleQualifieChange(val) {
this.queryParam.qualifie = val
sessionStorage.setItem('qualifie', val)
},
getBeforeDate(n) {
var n = n
@ -327,7 +336,10 @@ export default {
props: {
allowClear: true,
placeholder: 'Select qualifie',
options: [{label: 'FULL', value: "FULL"}, {label: 'PREL', value: "PREL"}],
options: [
{ label: 'FULL', value: 'FULL' },
{ label: 'PREL', value: 'PREL' },
],
style: {
width: '200px',
},
@ -338,7 +350,7 @@ export default {
style: {
width: 'auto',
},
}
},
]
},
},

View File

@ -81,13 +81,13 @@ const columns = [
title: 'Analyst',
align: 'left',
dataIndex: 'analyst',
}
},
]
import { compareDate } from '../../commom'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { getAction, getFileAction } from '../../../../api/manage'
import dateFormat from '../../../../components/jeecg/JEasyCron/format-date'
import FileDetail from '../../fileDetail.vue'
import moment from 'moment'
export default {
name: 'menuTree',
mixins: [JeecgListMixin],
@ -100,10 +100,14 @@ export default {
isImmediate: true,
columns,
queryParam: {
startTime: dateFormat(new Date(), 'yyyy-MM-dd'),
endTime: dateFormat(new Date(), 'yyyy-MM-dd'),
startTime: sessionStorage.getItem('currStartDate')
? sessionStorage.getItem('currStartDate')
: moment().subtract(6, 'days').format('YYYY-MM-DD'),
endTime: sessionStorage.getItem('currEndDate')
? sessionStorage.getItem('currEndDate')
: moment().format('YYYY-MM-DD'),
stationIds: [],
qualifie: ''
qualifie: undefined,
},
url: {
list: '/radionuclide/findReviewedPage',
@ -120,7 +124,7 @@ export default {
}
},
created() {
this.queryParam.startTime = this.getBeforeDate(9)
// this.queryParam.startTime = this.getBeforeDate(9)
this.findStationList()
},
methods: {
@ -193,8 +197,11 @@ export default {
if (res.result.length > 0) {
this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId }))
//
this.queryParam.stationIds = this.stationList.map((item) => item.value)
this.allChecked = true
let arr = sessionStorage.getItem('selectedSta') ? sessionStorage.getItem('selectedSta').split(',') : []
this.queryParam.stationIds = arr.map((item) => Number(item))
this.queryParam.qualifie = sessionStorage.getItem('qualifie')
? sessionStorage.getItem('qualifie')
: undefined
this.searchQueryData()
} else {
this.stationList = []
@ -220,8 +227,9 @@ export default {
this.queryParam.stationIds = []
}
},
handleQualifieChange(val){
handleQualifieChange(val) {
this.queryParam.qualifie = val
sessionStorage.setItem('qualifie', val)
},
getBeforeDate(n) {
var n = n
@ -327,7 +335,10 @@ export default {
props: {
allowClear: true,
placeholder: 'Select qualifie',
options: [{label: 'FULL', value: "FULL"}, {label: 'PREL', value: "PREL"}],
options: [
{ label: 'FULL', value: 'FULL' },
{ label: 'PREL', value: 'PREL' },
],
style: {
width: '200px',
},
@ -338,7 +349,7 @@ export default {
style: {
width: 'auto',
},
}
},
]
},
},