系统信息 playground

Former-commit-id: 48b9803ee352f487485f35c72ac078f13d801a1a [formerly 48b9803ee352f487485f35c72ac078f13d801a1a [formerly 48b9803ee352f487485f35c72ac078f13d801a1a [formerly 48b9803ee352f487485f35c72ac078f13d801a1a [formerly 6a198a1714edc9b2e5c1bfa82c33615d2eab5231 [formerly 553bf86132a1a9f034784337139aaae9749b9d74]]]]]
Former-commit-id: 4c680e381f6d5d036053fef9a35e231182740323
Former-commit-id: 15e37657fbd97a45d9d5493bbb3846a367c7f996
Former-commit-id: 0d661616aaad8c5f441f8d9e523def611d278bbb [formerly 100e17edce6b8df610e51402b82a3d0d953996a3]
Former-commit-id: 91400b39387f805061573fb182ea917704ea1d46
Former-commit-id: 3ff3945f05b9fce3c19d2747bba722461c2d39d0
Former-commit-id: aacac9b613c85275f566e853211a77a75b593e11
Former-commit-id: 3d18765270d8a0ba50d62765b3e7ae07217d9776
Former-commit-id: 378f616da0a3f9d9e9be2a0f0d3d0ab8717fa5a1
This commit is contained in:
liyang
2018-07-23 13:58:12 +08:00
parent 3d3b832966
commit 347b59a372
7 changed files with 132 additions and 5 deletions

View File

