提交 6bab0eef authored 作者: 钟是志's avatar 钟是志

TODO 按钮组件修改

上级 9169588c
...@@ -2,7 +2,7 @@ import React from 'react'; ...@@ -2,7 +2,7 @@ import React from 'react';
import RenderForm from '@/webPublic/FormInsertDiy/RenderForm'; import RenderForm from '@/webPublic/FormInsertDiy/RenderForm';
import { fetchTemplateById } from '@/webPublic/Services'; import { fetchTemplateById } from '@/webPublic/Services';
import { useState, useEffect } from 'react'; import { useState, useEffect } from 'react';
import { Form } from 'antd'; import { Form, Modal } from 'antd';
import { getOneStopConfig } from '@/webPublic/zyd_public/utils/utils'; import { getOneStopConfig } from '@/webPublic/zyd_public/utils/utils';
// const id = '1234718972352397312'; // const id = '1234718972352397312';
...@@ -23,6 +23,17 @@ function OtherCheckRecord({ workId, ...otherProps }) { ...@@ -23,6 +23,17 @@ function OtherCheckRecord({ workId, ...otherProps }) {
if (!data) { if (!data) {
return null; return null;
}
if (window.zdyTableTemplateWillMountProps?.showComponentType === 'ModalAndSmartForm') {
// 25841 学生资助管理/勤工助学-用工部门/学生申请岗位审核,2020010375 发送面试邀请后 学生没有收到 邀请信息
// 通过增加配置项 达到 弹窗中嵌入表单的效果.
const { ModalAndSmartForm_ModalProps } = window.zdyTableTemplateWillMountProps;
const FormNew = Form.create(window.zdyTableTemplateWillMountProps?.formCreateOptions || undefined)(RenderForm);
const { ModalAndSmartFormProps } = otherProps;
window.ModalAndSmartFormProps = ModalAndSmartFormProps;
return <Modal {...ModalAndSmartForm_ModalProps}>
<FormNew postData={data} style={{ padding: 0 }} />
</Modal>;
} else { } else {
const FormNew = Form.create(window.zdyTableTemplateWillMountProps?.formCreateOptions || undefined)(RenderForm); const FormNew = Form.create(window.zdyTableTemplateWillMountProps?.formCreateOptions || undefined)(RenderForm);
return <FormNew postData={data} style={{ padding: 0 }} />; return <FormNew postData={data} style={{ padding: 0 }} />;
......
...@@ -821,6 +821,7 @@ export default class ZdyTable extends Component { ...@@ -821,6 +821,7 @@ export default class ZdyTable extends Component {
<tbody> <tbody>
{items.map((row, i) => { {items.map((row, i) => {
const allhidden = this.checkAllHidden(row); const allhidden = this.checkAllHidden(row);
// console.log(row);
return ( return (
<tr key={i}> <tr key={i}>
{row.map((cell, j) => { {row.map((cell, j) => {
...@@ -849,6 +850,7 @@ export default class ZdyTable extends Component { ...@@ -849,6 +850,7 @@ export default class ZdyTable extends Component {
rowSpan={cell.row} rowSpan={cell.row}
colSpan={cell.col} colSpan={cell.col}
key={j} key={j}
data-cell-id={cell.uuid || 'no_uuid_' + Math.random().slice(0,6)}
style={{ style={{
overflow: 'auto', overflow: 'auto',
textAlign: textAlign:
......
...@@ -2628,6 +2628,7 @@ export default class tableCom extends Component { ...@@ -2628,6 +2628,7 @@ export default class tableCom extends Component {
children: json.initialValue, children: json.initialValue,
...events, ...events,
}; };
console.log(events); // 按钮组件修改
if (json.isLink) { if (json.isLink) {
cm = <a {...ev} />; cm = <a {...ev} />;
} else { } else {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论