Commit 498353d0 by zhaochengxiang

字段类型不应该是中文类型

parent 0ce26e11
......@@ -68,7 +68,7 @@ const DatatypeInput = ({ value = {}, datatypes, onChange }) => {
{
(datatypes||[]) && datatypes.map((_datatype, index) => {
return (
<Option key={_datatype.name||''}>{_datatype.cnName||''}</Option>
<Option key={_datatype.name||''}>{_datatype.name||''}</Option>
);
})
}
......@@ -274,7 +274,7 @@ const ImportActionTable = (props) => {
const row = await form.validateFields();
(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;
}
})
......@@ -365,7 +365,7 @@ const ImportActionTable = (props) => {
let _text = '';
if (datatype) {
_text = datatype.cnName||'';
_text = datatype.name||'';
(datatype.parameterCnNames||[]).forEach((cnName, index) => {
_text += ' ' + cnName + ':' + (datatype.parameterValues[index]?datatype.parameterValues[index]:0);
})
......
......@@ -18,31 +18,26 @@ class ImportExcel extends React.Component {
render() {
const { onChange } = this.props;
const { fileList } = this.state;
const uploadProps = {
onRemove: file => {
this.setState(state => {
const index = state.fileList.indexOf(file);
const newFileList = state.fileList.slice();
newFileList.splice(index, 1);
const index = fileList.indexOf(file);
const newFileList = fileList.slice();
newFileList.splice(index, 1);
onChange && onChange(newFileList);
onChange && onChange(newFileList);
return {
fileList: newFileList,
}
})
this.setState({ fileList: newFileList });
},
beforeUpload: file => {
onChange && onChange([file]);
this.setState(state => ({
fileList: [file],
}))
this.setState({ fileList: [file] });
return false;
},
accept:".xlsx",
fileList: fileList||[]
};
return (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment