From 183c1e96833b4f2d8f4b5427ab6bff1caf995dce Mon Sep 17 00:00:00 2001 From: orgin Date: Thu, 11 Jan 2024 17:13:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9arr=E5=92=8Crrr?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=EF=BC=8C=E4=BF=AE=E6=94=B9=E6=8E=A2=E6=B5=8B?= =?UTF-8?q?=E5=99=A8=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../statistics/imsProducts/arr/index.vue | 36 +++- .../statistics/imsProducts/rrr/index.vue | 38 +++- src/views/system/DetectorInfo.vue | 185 +++++++++++++----- 3 files changed, 204 insertions(+), 55 deletions(-) diff --git a/src/views/statistics/imsProducts/arr/index.vue b/src/views/statistics/imsProducts/arr/index.vue index 18fc93a..6fee30b 100644 --- a/src/views/statistics/imsProducts/arr/index.vue +++ b/src/views/statistics/imsProducts/arr/index.vue @@ -72,6 +72,16 @@ const columns = [ align: 'left', dataIndex: 'sampleId', }, + { + title: 'Qualifie', + align: 'left', + dataIndex: 'spectralQualifie', + }, + { + title: 'Analyst', + align: 'left', + dataIndex: 'analyst', + } ] import { compareDate } from '../../commom' import { JeecgListMixin } from '@/mixins/JeecgListMixin' @@ -210,6 +220,9 @@ export default { this.queryParam.stationIds = [] } }, + handleQualifieChange(val){ + this.queryParam.qualifie = val + }, getBeforeDate(n) { var n = n var d = new Date() @@ -238,7 +251,7 @@ export default { computed: { formItems() { return [ - { + /*{ type: 'a-input', label: '', name: 'search', @@ -251,7 +264,7 @@ export default { style: { width: 'auto', }, - }, + },*/ { type: 'custom-all-select', label: 'Stations', @@ -307,6 +320,25 @@ export default { width: 'auto', }, }, + { + type: 'a-select', + label: 'Qualifie', + name: 'qualifie', + props: { + allowClear: true, + placeholder: 'Select qualifie', + options: [{label: 'FULL', value: "FULL"}, {label: 'PREL', value: "PREL"}], + style: { + width: '200px', + }, + }, + on: { + change: this.handleQualifieChange, + }, + style: { + width: 'auto', + }, + } ] }, }, diff --git a/src/views/statistics/imsProducts/rrr/index.vue b/src/views/statistics/imsProducts/rrr/index.vue index 81dc4db..751c936 100644 --- a/src/views/statistics/imsProducts/rrr/index.vue +++ b/src/views/statistics/imsProducts/rrr/index.vue @@ -72,6 +72,16 @@ const columns = [ align: 'left', dataIndex: 'sampleId', }, + { + title: 'Qualifie', + align: 'left', + dataIndex: 'spectralQualifie', + }, + { + title: 'Analyst', + align: 'left', + dataIndex: 'analyst', + } ] import { compareDate } from '../../commom' import { JeecgListMixin } from '@/mixins/JeecgListMixin' @@ -93,6 +103,7 @@ export default { startTime: dateFormat(new Date(), 'yyyy-MM-dd'), endTime: dateFormat(new Date(), 'yyyy-MM-dd'), stationIds: [], + qualifie: '' }, url: { list: '/radionuclide/findReviewedPage', @@ -194,7 +205,6 @@ export default { }) }, handleSelectChange(val) { - console.log(val) let length = this.stationList.length if (val.length === length) { this.allChecked = true @@ -210,6 +220,9 @@ export default { this.queryParam.stationIds = [] } }, + handleQualifieChange(val){ + this.queryParam.qualifie = val + }, getBeforeDate(n) { var n = n var d = new Date() @@ -238,7 +251,7 @@ export default { computed: { formItems() { return [ - { + /*{ type: 'a-input', label: '', name: 'search', @@ -251,7 +264,7 @@ export default { style: { width: 'auto', }, - }, + },*/ { type: 'custom-all-select', label: 'Stations', @@ -307,6 +320,25 @@ export default { width: 'auto', }, }, + { + type: 'a-select', + label: 'Qualifie', + name: 'qualifie', + props: { + allowClear: true, + placeholder: 'Select qualifie', + options: [{label: 'FULL', value: "FULL"}, {label: 'PREL', value: "PREL"}], + style: { + width: '200px', + }, + }, + on: { + change: this.handleQualifieChange, + }, + style: { + width: 'auto', + }, + } ] }, }, diff --git a/src/views/system/DetectorInfo.vue b/src/views/system/DetectorInfo.vue index 766d778..09449f5 100644 --- a/src/views/system/DetectorInfo.vue +++ b/src/views/system/DetectorInfo.vue @@ -43,52 +43,92 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -198,23 +238,28 @@ export default { data() { this.columns = columns const validateDetectorCode = (_, value, callback) => { - if (!value) { - callback(new Error('Please Enter Detector Code')) - } else { - if (value.length > 9) { - callback(new Error('Detector Code Limit 9')) + if(this.model.stationId){ + if (value) { + if (value.length > 9) { + callback(new Error('Detector Code Limit 9')) + } else { + callback() + } } else { - callback() + callback(new Error('Please Enter Code')) } + }else { + callback('Select Station First'); } } return { queryParam: {}, rules: { - detectorId: [{ required: true, message: 'Please Enter Detector Id' }], + // detectorId: [{ required: true, message: 'Please Enter Id' }, { validator: this.checkId }], detectorCode: [{ required: true, validator: validateDetectorCode }], - moddate: [{ required: true, message: 'Please Select Moddate' }] + stationId: [{ required: true, message: 'Please Select Station' }], + status: [{ required: true, message: 'Please Select Status' }] }, url: { list: '/gardsDetectors/findPage', @@ -222,7 +267,8 @@ export default { add: '/gardsDetectors/create', edit: '/gardsDetectors/update' }, - typeList: [] + typeList: [], + stationOptions: [], } }, created() { @@ -231,7 +277,7 @@ export default { methods: { async getTypeList() { try { - const res = await getAction('/gardsDetectors/findType') + const res = await getAction( '/gardsDetectors/findType') this.typeList = res.filter(item => item).map(item => ({ label: item, value: item })) } catch (error) { console.error(error) @@ -244,13 +290,15 @@ export default { onAdd() { this.isAdd = true - this.model = {} + this.model = { status: 'Operating' } + this.getStationList() this.visible = true }, onEdit() { if (this.selectedRowKeys && this.selectedRowKeys.length) { this.isAdd = false this.visible = true + this.getStationList() const find = this.dataSource.find(item => item.detectorId === this.selectedRowKeys[0]) this.model = cloneDeep(find) } else { @@ -274,6 +322,43 @@ export default { beforeSubmit() { this.model.moddate = moment(this.model.moddate).format('yyyy-MM-DD HH:mm:ss') + }, + + async getStationList() { + await getAction('/webStatistics/findStationList', { menuName: '' }).then((res) => { + if (res.success) { + if (res.result.length > 0) { + this.stationOptions = res.result.map((item) => { + return { + label: item.stationCode, + value: item.stationId, + } + }) + } else { + this.stationOptions = [] + } + } else { + this.$message.warning('This operation fails. Contact your system administrator') + } + }) + }, + + enterCode(){ + let stationId = this.model.stationId + if (stationId){ + let current = this.model.detectorCode + let stationCode = this.stationOptions.find(option => option.value === stationId).label; + let prefix = stationCode + "_" + if (!current.startsWith(prefix)){ + this.model.detectorCode = prefix + current + }else { + if (prefix === current){ + this.model.detectorCode = '' + } + } + }else { + this.model.detectorCode = '' + } } }, computed: {