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 bb5c1e3e
authored
Apr 25, 2024
by
史敦盼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
1 parent
1c4be59f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
24 deletions
public/drawio/extention/js/exFormat.js
public/drawio/extention/js/exSideBar.js
public/drawio/extention/js/exFormat.js
View file @
bb5c1e3
...
@@ -97,8 +97,8 @@ const initAttributePanel = function(that) {
...
@@ -97,8 +97,8 @@ const initAttributePanel = function(that) {
propertyList
.
forEach
((
item
)
=>
{
propertyList
.
forEach
((
item
)
=>
{
fieldsValue
.
push
({
fieldsValue
.
push
({
id
:
item
.
propertyId
,
id
:
item
.
propertyId
,
cnName
:
item
.
cnName
,
cnName
:
item
.
cnName
||
item
.
name
,
value_
:
item
.
value_
,
value_
:
item
.
value_
||
item
.
value
,
controlType
:
item
.
controlType
,
controlType
:
item
.
controlType
,
dictKey
:
item
.
dictKey
?
item
.
dictKey
:
null
,
dictKey
:
item
.
dictKey
?
item
.
dictKey
:
null
,
})
})
...
@@ -258,6 +258,7 @@ const initAttributePanel = function(that) {
...
@@ -258,6 +258,7 @@ const initAttributePanel = function(that) {
const
baseEleStyle
=
'width: 100%;background: #ffffff;'
;
const
baseEleStyle
=
'width: 100%;background: #ffffff;'
;
// 上级元素
// 上级元素
const
valueSelect2
=
document
.
createElement
(
'select'
);
const
valueSelect2
=
document
.
createElement
(
'select'
);
valueSelect2
.
id
=
"parentElement"
switch
(
name
)
{
switch
(
name
)
{
case
'资产名称'
:
case
'资产名称'
:
const
valueInput
=
document
.
createElement
(
'input'
);
const
valueInput
=
document
.
createElement
(
'input'
);
...
@@ -467,6 +468,7 @@ const addListPanel = function(that, originAttr, attrName_, attrValue_, controlTy
...
@@ -467,6 +468,7 @@ const addListPanel = function(that, originAttr, attrName_, attrValue_, controlTy
case
2
:
case
2
:
const
item_right_select
=
document
.
createElement
(
'select'
);
const
item_right_select
=
document
.
createElement
(
'select'
);
item_right_select
.
value
=
attrValue_
;
item_right_select
.
value
=
attrValue_
;
// item_right_select.text =
// item_right_select.text =
item_right_select
.
style
.
cssText
=
'width: 100%;background: #ffffff;'
;
item_right_select
.
style
.
cssText
=
'width: 100%;background: #ffffff;'
;
$
.
ajax
({
$
.
ajax
({
...
@@ -487,6 +489,9 @@ const addListPanel = function(that, originAttr, attrName_, attrValue_, controlTy
...
@@ -487,6 +489,9 @@ const addListPanel = function(that, originAttr, attrName_, attrValue_, controlTy
item_right_select
[
'options'
][
i
].
selected
=
true
item_right_select
[
'options'
][
i
].
selected
=
true
}
}
})
})
if
(
!
attrValue_
)
{
item_right_select
.
selectedIndex
=
-
1
}
}
}
// console.log('result', res)
// console.log('result', res)
},
},
...
...
public/drawio/extention/js/exSideBar.js
View file @
bb5c1e3
...
@@ -46,14 +46,14 @@
...
@@ -46,14 +46,14 @@
)
{
)
{
eleDtos
.
forEach
((
item
)
=>
{
eleDtos
.
forEach
((
item
)
=>
{
if
(
item
.
assets
&&
item
.
assets
.
length
)
{
if
(
item
.
assets
&&
item
.
assets
.
length
)
{
let
_attrs
=
(
item
.
dicys
||
[]).
map
((
val
)
=>
{
//
let _attrs = (item.dicys || []).map((val) => {
return
{
//
return {
name
:
val
.
cnName
,
//
name: val.cnName,
value
:
val
.
propertyValue
,
//
value: val.propertyValue,
id
:
val
.
propertyId
,
//
id: val.propertyId,
controlType
:
val
.
controlType
,
//
controlType: val.controlType,
};
//
};
});
//
});
total
=
item
.
eleByAssetTotal
||
0
;
total
=
item
.
eleByAssetTotal
||
0
;
console
.
error
(
"createEXSideBarItems===eleByAssetTotal======>"
,
total
);
console
.
error
(
"createEXSideBarItems===eleByAssetTotal======>"
,
total
);
let
fns
=
item
.
assets
.
map
((
val
)
=>
{
let
fns
=
item
.
assets
.
map
((
val
)
=>
{
...
@@ -99,9 +99,7 @@
...
@@ -99,9 +99,7 @@
state
:
val
.
state
state
:
val
.
state
}
}
let
params
=
[
let
params
=
[
`
${
val
.
iconName
}
;
${
val
.
color
?
`fillColor=
${
val
.
color
}
`
:
''
}
;attr=
${
JSON
.
stringify
(
`
${
val
.
iconName
}
;
${
val
.
color
?
`fillColor=
${
val
.
color
}
`
:
''
}
;attr=
${(
val
.
fieldsValue
&&
val
.
fieldsValue
!=
'null'
?
val
.
fieldsValue
:
'[]'
)}
;info__=
${
JSON
.
stringify
(
info__
)}
;assetId=
${
_attrs
)}
;info__=
${
JSON
.
stringify
(
info__
)}
;assetId=
${
val
.
assetId
val
.
assetId
};
archiBelongId
=
$
{
val
.
archiBelongId
}
;assetName=[
${
};
archiBelongId
=
$
{
val
.
archiBelongId
}
;assetName=[
${
val
.
assetName
val
.
assetName
...
@@ -313,14 +311,15 @@
...
@@ -313,14 +311,15 @@
let
item
=
i
.
eleDtos
.
find
((
val
)
=>
val
.
eleName
==
title
);
let
item
=
i
.
eleDtos
.
find
((
val
)
=>
val
.
eleName
==
title
);
console
.
log
(
"real item===>"
,
item
);
console
.
log
(
"real item===>"
,
item
);
if
(
item
&&
item
.
assets
&&
item
.
assets
.
length
)
{
if
(
item
&&
item
.
assets
&&
item
.
assets
.
length
)
{
let
_attrs
=
(
item
.
dicys
||
[]).
map
((
val
)
=>
{
// let _attrs = (item.dicys || []).map((val) => {
return
{
// return {
name
:
val
.
cnName
,
// name: val.cnName,
value
:
val
.
propertyValue
,
// value: val.propertyValue,
id
:
val
.
propertyId
,
// id: val.propertyId,
controlType
:
val
.
controlType
,
// controlType: val.controlType,
};
// cnName: res.cnName,
});
// };
// });
//分页
//分页
dataL
=
item
.
eleByAssetTotal
||
0
;
dataL
=
item
.
eleByAssetTotal
||
0
;
let
fns
=
item
.
assets
.
map
((
val
)
=>
{
let
fns
=
item
.
assets
.
map
((
val
)
=>
{
...
@@ -366,9 +365,7 @@
...
@@ -366,9 +365,7 @@
state
:
val
.
state
state
:
val
.
state
}
}
let
params
=
[
let
params
=
[
`
${
val
.
iconName
}
;
${
val
.
color
?
`fillColor=
${
val
.
color
}
`
:
''
}
;attr=
${
JSON
.
stringify
(
`
${
val
.
iconName
}
;
${
val
.
color
?
`fillColor=
${
val
.
color
}
`
:
''
}
;attr=
${(
val
.
fieldsValue
&&
val
.
fieldsValue
!=
'null'
?
val
.
fieldsValue
:
'[]'
)}
;info__=
${
JSON
.
stringify
(
info__
)}
;assetId=
${
_attrs
)}
;info__=
${
JSON
.
stringify
(
info__
)}
;assetId=
${
val
.
assetId
val
.
assetId
};
archiBelongId
=
$
{
val
.
archiBelongId
}
;assetName=[
${
};
archiBelongId
=
$
{
val
.
archiBelongId
}
;assetName=[
${
val
.
assetName
val
.
assetName
...
...
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