提交 2fbec233 authored 作者: 钟是志's avatar 钟是志

Merge remote-tracking branch 'origin/master'

import React, { useEffect, useState } from 'react';
import React, { useEffect, useState, useRef } from 'react';
import ZdyTable from '@/webPublic/one_stop_public/Table';
import styles from './index.less';
import { fetchTemplateByCode, fetchTableItem } from '@/webPublic/Services';
export default function RenderForm({ get = 'web', isCg = 'yes', ...rest }) {
const tableRoot = useRef();
useEffect(() => {
const timerId = setTimeout(() => {
const div = tableRoot.current && tableRoot.current.root;
if (div) {
div.style.overflow = 'unset';
}
}, 0);
return () => {
clearTimeout(timerId);
}
}, []);
return (
<div className={styles.zyd_onestop_style_class}>
<ZdyTable get={get} isCg={isCg} {...rest} />
<ZdyTable ref={tableRoot} get={get} isCg={isCg} {...rest} />
</div>
);
}
......
.zyd_onestop_style_class{
padding: 20px;
table, td, div{
table, td{
overflow: unset !important;
}
......
{}
\ No newline at end of file
......@@ -496,7 +496,7 @@ export default class tableCom extends Component {
dataColumn = { base52: this.props.uuid }
if (Object.keys(mapData).length > 0) {
const columnIds = json.columnIds;
if (columnIds && columnIds['c1']) {
const columnId = columnIds['c1'][columnIds['c1'].length - 1];
if (mapData[columnId] != null) {
......@@ -1128,9 +1128,9 @@ export default class tableCom extends Component {
})
try {
var fun1 = new Function("obj","init", "defaultValues", "env", "index", "fatherCode", "utils","$","routerState", fun);
let obj
let obj
if(!this.props.isEdit&&this.props.fatherCode){
obj = { ...this.props.fatherObj, ...this.props.form.getFieldsValue(), ...this.props.defaultValues[this.props.formKey] }
} else {
......@@ -1231,13 +1231,13 @@ export default class tableCom extends Component {
dataColumn = { base52: this.props.uuid }
if (Object.keys(mapData).length > 0) {
const columnIds = json.columnIds;
const bindObj = this.getColumn('c1');
let dataColumn = this.props.fatherCode != null ? (bindObj ? { ...bindObj, base52: `${this.props.fatherCode}.[${this.props.index}].${bindObj.base52}` } :
{ base52: `${this.props.fatherCode}.[${this.props.index}].${this.props.uuid}` })
: bindObj;
if (this.props.fatherCode == null && dataColumn == null) dataColumn = { base52: this.props.uuid }
/* if (this.props.fatherCode != null) {
......@@ -1246,7 +1246,7 @@ export default class tableCom extends Component {
dataColumn = { base52: this.props.uuid }
if (Object.keys(mapData).length > 0) {
const columnIds = json.columnIds;
if (columnIds && columnIds['c1']) {
const columnId = columnIds['c1'][columnIds['c1'].length - 1];
if (mapData[columnId] != null) {
......@@ -1665,7 +1665,7 @@ export default class tableCom extends Component {
if (json.isLabel) {
if (obj.defaultValues && obj.defaultValues[formKey]) {
if (obj&&obj.defaultValues && obj.defaultValues[formKey]) {
if(!isEdit ){
return (
<Row
......@@ -1821,7 +1821,7 @@ export default class tableCom extends Component {
cm = <span
style={{
wordBreak: 'break-all',
}}
>{obj[dataColumn.base52]}</span>;
break;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论