Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
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
zhaochengxiang
szse
Commits
498353d0
Commit
498353d0
authored
Apr 12, 2021
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
字段类型不应该是中文类型
parent
0ce26e11
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
14 deletions
+9
-14
ImportActionTable.jsx
src/view/Manage/Model/Component/ImportActionTable.jsx
+3
-3
ImportExcel.jsx
src/view/Manage/Model/Component/ImportExcel.jsx
+6
-11
No files found.
src/view/Manage/Model/Component/ImportActionTable.jsx
View file @
498353d0
...
@@ -68,7 +68,7 @@ const DatatypeInput = ({ value = {}, datatypes, onChange }) => {
...
@@ -68,7 +68,7 @@ const DatatypeInput = ({ value = {}, datatypes, onChange }) => {
{
{
(
datatypes
||
[])
&&
datatypes
.
map
((
_datatype
,
index
)
=>
{
(
datatypes
||
[])
&&
datatypes
.
map
((
_datatype
,
index
)
=>
{
return
(
return
(
<
Option
key=
{
_datatype
.
name
||
''
}
>
{
_datatype
.
cnN
ame
||
''
}
</
Option
>
<
Option
key=
{
_datatype
.
name
||
''
}
>
{
_datatype
.
n
ame
||
''
}
</
Option
>
);
);
})
})
}
}
...
@@ -274,7 +274,7 @@ const ImportActionTable = (props) => {
...
@@ -274,7 +274,7 @@ const ImportActionTable = (props) => {
const
row
=
await
form
.
validateFields
();
const
row
=
await
form
.
validateFields
();
(
row
.
datatype
.
parameterNames
||
[]).
forEach
((
parameterName
,
index
)
=>
{
(
row
.
datatype
.
parameterNames
||
[]).
forEach
((
parameterName
,
index
)
=>
{
if
(
!
row
.
datatype
.
parameterValues
[
index
])
{
if
(
!
row
.
datatype
.
parameterValues
[
index
]
||
row
.
datatype
.
parameterValues
[
index
]
===
''
)
{
row
.
datatype
.
parameterValues
[
index
]
=
0
;
row
.
datatype
.
parameterValues
[
index
]
=
0
;
}
}
})
})
...
@@ -365,7 +365,7 @@ const ImportActionTable = (props) => {
...
@@ -365,7 +365,7 @@ const ImportActionTable = (props) => {
let
_text
=
''
;
let
_text
=
''
;
if
(
datatype
)
{
if
(
datatype
)
{
_text
=
datatype
.
cnN
ame
||
''
;
_text
=
datatype
.
n
ame
||
''
;
(
datatype
.
parameterCnNames
||
[]).
forEach
((
cnName
,
index
)
=>
{
(
datatype
.
parameterCnNames
||
[]).
forEach
((
cnName
,
index
)
=>
{
_text
+=
' '
+
cnName
+
':'
+
(
datatype
.
parameterValues
[
index
]?
datatype
.
parameterValues
[
index
]:
0
);
_text
+=
' '
+
cnName
+
':'
+
(
datatype
.
parameterValues
[
index
]?
datatype
.
parameterValues
[
index
]:
0
);
})
})
...
...
src/view/Manage/Model/Component/ImportExcel.jsx
View file @
498353d0
...
@@ -18,31 +18,26 @@ class ImportExcel extends React.Component {
...
@@ -18,31 +18,26 @@ class ImportExcel extends React.Component {
render
()
{
render
()
{
const
{
onChange
}
=
this
.
props
;
const
{
onChange
}
=
this
.
props
;
const
{
fileList
}
=
this
.
state
;
const
uploadProps
=
{
const
uploadProps
=
{
onRemove
:
file
=>
{
onRemove
:
file
=>
{
this
.
setState
(
state
=>
{
const
index
=
fileList
.
indexOf
(
file
);
const
index
=
state
.
fileList
.
indexOf
(
file
);
const
newFileList
=
fileList
.
slice
();
const
newFileList
=
state
.
fileList
.
slice
();
newFileList
.
splice
(
index
,
1
);
newFileList
.
splice
(
index
,
1
);
onChange
&&
onChange
(
newFileList
);
onChange
&&
onChange
(
newFileList
);
return
{
this
.
setState
({
fileList
:
newFileList
});
fileList
:
newFileList
,
}
})
},
},
beforeUpload
:
file
=>
{
beforeUpload
:
file
=>
{
onChange
&&
onChange
([
file
]);
onChange
&&
onChange
([
file
]);
this
.
setState
({
fileList
:
[
file
]
});
this
.
setState
(
state
=>
({
fileList
:
[
file
],
}))
return
false
;
return
false
;
},
},
accept
:
".xlsx"
,
accept
:
".xlsx"
,
fileList
:
fileList
||
[]
};
};
return
(
return
(
...
...
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