| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- import { getEnabledSwitchActions } from '@/utils/common/tableActions'
- import i18n from '@/locales'
- export default {
- created () {
- this.singleActions = [
- {
- label: i18n.t('system.text_152'),
- permission: 'contacts_update',
- action: (obj) => {
- const contact = this.parseDetail(obj.details)
- this.createDialog('ContactUpdateDialog', {
- data: [
- { ...obj, contact },
- ],
- columns: this.columns,
- success: () => {
- this.refresh()
- },
- })
- },
- },
- {
- label: i18n.t('system.text_153'),
- actions: obj => {
- return [
- ...getEnabledSwitchActions(this, obj, ['contacts_perform_enable', 'contacts_perform_disable']),
- {
- label: i18n.t('system.text_129'),
- permission: 'contacts_delete',
- action: (obj) => {
- this.createDialog('DeleteResDialog', {
- vm: this,
- data: [obj],
- columns: this.columns,
- title: i18n.t('system.text_129'),
- name: this.$t('dictionary.receiver'),
- onManager: this.onManager,
- })
- },
- meta: () => this.$getDeleteResult(obj),
- },
- ]
- },
- },
- ]
- },
- }
|