接口参数调整

This commit is contained in:
任珮宇 2024-01-11 11:41:08 +08:00
parent 4e8da8dd72
commit 0fd0634c70

View File

@ -124,7 +124,11 @@
<title-over-border title="Nuclide Identify">
<a-form-model class="tolerance">
<a-form-model-item label="Tolerance">
<a-input-number v-model="model.tolerance"></a-input-number>
<a-input-number
v-model="model.tolerance"
:step="0.1"
@change="handleToleranceChange"
></a-input-number>
</a-form-model-item>
</a-form-model>
<div class="identify-item">
@ -447,6 +451,10 @@ export default {
data() {
this.columns = columns
return {
searchParam: {
energy: '',
tolerance: '',
},
option: cloneDeep(initialOption),
opts: { notMerge: false },
thumbnailOption: cloneDeep(thumbnailOption),
@ -777,6 +785,29 @@ export default {
}
}
},
async handleToleranceChange(val) {
// this.selectedTableItem._loading = true
this.searchParam.energy = this.selectedTableItem.energy
this.searchParam.tolerance = val
try {
const { sampleId, inputFileName: fileName } = this.sampleData
const { success, result, message } = await getAction('/gamma/searchNuclide', {
sampleId,
fileName,
...this.searchParam,
})
if (success) {
const { list } = result
this.selectedTableItem._possible = list
} else {
this.$message.error(message)
}
} catch (error) {
console.error(error)
} finally {
// this.selectedTableItem._loading = false
}
},
// peak comment
handleAddPeakComment() {