| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- import { disableDeleteAction } from '@/utils/common/tableActions'
- import i18n from '@/locales'
- export default {
- created () {
- this.singleActions = [
- {
- label: i18n.t('storage.text_100'),
- permission: 'file_systems_perform_syncstatus',
- action: obj => {
- this.onManager('performAction', {
- steadyStatus: ['available'],
- id: obj.id,
- managerArgs: {
- action: 'syncstatus',
- },
- })
- },
- meta: () => ({
- validate: true,
- }),
- },
- {
- label: i18n.t('storage.text_65'),
- actions: (obj) => {
- return [
- {
- label: this.$t('common_641', [this.$t('dictionary.project')]),
- action: () => {
- this.createDialog('ChangeOwenrDialog', {
- data: [obj],
- columns: this.columns,
- name: this.$t('dictionary.filesystem'),
- onManager: this.onManager,
- resource: 'file_systems',
- ignoreCandidateDomains: true,
- })
- },
- meta: () => {
- const ret = {
- validate: false,
- tooltip: '',
- }
- if (this.isProjectMode) {
- ret.tooltip = this.$t('storage.check_sys_permission', [this.$t('dictionary.domain')])
- return ret
- }
- return {
- validate: true,
- }
- },
- },
- disableDeleteAction(this, {
- name: this.$t('dictionary.nas'),
- }),
- {
- label: i18n.t('storage.text_36'),
- permission: 'file_systems_delete',
- action: () => {
- this.createDialog('DeleteResDialog', {
- vm: this,
- title: i18n.t('storage.text_36'),
- name: this.$t('dictionary.nas'),
- data: [obj],
- columns: this.columns,
- onManager: this.onManager,
- refresh: this.refresh,
- })
- },
- meta: () => this.$getDeleteResult(obj),
- },
- ]
- },
- },
- ]
- },
- }
|