diff --git a/src/views/statistics/blankphd.vue b/src/views/statistics/blankphd.vue index f1f16d1..aeeaf73 100644 --- a/src/views/statistics/blankphd.vue +++ b/src/views/statistics/blankphd.vue @@ -52,50 +52,82 @@ const columns = [ { title: 'STATION', align: 'left', - dataIndex: 'siteDetCode', + dataIndex: 'stationName', width: 130, }, { title: 'DETECTOR CODE', align: 'left', width: 100, - dataIndex: 'sampleId', + dataIndex: 'siteDetCode', }, { title: 'SPECTRAL QUALIFIER', align: 'left', width: 100, - dataIndex: 'stationName', + dataIndex: 'spectralQualifie', }, { title: 'ACQUISITION START TIME', align: 'left', width: 100, - dataIndex: 'detectorsName', + dataIndex: 'acquisitionStart', }, { title: 'ACQUISITION STOP TIME', align: 'left', width: 120, - dataIndex: 'sampleType', + dataIndex: 'acquisitionStop', }, ] import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import { getAction } from '../../api/manage' +import dateFormat from '../../components/jeecg/JEasyCron/format-date' export default { name: 'menuTree', mixins: [JeecgListMixin], data() { return { columns, - url: { - list: '/gardsSampleData/findPage', - delete: '/gardsSampleData/deleteById', + queryParam: { + dataType: 'B', + startTime: dateFormat(new Date(), 'yyyy-MM-dd'), + endTime: dateFormat(new Date(), 'yyyy-MM-dd'), }, + url: { + list: '/webStatistics/findParticulatePage', + delete: '/gardsSampleData/deleteById', + findStationList: '/webStatistics/findStationList', + findParticulatePage: '/jeecg-web-statistics/webStatistics/findParticulatePage', + }, + stationList: [], } }, - created() {}, + mounted() { + this.queryParam.dataType = this.$route.meta.title + }, + created() { + this.findStationList() + }, + watch: { + '$route.meta.title'(val) { + if(val === 'SPHDF'){ + this.queryParam.dataType = 'FULL' + } else if(val === 'SPHDP'){ + this.queryParam.dataType = 'PREL' + } else{ + this.queryParam.dataType = val.substring(0, 1) + } + this.searchQuery() + }, + }, methods: { handleTableChange() {}, + findStationList() { + getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => { + this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) + }) + }, }, computed: { formItems() { @@ -103,8 +135,9 @@ export default { { type: 'a-input', label: '', - name: 'username', + name: 'search', props: { + placeholder: 'search...', style: { width: '166px', }, @@ -116,9 +149,18 @@ export default { { type: 'custom-select', label: 'Stations', - name: 'roleId', + name: 'stationIds', props: { - options: this.roleOptions, + placeholder: 'select stations', + mode: 'multiple', + maxTagCount: 1, + options: [ + { + label: 'ALL', + value: '', + }, + ...this.stationList, + ], style: { width: '200px', }, @@ -130,11 +172,11 @@ export default { { label: 'Start date', type: 'custom-date-picker', - name: 'collectStart', + name: 'startTime', props: { showTime: { format: 'HH:mm' }, - format: 'YYYY-MM-DD HH:mm', - valueFormat: 'YYYY-MM-DD HH:mm:ss', + format: 'YYYY-MM-DD', + valueFormat: 'YYYY-MM-DD:ss', style: { minWidth: 'auto', width: '200px', @@ -147,11 +189,11 @@ export default { { label: 'End date', type: 'custom-date-picker', - name: 'collectStop', + name: 'endTime', props: { showTime: { format: 'HH:mm' }, - format: 'YYYY-MM-DD HH:mm', - valueFormat: 'YYYY-MM-DD HH:mm:ss', + format: 'YYYY-MM-DD', + valueFormat: 'YYYY-MM-DD:ss', style: { minWidth: 'auto', width: '200px',