优化动态表单逻辑

dev
smallchill 6 years ago
parent 4cfafd538f
commit 4c1228bdd4
  1. 5
      src/views/authority/datascope.vue

@ -107,6 +107,7 @@
scopeMenuName: "菜单",
scopeLoading: false,
menu: true,
watchMode: true,
option: {
tip: false,
dialogWidth: "60%",
@ -429,6 +430,7 @@
},
methods: {
initScope() {
if (this.watchMode) {
const scopeType = this.formScope.scopeType;
let column = "-", name = "暂无";
if (scopeType === "1") {
@ -461,6 +463,7 @@
item.display = scopeType === '5';
}
});
}
},
//
rowSave(row, loading, done) {
@ -655,9 +658,11 @@
},
beforeOpenScope(done, type) {
if (["add"].includes(type)) {
this.watchMode = true;
this.initScope();
}
if (["edit", "view"].includes(type)) {
this.watchMode = false;
getMenuDataScope(this.formScope.id).then(res => {
this.formScope = res.data.data;
});

Loading…
Cancel
Save