feat : 修改菜单状态

This commit is contained in:
clay
2024-05-23 14:49:56 +08:00
parent 21f90e438c
commit e9e5a0c785
9 changed files with 36 additions and 21 deletions

View File

@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>科研管理平台</title>
<!-- <title>科研管理平台</title>-->
</head>
<body>
<div id="app"></div>

View File

@@ -1,7 +1,7 @@
<template>
<!-- 有子菜单 -->
<template v-for="item in menuItem" :key="item.path">
<el-sub-menu v-if="item?.children?.length>0 && !item.hidden" :index="item.path">
<el-sub-menu v-if="checkMenuItem(item)" :index="item.path">
<template #title>
<svg-icon :name="item.icon"/>
<span>{{ item.title }}</span>
@@ -44,5 +44,19 @@ const handleGo = (path) => {
}
}
const checkMenuItem = (item) => {
let children = item.children
let childState = false;
if (children){
for (let child of children) {
if (!child.hidden) {
childState = true
break
}
}
}
return item?.children?.length>0 && !item.hidden && childState
}
</script>

View File

@@ -1,6 +1,7 @@
<template>
<div class="logo" ref="logo">
<span v-if="!siderbarStore.isCollapse">科研管理平台</span>
<!-- <span v-if="!siderbarStore.isCollapse">科研管理平台</span>-->
<span v-if="!siderbarStore.isCollapse"></span>
</div>
<el-scrollbar :height="`calc(100vh - ${logoHeight}px)`" style="background-color: #ffffff">
<el-menu

View File

@@ -6,7 +6,7 @@
:rules="rules"
label-width="70px"
>
<h2>科研管理平台</h2>
<!-- <h2>科研管理平台</h2>-->
<el-form-item prop="username" label="账号">
<el-input v-model="loginForm.username" :prefix-icon="User"></el-input>
</el-form-item>

View File

@@ -90,7 +90,7 @@ const schame = computed(()=>{
}
},
{
label: '角色权限',
label: '角色标识',
prop: 'roleKey',
component: 'el-input',
props: {

View File

@@ -191,7 +191,7 @@ const getRandomId = () => {
d = Math.floor(d / 16)
return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16)
})
return 'node_' + id
return id
}
const getProcessInfo = async () => {

View File

@@ -1,13 +1,13 @@
<template>
<el-input v-model="processData.deploymentName" placeholder="请输入流程名称"/>
<div v-if="!processData.processDefinitionKey">
<!-- <div v-if="!processData.processDefinitionKey">-->
<el-select v-model="processData.processKey" placeholder="请选择流程环节">
<el-option v-for="item in optionList" :label="item.label" :value="item.value"/>
</el-select>
</div>
<div v-else>
{{processData.processName}}
</div>
<!-- </div>-->
<!-- <div v-else>-->
<!-- {{processData.processName}}-->
<!-- </div>-->
流程设置{{ processData.deploymentName }}
</template>

View File

@@ -53,11 +53,11 @@
<el-button type="primary" size="mini"
@click="handleEdit(scope.row.deploymentId)" link>编辑
</el-button>
<el-button type="primary" size="mini"
@click="viewHistoricalVersion(scope.row)" link>历史
</el-button>
<popover-delete :name="scope.row.version" :type="'版本'"
@delete="handleDelete(scope.row.deploymentId)"/>
<!-- <el-button type="primary" size="mini"-->
<!-- @click="viewHistoricalVersion(scope.row)" link>历史-->
<!-- </el-button>-->
<!-- <popover-delete :name="scope.row.version" :type="'版本'"-->
<!-- @delete="handleDelete(scope.row.deploymentId)"/>-->
</template>
</el-table-column>
</el-table>