提交 6b9d77f6 authored 作者: tb53863844's avatar tb53863844

知识图谱组件

上级 acab7121
差异被折叠。
...@@ -52,6 +52,7 @@ import TableSelect from '../libs/TableSelect'; ...@@ -52,6 +52,7 @@ import TableSelect from '../libs/TableSelect';
import LocationCom from '../libs/LocationCom'; import LocationCom from '../libs/LocationCom';
import MobileDate from '../libs/MobileDate'; import MobileDate from '../libs/MobileDate';
import ChildForm from '../libs/ChildForm'; import ChildForm from '../libs/ChildForm';
import Neo4jD3Com from '../libs/Neo4jD3Com';
import ImgUploadCom from '../libs/ImgUploadCom'; import ImgUploadCom from '../libs/ImgUploadCom';
import moment from 'moment'; import moment from 'moment';
import router from 'umi/router'; import router from 'umi/router';
...@@ -814,7 +815,7 @@ export default class tableCom extends Component { ...@@ -814,7 +815,7 @@ export default class tableCom extends Component {
); );
//message.error(`页面${this.props.formKey}第${this.props.i + 1}行,第${this.props.j + 1}列:公式配置有误,回调函数内部错误${e}`, 10) //message.error(`页面${this.props.formKey}第${this.props.i + 1}行,第${this.props.j + 1}列:公式配置有误,回调函数内部错误${e}`, 10)
} }
} else if (json.comName == 'Echart' || json.comName == 'QRCode') { } else if (json.comName == 'Echart' || json.comName == 'QRCode'|| json.comName == 'Graph') {
try { try {
const x = callback(data); const x = callback(data);
if (x != null) { if (x != null) {
...@@ -888,7 +889,7 @@ export default class tableCom extends Component { ...@@ -888,7 +889,7 @@ export default class tableCom extends Component {
e, e,
); );
} }
} else if (json.comName == 'Echart' || json.comName == 'QRCode') { } else if (json.comName == 'Echart' || json.comName == 'QRCode'|| json.comName == 'Graph') {
try { try {
const x = callback(data); const x = callback(data);
if (x != null) { if (x != null) {
...@@ -964,7 +965,7 @@ export default class tableCom extends Component { ...@@ -964,7 +965,7 @@ export default class tableCom extends Component {
e, e,
); );
} }
} else if (json.comName == 'Echart' || json.comName == 'QRCode') { } else if (json.comName == 'Echart' || json.comName == 'QRCode'||json.comName == 'Graph') {
try { try {
const x = callback(data); const x = callback(data);
if (x != null) { if (x != null) {
...@@ -1044,7 +1045,7 @@ export default class tableCom extends Component { ...@@ -1044,7 +1045,7 @@ export default class tableCom extends Component {
e, e,
); );
} }
} else if (json.comName == 'Echart' || json.comName == 'QRCode') { } else if (json.comName == 'Echart' || json.comName == 'QRCode'||json.comName=="Graph") {
try { try {
const x = callback(data); const x = callback(data);
if (x != null) { if (x != null) {
...@@ -1177,7 +1178,7 @@ export default class tableCom extends Component { ...@@ -1177,7 +1178,7 @@ export default class tableCom extends Component {
if (callback) callback(); if (callback) callback();
}); });
} }
} else if (json.comName == 'Echart' || json.comName == 'QRCode') { } else if (json.comName == 'Echart' || json.comName == 'QRCode'||json.comName == 'Graph' ) {
this.setState({ option: value }); this.setState({ option: value });
} else { } else {
try { try {
...@@ -1464,6 +1465,16 @@ export default class tableCom extends Component { ...@@ -1464,6 +1465,16 @@ export default class tableCom extends Component {
/> />
); );
} }
if (json.comName == 'Graph') {
return (
<Neo4jD3Com
style={{ height: json.height || 500 }}
key={this.props.uuid}
option={this.state.option || []}/>
);
}
if (json.comName == 'PartForm') { if (json.comName == 'PartForm') {
const fk = this.props.form.getFieldValue(this.props.uuid) || json.childFormKey; const fk = this.props.form.getFieldValue(this.props.uuid) || json.childFormKey;
if (fk == null) { if (fk == null) {
......
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论