|
|
|
|
@ -1,17 +1,5 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="legacy-page">
|
|
|
|
|
<div v-if="config.toolbarActions.length" class="legacy-toolbar">
|
|
|
|
|
<el-button
|
|
|
|
|
v-for="btn in config.toolbarActions"
|
|
|
|
|
:key="btn.label"
|
|
|
|
|
:type="btn.type || 'default'"
|
|
|
|
|
size="small"
|
|
|
|
|
class="toolbar-btn"
|
|
|
|
|
@click="handleMockAction(btn.label)"
|
|
|
|
|
>
|
|
|
|
|
{{ btn.label }}
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<el-form v-if="config.filters.length" :model="queryModel" inline class="query-form" label-width="96px">
|
|
|
|
|
<el-form-item v-for="item in config.filters" :key="item.key" :label="item.label">
|
|
|
|
|
@ -125,7 +113,6 @@
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { computed, onMounted, ref } from 'vue';
|
|
|
|
|
import { ElMessage } from 'element-plus';
|
|
|
|
|
import { getPageConfig } from '../data/pageConfigs';
|
|
|
|
|
import type { DemoColumn } from '../types';
|
|
|
|
|
|
|
|
|
|
@ -191,12 +178,6 @@ const handleReset = () => {
|
|
|
|
|
loadData(false);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handleMockAction = (name: string) => {
|
|
|
|
|
if (name.includes('导出')) ElMessage.success(`已模拟执行:${name}`);
|
|
|
|
|
else if (name.includes('打印')) ElMessage.success('已模拟打印预览');
|
|
|
|
|
else ElMessage.info(`已触发:${name}`);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const formatCell = (row: Record<string, any>, column: DemoColumn) => {
|
|
|
|
|
const val = column.prop ? row[column.prop] : '';
|
|
|
|
|
if (val === undefined || val === null || val === '') return '';
|
|
|
|
|
|