diff --git a/src/components/StepDraggable.vue b/src/components/StepDraggable.vue index 4a63c27f..6002fb0c 100644 --- a/src/components/StepDraggable.vue +++ b/src/components/StepDraggable.vue @@ -113,8 +113,13 @@ const remove = (e) => { emit('remove', e); }; -const copyStep = (id) => { - emit('copyStep', id); +/** + * 拷贝步骤的方法 + * @param {*} id 步骤id + * @param {*} toLast 是否复制到最后一行 + */ + const copyStep = (id, toLast) => { + emit('copyStep', id, toLast); }; @@ -266,16 +271,28 @@ const copyStep = (id) => { - + - - - - + + + diff --git a/src/components/StepList.vue b/src/components/StepList.vue index 474e2b64..6732f20c 100644 --- a/src/components/StepList.vue +++ b/src/components/StepList.vue @@ -116,11 +116,12 @@ const getStepsList = () => { const runStep = () => { emit('runStep'); }; -const copyStep = (id) => { +const copyStep = (id, toLast) => { axios .get('/controller/steps/copy/steps', { params: { id, + toLast }, }) .then((resp) => { diff --git a/src/locales/lang/zh_CN.js b/src/locales/lang/zh_CN.js index 63ea9a4b..ab43b0d2 100644 --- a/src/locales/lang/zh_CN.js +++ b/src/locales/lang/zh_CN.js @@ -104,7 +104,9 @@ const steps = { loading: '加载中', loadDone: '加载完毕', loadMore: '加载更多', - + copyStepTips: '确定复制该步骤吗?点击周围空白处取消', + copyToNextLine: '复制到当前行', + copyToLastLine: '复制到最后行', }; const code = { placeholder: '请选择',