Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
7ab46caa36
|
@ -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 => {
|
||||
|
|
Loading…
Reference in New Issue