[Update] 更新按钮

This commit is contained in:
jym503558564
2020-04-07 18:22:11 +08:00
parent 2d08718340
commit f0b69c8026
18 changed files with 88 additions and 428 deletions

View File

@@ -233,6 +233,7 @@ const cn = {
'gateway': '网关',
'date_created': '创建日期',
'port': '端口',
'TestConnection': '测试连接',
// 管理用户
'AdminUserList': '管理用户列表',
'AdminUserDetail': '管理用户详情',
@@ -368,7 +369,8 @@ const cn = {
'date': '日期',
'addr': '地址',
'active': '激活中',
'alive': '在线'
'alive': '在线',
'StorageConfiguration': '存储配置'
},
jobcenter: {
'RunTimes': '执行次数',

View File

@@ -51,31 +51,7 @@ export default {
prop: 'id',
label: this.$tc('Action'),
align: 'center',
formatter: ActionsFormatter,
actions: {
hasUpdate: (row, cellValue) => {
return true
},
canUpdate: (row, cellValue) => {
console.log('On table update')
return true
},
hasDelete: true,
canDelete: (row, cellValue) => {
return true
},
onDelete: (row, cellValue) => {
this.$confirm('你好啊', '提示', {
type: 'warning',
confirmButtonClass: 'el-button--danger',
beforeClose: async(action, instance, done) => {
}
}).catch(() => {
/* 取消*/
})
},
order: []
}
formatter: ActionsFormatter
}
],
tableActions: {
@@ -84,8 +60,7 @@ export default {
}
},
headerActions: {
hasDelete: false,
hasUpdate: false,
hasBulkDelete: false,
createRoute: 'DatabaseAppCreate'
}
}

View File

@@ -39,41 +39,12 @@ export default {
prop: 'id',
label: this.$tc('Action'),
align: 'center',
formatter: ActionsFormatter,
actions: {
hasUpdate: (row, cellValue) => {
return true
},
canUpdate: (row, cellValue) => {
console.log('On table update')
return true
},
hasDelete: true,
canDelete: (row, cellValue) => {
return true
},
onDelete: (row, cellValue) => {
this.$confirm('你好啊', '提示', {
type: 'warning',
confirmButtonClass: 'el-button--danger',
beforeClose: async(action, instance, done) => {
}
}).catch(() => {
/* 取消*/
})
},
order: []
}
formatter: ActionsFormatter
}
],
tableActions: {
hasEdit: true,
editRoute: '404'
}
]
},
headerActions: {
hasDelete: false,
hasUpdate: false,
hasBulkDelete: false,
createRoute: 'RemoteAppCreate'
}
}

View File

@@ -40,41 +40,12 @@ export default {
prop: 'id',
label: this.$tc('Action'),
align: 'center',
formatter: ActionsFormatter,
actions: {
hasUpdate: (row, cellValue) => {
return true
},
canUpdate: (row, cellValue) => {
console.log('On table update')
return true
},
hasDelete: true,
canDelete: (row, cellValue) => {
return true
},
onDelete: (row, cellValue) => {
this.$confirm('你好啊', '提示', {
type: 'warning',
confirmButtonClass: 'el-button--danger',
beforeClose: async(action, instance, done) => {
}
}).catch(() => {
/* 取消*/
})
},
order: []
}
formatter: ActionsFormatter
}
],
tableActions: {
hasEdit: true,
editRoute: '404'
}
]
},
headerActions: {
hasDelete: false,
hasUpdate: false,
hasBulkDelete: false,
createRoute: 'AdminUserCreate'
}
}

View File

@@ -39,41 +39,12 @@ export default {
prop: 'id',
label: this.$tc('Action'),
align: 'center',
formatter: ActionsFormatter,
actions: {
hasUpdate: (row, cellValue) => {
return true
},
canUpdate: (row, cellValue) => {
console.log('On table update')
return true
},
hasDelete: true,
canDelete: (row, cellValue) => {
return true
},
onDelete: (row, cellValue) => {
this.$confirm('你好啊', '提示', {
type: 'warning',
confirmButtonClass: 'el-button--danger',
beforeClose: async(action, instance, done) => {
}
}).catch(() => {
/* 取消*/
})
},
order: []
}
formatter: ActionsFormatter
}
],
tableActions: {
hasEdit: true,
editRoute: '404'
}
]
},
headerActions: {
hasDelete: false,
hasUpdate: false,
hasBulkDelete: false,
createRoute: 'CommandFilterCreate'
}
}

View File

@@ -41,41 +41,12 @@ export default {
prop: 'id',
label: this.$tc('Action'),
align: 'center',
formatter: ActionsFormatter,
actions: {
hasUpdate: (row, cellValue) => {
return true
},
canUpdate: (row, cellValue) => {
console.log('On table update')
return true
},
hasDelete: true,
canDelete: (row, cellValue) => {
return true
},
onDelete: (row, cellValue) => {
this.$confirm('你好啊', '提示', {
type: 'warning',
confirmButtonClass: 'el-button--danger',
beforeClose: async(action, instance, done) => {
}
}).catch(() => {
/* 取消*/
})
},
order: []
}
formatter: ActionsFormatter
}
],
tableActions: {
hasEdit: true,
editRoute: '404'
}
]
},
headerActions: {
hasDelete: false,
hasUpdate: false,
hasBulkDelete: false,
createRoute: 'DomainCreate'
}
}

