Commit 74c8300b by bingobo

修改菜单逻辑

1 parent 94b54838
...@@ -6,7 +6,7 @@ const SystemConfig = { ...@@ -6,7 +6,7 @@ const SystemConfig = {
PUBLIC_PATH: '/api', PUBLIC_PATH: '/api',
// VUE_APP_BASE_URL: "http://25.66.210.41/tools", // VUE_APP_BASE_URL: "http://25.66.210.41/tools",
// VUE_APP_BASE_URL: "http://25.66.215.209/tools", // 南瑞新ip // VUE_APP_BASE_URL: "http://25.66.215.209/tools", // 南瑞新ip
VUE_APP_BASE_URL: "http://192.168.0.114:18088/tools", VUE_APP_BASE_URL: "http://192.168.0.106:18088/tools",
// VUE_APP_ZJ_IFRAME: "http://25.66.210.41/arch" // VUE_APP_ZJ_IFRAME: "http://25.66.210.41/arch"
// VUE_APP_ZJ_IFRAME: "http://25.66.215.209/arch" // 南瑞新ip // VUE_APP_ZJ_IFRAME: "http://25.66.215.209/arch" // 南瑞新ip
VUE_APP_ZJ_IFRAME: "http://localhost:30478/arch" VUE_APP_ZJ_IFRAME: "http://localhost:30478/arch"
......
...@@ -124,6 +124,7 @@ export function get(url, params = {}) { ...@@ -124,6 +124,7 @@ export function get(url, params = {}) {
}) })
} }
export function post(url, data = {}) { export function post(url, data = {}) {
console.log('url', url);
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
axios.post(url, data).then(response => { axios.post(url, data).then(response => {
if (response) { if (response) {
......
...@@ -332,185 +332,185 @@ export function trendsRules(type) { ...@@ -332,185 +332,185 @@ export function trendsRules(type) {
// ] // ]
}, },
{
name: '后评估检查',
url: '',
children: [
{
name: '后评估自查',
url: '',
children: [
{
name: '自查评估批次发起',
url: '/assesszc/auxiliarySelection',
children: [],
},
// { // {
// name: '后评估检查',
// url: '',
// children: [
// {
// name: '后评估自查',
// url: '',
// children: [
// {
// name: '自查评估批次发起',
// url: '/assesszc/auxiliarySelection',
// children: [],
// },
// // {
// // name: "项目档案库", // name: "项目档案库",
// // url: "/assesszc/projectView", // url: "/assesszc/projectView",
// // children: [],
// // },
// {
// name: '自查评估项目确认',
// url: '/assesszc/confirmRelease',
// children: [],
// },
// {
// name: '自查项目辅助检查',
// url: '/assesszc/auxiliaryInspection',
// children: [], // children: [],
// },
// {
// name: '自查问题整改',
// url: '/assesszc/materialAcquisition',
// children: [],
// },
// {
// name: '自查评估结果查看',
// url: '/assesszc/assistedViewing',
// children: [],
// },
// ],
// },
// {
// name: '后评估互查',
// url: '',
// children: [
// {
// name: '评估批次发起',
// url: '/mainLayout/auxiliarySelection',
// children: [],
// },
// {
// name: '评估项目确认',
// url: '/mainLayout/confirmRelease',
// children: [],
// },
// {
// name: '项目辅助检查',
// url: '/mainLayout/auxiliaryInspection',
// children: [],
// },
// {
// name: '评估问题整改',
// url: '/mainLayout/materialAcquisition',
// children: [],
// }, // },
{
name: '自查评估项目确认',
url: '/assesszc/confirmRelease',
children: [],
},
{
name: '自查项目辅助检查',
url: '/assesszc/auxiliaryInspection',
children: [],
},
{
name: '自查问题整改',
url: '/assesszc/materialAcquisition',
children: [],
},
{
name: '自查评估结果查看',
url: '/assesszc/assistedViewing',
children: [],
},
],
},
{
name: '后评估互查',
url: '',
children: [
{
name: '评估批次发起',
url: '/mainLayout/auxiliarySelection',
children: [],
},
{
name: '评估项目确认',
url: '/mainLayout/confirmRelease',
children: [],
},
{
name: '项目辅助检查',
url: '/mainLayout/auxiliaryInspection',
children: [],
},
{
name: '评估问题整改',
url: '/mainLayout/materialAcquisition',
children: [],
},
{
name: '评估结果查看',
url: '/mainLayout/assistedViewing',
children: [],
},
],
},
{
name: '后评估集中检查',
url: '',
children: [
{
name: '项目检查问题查询',
url: '/mainLayout/projectCheckQuestionQuery',
children: [],
},
{
name: '整改反馈查询',
url: '/mainLayout/rectificationFeedbackQuery',
children: [],
},
],
},
],
},
{
name: '后评估合规性管理',
url: '',
children: [
{
name: '合规性检查实时提醒',
url: '',
children: [
{ name: '合规性检查提醒', url: '/checkCompliance/automaticCheck', children: [] },
],
},
{
name: '合规性检查规则库构建',
url: '',
children: [
{ name: '检查规则编制', url: '/compliance/checkRules', children: [] },
{ name: '自动稽核任务配置', url: '/compliance/taskConfigure', children: [] },
],
},
{
name: '项目合规检查',
url: '',
children: [
{ name: '合规检查结果', url: '/projectCheck/checkResault', children: [] },
{ name: '合规问题整改', url: '/projectCheck/problemRectify', children: [] },
// { // {
// name: '评估结果查看', // name: '合规问题整改核验',
// url: '/mainLayout/assistedViewing', // url: '/projectCheck/verificationRectify',
// children: [],
// },
// ],
// },
// {
// name: '后评估集中检查',
// url: '',
// children: [
// {
// name: '项目检查问题查询',
// url: '/mainLayout/projectCheckQuestionQuery',
// children: [],
// },
// {
// name: '整改反馈查询',
// url: '/mainLayout/rectificationFeedbackQuery',
// children: [],
// },
// ],
// },
// ],
// },
// {
// name: '后评估合规性管理',
// url: '',
// children: [
// {
// name: '合规性检查实时提醒',
// url: '',
// children: [
// { name: '合规性检查提醒', url: '/checkCompliance/automaticCheck', children: [] },
// ],
// },
// {
// name: '合规性检查规则库构建',
// url: '',
// children: [
// { name: '检查规则编制', url: '/compliance/checkRules', children: [] },
// { name: '自动稽核任务配置', url: '/compliance/taskConfigure', children: [] },
// ],
// },
// {
// name: '项目合规检查',
// url: '',
// children: [
// { name: '合规检查结果', url: '/projectCheck/checkResault', children: [] },
// { name: '合规问题整改', url: '/projectCheck/problemRectify', children: [] },
// // {
// // name: '合规问题整改核验',
// // url: '/projectCheck/verificationRectify',
// // children: [],
// // },
// ],
// },
// ],
// },
// {
// name: '后评估结果管理',
// url: '',
// children: [
// {
// name: '后评估结果发布',
// url: '',
// children: [
// {
// name: '检查结果公示及评价',
// url: '/managementResult/releaseResultpublicity',
// children: [],
// },
// ],
// },
// {
// name: '后评估结果情况',
// url: '',
// children: [
// // {
// // name: '后评估进度情况',
// // url: '/managementResult/situationResaultschedule',
// // children: [],
// // },
// {
// name: '后评估各环节问题分布',
// url: '/managementResult/situationResaultissuesLink',
// children: [],
// },
// {
// name: '合规检查问题情况',
// url: '/managementResult/issuesInspection',
// children: [], // children: [],
// }, // },
// ], ],
// }, },
// { ],
// name: '后评估检查报告管理', },
// url: '', {
// children: [ name: '后评估结果管理',
url: '',
children: [
{
name: '后评估结果发布',
url: '',
children: [
{
name: '检查结果公示及评价',
url: '/managementResult/releaseResultpublicity',
children: [],
},
],
},
{
name: '后评估结果情况',
url: '',
children: [
// { // {
// name: '后评估检查报告维护', // name: '后评估进度情况',
// url: '/managementResult/maintenancePg', // url: '/managementResult/situationResaultschedule',
// children: [], // children: [],
// }, // },
// { name: '后评估报告模板管理', url: '/managementResult/managementPg', children: [] }, {
// // { name: "合规性检查报告维护", url: "/managementResult/maintenanceHg", children: [] }, name: '后评估各环节问题分布',
// // { name: "合规性检查报告模板管理", url: "/managementResult/managementHg", children: [] }, url: '/managementResult/situationResaultissuesLink',
// ], children: [],
// }, },
// ], {
// }, name: '合规检查问题情况',
url: '/managementResult/issuesInspection',
children: [],
},
],
},
{
name: '后评估检查报告管理',
url: '',
children: [
{
name: '后评估检查报告维护',
url: '/managementResult/maintenancePg',
children: [],
},
{ name: '后评估报告模板管理', url: '/managementResult/managementPg', children: [] },
// { name: "合规性检查报告维护", url: "/managementResult/maintenanceHg", children: [] },
// { name: "合规性检查报告模板管理", url: "/managementResult/managementHg", children: [] },
],
},
],
},
] ]
} }
} }
......
...@@ -94,6 +94,7 @@ ...@@ -94,6 +94,7 @@
</template> </template>
<script> <script>
import axios from 'axios';
import { projectInfoSy, getIscInfo, evaluationMaterials } from "@/api/index"; import { projectInfoSy, getIscInfo, evaluationMaterials } from "@/api/index";
import { generateYearOptions } from "@/utils/cache"; import { generateYearOptions } from "@/utils/cache";
export default { export default {
...@@ -139,7 +140,10 @@ export default { ...@@ -139,7 +140,10 @@ export default {
// module: 0, // module: 0,
// }) // })
try { try {
let res = await getIscInfo(); let res = await axios.post(`http://25.66.215.209/gateway/getUser`, null, {
timeout: 5000,
});
// let res = await getIscInfo();
if (res.code === 200) { if (res.code === 200) {
sessionStorage.setItem("userid", res.content.id); sessionStorage.setItem("userid", res.content.id);
sessionStorage.setItem("username", res.content.name); sessionStorage.setItem("username", res.content.name);
...@@ -154,11 +158,11 @@ export default { ...@@ -154,11 +158,11 @@ export default {
id: "FA84A11538656BBCE0430100007F9766", id: "FA84A11538656BBCE0430100007F9766",
loginName: "lhb", loginName: "lhb",
name: "实物ID运维", name: "实物ID运维",
password: "403B8BB4B09", password: "",
mobile: "1111111111", mobile: "",
email: "lhb@In.sgcc,com.cn", email: "",
department: "数据运营中心", department: "数据运营中心",
departmentId: "8a20318c948334c201951824f892660e", departmentId: "",
funcList: [], funcList: [],
}, },
}; };
......
...@@ -571,7 +571,7 @@ export default { ...@@ -571,7 +571,7 @@ export default {
"projectCategory": null, "projectCategory": null,
"fullName": null, "fullName": null,
"projectName": "信息安全-2023年全场景网络安全态势感知平台优化-设计开发实施项目(态势感知能", "projectName": "信息安全-2023年全场景网络安全态势感知平台优化-设计开发实施项目(态势感知能",
"projectCode": "7422XT230023", "projectCode": "",
"constructionForm": "4", "constructionForm": "4",
"issueYear": "2024", "issueYear": "2024",
"projectType": "1", "projectType": "1",
......
<template> <template>
<div class="mian"> <div class="mian">
<div class="head-container"> <div v-if="false" class="head-container">
<div class="logo" style="z-index: 10"> <div class="logo" style="z-index: 10">
<div class="logo-inner"> <div class="logo-inner">
<img src="../../assets/logo.png" alt="" /> <img src="../../assets/logo.png" alt="" />
...@@ -234,6 +234,8 @@ ...@@ -234,6 +234,8 @@
<script> <script>
import MainLayout from "./mainLayout"; import MainLayout from "./mainLayout";
import axios from 'axios';
import { getIscInfo, evaluationMaterials } from "@/api/index"; import { getIscInfo, evaluationMaterials } from "@/api/index";
import { getMessageListApi, updateMessageApi, readWholwMsg } from "@/api/indexzc"; import { getMessageListApi, updateMessageApi, readWholwMsg } from "@/api/indexzc";
// import tableMixin from '@/mixins/table.mixin.js' // import tableMixin from '@/mixins/table.mixin.js'
...@@ -404,7 +406,10 @@ export default { ...@@ -404,7 +406,10 @@ export default {
// module: 0, // module: 0,
// }) // })
try { try {
let res = await getIscInfo(); let res = await axios.post(`http://25.66.215.209/gateway/getUser`, null, {
timeout: 5000,
});
// let res = await getIscInfo();
if (res.code === 200) { if (res.code === 200) {
sessionStorage.setItem("userid", res.content.id); sessionStorage.setItem("userid", res.content.id);
sessionStorage.setItem("username", res.content.name); sessionStorage.setItem("username", res.content.name);
...@@ -419,11 +424,11 @@ export default { ...@@ -419,11 +424,11 @@ export default {
id: "FA84A11538656BBCE0430100007F9766", id: "FA84A11538656BBCE0430100007F9766",
loginName: "lhb", loginName: "lhb",
name: "实物ID运维", name: "实物ID运维",
password: "403B8BB4B09", password: "",
mobile: "1111111111", mobile: "",
email: "lhb@In.sgcc,com.cn", email: "",
department: "数据运营中心", department: "数据运营中心",
departmentId: "8a20318c948334c201951824f892660e", departmentId: "",
funcList: [], funcList: [],
}, },
}; };
......
<template>
<div class="navbar">
<!-- <el-scrollbar style="height: 800px" ref="scroll"> -->
<el-menu
router
ref="kzMenu"
class="el-menu-vertical-demo"
:unique-opened="true"
@open="handleOpen"
@close="handleClose"
:default-active="activeIndex"
>
<el-menu-item
v-if="wholeRoutes.souYeRoute && wholeRoutes.souYeRoute[0]"
:index="wholeRoutes.souYeRoute[0].url"
class="classmain"
@click="allClose()"
><span class=""></span>
<!-- 首页 -->
{{ wholeRoutes.souYeRoute[0].name }}
</el-menu-item
>
<!-- TODO -->
<!-- 其他菜单项 -->
<template v-for="(item, index) in wholeRoutes.restRoutes">
<!-- 无子菜单的菜单项 -->
<!-- <el-menu-item
v-if="!item.children || item.children.length === 0"
:key="index"
:index="item.url"
>
<i class="el-icon-document"></i>
<span slot="title">{{ item.name }}</span>
</el-menu-item> -->
<!-- 有子菜单的菜单项 -->
<el-submenu :key="index" :index="index + ''" class="submenu1">
<template slot="title">
<span class="iconfont treeIcon1">&#xe644;</span>
<span>{{ item.name }}</span>
</template>
<!-- 二级子菜单 -->
<template v-for="(subItem, subIndex) in item.children">
<!-- 无下级的菜单项 -->
<el-menu-item
v-if="!subItem.children || subItem.children.length === 0"
:key="`${index}-${subIndex}`"
:index="subItem.url"
class="submenu3"
>
<span class="title3"></span>
<span>{{ subItem.name }}</span>
</el-menu-item>
<!-- 有下级的子菜单 -->
<el-submenu
v-else
:key="`${index}-${subIndex}`"
:index="`${index}-${subIndex}`"
class="submenu2"
>
<template slot="title">
<span class="iconfont treeIcon2">&#xe644;</span>
{{ subItem.name }}
</template>
<!-- 三级菜单项 -->
<el-menu-item
v-for="(thirdItem, thirdIndex) in subItem.children"
:key="`${index}-${subIndex}-${thirdIndex}`"
:index="thirdItem.url"
class="submenu3"
>
<span class="title3"></span>
<span>{{ thirdItem.name }}</span>
</el-menu-item>
</el-submenu>
</template>
</el-submenu>
</template>
<!-- TODO -->
</el-menu>
<!-- </el-scrollbar> -->
</div>
</template>
<script>
import { trendsRules } from "@/utils/leftBarRules";
// import { getIscInfo, evaluationMaterials } from "@/api/index";
// import Cookies from 'js-cookie';
export default {
data() {
return {
souYeRoute: [],
menuList: [],
// menuList: trendsRules(99),
isOpen: false,
openeds: ["0"], //默认展开导航栏
activeIndex: "",
routerTabs: [],
keyIndex: " ",
};
},
props: {
wholeRoutes: {
type: Object,
default: () => ({
souYeRoute: [],
restRoutes: []
})
},
// wholeRoutes: {
// type: Object,
// default: () => {}
// },
authority: {
type: Number,
default: "",
},
autho: {
type: String,
default: "",
},
},
watch: {
// wholeRoutes(newVale, oldVale) {
// // console.log('newVale', newVale);
// this.souYeRoute = newVale.souYeRoute
// this.menuList = newVale.restRoutes
// console.log(111, this.menuList);
// },
$route: {
immediate: true,
handler(n, o) {
if (
this.$route.path == "/mainLayout/Compliancefz" ||
this.$route.path == "/mainLayout/Compliance"
) {
this.activeIndex = "/mainLayout/auxiliaryInspection";
} else if (
this.$route.path == "/assesszc/Compliancefz" ||
this.$route.path == "/assesszc/Compliance"
) {
this.activeIndex = "/assesszc/auxiliaryInspection";
} else {
this.activeIndex = this.$route.path;
this.$nextTick(() => {
this.$refs.kzMenu.activeIndex = this.$route.path;
});
}
if (!this.routerTabs.includes(this.$route.meta.title)) {
this.routerTabs.push(this.$route.meta.title);
}
},
},
autho(newVal, oldVal) {
if (newVal == "liyiming") {
this.$router.push({
path: "/mainLayout/confirmRelease",
query: {
madata: newVal,
},
});
} else if (newVal == "wangmeiling") {
this.$router.push({
path: "/mainLayout/confirmRelease",
query: {
madata: newVal,
},
});
} else if (newVal == "mengdejian") {
this.$router.push({
path: "/mainLayout/materialAcquisition",
query: {
madata: newVal,
},
});
} else if (newVal == "liwenbo") {
this.$router.push({
path: "/mainLayout/materialAcquisition",
query: {
madata: newVal,
},
});
} else if (newVal == "zhangke") {
this.$router.push({
path: "/mainLayout/materialAcquisition",
query: {
madata: newVal,
},
});
}
this.$refs.kzMenu.activeIndex = this.$route.path;
},
authority(newVal, oldVal) {
this.menuList = [];
if (newVal == 1) {
this.menuList = trendsRules(1);
this.$router.push({
path: "/mainLayout/auxiliarySelection",
});
this.activeIndex = "/mainLayout/auxiliarySelection";
} else if (newVal == 2) {
this.menuList = trendsRules(2);
this.$router.push({
path: "/mainLayout/confirmRelease",
});
this.activeIndex = "/mainLayout/confirmRelease";
} else if (newVal == 3) {
this.menuList = trendsRules(3);
this.$router.push({
path: "/mainLayout/materialAcquisition",
});
this.activeIndex = "/mainLayout/materialAcquisition";
} else if (newVal == 99) {
this.menuList = trendsRules(99);
// console.log("this.menuList", this.menuList);
this.$router.push({
path: "/mainLayout/auxiliarySelection",
});
this.activeIndex = "/mainLayout/auxiliarySelection";
}
},
},
mounted() {
// console.log(
// "获取父元素的local数据0",
// JSON.parse(window.sessionStorage.getItem("user"))
// );
// console.log(
// "获取父元素的local数据",
// JSON.parse(window.top.sessionStorage.getItem("user"))
// );
// this.handleOpen(0, ["0"]);
if (
this.$route.path == "/mainLayout/Compliancefz" ||
this.$route.path == "/mainLayout/Compliance"
) {
this.activeIndex = "/mainLayout/auxiliaryInspection";
} else {
this.activeIndex = this.$route.path;
}
},
methods: {
handleOpen(e, a) {
// console.log("打开", e, a);
this.keyIndex = e.charAt(0);
// this.$nextTick(() => {
// this.$refs.scroll.update();
// });
if (a.length == 1) {
let treeIcon1 = document.getElementsByClassName("treeIcon1");
for (var i = 0; i < treeIcon1.length; i++) {
treeIcon1[i].style.transform = "rotate(0deg)";
}
treeIcon1[e].style.transform = "rotate(90deg)";
} else if (a.length == 2) {
let opened = document.getElementsByClassName("is-opened");
let treeIcon2 = opened[0].querySelectorAll(".treeIcon2");
for (var i = 0; i < treeIcon2.length; i++) {
treeIcon2[i].style.transform = "rotate(0deg)";
}
treeIcon2[e.slice(2)].style.transform = "rotate(90deg)";
}
},
allClose() {
this.$refs.kzMenu.close(this.keyIndex);
this.handleClose(this.keyIndex, [this.keyIndex]);
},
handleClose(e, a) {
// console.log("关闭", e, a);
if (a.length == 1) {
let treeIcon1 = document.getElementsByClassName("treeIcon1");
treeIcon1[e].style.transform = "rotate(0deg)";
let treeIcon2 = document.getElementsByClassName("treeIcon2");
let treARR = [...treeIcon2];
treARR.forEach((element) => {
element.style.transform = "rotate(0deg)";
});
// console.log(treeIcon2,'treeIcon2treeIcon2treeIcon2treeIcon2')
} else if (a.length == 2) {
let opened = document.getElementsByClassName("is-opened");
let treeIcon2 = opened[0].querySelectorAll(".treeIcon2");
treeIcon2[e.slice(2)].style.transform = "rotate(0deg)";
}
},
handleMenuClick(e, a) {},
},
};
</script>
<style lang="scss" scoped>
.navbar {
width: 235px;
height: 100%;
padding-top: 10px;
overflow-y: auto;
margin-left: 10px;
}
::v-deep.el-menu {
border: none !important;
box-sizing: border-box;
}
.submenu1 {
background-color: #63a4a6;
margin-bottom: 10px;
border-radius: 5px;
box-shadow: 1px 2px 4px 0px #0068624c;
}
.submenu1 ::v-deep .el-submenu__title {
height: 40px;
line-height: 40px;
box-shadow: 1px 2px 4px 0px #0068624c;
font-size: 16px;
font-weight: bold;
color: #fff;
text-align: left;
}
.submenu2 {
background-color: #effbfa;
margin-top: 8px;
border-radius: 5px;
box-shadow: 1px 2px 4px 0px #0068624c;
}
.submenu2 ::v-deep .el-submenu__title {
height: 40px;
line-height: 40px;
box-shadow: 1px 2px 4px 0px #0068624c;
font-size: 15px;
font-weight: bold;
color: grey;
text-align: left;
padding-left: 20px !important;
}
::v-deep .el-icon-arrow-down {
display: none;
}
::v-deep .el-submenu__title:hover {
background: transparent;
}
.seticon1 {
display: inline-block;
font-size: 24px;
color: #fff;
border-radius: 50px;
}
.treeIcon1 {
display: inline-block;
color: #ffffff;
font-size: 24px;
margin-left: -5px;
margin-right: 15px;
font-family: "iconfont" !important;
font-style: normal;
-webkit-font-smoothing: antialiased;
transform: rotate(0deg);
}
.treeIcon2 {
display: inline-block;
color: #000;
font-size: 24px;
margin-left: -5px;
margin-right: 15px;
font-family: "iconfont" !important;
font-style: normal;
-webkit-font-smoothing: antialiased;
transform: rotate(0deg);
}
.roleICon1 {
display: inline-block;
color: #ffffff;
font-size: 24px;
margin-left: -5px;
margin-right: 15px;
font-family: "iconfont" !important;
font-style: normal;
-webkit-font-smoothing: antialiased;
}
.title3 {
display: inline-block;
width: 5px;
height: 5px;
border-radius: 5px;
margin-right: 5px;
vertical-align: middle;
background-color: #63a4a6;
text-align: left;
}
.submenu3 {
border-radius: 5px;
height: 40px;
line-height: 40px;
font-size: 15px;
font-weight: bold;
color: grey;
text-align: left;
padding-left: 40px !important;
background-color: #effbfa;
margin-top: 8px;
box-shadow: 1px 2px 4px 0px #0068624c;
padding-right: 0;
}
.submenu2 ::v-deep .is-active {
background: rgba(99, 164, 166, 0.6);
color: #fff;
}
.xiangmu {
margin: 0;
}
.xiangmu ::v-deep .is-active {
background: rgba(99, 164, 166, 0.6);
color: #fff;
}
.xuanzhong ::v-deep .is-active {
background: rgba(99, 164, 166, 0.6);
color: #fff;
}
.menu-scrollbar ::v-deep .el-scrollbar__view {
height: 100%; /* 设置高度以填满父容器 */
}
::v-deep.el-scrollbar__thumb {
background-color: #6bcfde; /* 滑块的颜色 */
}
::v-deep
.el-scrollbar__view
> ul:first-child
> li:first-child
> ul
> li:first-child
> .el-submenu__title:first-child
> .treeIcon2 {
transform: rotate(90deg);
}
.classmain {
background-color: #63a4a6;
margin-bottom: 10px;
border-radius: 5px;
box-shadow: 1px 2px 4px 0px #0068624c;
height: 40px;
line-height: 40px;
font-size: 16px;
font-weight: bold;
color: #fff;
text-align: left;
span {
display: inline-block;
width: 5px;
height: 5px;
border-radius: 5px;
background: #fff;
margin-right: 25px;
margin-left: 4px;
vertical-align: middle;
}
}
.sou_ye_style {
background-color: #63a4a6;
margin-bottom: 10px;
border-radius: 5px;
box-shadow: 1px 2px 4px 0px #0068624c;
height: 40px;
line-height: 40px;
font-size: 16px;
font-weight: bold;
color: #fff;
text-align: left;
span {
display: inline-block;
width: 5px;
height: 5px;
border-radius: 5px;
background: #fff;
margin-right: 25px;
margin-left: 4px;
vertical-align: middle;
}
}
</style>
...@@ -63,7 +63,6 @@ ...@@ -63,7 +63,6 @@
<script> <script>
import { trendsRules } from "@/utils/leftBarRules"; import { trendsRules } from "@/utils/leftBarRules";
import { getIscInfo } from "@/api/index";
export default { export default {
data() { data() {
return { return {
...@@ -179,9 +178,6 @@ export default { ...@@ -179,9 +178,6 @@ export default {
} }
}, },
}, },
async created(){
await this.getIscInfoAndRoutes()
},
mounted() { mounted() {
// console.log( // console.log(
...@@ -204,55 +200,6 @@ export default { ...@@ -204,55 +200,6 @@ export default {
}, },
methods: { methods: {
async getIscInfoAndRoutes() {
// console.log('menuList1111', JSON.parse(JSON.stringify(this.menuList)));
const resMockData = {
"success": true,
"code":200,
"message":"OK",
"content": {
id:"FA84A11538656BBCE0430100007F9766",
loginName: "lhb",
name:"实物ID运维",
password:"403B8BB4B09",
mobile: "1111111111",
email: "lhb@In.sgcc,com.cn",
department: '数据运营中心',
departmentId: "8a20318c948334c201951824f892660e",
menuList: [
{
name: '立项统筹中心',
url: '/asdasdas',
type: '01',
level: '1',
ascription: 'lxtczx',
ps: null,
children: [
{
name: '首页',
url: '/asdasda',
type: '01',
level: '2',
ascription: 'lxsy',
ps: null,
children: [],
menu: true
}
],
menu: true
}
],
funcList:[],
}
}
// console.log(11111, resMockData);
// res = await getIscInfo();
const res = resMockData
if (res.code === 200) {
// console.log(123123, res.content);
}
},
handleOpen(e, a) { handleOpen(e, a) {
// console.log("打开", e); // console.log("打开", e);
this.keyIndex = e.charAt(0); this.keyIndex = e.charAt(0);
......
...@@ -11,53 +11,80 @@ ...@@ -11,53 +11,80 @@
:default-active="activeIndex" :default-active="activeIndex"
> >
<el-menu-item <el-menu-item
v-if="souYeRoute.length > 0" v-if="wholeRoutes.souYeRoute && wholeRoutes.souYeRoute[0]"
:index="souYeRoute[0].url" :index="wholeRoutes.souYeRoute[0].url"
class="classmain" class="classmain"
@click="allClose()" @click="allClose()"
><span class=""></span>首页</el-menu-item ><span class=""></span>
<!-- 首页 -->
{{ wholeRoutes.souYeRoute[0].name }}
</el-menu-item
> >
<!-- <el-menu-item index="/assesszc/projectView" class="classmain"><span></span>项目知识文档库</el-menu-item> -->
<el-submenu <!-- TODO -->
v-for="(item, index) in menuList" <!-- 其他菜单项 -->
<template v-for="(item, index) in wholeRoutes.restRoutes">
<!-- 无子菜单的菜单项 -->
<!-- <el-menu-item
v-if="!item.children || item.children.length === 0"
:key="index" :key="index"
:index="index + ''" :index="item.url"
class="submenu1"
> >
<!-- <el-menu-item index="/assesszc/projectView" class="classmain"><span></span>项目档案库</el-menu-item> --> <i class="el-icon-document"></i>
<span slot="title">{{ item.name }}</span>
</el-menu-item> -->
<!-- 有子菜单的菜单项 -->
<el-submenu :key="index" :index="index + ''" class="submenu1">
<template slot="title"> <template slot="title">
<!-- <span v-if="item.name === '首页'" class="sou_ye_style"><span></span></span> -->
<span class="iconfont treeIcon1">&#xe644;</span> <span class="iconfont treeIcon1">&#xe644;</span>
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
</template> </template>
<p class="xiangmu">
<!-- 二级子菜单 -->
<template v-for="(subItem, subIndex) in item.children">
<!-- 无下级的菜单项 -->
<el-menu-item <el-menu-item
index="/assesszc/projectView" v-if="!subItem.children || subItem.children.length === 0"
:key="`${index}-${subIndex}`"
:index="subItem.url"
class="submenu3" class="submenu3"
v-if="item.erji"
><span class="title3"></span>项目档案库</el-menu-item
> >
</p> <span class="title3"></span>
<span>{{ subItem.name }}</span>
</el-menu-item>
<!-- 有下级的子菜单 -->
<el-submenu <el-submenu
v-for="(item2, index2) in item.children" v-else
:key="index2" :key="`${index}-${subIndex}`"
:index="index + '-' + index2 + ''" :index="`${index}-${subIndex}`"
class="submenu2" class="submenu2"
> >
<template slot="title"> <template slot="title">
<span class="iconfont treeIcon2">&#xe644;</span> <span class="iconfont treeIcon2">&#xe644;</span>
<span>{{ item2.name }}</span> {{ subItem.name }}
</template> </template>
<!-- 三级菜单项 -->
<el-menu-item <el-menu-item
v-for="(item3, index3) in item2.children" v-for="(thirdItem, thirdIndex) in subItem.children"
:key="index3" :key="`${index}-${subIndex}-${thirdIndex}`"
:index="item3.url" :index="thirdItem.url"
class="submenu3" class="submenu3"
> >
<span class="title3"></span> {{ item3.name }} <span class="title3"></span>
<span>{{ thirdItem.name }}</span>
</el-menu-item> </el-menu-item>
</el-submenu> </el-submenu>
</template>
</el-submenu> </el-submenu>
</template>
<!-- TODO -->
</el-menu> </el-menu>
<!-- </el-scrollbar> --> <!-- </el-scrollbar> -->
</div> </div>
...@@ -83,8 +110,15 @@ export default { ...@@ -83,8 +110,15 @@ export default {
props: { props: {
wholeRoutes: { wholeRoutes: {
type: Object, type: Object,
default: () => {} default: () => ({
souYeRoute: [],
restRoutes: []
})
}, },
// wholeRoutes: {
// type: Object,
// default: () => {}
// },
authority: { authority: {
type: Number, type: Number,
default: "", default: "",
...@@ -95,11 +129,12 @@ export default { ...@@ -95,11 +129,12 @@ export default {
}, },
}, },
watch: { watch: {
wholeRoutes(newVale, oldVale) { // wholeRoutes(newVale, oldVale) {
// console.log('newVale', newVale); // // console.log('newVale', newVale);
this.souYeRoute = newVale.souYeRoute // this.souYeRoute = newVale.souYeRoute
this.menuList = newVale.restRoutes // this.menuList = newVale.restRoutes
}, // console.log(111, this.menuList);
// },
$route: { $route: {
immediate: true, immediate: true,
handler(n, o) { handler(n, o) {
...@@ -193,9 +228,7 @@ export default { ...@@ -193,9 +228,7 @@ export default {
} }
}, },
}, },
// async created() {
// await this.getIscInfoAndRoutes();
// },
mounted() { mounted() {
// console.log( // console.log(
// "获取父元素的local数据0", // "获取父元素的local数据0",
...@@ -217,290 +250,9 @@ export default { ...@@ -217,290 +250,9 @@ export default {
}, },
methods: { methods: {
// async getIscInfoAndRoutes() {
// // const userInfo = Cookies.get('joker');
// // console.log('userInfo', userInfo);
// let res1 = await evaluationMaterials({
// current: 1,
// pageSize: 10,
// module: 0,
// })
// const resMockData = {
// success: true,
// code: 200,
// message: "OK",
// content: {
// id: "FA84A11538656BBCE0430100007F9766",
// loginName: "lhb",
// name: "实物ID运维",
// password: "403B8BB4B09",
// mobile: "1111111111",
// email: "lhb@In.sgcc,com.cn",
// department: "数据运营中心",
// departmentId: "8a20318c948334c201951824f892660e",
// menuList: [
// {
// name: "立项统筹中心",
// url: "/asdasdas",
// type: "01",
// level: "1",
// ascription: "lxtczx",
// ps: null,
// children: [
// {
// name: "首页",
// url: "/mainLayout/mianHome",
// type: "01",
// level: "2",
// ascription: "lxsy",
// ps: null,
// children: [],
// menu: true,
// },
// {
// name: "项目档案库",
// url: "/mainLayout/mianHome",
// type: "01",
// level: "2",
// ascription: "lxsy",
// ps: null,
// children: [],
// menu: true,
// },
// {
// name: "后评估检查",
// url: "",
// children: [
// {
// name: "后评估自查",
// url: "",
// children: [
// {
// name: "自查评估批次发起",
// url: "/assesszc/auxiliarySelection",
// children: [],
// },
// // {
// // name: "项目档案库",
// // url: "/assesszc/projectView",
// // children: [],
// // },
// {
// name: "自查评估项目确认",
// url: "/assesszc/confirmRelease",
// children: [],
// },
// {
// name: "自查项目辅助检查",
// url: "/assesszc/auxiliaryInspection",
// children: [],
// },
// {
// name: "自查问题整改",
// url: "/assesszc/materialAcquisition",
// children: [],
// },
// {
// name: "自查评估结果查看",
// url: "/assesszc/assistedViewing",
// children: [],
// },
// ],
// },
// {
// name: "后评估互查",
// url: "",
// children: [
// {
// name: "评估批次发起",
// url: "/mainLayout/auxiliarySelection",
// children: [],
// },
// {
// name: "评估项目确认",
// url: "/mainLayout/confirmRelease",
// children: [],
// },
// {
// name: "项目辅助检查",
// url: "/mainLayout/auxiliaryInspection",
// children: [],
// },
// {
// name: "评估问题整改",
// url: "/mainLayout/materialAcquisition",
// children: [],
// },
// {
// name: "评估结果查看",
// url: "/mainLayout/assistedViewing",
// children: [],
// },
// ],
// },
// {
// name: "后评估集中检查",
// url: "",
// children: [
// {
// name: "项目检查问题查询",
// url: "/mainLayout/projectCheckQuestionQuery",
// children: [],
// },
// {
// name: "整改反馈查询",
// url: "/mainLayout/rectificationFeedbackQuery",
// children: [],
// },
// ],
// },
// ],
// },
// {
// name: "后评估合规性管理",
// url: "",
// children: [
// {
// name: "合规性检查实时提醒",
// url: "",
// children: [
// {
// name: "合规性检查提醒",
// url: "/checkCompliance/automaticCheck",
// children: [],
// },
// ],
// },
// {
// name: "合规性检查规则库构建",
// url: "",
// children: [
// {
// name: "检查规则编制",
// url: "/compliance/checkRules",
// children: [],
// },
// {
// name: "自动稽核任务配置",
// url: "/compliance/taskConfigure",
// children: [],
// },
// ],
// },
// {
// name: "项目合规检查",
// url: "",
// children: [
// {
// name: "合规检查结果",
// url: "/projectCheck/checkResault",
// children: [],
// },
// {
// name: "合规问题整改",
// url: "/projectCheck/problemRectify",
// children: [],
// },
// // {
// // name: '合规问题整改核验',
// // url: '/projectCheck/verificationRectify',
// // children: [],
// // },
// ],
// },
// ],
// },
// {
// name: "后评估结果管理",
// url: "",
// children: [
// {
// name: "后评估结果发布",
// url: "",
// children: [
// {
// name: "检查结果公示及评价",
// url: "/managementResult/releaseResultpublicity",
// children: [],
// },
// ],
// },
// {
// name: "后评估结果情况",
// url: "",
// children: [
// // {
// // name: '后评估进度情况',
// // url: '/managementResult/situationResaultschedule',
// // children: [],
// // },
// {
// name: "后评估各环节问题分布",
// url: "/managementResult/situationResaultissuesLink",
// children: [],
// },
// {
// name: "合规检查问题情况",
// url: "/managementResult/issuesInspection",
// children: [],
// },
// ],
// },
// {
// name: "后评估检查报告管理",
// url: "",
// children: [
// {
// name: "后评估检查报告维护",
// url: "/managementResult/maintenancePg",
// children: [],
// },
// {
// name: "后评估报告模板管理",
// url: "/managementResult/managementPg",
// children: [],
// },
// // { name: "合规性检查报告维护", url: "/managementResult/maintenanceHg", children: [] },
// // { name: "合规性检查报告模板管理", url: "/managementResult/managementHg", children: [] },
// ],
// },
// ],
// },
// ],
// menu: true,
// },
// ],
// funcList: [],
// },
// };
// // console.log(11111, resMockData);
// // res = await getIscInfo();
// const res = resMockData;
// if (res.code === 200) {
// sessionStorage.setItem("userid", res.content.id);
// sessionStorage.setItem("username", res.content.name);
// sessionStorage.setItem("userloginname", res.content.loginName);
// const resRoutes = res.content.menuList[0].children;
// console.log(123123, resRoutes);
// this.souYeRoute = resRoutes.filter((item) => item.name === "首页");
// const restRoutes = resRoutes.filter((item) => item.name !== "首页");
// restRoutes.forEach(val => {
// if (val.name === "项目档案库") {
// val.erji = "二级";
// }
// })
// this.menuList = restRoutes
// // console.log(2222, this.souYeRoute, restRoutes);
// }
// },
handleOpen(e, a) { handleOpen(e, a) {
// console.log("打开", e); // console.log("打开", e, a);
this.keyIndex = e.charAt(0); this.keyIndex = e.charAt(0);
// this.$nextTick(() => { // this.$nextTick(() => {
// this.$refs.scroll.update(); // this.$refs.scroll.update();
......
...@@ -57,6 +57,8 @@ ...@@ -57,6 +57,8 @@
import { EventBus } from "../../components/event-bus.js"; import { EventBus } from "../../components/event-bus.js";
import ContinerView from "./continerView"; import ContinerView from "./continerView";
import LeftBar from "./leftBar"; import LeftBar from "./leftBar";
import axios from 'axios';
import { getIscInfo, evaluationMaterials } from "@/api/index"; import { getIscInfo, evaluationMaterials } from "@/api/index";
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
export default { export default {
...@@ -244,7 +246,6 @@ export default { ...@@ -244,7 +246,6 @@ export default {
}, },
methods: { methods: {
async getIscInfoAndRoutes() { async getIscInfoAndRoutes() {
// const userInfo = Cookies.get('joker'); // const userInfo = Cookies.get('joker');
// console.log('userInfo', userInfo); // console.log('userInfo', userInfo);
// let res1 = await evaluationMaterials({ // let res1 = await evaluationMaterials({
...@@ -253,20 +254,25 @@ export default { ...@@ -253,20 +254,25 @@ export default {
// module: 0, // module: 0,
// }) // })
try { try {
let res = await getIscInfo(); let res = await axios.post(`http://25.66.215.209/gateway/getUser`, null, {
timeout: 1000,
});
// let res = await getIscInfo();
if (res.code === 200) { if (res.code === 200) {
sessionStorage.setItem("userid", res.content.id); sessionStorage.setItem("userid", res.content.id);
sessionStorage.setItem("username", res.content.name); sessionStorage.setItem("username", res.content.name);
sessionStorage.setItem("userloginname", res.content.loginName); sessionStorage.setItem("userloginname", res.content.loginName);
const resRoutes = res.content.menuList[0].children; // const routes = res.content.menuList.filter(item => item.name === '立项统筹中心')
const routes = res.content.menuList.filter(item => item.name === '后评估管控中心')
const resRoutes = routes[0].children;
// console.log(123123, resRoutes); // console.log(123123, resRoutes);
const souYeRoute = resRoutes.filter((item) => item.name === "首页"); const souYeRoute = resRoutes.filter((item) => item.name === "首页");
const restRoutes = resRoutes.filter((item) => item.name !== "首页"); const restRoutes = resRoutes.filter((item) => item.name !== "首页");
restRoutes.forEach(val => { // restRoutes.forEach(val => {
if (val.name === "项目档案库") { // if (val.name === "项目档案库") {
val.erji = "二级"; // val.erji = "二级";
} // }
}) // })
this.menuList = restRoutes this.menuList = restRoutes
// console.log(2222, souYeRoute, restRoutes); // console.log(2222, souYeRoute, restRoutes);
this.wholeRoutes = {souYeRoute, restRoutes} this.wholeRoutes = {souYeRoute, restRoutes}
...@@ -280,11 +286,11 @@ export default { ...@@ -280,11 +286,11 @@ export default {
id: "FA84A11538656BBCE0430100007F9766", id: "FA84A11538656BBCE0430100007F9766",
loginName: "lhb", loginName: "lhb",
name: "实物ID运维", name: "实物ID运维",
password: "403B8BB4B09", password: "",
mobile: "1111111111", mobile: "",
email: "lhb@In.sgcc,com.cn", email: "",
department: "数据运营中心", department: "数据运营中心",
departmentId: "8a20318c948334c201951824f892660e", departmentId: "",
menuList: [ menuList: [
{ {
name: "立项统筹中心", name: "立项统筹中心",
...@@ -520,6 +526,252 @@ export default { ...@@ -520,6 +526,252 @@ export default {
], ],
menu: true, menu: true,
}, },
{
name: "后评估管控中心",
url: "/arch/#/mainLayout/mianHome",
type: "01",
level: "1",
ascription: "lxtczx",
ps: null,
children: [
{
name: "首页",
url: "/mainLayout/mianHome",
// "url": "/arch/#/mainLayout/mianHome", // TODO 这个是isc getuser接口返回的,url配置错误, 需要改成 /mainLayout/mianHome
type: "01",
level: "2",
ascription: "hpgsy",
ps: null,
children: [],
menu: true,
},
{
name: "项目档案库",
url: "null",
type: "01",
level: "2",
ascription: "lxsy",
ps: null,
children: [
{
name: "项目档案库",
url: "/assesszc/projectView", // TODO
type: "01",
level: "3",
ascription: "xmdak",
ps: null,
children: [],
menu: true
}
],
menu: false
},
{
name: "后评估检查",
url: "",
children: [
{
name: "后评估自查",
url: "",
children: [
{
name: "自查评估批次发起",
url: "/assesszc/auxiliarySelection",
children: [],
},
// {
// name: "项目档案库",
// url: "/assesszc/projectView",
// children: [],
// },
{
name: "自查评估项目确认",
url: "/assesszc/confirmRelease",
children: [],
},
{
name: "自查项目辅助检查",
url: "/assesszc/auxiliaryInspection",
children: [],
},
{
name: "自查问题整改",
url: "/assesszc/materialAcquisition",
children: [],
},
{
name: "自查评估结果查看",
url: "/assesszc/assistedViewing",
children: [],
},
],
},
{
name: "后评估互查",
url: "",
children: [
{
name: "评估批次发起",
url: "/mainLayout/auxiliarySelection",
children: [],
},
{
name: "评估项目确认",
url: "/mainLayout/confirmRelease",
children: [],
},
{
name: "项目辅助检查",
url: "/mainLayout/auxiliaryInspection",
children: [],
},
{
name: "评估问题整改",
url: "/mainLayout/materialAcquisition",
children: [],
},
{
name: "评估结果查看",
url: "/mainLayout/assistedViewing",
children: [],
},
],
},
{
name: "后评估集中检查",
url: "",
children: [
{
name: "项目检查问题查询",
url: "/mainLayout/projectCheckQuestionQuery",
children: [],
},
{
name: "整改反馈查询",
url: "/mainLayout/rectificationFeedbackQuery",
children: [],
},
],
},
],
},
{
name: "后评估合规性管理",
url: "",
children: [
{
name: "合规性检查实时提醒",
url: "",
children: [
{
name: "合规性检查提醒",
url: "/checkCompliance/automaticCheck",
children: [],
},
],
},
{
name: "合规性检查规则库构建",
url: "",
children: [
{
name: "检查规则编制",
url: "/compliance/checkRules",
children: [],
},
{
name: "自动稽核任务配置",
url: "/compliance/taskConfigure",
children: [],
},
],
},
{
name: "项目合规检查",
url: "",
children: [
{
name: "合规检查结果",
url: "/projectCheck/checkResault",
children: [],
},
{
name: "合规问题整改",
url: "/projectCheck/problemRectify",
children: [],
},
// {
// name: '合规问题整改核验',
// url: '/projectCheck/verificationRectify',
// children: [],
// },
],
},
],
},
{
name: "后评估结果管理",
url: "",
children: [
{
name: "后评估结果发布",
url: "",
children: [
{
name: "检查结果公示及评价",
url: "/managementResult/releaseResultpublicity",
children: [],
},
],
},
{
name: "后评估结果情况",
url: "",
children: [
// {
// name: '后评估进度情况',
// url: '/managementResult/situationResaultschedule',
// children: [],
// },
{
name: "后评估各环节问题分布",
url: "/managementResult/situationResaultissuesLink",
children: [],
},
{
name: "合规检查问题情况",
url: "/managementResult/issuesInspection",
children: [],
},
],
},
{
name: "后评估检查报告管理",
url: "",
children: [
{
name: "后评估检查报告维护",
url: "/managementResult/maintenancePg",
children: [],
},
{
name: "后评估报告模板管理",
url: "/managementResult/managementPg",
children: [],
},
// { name: "合规性检查报告维护", url: "/managementResult/maintenanceHg", children: [] },
// { name: "合规性检查报告模板管理", url: "/managementResult/managementHg", children: [] },
],
},
],
},
],
menu: true,
},
], ],
funcList: [], funcList: [],
}, },
...@@ -528,15 +780,17 @@ export default { ...@@ -528,15 +780,17 @@ export default {
sessionStorage.setItem("userid", res.content.id); sessionStorage.setItem("userid", res.content.id);
sessionStorage.setItem("username", res.content.name); sessionStorage.setItem("username", res.content.name);
sessionStorage.setItem("userloginname", res.content.loginName); sessionStorage.setItem("userloginname", res.content.loginName);
const resRoutes = res.content.menuList[0].children; // const routes = res.content.menuList.filter(item => item.name === '立项统筹中心')
const routes = res.content.menuList.filter(item => item.name === '后评估管控中心')
const resRoutes = routes[0].children;
// console.log(123123, resRoutes); // console.log(123123, resRoutes);
const souYeRoute = resRoutes.filter((item) => item.name === "首页"); const souYeRoute = resRoutes.filter((item) => item.name === "首页");
const restRoutes = resRoutes.filter((item) => item.name !== "首页"); const restRoutes = resRoutes.filter((item) => item.name !== "首页");
restRoutes.forEach(val => { // restRoutes.forEach(val => {
if (val.name === "项目档案库") { // if (val.name === "项目档案库") {
val.erji = "二级"; // val.erji = "二级";
} // }
}) // })
this.menuList = restRoutes this.menuList = restRoutes
// console.log(2222, souYeRoute, restRoutes); // console.log(2222, souYeRoute, restRoutes);
this.wholeRoutes = {souYeRoute, restRoutes} this.wholeRoutes = {souYeRoute, restRoutes}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!