Quellcode durchsuchen

feat: 分支条件加入field,首页样式调整

luoyali vor 1 Jahr
Ursprung
Commit
635ab75773
2 geänderte Dateien mit 14 neuen und 5 gelöschten Zeilen
  1. 10 1
      src/components/scWorkflow/nodes/branch.vue
  2. 4 4
      src/views/dashboard/index.vue

+ 10 - 1
src/components/scWorkflow/nodes/branch.vue

@@ -94,7 +94,12 @@
 									</div>
 									<div class="condition-content">
 										<div class="condition-content-box">
-											<el-input v-if="condition.type === 'custom'" v-model="condition.label" placeholder="自定义条件字段" />
+											<el-input
+												v-if="condition.type === 'custom'"
+												v-model="condition.label"
+												placeholder="自定义条件字段"
+												@input="getCurrentItemField(conditionGroupIdx, idx)"
+											/>
 											<el-select
 												v-if="condition.type === 'form'"
 												v-model="condition.field"
@@ -292,6 +297,10 @@ export default {
 			const field = currentCondition[idx].field
 			const labelObj = this.expressionFormList.find(i => i.key === field)
 			currentCondition[idx].label = labelObj.label
+		},
+		getCurrentItemField(conditionIdx, idx) {
+			const currentCondition = this.form.conditionList[conditionIdx]
+			currentCondition[idx].field = currentCondition[idx].label
 		}
 	}
 }

+ 4 - 4
src/views/dashboard/index.vue

@@ -503,7 +503,7 @@ const tableOpts = ref({
 		justify-content: center;
 	}
 	min-height: 120px;
-	background: var(--el-color-white) linear-gradient(120deg, var(--el-color-primary-light-9) 10%, var(--el-color-white)) no-repeat;
+	background: var(--el-bg-color) linear-gradient(120deg, var(--el-color-primary-light-9) 10%, var(--el-bg-color)) no-repeat;
 	.header {
 		//font-size: var(--el-font-size-bigger);
 		font-size: 18px;
@@ -581,16 +581,16 @@ const tableOpts = ref({
 		margin: -16px -12px;
 	}
 	.el-card__header {
-		//background: linear-gradient(to left, var(--el-color-warning-light-8), var(--el-color-white)) no-repeat;
+		//background: linear-gradient(to left, var(--el-color-warning-light-8), var(--el-bg-color)) no-repeat;
 	}
 	&.box-card--type2 {
 		.el-card__header {
-			background: linear-gradient(to left, var(--el-color-primary-light-8), var(--el-color-white)) no-repeat;
+			background: linear-gradient(to left, var(--el-color-primary-light-8), var(--el-bg-color)) no-repeat;
 		}
 	}
 	&.box-card--type3 {
 		.el-card__header {
-			background: linear-gradient(to left, var(--el-color-error-light-8), var(--el-color-white)) no-repeat;
+			background: linear-gradient(to left, var(--el-color-error-light-8), var(--el-bg-color)) no-repeat;
 		}
 	}
 }