Commit e5b85690 by liuyong

修改三个架构资产

1 parent e7a69d72
...@@ -180,10 +180,10 @@ const leftCustomGraph = function(that) {//左侧自定义图形 ...@@ -180,10 +180,10 @@ const leftCustomGraph = function(that) {//左侧自定义图形
// that.saveLibrary(libraryName, images, null, 'ajax', undefined, undefined, undefined); // that.saveLibrary(libraryName, images, null, 'ajax', undefined, undefined, undefined);
}else { }else {
const libraryName2 = item.arciBelongName; // const libraryName2 = item.arciBelongName;
var xml = that.createLibraryDataFromImages([]); // var xml = that.createLibraryDataFromImages([]);
var file = new LocalLibrary(that, xml, libraryName2); // var file = new LocalLibrary(that, xml, libraryName2);
that.libraryLoaded(file, []); // that.libraryLoaded(file, []);
// that.saveLibrary(libraryName2, [], null, 'ajax', undefined, undefined, undefined); // that.saveLibrary(libraryName2, [], null, 'ajax', undefined, undefined, undefined);
} }
......
...@@ -179,10 +179,10 @@ const addListPanel = function(that, originAttr, attrName_, attrValue_, controlTy ...@@ -179,10 +179,10 @@ const addListPanel = function(that, originAttr, attrName_, attrValue_, controlTy
// break; // break;
// case 1: // case 1:
// const item_right_textarea = document.createElement('textarea'); // const item_right_textarea = document.createElement('textarea');
// item_right_textarea.rows = "2"; // 设置显示的行数为2行 // // item_right_textarea.rows = "2"; // 设置显示的行数为2行
// item_right_textarea.cols = "4"; // // item_right_textarea.cols = "4";
// item_right_textarea.value = attrValue_; // 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.className = 'attrValue';
// item_right_textarea.onchange = function (e) { // item_right_textarea.onchange = function (e) {
// const res = originAttr.find(item => item.name == attrName_); // const res = originAttr.find(item => item.name == attrName_);
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
name: res.fieldName, name: res.fieldName,
value: res.propertyValue, value: res.propertyValue,
id: res.propertyId, id: res.propertyId,
controlType: 2 controlType: res.controlType,
} }
) )
} }
......
...@@ -3954,6 +3954,7 @@ Sidebar.prototype.addPaletteFunctions = function(id, title, expanded, fns) ...@@ -3954,6 +3954,7 @@ Sidebar.prototype.addPaletteFunctions = function(id, title, expanded, fns)
Sidebar.prototype.addPalette = function(id, title, expanded, onInit) Sidebar.prototype.addPalette = function(id, title, expanded, onInit)
{ {
var elt = this.createTitle(title); var elt = this.createTitle(title);
this.appendChild(elt); this.appendChild(elt);
var div = document.createElement('div'); var div = document.createElement('div');
......
...@@ -431,3 +431,7 @@ export function getCurrentZiChanJiaGouTable(params) { ...@@ -431,3 +431,7 @@ export function getCurrentZiChanJiaGouTable(params) {
export function getTotalZiChanJiaGouTable(params) { export function getTotalZiChanJiaGouTable(params) {
return post('/network/arc-ast-tot/', params); return post('/network/arc-ast-tot/', params);
} }
// 思维导图
export function queryMindData(params) {
return post('/network/archi-vw-detail/fdBmdTree/', params);
}
...@@ -12,17 +12,63 @@ ...@@ -12,17 +12,63 @@
<script> <script>
import { MessageBox, Message } from 'element-ui'; import { MessageBox, Message } from 'element-ui';
import {
queryMindData,
} from '@/api/index.js';
export default { export default {
name: 'Mind', name: 'Mind',
data() { data() {
return { return {
jm: null jm: null,
id: null
} }
}, },
mounted(){ 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 = { var mind = {
/* 元数据,定义思维导图的名称、作者、版本等信息 */
"meta":{ "meta":{
"name":"jsMind-demo-tree", "name":"jsMind-demo-tree",
"author":"hizzgdev@163.com", "author":"hizzgdev@163.com",
...@@ -30,44 +76,28 @@ export default { ...@@ -30,44 +76,28 @@ export default {
}, },
/* 数据格式声明 */ /* 数据格式声明 */
"format":"node_tree", "format":"node_tree",
/* 数据内容 */ // data: {width: 400, ...item}
"data":{"id":"root","topic":"jsMind","children":[ data: item
{"id":"easy","topic":"Easy","direction":"left","expanded":true,"children":[ }
{"id":"easy1","topic":"Easy to show"}, console.log(mind);
{"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"}
]}
]}
};
var options = { var options = {
container:'jsmind_container', container:'jsmind_container',
editable: true, editable: true,
theme:'greensea' theme:'greensea',
support_html : true,
}; };
this.jm = new jsMind(options); this.jm = new jsMind(options);
this.jm.show(mind); this.jm.show(mind);
console.log(this.jm.get_data()) })
}
}
})
}, },
methods: { saveJsMind() {//保存节点
saveJsMind() {
this.jm.shoot(); this.jm.shoot();
}, },
addNode() { addNode() {//新增节点
let selectedNode = this.jm.get_selected_node() // as parent of new node let selectedNode = this.jm.get_selected_node() // as parent of new node
if(!selectedNode) { if(!selectedNode) {
Message({ Message({
...@@ -80,7 +110,7 @@ export default { ...@@ -80,7 +110,7 @@ export default {
let topic = '新节点'; let topic = '新节点';
this.jm.add_node(selectedNode, nodeid, topic); this.jm.add_node(selectedNode, nodeid, topic);
}, },
editNode() { editNode() {//编辑节点
let selectedId = this.get_selected_nodeid(); let selectedId = this.get_selected_nodeid();
if(!selectedId) { if(!selectedId) {
Message({ Message({
...@@ -92,7 +122,7 @@ export default { ...@@ -92,7 +122,7 @@ export default {
let nodeObj = this.jm.get_node(selectedId); let nodeObj = this.jm.get_node(selectedId);
this.nodeOption.content = nodeObj.topic; this.nodeOption.content = nodeObj.topic;
}, },
deleteNode() { deleteNode() {//删除节点
let selectedId = this.get_selected_nodeid(); let selectedId = this.get_selected_nodeid();
if(!selectedId) { if(!selectedId) {
Message({ Message({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!