提交 8367033b authored 作者: fit2cloud-chenyw's avatar fit2cloud-chenyw

feat: 仪表盘分享tab

上级 7f4a9d6b
<template>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="部门" name="first">部门</el-tab-pane>
<el-tab-pane label="角色" name="second">角色</el-tab-pane>
<el-tab-pane label="用户" name="third">用户</el-tab-pane>
</el-tabs>
</template>
<script>
export default {
name: 'GrantAuth',
props: {
resourceId: {
type: String,
default: null
}
},
data() {
return {
activeName: 'second'
}
},
methods: {
handleClick(tab, event) {
console.log(tab, event)
}
}
}
</script>
...@@ -111,14 +111,14 @@ ...@@ -111,14 +111,14 @@
</el-dialog> </el-dialog>
<el-dialog <el-dialog
:title="$t('panel.share')" :title="authTitle"
:visible.sync="authVisible" :visible.sync="authVisible"
:show-close="false" :show-close="false"
top="10vh"
width="30%" width="30%"
custom-class="authDialog"
:before-close="handleClose" :before-close="handleClose"
> >
<span>分享授权</span> <grant-auth :resource-id="authResourceId" />
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="authVisible = false">取 消</el-button> <el-button @click="authVisible = false">取 消</el-button>
<el-button type="primary" @click="authVisible = false">确 定</el-button> <el-button type="primary" @click="authVisible = false">确 定</el-button>
...@@ -129,12 +129,16 @@ ...@@ -129,12 +129,16 @@
</template> </template>
<script> <script>
import GrantAuth from '../GrantAuth'
import { loadTable, getScene, addGroup, delGroup, addTable, delTable, groupTree, defaultTree } from '@/api/panel/panel' import { loadTable, getScene, addGroup, delGroup, addTable, delTable, groupTree, defaultTree } from '@/api/panel/panel'
export default { export default {
name: 'PanelList', name: 'PanelList',
components: { GrantAuth },
data() { data() {
return { return {
authTitle: null,
authResourceId: null,
authVisible: false, authVisible: false,
defaultData: [], defaultData: [],
dialogTitle: '', dialogTitle: '',
...@@ -482,7 +486,8 @@ export default { ...@@ -482,7 +486,8 @@ export default {
this.$emit('switchComponent', { name: 'PanelView' }) this.$emit('switchComponent', { name: 'PanelView' })
}, },
share(data) { share(data) {
console.log(data) this.authResourceId = data.id
this.authTitle = '把仪表板[' + data.label + ']分享给'
this.authVisible = true this.authVisible = true
}, },
handleClose(done) { handleClose(done) {
...@@ -537,4 +542,9 @@ export default { ...@@ -537,4 +542,9 @@ export default {
.title-text { .title-text {
line-height: 26px; line-height: 26px;
} }
/* .el-dialog authDialog >>> div {
padding: 5px !important;
padding-bottom:5px !important;
} */
</style> </style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论