fix: 修改statistics paramer history 弹窗中的部分参数

This commit is contained in:
Xu Zhimeng 2023-10-26 18:26:03 +08:00
parent 0f0b3eac14
commit 5cc9a647a8
3 changed files with 24 additions and 14 deletions

View File

@ -299,7 +299,7 @@ export default {
this.changeChartByType('sample')
this.$store.commit('ADD_SAMPLE_DATA', {
inputFileName,
inputFileName: this.sample.sampleFileName,
data: result,
from: 'file'
})

View File

@ -17,7 +17,7 @@
</a-space>
</a-form-model-item>
<a-form-model-item label="Detector">
<custom-select :options="detectorList" v-model="queryParams.detectorName" size="small"></custom-select>
<custom-select :options="detectorList" v-model="queryParams.detectorId" size="small"></custom-select>
</a-form-model-item>
</a-form-model>
</title-over-border>
@ -301,20 +301,21 @@ export default {
//
setStationAndDetector({ detectorList, stationName, stationId }) {
this.queryParams.stationName = stationName
this.detectorList = detectorList.map(({ detectorCode }) => ({
this.detectorList = detectorList.map(({ detectorCode, detectorId }) => ({
label: detectorCode,
value: detectorCode
value: detectorId || ''
}))
this.queryParams.detectorName = detectorList[0].detectorCode
this.queryParams.detectorId = detectorList[0].detectorId || ''
this.queryParams.stationId = stationId
},
//
handleReset() {
this.queryParams.stationName = this.initialMDC.stationName
this.detectorList = this.initialMDC.detectorList.map(({ detectorCode }) => ({
this.detectorList = this.initialMDC.detectorList.map(({ detectorCode, detectorId }) => ({
label: detectorCode,
value: detectorCode
value: detectorId || ''
}))
},
@ -326,7 +327,11 @@ export default {
}
try {
const { success, message, result } = await postAction('/spectrumAnalysis/statisticsQuery', this.queryParams)
const find = this.detectorList.find(item => item.value == this.queryParams.detectorId)
const { success, message, result } = await postAction('/spectrumAnalysis/statisticsQuery', {
detectorCode: find.label,
...this.queryParams
})
if (success) {
if (result) {

View File

@ -26,7 +26,7 @@
<a-form-model-item label="Detector">
<custom-select
:options="detectorList"
v-model="queryParams.detectorName"
v-model="queryParams.detectorId"
size="small"
dropdownClassName="statistics-paramer-history-select"
></custom-select>
@ -204,27 +204,32 @@ export default {
//
setStationAndDetector({ detectorList, stationName, stationId }) {
this.queryParams.stationName = stationName
this.detectorList = detectorList.map(({ detectorCode }) => ({
this.detectorList = detectorList.map(({ detectorCode, detectorId }) => ({
label: detectorCode,
value: detectorCode,
value: detectorId || '',
}))
this.queryParams.detectorName = detectorList[0].detectorCode
this.queryParams.stationId = stationId
this.queryParams.detectorId = detectorList[0].detectorId || ''
this.queryParams.stationId = stationId || ''
},
//
handleReset() {
this.queryParams.stationName = this.initialMDC.stationName
this.detectorList = this.initialMDC.detectorList.map(({ detectorCode }) => ({
this.detectorList = this.initialMDC.detectorList.map(({ detectorCode, detectorId }) => ({
label: detectorCode,
value: detectorCode,
value: detectorId || '',
}))
},
//
async handleStatisticsQuery() {
try {
const { success, message, result } = await getAction('/spectrumAnalysis/statisticsQueryBtn', this.queryParams)
const find = this.detectorList.find(item => item.value == this.queryParams.detectorId)
const { success, message, result } = await getAction('/spectrumAnalysis/statisticsQueryBtn', {
detectorCode: find.label,
...this.queryParams
})
if (success) {
if (result) {
const data = result.m_Values