修改数据源预览数据为10条
parent
623f7314bd
commit
59724d1c6f
@ -1,192 +1,232 @@
|
|||||||
<template>
|
<template>
|
||||||
<de-container>
|
<de-container>
|
||||||
<span>敬请期待</span>
|
<!-- <span>敬请期待</span> -->
|
||||||
<!-- <de-aside-container>-->
|
<de-aside-container>
|
||||||
<!-- <el-button v-show="!showSourceSearchInput" class="de-icon" icon="el-icon-search" circle size="mini" @click="showSourceSearchWidget" />-->
|
<el-button
|
||||||
<!-- <div v-show="showSourceSearchInput" class="de-input">-->
|
v-show="!showSourceSearchInput"
|
||||||
<!-- <el-input v-model="sourceFilterText">-->
|
class="de-icon"
|
||||||
<!-- <el-button slot="append" icon="el-icon-close" @click="closeSourceSearchWidget" />-->
|
icon="el-icon-search"
|
||||||
<!-- </el-input>-->
|
circle
|
||||||
<!-- </div>-->
|
size="mini"
|
||||||
<!-- <el-tabs v-model="sourceActiveName" :class="{'de-search-header': showSourceSearchInput}" @tab-click="handleClick">-->
|
@click="showSourceSearchWidget"
|
||||||
<!-- <el-tab-pane v-for="(sourceInfo, index) in sourceInfoArray" :key="index" :lazy="true" :label="sourceInfo.tabName" :name="sourceInfo.authType">-->
|
/>
|
||||||
<!-- <lazy-tree-->
|
<div v-show="showSourceSearchInput" class="de-input">
|
||||||
<!-- v-if="authCondition"-->
|
<el-input v-model="sourceFilterText">
|
||||||
<!-- :active-name="sourceActiveName"-->
|
<el-button
|
||||||
<!-- :filter-text="sourceFilterText"-->
|
slot="append"
|
||||||
<!-- :data-info="sourceInfo"-->
|
icon="el-icon-close"
|
||||||
<!-- highlight-current-->
|
@click="closeSourceSearchWidget"
|
||||||
<!-- @nodeClick="authNodeClick"-->
|
/>
|
||||||
<!-- />-->
|
</el-input>
|
||||||
<!-- </el-tab-pane>-->
|
</div>
|
||||||
<!-- </el-tabs>-->
|
<el-tabs
|
||||||
<!-- </de-aside-container>-->
|
v-model="sourceActiveName"
|
||||||
<!-- <de-main-container class="de-main-container-auth">-->
|
:class="{ 'de-search-header': showSourceSearchInput }"
|
||||||
<!-- <el-button v-show="!showTargetSearchInput" class="de-icon" icon="el-icon-search" circle size="mini" @click="showTargetSearchWidget" />-->
|
@tab-click="handleClick"
|
||||||
<!-- <div v-show="showTargetSearchInput" class="de-input">-->
|
>
|
||||||
<!-- <el-input v-model="targetFilterText">-->
|
<el-tab-pane
|
||||||
<!-- <el-button slot="append" icon="el-icon-close" @click="closeTargetSearchWidget" />-->
|
v-for="(sourceInfo, index) in sourceInfoArray"
|
||||||
<!-- </el-input>-->
|
:key="index"
|
||||||
<!-- </div>-->
|
:lazy="true"
|
||||||
<!-- <el-tabs v-model="targetActiveName" :class="{'de-search-header': showTargetSearchInput}" @tab-click="handleClick">-->
|
:label="sourceInfo.tabName"
|
||||||
<!-- <el-tab-pane v-for="(targetInfo, index) in targetInfoArray" :key="index" :lazy="true" :label="targetInfo.tabName" :name="targetInfo.authType">-->
|
:name="sourceInfo.authType"
|
||||||
<!-- <lazy-tree-->
|
>
|
||||||
<!-- :active-name="targetActiveName"-->
|
<lazy-tree
|
||||||
<!-- :filter-text="targetFilterText"-->
|
v-if="authCondition"
|
||||||
<!-- :data-info="targetInfo"-->
|
:active-name="sourceActiveName"
|
||||||
<!-- show-extent-->
|
:filter-text="sourceFilterText"
|
||||||
<!-- :auth-condition="authCondition"-->
|
:data-info="sourceInfo"
|
||||||
<!-- />-->
|
highlight-current
|
||||||
<!-- </el-tab-pane>-->
|
@nodeClick="authNodeClick"
|
||||||
<!-- </el-tabs>-->
|
/>
|
||||||
<!-- </de-main-container>-->
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</de-aside-container>
|
||||||
|
<de-main-container class="de-main-container-auth">
|
||||||
|
<el-button
|
||||||
|
v-show="!showTargetSearchInput"
|
||||||
|
class="de-icon"
|
||||||
|
icon="el-icon-search"
|
||||||
|
circle
|
||||||
|
size="mini"
|
||||||
|
@click="showTargetSearchWidget"
|
||||||
|
/>
|
||||||
|
<div v-show="showTargetSearchInput" class="de-input">
|
||||||
|
<el-input v-model="targetFilterText">
|
||||||
|
<el-button
|
||||||
|
slot="append"
|
||||||
|
icon="el-icon-close"
|
||||||
|
@click="closeTargetSearchWidget"
|
||||||
|
/>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<el-tabs
|
||||||
|
v-model="targetActiveName"
|
||||||
|
:class="{ 'de-search-header': showTargetSearchInput }"
|
||||||
|
@tab-click="handleClick"
|
||||||
|
>
|
||||||
|
<el-tab-pane
|
||||||
|
v-for="(targetInfo, index) in targetInfoArray"
|
||||||
|
:key="index"
|
||||||
|
:lazy="true"
|
||||||
|
:label="targetInfo.tabName"
|
||||||
|
:name="targetInfo.authType"
|
||||||
|
>
|
||||||
|
<lazy-tree
|
||||||
|
:active-name="targetActiveName"
|
||||||
|
:filter-text="targetFilterText"
|
||||||
|
:data-info="targetInfo"
|
||||||
|
show-extent
|
||||||
|
:auth-condition="authCondition"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</de-main-container>
|
||||||
</de-container>
|
</de-container>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import DeContainer from '../../../components/dataease/DeContainer'
|
import DeContainer from "../../../components/dataease/DeContainer";
|
||||||
import DeAsideContainer from '../../../components/dataease/DeAsideContainer'
|
import DeAsideContainer from "../../../components/dataease/DeAsideContainer";
|
||||||
import DeMainContainer from '../../../components/dataease/DeMainContainer'
|
import DeMainContainer from "../../../components/dataease/DeMainContainer";
|
||||||
import LazyTree from './components/LazyTree'
|
import LazyTree from "./components/LazyTree";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Authority',
|
name: "Authority",
|
||||||
// eslint-disable-next-line vue/no-unused-components
|
// eslint-disable-next-line vue/no-unused-components
|
||||||
components: { LazyTree, DeMainContainer, DeAsideContainer, DeContainer },
|
components: { LazyTree, DeMainContainer, DeAsideContainer, DeContainer },
|
||||||
props: {
|
props: {
|
||||||
resourceId: {
|
resourceId: {
|
||||||
type: String,
|
type: String,
|
||||||
default: null
|
default: null,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
targetInfoArray:
|
targetInfoArray: [
|
||||||
[
|
{
|
||||||
{
|
tabName: "部门权限",
|
||||||
tabName: '部门权限',
|
head: "所有部门",
|
||||||
head: '所有部门',
|
direction: "target",
|
||||||
direction: 'target',
|
authType: "dept",
|
||||||
authType: 'dept'
|
},
|
||||||
},
|
{
|
||||||
{
|
tabName: "角色权限",
|
||||||
tabName: '角色权限',
|
head: "所有角色",
|
||||||
head: '所有角色',
|
direction: "target",
|
||||||
direction: 'target',
|
authType: "role",
|
||||||
authType: 'role'
|
},
|
||||||
},
|
{
|
||||||
{
|
tabName: "用户权限",
|
||||||
tabName: '用户权限',
|
head: "所有用户",
|
||||||
head: '所有用户',
|
direction: "target",
|
||||||
direction: 'target',
|
authType: "user",
|
||||||
authType: 'user'
|
},
|
||||||
}],
|
],
|
||||||
sourceInfoArray:
|
sourceInfoArray: [
|
||||||
[
|
{
|
||||||
{
|
tabName: "数据源",
|
||||||
tabName: '数据源',
|
head: "所有数据源",
|
||||||
head: '所有数据源',
|
direction: "source",
|
||||||
direction: 'source',
|
authType: "link",
|
||||||
authType: 'link'
|
},
|
||||||
},
|
{
|
||||||
{
|
tabName: "数据集",
|
||||||
tabName: '数据集',
|
head: "所有数据集",
|
||||||
head: '所有数据集',
|
direction: "source",
|
||||||
direction: 'source',
|
authType: "dataset",
|
||||||
authType: 'dataset'
|
},
|
||||||
},
|
{
|
||||||
{
|
tabName: "视图",
|
||||||
tabName: '视图',
|
head: "所有视图",
|
||||||
head: '所有视图',
|
direction: "source",
|
||||||
direction: 'source',
|
authType: "chart",
|
||||||
authType: 'chart'
|
},
|
||||||
},
|
{
|
||||||
{
|
tabName: "仪表板",
|
||||||
tabName: '仪表板',
|
head: "所有仪表板",
|
||||||
head: '所有仪表板',
|
direction: "source",
|
||||||
direction: 'source',
|
authType: "panel",
|
||||||
authType: 'panel'
|
},
|
||||||
}],
|
],
|
||||||
targetActiveName: null,
|
targetActiveName: null,
|
||||||
sourceActiveName: null,
|
sourceActiveName: null,
|
||||||
showSourceSearchInput: false,
|
showSourceSearchInput: false,
|
||||||
showTargetSearchInput: false,
|
showTargetSearchInput: false,
|
||||||
sourceFilterText: '',
|
sourceFilterText: "",
|
||||||
targetFilterText: '',
|
targetFilterText: "",
|
||||||
timeMachine: null,
|
timeMachine: null,
|
||||||
authCondition: null
|
authCondition: null,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.targetActiveName = this.targetInfoArray[0].authType
|
this.targetActiveName = this.targetInfoArray[0].authType;
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
handleClick(tab, event) {
|
handleClick(tab, event) {},
|
||||||
},
|
|
||||||
showSourceSearchWidget() {
|
showSourceSearchWidget() {
|
||||||
this.showSourceSearchInput = true
|
this.showSourceSearchInput = true;
|
||||||
},
|
},
|
||||||
closeSourceSearchWidget() {
|
closeSourceSearchWidget() {
|
||||||
this.sourceFilterText = ''
|
this.sourceFilterText = "";
|
||||||
this.showSourceSearchInput = false
|
this.showSourceSearchInput = false;
|
||||||
},
|
},
|
||||||
showTargetSearchWidget() {
|
showTargetSearchWidget() {
|
||||||
this.showTargetSearchInput = true
|
this.showTargetSearchInput = true;
|
||||||
},
|
},
|
||||||
closeTargetSearchWidget() {
|
closeTargetSearchWidget() {
|
||||||
this.targetFilterText = ''
|
this.targetFilterText = "";
|
||||||
this.showTargetSearchInput = false
|
this.showTargetSearchInput = false;
|
||||||
},
|
},
|
||||||
save() {
|
save() {
|
||||||
this.$refs[this.activeName].save()
|
this.$refs[this.activeName].save();
|
||||||
this.$emit('close-grant', 0)
|
this.$emit("close-grant", 0);
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
this.$refs[this.activeName].cancel()
|
this.$refs[this.activeName].cancel();
|
||||||
this.$emit('close-grant', 0)
|
this.$emit("close-grant", 0);
|
||||||
},
|
},
|
||||||
authNodeClick(val) {
|
authNodeClick(val) {
|
||||||
// console.log('authNodeClick')
|
// console.log('authNodeClick')
|
||||||
this.authCondition = val
|
this.authCondition = val;
|
||||||
},
|
},
|
||||||
clickAuth(auth) {
|
clickAuth(auth) {
|
||||||
// console.log('clickAuth')
|
// console.log('clickAuth')
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.de-tab {
|
.de-tab {
|
||||||
border:1px solid #E6E6E6;
|
border: 1px solid #e6e6e6;
|
||||||
min-height:200px !important;
|
min-height: 200px !important;
|
||||||
max-height:300px !important;
|
max-height: 300px !important;
|
||||||
overflow:auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
.de-icon {
|
.de-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
top: 15px;
|
top: 15px;
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
}
|
}
|
||||||
.el-input-group__append{
|
.el-input-group__append {
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
}
|
}
|
||||||
.el-input__inner{
|
.el-input__inner {
|
||||||
border-right: none;
|
border-right: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.auth-root-class {
|
.auth-root-class {
|
||||||
margin: 15px 0px 5px;
|
margin: 15px 0px 5px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
.de-main-container-auth{
|
.de-main-container-auth {
|
||||||
border: 1px solid #E6E6E6;
|
border: 1px solid #e6e6e6;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ::-webkit-scrollbar {
|
// ::-webkit-scrollbar {
|
||||||
|
|
||||||
// }
|
// }
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
Reference in New Issue