feat : 修改菜单状态
This commit is contained in:
@@ -12,13 +12,13 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import {useRoute, useRouter} from 'vue-router';
|
||||
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
|
||||
watch(route, ()=> {
|
||||
watch(route, () => {
|
||||
getBreadcrumb()
|
||||
})
|
||||
|
||||
@@ -29,7 +29,7 @@ const breadcrumbList = ref([])
|
||||
const getBreadcrumb = () => {
|
||||
let matched = route.matched.filter(item => item.meta && item.meta.title)
|
||||
const first = matched[0]
|
||||
if(!isDashboard(first)) {
|
||||
if (!isDashboard(first)) {
|
||||
matched = [{path: '/home', meta: {title: '首页'}}].concat(matched)
|
||||
}
|
||||
breadcrumbList.value.length = 0;
|
||||
@@ -39,7 +39,7 @@ const getBreadcrumb = () => {
|
||||
|
||||
const isDashboard = (meta) => {
|
||||
const name = meta && meta.name
|
||||
if(!name) {
|
||||
if (!name) {
|
||||
return
|
||||
}
|
||||
return name.trim().toLocaleLowerCase() === 'Home'.toLocaleLowerCase()
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -90,7 +90,7 @@ const schame = computed(()=>{
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '角色权限',
|
||||
label: '角色标识',
|
||||
prop: 'roleKey',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
|
||||
@@ -119,7 +119,7 @@ const loadInitFrom = () => {
|
||||
let design = {
|
||||
processDefinitionKey: 'pro' + getRandomId(),
|
||||
deploymentName: "未命名表单",
|
||||
processKey:'',
|
||||
processKey: '',
|
||||
// logo: {
|
||||
// icon: "el-icon-eleme",
|
||||
// background: "#1e90ff"
|
||||
@@ -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 () => {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user