This commit is contained in:
zlwu committed 2026-07-05 10:07:24 +08:00
1 parent 33c038b8d9
commit 54b27a3f0e
253 files changed
+30060 -14298

No files matched your search

@@ -0,0 +1,42 @@
<template>
<div class="dlg-view-section dlg-view-section-tabs">
<el-tabs v-model="activeTab" class="dlg-view-flow-tabs">
<el-tab-pane label="审批进度" name="flow">
<div class="flow-scroll">
<ApprovalFlowView :nodes="nodes" :loading="loading" />
</div>
</el-tab-pane>
<el-tab-pane label="审批历史" name="history">
<div class="flow-scroll">
<ApprovalHistoryView :items="history" :loading="loading" />
</div>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script setup lang="ts">
import { ref, watch } from 'vue'
import ApprovalFlowView from './ApprovalFlowView.vue'
import ApprovalHistoryView from './ApprovalHistoryView.vue'
const props = withDefaults(
defineProps<{
nodes: unknown[]
history: unknown[]
loading?: boolean
}>(),
{
loading: false
}
)
const activeTab = ref('flow')
watch(
() => [props.nodes, props.history],
() => {
activeTab.value = 'flow'
}
)
</script>
@@ -1,22 +1,11 @@
<script setup lang="ts">
import { Refresh, Search } from '@element-plus/icons-vue'
withDefaults(
defineProps<{
/** 是否与「展开更多条件」联动(收起/展开文案);无更多筛选项时可不传 */
showMore?: boolean
/** 为 true 时才显示「展开更多条件 / 收起更多条件」按钮 */
hasExpandableFilters?: boolean
loading?: boolean
}>(),
{
showMore: false,
hasExpandableFilters: false,
}
)
defineProps<{
loading?: boolean
}>()
const emit = defineEmits<{
toggleMore: []
reset: []
search: []
}>()
@@ -28,14 +17,7 @@ const emit = defineEmits<{
<slot />
</div>
<div class="filter-actions">
<el-button
v-if="hasExpandableFilters"
link
class="btn-link"
@click="emit('toggleMore')"
>
{{ showMore ? '收起更多条件' : '展开更多条件' }}
</el-button>
<div class="filter-actions-start" />
<div class="filter-actions-end">
<el-button class="filter-reset" :loading="loading" @click="emit('reset')">
<el-icon class="ic"><Refresh /></el-icon>
@@ -8,9 +8,6 @@ import BaseTable from '../base/BaseTable.vue'
const props = withDefaults(
defineProps<{
panelTitle: string
showMore?: boolean
/** 为 true 时显示「展开更多条件」;筛选项全部在主区域时不要传或传 false */
hasExpandableFilters?: boolean
selectedCount: number
rows: any[]
rangeText: string
@@ -28,13 +25,10 @@ const props = withDefaults(
{
pageSizes: () => [10, 20, 30],
showSummary: false,
showMore: false,
hasExpandableFilters: false,
}
)
const emit = defineEmits<{
toggleMore: []
reset: []
search: []
'update:currentPage': [value: number]
@@ -56,14 +50,7 @@ const pageSizeModel = computed({
<template>
<DataTablePanel :title="panelTitle">
<FilterBlock
:show-more="showMore"
:has-expandable-filters="hasExpandableFilters"
:loading="loading"
@toggle-more="emit('toggleMore')"
@reset="emit('reset')"
@search="emit('search')"
>
<FilterBlock :loading="loading" @reset="emit('reset')" @search="emit('search')">
<slot name="filters" />
</FilterBlock>
@@ -74,9 +61,9 @@ const pageSizeModel = computed({
<div class="table-scroll" :class="tableScrollClass">
<BaseTable
:data="rows"
:show-summary="showSummary"
:summary-method="summaryMethod"
:max-height="tableMaxHeight"
:show-summary="showSummary"
:summary-method="summaryMethod"
:max-height="tableMaxHeight"
@selection-change="(rows: any[]) => emit('selectionChange', rows)"
>
<slot name="table-columns" />