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..fd285d3 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 c0c6d5f..80f9326 100644 --- a/src/views/statistics/detail.vue +++ b/src/views/statistics/detail.vue @@ -2,92 +2,92 @@
- + return
- ZIP + ZIP
- TXT + TXT
- View Report + View Report
- + @@ -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 }}
"):"" this.dataSourceEnergy=this.allData.genergyBlock this.dataSourceResulution=this.allData.gresolutionBlock @@ -300,7 +299,6 @@ export default { this.dataSourceSpectrumX = this.allData.gspectrumBlock.gspectrumSubBlock.map((item, index) => { return index }) - console.log(this.dataSourceSpectrumX); this.dataSourceCertificate = this.allData.certificateBlock?this.allData.certificateBlock.certificateSubBlock:[] }, methods: { @@ -309,7 +307,6 @@ export default { this.spectrumChart.setOption({ yAxis: { type: this.yAxisType, - // type: 'log', splitLine: { show: true, lineStyle: { @@ -420,6 +417,11 @@ export default { font-stretch: normal; letter-spacing: 0px; color: #69a19f; + cursor: pointer; + .icon-back{ + width: 28px; + height: 24px; + } } .top-actions{ .right-btn{ @@ -429,6 +431,14 @@ export default { padding: 0 12px; margin-left: 20px; background-color: #1397a3; + .icon-download{ + width: 16px; + height: 19px; + } + .icon-view{ + width: 15px; + height: 16px; + } } } } @@ -440,6 +450,7 @@ export default { .ant-tabs-tabpane{ height: 100%; overflow: auto; + background-color: #02282b; } } } @@ -526,11 +537,28 @@ export default { color: #0cebc9; padding: 0 0 0 18px; } +.info-key{ + font-family: ArialMT; + font-size: 16px; + font-weight: bold; + color: #ffffff; +} +.info-val{ + font-family: ArialMT; + font-size: 16px; + color: #ade6ee; +} +.span-key{ + font-family: MicrosoftYaHei; + font-size: 16px; + color: #ffffff; +} .comment-block{ - background-color: rgba(12, 235, 201, 0.05); - margin-top: 10px; + background-color: #0d6d76; + margin: 10px 0; padding: 20px; line-height: 24px; + border-radius: 4px; } .gamma-spectrum-row{ display: flex; @@ -538,7 +566,8 @@ export default { justify-content: space-between; .row-val{ font-family: MicrosoftYaHei; - color: #ade6ee; + font-size: 16px; + color: #ade6ee; } .row-btn{ height: 26px; diff --git a/src/views/statistics/detbkphd.vue b/src/views/statistics/detbkphd.vue index a363c6e..b5f21f1 100644 --- a/src/views/statistics/detbkphd.vue +++ b/src/views/statistics/detbkphd.vue @@ -69,10 +69,7 @@ export default { data() { return { url: { - listPage: '/webStatistics/findParticulatePage', - delete: '/gardsSampleData/deleteById', findStationList: '/webStatistics/findStationList', - findParticulatePage: '/jeecg-web-statistics/webStatistics/findParticulatePage', }, stationList: [], columns, @@ -86,7 +83,6 @@ export default { methods: { 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 { diff --git a/src/views/statistics/list.vue b/src/views/statistics/list.vue index 5a97788..c43f90a 100644 --- a/src/views/statistics/list.vue +++ b/src/views/statistics/list.vue @@ -57,11 +57,13 @@ export default { }, data() { return { + isImmediate:true, isDetail:false, queryParam: { dataType: this.dataType, startTime: dateFormat(new Date(), 'yyyy-MM-dd'), endTime: dateFormat(new Date(), 'yyyy-MM-dd'), + stationIds:[] }, url: { list: '/webStatistics/findParticulatePage', @@ -70,38 +72,33 @@ export default { findParticulatePage: '/jeecg-web-statistics/webStatistics/findParticulatePage', }, dataSource: [], - detailJson:{} + detailJson: {}, + allChecked:false } }, methods: { searchQueryData() { console.log("查询数据", this.queryParam); console.log(this.dataType); + this.isImmediate = false let params = { - dataType: "S", - startTime: "2023-05-01", - endTime: "2023-05-07", + ...this.queryParam, pageNo: 1, - pageSize: 10, - stationIds: ["209", "211", "213"] - // dataType: this.queryParam.dataType||"S", - // startTime: this.queryParam.startTime, - // endTime:this.queryParam.endTime, + pageSize: 10 } getAction(this.url.list, params).then((res) => { - console.log("查询数据结果", 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) { - // this.isDetail = true - console.log("点击行信息", record); // 测试接口数据 record.sampleId getAction("webStatistics/findGeneratedReport", { sampleId: "1523651" }).then(res => { - console.log(res); - if (res.success) { + if (res.success){ this.detailJson = res.result this.detailJson = JSON.parse(JSON.stringify(this.detailJson)) this.isDetail = true @@ -113,8 +110,21 @@ export default { handleBack(flag) { this.isDetail = flag }, - handleTableChange(pagination, filters, sorter, { currentDataSource }) { - console.log(pagination, filters, sorter, { currentDataSource }); + handleSelectChange(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: { @@ -135,24 +145,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/qcphd.vue b/src/views/statistics/qcphd.vue index f6ff873..44e9df1 100644 --- a/src/views/statistics/qcphd.vue +++ b/src/views/statistics/qcphd.vue @@ -69,10 +69,7 @@ export default { data() { return { url: { - listPage: '/webStatistics/findParticulatePage', - delete: '/gardsSampleData/deleteById', findStationList: '/webStatistics/findStationList', - findParticulatePage: '/jeecg-web-statistics/webStatistics/findParticulatePage', }, stationList: [], columns, @@ -86,7 +83,6 @@ export default { methods: { 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 { diff --git a/src/views/statistics/sphdf.vue b/src/views/statistics/sphdf.vue index af4fed6..8ddc248 100644 --- a/src/views/statistics/sphdf.vue +++ b/src/views/statistics/sphdf.vue @@ -69,10 +69,7 @@ export default { data() { return { url: { - listPage: '/webStatistics/findParticulatePage', - delete: '/gardsSampleData/deleteById', findStationList: '/webStatistics/findStationList', - findParticulatePage: '/jeecg-web-statistics/webStatistics/findParticulatePage', }, stationList: [], columns, @@ -86,7 +83,6 @@ export default { methods: { 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 { diff --git a/src/views/statistics/sphdp.vue b/src/views/statistics/sphdp.vue index 9ea113f..f6f1706 100644 --- a/src/views/statistics/sphdp.vue +++ b/src/views/statistics/sphdp.vue @@ -69,10 +69,7 @@ export default { data() { return { url: { - listPage: '/webStatistics/findParticulatePage', - delete: '/gardsSampleData/deleteById', findStationList: '/webStatistics/findStationList', - findParticulatePage: '/jeecg-web-statistics/webStatistics/findParticulatePage', }, stationList: [], columns, @@ -86,7 +83,6 @@ export default { methods: { 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 {