Commit 2568419f by 周海峰

Merge branch 'master' of https://code.palacesun.com/wuchao/nse-ui

parents 6d3bc4e2 72a57f70
import icon1 from './icon1.png'
import icon2 from './icon2.png'
import icon3 from './icon3.png'
import icon4 from './icon4.png'
import icon5 from './icon5.png'
import icon6 from './icon6.png'
import img1 from './img1.png'
import img2 from './img2.png'
export default {
icon1,
icon2,
icon3,
icon4,
icon5,
icon6,
img1,
img2
}
\ No newline at end of file
<script setup lang="ts" name="HomeCharts">
import { ref, onMounted, watch, nextTick, inject } from "vue";
import * as echarts from "echarts";
const homeChartData: any = inject("homeChartData");
const barChart = ref();
const colorList =[
"#9c27b0",
"#00bcd4",
"#ff7800",
"#2598f3",
"#53b257",
"#2598f3",
"#9c27b0",
]
let myChart;
watch(
() => homeChartData,
(newVal) => {
nextTick().then(() => {
myChart = echarts.init(barChart.value);
if (newVal && myChart) {
myChart.setOption({
title: {
text: '磁盘空间',
textStyle: {
color: "#7a8495",
}
},
tooltip: {
trigger: "axis",
axisPointer: {
// 坐标轴指示器,坐标轴触发有效
type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
},
},
grid: {
left: "3%",
right: "4%",
bottom: "3%",
containLabel: true,
},
xAxis: {
type: "value",
axisLine: {
lineStyle: {
color: "#808eb7",
width: 2,
},
},
},
yAxis: {
type: "category",
axisLine: {
lineStyle: {
color: "#808eb7",
width: 2,
},
},
splitLine: {
//分割线配置
lineStyle: {
color: "#AAAAAA56",
},
},
data: homeChartData.xList,
},
series: [
{
name: "已使用",
type: "bar",
barMaxWidth: 30,
zlevel: 10,
data: homeChartData.yList1,
itemStyle: {
normal: {
color: (params) => {
return colorList[params.dataIndex]
},
},
},
},
{
name: "总空间",
type: "bar",
silent: true,
barGap: '-100%',
barMaxWidth: 30,
data: homeChartData.yList2,
itemStyle: {
normal: {
color: "#dfe1e3",
},
},
},
],
});
}
});
},
{ deep: true, immediate: true }
);
onMounted(() => {
myChart = echarts.init(barChart.value);
});
</script>
<template>
<div class="echarts-wrapper">
<div ref="barChart" id="barChart" class="bar-chart" />
</div>
</template>
<style lang="scss" scoped>
.echarts-wrapper {
height: 100%;
width: 100%;
.bar-chart {
height: 100%;
width: 100%;
}
}
</style>
\ No newline at end of file
...@@ -11,7 +11,7 @@ import usePermissionStore from '@/store/modules/permission' ...@@ -11,7 +11,7 @@ import usePermissionStore from '@/store/modules/permission'
NProgress.configure({ showSpinner: false }) NProgress.configure({ showSpinner: false })
const whiteList = ['/login', '/register', '/assetLibrary', '/projectHome', '/projectManage','/classification','/desensitizationStrategy'] const whiteList = ['/login', '/register', '/assetLibrary', '/projectHome', '/projectManage', '/classification', '/desensitizationStrategy', '/Algorithm', '/Discover', '/CalculationMethod', '/Encryption', '/Dictionary']
const isWhiteList = (path) => { const isWhiteList = (path) => {
return whiteList.some(pattern => isPathMatch(pattern, path)) return whiteList.some(pattern => isPathMatch(pattern, path))
...@@ -64,9 +64,9 @@ router.beforeEach((to, from, next) => { ...@@ -64,9 +64,9 @@ router.beforeEach((to, from, next) => {
// } // }
if (sessionStorage.getItem('__token') || isWhiteList(to.path)){ if (sessionStorage.getItem('__token') || isWhiteList(to.path)) {
next() next()
}else{ } else {
next(`/login?redirect=${to.fullPath}`) next(`/login?redirect=${to.fullPath}`)
NProgress.done() NProgress.done()
} }
......
...@@ -58,11 +58,42 @@ export const constantRoutes = [ ...@@ -58,11 +58,42 @@ export const constantRoutes = [
hidden: true hidden: true
}, },
{ {
// 资产库
path: '/assetLibrary', path: '/assetLibrary',
component: () => import('@/views/assetLibrary/index'), component: () => import('@/views/assetLibrary/index'),
hidden: true hidden: true
}, },
{ {
// 脱敏算法
path: '/Algorithm',
component: () => import('@/views/ruleConfig/Algorithm/index'),
hidden: true
},
{
// 发现规则
path: '/Discover',
component: () => import('@/views/ruleConfig/Discover/index'),
hidden: true
},
{
// 加密规则
path: '/Encryption',
component: () => import('@/views/ruleConfig/Encryption/index'),
hidden: true
},
{
// 加密算法
path: '/CalculationMethod',
component: () => import('@/views/ruleConfig/CalculationMethod/index'),
hidden: true
},
{
// 知识库
path: '/Dictionary',
component: () => import('@/views/ruleConfig/Dictionary/index'),
hidden: true
},
{
// 项目管理 // 项目管理
path: '/projectManage', path: '/projectManage',
component: () => import('@/views/projectManage/index'), component: () => import('@/views/projectManage/index'),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论