fix: SFTP对象存储,禁用设为默认存储

This commit is contained in:
wangruidong 2023-11-20 17:08:15 +08:00 committed by 老广
parent 3269a2a3ff
commit 34406ec32d
2 changed files with 3 additions and 2 deletions

View File

@ -91,7 +91,7 @@ export default {
{
name: 'set_to_default',
title: this.$t('sessions.SetToDefault'),
can: this.$hasPerm('terminal.change_replaystorage'),
can: (value) => this.$hasPerm('terminal.change_replaystorage') && value.row.type.value !== 'sftp',
type: 'primary',
callback: function({ row, col, cellValue, reload }) {
SetToDefaultReplayStorage(row.id).then(data => {

View File

@ -63,7 +63,8 @@ export default {
}
},
is_default: {
helpText: this.$t('sessions.SetToDefaultStorage')
helpText: this.$t('sessions.SetToDefaultStorage'),
hidden: (formValue) => formValue.type === 'sftp'
}
},
cleanFormValue(values) {