diff --git a/ruoyi-ui/src/views/ccdiProject/components/detail/RiskModelSection.vue b/ruoyi-ui/src/views/ccdiProject/components/detail/RiskModelSection.vue index 638a0fef..55cd1c36 100644 --- a/ruoyi-ui/src/views/ccdiProject/components/detail/RiskModelSection.vue +++ b/ruoyi-ui/src/views/ccdiProject/components/detail/RiskModelSection.vue @@ -10,17 +10,22 @@ 导出 -
-
+
+
+ {{ isModelSelected(item.key) ? "再次点击取消" : "点击加入联动" }} +
+
@@ -33,40 +38,30 @@
-
- 筛查模型 - + 触发方式 + - - + 任意触发 + 同时触发 +
-
- 预警类型 - - - +
+ 已选模型 + {{ selectedModelText }} +
+ +
+ 查询 + 重置
- + @@ -75,7 +70,9 @@ @@ -84,8 +81,10 @@
@@ -94,6 +93,20 @@ @@ -147,10 +274,22 @@ export default { } .model-card { + display: block; + width: 100%; padding: 18px; border: 1px solid #e2e8f0; border-radius: 0; background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%); + text-align: left; + cursor: pointer; + transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease; +} + +.model-card:hover, +.model-card.is-active { + border-color: #2563eb; + box-shadow: 0 12px 24px rgba(37, 99, 235, 0.12); + transform: translateY(-2px); } .model-card-title { @@ -172,8 +311,15 @@ export default { color: #94a3b8; } +.model-card-action { + margin-top: 12px; + font-size: 12px; + color: #2563eb; +} + .filter-bar { display: flex; + align-items: center; gap: 16px; margin-bottom: 14px; padding: 14px 16px; @@ -187,11 +333,39 @@ export default { gap: 8px; } -.filter-label { +.filter-item--mode { + flex-wrap: wrap; +} + +.filter-label, +.summary-label { font-size: 12px; color: #64748b; } +.filter-summary { + display: flex; + align-items: center; + gap: 8px; + min-width: 0; + flex: 1; +} + +.summary-value { + min-width: 0; + color: #1e293b; + font-size: 13px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.filter-actions { + margin-left: auto; + display: flex; + gap: 8px; +} + .model-table { border-radius: 12px; overflow: hidden; diff --git a/ruoyi-ui/tests/unit/preliminary-check-model-match-mode.test.js b/ruoyi-ui/tests/unit/preliminary-check-model-match-mode.test.js new file mode 100644 index 00000000..8cb798c7 --- /dev/null +++ b/ruoyi-ui/tests/unit/preliminary-check-model-match-mode.test.js @@ -0,0 +1,18 @@ +const assert = require("assert"); +const fs = require("fs"); +const path = require("path"); + +const source = fs.readFileSync( + path.resolve( + __dirname, + "../../src/views/ccdiProject/components/detail/RiskModelSection.vue" + ), + "utf8" +); + +[ + "matchMode", + 'matchMode: "ANY"', + "任意触发", + "同时触发", +].forEach((token) => assert(source.includes(token), token)); diff --git a/ruoyi-ui/tests/unit/preliminary-check-model-multiselect.test.js b/ruoyi-ui/tests/unit/preliminary-check-model-multiselect.test.js new file mode 100644 index 00000000..31561155 --- /dev/null +++ b/ruoyi-ui/tests/unit/preliminary-check-model-multiselect.test.js @@ -0,0 +1,18 @@ +const assert = require("assert"); +const fs = require("fs"); +const path = require("path"); + +const source = fs.readFileSync( + path.resolve( + __dirname, + "../../src/views/ccdiProject/components/detail/RiskModelSection.vue" + ), + "utf8" +); + +[ + "selectedModelCodes", + "toggleModelSelection", + "this.selectedModelCodes.includes(modelCode)", + "this.selectedModelCodes = this.selectedModelCodes.filter", +].forEach((token) => assert(source.includes(token), token));