From 0921e7678180f62fed47061f8ed5174958d59a79 Mon Sep 17 00:00:00 2001 From: wkc <978997012@qq.com> Date: Tue, 10 Mar 2026 14:28:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=B8=8A=E4=BC=A0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=A1=B5=E5=88=86=E9=A1=B5=E4=B8=8E=E5=8D=A1=E7=89=87?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/detail/UploadData.vue | 56 ++++++++++--------- .../unit/upload-data-disabled-cards.test.js | 35 ++++++++++++ .../upload-data-file-list-settings.test.js | 26 +++++++++ 3 files changed, 91 insertions(+), 26 deletions(-) create mode 100644 ruoyi-ui/tests/unit/upload-data-disabled-cards.test.js create mode 100644 ruoyi-ui/tests/unit/upload-data-file-list-settings.test.js diff --git a/ruoyi-ui/src/views/ccdiProject/components/detail/UploadData.vue b/ruoyi-ui/src/views/ccdiProject/components/detail/UploadData.vue index 2e3dc5e..c86d0e6 100644 --- a/ruoyi-ui/src/views/ccdiProject/components/detail/UploadData.vue +++ b/ruoyi-ui/src/views/ccdiProject/components/detail/UploadData.vue @@ -27,7 +27,12 @@
-
+
@@ -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]*?)