From 822233d6268765dcfa4f63ccc6c345df3d8bf74d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Fri, 3 Jan 2025 10:56:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/custom-module/model-custom-group/index.vue | 2 +- src/components/common/custom-module/model-icon/index.vue | 2 +- src/components/common/custom-module/model-image/index.vue | 2 -- src/components/common/custom-module/model-lines/index.vue | 2 +- src/components/common/custom-module/model-panel/index.vue | 2 +- src/components/common/custom-module/model-text/index.vue | 4 ++-- .../common/custom-module/model-text/model-text-style.vue | 5 ++++- src/components/model-custom/components/index-default.ts | 1 + 8 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/components/common/custom-module/model-custom-group/index.vue b/src/components/common/custom-module/model-custom-group/index.vue index 95231f84..b5de6a02 100644 --- a/src/components/common/custom-module/model-custom-group/index.vue +++ b/src/components/common/custom-module/model-custom-group/index.vue @@ -105,7 +105,7 @@ const is_show = computed(() => { // 获取到字段的真实数据 const field_value = custom_condition_data(condition?.field || '', option[0] || {}, props.sourceList, props.isCustom); // 判断条件字段是否为空并且是显示面板才会生效,则直接返回true - if (!isEmpty(condition.field) && !props.isDisplayPanel) { + if (!isEmpty(condition.field) && !isEmpty(condition.type) && props.isDisplayPanel) { return custom_condition_judg(field_value, condition.type, condition.value); } else { return true; diff --git a/src/components/common/custom-module/model-icon/index.vue b/src/components/common/custom-module/model-icon/index.vue index 32847ddc..bb2fe793 100644 --- a/src/components/common/custom-module/model-icon/index.vue +++ b/src/components/common/custom-module/model-icon/index.vue @@ -53,7 +53,7 @@ const is_show = computed(() => { // 获取到字段的真实数据 const field_value = custom_condition_data(condition?.field || '', option[0] || {}, props.sourceList, props.isCustom); // 判断条件字段是否为空并且是显示面板才会生效,则直接返回true - if (!isEmpty(condition.field) && !isEmpty(condition.type) && !props.isDisplayPanel) { + if (!isEmpty(condition.field) && !isEmpty(condition.type) && props.isDisplayPanel) { return custom_condition_judg(field_value, condition.type, condition.value); } else { return true; diff --git a/src/components/common/custom-module/model-image/index.vue b/src/components/common/custom-module/model-image/index.vue index 65fd7f6f..8ca78694 100644 --- a/src/components/common/custom-module/model-image/index.vue +++ b/src/components/common/custom-module/model-image/index.vue @@ -53,8 +53,6 @@ const is_show = computed(() => { const field_value = custom_condition_data(condition?.field || '', option[0] || {}, props.sourceList, props.isCustom); // 判断条件字段是否为空并且是显示面板才会生效,则直接返回true if (!isEmpty(condition.field) && !isEmpty(condition.type) && props.isDisplayPanel) { - console.log(condition, !props.isDisplayPanel); - console.log(custom_condition_judg(field_value, condition.type, condition.value)); return custom_condition_judg(field_value, condition.type, condition.value); } else { return true; diff --git a/src/components/common/custom-module/model-lines/index.vue b/src/components/common/custom-module/model-lines/index.vue index 5b9b82a9..fea5c4c3 100644 --- a/src/components/common/custom-module/model-lines/index.vue +++ b/src/components/common/custom-module/model-lines/index.vue @@ -46,7 +46,7 @@ const is_show = computed(() => { // 获取到字段的真实数据 const field_value = custom_condition_data(condition?.field || '', option[0] || {}, props.sourceList, props.isCustom); // 判断条件字段是否为空并且是显示面板才会生效,则直接返回true - if (!isEmpty(condition.field) && !props.isDisplayPanel) { + if (!isEmpty(condition.field) && !isEmpty(condition.type) && props.isDisplayPanel) { return custom_condition_judg(field_value, condition.type, condition.value); } else { return true; diff --git a/src/components/common/custom-module/model-panel/index.vue b/src/components/common/custom-module/model-panel/index.vue index 9997cd4b..36b1afc3 100644 --- a/src/components/common/custom-module/model-panel/index.vue +++ b/src/components/common/custom-module/model-panel/index.vue @@ -48,7 +48,7 @@ const is_show = computed(() => { // 获取到字段的真实数据 const field_value = custom_condition_data(condition?.field || '', option[0] || {}, props.sourceList, props.isCustom); // 判断条件字段是否为空并且是显示面板才会生效,则直接返回true - if (!isEmpty(condition.field) && !props.isDisplayPanel) { + if (!isEmpty(condition.field) && !isEmpty(condition.type) && props.isDisplayPanel) { return custom_condition_judg(field_value, condition.type, condition.value); } else { return true; diff --git a/src/components/common/custom-module/model-text/index.vue b/src/components/common/custom-module/model-text/index.vue index 274b2738..1b61c45d 100644 --- a/src/components/common/custom-module/model-text/index.vue +++ b/src/components/common/custom-module/model-text/index.vue @@ -64,7 +64,7 @@ const is_show = computed(() => { // 获取到字段的真实数据 const field_value = custom_condition_data(condition?.field || '', option[0] || {}, props.sourceList, props.isCustom); // 判断条件字段是否为空并且是显示面板才会生效,则直接返回true - if (!isEmpty(condition.field) && !props.isDisplayPanel) { + if (!isEmpty(condition.field) && !isEmpty(condition.type) && props.isDisplayPanel) { return custom_condition_judg(field_value, condition.type, condition.value); } else { return true; @@ -72,7 +72,7 @@ const is_show = computed(() => { }); const text_title = computed(() => { - return getTextTitle(form.value, props); + return (form.value?.text_captions || '') + getTextTitle(form.value, props); }); /** * 根据表单值和属性获取文本标题 diff --git a/src/components/common/custom-module/model-text/model-text-style.vue b/src/components/common/custom-module/model-text/model-text-style.vue index e8cece57..e0d35dfd 100644 --- a/src/components/common/custom-module/model-text/model-text-style.vue +++ b/src/components/common/custom-module/model-text/model-text-style.vue @@ -5,6 +5,9 @@
文本设置
+ + + @@ -155,7 +158,7 @@ const text_change = (key: string) => { if (key == '2') { form.value.text_title = ''; if (form.value.data_source_field.id.length > 0) { - form.value.data_source_field.option = props.options.filter((item) => item.type == 'text' && form.value.data_source_field.id.includes(item.field)) + form.value.data_source_field.option = props.options.filter((item) => item.type == 'text' && form.value.data_source_field.id.includes(item.field)); } else { form.value.data_source_field = { id: [], diff --git a/src/components/model-custom/components/index-default.ts b/src/components/model-custom/components/index-default.ts index 5c36335f..56848fc1 100644 --- a/src/components/model-custom/components/index-default.ts +++ b/src/components/model-custom/components/index-default.ts @@ -4,6 +4,7 @@ const text_com_data = { com_width: 150, com_height: 17, staging_height: 17, + text_captions: '', text_title: '文本', data_source_field: { id: [],