提交 7f49d813 authored 作者: 钟是志's avatar 钟是志

辅导员备注修改

上级 6a4933ed
...@@ -100,9 +100,6 @@ function AuditButton(props) { ...@@ -100,9 +100,6 @@ function AuditButton(props) {
token: getToken() token: getToken()
}; };
payload = callbackSubmitData(payload); payload = callbackSubmitData(payload);
console.log(payload);
setVisible(false); setVisible(false);
setShowProcessModal(payload); setShowProcessModal(payload);
return false; return false;
......
...@@ -131,10 +131,7 @@ export default function SelectPerson(props) { ...@@ -131,10 +131,7 @@ export default function SelectPerson(props) {
const deleteSg = (x, index, e) => { const deleteSg = (x, index, e) => {
// 阻止事件冒泡 // 阻止事件冒泡
e.stopPropagation(); e.stopPropagation();
console.log(sgUsers);
let sgNew = [...sgUsers]; let sgNew = [...sgUsers];
console.log(x);
debugger;
sgNew = sgNew.filter(g => { sgNew = sgNew.filter(g => {
return x.businessKey !== g.businessKey; return x.businessKey !== g.businessKey;
}); });
......
...@@ -872,6 +872,7 @@ export default class ZdyTable extends Component { ...@@ -872,6 +872,7 @@ export default class ZdyTable extends Component {
} }
let styles = {}; let styles = {};
// console.log(cell.content);
if (cell.content && cell.content.styles) { if (cell.content && cell.content.styles) {
try { try {
styles = JSON.parse(cell.content.styles); styles = JSON.parse(cell.content.styles);
...@@ -895,6 +896,7 @@ export default class ZdyTable extends Component { ...@@ -895,6 +896,7 @@ export default class ZdyTable extends Component {
key={j} key={j}
data-cell-id={cell.uuid || 'no_uuid_' + Math.random() data-cell-id={cell.uuid || 'no_uuid_' + Math.random()
.slice(0, 6)} .slice(0, 6)}
data-com-name={cell.content?.comName || 'empty'}
style={{ style={{
overflow: 'auto', overflow: 'auto',
textAlign: textAlign:
......
...@@ -96,7 +96,6 @@ export default class TableList extends React.Component { ...@@ -96,7 +96,6 @@ export default class TableList extends React.Component {
showHeader={this.props.showHeader} showHeader={this.props.showHeader}
get={this.props.get} get={this.props.get}
isHiddenPage={this.props.isHiddenPage != null ? this.props.isHiddenPage : false} isHiddenPage={this.props.isHiddenPage != null ? this.props.isHiddenPage : false}
loading={this.props.loading}
pageSize={this.props.pageSize || 10} pageSize={this.props.pageSize || 10}
value={{...this.state}} value={{...this.state}}
notShowBack={true} notShowBack={true}
......
...@@ -116,7 +116,7 @@ export default class NormalTable extends Component { ...@@ -116,7 +116,7 @@ export default class NormalTable extends Component {
if (pagination && pagination.total) { if (pagination && pagination.total) {
pagination.showTotal = (total, range) => `共${total}条  `; pagination.showTotal = (total, range) => `共${total}条  `;
} }
// console.log(rowKey);
return ( return (
<Table <Table
dataSource={dataSource} dataSource={dataSource}
......
...@@ -6,7 +6,6 @@ export default function countWidth({ ...@@ -6,7 +6,6 @@ export default function countWidth({
if (json.twidth) { if (json.twidth) {
// 列表宽度配置项 在 组件的 扩展的配置里面 // 列表宽度配置项 在 组件的 扩展的配置里面
showDiv = json.twidth; showDiv = json.twidth;
console.log(showDiv);
return showDiv; return showDiv;
} }
if (document.getElementsByClassName('ant-layout-content')?.length) { if (document.getElementsByClassName('ant-layout-content')?.length) {
......
import React, { useState, useEffect, useMemo, useCallback } from 'react'; import React, { useState, useEffect, useMemo, useCallback, memo, useRef } from 'react';
import { Steps } from 'antd'; import { Steps } from 'antd';
import ZdyTable from '@/webPublic/one_stop_public/Table'; import ZdyTable from '@/webPublic/one_stop_public/Table';
const { Step } = Steps; const { Step } = Steps;
export default function StepDiy(props) { const Child = memo((props) => {
const { value, json, partFormProps } = props; const { value, json, partFormProps } = props;
const diyProps = useMemo(() => { const diyProps = useMemo(
() => {
let b = {}; let b = {};
if (value && typeof value === 'object') { if (value && typeof value === 'object') {
b = { b = {
...@@ -29,11 +30,14 @@ export default function StepDiy(props) { ...@@ -29,11 +30,14 @@ export default function StepDiy(props) {
} else { } else {
return b; return b;
} }
}, [json.otherProps, value]); },
[json.otherProps, value],
);
const [current, setCurrent] = useState(diyProps?.StepsProps?.current || 0); const [current, setCurrent] = useState(diyProps?.StepsProps?.current || 0);
const partFormKey = useMemo(() => { const partFormKey = useMemo(
() => {
if (typeof current !== 'undefined') { if (typeof current !== 'undefined') {
let item = diyProps.Step.find((g, index) => { let item = diyProps.Step.find((g, index) => {
return index === current; return index === current;
...@@ -43,26 +47,30 @@ export default function StepDiy(props) { ...@@ -43,26 +47,30 @@ export default function StepDiy(props) {
} }
} }
return undefined; return undefined;
}, [current]); },
[current],
);
useEffect(() => { useEffect(
() => {
if (diyProps?.StepsProps?.current !== current) { if (diyProps?.StepsProps?.current !== current) {
setCurrent(diyProps?.StepsProps?.current); setCurrent(diyProps?.StepsProps?.current);
} }
}, [diyProps?.StepsProps?.current]); },
[diyProps?.StepsProps?.current],
// console.log(partFormProps.form.getFieldsValue()); );
return ( return (
<div style={diyProps.outSideDivStyle}> <div style={diyProps.outSideDivStyle}>
<Steps {...diyProps.StepsProps} current={current}> <Steps {...diyProps.StepsProps} current={current}>
{Array.isArray(diyProps.Step) && {Array.isArray(diyProps.Step) &&
diyProps.Step.map(g => { diyProps.Step.map((g) => {
return <Step {...g} key={g.title} />; return <Step {...g} key={g.title} />;
})} })}
</Steps> </Steps>
{Array.isArray(diyProps.Step) && {Array.isArray(diyProps.Step) &&
diyProps.Step.filter(g => !!g.formKey).map((g, index) => { diyProps.Step.filter((g) => !!g.formKey).map((g, index) => {
return ( return (
<div key={g.formKey} style={{ display: partFormKey === g.formKey ? 'block' : 'none' }}> <div key={g.formKey} style={{ display: partFormKey === g.formKey ? 'block' : 'none' }}>
<ZdyTable <ZdyTable
...@@ -70,6 +78,7 @@ export default function StepDiy(props) { ...@@ -70,6 +78,7 @@ export default function StepDiy(props) {
currentFormTitle={'Steps组件的子表单' + g.formKey} currentFormTitle={'Steps组件的子表单' + g.formKey}
key={g.formKey} key={g.formKey}
currentFormKey={g.formKey} currentFormKey={g.formKey}
form={props.form}
{...partFormProps?.datas[g.formKey]} {...partFormProps?.datas[g.formKey]}
/> />
</div> </div>
...@@ -77,4 +86,16 @@ export default function StepDiy(props) { ...@@ -77,4 +86,16 @@ export default function StepDiy(props) {
})} })}
</div> </div>
); );
});
export default function StepDiy(props){
const { value, json, partFormProps, form } = props;
const js = useRef();
useEffect(() => {
js.current = json;
}, []);
if (!js.current) {
return null;
}
return <Child json={js.current} value={value} partFormProps={partFormProps} form={form} />;
} }
...@@ -90,8 +90,6 @@ const { MonthPicker, WeekPicker } = DatePicker; ...@@ -90,8 +90,6 @@ const { MonthPicker, WeekPicker } = DatePicker;
*/ */
const { TextArea } = Input; const { TextArea } = Input;
const { Option } = Select; const { Option } = Select;
const { RangePicker } = DatePicker;
const { TabPane } = Tabs;
const giveRender = (column = {}) => { const giveRender = (column = {}) => {
if (!column?.render) { if (!column?.render) {
...@@ -1648,16 +1646,9 @@ export default class TableCom extends Component { ...@@ -1648,16 +1646,9 @@ export default class TableCom extends Component {
init: init, init: init,
formCode: this.props.formCode, formCode: this.props.formCode,
formId: this.props.formId, formId: this.props.formId,
form: this.props.form,
mapData: mapData, mapData: mapData,
sqlData: sqlData, sqlData: sqlData,
defaultValues: defaultValues, defaultValues: defaultValues,
// currentFormTitle={
// this.props.getCurrentFormTitle ? this.props.getCurrentFormTitle(fk) : null
// }
// key={fk}
// currentFormKey={fk}
// {...datas[fk]}
}; };
} }
...@@ -1682,6 +1673,7 @@ export default class TableCom extends Component { ...@@ -1682,6 +1673,7 @@ export default class TableCom extends Component {
key={fk} key={fk}
currentFormKey={fk} currentFormKey={fk}
{...datas[fk]} {...datas[fk]}
form={this.props.form}
/> />
</> </>
); );
...@@ -3671,6 +3663,7 @@ ${obj[dataColumn.base52]} ...@@ -3671,6 +3663,7 @@ ${obj[dataColumn.base52]}
disabled={disabled} disabled={disabled}
uuid={uuid} uuid={uuid}
partFormProps={this.partFormProps} partFormProps={this.partFormProps}
form={this.props.form}
/>, />,
); );
break; break;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论