提交 f1d9dc29 authored 作者: chlolch's avatar chlolch

修改bug

上级 c98d63ff
...@@ -11,7 +11,7 @@ export default class ChildForm extends React.Component { ...@@ -11,7 +11,7 @@ export default class ChildForm extends React.Component {
constructor(props) { constructor(props) {
super(props) super(props)
const value = props.value || {}; const value = props.value || {};
this.state = value this.state = value
} }
...@@ -26,7 +26,7 @@ export default class ChildForm extends React.Component { ...@@ -26,7 +26,7 @@ export default class ChildForm extends React.Component {
// Should be a controlled component. // Should be a controlled component.
if ('value' in nextProps) { if ('value' in nextProps) {
const value = nextProps.value; const value = nextProps.value;
this.state=value this.state = value
} }
} }
componentDidMount = () => { componentDidMount = () => {
...@@ -54,7 +54,7 @@ export default class ChildForm extends React.Component { ...@@ -54,7 +54,7 @@ export default class ChildForm extends React.Component {
} }
delete = (uuid) => { delete = (uuid) => {
const objs = this.state const objs = this.state
const {json:{numCode},form,base52}=this.props const { json: { numCode }, form, base52 } = this.props
if (this.props.min != null && Object.keys(objs).length - 1 < this.props.min) { if (this.props.min != null && Object.keys(objs).length - 1 < this.props.min) {
message.error("不能小于最小限制") message.error("不能小于最小限制")
...@@ -67,14 +67,14 @@ export default class ChildForm extends React.Component { ...@@ -67,14 +67,14 @@ export default class ChildForm extends React.Component {
} }
this.triggerChange({ ...objs }); this.triggerChange({ ...objs });
if(numCode!=null){ if (numCode != null) {
this.props.form.setFieldsValue({[numCode]:Object.keys(objs).length}) this.props.form.setFieldsValue({ [numCode]: Object.keys(objs).length })
} }
} }
add = () => { add = () => {
const objs = this.state const objs = this.state
const {json:{numCode},form,base52}=this.props const { json: { numCode }, form, base52 } = this.props
if (this.props.max != null && Object.keys(objs).length + 1 > this.props.max) { if (this.props.max != null && Object.keys(objs).length + 1 > this.props.max) {
message.error("不能大于最大限制") message.error("不能大于最大限制")
...@@ -86,10 +86,10 @@ export default class ChildForm extends React.Component { ...@@ -86,10 +86,10 @@ export default class ChildForm extends React.Component {
this.setState({ ...objs }); this.setState({ ...objs });
} }
this.triggerChange({ ...objs }); this.triggerChange({ ...objs });
if(numCode!=null){ if (numCode != null) {
this.props.form.setFieldsValue({[numCode]:Object.keys(objs).length}) this.props.form.setFieldsValue({ [numCode]: Object.keys(objs).length })
} }
} }
...@@ -98,12 +98,13 @@ export default class ChildForm extends React.Component { ...@@ -98,12 +98,13 @@ export default class ChildForm extends React.Component {
render() { render() {
const objs = this.state; const objs = this.state;
const { form, mapData, sqlData, defaultValues, datas, base52, isEdit, addName, deleteName, obj, isMobile, json,modalInit } = this.props
const { form, mapData, sqlData, defaultValues, datas, base52, isEdit, addName, deleteName, obj, isMobile, json, modalInit } = this.props
const span = json.span || 24 const span = json.span || 24
const gutter = json.gutter != null ? json.gutter : 0 const gutter = json.gutter != null ? json.gutter : 0
const rights = this.props.rights const rights = this.props.rights
if (datas == null) { if (datas == null) {
return (<div>还没有配置子表单key</div>) return (<div>还没有配置子表单key</div>)
} }
...@@ -113,35 +114,37 @@ export default class ChildForm extends React.Component { ...@@ -113,35 +114,37 @@ export default class ChildForm extends React.Component {
return ( return (
<WingBlank size="lg"> <WingBlank size="lg">
{Object.keys(objs).length > 1 || rights.includes("add") ? <Card style={{ marginLeft: '-27px' }}> {Object.keys(objs).length > 1 || rights.includes("add") ? <Card style={{ marginLeft: '-27px' }}>
<Card.Body style={{ minHeight: 10 }}> <Card.Body style={{ minHeight: 10 }}>
{Object.keys(objs).map((r) => { {Object.keys(objs).map((r) => {
if (r == "") { if (r == "") {
return "" return ""
} }
return <Row key={r} gutter={gutter} ><Col style={{ textAlign: 'right' }} span={isEdit ? 23 : span} > return <Row key={r} gutter={gutter} ><Col style={{ textAlign: 'right' }} span={isEdit ? 23 : span} >
<ZdyTable key={r} modalInit={modalInit} formCode={this.props.formCode} <ZdyTable key={r} modalInit={modalInit} formCode={this.props.formCode}
formId={this.props.formId} formId={this.props.formId}
formConfig={datas} get='mobile' fatherCode={base52} isEdit={isEdit} index={r} obj={objs[r]} fatherObj={this.props.fatherObj} init={objs} isChild={true} form={form} mapData={mapData} sqlData={sqlData} {...datas} defaultValues={defaultValues} /> formConfig={datas} get='mobile' fatherCode={base52} isEdit={isEdit} index={r} obj={objs[r]} fatherObj={this.props.fatherObj} init={objs} isChild={true} form={form} mapData={mapData} sqlData={sqlData} {...datas} defaultValues={defaultValues} />
{rights.includes("delete") && isEdit ? <Button type='danger' size="small" onClick={this.delete.bind(this, r)}>{deleteName || "删除"} </Button> : ''} {rights.includes("delete") && isEdit ? <Button type='danger' size="small" onClick={this.delete.bind(this, r)}>{deleteName || "删除"} </Button> : ''}
</Col> </Col>
</Row> </Row>
})} })}
{rights.includes("add") ? <Row> {rights.includes("add") ? <Row>
<Col style={{textAlign:"center"}}><Button type="primary" size="small" style={{ margin: "auto"}} onClick={this.add}>{addName || "新增"}</Button> </Col> <Col style={{ textAlign: "center" }}><Button type="primary" size="small" style={{ margin: "auto" }} onClick={this.add}>{addName || "新增"}</Button> </Col>
</Row>:""} </Row> : ""}
</Card.Body> </Card.Body>
</Card> : ""} </Card> : ""}
</WingBlank> </WingBlank>
) )
} }
return ( return (
<div style={{ width: "100%" }}> <div style={{ width: "100%" }}>
<Row gutter={gutter}> <Row gutter={gutter}>
{Object.keys(objs).map((r) => { {Object.keys(objs).map((r) => {
if (r == "") { if (r == "") {
return "" return ""
} }
......
...@@ -415,9 +415,9 @@ export default class tableCom extends Component { ...@@ -415,9 +415,9 @@ export default class tableCom extends Component {
onFilter: (value, record) => onFilter: (value, record) =>
record[dataIndex] record[dataIndex]
? record[dataIndex] ? record[dataIndex]
.toString() .toString()
.toLowerCase() .toLowerCase()
.includes(value.toLowerCase()) .includes(value.toLowerCase())
: '', : '',
onFilterDropdownVisibleChange: visible => { onFilterDropdownVisibleChange: visible => {
if (visible) { if (visible) {
...@@ -490,7 +490,7 @@ export default class tableCom extends Component { ...@@ -490,7 +490,7 @@ export default class tableCom extends Component {
if (this.count.length > 10) { if (this.count.length > 10) {
console.log( console.log(
`页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j + `页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j +
1}列:存在循环风险,1秒内执行超过10次,现已停止执行,请检查,`, 1}列:存在循环风险,1秒内执行超过10次,现已停止执行,请检查,`,
); );
return; return;
...@@ -512,9 +512,9 @@ export default class tableCom extends Component { ...@@ -512,9 +512,9 @@ export default class tableCom extends Component {
this.props.fatherCode != null this.props.fatherCode != null
? bindObj ? bindObj
? { ? {
...bindObj, ...bindObj,
base52: `${this.props.fatherCode}.[${this.props.index}].${bindObj.base52}`, base52: `${this.props.fatherCode}.[${this.props.index}].${bindObj.base52}`,
} }
: { base52: `${this.props.fatherCode}.[${this.props.index}].${this.props.uuid}` } : { base52: `${this.props.fatherCode}.[${this.props.index}].${this.props.uuid}` }
: bindObj; : bindObj;
if (this.props.fatherCode == null && dataColumn == null) if (this.props.fatherCode == null && dataColumn == null)
...@@ -754,7 +754,7 @@ export default class tableCom extends Component { ...@@ -754,7 +754,7 @@ export default class tableCom extends Component {
} catch (e) { } catch (e) {
console.log( console.log(
`页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j + `页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j +
1}列:公式配置有误,回调函数内部错误,`, 1}列:公式配置有误,回调函数内部错误,`,
e, e,
); );
} }
...@@ -810,7 +810,7 @@ export default class tableCom extends Component { ...@@ -810,7 +810,7 @@ export default class tableCom extends Component {
} catch (e) { } catch (e) {
console.log( console.log(
`页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j + `页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j +
1}列:公式配置有误,回调函数内部错误,`, 1}列:公式配置有误,回调函数内部错误,`,
e, e,
); );
//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)
...@@ -824,7 +824,7 @@ export default class tableCom extends Component { ...@@ -824,7 +824,7 @@ export default class tableCom extends Component {
} catch (e) { } catch (e) {
console.log( console.log(
`页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j + `页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j +
1}列:公式配置有误,回调函数内部错误,`, 1}列:公式配置有误,回调函数内部错误,`,
e, e,
); );
} }
...@@ -836,7 +836,7 @@ export default class tableCom extends Component { ...@@ -836,7 +836,7 @@ export default class tableCom extends Component {
} catch (e) { } catch (e) {
console.log( console.log(
`页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j + `页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j +
1}列:公式配置有误,回调函数内部错误,`, 1}列:公式配置有误,回调函数内部错误,`,
e, e,
); );
} }
...@@ -885,7 +885,7 @@ export default class tableCom extends Component { ...@@ -885,7 +885,7 @@ export default class tableCom extends Component {
} catch (e) { } catch (e) {
console.log( console.log(
`页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j + `页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j +
1}列:公式配置有误,回调函数内部错误,`, 1}列:公式配置有误,回调函数内部错误,`,
e, e,
); );
} }
...@@ -898,7 +898,7 @@ export default class tableCom extends Component { ...@@ -898,7 +898,7 @@ export default class tableCom extends Component {
} catch (e) { } catch (e) {
console.log( console.log(
`页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j + `页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j +
1}列:公式配置有误,回调函数内部错误,`, 1}列:公式配置有误,回调函数内部错误,`,
e, e,
); );
} }
...@@ -910,7 +910,7 @@ export default class tableCom extends Component { ...@@ -910,7 +910,7 @@ export default class tableCom extends Component {
} catch (e) { } catch (e) {
console.log( console.log(
`页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j + `页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j +
1}列:公式配置有误,回调函数内部错误,`, 1}列:公式配置有误,回调函数内部错误,`,
e, e,
); );
} }
...@@ -961,7 +961,7 @@ export default class tableCom extends Component { ...@@ -961,7 +961,7 @@ export default class tableCom extends Component {
} catch (e) { } catch (e) {
console.log( console.log(
`页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j + `页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j +
1}列:公式配置有误,回调函数内部错误,`, 1}列:公式配置有误,回调函数内部错误,`,
e, e,
); );
} }
...@@ -974,7 +974,7 @@ export default class tableCom extends Component { ...@@ -974,7 +974,7 @@ export default class tableCom extends Component {
} catch (e) { } catch (e) {
console.log( console.log(
`页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j + `页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j +
1}列:公式配置有误,回调函数内部错误,`, 1}列:公式配置有误,回调函数内部错误,`,
e, e,
); );
} }
...@@ -986,7 +986,7 @@ export default class tableCom extends Component { ...@@ -986,7 +986,7 @@ export default class tableCom extends Component {
} catch (e) { } catch (e) {
console.log( console.log(
`页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j + `页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j +
1}列:公式配置有误,回调函数内部错误,`, 1}列:公式配置有误,回调函数内部错误,`,
e, e,
); );
} }
...@@ -1041,7 +1041,7 @@ export default class tableCom extends Component { ...@@ -1041,7 +1041,7 @@ export default class tableCom extends Component {
} catch (e) { } catch (e) {
console.log( console.log(
`页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j + `页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j +
1}列:公式配置有误,回调函数内部错误,`, 1}列:公式配置有误,回调函数内部错误,`,
e, e,
); );
} }
...@@ -1054,7 +1054,7 @@ export default class tableCom extends Component { ...@@ -1054,7 +1054,7 @@ export default class tableCom extends Component {
} catch (e) { } catch (e) {
console.log( console.log(
`页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j + `页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j +
1}列:公式配置有误,回调函数内部错误,`, 1}列:公式配置有误,回调函数内部错误,`,
e, e,
); );
} }
...@@ -1066,7 +1066,7 @@ export default class tableCom extends Component { ...@@ -1066,7 +1066,7 @@ export default class tableCom extends Component {
} catch (e) { } catch (e) {
console.log( console.log(
`页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j + `页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j +
1}列:公式配置有误,回调函数内部错误,`, 1}列:公式配置有误,回调函数内部错误,`,
e, e,
); );
} }
...@@ -1184,7 +1184,7 @@ export default class tableCom extends Component { ...@@ -1184,7 +1184,7 @@ export default class tableCom extends Component {
} catch { } catch {
console.log( console.log(
`页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j + `页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j +
1}列:公式配置有误,函数内部错误,`, 1}列:公式配置有误,函数内部错误,`,
e, e,
); );
} }
...@@ -1194,7 +1194,7 @@ export default class tableCom extends Component { ...@@ -1194,7 +1194,7 @@ export default class tableCom extends Component {
} catch (e) { } catch (e) {
console.log( console.log(
`页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j + `页面${this.props.formKey}${this.props.i + 1}行,第${this.props.j +
1}列:公式配置有误,暂存失败,`, 1}列:公式配置有误,暂存失败,`,
e, e,
); );
} }
...@@ -1221,9 +1221,9 @@ export default class tableCom extends Component { ...@@ -1221,9 +1221,9 @@ export default class tableCom extends Component {
this.props.fatherCode != null this.props.fatherCode != null
? bindObj ? bindObj
? { ? {
...bindObj, ...bindObj,
base52: `${this.props.fatherCode}.[${this.props.index}].${bindObj.base52}`, base52: `${this.props.fatherCode}.[${this.props.index}].${bindObj.base52}`,
} }
: { base52: `${this.props.fatherCode}.[${this.props.index}].${this.props.uuid}` } : { base52: `${this.props.fatherCode}.[${this.props.index}].${this.props.uuid}` }
: bindObj; : bindObj;
if (this.props.fatherCode == null && dataColumn == null) if (this.props.fatherCode == null && dataColumn == null)
...@@ -1601,8 +1601,8 @@ export default class tableCom extends Component { ...@@ -1601,8 +1601,8 @@ export default class tableCom extends Component {
{get === 'mobile' ? <br /> : ''} {get === 'mobile' ? <br /> : ''}
</span> </span>
) : ( ) : (
'' ''
); );
break; break;
case 'UploadCom': case 'UploadCom':
...@@ -1749,8 +1749,8 @@ export default class tableCom extends Component { ...@@ -1749,8 +1749,8 @@ export default class tableCom extends Component {
</span> </span>
</> </>
) : ( ) : (
'' ''
)} )}
</Col> </Col>
<Col <Col
span={json.wrapperSpan} span={json.wrapperSpan}
...@@ -1817,9 +1817,9 @@ export default class tableCom extends Component { ...@@ -1817,9 +1817,9 @@ export default class tableCom extends Component {
this.props.fatherCode != null this.props.fatherCode != null
? bindObj ? bindObj
? { ? {
...bindObj, ...bindObj,
base52: `${this.props.fatherCode}.[${this.props.index}].${bindObj.base52}`, base52: `${this.props.fatherCode}.[${this.props.index}].${bindObj.base52}`,
} }
: { base52: `${this.props.fatherCode}.[${this.props.index}].${this.props.uuid}` } : { base52: `${this.props.fatherCode}.[${this.props.index}].${this.props.uuid}` }
: bindObj; : bindObj;
...@@ -1832,16 +1832,18 @@ export default class tableCom extends Component { ...@@ -1832,16 +1832,18 @@ export default class tableCom extends Component {
var title = json.label || (dataColumn && dataColumn.title); var title = json.label || (dataColumn && dataColumn.title);
var initValue; var initValue;
if (init != null) { const objinit = { ...init, ...obj }
if (objinit != null) {
if (this.props.fatherCode != null) { if (this.props.fatherCode != null) {
initValue = initValue = objinit[this.props.index] != null
init[this.props.index] != null ? objinit[this.props.index][bindObj ? bindObj.base52 : this.props.uuid]
? init[this.props.index][bindObj ? bindObj.base52 : this.props.uuid] : null;
: null;
} else { } else {
initValue = init[dataColumn.base52]; initValue = objinit[dataColumn.base52];
} }
} else { } else {
if (json.initialValue != null) { if (json.initialValue != null) {
try { try {
initValue = JSON.parse(json.initialValue); initValue = JSON.parse(json.initialValue);
...@@ -1850,6 +1852,8 @@ export default class tableCom extends Component { ...@@ -1850,6 +1852,8 @@ export default class tableCom extends Component {
} }
} }
} }
if (!isEdit) { if (!isEdit) {
if (this.props.fatherCode) { if (this.props.fatherCode) {
if (bindObj != null) { if (bindObj != null) {
...@@ -1925,18 +1929,18 @@ export default class tableCom extends Component { ...@@ -1925,18 +1929,18 @@ export default class tableCom extends Component {
<span> <span>
{labels != null {labels != null
? labels.map((r, i) => ? labels.map((r, i) =>
i == 0 ? ( i == 0 ? (
typeof r == 'string' ? ( typeof r == 'string' ? (
<span>{r}</span> <span>{r}</span>
) : ( ) : (
Object.values(r) Object.values(r)
) )
) : typeof r == 'string' ? ( ) : typeof r == 'string' ? (
<span style={{ marginLeft: 12 }}>{r}</span> <span style={{ marginLeft: 12 }}>{r}</span>
) : ( ) : (
',' + Object.values(r) ',' + Object.values(r)
), ),
) )
: ''} : ''}
</span> </span>
); );
...@@ -2014,8 +2018,8 @@ export default class tableCom extends Component { ...@@ -2014,8 +2018,8 @@ export default class tableCom extends Component {
<span> <span>
{obj[dataColumn.base52] {obj[dataColumn.base52]
? moment(+new Date(obj[dataColumn.base52])).format( ? moment(+new Date(obj[dataColumn.base52])).format(
json.format ? json.format : 'YYYY-MM-DD HH:mm:ss', json.format ? json.format : 'YYYY-MM-DD HH:mm:ss',
) )
: ''} : ''}
</span> </span>
); );
...@@ -2129,11 +2133,11 @@ export default class tableCom extends Component { ...@@ -2129,11 +2133,11 @@ export default class tableCom extends Component {
height={json.height} height={json.height}
/> />
) : ( ) : (
<img <img
src={config.httpServer + obj[dataColumn.base52]} src={config.httpServer + obj[dataColumn.base52]}
style={{ width: json.width, height: json.height }} style={{ width: json.width, height: json.height }}
/> />
); );
} }
break; break;
...@@ -2347,7 +2351,7 @@ export default class tableCom extends Component { ...@@ -2347,7 +2351,7 @@ export default class tableCom extends Component {
} }
> >
{(json.isMobileLabel != null && json.isMobileLabel) || {(json.isMobileLabel != null && json.isMobileLabel) ||
(json.isMobileLabel == null && json.isLabel) (json.isMobileLabel == null && json.isLabel)
? title ? title
: ''} : ''}
</MobileList.Item> </MobileList.Item>
...@@ -2541,25 +2545,25 @@ export default class tableCom extends Component { ...@@ -2541,25 +2545,25 @@ export default class tableCom extends Component {
getPopupContainer={ getPopupContainer={
this.props.isDynamic && document.querySelector('#dynamic_div') this.props.isDynamic && document.querySelector('#dynamic_div')
? () => { ? () => {
return document.querySelector('#dynamic_div'); return document.querySelector('#dynamic_div');
} }
: '' : ''
} }
onFocus={() => { onFocus={() => {
get === 'mobile' // 移动端取消输入键盘弹出 get === 'mobile' // 移动端取消输入键盘弹出
? setTimeout(() => { ? setTimeout(() => {
if (document.querySelectorAll(`.ant-select-search__field`).length > 0) { if (document.querySelectorAll(`.ant-select-search__field`).length > 0) {
let ary = [...document.querySelectorAll(`.ant-select-search__field`)]; let ary = [...document.querySelectorAll(`.ant-select-search__field`)];
ary.map(item => { ary.map(item => {
item.setAttribute('readonly', 'readonly'); item.setAttribute('readonly', 'readonly');
// setTimeout(() => { // setTimeout(() => {
// ary.map(arr => { // ary.map(arr => {
// arr.removeAttribute('readonly'); // arr.removeAttribute('readonly');
// }) // })
// }); // });
}); });
} }
}) })
: null; : null;
}} }}
filterOption={(input, option) => filterOption={(input, option) =>
...@@ -2570,10 +2574,10 @@ export default class tableCom extends Component { ...@@ -2570,10 +2574,10 @@ export default class tableCom extends Component {
> >
{options {options
? options.map(r => ( ? options.map(r => (
<Option key={r.value} value={r.value}> <Option key={r.value} value={r.value}>
{r.label} {r.label}
</Option> </Option>
)) ))
: ''} : ''}
</Select>, </Select>,
); );
...@@ -2605,22 +2609,22 @@ export default class tableCom extends Component { ...@@ -2605,22 +2609,22 @@ export default class tableCom extends Component {
json.vlds && json.vlds.length > 0 json.vlds && json.vlds.length > 0
? json.vlds ? json.vlds
: [ : [
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
if ( if (
(Object.keys(value).length == 0 || (Object.keys(value).length == 0 ||
Object.keys(value.selects).length == 0) && Object.keys(value.selects).length == 0) &&
required != null && required != null &&
required required
) { ) {
var errors = []; var errors = [];
errors.push(new Error('请选择至少一个', rule.field)); errors.push(new Error('请选择至少一个', rule.field));
} }
callback(errors); callback(errors);
},
required: required,
}, },
], required: required,
},
],
})( })(
<TableSelect <TableSelect
get={get} get={get}
...@@ -2734,21 +2738,21 @@ export default class tableCom extends Component { ...@@ -2734,21 +2738,21 @@ export default class tableCom extends Component {
onOpenChange={ onOpenChange={
get === 'mobile' get === 'mobile'
? () => { ? () => {
// 取消唤起移动端小键盘 // 取消唤起移动端小键盘
setTimeout(() => { setTimeout(() => {
if (document.querySelector('.ant-calendar-input ')) { if (document.querySelector('.ant-calendar-input ')) {
document
.querySelector('.ant-calendar-input ')
.setAttribute('readonly', 'readonly');
setTimeout(() => {
document document
.querySelector('.ant-calendar-input ') .querySelector('.ant-calendar-input ')
.setAttribute('readonly', 'readonly'); .removeAttribute('readonly');
setTimeout(() => { });
document }
.querySelector('.ant-calendar-input ') });
.removeAttribute('readonly'); }
}); : () => { }
}
});
}
: () => {}
} }
format={json.format ? json.format : 'YYYY-MM-DD HH:mm:ss'} format={json.format ? json.format : 'YYYY-MM-DD HH:mm:ss'}
/>, />,
...@@ -3027,8 +3031,8 @@ export default class tableCom extends Component { ...@@ -3027,8 +3031,8 @@ export default class tableCom extends Component {
/> />
</FormModal> </FormModal>
) : ( ) : (
'' ''
)} )}
<Card.Header title={<span style={{ fontSize: 14 }}>{title}:</span>} /> <Card.Header title={<span style={{ fontSize: 14 }}>{title}:</span>} />
<Card.Body>{cm}</Card.Body> <Card.Body>{cm}</Card.Body>
</Card> </Card>
...@@ -3106,8 +3110,8 @@ export default class tableCom extends Component { ...@@ -3106,8 +3110,8 @@ export default class tableCom extends Component {
/> />
</FormModal> </FormModal>
) : ( ) : (
'' ''
)} )}
</Row> </Row>
); );
} else { } else {
...@@ -3140,8 +3144,8 @@ export default class tableCom extends Component { ...@@ -3140,8 +3144,8 @@ export default class tableCom extends Component {
/> />
</FormModal> </FormModal>
) : ( ) : (
'' ''
)} )}
<Form.Item <Form.Item
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
...@@ -3182,8 +3186,8 @@ export default class tableCom extends Component { ...@@ -3182,8 +3186,8 @@ export default class tableCom extends Component {
/> />
</FormModal> </FormModal>
) : ( ) : (
'' ''
)} )}
{cm} {cm}
</> </>
); );
...@@ -3218,8 +3222,8 @@ export default class tableCom extends Component { ...@@ -3218,8 +3222,8 @@ export default class tableCom extends Component {
/> />
</FormModal> </FormModal>
) : ( ) : (
'' ''
)} )}
{json.isMobileLabel && !isEdit && get == 'mobile' ? ( {json.isMobileLabel && !isEdit && get == 'mobile' ? (
<MobileItem <MobileItem
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
...@@ -3229,8 +3233,8 @@ export default class tableCom extends Component { ...@@ -3229,8 +3233,8 @@ export default class tableCom extends Component {
{cm} {cm}
</MobileItem> </MobileItem>
) : ( ) : (
cm cm
)} )}
</> </>
); );
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论