Commit 379ee7f3 by liuyong

修改资产管理

1 parent d991924a
...@@ -3764,6 +3764,12 @@ App.prototype.showSplash = function(force) ...@@ -3764,6 +3764,12 @@ App.prototype.showSplash = function(force)
this.showSplash(); this.showSplash();
})); }));
}else if (urlParams['id']) {//二次开发,初始化画面内容 }else if (urlParams['id']) {//二次开发,初始化画面内容
if(urlParams['id'] == 2) {
var mockFile = loadDiagram(urlParams['id'],'业务架构资产管理');
const file = new LocalFile(this, mockFile.data, mockFile.title, this.mode);
this.loadFile(`-2`, true, file);
}else {
$.ajax({ $.ajax({
method: "post", method: "post",
url: 'http://43.143.211.42:7003/ynMol/getByMetaModelId', url: 'http://43.143.211.42:7003/ynMol/getByMetaModelId',
...@@ -3785,6 +3791,7 @@ App.prototype.showSplash = function(force) ...@@ -3785,6 +3791,7 @@ App.prototype.showSplash = function(force)
} }
}); });
}
}else if (!mxClient.IS_CHROMEAPP && (this.mode == null || force)) }else if (!mxClient.IS_CHROMEAPP && (this.mode == null || force))
{ {
var rowLimit = (serviceCount == 4) ? 2 : 3; var rowLimit = (serviceCount == 4) ? 2 : 3;
......
...@@ -2029,6 +2029,7 @@ ...@@ -2029,6 +2029,7 @@
if (format == 'svg') if (format == 'svg')
{ {
var bg = this.editor.graph.background; var bg = this.editor.graph.background;
if (transparent || bg == mxConstants.NONE) if (transparent || bg == mxConstants.NONE)
...@@ -2055,6 +2056,7 @@ ...@@ -2055,6 +2056,7 @@
} }
else else
{ {
filename = basename + '.svg'; filename = basename + '.svg';
svg = this.getFileData(false, true, null, mxUtils.bind(this, function(svg) svg = this.getFileData(false, true, null, mxUtils.bind(this, function(svg)
...@@ -5638,13 +5640,14 @@ ...@@ -5638,13 +5640,14 @@
bg = (theme == 'dark' && !Editor.enableSvgDarkMode) ? Editor.darkColor : '#ffffff'; bg = (theme == 'dark' && !Editor.enableSvgDarkMode) ? Editor.darkColor : '#ffffff';
} }
//二次开发,保存的时候保存为svg格式
// Sets or disables alternate text for foreignObjects. Disabling is needed // Sets or disables alternate text for foreignObjects. Disabling is needed
// because PhantomJS seems to ignore switch statements and paint all text. // because PhantomJS seems to ignore switch statements and paint all text.
var svgRoot = this.editor.graph.getSvg(bg, scale, border, noCrop, null, var svgRoot = this.editor.graph.getSvg(bg, scale, border, noCrop, null,
ignoreSelection, null, null, (linkTarget == 'blank') ? '_blank' : ignoreSelection, null, null, (linkTarget == 'blank') ? '_blank' :
((linkTarget == 'self') ? '_top' : null), null, !embedFonts, ((linkTarget == 'self') ? '_top' : null), null, !embedFonts,
theme, exportType); theme, exportType);
// console.log(svgRoot)
if (addShadow) if (addShadow)
{ {
this.editor.graph.addSvgShadow(svgRoot); this.editor.graph.addSvgShadow(svgRoot);
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
watch: { watch: {
initGraphId: { initGraphId: {
handler(newVal, oldVal) { handler(newVal, oldVal) {
// console.log(newVal)
this.id = newVal.id; this.id = newVal.id;
this.version = newVal.version; this.version = newVal.version;
this.state = newVal.state; this.state = newVal.state;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</el-tree> </el-tree>
</div> </div>
<div class="right_container"> <div class="right_container">
<Drawio initGraphId="2"></Drawio> <Drawio :initGraphId="routerId"></Drawio>
</div> </div>
</div> </div>
</template> </template>
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
}, },
data() { data() {
return { return {
routerId: null,
filterText: '', filterText: '',
treeData: [ treeData: [
{ {
...@@ -87,6 +88,16 @@ ...@@ -87,6 +88,16 @@
] ]
}; };
}, },
mounted(){
const id = 2;
// const version = window.location.href.split("id=")[1].split("&")[1].split("=")[1];
// const state = window.location.href.split("id=")[1].split("&")[2].split("=")[1];
this.routerId = {
id: id,
version: 0,
state: 0
}
},
methods: { methods: {
filterNode(value, data) { filterNode(value, data) {
if (!value) return true; if (!value) return true;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!