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

展位组件修改

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