| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- import { getEnabledSwitchActions } from '@/utils/common/tableActions'
- export default {
- created () {
- this.singleActions = [
- {
- label: this.$t('common.edit'),
- permission: 'commonalerts_update',
- action: obj => {
- this.$router.push({
- path: `commonalerts/${obj.id}/update`,
- query: {
- alertType: obj.alert_type,
- },
- })
- },
- },
- {
- label: this.$t('common.more'),
- actions: row => [
- ...getEnabledSwitchActions(this, row, ['commonalerts_perform_enable', 'commonalerts_perform_disable']),
- {
- label: this.$t('common.clone'),
- permission: 'commonalerts_create,commonalerts_create',
- action: obj => {
- this.$router.push({
- path: `commonalerts/${obj.id}/clone`,
- query: {
- alertType: obj.alert_type,
- },
- })
- },
- },
- {
- label: this.$t('common.delete'),
- permission: 'commonalerts_delete',
- action: (obj) => {
- this.createDialog('DeleteResDialog', {
- vm: this,
- data: [obj],
- columns: this.columns,
- title: this.$t('common.delete'),
- name: this.$t('dictionary.commonalert'),
- onManager: this.onManager,
- success: () => {
- if (this.params && this.params.options && this.params.options.sourceList) {
- this.params.options.sourceList.refresh()
- }
- },
- })
- },
- meta: (obj) => this.$getDeleteResult(obj),
- },
- ],
- },
- ]
- },
- }
|