Commit d6afea81 by ningjihai

pageTitle修改 增加backProject属性 如果backProject 则显示右侧返回项目按钮

进入项目,所有项目菜单页面都已经增加了backProject
parent b196a6f3
...@@ -14,21 +14,24 @@ import { useRoute } from 'vue-router' ...@@ -14,21 +14,24 @@ import { useRoute } from 'vue-router'
import useSettingsStore from '@/store/modules/settings' import useSettingsStore from '@/store/modules/settings'
import useAppStore from '@/store/modules/app' import useAppStore from '@/store/modules/app'
import pageTitleBack from '@/assets/images/pageTitleBack.png' import pageTitleBack from '@/assets/images/pageTitleBack.png'
import returnLogo from '@/assets/images/return.png'
const route = useRoute() const route = useRoute()
const settingsStore = useSettingsStore() const settingsStore = useSettingsStore()
const appStore = useAppStore() const appStore = useAppStore()
const emit = defineEmits<{ // const emit = defineEmits<{
back: [] // back: [],
}>() // handleBackProject:[]
// }>()
const emit = defineEmits(['back','handleBackProject'])
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
back?: boolean back?: boolean
title?: string title?: string
backProject?: boolean
}>(), { }>(), {
back: false back: false,
backProject: false
}) })
const layout = computed(() => settingsStore.layout) const layout = computed(() => settingsStore.layout)
...@@ -42,6 +45,9 @@ const space = computed(() => showHamburger.value && layout.value !== 'comprehens ...@@ -42,6 +45,9 @@ const space = computed(() => showHamburger.value && layout.value !== 'comprehens
function handlePageBack():void { function handlePageBack():void {
emit('back') emit('back')
} }
function handleBackProject () {
emit('handleBackProject')
}
</script> </script>
<template> <template>
...@@ -75,6 +81,7 @@ function handlePageBack():void { ...@@ -75,6 +81,7 @@ function handlePageBack():void {
</div> </div>
<div class="right-part"> <div class="right-part">
<slot name="buttons"/> <slot name="buttons"/>
<el-button v-if="props.backProject" color="rgba(11, 136, 251, 1)" plain @click="handleBackProject"><img class="return-logo" :src="returnLogo" alt="">返回项目管理</el-button>
</div> </div>
</div> </div>
</div> </div>
...@@ -101,8 +108,8 @@ function handlePageBack():void { ...@@ -101,8 +108,8 @@ function handlePageBack():void {
&-container { &-container {
height: var(--navbar-height); height: var(--navbar-height);
border-radius: 4px; border-radius: 4px;
background: rgba(255, 255, 255, 1); // background: rgba(255, 255, 255, 1);
box-shadow: 2px 2px 4px rgba(30, 92, 235, 0.1); // box-shadow: 2px 2px 4px rgba(30, 92, 235, 0.1);
padding: 0 13px 0 20px; padding: 0 13px 0 20px;
transition: var(--el-transition); transition: var(--el-transition);
display: flex; display: flex;
...@@ -134,5 +141,8 @@ function handlePageBack():void { ...@@ -134,5 +141,8 @@ function handlePageBack():void {
} }
} }
.return-logo {
width: 16px;
height: 12.25px;
}
</style> </style>
...@@ -254,9 +254,9 @@ function uuid() { ...@@ -254,9 +254,9 @@ function uuid() {
</script> </script>
<template> <template>
<div class="app-container scroller"> <div class="app-container scroller">
<PageTitle :back="true" @back="pageProjectManage" > <PageTitle backProject @handleBackProject="pageProjectManage">
<template #title> <template #title>
返回项目管理 加密设置
</template> </template>
</PageTitle> </PageTitle>
......
...@@ -84,9 +84,9 @@ defineExpose({ ...@@ -84,9 +84,9 @@ defineExpose({
</script> </script>
<template> <template>
<div class="app-container scroller"> <div class="app-container scroller">
<PageTitle :back="true" @back="pageProjectManage" > <PageTitle backProject @handleBackProject="pageProjectManage">
<template #title> <template #title>
返回项目管理 客户端密管
</template> </template>
</PageTitle> </PageTitle>
......
...@@ -264,9 +264,9 @@ watch(dialogVisible, (newVal) => { ...@@ -264,9 +264,9 @@ watch(dialogVisible, (newVal) => {
<template> <template>
<div class="app-container scroller"> <div class="app-container scroller">
<PageTitle :back="true" @back="pageProjectManage"> <PageTitle backProject @handleBackProject="pageProjectManage">
<template #title> <template #title>
返回项目管理 加密管理
</template> </template>
<template #buttons> <template #buttons>
<!-- <el-button <!-- <el-button
......
...@@ -284,9 +284,9 @@ onUnmounted(() => { ...@@ -284,9 +284,9 @@ onUnmounted(() => {
</script> </script>
<template> <template>
<div class="app-container scroller"> <div class="app-container scroller">
<PageTitle :back="true" @back="pageProjectManage" > <PageTitle backProject @handleBackProject="pageProjectManage">
<template #title> <template #title>
返回项目管理 客户端监控管理
</template> </template>
</PageTitle> </PageTitle>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="app-container scroller"> <div class="app-container scroller">
<PageTitle :back="true" @back="backListPage"> <PageTitle :back="true" @back="backListPage">
<template #title> <template #title>
新增发现任务 {{ props.addEditType === 'add' ? '新增发现任务' : '编辑发现任务' }}
</template> </template>
</PageTitle> </PageTitle>
......
...@@ -12,6 +12,7 @@ import QueryForm from './QueryForm.vue' ...@@ -12,6 +12,7 @@ import QueryForm from './QueryForm.vue'
import SmartDiscoveryDialog from './modules/SmartDiscoveryDialog.vue' import SmartDiscoveryDialog from './modules/SmartDiscoveryDialog.vue'
import find from '@/assets/images/find.png' import find from '@/assets/images/find.png'
import jiankong from '@/assets/images/jiankong.png' import jiankong from '@/assets/images/jiankong.png'
import findResult from '@/assets/images/findResult.png'
import { import {
queryDiscoverList, queryDiscoverList,
delDiscoverTask, delDiscoverTask,
...@@ -393,9 +394,9 @@ const handleAddEditConfirm = (submitData, isEditMode) =>{ ...@@ -393,9 +394,9 @@ const handleAddEditConfirm = (submitData, isEditMode) =>{
<template> <template>
<div class="app-container scroller"> <div class="app-container scroller">
<PageTitle :back="true" @back="pageProjectManage"> <PageTitle backProject @handleBackProject="pageProjectManage">
<template #title> <template #title>
返回项目管 发现梳
</template> </template>
<template #buttons> <template #buttons>
<!-- <el-button <!-- <el-button
...@@ -578,10 +579,27 @@ const handleAddEditConfirm = (submitData, isEditMode) =>{ ...@@ -578,10 +579,27 @@ const handleAddEditConfirm = (submitData, isEditMode) =>{
<span class="dropdown-item">查看历史</span> <span class="dropdown-item">查看历史</span>
</el-dropdown-item> --> </el-dropdown-item> -->
<el-dropdown-item command="viewResult"> <el-dropdown-item command="viewResult">
<span class="dropdown-item">查看结果</span> <!-- <span class="dropdown-item">查看结果</span> -->
<el-button
link
type="danger"
size="small"
class="op-btn"
>
<img :src="findResult" alt="" class="btn-logo">查看结果
</el-button>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item command="delete" divided> <el-dropdown-item command="delete">
<span class="dropdown-item delete-item">删除</span> <el-button
link
type="danger"
size="small"
class="op-btn"
icon="delete"
>
删除
</el-button>
<!-- <span class="dropdown-item delete-item">删除</span> -->
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
......
...@@ -94,9 +94,9 @@ onMounted(() => { ...@@ -94,9 +94,9 @@ onMounted(() => {
<template> <template>
<div class="app-container home scroller"> <div class="app-container home scroller">
<PageTitle :back="true" @back="pageProjectManage"> <PageTitle backProject @handleBackProject="pageProjectManage">
<template #title> <template #title>
返回项目管理 首页
</template> </template>
</PageTitle> </PageTitle>
<el-card class="box-card mt20" :body-style="{ padding: '0' }"> <el-card class="box-card mt20" :body-style="{ padding: '0' }">
......
...@@ -79,9 +79,9 @@ onMounted(() => { ...@@ -79,9 +79,9 @@ onMounted(() => {
</script> </script>
<template> <template>
<div class="app-container scroller"> <div class="app-container scroller">
<PageTitle :back="true" @back="pageProjectManage"> <PageTitle backProject @handleBackProject="pageProjectManage">
<template #title> <template #title>
返回项目管理 加密日志
</template> </template>
<template #buttons> <template #buttons>
<el-button type="primary" icon="Download" @click="download">导出</el-button> <el-button type="primary" icon="Download" @click="download">导出</el-button>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论