Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
OrangeM21 2020-06-15 18:32:41 +08:00
commit a4d2d98f04
3 changed files with 70 additions and 8 deletions

View File

@ -69,6 +69,7 @@ export default {
that.iHasObjects = [...that.iHasObjects, ...objects]
that.$refs.select2.clearSelected()
// setTimeout(() => location.reload(), 300)
this.$message.success(this.$t('common.updateSuccessMsg'))
},
onDeleteSuccess: (obj, that) => {
const theRemoveIndex = that.iHasObjects.findIndex((v) => v.value === obj.value)

View File

@ -4,6 +4,7 @@
<script>
import { GenericCreateUpdatePage } from '@/layout/components'
import AssetPermissionFormActionField from './components/AssetPermissionFormActionField'
import AssetSelect from '@/components/AssetSelect'
export default {
@ -89,14 +90,7 @@ export default {
},
actions: {
label: this.$t('perms.Actions'),
type: 'checkbox-group',
options: [
{ label: 'all', value: this.$t('perms.all') },
{ label: 'connect', value: this.$t('perms.connect') },
{ label: 'updownload', value: this.$t('perms.upDownload') },
{ label: 'upload_file', value: this.$t('perms.uploadFile') },
{ label: 'download_file', value: this.$t('perms.downloadFile') }
]
component: AssetPermissionFormActionField
},
date_start: {
label: this.$t('common.dateStart')

View File

@ -0,0 +1,67 @@
<template>
<el-tree
:data="data"
show-checkbox
node-key="id"
:default-expand-all="true"
:default-checked-keys="value"
:props="defaultProps"
@check="handleCheckChange"
/>
</template>
<script>
export default {
name: 'AssetPermissionFormActionFiel',
props: {
value: {
type: Array,
default: () => ['all', 'connect', 'upload_file', 'download_file', 'updownload']
}
},
data() {
return {
defaultProps: {
children: 'children',
label: 'label'
},
data: [
{
id: 'all',
label: this.$t('perms.all'),
children: [
{
id: 'connect',
label: this.$t('perms.connect')
},
{
id: 'updownload',
label: this.$t('perms.upDownload'),
children: [
{
id: 'upload_file',
label: this.$t('perms.uploadFile')
},
{
id: 'download_file',
label: this.$t('perms.downloadFile')
}
]
}
]
}
]
}
},
methods: {
handleCheckChange(data, obj) {
const checkedKeys = obj.checkedKeys
this.$emit('input', checkedKeys)
}
}
}
</script>
<style scoped>
</style>