diff --git a/src/views/spectrumAnalysis/components/Modals/ConfigUserLibraryModal.vue b/src/views/spectrumAnalysis/components/Modals/ConfigUserLibraryModal.vue index 62c74fe..2a7ec0b 100644 --- a/src/views/spectrumAnalysis/components/Modals/ConfigUserLibraryModal.vue +++ b/src/views/spectrumAnalysis/components/Modals/ConfigUserLibraryModal.vue @@ -7,24 +7,28 @@ :dataSource="list" :list-style="{ width: '200px', - height: '400px' + height: '400px', }" :target-keys="targetKeys" - :render="item => item.title" + :render="(item) => item.title" :showSearch="true" :showSelectAll="false" @change="handleChange" > -
-
+ +
+ Save
@@ -43,7 +47,7 @@ export default { return { list: [], targetKeys: [], - isSaving: false + isSaving: false, } }, methods: { @@ -58,17 +62,17 @@ export default { const { sampleId, inputFileName: fileName } = this.sampleData const { success, result, message } = await getAction('/gamma/configUserLibrary', { sampleId, - fileName + fileName, }) if (success) { this.isLoading = false const { AllNuclides, UserNuclides } = result - this.list = AllNuclides.map(item => ({ + this.list = AllNuclides.map((item) => ({ key: item, - title: item + title: item, })) - this.targetKeys = UserNuclides.map(item => item) + this.targetKeys = UserNuclides.map((item) => item) this.initialTargetKeys = cloneDeep(this.targetKeys) } else { @@ -95,7 +99,7 @@ export default { const { inputFileName: fileName } = this.sampleData const { success, result, message } = await postAction('/gamma/saveUserLibrary', { fileName, - userLibraryName: this.targetKeys + userLibraryName: this.targetKeys, }) if (success) { this.$message.success('Save Success') @@ -107,8 +111,8 @@ export default { } finally { this.isSaving = false } - } - } + }, + }, }