View File

@@ -51,46 +51,22 @@ export default {
align: 'center',
formatter: ActionsFormatter,
actions: {
hasUpdate: (row, cellValue) => {
return true
},
canUpdate: (row, cellValue) => {
console.log('On table update')
return true
},
hasDelete: true,
canDelete: (row, cellValue) => {
return true
},
onDelete: (row, cellValue) => {
this.$confirm('你好啊', '提示', {
type: 'warning',
confirmButtonClass: 'el-button--danger',
beforeClose: async(action, instance, done) => {
}
}).catch(() => {
/* 取消*/
})
},
order: []
updateRoute: 'UserUpdate',
extraActions: [
{
name: 'TestConnection',
title: this.$t('assets.TestConnection')
}
]
}
}
],
tableActions: {
hasEdit: true,
editRoute: '404'
}
]
},
headerActions: {
hasDelete: false,
hasUpdate: false,
createRoute: 'DomainCreate'
hasBulkDelete: false,
createRoute: 'GatewayCreate'
}
}
},
created() {
console.log('111111')
console.log('/api/v1/assets/gateways/?domain=' + this.$route.params.id)
}
}
</script>

View File

@@ -35,41 +35,12 @@ export default {
prop: 'id',
label: this.$tc('Action'),
align: 'center',
formatter: ActionsFormatter,
actions: {
hasUpdate: (row, cellValue) => {
return true
},
canUpdate: (row, cellValue) => {
console.log('On table update')
return true
},
hasDelete: true,
canDelete: (row, cellValue) => {
return true
},
onDelete: (row, cellValue) => {
this.$confirm('你好啊', '提示', {
type: 'warning',
confirmButtonClass: 'el-button--danger',
beforeClose: async(action, instance, done) => {
}
}).catch(() => {
/* 取消*/
})
},
order: []
}
formatter: ActionsFormatter
}
],
tableActions: {
hasEdit: true,
editRoute: '404'
}
]
},
headerActions: {
hasDelete: false,
hasUpdate: false,
hasBulkDelete: false,
createRoute: 'LabelCreate'
}
}

View File

@@ -36,41 +36,12 @@ export default {
prop: 'id',
label: this.$tc('Action'),
align: 'center',
formatter: ActionsFormatter,
actions: {
hasUpdate: (row, cellValue) => {
return true
},
canUpdate: (row, cellValue) => {
console.log('On table update')
return true
},
hasDelete: true,
canDelete: (row, cellValue) => {
return true
},
onDelete: (row, cellValue) => {
this.$confirm('你好啊', '提示', {
type: 'warning',
confirmButtonClass: 'el-button--danger',
beforeClose: async(action, instance, done) => {
}
}).catch(() => {
/* 取消*/
})
},
order: []
}
formatter: ActionsFormatter
}
],
tableActions: {
hasEdit: true,
editRoute: '404'
}
]
},
headerActions: {
hasDelete: false,
hasUpdate: false,
hasBulkDelete: false,
createRoute: 'PlatformCreate'
}
}

View File

@@ -51,41 +51,12 @@ export default {
prop: 'id',
label: this.$tc('Action'),
align: 'center',
formatter: ActionsFormatter,
actions: {
hasUpdate: (row, cellValue) => {
return true
},
canUpdate: (row, cellValue) => {
console.log('On table update')
return true
},
hasDelete: true,
canDelete: (row, cellValue) => {
return true
},
onDelete: (row, cellValue) => {
this.$confirm('你好啊', '提示', {
type: 'warning',
confirmButtonClass: 'el-button--danger',
beforeClose: async(action, instance, done) => {
}
}).catch(() => {
/* 取消*/
})
},
order: []
}
formatter: ActionsFormatter
}
],
tableActions: {
hasEdit: true,
editRoute: '404'
}
]
},
headerActions: {
hasDelete: false,
hasUpdate: false,
hasBulkDelete: false,
createRoute: 'SystemUserCreate'
}
}

View File

@@ -48,41 +48,16 @@ export default {
label: this.$tc('Action'),
align: 'center',
formatter: ActionsFormatter,
actions: {
hasUpdate: (row, cellValue) => {
return false
},
canUpdate: (row, cellValue) => {
console.log('On table update')
return false
},
hasDelete: true,
canDelete: (row, cellValue) => {
return true
},
onDelete: (row, cellValue) => {
this.$confirm('你好啊', '提示', {
type: 'warning',
confirmButtonClass: 'el-button--danger',
beforeClose: async(action, instance, done) => {
}
}).catch(() => {
/* 取消*/
})
},
order: []
}
actions: [
]
}
],
// 写路由名字table组件会自动传作为参数
tableActions: {
editRoute: '404'
}
hasEdit: false,
hasDelete: false
},
headerActions: {
hasDelete: false,
hasUpdate: false,
hasCreate: false
hasCreate: false,
hasBulkDelete: false,
}
}
}

