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
24f9388f
Commit
24f9388f
authored
Dec 13, 2021
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改数据字典导入数据格式验证
parent
2be9ad2b
Pipeline
#39988
skipped with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
97 deletions
+17
-97
WebDic.js
src/pages/dataCenter/dictionary1/WebDic.js
+10
-82
changeAdd.jsx
src/pages/platformCenter/bsmanager/workOrder/changeAdd.jsx
+7
-7
api.jsx
src/services/dataCenter/api.jsx
+0
-8
No files found.
src/pages/dataCenter/dictionary1/WebDic.js
View file @
24f9388f
/* eslint-disable no-else-return */
/* eslint-disable no-undef */
/* eslint-disable no-shadow */
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
...
...
@@ -224,80 +226,6 @@ const WebDic = () => {
},
];
// const columns2 = [
// {
// title: () => <span className={styles.font}>名称</span>,
// dataIndex: 'nodeName',
// key: 'nodeName',
// },
// {
// title: () => <span className={styles.font}>值</span>,
// dataIndex: 'nodeValue',
// width: 400,
// key: 'nodeValue',
// render: record => {
// if (!record) {
// return '-';
// }
// return record;
// },
// },
// {
// title: () => <span className={styles.font}>操作</span>,
// key: 'action',
// width: 100,
// align: 'center',
// render: record => (
// <Space>
// <Tooltip title="编辑">
// <EditTwoTone
// onClick={() => {
// setSelect(record);
// if (record.parentID === '-1') {
// setSelectColor(record);
// }
// if (record.parentID === '-1' || record.parentID === null) {
// setEditVisible1(true);
// } else {
// setEditVisible(true);
// }
// editForm.setFieldsValue({
// nodeName: record.nodeName,
// nodeValue: record.nodeValue,
// });
// }}
// style={{ fontSize: '16px' }}
// />
// </Tooltip>
// <div onClick={e => e.stopPropagation()}>
// <Tooltip title="删除">
// <Popconfirm
// title="是否确认删除该数据,删除一级目录数据会将其二级目录子数据一起删除?"
// okText="确认"
// cancelText="取消"
// onConfirm={submitDelete}
// >
// <DeleteOutlined
// onClick={() => {
// setSelect(record);
// if (record.parentID === '-1') {
// setSelectColor(record);
// }
// }}
// style={{
// fontSize: '16px',
// margin: '0px 10px',
// color: '#e86060',
// }}
// />
// </Popconfirm>
// </Tooltip>
// </div>
// </Space>
// ),
// },
// ];
// 模糊查询匹配的样式
const
searchStyle
=
val
=>
{
let
n
;
...
...
@@ -693,6 +621,7 @@ const WebDic = () => {
headers
:
{
authorization
:
'authorization-text'
,
},
accept
:
'application/vnd.ms-excel'
,
beforeUpload
:
file
=>
{
console
.
log
(
'filee'
,
file
);
setFiles
(
file
.
file
);
...
...
@@ -708,13 +637,12 @@ const WebDic = () => {
data
=
item
.
response
.
code
;
mse
=
item
.
response
.
msg
;
});
console
.
log
(
data
);
if
(
data
===
0
)
{
console
.
log
(
1
);
message
.
success
(
`
${
info
.
file
.
name
}
导入成功`
);
notification
.
success
({
message
:
'导入成功'
,
});
setFirst
(
true
);
}
else
{
console
.
log
(
2
);
notification
.
error
({
message
:
'导入失败'
,
description
:
mse
,
...
...
@@ -783,15 +711,15 @@ const WebDic = () => {
// 拖拽回调函数
const
dragCallBack
=
value
=>
{
// console.log(value)
// console.log(orderTable)
console
.
log
(
data
);
console
.
log
(
value
);
if
(
value
)
{
setData
(
value
);
}
};
const
dragCallBack1
=
e
=>
{
// console.log(e)
// console.log(orderTable1)
console
.
log
(
e
);
console
.
log
(
subData
);
if
(
e
)
{
setSubData
(
e
);
}
...
...
src/pages/platformCenter/bsmanager/workOrder/changeAdd.jsx
View file @
24f9388f
...
...
@@ -740,7 +740,7 @@ const AddModal = props => {
forceRender
getContainer=
{
false
}
>
<
Search
{
/*
<Search
style={{
width: 260,
marginRight: '20px',
...
...
@@ -751,8 +751,8 @@ const AddModal = props => {
onChange={e => handleSearch(e)}
enterButton
value={searchWord}
/>
<
Button
/>
*/
}
{
/*
<Button
type="primary"
htmlType="submit"
// onClick={() => {
...
...
@@ -762,7 +762,7 @@ const AddModal = props => {
// }}
>
重置
</
Button
>
</Button>
*/
}
{
visible
&&
(
<
div
className=
{
styles
.
listCard1
}
>
<
div
className=
{
styles
.
cardItem1
}
>
...
...
@@ -778,7 +778,7 @@ const AddModal = props => {
<
Divider
orientation=
"left"
style=
{
{
margin
:
'0 0 10px
0
'
,
margin
:
'0 0 10px
-10px
'
,
color
:
'#15428b'
,
borderTopColor
:
'#99bbe8'
,
}
}
...
...
@@ -819,7 +819,7 @@ const AddModal = props => {
</
div
>
</
div
>
)
}
<
Pagination
{
/*
<Pagination
total={total}
showTotal={item => `共 ${item} 条`}
defaultPageSize={pageSize}
...
...
@@ -829,7 +829,7 @@ const AddModal = props => {
style={{ marginBottom: '10px' }}
size="small"
showQuickJumper
/>
/>
*/
}
</
Modal
>
);
}
...
...
src/services/dataCenter/api.jsx
View file @
24f9388f
...
...
@@ -26,14 +26,6 @@ export const ExportDataDictionary = params =>
get
(
`
${
PUBLISH_SERVICE
}
/DataManger/ExportDataDictionary`
,
params
,
{
responseType
:
'blob'
,
});
// 导入文件
export
const
ImportDataDictionary
=
params
=>
post
(
`
${
PUBLISH_SERVICE
}
/DataManger/ImportDataDictionary`
,
params
,
{
headers
:
{
authorization
:
'authorization-text'
,
},
name
:
'file'
,
});
// 拖拽组件
export
const
DataDictionaryChangeOrder
=
params
=>
post
(
`
${
PUBLISH_SERVICE
}
/DataManger/DataDictionaryChangeOrder`
,
params
);
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