Merge remote-tracking branch 'origin/master'

This commit is contained in:
q4speed 2020-09-17 18:13:39 +08:00
commit 7ab46caa36
1 changed files with 18 additions and 0 deletions

View File

@ -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 => {