From e4c9808aa731fc7afd88b280ba09ae8559196949 Mon Sep 17 00:00:00 2001
From: v_xugzhou <941071842@qq.com>
Date: Mon, 14 Oct 2024 15:07:07 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B0=83=E8=AF=95=E4=BB=BB=E5=8A=A1?=
=?UTF-8?q?=E7=9B=B8=E5=85=B3=E4=BA=A4=E4=BA=92=E4=BC=98=E5=8C=96=E6=96=B9?=
=?UTF-8?q?=E6=A1=88=20--story=3D119022030=20#=20Reviewed,=20transaction?=
=?UTF-8?q?=20id:=2021232?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../common/RenderForm/formMixins.js | 4 +-
frontend/src/config/i18n/cn.js | 13 +-
frontend/src/config/i18n/en.js | 13 +-
.../views/template/TemplateMock/Header.vue | 51 ++-
.../MockExecute/components/DiffDialog.vue | 146 ++++++++
.../MockExecute/components/MockRecode.vue | 338 ++++++++++++++++++
.../TemplateMock/MockExecute/index.vue | 223 +++++++-----
.../src/views/template/TemplateMock/index.vue | 14 +-
8 files changed, 700 insertions(+), 102 deletions(-)
create mode 100644 frontend/src/views/template/TemplateMock/MockExecute/components/DiffDialog.vue
create mode 100644 frontend/src/views/template/TemplateMock/MockExecute/components/MockRecode.vue
diff --git a/frontend/src/components/common/RenderForm/formMixins.js b/frontend/src/components/common/RenderForm/formMixins.js
index a8f37ec..69be3ff 100644
--- a/frontend/src/components/common/RenderForm/formMixins.js
+++ b/frontend/src/components/common/RenderForm/formMixins.js
@@ -229,7 +229,9 @@ export const getFormMixins = (attrs = {}) => {
let valueEmpty = false;
if (valueType === 'Object') {
valueEmpty = !Object.keys(value).length;
- } else if (valueType === 'String' || valueType === 'Array') {
+ } else if (valueType === 'Array') {
+ valueEmpty = !value.filter(item => item).length;
+ } else if (valueType === 'String') {
valueEmpty = !value.length;
} else if (valueType === 'Number') {
valueEmpty = !value.toString();
diff --git a/frontend/src/config/i18n/cn.js b/frontend/src/config/i18n/cn.js
index c483898..74c06fc 100644
--- a/frontend/src/config/i18n/cn.js
+++ b/frontend/src/config/i18n/cn.js
@@ -373,7 +373,7 @@ const cn = {
关联流程: '关联流程',
描述: '描述',
规则配置: '规则配置',
- 需保证有且仅有一条规则被命中: '需保证有且仅有一条规则被命中',
+ 'Unique:需保证有且仅有一条规则被命中': 'Unique:需保证有且仅有一条规则被命中',
'该决策表已被流程中的节点引用,仅支持修改规则,不支持修改字段(修改字段需要修改节点引用后重新保存流程)。': '该决策表已被流程中的节点引用,仅支持修改规则,不支持修改字段(修改字段需要修改节点引用后重新保存流程)。',
'{0}成功': '{0}成功',
新建: '新建',
@@ -908,6 +908,17 @@ const cn = {
天: '天 | {n} 天 | {n} 天',
新建全局变量: '新建全局变量',
error_handle_秒: '秒',
+ 流程的入参: '流程的入参',
+ scopeType: '指对应资源在接入平台所属的作用域范围的类型。如该资源属于业务 1,则该字段的值可设为"project"。',
+ scopeValue: '指对应资源在接入平台所属的作用域范围的值。如该资源属于业务1,则该字段的值可设为"1"。',
+ 名字: '名字',
+ mockReuseTips: '部分变量、Mock 方案已发生变化,继续操作将{0}以下不匹配的数据:',
+ 忽略: '忽略',
+ 继续复用: '继续复用',
+ '调试数据已发生变化,请确认是否继续复用': '调试数据已发生变化,请确认是否继续复用',
+ 当前调试任务: '当前调试任务',
+ 待复用调试任务: '待复用调试任务',
+ 复用成功: '复用成功',
};
export default cn;
diff --git a/frontend/src/config/i18n/en.js b/frontend/src/config/i18n/en.js
index f5fc7b0..30ffaa8 100644
--- a/frontend/src/config/i18n/en.js
+++ b/frontend/src/config/i18n/en.js
@@ -373,7 +373,7 @@ const en = {
关联流程: 'Related Process',
描述: 'Description',
规则配置: 'Rule Configuration',
- 需保证有且仅有一条规则被命中: 'Ensure that one and only one rule is hit',
+ 'Unique:需保证有且仅有一条规则被命中': 'Unique: Ensure that one and only one rule is hit',
'该决策表已被流程中的节点引用,仅支持修改规则,不支持修改字段(修改字段需要修改节点引用后重新保存流程)。': 'This decision table is referenced by a node in a process. Only rule modifications are supported, not field modifications (field modifications require updating the node references and saving the process again).',
'{0}成功': '{0} Successful',
新建: 'Add',
@@ -908,6 +908,17 @@ const en = {
天: 'Day | one day | {n} days',
新建全局变量: 'Add Global Variables',
error_handle_秒: 'Sec Interval',
+ 流程的入参: 'Input Parameters of the Process',
+ scopeType: 'Indicates the type of the scope to which the corresponding resource belongs in the access platform. For example, if the resource belongs to Business 1, the value of this field can be set to "project".',
+ scopeValue: 'Indicates the value of the scope to which the corresponding resource belongs in the access platform. For example, if the resource belongs to Business 1, the value of this field can be set to "1".',
+ 名字: 'Name',
+ mockReuseTips: 'Some variables and Mock schemes have changed. Continuing will {0} the following mismatched data:',
+ 忽略: 'ignore',
+ 继续复用: 'Continue Reuse',
+ '调试数据已发生变化,请确认是否继续复用': 'Debug data has changed, please confirm whether to continue reusing',
+ 当前调试任务: 'Current Debug Task',
+ 待复用调试任务: 'Pending Reuse Debug Task',
+ 复用成功: 'Reuse success',
};
export default en;
diff --git a/frontend/src/views/template/TemplateMock/Header.vue b/frontend/src/views/template/TemplateMock/Header.vue
index af70c5e..cd1809d 100644
--- a/frontend/src/views/template/TemplateMock/Header.vue
+++ b/frontend/src/views/template/TemplateMock/Header.vue
@@ -5,7 +5,21 @@
class="bk-icon icon-arrows-left back-icon"
@click="onCancelMock" />
{{ mockStep === 'setting' ? $t('流程调试') : $t('调试执行') }}
- {{ headerLabel }}
+ {{ name }}
+
+
- {{ $t('填写调试入参') }} -
-- {{ $t('选择 Mock 数据') }} -
- -- - {{ unMockExpend ? $t('收起未设置 Mock数据 的节点') : $t('显示未设置 Mock数据 的节点') }} +
+ {{ $t('填写调试入参') }} +
++ {{ $t('选择 Mock 数据') }}
-+ + {{ unMockExpend ? $t('收起未设置 Mock数据 的节点') : $t('显示未设置 Mock数据 的节点') }} +
+