提交 7ab46caa 编写于 作者: Q q4speed

Merge remote-tracking branch 'origin/master'

......@@ -176,6 +176,12 @@
icon="el-icon-plus"
circle size="mini"
@click="handleAddStep(scope.$index, scope.row)"></el-button>
<el-button
icon="el-icon-document-copy"
type="success"
:disabled="readOnly"
circle size="mini"
@click="handleCopyStep(scope.$index, scope.row)"></el-button>
<el-button
type="danger"
icon="el-icon-delete"
......@@ -361,6 +367,18 @@ export default {
});
this.form.steps.splice(index + 1, 0, step);
},
handleCopyStep(index, data) {
let step = {};
step.num = data.num + 1;
step.desc = data.desc;
step.result = data.result;
this.form.steps.forEach(step => {
if (step.num > data.num) {
step.num++;
}
});
this.form.steps.splice(index + 1, 0, step);
},
handleDeleteStep(index, data) {
this.form.steps.splice(index, 1);
this.form.steps.forEach(step => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册