@@ -38,6 +43,7 @@
:type="card.uploaded ? 'primary' : ''"
:icon="card.uploaded ? 'el-icon-view' : 'el-icon-upload2'"
:plain="!card.uploaded"
+ :disabled="card.disabled"
@click="handleUploadClick(card.key)"
>
{{ card.btnText }}
@@ -49,21 +55,6 @@
@@ -365,6 +356,7 @@ export default {
icon: "el-icon-document",
btnText: "上传流水",
uploaded: false,
+ disabled: false,
},
{
key: "credit",
@@ -373,6 +365,7 @@ export default {
icon: "el-icon-s-data",
btnText: "上传征信",
uploaded: false,
+ disabled: true,
},
{
key: "namelist",
@@ -381,6 +374,7 @@ export default {
icon: "el-icon-s-order",
btnText: "选择名单",
uploaded: false,
+ disabled: true,
},
],
// 质量指标
@@ -422,9 +416,8 @@ export default {
listLoading: false,
queryParams: {
projectId: null,
- fileStatus: null,
pageNum: 1,
- pageSize: 20,
+ pageSize: 10,
},
total: 0,
@@ -544,7 +537,7 @@ export default {
/** 上传卡片点击 */
handleUploadClick(key) {
const card = this.uploadCards.find((c) => c.key === key);
- if (!card) return;
+ if (!card || card.disabled) return;
if (key === "transaction") {
// 流水导入 - 打开批量上传弹窗
@@ -881,7 +874,6 @@ export default {
try {
const params = {
projectId: this.projectId,
- fileStatus: this.queryParams.fileStatus,
pageNum: this.queryParams.pageNum,
pageSize: this.queryParams.pageSize,
};
@@ -1160,6 +1152,23 @@ export default {
box-shadow: 0 4px 12px rgba(24, 144, 255, 0.15);
}
+ &.is-disabled {
+ background-color: #fafafa;
+ border-color: #ebeef5;
+ opacity: 0.7;
+
+ &:hover {
+ border-color: #ebeef5;
+ box-shadow: none;
+ }
+
+ .card-icon,
+ .card-title,
+ .card-desc {
+ color: #c0c4cc;
+ }
+ }
+
.card-icon {
font-size: 32px;
color: #1890ff;
@@ -1291,14 +1300,9 @@ export default {
.list-toolbar {
display: flex;
- justify-content: space-between;
+ justify-content: flex-end;
align-items: center;
margin-bottom: 16px;
-
- .filter-group {
- display: flex;
- gap: 12px;
- }
}
}
diff --git a/ruoyi-ui/tests/unit/upload-data-disabled-cards.test.js b/ruoyi-ui/tests/unit/upload-data-disabled-cards.test.js
new file mode 100644
index 0000000..abf71ef
--- /dev/null
+++ b/ruoyi-ui/tests/unit/upload-data-disabled-cards.test.js
@@ -0,0 +1,35 @@
+const assert = require("assert");
+const fs = require("fs");
+const path = require("path");
+
+const componentPath = path.resolve(
+ __dirname,
+ "../../src/views/ccdiProject/components/detail/UploadData.vue"
+);
+const source = fs.readFileSync(componentPath, "utf8");
+
+assert(
+ /
([\s\S]*?)