feat(ui): 第二轮P1 — scoped样式/mc-dialog暗黑适配/空状态/字号变量
This commit is contained in:
@@ -2,32 +2,32 @@
|
||||
<div>
|
||||
<h3>数据管理</h3>
|
||||
|
||||
<el-tabs v-model="activeTab" style="margin-top:16px;">
|
||||
<el-tabs v-model="activeTab" class="section-gap-tabs">
|
||||
<el-tab-pane label="Excel导入" name="import">
|
||||
<el-card>
|
||||
<template #header>Excel导入 <el-tag type="success" size="small">🤖 智能识别</el-tag></template>
|
||||
<el-upload drag :auto-upload="false" :on-change="handleFile" :on-remove="handleRemove" multiple accept=".xlsx,.xls">
|
||||
<el-icon :size="32"><UploadFilled /></el-icon>
|
||||
<div>拖拽或点击上传Excel文件</div>
|
||||
<div style="color:#999;font-size:12px;">支持 .xlsx .xls,自动识别利润表/现金流量表/资产负债表/KPI数据表</div>
|
||||
<div class="upload-hint">支持 .xlsx .xls,自动识别利润表/现金流量表/资产负债表/KPI数据表</div>
|
||||
</el-upload>
|
||||
<div v-if="files.length > 0" style="margin-top:8px;">
|
||||
<el-tag v-for="(f, i) in files" :key="i" closable @close="removeFile(i)" style="margin:2px;">{{ f.name }}</el-tag>
|
||||
<div v-if="files.length > 0" class="tag-list">
|
||||
<el-tag v-for="(f, i) in files" :key="i" closable class="file-tag" @close="removeFile(i)">{{ f.name }}</el-tag>
|
||||
</div>
|
||||
<el-button v-if="files.length > 0" type="primary" style="margin-top:12px;" :loading="uploading" @click="doImport">🤖 智能导入 {{ files.length }} 个文件</el-button>
|
||||
<div v-if="result" style="margin-top:12px;white-space:pre-wrap;"><el-alert :title="result" type="success" show-icon /></div>
|
||||
<el-button v-if="files.length > 0" type="primary" class="upload-actions" :loading="uploading" @click="doImport">🤖 智能导入 {{ files.length }} 个文件</el-button>
|
||||
<div v-if="result" class="result-area"><el-alert :title="result" type="success" show-icon /></div>
|
||||
</el-card>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="数据源管理" name="sources">
|
||||
<el-card>
|
||||
<template #header>
|
||||
<div style="display:flex;justify-content:space-between;align-items:center;">
|
||||
<div class="card-header-flex">
|
||||
<span>数据源配置</span>
|
||||
<el-button type="primary" size="small" @click="openSourceForm()">新增数据源</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<el-table :data="sources" v-loading="sourcesLoading" style="width:100%">
|
||||
<el-table :data="sources" v-loading="sourcesLoading" class="full-width-table">
|
||||
<el-table-column prop="name" label="名称" min-width="140" />
|
||||
<el-table-column prop="source_type" label="类型" width="80">
|
||||
<template #default="{ row }">
|
||||
@@ -53,6 +53,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-empty v-if="!sourcesLoading && sources.length === 0" description="暂无数据源,请点击「新增数据源」添加" />
|
||||
</el-card>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -189,3 +190,13 @@ async function doDeleteSource(row: any) {
|
||||
|
||||
onMounted(loadSources)
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.data-page { }
|
||||
.data-page .card-header-flex { display: flex; justify-content: space-between; align-items: center; }
|
||||
.upload-hint { color: #999; font-size: 12px; }
|
||||
.tag-list { margin-top: 8px; }
|
||||
.tag-list .file-tag { margin: 2px; }
|
||||
.upload-actions { margin-top: 12px; }
|
||||
.result-area { margin-top: 12px; white-space: pre-wrap; }
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user