Commit e5b85690 by liuyong

修改三个架构资产

1 parent e7a69d72
......@@ -180,10 +180,10 @@ const leftCustomGraph = function(that) {//左侧自定义图形
// that.saveLibrary(libraryName, images, null, 'ajax', undefined, undefined, undefined);
}else {
const libraryName2 = item.arciBelongName;
var xml = that.createLibraryDataFromImages([]);
var file = new LocalLibrary(that, xml, libraryName2);
that.libraryLoaded(file, []);
// const libraryName2 = item.arciBelongName;
// var xml = that.createLibraryDataFromImages([]);
// var file = new LocalLibrary(that, xml, libraryName2);
// that.libraryLoaded(file, []);
// that.saveLibrary(libraryName2, [], null, 'ajax', undefined, undefined, undefined);
}
......
......@@ -179,10 +179,10 @@ const addListPanel = function(that, originAttr, attrName_, attrValue_, controlTy
// break;
// case 1:
// const item_right_textarea = document.createElement('textarea');
// item_right_textarea.rows = "2"; // 设置显示的行数为2行
// item_right_textarea.cols = "4";
// // item_right_textarea.rows = "2"; // 设置显示的行数为2行
// // item_right_textarea.cols = "4";
// item_right_textarea.value = attrValue_;
// item_right_textarea.style.cssText = 'width: 100%;';
// item_right_textarea.style.cssText = 'width: 100%;user-select: initial !important;';
// item_right_textarea.className = 'attrValue';
// item_right_textarea.onchange = function (e) {
// const res = originAttr.find(item => item.name == attrName_);
......
......@@ -58,7 +58,7 @@
name: res.fieldName,
value: res.propertyValue,
id: res.propertyId,
controlType: 2
controlType: res.controlType,
}
)
}
......
......@@ -3954,6 +3954,7 @@ Sidebar.prototype.addPaletteFunctions = function(id, title, expanded, fns)
Sidebar.prototype.addPalette = function(id, title, expanded, onInit)
{
var elt = this.createTitle(title);
this.appendChild(elt);
var div = document.createElement('div');
......
......@@ -431,3 +431,7 @@ export function getCurrentZiChanJiaGouTable(params) {
export function getTotalZiChanJiaGouTable(params) {
return post('/network/arc-ast-tot/', params);
}
// 思维导图
export function queryMindData(params) {
return post('/network/archi-vw-detail/fdBmdTree/', params);
}
......@@ -12,17 +12,63 @@
<script>
import { MessageBox, Message } from 'element-ui';
import {
queryMindData,
} from '@/api/index.js';
export default {
name: 'Mind',
data() {
return {
jm: null
jm: null,
id: null
}
},
mounted(){
this.id = window.location.href.split("id=")[1].split("&")[0];
// this.getMindData();
// var mind = {
// /* 元数据,定义思维导图的名称、作者、版本等信息 */
// "meta":{
// "name":"jsMind-demo-tree",
// "author":"hizzgdev@163.com",
// "version":"0.2"
// },
// /* 数据格式声明 */
// "format":"node_tree",
// /* 数据内容 */
// "data": {
// "id":"root","topic":"jsMind","children": [
// ]
// }
// };
// var options = {
// container:'jsmind_container',
// editable: true,
// theme:'greensea'
// };
// this.jm = new jsMind(options);
// this.jm.show(mind);
// console.log(this.jm.get_data())
this.getMindData();
},
methods: {
getMindData() {//获取思维导图数据
const params = {
viewDetailsId: this.id
}
queryMindData(params).then(res => {
if(res.code == 200) {
if(res.data.length > 0) {
res.data.map((item, index) => {
// item['id'] = String(index);
var mind = {
/* 元数据,定义思维导图的名称、作者、版本等信息 */
"meta":{
"name":"jsMind-demo-tree",
"author":"hizzgdev@163.com",
......@@ -30,44 +76,28 @@ export default {
},
/* 数据格式声明 */
"format":"node_tree",
/* 数据内容 */
"data":{"id":"root","topic":"jsMind","children":[
{"id":"easy","topic":"Easy","direction":"left","expanded":true,"children":[
{"id":"easy1","topic":"Easy to show"},
{"id":"easy2","topic":"Easy to edit"},
{"id":"easy3","topic":"Easy to store"},
{"id":"easy4","topic":"Easy to embed"}
]},
{"id":"open","topic":"Open Source","direction":"right","expanded":false,"children":[
{"id":"open1","topic":"on GitHub"},
{"id":"open2","topic":"BSD License"}
]},
{"id":"powerful","topic":"Powerful","direction":"right","children":[
{"id":"powerful1","topic":"Base on Javascript"},
{"id":"powerful2","topic":"Base on HTML5"},
{"id":"powerful3","topic":"Depends on you"}
]},
{"id":"other","topic":"test node","direction":"left","children":[
{"id":"other1","topic":"I'm from local variable"},
{"id":"other2","topic":"I can do everything"}
]}
]}
};
// data: {width: 400, ...item}
data: item
}
console.log(mind);
var options = {
container:'jsmind_container',
editable: true,
theme:'greensea'
theme:'greensea',
support_html : true,
};
this.jm = new jsMind(options);
this.jm.show(mind);
console.log(this.jm.get_data())
})
}
}
})
},
methods: {
saveJsMind() {
saveJsMind() {//保存节点
this.jm.shoot();
},
addNode() {
addNode() {//新增节点
let selectedNode = this.jm.get_selected_node() // as parent of new node
if(!selectedNode) {
Message({
......@@ -80,7 +110,7 @@ export default {
let topic = '新节点';
this.jm.add_node(selectedNode, nodeid, topic);
},
editNode() {
editNode() {//编辑节点
let selectedId = this.get_selected_nodeid();
if(!selectedId) {
Message({
......@@ -92,7 +122,7 @@ export default {
let nodeObj = this.jm.get_node(selectedId);
this.nodeOption.content = nodeObj.topic;
},
deleteNode() {
deleteNode() {//删除节点
let selectedId = this.get_selected_nodeid();
if(!selectedId) {
Message({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!