Commit a267220e authored by 仇晓婷's avatar 仇晓婷

dd

parent 99e54afc
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
:mask-closable="false" :mask-closable="false"
:fullscreen="fullscreen" :fullscreen="fullscreen"
> >
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" :parents="parents" @on-oks="oks"/> <component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" :parents="parents" />
</Modal> </Modal>
</div> </div>
</template> </template>
...@@ -186,7 +186,6 @@ export default { ...@@ -186,7 +186,6 @@ export default {
if (this.eid > 0) { if (this.eid > 0) {
this.load(this.eid); this.load(this.eid);
} }
this.init();
}, },
methods: { methods: {
details(row) { details(row) {
...@@ -199,11 +198,9 @@ export default { ...@@ -199,11 +198,9 @@ export default {
this.modal = true; this.modal = true;
}, },
init() { init() {
Api.alltree({ id: this.parents.bomId, levelId: this.parents.id }).then( Api.alltree({ id: this.bomId, levelId: this.parents.id }).then(r => {
r => { this.treeData = r.result;
this.treeData = r.result; });
}
);
}, },
add(row) { add(row) {
this.curId = row.id; this.curId = row.id;
...@@ -227,8 +224,6 @@ export default { ...@@ -227,8 +224,6 @@ export default {
this.modal = true; this.modal = true;
}, },
edit(row) { edit(row) {
console.log(row);
this.bomId = row.upId;
this.curId = row.bomId; this.curId = row.bomId;
this.parents.id = row.levelId; this.parents.id = row.levelId;
this.parents.parentName = row.levelTitle; this.parents.parentName = row.levelTitle;
...@@ -259,6 +254,8 @@ export default { ...@@ -259,6 +254,8 @@ export default {
this.entity.version = parseInt(r.result.version); this.entity.version = parseInt(r.result.version);
this.parms.eid = r.result.productUrlList; this.parms.eid = r.result.productUrlList;
this.$emit("on-load"); this.$emit("on-load");
this.bomId = r.result.bomId;
this.init();
}); });
}, },
seeImg(url) { seeImg(url) {
...@@ -272,17 +269,9 @@ export default { ...@@ -272,17 +269,9 @@ export default {
clickData(data) { clickData(data) {
window.open(data, "_blank"); window.open(data, "_blank");
}, },
oks() {
this.parents.bomId = this.bomId;
this.init();
// this.load(this.eid);
this.modal = false;
this.curId = 0;
},
ok() { ok() {
// this.parents.bomId=this.bomId
this.init(); this.init();
// this.load(this.eid);
this.modal = false; this.modal = false;
this.curId = 0; this.curId = 0;
}, },
...@@ -299,7 +288,6 @@ export default { ...@@ -299,7 +288,6 @@ export default {
eid(v) { eid(v) {
if (v != 0) { if (v != 0) {
this.load(v); this.load(v);
this.init();
} }
} }
} }
......
...@@ -106,7 +106,7 @@ export default { ...@@ -106,7 +106,7 @@ export default {
this.disabled = false; this.disabled = false;
if (r.success) { if (r.success) {
this.$Message.success("保存成功"); this.$Message.success("保存成功");
this.$emit("on-oks"); this.$emit("on-ok");
} else { } else {
this.$Message.error("保存失败"); this.$Message.error("保存失败");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment