From c69d7e9b0d11b9b0e924803cbe379649e4c52a24 Mon Sep 17 00:00:00 2001 From: renpy Date: Mon, 3 Jul 2023 10:52:35 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/detail.vue | 107 ++++++++++++++++++++------------ 1 file changed, 67 insertions(+), 40 deletions(-) diff --git a/src/views/statistics/detail.vue b/src/views/statistics/detail.vue index c0c6d5f..c1ebd13 100644 --- a/src/views/statistics/detail.vue +++ b/src/views/statistics/detail.vue @@ -7,13 +7,13 @@
- ZIP + ZIP
- TXT + TXT
- View Report + View Report
@@ -22,72 +22,72 @@
GENERAL INFORMATION
- Site Code: - {{ allData.headerBlock.siteCode }} + Site Code: + {{ allData.headerBlock.siteCode }} - Detector Code: - {{ allData.headerBlock.detectorCode }} + Detector Code: + {{ allData.headerBlock.detectorCode }} - System Type: - {{ allData.headerBlock.systemType }} + System Type: + {{ allData.headerBlock.systemType }} - Sample Geometry: - {{ allData.headerBlock.sampleGeometry }} + Sample Geometry: + {{ allData.headerBlock.sampleGeometry }} - Spectrum Qualifier: - {{ allData.headerBlock.spectrumQualifier }}P + Spectrum Qualifier: + {{ allData.headerBlock.spectrumQualifier }}P - Sample Reference Identification: - {{ allData.headerBlock.sampleReferenceIdentification }} + Sample Reference Identification: + {{ allData.headerBlock.sampleReferenceIdentification }} - Measurement Identification: - {{ allData.headerBlock.measurementIdentification }} + Measurement Identification: + {{ allData.headerBlock.measurementIdentification }} - Detector Background Measurement Identification: - {{ allData.headerBlock.detectorBackgroundMeasurementId }} + Detector Background Measurement Identification: + {{ allData.headerBlock.detectorBackgroundMeasurementId }} - Gas Background Measurement Identification: - {{ allData.headerBlock.gasBackgroundMeasurementId }} + Gas Background Measurement Identification: + {{ allData.headerBlock.gasBackgroundMeasurementId }} - Transmit Time: - {{ allData.headerBlock.transmitDate }} + Transmit Time: + {{ allData.headerBlock.transmitDate }}
@@ -128,8 +128,8 @@
GAMMA SPECTRUM
- Number of Channels:{{ allData.gspectrumBlock.numberGChannels }} - Energy Span:{{ allData.gspectrumBlock.energySpan }} + Number of Channels:{{ allData.gspectrumBlock.numberGChannels }} + Energy Span:{{ allData.gspectrumBlock.energySpan }}
Y log scale @@ -141,9 +141,9 @@
CERTIFICATE
- Total Source Activity [ Bq ]:{{ allData.certificateBlock.totalSourceActivity }} - Assay Date:{{ allData.certificateBlock.assayDate }} - Units of Activity:{{ allData.certificateBlock.unitsOfActivity }} + Total Source Activity [ Bq ]:{{ allData.certificateBlock.totalSourceActivity }} + Assay Date:{{ allData.certificateBlock.assayDate }} + Units of Activity:{{ allData.certificateBlock.unitsOfActivity }}
Date: Tue, 4 Jul 2023 17:26:41 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=85=A8=E9=80=89?= =?UTF-8?q?=E5=8A=9F=E8=83=BDselect=E4=B8=8B=E6=8B=89=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=EF=BC=8C=E4=BB=A3=E7=A0=81=E6=95=B4=E7=90=86=EF=BC=8C=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CustomAllSelect/index.vue | 84 ++++++++++++++++++++++++ src/components/SearchForm/index.vue | 10 ++- src/main.js | 2 + src/mixins/JeecgListMixin.js | 13 ++-- src/views/statistics/blankphd.vue | 64 +++++++++++------- src/views/statistics/calibphd.vue | 9 ++- src/views/statistics/detail.vue | 20 +++--- src/views/statistics/detbkphd.vue | 4 -- src/views/statistics/list.vue | 53 +++++++++------ src/views/statistics/qcphd.vue | 4 -- src/views/statistics/sphdf.vue | 4 -- src/views/statistics/sphdp.vue | 4 -- 12 files changed, 189 insertions(+), 82 deletions(-) create mode 100644 src/components/CustomAllSelect/index.vue diff --git a/src/components/CustomAllSelect/index.vue b/src/components/CustomAllSelect/index.vue new file mode 100644 index 0000000..87a30b2 --- /dev/null +++ b/src/components/CustomAllSelect/index.vue @@ -0,0 +1,84 @@ + + + diff --git a/src/components/SearchForm/index.vue b/src/components/SearchForm/index.vue index fe23734..61e398d 100644 --- a/src/components/SearchForm/index.vue +++ b/src/components/SearchForm/index.vue @@ -66,9 +66,15 @@ export default { } }, watch: { - value(val) { - this.formModel = val + value: { + handler(val) { + this.formModel = val + }, + deep: true }, + // value(val) { + // this.formModel = val + // }, formModel: { handler(val) { this.$emit('input', val) diff --git a/src/main.js b/src/main.js index aac6a82..31136a3 100644 --- a/src/main.js +++ b/src/main.js @@ -52,6 +52,7 @@ import { rules } from '@/utils/rules' import SearchForm from '@/components/SearchForm' import CustomSelect from '@/components/CustomSelect' +import CustomAllSelect from '@/components/CustomAllSelect' import CustomTable from '@/components/CustomTable' import CustomModal from '@/components/CustomModal' import CustomDatePicker from '@/components/CustomDatePicker' @@ -82,6 +83,7 @@ Vue.use(JeecgComponents); Vue.use(VueAreaLinkage); Vue.component('search-form', SearchForm) Vue.component('custom-select', CustomSelect) +Vue.component('custom-all-select', CustomAllSelect) Vue.component('custom-table', CustomTable) Vue.component('custom-modal', CustomModal) Vue.component('custom-date-picker', CustomDatePicker) diff --git a/src/mixins/JeecgListMixin.js b/src/mixins/JeecgListMixin.js index 5581a80..2feacbe 100644 --- a/src/mixins/JeecgListMixin.js +++ b/src/mixins/JeecgListMixin.js @@ -53,7 +53,7 @@ export const JeecgListMixin = { } }, created() { - if(!this.disableMixinCreated){ + if(!this.disableMixinCreated&&!this.isImmediate){ console.log(' -- mixin created -- ') this.loadData(); //初始化字典配置 在自己页面定义 @@ -73,12 +73,10 @@ export const JeecgListMixin = { }, methods:{ loadData(arg) { - // if(!this.url.list){ - // this.$message.error("请设置url.list属性!") - // return - // } - if (this.url.list) { - + if(!this.url.list){ + this.$message.error("请设置url.list属性!") + return + } //加载数据 若传入参数1则加载第一页的内容 if (arg === 1) { this.ipagination.current = 1; @@ -103,7 +101,6 @@ export const JeecgListMixin = { }).finally(() => { this.loading = false }) - } }, initDictConfig(){ console.log("--这是一个假的方法!") diff --git a/src/views/statistics/blankphd.vue b/src/views/statistics/blankphd.vue index beca1fc..7adee63 100644 --- a/src/views/statistics/blankphd.vue +++ b/src/views/statistics/blankphd.vue @@ -97,22 +97,26 @@ export default { }, data() { return { + isImmediate:true, isDetail:false, columns, queryParam: { dataType: 'B', startTime: dateFormat(new Date(), 'yyyy-MM-dd'), endTime: dateFormat(new Date(), 'yyyy-MM-dd'), + stationIds:[] }, url: { - listPage: '/webStatistics/findParticulatePage', + list: '/webStatistics/findParticulatePage', delete: '/gardsSampleData/deleteById', findStationList: '/webStatistics/findStationList', findParticulatePage: '/jeecg-web-statistics/webStatistics/findParticulatePage', }, stationList: [], dataSource: [], - detailJson:{} + detailJson: {}, + strIds: "", + allChecked:false } }, // mounted() { @@ -136,29 +140,29 @@ export default { // }, methods: { searchQueryData() { - this.queryParam = { - dataType: "S", - startTime: "2023-05-01", - endTime:"2023-05-07", - } - console.log("查询数据", this.queryParam); + this.isImmediate = false + // this.queryParam = { + // dataType: "S", + // startTime: "2023-05-01", + // endTime: "2023-05-07", + // stationIds: [209, 211, 213] + // } let params = { ...this.queryParam, pageNo: 1, - pageSize: 10, - stationIds: ["209", "211", "213"] + pageSize: 10 } - getAction(this.url.listPage, params).then((res) => { - console.log("查询数据结果", res); + getAction(this.url.list, params).then((res) => { if (res.success) { + this.ipagination.current = res.result.current + this.ipagination.pageSize = res.result.size + this.ipagination.total = res.result.total this.dataSource = res.result.records } }) }, handleDetail(record) { - console.log("点击行信息", record); getAction("webStatistics/findGeneratedReport", { sampleId: "1523651" }).then(res => { - console.log(res); if (res.success) { this.detailJson = res.result this.detailJson = JSON.parse(JSON.stringify(this.detailJson)) @@ -171,12 +175,8 @@ export default { handleBack(flag) { this.isDetail = flag }, - handleTableChange(pagination, filters, sorter, { currentDataSource }) { - console.log(pagination, filters, sorter, { currentDataSource }); - }, findStationList() { getAction(this.url.findStationList, { menuName: 'Particulate' }).then((res) => { - console.log("resdsfsdf", res); if (res.result.length>0) { this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) } else { @@ -184,6 +184,23 @@ export default { } }) }, + handleSelectChange(val) { + console.log(val); + let length = this.stationList.length + if (val.length === length) { + this.allChecked = true + } else { + this.allChecked = false + } + }, + handleSelectChangeAll(val) { + this.allChecked = val + if (val) { + this.queryParam.stationIds = this.stationList.map(item => item.value) + } else { + this.queryParam.stationIds =[] + } + } }, computed: { formItems() { @@ -203,24 +220,25 @@ export default { }, }, { - type: 'custom-select', + type: 'custom-all-select', label: 'Stations', name: 'stationIds', props: { + allChecked:this.allChecked, placeholder: 'select stations', mode: 'multiple', maxTagCount: 1, options: [ - { - label: 'ALL', - value: '', - }, ...this.stationList, ], style: { width: '200px', }, }, + on: { + change: this.handleSelectChange, + changeAll: this.handleSelectChangeAll + }, style: { width: 'auto', }, diff --git a/src/views/statistics/calibphd.vue b/src/views/statistics/calibphd.vue index 7c8950b..0dffd2a 100644 --- a/src/views/statistics/calibphd.vue +++ b/src/views/statistics/calibphd.vue @@ -61,6 +61,12 @@ const columns = [ width: 120, dataIndex: 'acquisitionStop', }, + { + title: 'CALIB REPORTS', + align: 'left', + width: 120, + dataIndex: 'calibreports', + }, ] export default { components: { @@ -69,10 +75,7 @@ export default { data() { return { url: { - listPage: '/webStatistics/findParticulatePage', - delete: '/gardsSampleData/deleteById', findStationList: '/webStatistics/findStationList', - findParticulatePage: '/jeecg-web-statistics/webStatistics/findParticulatePage', }, stationList: [], columns, diff --git a/src/views/statistics/detail.vue b/src/views/statistics/detail.vue index c1ebd13..80f9326 100644 --- a/src/views/statistics/detail.vue +++ b/src/views/statistics/detail.vue @@ -2,24 +2,24 @@
- + return
- ZIP + ZIP
- TXT + TXT
- View Report + View Report
- +