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() { created() {
if (!this.disableMixinCreated) { if (!this.disableMixinCreated) {
console.log(' -- mixin created -- ') console.log(' -- mixin created -- ')
// this.loadData(); this.loadData();
//初始化字典配置 在自己页面定义 //初始化字典配置 在自己页面定义
this.initDictConfig(); this.initDictConfig();
} }

View File

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

View File

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