diff --git a/main/manager-web/src/components/FunctionDialog.vue b/main/manager-web/src/components/FunctionDialog.vue index c554a4a3..23adce78 100644 --- a/main/manager-web/src/components/FunctionDialog.vue +++ b/main/manager-web/src/components/FunctionDialog.vue @@ -13,7 +13,9 @@

{{ $t('functionDialog.unselectedFunctions') }}

- {{ $t('functionDialog.selectAll') }} + + {{ $t('functionDialog.selectAll') }} +
@@ -21,7 +23,7 @@
-
+
{{ func.name }}
@@ -36,7 +38,9 @@

{{ $t('functionDialog.selectedFunctions') }}

- {{ $t('functionDialog.selectAll') }} + + {{ $t('functionDialog.selectAll') }} +
@@ -44,7 +48,7 @@
-
+
{{ func.name }}
@@ -57,7 +61,9 @@
-

{{ $t('functionDialog.paramConfig') }} - {{ currentFunction.name }}

+

+ {{ $t('functionDialog.paramConfig') }} - {{ currentFunction.name }} +

@@ -119,8 +125,8 @@
@@ -191,10 +197,6 @@ export default { selectedNames: [], currentFunction: null, modifiedFunctions: {}, - functionColorMap: [ - '#FF6B6B', '#4ECDC4', '#45B7D1', - '#96CEB4', '#FFEEAD', '#D4A5A5', '#A2836E' - ], tempFunctions: {}, // 添加一个标志位来跟踪是否已经保存 hasSaved: false, @@ -405,10 +407,6 @@ export default { // 通知父组件对话框已关闭且已保存 this.$emit('dialog-closed', true); }, - getFunctionColor(name) { - const hash = [...name].reduce((acc, char) => acc + char.charCodeAt(0), 0); - return this.functionColorMap[hash % this.functionColorMap.length]; - }, fieldRemark(field) { let description = (field && field.label) ? field.label : ''; if (field.default) { @@ -527,6 +525,7 @@ export default { flex-shrink: 0; width: 8px; height: 8px; + background-color: #5778ff; margin-right: 8px; border-radius: 50%; } diff --git a/main/manager-web/src/views/roleConfig.vue b/main/manager-web/src/views/roleConfig.vue index a0f89503..8e0eee08 100644 --- a/main/manager-web/src/views/roleConfig.vue +++ b/main/manager-web/src/views/roleConfig.vue @@ -104,7 +104,7 @@
功能名称: {{ func.name }}
-
+
{{ getFunctionDisplayChar(func.name) }}
@@ -189,10 +189,6 @@ export default { voiceOptions: [], showFunctionDialog: false, currentFunctions: [], - functionColorMap: [ - '#FF6B6B', '#4ECDC4', '#45B7D1', - '#96CEB4', '#FFEEAD', '#D4A5A5', '#A2836E' - ], allFunctions: [], originalFunctions: [], } @@ -428,20 +424,16 @@ export default { } }); }, - getFunctionColor(name) { - const hash = [...name].reduce((acc, char) => acc + char.charCodeAt(0), 0); - return this.functionColorMap[hash % this.functionColorMap.length]; - }, getFunctionDisplayChar(name) { if (!name || name.length === 0) return ''; - + for (let i = 0; i < name.length; i++) { const char = name[i]; if (/[\u4e00-\u9fa5a-zA-Z0-9]/.test(char)) { return char; } } - + // 如果没有找到有效字符,返回第一个字符 return name.charAt(0); }, @@ -768,11 +760,12 @@ export default { display: inline-flex; align-items: center; justify-content: center; - color: white; + color: #5778ff; font-weight: bold; font-size: 12px; margin-right: 8px; position: relative; + background-color: #e6ebff; } ::v-deep .el-form-item__label {