forked from github/dataease
Merge branch 'dev' of github.com:dataease/dataease into dev
This commit is contained in:
commit
38905dcec8
@ -41,6 +41,7 @@ public class DePermissionAnnotationHandler {
|
|||||||
DePermission[] dePermissions = annotation.value();
|
DePermission[] dePermissions = annotation.value();
|
||||||
Object[] args = point.getArgs();
|
Object[] args = point.getArgs();
|
||||||
if (logical == Logical.AND) {
|
if (logical == Logical.AND) {
|
||||||
|
access = true;
|
||||||
for (int i = 0; i < dePermissions.length; i++) {
|
for (int i = 0; i < dePermissions.length; i++) {
|
||||||
DePermission permission = dePermissions[i];
|
DePermission permission = dePermissions[i];
|
||||||
boolean currentAccess = access(args[permission.paramIndex()], permission, 0);
|
boolean currentAccess = access(args[permission.paramIndex()], permission, 0);
|
||||||
|
@ -55,6 +55,10 @@ public class ShiroServiceImpl implements ShiroService {
|
|||||||
filterChainDefinitionMap.put("/linkJump/queryPanelJumpInfo/**", ANON);
|
filterChainDefinitionMap.put("/linkJump/queryPanelJumpInfo/**", ANON);
|
||||||
filterChainDefinitionMap.put("/linkJump/queryTargetPanelJumpInfo", ANON);
|
filterChainDefinitionMap.put("/linkJump/queryTargetPanelJumpInfo", ANON);
|
||||||
|
|
||||||
|
//外部跳转参数
|
||||||
|
filterChainDefinitionMap.put("/outerParams/**", ANON);
|
||||||
|
|
||||||
|
|
||||||
filterChainDefinitionMap.put("/tempMobileLink/**", ANON);
|
filterChainDefinitionMap.put("/tempMobileLink/**", ANON);
|
||||||
filterChainDefinitionMap.put("/de-app/**", ANON);
|
filterChainDefinitionMap.put("/de-app/**", ANON);
|
||||||
filterChainDefinitionMap.put("/app.html", ANON);
|
filterChainDefinitionMap.put("/app.html", ANON);
|
||||||
|
@ -92,7 +92,8 @@
|
|||||||
LEFT JOIN panel_outer_params_info popi ON pop.params_id = popi.params_id
|
LEFT JOIN panel_outer_params_info popi ON pop.params_id = popi.params_id
|
||||||
LEFT JOIN panel_outer_params_target_view_info poptvi ON popi.params_info_id = poptvi.params_info_id
|
LEFT JOIN panel_outer_params_target_view_info poptvi ON popi.params_info_id = poptvi.params_info_id
|
||||||
WHERE
|
WHERE
|
||||||
pop.panel_id = #{panelId}
|
pop.panel_id = #{panelId} and pop.checked=1
|
||||||
|
and popi.checked=1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
@ -803,7 +803,7 @@ public class ChartViewService {
|
|||||||
pluginViewParam.setPluginChartFieldCustomFilters(fieldFilters);
|
pluginViewParam.setPluginChartFieldCustomFilters(fieldFilters);
|
||||||
pluginViewParam.setPluginChartExtFilters(panelFilters);
|
pluginViewParam.setPluginChartExtFilters(panelFilters);
|
||||||
pluginViewParam.setPluginViewLimit(pluginViewLimit);
|
pluginViewParam.setPluginViewLimit(pluginViewLimit);
|
||||||
pluginViewParam.setUserId(AuthUtils.getUser().getUserId());
|
// pluginViewParam.setUserId(AuthUtils.getUser().getUserId());
|
||||||
return pluginViewParam;
|
return pluginViewParam;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,9 @@
|
|||||||
url += '&user=' + encodeURIComponent(user)
|
url += '&user=' + encodeURIComponent(user)
|
||||||
}
|
}
|
||||||
if (attachParams) {
|
if (attachParams) {
|
||||||
url += '&attachParams=' + attachParams
|
console.log('attachParams-bf:'+attachParams+';-af:'+encodeURIComponent(attachParams))
|
||||||
|
url += '&attachParams=' + encodeURIComponent(attachParams)
|
||||||
|
|
||||||
}
|
}
|
||||||
window.location.href = url
|
window.location.href = url
|
||||||
</script>
|
</script>
|
||||||
|
@ -50,7 +50,7 @@ export default {
|
|||||||
if (this.curComponent.type === 'view') {
|
if (this.curComponent.type === 'view') {
|
||||||
this.$store.dispatch('chart/setViewId', null)
|
this.$store.dispatch('chart/setViewId', null)
|
||||||
this.$store.dispatch('chart/setViewId', this.curComponent.propValue.viewId)
|
this.$store.dispatch('chart/setViewId', this.curComponent.propValue.viewId)
|
||||||
bus.$emit('PanelSwitchComponent', { name: 'ChartEdit', param: { 'id': this.curComponent.propValue.viewId, 'optType': 'edit' }})
|
bus.$emit('change_panel_right_draw', true)
|
||||||
}
|
}
|
||||||
if (this.curComponent.type === 'custom') {
|
if (this.curComponent.type === 'custom') {
|
||||||
bus.$emit('component-dialog-edit')
|
bus.$emit('component-dialog-edit')
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="bar-main">
|
<div class="bar-main">
|
||||||
<div v-if="!linkageSettingStatus">
|
<div>
|
||||||
<span v-if="isEdit" :title="$t('panel.edit')">
|
<span v-if="isEdit" :title="$t('panel.edit')">
|
||||||
<i class="icon iconfont icon-edit" @click.stop="edit" />
|
<i class="icon iconfont icon-edit" @click.stop="edit" />
|
||||||
</span>
|
</span>
|
||||||
@ -51,12 +51,9 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
edit() {
|
edit() {
|
||||||
// 编辑时临时保存 当前修改的画布
|
|
||||||
this.$store.dispatch('panel/setComponentDataTemp', JSON.stringify(this.componentData))
|
|
||||||
this.$store.dispatch('panel/setCanvasStyleDataTemp', JSON.stringify(this.canvasStyleData))
|
|
||||||
this.$store.dispatch('chart/setViewId', null)
|
this.$store.dispatch('chart/setViewId', null)
|
||||||
this.$store.dispatch('chart/setViewId', this.viewId)
|
this.$store.dispatch('chart/setViewId', this.viewId)
|
||||||
bus.$emit('PanelSwitchComponent', { name: 'ChartEdit', param: { 'id': this.viewId, 'optType': 'edit' }})
|
bus.$emit('change_panel_right_draw', true)
|
||||||
},
|
},
|
||||||
linkageEdit() {
|
linkageEdit() {
|
||||||
|
|
||||||
|
@ -46,9 +46,6 @@ export default {
|
|||||||
this.$refs.trackButton.$el.click()
|
this.$refs.trackButton.$el.click()
|
||||||
},
|
},
|
||||||
edit() {
|
edit() {
|
||||||
// 编辑时临时保存 当前修改的画布
|
|
||||||
this.$store.dispatch('panel/setComponentDataTemp', JSON.stringify(this.componentData))
|
|
||||||
this.$store.dispatch('panel/setCanvasStyleDataTemp', JSON.stringify(this.canvasStyleData))
|
|
||||||
if (this.curComponent.type === 'view') {
|
if (this.curComponent.type === 'view') {
|
||||||
this.$store.dispatch('chart/setViewId', null)
|
this.$store.dispatch('chart/setViewId', null)
|
||||||
this.$store.dispatch('chart/setViewId', this.curComponent.propValue.viewId)
|
this.$store.dispatch('chart/setViewId', this.curComponent.propValue.viewId)
|
||||||
|
@ -372,7 +372,7 @@ export default {
|
|||||||
this.destroyTimeMachine()
|
this.destroyTimeMachine()
|
||||||
this.changeIndex++
|
this.changeIndex++
|
||||||
this.chartResize(this.changeIndex)
|
this.chartResize(this.changeIndex)
|
||||||
} else {
|
} else if (this.$refs[this.element.propValue.id]) {
|
||||||
this.chart.isPlugin
|
this.chart.isPlugin
|
||||||
? this.$refs[this.element.propValue.id].callPluginInner({ methodName: 'chartResize' })
|
? this.$refs[this.element.propValue.id].callPluginInner({ methodName: 'chartResize' })
|
||||||
: this.$refs[this.element.propValue.id].chartResize()
|
: this.$refs[this.element.propValue.id].chartResize()
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-aside
|
<el-aside
|
||||||
:width="width"
|
:width="currentWidth"
|
||||||
class="ms-aside-container"
|
class="ms-aside-container"
|
||||||
:style="{'margin-left': !asideHidden ? 0 : '-' + width}"
|
:style="{'margin-left': !asideHidden ? 0 : '-' + currentWidth}"
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
<de-horizontal-drag-bar v-if="showDragBar" />
|
<de-horizontal-drag-bar v-if="showDragBar" :type="type" />
|
||||||
</el-aside>
|
</el-aside>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import DeHorizontalDragBar from './dragbar/DeLeft2RightDragBar'
|
import DeHorizontalDragBar from './dragbar/DeLeft2RightDragBar'
|
||||||
|
import { getLayout } from '@/utils/LayoutUtil'
|
||||||
export default {
|
export default {
|
||||||
name: 'DeAsideContainer',
|
name: 'DeAsideContainer',
|
||||||
components: { DeHorizontalDragBar },
|
components: { DeHorizontalDragBar },
|
||||||
@ -26,12 +27,21 @@ export default {
|
|||||||
showDragBar: {
|
showDragBar: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
asideHidden: false
|
asideHidden: false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
currentWidth() {
|
||||||
|
return this.type && getLayout(this.type) || this.width
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,10 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-left-to-right-drag class="drag-bar" />
|
<div v-left-to-right-drag="type" class="drag-bar" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'DeLeft2RightDragBar'
|
name: 'DeLeft2RightDragBar',
|
||||||
|
props: {
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: null
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
import permission from '@/directive/Permission'
|
import permission from '@/directive/Permission'
|
||||||
// import dataPermission from '@/directive/DataPermission'
|
import { setLayout } from '@/utils/LayoutUtil'
|
||||||
|
|
||||||
export const left2RightDrag = {
|
export const left2RightDrag = {
|
||||||
inserted(el, binding) {
|
inserted(el, binding) {
|
||||||
|
const value = binding.value
|
||||||
el.onmousedown = function(e) {
|
el.onmousedown = function(e) {
|
||||||
const init = e.clientX
|
const init = e.clientX
|
||||||
const parent = el.parentNode
|
const parent = el.parentNode
|
||||||
@ -15,6 +16,8 @@ export const left2RightDrag = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
document.onmouseup = function() {
|
document.onmouseup = function() {
|
||||||
|
value && setLayout(value, parent.style.width)
|
||||||
|
|
||||||
document.onmousemove = document.onmouseup = null
|
document.onmousemove = document.onmouseup = null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1390,6 +1390,7 @@ export default {
|
|||||||
sure_bt: 'Confirm'
|
sure_bt: 'Confirm'
|
||||||
},
|
},
|
||||||
panel: {
|
panel: {
|
||||||
|
json_params_error: 'Third Party Parameters Parsing Failed. Please Check Whether The Parameters Format Is Correct',
|
||||||
inner_padding: 'Inner Padding',
|
inner_padding: 'Inner Padding',
|
||||||
board_radio: 'Board Radio',
|
board_radio: 'Board Radio',
|
||||||
background: 'Background',
|
background: 'Background',
|
||||||
|
@ -1391,6 +1391,7 @@ export default {
|
|||||||
sure_bt: '確定'
|
sure_bt: '確定'
|
||||||
},
|
},
|
||||||
panel: {
|
panel: {
|
||||||
|
json_params_error: '第三方参数解析失败,请检查参数格式是否正确',
|
||||||
inner_padding: '内边距',
|
inner_padding: '内边距',
|
||||||
board_radio: '边框半径',
|
board_radio: '边框半径',
|
||||||
background: '背景',
|
background: '背景',
|
||||||
|
@ -1399,6 +1399,7 @@ export default {
|
|||||||
sure_bt: '确定'
|
sure_bt: '确定'
|
||||||
},
|
},
|
||||||
panel: {
|
panel: {
|
||||||
|
json_params_error: '第三方参数解析失败,请检查参数格式是否正确',
|
||||||
inner_padding: '内边距',
|
inner_padding: '内边距',
|
||||||
board_radio: '边框半径',
|
board_radio: '边框半径',
|
||||||
background: '背景',
|
background: '背景',
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<topbar v-if="!fullHeightFlag && finishLoad" :show-tips="showTips" />
|
<topbar v-if="!fullHeightFlag && finishLoad" :show-tips="showTips" />
|
||||||
|
|
||||||
<de-container :style="mainStyle">
|
<de-container :style="mainStyle">
|
||||||
<de-aside-container v-if="!sidebar.hide" class="le-aside-container">
|
<de-aside-container v-if="!sidebar.hide" type="system" class="le-aside-container">
|
||||||
<sidebar class="sidebar-container" />
|
<sidebar class="sidebar-container" />
|
||||||
</de-aside-container>
|
</de-aside-container>
|
||||||
|
|
||||||
|
17
frontend/src/utils/LayoutUtil.js
Normal file
17
frontend/src/utils/LayoutUtil.js
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
const defaultLayout = {
|
||||||
|
panel: '260px',
|
||||||
|
dataset: '260px',
|
||||||
|
datasource: '260px',
|
||||||
|
system: '260px'
|
||||||
|
}
|
||||||
|
const STORAGE_KEY = 'global_layout'
|
||||||
|
|
||||||
|
export const getLayout = (type) => {
|
||||||
|
const key = STORAGE_KEY + '_' + type
|
||||||
|
return localStorage.getItem(key) || defaultLayout[type]
|
||||||
|
}
|
||||||
|
|
||||||
|
export const setLayout = (type, val) => {
|
||||||
|
const key = STORAGE_KEY + '_' + type
|
||||||
|
localStorage.setItem(key, val || defaultLayout[type])
|
||||||
|
}
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<de-container v-loading="$store.getters.loadingMap[$store.getters.currentPath]">
|
<de-container v-loading="$store.getters.loadingMap[$store.getters.currentPath]">
|
||||||
|
|
||||||
<de-aside-container>
|
<de-aside-container type="dataset">
|
||||||
<group :save-status="saveStatus" @switchComponent="switchComponent" />
|
<group :save-status="saveStatus" @switchComponent="switchComponent" />
|
||||||
</de-aside-container>
|
</de-aside-container>
|
||||||
|
|
||||||
@ -30,7 +30,7 @@ import { removeClass } from '@/utils'
|
|||||||
import { checkCustomDs } from '@/api/dataset/dataset'
|
import { checkCustomDs } from '@/api/dataset/dataset'
|
||||||
export default {
|
export default {
|
||||||
name: 'DataSet',
|
name: 'DataSet',
|
||||||
components: { DeMainContainer, DeContainer, DeAsideContainer, Group, DataHome, ViewTable, AddDB, AddSQL, AddExcel, AddCustom, AddApi},
|
components: { DeMainContainer, DeContainer, DeAsideContainer, Group, DataHome, ViewTable, AddDB, AddSQL, AddExcel, AddCustom, AddApi },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
component: DataHome,
|
component: DataHome,
|
||||||
|
@ -69,7 +69,7 @@ export default {
|
|||||||
if (attachParamsEncode) {
|
if (attachParamsEncode) {
|
||||||
try {
|
try {
|
||||||
const Base64 = require('js-base64').Base64
|
const Base64 = require('js-base64').Base64
|
||||||
const attachParam = JSON.parse(Base64.decode(attachParamsEncode))
|
const attachParam = JSON.parse(decodeURIComponent(Base64.decode(attachParamsEncode)))
|
||||||
getOuterParamsInfo(this.resourceId).then(rsp => {
|
getOuterParamsInfo(this.resourceId).then(rsp => {
|
||||||
if (--loadingCount === 0) {
|
if (--loadingCount === 0) {
|
||||||
this.show = true
|
this.show = true
|
||||||
@ -81,6 +81,12 @@ export default {
|
|||||||
if (--loadingCount === 0) {
|
if (--loadingCount === 0) {
|
||||||
this.show = true
|
this.show = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.$message({
|
||||||
|
message: this.$t('panel.json_params_error'),
|
||||||
|
type: 'error',
|
||||||
|
showClose: true
|
||||||
|
})
|
||||||
console.log('outerParams Decode error:', e)
|
console.log('outerParams Decode error:', e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -259,7 +259,7 @@ export default {
|
|||||||
this.$emit('outerParamsSetVisibleChange', false)
|
this.$emit('outerParamsSetVisibleChange', false)
|
||||||
},
|
},
|
||||||
save() {
|
save() {
|
||||||
if (checkRepeat(this.outerParams.outerParamsInfoArray, 'name')) {
|
if (checkRepeat(this.outerParams.outerParamsInfoArray, 'paramName')) {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: this.$t('panel.repeat_params'),
|
message: this.$t('panel.repeat_params'),
|
||||||
type: 'warn',
|
type: 'warn',
|
||||||
@ -389,7 +389,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.bottom {
|
.bottom {
|
||||||
margin-top: 20px;
|
margin-top: 15px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -482,7 +482,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tree-bottom {
|
.tree-bottom {
|
||||||
margin-top: 12px;
|
margin-top: 7px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -634,15 +634,7 @@ export default {
|
|||||||
init(panelId) {
|
init(panelId) {
|
||||||
const _this = this
|
const _this = this
|
||||||
_this.initHasStar()
|
_this.initHasStar()
|
||||||
// 如果临时画布有数据 则使用临时画布数据(视图编辑的时候 会保存临时画布数据)
|
if (panelId) {
|
||||||
const componentDataTemp = this.$store.state.panel.componentDataTemp
|
|
||||||
const canvasStyleDataTemp = this.$store.state.panel.canvasStyleDataTemp
|
|
||||||
if (componentDataTemp && canvasStyleDataTemp) {
|
|
||||||
panelInit(JSON.parse(componentDataTemp), JSON.parse(canvasStyleDataTemp))
|
|
||||||
// 清空临时画布数据
|
|
||||||
_this.$store.dispatch('panel/setComponentDataTemp', null)
|
|
||||||
_this.$store.dispatch('panel/setCanvasStyleDataTemp', null)
|
|
||||||
} else if (panelId) {
|
|
||||||
initPanelData(panelId, function() {
|
initPanelData(panelId, function() {
|
||||||
// 初始化视图缓存
|
// 初始化视图缓存
|
||||||
initViewCache(panelId)
|
initViewCache(panelId)
|
||||||
@ -650,10 +642,6 @@ export default {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
_this.$store.commit('refreshSaveStatus')
|
_this.$store.commit('refreshSaveStatus')
|
||||||
}, 500)
|
}, 500)
|
||||||
// initPanelComponentsData(panelId, function(rsp) {
|
|
||||||
// _this.$store.commit('initPanelComponents', rsp)// 初始化仪表板组件视图数据
|
|
||||||
// _this.$store.commit('recordSnapshot', 'init')// 记录快照
|
|
||||||
// })
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -690,9 +690,6 @@ export default {
|
|||||||
this.$store.commit('refreshSnapshot')
|
this.$store.commit('refreshSnapshot')
|
||||||
this.$store.commit('setComponentData', [])
|
this.$store.commit('setComponentData', [])
|
||||||
this.$store.commit('setCanvasStyle', DEFAULT_COMMON_CANVAS_STYLE_STRING)
|
this.$store.commit('setCanvasStyle', DEFAULT_COMMON_CANVAS_STYLE_STRING)
|
||||||
// 清空临时画布数据
|
|
||||||
this.$store.dispatch('panel/setComponentDataTemp', null)
|
|
||||||
this.$store.dispatch('panel/setCanvasStyleDataTemp', null)
|
|
||||||
this.$store.dispatch('panel/setPanelInfo', data)
|
this.$store.dispatch('panel/setPanelInfo', data)
|
||||||
bus.$emit('PanelSwitchComponent', { name: 'PanelEdit' })
|
bus.$emit('PanelSwitchComponent', { name: 'PanelEdit' })
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<de-container>
|
<de-container>
|
||||||
<de-aside-container>
|
<de-aside-container type="panel">
|
||||||
<el-tabs v-model="activeName" class="tab-panel" :stretch="true" @tab-click="handleClick">
|
<el-tabs v-model="activeName" class="tab-panel" :stretch="true" @tab-click="handleClick">
|
||||||
<el-tab-pane name="PanelList">
|
<el-tab-pane name="PanelList">
|
||||||
<span slot="label"><i class="el-icon-document tablepanel-i" />{{ $t('panel.panel_list') }}</span>
|
<span slot="label"><i class="el-icon-document tablepanel-i" />{{ $t('panel.panel_list') }}</span>
|
||||||
|
@ -1,11 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<de-container v-loading="$store.getters.loadingMap[$store.getters.currentPath]">
|
<de-container v-loading="$store.getters.loadingMap[$store.getters.currentPath]">
|
||||||
<de-aside-container style="padding: 0 0;">
|
<de-aside-container style="padding: 0 0;" type="datasource">
|
||||||
<ds-tree ref="dsTree" :datasource="datasource" @switch-main="switchMain"/>
|
<ds-tree ref="dsTree" :datasource="datasource" @switch-main="switchMain" />
|
||||||
</de-aside-container>
|
</de-aside-container>
|
||||||
<de-main-container>
|
<de-main-container>
|
||||||
<component :is="component" v-if="!!component" :params="param" :tData="tData" @refresh-type="refreshType"
|
<component
|
||||||
@switch-component="switchMain"/>
|
:is="component"
|
||||||
|
v-if="!!component"
|
||||||
|
:params="param"
|
||||||
|
:t-data="tData"
|
||||||
|
@refresh-type="refreshType"
|
||||||
|
@switch-component="switchMain"
|
||||||
|
/>
|
||||||
</de-main-container>
|
</de-main-container>
|
||||||
</de-container>
|
</de-container>
|
||||||
</template>
|
</template>
|
||||||
@ -20,7 +26,7 @@ import DataHome from './DataHome'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DsMain',
|
name: 'DsMain',
|
||||||
components: {DeMainContainer, DeContainer, DeAsideContainer, DsTree, DataHome},
|
components: { DeMainContainer, DeContainer, DeAsideContainer, DsTree, DataHome },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
component: DataHome,
|
component: DataHome,
|
||||||
@ -37,7 +43,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
// 切换main区内容
|
// 切换main区内容
|
||||||
switchMain(param) {
|
switchMain(param) {
|
||||||
const {component, componentParam, tData} = param
|
const { component, componentParam, tData } = param
|
||||||
this.component = DataHome
|
this.component = DataHome
|
||||||
this.param = null
|
this.param = null
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@ -55,7 +61,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
refreshType(datasource) {
|
refreshType(datasource) {
|
||||||
this.datasource = datasource;
|
this.datasource = datasource
|
||||||
this.$refs.dsTree && this.$refs.dsTree.refreshType(datasource)
|
this.$refs.dsTree && this.$refs.dsTree.refreshType(datasource)
|
||||||
},
|
},
|
||||||
msg2Current(sourceParam) {
|
msg2Current(sourceParam) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<de-container v-loading="$store.getters.loadingMap[$store.getters.currentPath]">
|
<de-container v-loading="$store.getters.loadingMap[$store.getters.currentPath]">
|
||||||
<de-main-container>
|
<de-main-container>
|
||||||
<ds-main ref="dsMain"/>
|
<ds-main ref="dsMain" />
|
||||||
</de-main-container>
|
</de-main-container>
|
||||||
</de-container>
|
</de-container>
|
||||||
</template>
|
</template>
|
||||||
@ -14,7 +14,7 @@ import bus from '@/utils/bus'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Panel',
|
name: 'Panel',
|
||||||
components: {DeMainContainer, DeContainer, DsMain},
|
components: { DeMainContainer, DeContainer, DsMain },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
component: DsMain,
|
component: DsMain,
|
||||||
|
Loading…
Reference in New Issue
Block a user