删除无功能的按钮
This commit is contained in:
parent
139f7d3dd2
commit
7e8e82c9e1
|
@ -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"
|
||||
></a-transfer>
|
||||
|
||||
<div class="config-user-library-btns">
|
||||
<div>
|
||||
<!--<div class="config-user-library-btns">
|
||||
<div>
|
||||
<a-button type="primary" @click="handleDefault">Default</a-button>
|
||||
<a-button type="primary">Load</a-button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a-button type="primary" :loading="isSaving" @click="handleSave">Save</a-button>
|
||||
<a-button type="primary">Apply</a-button>
|
||||
</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>
|
||||
</a-spin>
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user