@@ -115,8 +115,9 @@ util.checkUpdate = function (vm) {
if (update) {
util.logCapsule('D2Admin', `New version ${res.name}`)
console.log(`${dayjs(res.created_at).format('YYYY年M月D日')}更新 版本号: ${res.tag_name} | 详情${res.html_url}`)
vm.$store.commit('d2adminReleasesUpdateSet', true)
}
vm.$store.commit('d2adminUpdateSet', res)
vm.$store.commit('d2adminReleasesLatestSet', res)
})
.catch(err => {
console.log('checkUpdate error', err)

View File

@@ -22,6 +22,14 @@ export default {
{ path: `${pre}page-argu/get/username-from-menu?userid=userid-from-menu`, title: '接收' }
]
},
{
path: `${pre}store`,
title: '全局状态管理',
icon: 'bolt',
children: [
{ path: `${pre}store/sys`, title: '系统状态' }
]
},
{ path: `${pre}theme`, title: '主题', icon: 'flask' },
{ path: `${pre}fullscreen`, title: '全屏', icon: 'arrows-alt' },
{ path: `${pre}gray`, title: '灰度模式', icon: 'eye' },

View File

@@ -1,6 +1,6 @@
<template>
<d2-container class="page">
<tree-view :data="packJson" :options="options"></tree-view>
<tree-view :data="packJson" :options="options"/>
</d2-container>
</template>

View File

@@ -0,0 +1,118 @@
<template>
<d2-container type="ghost">
<template slot="header">version {{version}}</template>
<div class="d2-mt d2-mr">
<el-row :gutter="20">
<el-col :span="12">
<el-card shadow="never" class="d2-card d2-mb">
<template slot="header">顶栏菜单数据</template>
<div style="height: 300px; overflow: auto;">
<tree-view :data="menusHeader" :options="{ rootObjectKey: 'menusHeader', maxDepth: 2 }"/>
</div>
</el-card>
</el-col>
<el-col :span="12">
<el-card shadow="never" class="d2-card d2-mb">
<template slot="header">侧边栏菜单数据</template>
<div style="height: 300px; overflow: auto;">
<tree-view :data="menusAside" :options="{ rootObjectKey: 'menusAside', maxDepth: 1 }"/>
</div>
</el-card>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-card shadow="never" class="d2-card d2-mb">
<template slot="header">全屏模式</template>
<el-switch v-model="isFullScreen" active-text="打开" inactive-text="关闭" disabled/>
</el-card>
</el-col>
<el-col :span="8">
<el-card shadow="never" class="d2-card d2-mb">
<template slot="header">灰度模式</template>
<el-switch v-model="isGrayMode" active-text="打开" inactive-text="关闭" disabled/>
</el-card>
</el-col>
<el-col :span="8">
<el-card shadow="never" class="d2-card d2-mb">
<template slot="header">侧边栏折叠</template>
<el-switch v-model="isMenuAsideCollapse" active-text="收缩" inactive-text="展开" disabled/>
</el-card>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-card shadow="never" class="d2-card d2-mb">
<template slot="header">当前主题</template>
<div style="height: 150px; overflow: auto;">
{{themeActiveName}}
</div>
</el-card>
</el-col>
<el-col :span="16">
<el-card shadow="never" class="d2-card d2-mb">
<template slot="header">当前主题信息</template>
<div style="height: 150px; overflow: auto;">
<tree-view :data="themeActiveSetting" :options="{ rootObjectKey: 'themeActiveSetting', maxDepth: 1 }"/>
</div>
</el-card>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-card shadow="never" class="d2-card d2-mb">
<template slot="header">当前页面</template>
<div style="height: 300px; overflow: auto;">
{{pageCurrent}}
</div>
</el-card>
</el-col>
<el-col :span="8">
<el-card shadow="never" class="d2-card d2-mb">
<template slot="header">打开的标签页</template>
<div style="height: 300px; overflow: auto;">
<tree-view :data="pageOpenedList" :options="{ rootObjectKey: 'pageOpenedList', maxDepth: 1 }"/>
</div>
</el-card>
</el-col>
<el-col :span="8">
<el-card shadow="never" class="d2-card d2-mb">
<template slot="header">缓存页面</template>
<div style="height: 300px; overflow: auto;">
<tree-view :data="d2adminKeepAliveInclude" :options="{ rootObjectKey: 'd2adminKeepAliveInclude', maxDepth: 1 }"/>
</div>
</el-card>
</el-col>
</el-row>
<el-card shadow="never" class="d2-card d2-mb">
<template slot="header">最新版本数据 [ {{releasesUpdate ? '有新版本' : '已经是最新版本'}} ]</template>
<tree-view :data="releasesLatest" :options="{ rootObjectKey: 'releasesLatest', maxDepth: 1 }"/>
</el-card>
</div>
</d2-container>
</template>
<script>
import { mapState, mapGetters } from 'vuex'
export default {
computed: {
...mapState({
version: state => state.d2admin.version,
releasesLatest: state => state.d2admin.releasesLatest,
releasesUpdate: state => state.d2admin.releasesUpdate,
menusHeader: state => state.d2admin.menusHeader,
menusAside: state => state.d2admin.menusAside,
isFullScreen: state => state.d2admin.isFullScreen,
isGrayMode: state => state.d2admin.isGrayMode,
isMenuAsideCollapse: state => state.d2admin.isMenuAsideCollapse,
themeActiveName: state => state.d2admin.themeActiveName,
pageOpenedList: state => state.d2admin.pageOpenedList,
pageCurrent: state => state.d2admin.pageCurrent
}),
...mapGetters([
'themeActiveSetting',
'd2adminKeepAliveInclude'
])
}
}
</script>

View File

@@ -1,5 +1,5 @@
<template>
<el-card shadow="never" class="d2-card d2-mb">
<el-card shadow="never" class="d2-mb">
<div slot="header" class="d2-clearfix">
<el-button type="text" size="mini">{{title}}</el-button>
<el-tooltip content="重新 mock 数据" placement="top-end">

View File

@@ -1 +1 @@
d7908a30f437509d8a39a3e966cc0534b4bd81c2
6cc11bb2f370fd4b3c2020cfe54720d7d8c43d3f

View File

@@ -1 +1 @@
480b7ed3b175008cdc94b4d8c421aebf908f4f21
173a9f3d33cddfa88c52a85e30ddbdaa8d3ebd49