fix:工艺步骤序号自动填充
This commit is contained in:
parent
371326913e
commit
641731dceb
|
@ -320,6 +320,7 @@ const defaultForm = {
|
|||
};
|
||||
export default {
|
||||
props: {
|
||||
count: { type: Number, default : 0 },
|
||||
routepack: { type: String, default: "" },
|
||||
},
|
||||
emits: ["success", "closed"],
|
||||
|
@ -455,8 +456,14 @@ export default {
|
|||
},
|
||||
//显示
|
||||
open(mode = "add") {
|
||||
this.mode = mode;
|
||||
this.visible = true;
|
||||
let that = this;
|
||||
that.mode = mode;
|
||||
that.visible = true;
|
||||
that.$nextTick(() => {
|
||||
if(that.count){
|
||||
that.form.sort = that.count+1;
|
||||
}
|
||||
})
|
||||
return this;
|
||||
},
|
||||
//表单注入数据
|
||||
|
|
|
@ -185,6 +185,7 @@
|
|||
<save-dialog
|
||||
v-if="dialog.save"
|
||||
ref="saveDialog"
|
||||
:count = "count"
|
||||
:routepack="routepack"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialog.save = false"
|
||||
|
@ -337,6 +338,9 @@ export default {
|
|||
})
|
||||
},
|
||||
table_add() {
|
||||
let that = this;
|
||||
that.count = this.$refs.tables.total;
|
||||
console.log("count",that.count);
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("add");
|
||||
|
|
Loading…
Reference in New Issue