删除无功能的按钮

This commit is contained in:
任珮宇 2024-01-30 16:02:57 +08:00
parent 139f7d3dd2
commit 7e8e82c9e1

View File

@ -7,16 +7,16 @@
:dataSource="list" :dataSource="list"
:list-style="{ :list-style="{
width: '200px', width: '200px',
height: '400px' height: '400px',
}" }"
:target-keys="targetKeys" :target-keys="targetKeys"
:render="item => item.title" :render="(item) => item.title"
:showSearch="true" :showSearch="true"
:showSelectAll="false" :showSelectAll="false"
@change="handleChange" @change="handleChange"
></a-transfer> ></a-transfer>
<div class="config-user-library-btns"> <!--<div class="config-user-library-btns">
<div> <div>
<a-button type="primary" @click="handleDefault">Default</a-button> <a-button type="primary" @click="handleDefault">Default</a-button>
<a-button type="primary">Load</a-button> <a-button type="primary">Load</a-button>
@ -25,6 +25,10 @@
<a-button type="primary" :loading="isSaving" @click="handleSave">Save</a-button> <a-button type="primary" :loading="isSaving" @click="handleSave">Save</a-button>
<a-button type="primary">Apply</a-button> <a-button type="primary">Apply</a-button>
</div> </div>
<a-button type="primary" :loading="isSaving" @click="handleSave">Save</a-button>
</div>-->
<div style="margin-top: 20px; display: flex; justify-content: end">
<a-button type="primary" :loading="isSaving" @click="handleSave">Save</a-button>
</div> </div>
</div> </div>
</a-spin> </a-spin>
@ -43,7 +47,7 @@ export default {
return { return {
list: [], list: [],
targetKeys: [], targetKeys: [],
isSaving: false isSaving: false,
} }
}, },
methods: { methods: {
@ -58,17 +62,17 @@ export default {
const { sampleId, inputFileName: fileName } = this.sampleData const { sampleId, inputFileName: fileName } = this.sampleData
const { success, result, message } = await getAction('/gamma/configUserLibrary', { const { success, result, message } = await getAction('/gamma/configUserLibrary', {
sampleId, sampleId,
fileName fileName,
}) })
if (success) { if (success) {
this.isLoading = false this.isLoading = false
const { AllNuclides, UserNuclides } = result const { AllNuclides, UserNuclides } = result
this.list = AllNuclides.map(item => ({ this.list = AllNuclides.map((item) => ({
key: item, key: item,
title: item title: item,
})) }))
this.targetKeys = UserNuclides.map(item => item) this.targetKeys = UserNuclides.map((item) => item)
this.initialTargetKeys = cloneDeep(this.targetKeys) this.initialTargetKeys = cloneDeep(this.targetKeys)
} else { } else {
@ -95,7 +99,7 @@ export default {
const { inputFileName: fileName } = this.sampleData const { inputFileName: fileName } = this.sampleData
const { success, result, message } = await postAction('/gamma/saveUserLibrary', { const { success, result, message } = await postAction('/gamma/saveUserLibrary', {
fileName, fileName,
userLibraryName: this.targetKeys userLibraryName: this.targetKeys,
}) })
if (success) { if (success) {
this.$message.success('Save Success') this.$message.success('Save Success')
@ -107,8 +111,8 @@ export default {
} finally { } finally {
this.isSaving = false this.isSaving = false
} }
} },
} },
} }
</script> </script>