This commit is contained in:
xiaoguangbin 2023-11-03 17:20:19 +08:00
commit 4d2a40cb35
3 changed files with 115 additions and 76 deletions

View File

@ -615,13 +615,13 @@ export default {
async getData() {
// sampleFileName 20231101xiao
const { sampleId = '', qcFileName, sampleFileName = inputFileName } = this.newSampleData
const { sampleId = '', qcFileName, inputFileName } = this.newSampleData
try {
this.isLoading = true
const res = await getAction('/spectrumAnalysis/viewBetaDetectorCalibration', {
sampleId,
qcFileName,
sampleFileName
sampleFileName: inputFileName
})
if (res.success) {
const { CToE, EToC, betaEnergy, gammaEnergy, gammaGatedBetaSpectrum, histogramData, oldScatterSeries } =

View File

@ -488,14 +488,14 @@ export default {
async getData() {
console.log("isFirstFitting>>>"+this.isFirstFitting);
// sampleFileName 20231101xiao
const { sampleId = '', qcFileName, sampleFileName = inputFileName } = this.newSampleData
const { sampleId = '', qcFileName, inputFileName } = this.newSampleData
try {
this.isLoading = true
const res = await getAction('/spectrumAnalysis/viewGammaDetectorCalibration', {
sampleId,
qcFileName,
sampleFileName
sampleFileName: inputFileName
})
if (res.success) {

View File

@ -1,7 +1,12 @@
<template>
<div>
<search-form :items="formItems" v-model="queryParam" @search="searchQuery">
<div style="float: right" class="btn-group" slot="additional">
<div class="btn-group" slot="additional">
<div>
<a-checkbox v-model="delParams.sampleData"> SampleData </a-checkbox>
<a-checkbox v-model="delParams.rnAuto" @change="handleCheckboxChange('rnAuto')"> AutoResults </a-checkbox>
<a-checkbox v-model="delParams.rnMan" @change="handleCheckboxChange('rnMan')"> Reviewed Results </a-checkbox>
</div>
<a-button type="primary" @click="onDel">
<img src="@/assets/images/global/delete.png" alt="" />
Delete
@ -28,7 +33,7 @@
<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { getAction } from '../../api/manage'
import { deleteAction, getAction } from '../../api/manage'
const columns = [
{
@ -36,125 +41,126 @@ const columns = [
align: 'left',
width: 100,
scopedSlots: {
customRender: 'index'
customRender: 'index',
},
customHeaderCell: () => {
return {
style: {
'padding-left': '26px !important'
}
'padding-left': '26px !important',
},
}
},
customCell: () => {
return {
style: {
'padding-left': '26px !important'
}
'padding-left': '26px !important',
},
}
}
},
},
{
title: 'SITE DET CODE',
align: 'left',
dataIndex: 'siteDetCode',
width: 150
width: 150,
},
{
title: 'SAMPLE ID',
align: 'left',
width: 120,
dataIndex: 'sampleId'
dataIndex: 'sampleId',
},
{
title: 'STATION',
align: 'left',
width: 100,
dataIndex: 'stationName'
dataIndex: 'stationName',
},
{
title: 'DETECTOR',
align: 'left',
width: 120,
dataIndex: 'detectorsName'
dataIndex: 'detectorsName',
},
{
title: 'SAMPLE TYPE',
align: 'left',
width: 140,
dataIndex: 'sampleType'
dataIndex: 'sampleType',
},
{
title: 'DATA TYPE',
align: 'left',
width: 120,
dataIndex: 'dataType'
dataIndex: 'dataType',
},
{
title: 'GEOMETRY',
align: 'left',
width: 120,
dataIndex: 'geometry'
width: 160,
dataIndex: 'geometry',
ellipsis: true,
},
{
title: 'QUALIFIE',
align: 'left',
width: 100,
dataIndex: 'spectralQualifie'
dataIndex: 'spectralQualifie',
},
{
title: 'TRANSMIT DTG',
align: 'left',
width: 180,
dataIndex: 'transmitDtg'
dataIndex: 'transmitDtg',
},
{
title: 'COLLECT START',
align: 'left',
width: 180,
dataIndex: 'collectStart'
dataIndex: 'collectStart',
},
{
title: 'COLLECT STOP',
align: 'left',
width: 180,
dataIndex: 'collectStop'
dataIndex: 'collectStop',
},
{
title: 'ACQ.START',
align: 'left',
width: 180,
dataIndex: 'acquisitionStart'
dataIndex: 'acquisitionStart',
},
{
title: 'ACQ.STOP',
align: 'left',
width: 180,
dataIndex: 'acquisitionStop'
dataIndex: 'acquisitionStop',
},
{
title: 'ACQ.REAL(S)',
align: 'left',
width: 120,
dataIndex: 'acquisitionRealSec'
dataIndex: 'acquisitionRealSec',
},
{
title: 'ACQ.LIVE(S)',
align: 'left',
width: 140,
dataIndex: 'acquisitionLiveSec'
dataIndex: 'acquisitionLiveSec',
},
{
title: 'QUANTITY',
align: 'left',
width: 100,
dataIndex: 'quantity'
dataIndex: 'quantity',
},
{
title: 'STATUS',
align: 'left',
width: 100,
dataIndex: 'status'
}
dataIndex: 'status',
},
]
export default {
@ -164,14 +170,18 @@ export default {
return {
queryParam: {
station: '',
detector: ''
detector: '',
},
delParams: {
sampleData: true,
rnAuto: true,
rnMan: true,
},
url: {
list: '/gardsSampleData/findPage',
delete: '/gardsSampleData/deleteById'
},
stationList: [],
detectorList: []
detectorList: [],
}
},
created() {
@ -183,10 +193,10 @@ export default {
try {
const { success, result, message } = await getAction('/gardsStations/findPage', {
pageIndex: 1,
pageSize: 10000
pageSize: 10000,
})
if (success) {
this.stationList = result.records.map(record => ({ label: record.stationCode, value: record.stationId }))
this.stationList = result.records.map((record) => ({ label: record.stationCode, value: record.stationId }))
} else {
this.$message.error(message)
}
@ -199,10 +209,10 @@ export default {
try {
const { success, result, message } = await getAction('/gardsDetectors/findPage', {
pageIndex: 1,
pageSize: 10000
pageSize: 10000,
})
if (success) {
this.detectorList = result.records.map(record => ({ label: record.detectorCode, value: record.detectorId }))
this.detectorList = result.records.map((record) => ({ label: record.detectorCode, value: record.detectorId }))
} else {
this.$message.error(message)
}
@ -215,20 +225,38 @@ export default {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
handleCheckboxChange(name) {
if (!this.delParams[name]) {
this.delParams.sampleData = false
}
},
onDel() {
if (this.selectedRowKeys && this.selectedRowKeys.length) {
this.$confirm({
title: 'Do You Want To Delete This Item?',
okText: 'OK',
cancelText: 'Cancel',
onOk: () => {
this.handleDelete(this.selectedRowKeys[0], 'sampleId')
}
onOk: async () => {
try {
const { success, message } = await deleteAction('/gardsSampleData/deleteById', {
sampleId: this.selectedRowKeys[0],
...this.delParams,
})
if (success) {
this.$message.success('Delete Success!')
} else {
this.$message.error(message)
}
} catch (error) {
console.error(error)
}
},
})
} else {
this.$message.warn('Please Select An Item To Delete')
}
}
},
},
computed: {
formItems() {
@ -240,12 +268,12 @@ export default {
props: {
allowClear: true,
style: {
width: '261px'
}
width: '190px',
},
},
style: {
width: 'auto'
}
width: 'auto',
},
},
{
label: 'Station',
@ -255,20 +283,20 @@ export default {
options: [
{
label: 'ALL',
value: ''
value: '',
},
...this.stationList
...this.stationList,
],
showSearch: true,
filterOption: this.filterOption,
allowClear: true,
style: {
width: '261px'
}
width: '190px',
},
},
style: {
width: 'auto'
}
width: 'auto',
},
},
{
label: 'Detector',
@ -278,20 +306,20 @@ export default {
options: [
{
label: 'ALL',
value: ''
value: '',
},
...this.detectorList
...this.detectorList,
],
showSearch: true,
filterOption: this.filterOption,
allowClear: true,
style: {
width: '261px'
}
width: '190px',
},
},
style: {
width: 'auto'
}
width: 'auto',
},
},
{
label: 'From',
@ -303,12 +331,12 @@ export default {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
style: {
minWidth: 'auto',
width: '350px'
}
width: '282px',
},
},
style: {
width: 'auto'
}
width: 'auto',
},
},
{
label: 'To',
@ -320,13 +348,12 @@ export default {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
style: {
minWidth: 'auto',
width: '350px'
}
width: '282px',
},
},
style: {
paddingRight: 0,
width: 'auto'
}
width: 'auto',
},
},
{
label: '',
@ -335,23 +362,35 @@ export default {
options: [
{ label: 'Collect Stop', value: 'collectStop' },
{ label: 'Acq.Start', value: 'acqDotStart' },
{ label: 'SampleData', value: 'sampleData' },
{ label: 'AutoResults', value: 'autoResults' },
{ label: 'Reviewed Results', value: 'reviewedResults' }
]
],
},
style: {
width: '610px'
}
}
width: '230px',
},
},
]
}
}
},
},
watch: {
'delParams.sampleData': {
handler(newVal) {
if (newVal) {
this.delParams.rnAuto = true
this.delParams.rnMan = true
}
},
},
},
}
</script>
<style lang="less" scoped>
.btn-group {
display: flex;
align-items: center;
margin-left: 10px;
margin-bottom: 8px;
img {
margin-right: 12px;
height: 18px;