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
ad092b7f
Commit
ad092b7f
authored
Nov 23, 2021
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据字典拖拽功能
parent
050641e6
Pipeline
#38538
skipped with stages
Changes
4
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
87 additions
and
53 deletions
+87
-53
.env
.env
+1
-1
WebDic.js
src/pages/dataCenter/dictionary1/WebDic.js
+73
-48
TemplateManage.jsx
...ormCenter/messageManage/templateManage/TemplateManage.jsx
+13
-4
AddModal.jsx
...nter/messageManage/templateManage/components/AddModal.jsx
+0
-0
No files found.
.env
View file @
ad092b7f
# PUBLIC_PATH = reactOMS, 默认转发 /cityinterface
PROXY=/Cityinterface:http://192.168.19.105:8049;/PandaOMS:http://192.168.1
2.116:8015
;/Web4:http://192.168.19.105:8049;/CityTemp:http://192.168.19.105:8049
PROXY=/Cityinterface:http://192.168.19.105:8049;/PandaOMS:http://192.168.1
9.105:8049
;/Web4:http://192.168.19.105:8049;/CityTemp:http://192.168.19.105:8049
# PROXY=/Cityinterface:http://192.168.12.121:8082;/PandaOMS:http://192.168.12.121:8082;/Web4:http://192.168.12.121:8082;/CityTemp:http://192.168.12.121:8082
# 可设置第二个代理,test为转发前缀,后面为代理转发的地址
# PROXY2 = test : http://localhost:8006/
...
...
src/pages/dataCenter/dictionary1/WebDic.js
View file @
ad092b7f
...
...
@@ -53,7 +53,7 @@ const WebDic = () => {
const
history
=
useHistory
();
const
[
showSearchStyle
,
setShowSearchStyle
]
=
useState
(
false
);
// 是否显示模糊查询样式
const
[
orderTable
,
setOrderTable
]
=
useState
([]);
const
[
flowIDs
,
setFlowIDs
]
=
useState
(
''
);
const
[
orderTable1
,
setOrderTable1
]
=
useState
([]
);
const
[
fgg
,
setFgg
]
=
useState
(
0
);
const
[
InPutVisible
,
setInPutVisible
]
=
useState
(
false
);
...
...
@@ -318,35 +318,61 @@ const WebDic = () => {
getData
(
null
);
//首次加载可以为空
},
[
flag
]);
const
setOd
=
e
=>
{
const
setOd
=
e
=>
{
setOrderTable
(
e
)
setFgg
(
fgg
+
1
)
setFgg
(
fgg
+
1
)
}
const
setOd1
=
e
=>
{
setOrderTable1
(
e
)
setFgg
(
fgg
+
1
)
}
useEffect
(()
=>
{
setOrderTable
(()
=>
{
let
table
;
console
.
log
(
data
)
table
=
data
.
filter
(
item
=>
item
.
nodeID
!==
-
1
);
console
.
log
(
table
)
return
table
;
});
},
[
fgg
]);
// 根据orderTable值改变flowIDs
useEffect
(()
=>
{
setOrderTable
(
data
);
setOrderTable1
(
subData
);
},
[
fgg
]);
// 根据orderTable值改变flowIDs
useEffect
(()
=>
{
let
ids
=
''
;
console
.
log
(
orderTable
)
orderTable
.
forEach
((
item
,
index
)
=>
{
if
(
index
===
orderTable
.
length
-
1
)
{
ids
+=
`
${
item
.
nodeID
}
`
;
}
else
{
ids
+=
`
${
item
.
nodeID
}
,`
;
}
if
(
index
===
orderTable
.
length
-
1
)
{
ids
+=
`
${
item
.
nodeID
}
`
;
}
else
{
ids
+=
`
${
item
.
nodeID
}
,`
;
}
});
console
.
log
(
ids
)
setFlowIDs
(
ids
);
},
[
orderTable
]);
let
bb
=
ids
.
split
(
","
)
console
.
log
(
bb
)
setLoading
(
true
)
DataDictionaryChangeOrder
(
bb
).
then
(
res
=>
{
setLoading
(
false
)
})
},
[
orderTable
]);
useEffect
(()
=>
{
let
ids
=
''
;
console
.
log
(
orderTable1
)
if
(
orderTable1
!=
''
){
orderTable1
.
forEach
((
item
,
index
)
=>
{
if
(
index
===
orderTable1
.
length
-
1
)
{
ids
+=
`
${
item
.
nodeID
}
`
;
}
else
{
ids
+=
`
${
item
.
nodeID
}
,`
;
}
});
}
console
.
log
(
ids
)
let
bb
=
ids
.
split
(
","
)
console
.
log
(
bb
)
setIsloading
(
true
)
DataDictionaryChangeOrder
(
bb
).
then
(
res
=>
{
setIsloading
(
false
)
})
},
[
orderTable1
]);
// 根据父节点nodeID(即parentID)获取子节点数据,一级条目parentID = -1
const
getData
=
value
=>
{
console
.
log
(
value
);
...
...
@@ -366,7 +392,7 @@ const WebDic = () => {
if
(
value
===
null
||
value
===
'-1'
)
{
setData
(
res
);
setOd
(
res
)
console
.
log
(
res
)
console
.
log
(
first
)
if
(
first
)
{
...
...
@@ -379,6 +405,7 @@ const WebDic = () => {
}
else
if
(
value
)
{
console
.
log
(
res
);
setSubData
(
res
);
//设置二级条目,res为空[]时也要设置
setOd1
(
res
)
}
isLoadingShow
(
value
,
false
)
// } else {
...
...
@@ -732,15 +759,18 @@ const WebDic = () => {
}
// 拖拽回调函数
const
dragCallBack
=
data
=>
{
console
.
log
(
data
)
if
(
data
)
{
setData
(
data
);
const
dragCallBack
=
value
=>
{
console
.
log
(
value
)
console
.
log
(
orderTable
)
if
(
value
)
{
setOrderTable
(
value
)
}
};
const
dragCallBack1
=
data
=>
{
if
(
data
)
{
setSubData
(
data
);
const
dragCallBack1
=
e
=>
{
console
.
log
(
e
)
console
.
log
(
orderTable1
)
if
(
e
)
{
setOrderTable1
(
e
);
}
};
...
...
@@ -780,7 +810,6 @@ const WebDic = () => {
rowKey
=
{
record
=>
record
.
nodeID
}
columns
=
{
columns
}
dataSource
=
{
orderTable
}
// orderTable={orderTable}
scroll
=
{{
y
:
'calc(100vh - 370px)'
}}
bordered
dragCallBack
=
{
dragCallBack
}
...
...
@@ -802,15 +831,13 @@ const WebDic = () => {
<
/div
>
}}
rowClassName
=
{
setRowClassName
}
onRow
=
{(
record
,
index
)
=>
({
index
,
onClick
:
()
=>
{
getData
(
record
.
nodeID
);
setSelect
(
record
);
setSelectColor
(
record
);
setSelectID
(
record
.
nodeID
);
},
})}
onClick
=
{
record
=>
{
getData
(
record
.
nodeID
);
setSelect
(
record
);
setSelectColor
(
record
);
setSelectID
(
record
.
nodeID
);
}}
ItemTypes
=
'first'
pagination
=
{
pagenation
}
/
>
<
/Col
>
...
...
@@ -819,21 +846,19 @@ const WebDic = () => {
<
Spin
spinning
=
{
isloading
}
tip
=
"loading..."
>
<
DragTable
size
=
"small"
ItemTypes
=
'second'
bordered
rowKey
=
{
record
=>
record
.
nodeID
}
columns
=
{
columns1
}
dragCallBack
=
{
dragCallBack1
}
className
=
{
styles
.
tab
}
dataSource
=
{
subData
}
dataSource
=
{
orderTable1
}
scroll
=
{{
x
:
'max-content'
,
y
:
'calc(100vh - 340px)'
}}
rowClassName
=
{
setRowClassName1
}
onRow
=
{
record
=>
({
onClick
:
()
=>
{
setSelect
(
record
);
setTwoSelectColor
(
record
);
// setSelectID(record.nodeID);
},
})}
onClick
=
{
record
=>
{
setSelect
(
record
);
setTwoSelectColor
(
record
);
}}
title
=
{()
=>
{
return
<
div
>
<
span
>
二级条目
<
/span
>
...
...
src/pages/platformCenter/messageManage/templateManage/TemplateManage.jsx
View file @
ad092b7f
...
...
@@ -62,9 +62,10 @@ const TemplateManage = () => {
type
:
item
.
Type
,
third_name
:
item
.
Name
,
third_id
:
item
.
No
,
template_params
:
item
.
TDescription
,
template_params
:
item
.
ParsingParams
,
analysis_params
:
item
.
ParsingRules
,
desc
:
item
.
ParsingDescription
desc
:
item
.
ParsingDescription
,
wexin
:
item
.
TDescription
})
})
setData
(
list
)
...
...
@@ -121,6 +122,12 @@ const TemplateManage = () => {
key
:
'third_name'
,
align
:
'center'
,
},
{
title
:
'企业微信ID'
,
dataIndex
:
'wexin'
,
key
:
'wexin'
,
align
:
'center'
,
},
{
title
:
'第三方模版编号'
,
dataIndex
:
'third_id'
,
...
...
@@ -259,7 +266,8 @@ const TemplateManage = () => {
No
:
result
.
third_id
,
ParsingRules
:
result
.
analysis_params
,
ParsingDescription
:
result
.
desc
,
TDescription
:
result
.
params
ParsingParams
:
result
.
params
,
TDescription
:
result
.
weixin
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
...
...
@@ -284,7 +292,8 @@ const TemplateManage = () => {
No
:
result
.
third_id
,
ParsingRules
:
result
.
analysis_params
,
ParsingDescription
:
result
.
desc
,
TDescription
:
result
.
params
ParsingParams
:
result
.
params
,
TDescription
:
result
.
weixin
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
...
...
src/pages/platformCenter/messageManage/templateManage/components/AddModal.jsx
View file @
ad092b7f
This diff is collapsed.
Click to expand it.
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