提交 96bd6c32 authored 作者: 钟是志's avatar 钟是志

展位组件修改

上级 1ab86321
...@@ -10,19 +10,9 @@ export default function TableSelectNormal(props) { ...@@ -10,19 +10,9 @@ export default function TableSelectNormal(props) {
columns3, allWidth, columns3, allWidth,
get, otherProps, get, otherProps,
} = props; } = props;
const [thisOtherProps, setThisOtherProps] = useState(null);
useEffect(() => {
if (otherProps && otherProps.length) {
try {
let thisOtherPropsN = new Function(otherProps)();
setThisOtherProps(thisOtherPropsN);
} catch (e) {
}
}
}, [otherProps]);
if(thisOtherProps && thisOtherProps.showType === 'card-select'){ if(otherProps && otherProps.showType === 'card-select'){
return <TableSelectZhanWei {...props} otherProps={thisOtherProps}/>; return <TableSelectZhanWei {...props} otherProps={otherProps}/>;
} }
return ( return (
<Fragment> <Fragment>
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
* 2022年5月31日 * 2022年5月31日
* 禅道需求定制化 * 禅道需求定制化
* 27141 [黔南]门户---单位个人中心,,双选会申请可视化展示,,发布到门户后,在邀请函页面也可视化展示 * 27141 [黔南]门户---单位个人中心,,双选会申请可视化展示,,发布到门户后,在邀请函页面也可视化展示
* 27345 门户--单位个人中心,,,双选会申请,选择展位的图片优化
* */ * */
import React, { Fragment } from 'react'; import React, { Fragment } from 'react';
import { Tag, Radio } from 'antd'; import { Tag, Radio } from 'antd';
......
.ModalDiy{
:global{
.ant-modal-footer{
text-align: center;
}
.ant-modal-body{
padding: 12px;
}
}
}
.zhanWei{ .zhanWei{
//padding: 10px; //padding: 10px;
.header{ .header{
......
...@@ -4,8 +4,10 @@ import FormList from "./formList/index"; ...@@ -4,8 +4,10 @@ import FormList from "./formList/index";
import { connect } from "dva"; import { connect } from "dva";
import { getModal } from '@/webPublic/one_stop_public/utils/utils'; import { getModal } from '@/webPublic/one_stop_public/utils/utils';
import TableSelectNormal from '@/webPublic/one_stop_public/libs/Split/TableSelectNormal'; import TableSelectNormal from '@/webPublic/one_stop_public/libs/Split/TableSelectNormal';
import styles from './Split/styles.less';
const Modal = getModal(); const Modal = getModal();
@connect(({ DataColumn, SqlManageEntity, loading }) => ({ @connect(({ DataColumn, SqlManageEntity, loading }) => ({
DataColumn, DataColumn,
SqlManageEntity, SqlManageEntity,
...@@ -15,7 +17,14 @@ export default class TableSelect extends React.Component { ...@@ -15,7 +17,14 @@ export default class TableSelect extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
const value = props.value || {}; const value = props.value || {};
this.otherProps = {};
if (props.json.otherProps && props.json.otherProps.length) {
try {
this.otherProps = new Function(props.json.otherProps)();
} catch (e) {
console.log('TableSelect组件 otherProps 获取失败')
}
}
this.state = { this.state = {
selects: value.selects || {}, selects: value.selects || {},
visiable: value.visiable, visiable: value.visiable,
...@@ -165,14 +174,14 @@ export default class TableSelect extends React.Component { ...@@ -165,14 +174,14 @@ export default class TableSelect extends React.Component {
render() { render() {
const { const {
json: { isMultiple, sql, optionType, showTable, isShowQuanXuan, otherProps }, json: { isMultiple, sql, optionType, showTable, isShowQuanXuan },
dataColumn: { referenceObjId }, dataColumn: { referenceObjId },
sqlModel, sqlModel,
columns, columns,
dataSource, dataSource,
disabled, disabled,
} = this.props; } = this.props;
// console.log(JSON.stringify(columns?.map((g) => g.width) )); const { cardSelectModalProps = {} } = this.otherProps;
let { valueName, labelName } = this.props.json; let { valueName, labelName } = this.props.json;
if (optionType == 'reference' && referenceObjId) { if (optionType == 'reference' && referenceObjId) {
...@@ -268,13 +277,22 @@ export default class TableSelect extends React.Component { ...@@ -268,13 +277,22 @@ export default class TableSelect extends React.Component {
{visiable && ( {visiable && (
<Modal <Modal
className={styles.ModalDiy}
width={this.props.get === 'mobile' ? '100%' : '60%'} width={this.props.get === 'mobile' ? '100%' : '60%'}
maskClosable={false} maskClosable={false}
title={`请选择`} title={`请选择`}
visible={visiable} visible={visiable}
// footer={null} // footer={[
// <Button key="back"
// onClick={this.closeModal}
// type={'primary'}
// >
// 确定
// </Button>,
// ]}
onOk={this.closeModal} onOk={this.closeModal}
onCancel={this.closeModal} onCancel={this.closeModal}
{...cardSelectModalProps}
> >
{optionType === 'reference' ? ( {optionType === 'reference' ? (
referenceObjId ? ( referenceObjId ? (
...@@ -315,7 +333,7 @@ export default class TableSelect extends React.Component { ...@@ -315,7 +333,7 @@ export default class TableSelect extends React.Component {
valueName={valueName} valueName={valueName}
dataSource={dataSource} dataSource={dataSource}
columns3={columns3} columns3={columns3}
otherProps={otherProps} otherProps={this.otherProps}
get={this.props.get} get={this.props.get}
selects={this.state.selects} selects={this.state.selects}
callback={this.select} callback={this.select}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论