feat(客户管理): 新增税号字段并优化客户信息展示

feat(订单管理): 增加宽度和厚度公差字段,优化销售员选择方式

feat(合同管理): 新增合同管理模块及相关API接口

refactor(文件列表): 重构文件列表组件样式和布局

fix(QRCode): 修复内容为空时仍触发生成的bug

perf(线圈管理): 优化用户列表加载条件,减少不必要请求

style(代码): 移除多余的空行和注释代码
This commit is contained in:
砂糖
2026-03-31 11:16:48 +08:00
parent b7d8463198
commit aca10bcd45
13 changed files with 793 additions and 168 deletions

View File

@@ -1,44 +1,31 @@
<template>
<div class="file-list-container">
<el-table
:data="fileList"
border
size="small"
v-loading="loading"
style="width: 100%;"
>
<el-table-column
label="文件名"
prop="originalName"
min-width="200"
>
<template slot-scope="scope">
<i class="el-icon-document" style="margin-right: 8px;"></i>
{{ scope.row.originalName }}
</template>
</el-table-column>
<el-table-column
label="操作"
width="100"
align="center"
>
<template slot-scope="scope">
<el-button
type="text"
icon="el-icon-download"
@click="downloadFile(scope.row)"
size="small"
>
下载
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 空数据提示 -->
<div v-if="fileList.length === 0 && !loading" class="empty-tip">
<el-empty description="暂无文件数据"></el-empty>
</div>
<!-- 自定义文件列表 -->
<div v-else class="file-list" v-loading="loading">
<div
v-for="file in fileList"
:key="file.ossId"
class="file-item"
>
<div class="file-info">
<i class="el-icon-document"></i>
<span class="file-name">{{ file.originalName }}</span>
</div>
<el-button
type="text"
icon="el-icon-download"
@click="downloadFile(file)"
size="small"
class="download-btn"
>
下载
</el-button>
</div>
</div>
</div>
</template>
@@ -112,8 +99,58 @@ export default {
height: 200px;
}
::v-deep .el-table {
--el-table-header-text-color: #606266;
--el-table-row-hover-bg-color: #f5f7fa;
.file-list {
width: 100%;
border: 1px solid #ebeef5;
border-radius: 4px;
overflow: hidden;
}
.file-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 16px;
border-bottom: 1px solid #ebeef5;
transition: background-color 0.3s;
}
.file-item:last-child {
border-bottom: none;
}
.file-item:hover {
background-color: #f5f7fa;
}
.file-info {
display: flex;
align-items: center;
flex: 1;
}
.file-info .el-icon-document {
margin-right: 8px;
color: #409eff;
font-size: 16px;
}
.file-name {
font-size: 14px;
color: #606266;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
flex: 1;
}
.download-btn {
margin: 0;
font-size: 14px;
color: #409eff;
}
.download-btn:hover {
color: #66b1ff;
}
</style>

View File

@@ -25,7 +25,7 @@ export default {
watch: {
content: {
handler(newVal, oldVal) {
if (newVal !== oldVal) {
if (newVal && newVal !== oldVal) {
this.generateQRCode();
}
},