From e69e2ad877d547665ade987caf5c38fa7191fbce Mon Sep 17 00:00:00 2001 From: orgin Date: Mon, 12 Jun 2023 14:29:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=88=9D=E5=A7=8B=E5=8C=96=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=9D=A1=E4=BB=B6=EF=BC=8C=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?stations=E4=B8=8B=E6=8B=89=E5=A4=9A=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/blankphd.vue | 78 ++++++++++++++++++++++++------- 1 file changed, 60 insertions(+), 18 deletions(-) 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',