This commit is contained in:
guochunsi
2026-02-04 13:59:59 +08:00
parent ba9ac21b0c
commit a28cc36ac7
4 changed files with 175 additions and 77 deletions

View File

@@ -1,41 +1,9 @@
<template>
<div class="titlerelation-page">
<div class="page-wrapper">
<!-- 方案 F最上标题+右侧按钮下方搜索再下方表格 -->
<!-- 内容区最上搜索其次标题+按钮再下方表格 -->
<div class="content-block">
<!-- 最上左侧图标+标题右侧所有按钮 -->
<div class="content-block__header">
<span class="card-title">
<el-icon class="title-icon"><Document /></el-icon>
职称关系
</span>
<div class="header-actions">
<div class="action-group">
<el-button
v-if="hasAuth('professional_professionaltitlerelation_add')"
type="primary"
icon="FolderAdd"
@click="handleAdd"
>新增</el-button>
<el-button
v-if="hasAuth('professional_teacherbase_export')"
type="warning"
plain
icon="Download"
@click="handleDownLoadWord"
:loading="exportLoading"
>导出信息</el-button>
</div>
<div class="header-right">
<RightToolbar
v-model:showSearch="showSearch"
@queryTable="getDataList"
/>
</div>
</div>
</div>
<!-- 下方搜索区方案 F 默认收起 -->
<!-- 最上搜索区 -->
<div v-show="showSearch" class="content-block__filter">
<search-form
:model="search"
@@ -118,6 +86,34 @@
</search-form>
</div>
<!-- 其次左侧按钮右侧 RightToolbar -->
<div class="content-block__header">
<div class="header-actions">
<div class="action-group">
<el-button
v-if="hasAuth('professional_professionaltitlerelation_add')"
type="primary"
icon="FolderAdd"
@click="handleAdd"
>新增</el-button>
<el-button
v-if="hasAuth('professional_teacherbase_export')"
type="warning"
plain
icon="Download"
@click="handleDownLoadWord"
:loading="exportLoading"
>导出信息</el-button>
</div>
<div class="header-right">
<RightToolbar
v-model:showSearch="showSearch"
@queryTable="getDataList"
/>
</div>
</div>
</div>
<!-- 再下方表格 -->
<el-table
ref="tableRef"
@@ -247,7 +243,6 @@
<script setup lang="ts">
import { ref, reactive, onMounted, nextTick } from 'vue'
import { Document } from '@element-plus/icons-vue'
import { BasicTableProps, useTable } from '/@/hooks/table'
import { useAuth } from '/@/hooks/auth'
import { useMessage } from '/@/hooks/message'
@@ -486,10 +481,10 @@ onMounted(async () => {
gap: 0;
}
/* 筛选:方案 F内容区内置筛选区默认收起 */
/* 筛选:内容区最上方,无上外边距;与下方标题栏间距用 margin-bottom */
.content-block__filter {
padding: 16px 20px 5px 20px;
margin-top: 12px;
margin-top: 0;
margin-bottom: 12px;
background: var(--el-fill-color-light);
border-radius: 8px;
@@ -535,21 +530,25 @@ onMounted(async () => {
.header-actions {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 12px;
width: 100%;
}
/* 按钮间距按规范 10px与 RightToolbar 区隔 */
.action-group {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 8px;
flex-wrap: wrap;
}
.header-right {
display: flex;
align-items: center;
gap: 8px;
padding-left: 12px;
// border-left: 1px solid var(--el-border-color-lighter);
}
/* 表格 */