View File

@@ -49,41 +49,12 @@ export default {
prop: 'id',
label: this.$tc('Action'),
align: 'center',
formatter: ActionsFormatter,
actions: {
hasUpdate: (row, cellValue) => {
return true
},
canUpdate: (row, cellValue) => {
console.log('On table update')
return true
},
hasDelete: true,
canDelete: (row, cellValue) => {
return true
},
onDelete: (row, cellValue) => {
this.$confirm('你好啊', '提示', {
type: 'warning',
confirmButtonClass: 'el-button--danger',
beforeClose: async(action, instance, done) => {
}
}).catch(() => {
/* 取消*/
})
},
order: []
}
formatter: ActionsFormatter
}
],
tableActions: {
hasEdit: true,
editRoute: '404'
}
]
},
headerActions: {
hasDelete: false,
hasUpdate: false,
hasBulkDelete: false,
createRoute: 'DatabaseAppPermissionCreate'
}
}

View File

@@ -49,41 +49,12 @@ export default {
prop: 'id',
label: this.$tc('Action'),
align: 'center',
formatter: ActionsFormatter,
actions: {
hasUpdate: (row, cellValue) => {
return true
},
canUpdate: (row, cellValue) => {
console.log('On table update')
return true
},
hasDelete: true,
canDelete: (row, cellValue) => {
return true
},
onDelete: (row, cellValue) => {
this.$confirm('你好啊', '提示', {
type: 'warning',
confirmButtonClass: 'el-button--danger',
beforeClose: async(action, instance, done) => {
}
}).catch(() => {
/* 取消*/
})
},
order: []
}
formatter: ActionsFormatter
}
],
tableActions: {
hasEdit: true,
editRoute: '404'
}
]
},
headerActions: {
hasDelete: false,
hasUpdate: false,
hasBulkDelete: false,
createRoute: 'RemoteAppPermissionCreate'
}
}

View File

@@ -68,8 +68,7 @@ export default {
},
headerActions: {
hasCreate: false,
hasDelete: false,
hasUpdate: false
hasBulkDelete: false
}
}
}

View File

@@ -4,6 +4,7 @@
<script>
import { GenericListPage } from '@/layout/components'
import { ActionsFormatter } from '@/components/ListTable/formatters/index'
export default {
components: {
@@ -66,34 +67,22 @@ export default {
{
prop: 'duration',
label: this.$t('sessions.duration')
}
],
tableActions: {
hasEdit: false,
hasDelete: false
},
extraButtons: [
{
type: 'warning',
text: this.$t('sessions.replay'),
// 必须使用箭头函数
atClick: (row) => {
this.$router.push({ name: '404' })
}
},
{
type: 'primary',
text: this.$t('sessions.download'),
atClick: (row) => {
this.$router.push({ name: '404' })
prop: 'id',
label: this.$tc('Action'),
align: 'center',
formatter: ActionsFormatter,
actions: {
hasEdit: false,
hasDelete: false
}
}
]
},
headerActions: {
hasCreate: false,
hasDelete: false,
hasUpdate: false
hasBulkDelete: false
}
}
}

View File

@@ -4,6 +4,7 @@
<script>
import { GenericListPage } from '@/layout/components'
import { ActionsFormatter } from '@/components/ListTable/formatters/index'
export default {
components: {
@@ -66,27 +67,22 @@ export default {
{
prop: 'duration',
label: this.$t('sessions.duration')
}
],
tableActions: {
hasEdit: false,
hasDelete: false
},
extraButtons: [
},
{
type: 'danger',
text: this.$t('sessions.terminate'),
// 必须使用箭头函数
atClick: (row) => {
this.$router.push({ name: '404' })
prop: 'id',
label: this.$tc('Action'),
align: 'center',
formatter: ActionsFormatter,
actions: {
hasEdit: false,
hasDelete: false
}
}
]
},
headerActions: {
hasCreate: false,
hasDelete: false,
hasUpdate: false
hasBulkDelete: false
}
}
}

View File

@@ -55,11 +55,25 @@ export default {
}
},
headerActions: {
hasCreate: true,
hasDelete: false,
hasUpdate: false
hasCreate: false,
hasBulkDelete: false,
extraActions: [
{
name: 'StorageConfiguration',
title: this.$t('sessions.StorageConfiguration'),
type: 'primary',
has: true,
can: true,
callback: this.handleStorageConfiguration
}
]
}
}
},
methods: {
handleStorageConfiguration() {
console.log('handleStorageConfiguration')
}
}
}
</script>

View File

@@ -57,16 +57,11 @@ export default {
label: this.$t('tickets.date'),
sortable: 'custom'
}
],
// 写路由名字table组件会自动传作为参数
tableActions: {
editRoute: '404'
}
]
},
headerActions: {
hasDelete: false,
hasUpdate: false,
hasCreate: false
hasCreate: false,
hasBulkDelete: false,
}
}
}