@@ -246,7 +254,7 @@ const remove = (e) => {
{
+
+
+
+
+
+
+
+
+
+
+
{
-
+
diff --git a/src/components/StepList.vue b/src/components/StepList.vue
index 6732f20c..ba997321 100644
--- a/src/components/StepList.vue
+++ b/src/components/StepList.vue
@@ -19,6 +19,8 @@ const props = defineProps({
const emit = defineEmits(['runStep']);
const dialogVisible = ref(false);
const stepId = ref(0);
+const addToTargetStepId = ref(0);
+const addToTargetStepNext = ref(false);
const parentId = ref(0);
watch(dialogVisible, (newValue, oldValue) => {
if (!newValue) {
@@ -33,12 +35,38 @@ const editStep = async (id) => {
const setParent = (id) => {
parentId.value = id;
};
+// 条件语句中的添加步骤方法
const addStep = () => {
dialogVisible.value = true;
};
+// 普通类型中的添加步骤方法
+const addStepTotarget = (id, toNext) => {
+ dialogVisible.value = true;
+ addToTargetStepId.value = id;
+ addToTargetStepNext.value = toNext
+};
const flush = () => {
- dialogVisible.value = false;
- getStepsList();
+ if (addToTargetStepId.value > 0) {
+ // 需要将新增的步骤挪动到目标行的上面或下面
+ axios
+ .get('/controller/steps/stepSortTarget', {
+ params: {
+ targetStepId: addToTargetStepId.value,
+ addToTargetNext: addToTargetStepNext.value,
+ },
+ })
+ .then((resp) => {
+ if (resp.code === 2000) {
+ dialogVisible.value = false;
+ addToTargetStepNext.value = false;
+ addToTargetStepId.value = 0;
+ getStepsList();
+ }
+ });
+ } else {
+ dialogVisible.value = false;
+ getStepsList();
+ }
};
const deleteStep = (id) => {
axios
@@ -213,5 +241,6 @@ onMounted(() => {
@editStep="editStep"
@copyStep="copyStep"
@deleteStep="deleteStep"
+ @addStepTotarget="addStepTotarget"
/>
diff --git a/src/locales/lang/zh_CN.js b/src/locales/lang/zh_CN.js
index ab43b0d2..1e169ce2 100644
--- a/src/locales/lang/zh_CN.js
+++ b/src/locales/lang/zh_CN.js
@@ -107,6 +107,9 @@ const steps = {
copyStepTips: '确定复制该步骤吗?点击周围空白处取消',
copyToNextLine: '复制到当前行',
copyToLastLine: '复制到最后行',
+ addStepTips: '选择添加步骤的位置,点击周围空白处取消',
+ addToNextLine: '添加到下一行',
+ addToBeforeLine: '添加到上一行',
};
const code = {
placeholder: '请选择',
From 9798895dc41e29c244a148376e157a1c106fc0fd Mon Sep 17 00:00:00 2001
From: caofengbin <1050430934@qq.com>
Date: Mon, 4 Sep 2023 14:55:34 +0800
Subject: [PATCH 3/4] =?UTF-8?q?=E5=85=AC=E5=85=B1=E6=AD=A5=E9=AA=A4?=
=?UTF-8?q?=E7=9A=84=E5=9C=BA=E6=99=AF=E4=B8=8B=EF=BC=8C=E5=B1=8F=E8=94=BD?=
=?UTF-8?q?=E6=8E=89=E6=96=B0=E5=A2=9E=E7=9A=84=E4=B8=A4=E4=B8=AA=E5=85=A5?=
=?UTF-8?q?=E5=8F=A3=E7=B1=BB=E5=9E=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/StepDraggable.vue | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/components/StepDraggable.vue b/src/components/StepDraggable.vue
index f9755444..f6c3c3d2 100644
--- a/src/components/StepDraggable.vue
+++ b/src/components/StepDraggable.vue
@@ -282,7 +282,7 @@ const remove = (e) => {
{
Date: Mon, 4 Sep 2023 15:51:42 +0800
Subject: [PATCH 4/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=8B=B1=E6=96=87?=
=?UTF-8?q?=EF=BC=8C=E6=97=A5=E8=AF=AD=EF=BC=8C=E7=B9=81=E4=BD=93=E4=B8=AD?=
=?UTF-8?q?=E6=96=87=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E4=B8=AD=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E7=9A=84key?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/locales/lang/en_US.js | 6 ++++++
src/locales/lang/ja_JP.js | 6 ++++++
src/locales/lang/zh_TW.js | 6 ++++++
3 files changed, 18 insertions(+)
diff --git a/src/locales/lang/en_US.js b/src/locales/lang/en_US.js
index c182ffbc..98090951 100644
--- a/src/locales/lang/en_US.js
+++ b/src/locales/lang/en_US.js
@@ -109,6 +109,12 @@ const steps = {
loading: 'Loading',
loadDone: 'Load completed',
loadMore: 'Load more',
+ copyStepTips: 'Are you sure you want to replicate this step? Click on the surrounding space to cancel',
+ copyToNextLine: 'copy to current line',
+ copyToLastLine: 'copy to last line',
+ addStepTips: 'Select the location to add the step and click on the surrounding space to cancel.',
+ addToNextLine: 'add to next line',
+ addToBeforeLine: 'add to previous line',
};
const code = {
placeholder: 'Please choose language',
diff --git a/src/locales/lang/ja_JP.js b/src/locales/lang/ja_JP.js
index f9cafbd7..5b8c2edd 100644
--- a/src/locales/lang/ja_JP.js
+++ b/src/locales/lang/ja_JP.js
@@ -104,6 +104,12 @@ const steps = {
loading: '加载中',
loadDone: '加载完毕',
loadMore: '加载更多',
+ copyStepTips: '确定复制该步骤吗?点击周围空白处取消',
+ copyToNextLine: '复制到当前行',
+ copyToLastLine: '复制到最后行',
+ addStepTips: '选择添加步骤的位置,点击周围空白处取消',
+ addToNextLine: '添加到下一行',
+ addToBeforeLine: '添加到上一行',
};
const code = {
placeholder: '请选择',
diff --git a/src/locales/lang/zh_TW.js b/src/locales/lang/zh_TW.js
index f287e719..141fc42a 100644
--- a/src/locales/lang/zh_TW.js
+++ b/src/locales/lang/zh_TW.js
@@ -104,6 +104,12 @@ const steps = {
loading: '加载中',
loadDone: '加载完毕',
loadMore: '加载更多',
+ copyStepTips: '确定复制该步骤吗?点击周围空白处取消',
+ copyToNextLine: '复制到当前行',
+ copyToLastLine: '复制到最后行',
+ addStepTips: '选择添加步骤的位置,点击周围空白处取消',
+ addToNextLine: '添加到下一行',
+ addToBeforeLine: '添加到上一行',
};
const code = {
placeholder: '请选择',