Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
liangzhen
/
framework-tools-web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e5b85690
authored
Feb 19, 2024
by
liuyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改三个架构资产
1 parent
e7a69d72
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
90 additions
and
55 deletions
public/drawio/extention/js/exApp.js
public/drawio/extention/js/exFormat.js
public/drawio/extention/js/exGraph.js
public/drawio/js/grapheditor/Sidebar.js
src/api/index.js
src/views/archi-view-manage/mind/index.vue
public/drawio/extention/js/exApp.js
View file @
e5b8569
...
@@ -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);
}
}
...
...
public/drawio/extention/js/exFormat.js
View file @
e5b8569
...
@@ -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_);
...
...
public/drawio/extention/js/exGraph.js
View file @
e5b8569
...
@@ -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
,
}
}
)
)
}
}
...
...
public/drawio/js/grapheditor/Sidebar.js
View file @
e5b8569
...
@@ -3954,8 +3954,9 @@ Sidebar.prototype.addPaletteFunctions = function(id, title, expanded, fns)
...
@@ -3954,8 +3954,9 @@ 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'
);
div
.
className
=
'geSidebar'
;
div
.
className
=
'geSidebar'
;
...
...
src/api/index.js
View file @
e5b8569
...
@@ -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
);
}
src/views/archi-view-manage/mind/index.vue
View file @
e5b8569
...
@@ -12,62 +12,92 @@
...
@@ -12,62 +12,92 @@
<
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
(){
var
mind
=
{
this
.
id
=
window
.
location
.
href
.
split
(
"id="
)[
1
].
split
(
"&"
)[
0
];
/* 元数据,定义思维导图的名称、作者、版本等信息 */
// this.getMindData();
"meta"
:{
"name"
:
"jsMind-demo-tree"
,
// var mind = {
"author"
:
"hizzgdev@163.com"
,
// /* 元数据,定义思维导图的名称、作者、版本等信息 */
"version"
:
"0.2"
// "meta":{
},
// "name":"jsMind-demo-tree",
/* 数据格式声明 */
// "author":"hizzgdev@163.com",
"format"
:
"node_tree"
,
// "version":"0.2"
/* 数据内容 */
// },
"data"
:{
"id"
:
"root"
,
"topic"
:
"jsMind"
,
"children"
:[
// /* 数据格式声明 */
{
"id"
:
"easy"
,
"topic"
:
"Easy"
,
"direction"
:
"left"
,
"expanded"
:
true
,
"children"
:[
// "format":"node_tree",
{
"id"
:
"easy1"
,
"topic"
:
"Easy to show"
},
// /* 数据内容 */
{
"id"
:
"easy2"
,
"topic"
:
"Easy to edit"
},
// "data": {
{
"id"
:
"easy3"
,
"topic"
:
"Easy to store"
},
// "id":"root","topic":"jsMind","children": [
{
"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"
}
]},
// var options = {
{
"id"
:
"powerful"
,
"topic"
:
"Powerful"
,
"direction"
:
"right"
,
"children"
:[
// container:'jsmind_container',
{
"id"
:
"powerful1"
,
"topic"
:
"Base on Javascript"
},
// editable: true,
{
"id"
:
"powerful2"
,
"topic"
:
"Base on HTML5"
},
// theme:'greensea'
{
"id"
:
"powerful3"
,
"topic"
:
"Depends on you"
}
// };
]},
{
"id"
:
"other"
,
"topic"
:
"test node"
,
"direction"
:
"left"
,
"children"
:[
// this.jm = new jsMind(options);
{
"id"
:
"other1"
,
"topic"
:
"I'm from local variable"
},
// this.jm.show(mind);
{
"id"
:
"other2"
,
"topic"
:
"I can do everything"
}
// console.log(this.jm.get_data())
]}
]}
};
var
options
=
{
container
:
'jsmind_container'
,
editable
:
true
,
theme
:
'greensea'
};
this
.
jm
=
new
jsMind
(
options
);
this
.
jm
.
show
(
mind
);
this
.
getMindData
();
console
.
log
(
this
.
jm
.
get_data
())
},
},
methods
:
{
methods
:
{
saveJsMind
()
{
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"
,
"version"
:
"0.2"
},
/* 数据格式声明 */
"format"
:
"node_tree"
,
// data: {width: 400, ...item}
data
:
item
}
console
.
log
(
mind
);
var
options
=
{
container
:
'jsmind_container'
,
editable
:
true
,
theme
:
'greensea'
,
support_html
:
true
,
};
this
.
jm
=
new
jsMind
(
options
);
this
.
jm
.
show
(
mind
);
})
}
}
})
},
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
({
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment