Commit ecbdb6d4 by zhaochengxiang

模型ddl导出

parent d57c1687
......@@ -3,14 +3,17 @@
@import '~antd/dist/antd.less';
@import './mixins.less';
//与center-home中的样式保持统一
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
background-color: #ECEEF3;
color: rgba(0, 0, 0, 0.65);
font-size: 14px;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
font-variant: tabular-nums;
line-height: 1.5;
background-color: #fff;
-webkit-font-feature-settings: 'tnum';
font-feature-settings: 'tnum';
}
code {
......
......@@ -107,8 +107,5 @@ export function* ddlGenerators() {
}
export function* exportDDLString(payload) {
const { ids, ddlGeneratorName } = payload;
return yield call(datamodelerService.exportDDLString, { id: ids[0], ddlGeneratorName: ddlGeneratorName });
return yield call(datamodelerService.exportDDLString, payload);
}
......@@ -68,5 +68,5 @@ export function ddlGenerators() {
}
export function exportDDLString(payload) {
return Get("/datamodeler/easyDataModelerExport/ddlString", payload);
return GetJSON("/datamodeler/easyDataModelerExport/ddlString", payload);
}
......@@ -99,13 +99,13 @@ class ExportModal extends React.Component {
dispatch({
type: 'datamodel.exportDDLString',
payload: {
ids,
ids: ids.join(','),
ddlGeneratorName: selectDDLGeneratorName
},
callback: data => {
this.setState({ confirmLoading: false }, () => {
this.reset();
onCancel && onCancel([ data ]);
onCancel && onCancel(data||[]);
});
},
error: () => {
......@@ -118,7 +118,7 @@ class ExportModal extends React.Component {
}
reset = () => {
this.setState({ selectedKey: '', ddlGeneratorName: '' });
this.setState({ selectedKey: '', selectDDLGeneratorName: '' });
}
onDDLGeneratorChange = (value) => {
......
......@@ -89,14 +89,14 @@ class Model extends React.Component {
this.setState({ exportModalVisible: false });
if (ddlStrings.length>0) {
const tip = (
<>
{
ddlStrings && ddlStrings.map((ddlString, index) => {
return (
<Typography.Paragraph
key='index'
key={index}
copyable={{
tooltips: ['复制', '复制成功'],
}}
......
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