Commit fb95f916 by liuyong

修改bug

1 parent 04c54b6b
...@@ -106,7 +106,7 @@ function propertyTransferMenuAction(editorUi, graph) {//属性传递按钮点击 ...@@ -106,7 +106,7 @@ function propertyTransferMenuAction(editorUi, graph) {//属性传递按钮点击
if (!graph.isSelectionEmpty()) if (!graph.isSelectionEmpty())
{ {
var cells = graph.getSelectionCells(); var cells = graph.getSelectionCells();
window.parent.postMessage({ type: 'propertyTransfer' } , '*'); window.parent.postMessage({ type: 'propertyConnect' } , '*');
// graph.setCellStyles('property', '属性', [cells[0]]);//设置style里面拼接属性 // graph.setCellStyles('property', '属性', [cells[0]]);//设置style里面拼接属性
......
...@@ -144,11 +144,45 @@ ...@@ -144,11 +144,45 @@
this.saveAttribute(e.data.data); this.saveAttribute(e.data.data);
} }
if(e.data.type == 'propertyTransfer'){ if(e.data.type == 'propertyConnect'){
// console.log(JSON.parse(e.data.data)) // console.log(JSON.parse(e.data.data))
this.graph_dialog = true; this.graph_dialog = true;
this.showCurrentGraph(this.search_select1[0].arciBelongName, 0); this.showCurrentGraph(this.search_select1[0].arciBelongName, 0);
} }
if(e.data.type == 'saveFileSignalXml') {
MessageBox.confirm('确定保存文件?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
customClass: 'messageClass',
confirmButtonClass: 'confirmClass',
type: 'warning'
}).then(() => {
const params = {
viewDetailsId: id,
metaModelData: e.data.data.mxGraphModel,
metaModelSvg: e.data.data.base64SvgToString
}
saveArchiViewManageCardDetails(params).then(res => {
if(res.code == 200) {
Message({
type: 'success',
message: '保存成功!',
});
}else {
Message({
type: 'error',
message: res.msg
});
}
})
}).catch(() => {
Message({
type: 'info',
message: '已取消'
});
});
}
} }
}, },
methods: { methods: {
......
...@@ -55,42 +55,6 @@ export default { ...@@ -55,42 +55,6 @@ export default {
}, },
mounted(){ mounted(){
this.id = this.$route.query.id; this.id = this.$route.query.id;
window.onmessage = e => {
if(e.data.type == 'saveFileSignalXml') {
MessageBox.confirm('确定保存文件?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
customClass: 'messageClass',
confirmButtonClass: 'confirmClass',
type: 'warning'
}).then(() => {
const params = {
viewDetailsId: this.id,
metaModelData: e.data.data.mxGraphModel,
metaModelSvg: e.data.data.base64SvgToString
}
saveArchiViewManageCardDetails(params).then(res => {
if(res.code == 200) {
Message({
type: 'success',
message: '保存成功!',
});
}else {
Message({
type: 'error',
message: res.msg
});
}
})
}).catch(() => {
Message({
type: 'info',
message: '已取消'
});
});
}
}
}, },
methods: { methods: {
lookList() { lookList() {
......
...@@ -118,10 +118,44 @@ ...@@ -118,10 +118,44 @@
this.saveAttribute(e.data.data); this.saveAttribute(e.data.data);
} }
if(e.data.type == 'propertyTransfer'){ if(e.data.type == 'propertyConnect'){
this.graph_dialog = true; this.graph_dialog = true;
this.showCurrentGraph(this.search_select1[0].arciBelongName, 0); this.showCurrentGraph(this.search_select1[0].arciBelongName, 0);
} }
if(e.data.type == 'saveFileSignalXml') {
MessageBox.confirm('确定保存文件?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
customClass: 'messageClass',
confirmButtonClass: 'confirmClass',
type: 'warning'
}).then(() => {
const params = {
metaModelId: id,
metaModelData: e.data.data.mxGraphModel,
metaModelSvg: e.data.data.base64SvgToString
}
save_drawio_xml_and_svg(params).then(res => {
if(res.code == 200) {
Message({
type: 'success',
message: '保存成功!',
});
}else {
Message({
type: 'error',
message: res.msg
});
}
})
}).catch(() => {
Message({
type: 'info',
message: '已取消'
});
});
}
} }
}, },
methods: { methods: {
......
...@@ -63,42 +63,6 @@ export default { ...@@ -63,42 +63,6 @@ export default {
mounted(){ mounted(){
this.id = this.$route.query.id; this.id = this.$route.query.id;
this.version = this.$route.query.info; this.version = this.$route.query.info;
window.onmessage = e => {
if(e.data.type == 'saveFileSignalXml') {
MessageBox.confirm('确定保存文件?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
customClass: 'messageClass',
confirmButtonClass: 'confirmClass',
type: 'warning'
}).then(() => {
const params = {
metaModelId: this.id,
metaModelData: e.data.data.mxGraphModel,
metaModelSvg: e.data.data.base64SvgToString
}
save_drawio_xml_and_svg(params).then(res => {
if(res.code == 200) {
Message({
type: 'success',
message: '保存成功!',
});
}else {
Message({
type: 'error',
message: res.msg
});
}
})
}).catch(() => {
Message({
type: 'info',
message: '已取消'
});
});
}
}
}, },
methods: { methods: {
saveFile() { saveFile() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!