Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivManage
Commits
0e9bfe4b
Commit
0e9bfe4b
authored
Oct 15, 2021
by
邓超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 添加外部字段模块,修改表返回位置问题
parent
5946c5ef
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
66 additions
and
12 deletions
+66
-12
index.jsx
src/pages/platformCenter/bsmanager/tablemanager/index.jsx
+0
-0
flowNode.jsx
...s/platformCenter/bsmanager/workFlow/flowNode/flowNode.jsx
+1
-1
flowNode.less
.../platformCenter/bsmanager/workFlow/flowNode/flowNode.less
+9
-0
NodeEdit.jsx
...manager/workFlow/flowNode/flowNodeComponents/NodeEdit.jsx
+21
-1
Fieldselection.jsx
.../flowNodeComponents/nodeEditComponents/Fieldselection.jsx
+1
-3
filedConfig.jsx
src/pages/platformCenter/filedConfig/filedConfig.jsx
+5
-3
editorModal.jsx
src/pages/platformCenter/standingBook/editorModal.jsx
+26
-2
utils.js
src/pages/webConfig/utils.js
+1
-0
bs.jsx
src/services/platform/bs.jsx
+2
-2
No files found.
src/pages/platformCenter/bsmanager/tablemanager/index.jsx
View file @
0e9bfe4b
This diff is collapsed.
Click to expand it.
src/pages/platformCenter/bsmanager/workFlow/flowNode/flowNode.jsx
View file @
0e9bfe4b
...
...
@@ -85,7 +85,7 @@ const FlowNode = () => {
// 控制表格的展开跟收起
const
onUnfold
=
(
expanded
,
record
)
=>
{
const
data
=
[...
expandedRowKeys
];
let
index
=
data
.
indexOf
(
record
);
let
index
=
data
.
indexOf
(
record
.
GroupName
);
if
(
expanded
)
{
data
.
push
(
record
.
GroupName
);
}
else
{
...
...
src/pages/platformCenter/bsmanager/workFlow/flowNode/flowNode.less
View file @
0e9bfe4b
...
...
@@ -113,7 +113,16 @@
margin-bottom: 10px;
font-weight: 700;
color: #15428b;
line-height: 100%;
border-top-color: #99bbe8;
.groupName {
display: inline-block;
margin-right: 10px;
max-width: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
...
...
src/pages/platformCenter/bsmanager/workFlow/flowNode/flowNodeComponents/NodeEdit.jsx
View file @
0e9bfe4b
...
...
@@ -100,19 +100,36 @@ const NodeEdit = props => {
loadEventFields
({
eventTableName
:
value
.
TableName
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
let
defaultCheckedList
=
value
[
val
]
?
value
[
val
].
split
(
','
)
:
[];
let
allFields
=
[];
// 所有得字段用来判断是否为外部字段
// 处理树形结构
let
checkList
=
res
.
data
.
map
(
item
=>
{
let
plainOptions
=
[];
// 存入没个组得字段
item
.
root
.
forEach
(
ele
=>
{
plainOptions
=
[...
plainOptions
,
ele
.
fieldName
];
});
// 存所有得字段
allFields
=
[...
allFields
,
...
plainOptions
];
return
{
groupName
:
item
.
groupName
,
plainOptions
,
defaultCheckedList
:
[],
};
});
let
externalFields
=
{
groupName
:
'外部字段'
,
indeterminate
:
false
,
checkAll
:
true
,
plainOptions
:
[],
defaultCheckedList
:
[],
};
// 外部字段
defaultCheckedList
.
forEach
(
item
=>
{
// 添加外部字段
let
isExternal
=
allFields
.
some
(
checkName
=>
checkName
===
item
);
if
(
!
isExternal
)
{
externalFields
.
plainOptions
.
push
(
item
);
externalFields
.
defaultCheckedList
.
push
(
item
);
}
checkList
.
forEach
(
element
=>
{
// 当前得模块是否有当前字段
let
indeterminate
=
element
.
plainOptions
.
some
(
...
...
@@ -140,7 +157,10 @@ const NodeEdit = props => {
}
});
});
console
.
log
(
checkList
,
'checkList'
);
// 添加外部字段
if
(
externalFields
.
plainOptions
.
length
>
0
)
{
checkList
.
push
(
externalFields
);
}
setFieldList
(
checkList
);
setTimeout
(()
=>
{
setShowField
(
true
);
...
...
src/pages/platformCenter/bsmanager/workFlow/flowNode/flowNodeComponents/nodeEditComponents/Fieldselection.jsx
View file @
0e9bfe4b
...
...
@@ -98,9 +98,7 @@ const Fieldselection = props => {
<
div
className=
{
styles
.
cardBox
}
key=
{
index
}
>
<
div
className=
{
styles
.
title
}
>
<
Divider
orientation=
"left"
className=
{
styles
.
cardDivider
}
>
<
span
style=
{
{
marginRight
:
'10px'
}
}
>
{
item
.
groupName
}
</
span
>
<
span
className=
{
styles
.
groupName
}
>
{
item
.
groupName
}
</
span
>
<
Checkbox
indeterminate=
{
item
.
indeterminate
}
onChange=
{
e
=>
onCheckAllChange
(
e
,
index
)
}
...
...
src/pages/platformCenter/filedConfig/filedConfig.jsx
View file @
0e9bfe4b
...
...
@@ -358,11 +358,13 @@ const AddModal = props => {
};
// 返回上一级
const
back
=
()
=>
{
console
.
log
(
props
)
let
template
=
props
.
location
.
state
.
template
;
let
{
template
,
tableScroll
}
=
props
.
location
.
state
;
history
.
push
({
pathname
:
'/platformCenter/bsmanger/tablemanger'
,
state
:
{
template
},
query
:
{
template
,
tableScroll
,
},
});
};
const
onUnfold
=
(
expanded
,
record
)
=>
{
...
...
src/pages/platformCenter/standingBook/editorModal.jsx
View file @
0e9bfe4b
/* eslint-disable guard-for-in */
/* eslint-disable no-restricted-syntax */
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Form
,
...
...
@@ -64,6 +66,7 @@ const AddModal = props => {
const
[
Type
,
setType
]
=
useState
(
''
);
const
[
characterValue
,
setCharacterValue
]
=
useState
(
''
);
const
[
standingType
,
setStandingType
]
=
useState
([
'台账'
,
'反馈'
,
'设备'
]);
const
[
allFileds
,
setAllFileds
]
=
useState
([]);
// 当前表所有的字段
const
[
form
]
=
Form
.
useForm
();
const
{
Item
}
=
Form
;
// 提交
...
...
@@ -166,14 +169,18 @@ const AddModal = props => {
if
(
!
name
)
{
return
'请传入对象属性'
;
}
//先获取一下这个数组中有多少个"name"
//
先获取一下这个数组中有多少个"name"
let
nameArr
=
[];
let
allFile
=
[];
for
(
let
i
in
initialArr
)
{
allFile
.
push
(
initialArr
[
i
].
fieldName
);
if
(
nameArr
.
indexOf
(
initialArr
[
i
][
`
${
name
}
`
])
===
-
1
)
{
nameArr
.
push
(
initialArr
[
i
][
`
${
name
}
`
]);
}
}
//新建一个包含多个list的结果对象
// 保存所有的字段用来比较是否有外部字段
setAllFileds
(
allFile
);
// 新建一个包含多个list的结果对象
let
tempObj
=
{};
// 根据不同的"name"生成多个数组
console
.
log
(
initialArr
);
...
...
@@ -204,9 +211,26 @@ const AddModal = props => {
setInputVaule
(
inputText
);
};
const
pickFiled
=
fileds
=>
{
// 添加外部字段
let
fil
=
{
...
filed
};
fil
[
'外部字段'
]
=
[];
let
isExternal
;
inputValue
[
fileds
].
split
(
','
).
forEach
(
item
=>
{
isExternal
=
allFileds
.
some
(
val
=>
val
===
item
);
if
(
!
isExternal
&&
item
!==
''
)
{
fil
[
'外部字段'
].
push
(
item
);
}
});
if
(
fil
[
'外部字段'
].
length
===
0
)
{
delete
fil
[
'外部字段'
];
}
setFiled
(
fil
);
setTypes
(
'add'
);
setCharacterValue
(
inputValue
[
fileds
]);
setCheckedList
(
inputValue
[
fileds
].
split
(
','
));
setPickItem
(
fileds
);
setIsVisible
(
true
);
};
...
...
src/pages/webConfig/utils.js
View file @
0e9bfe4b
...
...
@@ -69,6 +69,7 @@ export const defaultWebConfigObj = {
mapPlan
:
''
,
qrcode
:
''
,
loginTemplate
:
'Default.html'
,
alarmWays
:
notificationTypes
.
MQTT
,
};
export
const
getDefaultGetWebconfig
=
({
...
...
src/services/platform/bs.jsx
View file @
0e9bfe4b
...
...
@@ -25,11 +25,11 @@ export const loadUnattachedTables = () =>
//7.附加表
export
const
addTables
=
(
param
)
=>
ge
t
(
`
${
PUBLISH_SERVICE
}
/CaseManage/AddTables`
,
param
);
pos
t
(
`
${
PUBLISH_SERVICE
}
/CaseManage/AddTables`
,
param
);
//8.添加表字段
export
const
addFields
=
(
param
)
=>
ge
t
(
`
${
PUBLISH_SERVICE
}
/CaseManage/AddFields`
,
param
);
pos
t
(
`
${
PUBLISH_SERVICE
}
/CaseManage/AddFields`
,
param
);
//9.获取表信息
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment