From c8e8aabfe8b4e7624328afa0172b816f8501bdeb Mon Sep 17 00:00:00 2001
From: "446052889@qq.com" <446052889@qq.com>
Date: Fri, 18 Apr 2025 10:19:50 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E4=B8=AA=E6=B5=81=E7=A8=8B=E5=AF=B9?=
=?UTF-8?q?=E5=BA=94=E5=A4=9A=E4=B8=AA=E8=A7=92=E8=89=B2=E5=9B=BE=E7=9A=84?=
=?UTF-8?q?=E6=A3=80=E6=B5=8B=E5=8A=9F=E8=83=BD=E5=A2=9E=E5=BC=BA=EF=BC=8C?=
=?UTF-8?q?=E6=9F=A5=E8=AF=A2=E8=A7=92=E8=89=B2=E5=9B=BE=E6=98=AF=E5=90=A6?=
=?UTF-8?q?=E6=9C=89=E7=9B=B8=E5=85=B3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/components/role-error-change.vue | 170 +++++++++++++++++-
1 file changed, 166 insertions(+), 4 deletions(-)
diff --git a/com.actionsoft.apps.coe.pal.datamigration/src/components/role-error-change.vue b/com.actionsoft.apps.coe.pal.datamigration/src/components/role-error-change.vue
index db5f85a..e7e34f5 100644
--- a/com.actionsoft.apps.coe.pal.datamigration/src/components/role-error-change.vue
+++ b/com.actionsoft.apps.coe.pal.datamigration/src/components/role-error-change.vue
@@ -204,8 +204,8 @@
+
+
+
+
+ 关联了其他模型
+
+
+
+
+
+
+ | 当前角色节点 |
+ 模型名称 |
+ 节点名称 |
+
+
+
+
+ | {{ item.currShapeName }} |
+ {{ item.modelName }} |
+ {{ item.shapeName }} |
+
+
+
+
+
+
+
+
+ {{ scope.row.activeRelationCount }}
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+ 被其他模型关联
+
+
+
+
+
+
+ | 当前角色节点 |
+ 模型名称 |
+ 节点名称 |
+
+
+
+
+ | {{ item.currShapeName }} |
+ {{ item.modelName }} |
+ {{ item.shapeName }} |
+
+
+
+
+
+
+
+
+ {{ scope.row.passiveRelationCount }}
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
@@ -763,6 +878,21 @@ export default defineComponent({
that.roleMultiError.list = '';
that.roleMultiError.desc = '';
}
+ const getRowStyle = ({row}) => {
+ return {
+ backgroundColor: row.color,
+ color: $this.getTextColor(row.color), // 自动适配文字颜色
+ };
+ }
+ const getTextColor = (bgColor) => {
+ if (!bgColor) return "#f00";
+ const hex = bgColor.replace("#", "");
+ const r = parseInt(hex.substr(0, 2), 16);
+ const g = parseInt(hex.substr(2, 2), 16);
+ const b = parseInt(hex.substr(4, 2), 16);
+ const brightness = (r * 299 + g * 587 + b * 114) / 1000;
+ return brightness > 128 ? "#000" : "#fff";
+ }
return {
tabs,
roleVersionIdError,
@@ -793,13 +923,45 @@ export default defineComponent({
checkErrorVerModel,
updateErrorVerModel,
checkErrorMultiModel,
- updateErrorMultiModel
+ updateErrorMultiModel,
+ getRowStyle,
+ getTextColor
}
}
})