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
9f1fed5f
Commit
9f1fed5f
authored
Apr 11, 2023
by
涂伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '1.台账新增导入导出功能2.流程配置表名和编辑字段必填'
parent
b18bb20a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
96 additions
and
10 deletions
+96
-10
standingBook.jsx
src/pages/bsmanager/base/standingBook/standingBook.jsx
+68
-9
NodeModal.jsx
...Edit/workFlowComponents/flowChartComponents/NodeModal.jsx
+10
-0
ConfigNodeMsg.jsx
...flowChartComponents/nodeModalComponents/ConfigNodeMsg.jsx
+7
-1
api.js
src/services/standingBook/api.js
+11
-0
No files found.
src/pages/bsmanager/base/standingBook/standingBook.jsx
View file @
9f1fed5f
...
...
@@ -11,6 +11,9 @@ import {
notification
,
Input
,
Button
,
Modal
,
Upload
,
message
,
}
from
'antd'
;
import
{
...
...
@@ -21,10 +24,18 @@ import {
EditTwoTone
,
DeleteOutlined
,
SyncOutlined
,
ExportOutlined
,
ImportOutlined
,
}
from
'@ant-design/icons'
;
import
classnames
from
'classnames'
;
import
PageContainer
from
'@/components/BasePageContainer'
;
import
{
GetCM_Ledger_LoadLedgers
,
CM_Ledger_RmoveLedger
}
from
'@/services/standingBook/api'
;
import
{
GetCM_Ledger_LoadLedgers
,
CM_Ledger_RmoveLedger
,
ExportLedgerConfig
,
CheckImportLedgerConfig
,
ImportLedgerConfig
,
}
from
'@/services/standingBook/api'
;
import
AddModal
from
'./BookConfig'
;
import
styles
from
'./standingBook.less'
;
// import Search from 'antd/lib/transfer/search';
...
...
@@ -152,6 +163,12 @@ const StandingBook = props => {
<
Tooltip
title=
"编辑此表"
>
<
EditTwoTone
onClick=
{
()
=>
editor
(
record
)
}
style=
{
{
fontSize
:
'16px'
}
}
/>
</
Tooltip
>
<
Tooltip
title=
"导出台账"
>
<
ExportOutlined
onClick=
{
()
=>
hadelExport
(
record
)
}
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
}
}
/>
</
Tooltip
>
<
Tooltip
title=
"删除此表"
>
<
Popconfirm
...
...
@@ -169,6 +186,44 @@ const StandingBook = props => {
),
},
];
// 导出
const
hadelExport
=
record
=>
{
window
.
location
.
href
=
ExportLedgerConfig
({
ledgerId
:
record
.
ID
,
});
};
// 导入
const
beforeUpload
=
val
=>
{
// setFile(val);
const
formData
=
new
FormData
();
formData
.
append
(
'_files'
,
val
);
CheckImportLedgerConfig
(
formData
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
Modal
.
confirm
({
title
:
'提示'
,
icon
:
''
,
content
:
<
div
style=
{
{
whiteSpace
:
'pre-wrap'
}
}
>
{
res
.
data
}
</
div
>,
onOk
()
{
console
.
log
(
'OK'
);
ImportLedgerConfig
(
formData
).
then
(
response
=>
{
if
(
response
.
code
===
0
)
{
setFlag
(
flag
+
1
);
message
.
success
(
'导入成功'
);
}
else
{
message
.
error
(
response
.
msg
);
}
});
},
okText
:
'确认导入'
,
cancelText
:
'我再想想'
,
});
}
else
{
message
.
error
(
res
.
msg
);
}
});
return
false
;
};
useEffect
(()
=>
{
setTreeLoading
(
true
);
...
...
@@ -400,8 +455,7 @@ const StandingBook = props => {
}
}
>
{
tableData
.
length
>
0
&&
tableData
.
map
((
item
,
index
)
=>
{
return
(
tableData
.
map
((
item
,
index
)
=>
(
<
div
title=
{
`${item}(${allData[item] ? allData[item].length : 0})`
}
className=
{
classnames
({
...
...
@@ -426,8 +480,7 @@ const StandingBook = props => {
>
{
item
}
(
{
allData
[
item
]
?
allData
[
item
].
length
:
0
}
)
</
div
>
);
})
}
))
}
</
div
>
</
div
>
</>
...
...
@@ -468,20 +521,26 @@ const StandingBook = props => {
{
/* <Button icon={<SyncOutlined />} onClick={handleReset}>
重置
</Button> */
}
<
Upload
showUploadList=
{
false
}
accept=
".json"
beforeUpload=
{
beforeUpload
}
>
<
Button
style=
{
{
marginLeft
:
'10px'
}
}
type=
"primary"
ghost
>
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
}
}
>
<
ImportOutlined
style=
{
{
marginRight
:
'5px'
}
}
/>
<
div
>
导入
</
div
>
</
div
>
</
Button
>
</
Upload
>
</
div
>
<
div
style=
{
{
marginTop
:
'10px'
,
height
:
'calc(100% - 94px)'
}
}
>
<
Table
size=
"small"
rowKey=
"ID"
bordered
onRow=
{
record
=>
{
return
{
onRow=
{
record
=>
({
onDoubleClick
:
event
=>
{
event
.
stopPropagation
();
editor
(
record
);
},
// 双击
};
}
}
})
}
columns=
{
columns
}
loading=
{
tableLoading
}
dataSource=
{
searchFlag
===
0
?
allData
[
pickItem
]
:
searchData
[
pickItem
]
}
...
...
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/NodeModal.jsx
View file @
9f1fed5f
...
...
@@ -59,6 +59,16 @@ const NodeModal = props => {
...
refConfigTimeLimit
.
current
?.
getParmar
(),
};
if
(
!
obj
.
TableName
)
{
message
.
error
(
'请选择节点表名'
);
return
;
}
if
(
!
obj
.
Fields
)
{
message
.
error
(
'请选择编辑字段'
);
return
;
}
for
(
let
i
=
0
;
i
<
obj
.
RuleList
.
length
;
i
++
)
{
if
(
!
obj
.
RuleList
[
i
].
RuleName
)
{
message
.
error
(
'请填写规则名称'
);
...
...
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/nodeModalComponents/ConfigNodeMsg.jsx
View file @
9f1fed5f
...
...
@@ -414,6 +414,7 @@ const ConfigNodeMsg = (props, ref) => {
)
}
name=
"TableName"
rules=
{
[{
required
:
true
,
message
:
'请选择节点表名'
}]
}
>
<
Select
placeholder=
"请选择节点表名"
onChange=
{
changTable
}
showSearch
>
{
eventTable
.
map
(
item
=>
(
...
...
@@ -434,13 +435,18 @@ const ConfigNodeMsg = (props, ref) => {
)
:
(
''
)
}
<
span
style=
{
{
marginRight
:
'4px'
,
color
:
'red'
}
}
>
*
</
span
>
<
span
>
字段编辑
</
span
>
</
div
>
}
>
<
div
className=
{
styles
.
filedListItem
}
>
<
Tooltip
title=
{
form
.
getFieldValue
(
'Fields'
)
}
>
<
Form
.
Item
name=
"Fields"
style=
{
{
marginBottom
:
0
,
width
:
'100%'
}
}
>
<
Form
.
Item
name=
"Fields"
style=
{
{
marginBottom
:
0
,
width
:
'100%'
}
}
rules=
{
[{
required
:
true
}]
}
>
<
Input
placeholder=
"请选编辑字段"
readOnly
...
...
src/services/standingBook/api.js
View file @
9f1fed5f
...
...
@@ -119,3 +119,14 @@ export const ImportEventConfig = query =>
// 导出
export
const
ExportEventConfig
=
query
=>
`
${
PUBLISH_SERVICE
}
/WorkOrderCenter/ExportEventConfig?eventTypeId=
${
query
.
eventTypeId
}
`
;
// 导出台账
export
const
ExportLedgerConfig
=
query
=>
`
${
PUBLISH_SERVICE
}
/WorkOrderCenter/ExportLedgerConfig?ledgerId=
${
query
.
ledgerId
}
`
;
// 导入台账检查
export
const
CheckImportLedgerConfig
=
data
=>
post
(
`
${
PUBLISH_SERVICE
}
/WorkOrderCenter/CheckImportLedgerConfig`
,
data
);
// 导入台账
export
const
ImportLedgerConfig
=
data
=>
post
(
`
${
PUBLISH_SERVICE
}
/WorkOrderCenter/ImportLedgerConfig`
,
data
);
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