Commit e4acdc96 by zhaochengxiang

审批隐藏重点关注按钮

parent a5b16f1c
...@@ -472,6 +472,7 @@ const ImportAction = (props) => { ...@@ -472,6 +472,7 @@ const ImportAction = (props) => {
onChange={onTableChange} onChange={onTableChange}
editable={action!=='detail'&&action!=='flow'&&action!=='detail-version'} editable={action!=='detail'&&action!=='flow'&&action!=='detail-version'}
action={action} action={action}
originAction={getQueryParam(Action, props?.location?.search)}
terms={terms} terms={terms}
/> />
<ImportActionIndex <ImportActionIndex
......
...@@ -9,12 +9,13 @@ import { useContextMenu, Menu as RcMenu, Item as RcItem } from "react-contexify" ...@@ -9,12 +9,13 @@ import { useContextMenu, Menu as RcMenu, Item as RcItem } from "react-contexify"
import ResizeObserver from 'rc-resize-observer'; import ResizeObserver from 'rc-resize-observer';
import { Resizable } from 'react-resizable'; import { Resizable } from 'react-resizable';
import { generateUUID, highlightSearchContentByTerms, showMessage, inputWidth, paginate } from '../../../../util'; import { generateUUID, highlightSearchContentByTerms, showMessage, inputWidth, paginate, getQueryParam } from '../../../../util';
import { dispatch, dispatchLatest } from '../../../../model'; import { dispatch, dispatchLatest } from '../../../../model';
import { addEventListenerForSidebar, removeEventListenerForSidebar } from './Help'; import { addEventListenerForSidebar, removeEventListenerForSidebar } from './Help';
import { AppContext } from '../../../../App'; import { AppContext } from '../../../../App';
import DebounceInput from './DebounceInput'; import DebounceInput from './DebounceInput';
import SuggestTable from './SuggestTable'; import SuggestTable from './SuggestTable';
import { Action } from '../../../../util/constant';
import './ImportActionTable.less'; import './ImportActionTable.less';
...@@ -274,7 +275,7 @@ const DragableBodyRow = ({ index, moveRow, className, style, ...restProps }) => ...@@ -274,7 +275,7 @@ const DragableBodyRow = ({ index, moveRow, className, style, ...restProps }) =>
}; };
const ImportActionTable = (props) => { const ImportActionTable = (props) => {
const { modelerData, onChange, editable, supportedDatatypes, constraint, template, validateReports, type = 'model', terms, action } = props; const { modelerData, onChange, editable, supportedDatatypes, constraint, template, validateReports, type = 'model', terms, action, originAction } = props;
const [ data, setData ] = useState([]); const [ data, setData ] = useState([]);
const [ form ] = Form.useForm(); const [ form ] = Form.useForm();
...@@ -920,7 +921,7 @@ const ImportActionTable = (props) => { ...@@ -920,7 +921,7 @@ const ImportActionTable = (props) => {
{ {
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
width: (action==='flow')?220:130, width: (action==='flow')?220: ((originAction==='flow')?90:130),
fixed: 'right', fixed: 'right',
render: (_, record) => { render: (_, record) => {
return ( return (
...@@ -963,7 +964,8 @@ const ImportActionTable = (props) => { ...@@ -963,7 +964,8 @@ const ImportActionTable = (props) => {
editable && <React.Fragment> editable && <React.Fragment>
{ {
<React.Fragment> <React.Fragment>
<Tooltip title={record.needAttention ? '取消送审关注': '送审关注'}> {
(originAction!=='flow') && <Tooltip title={record.needAttention ? '取消送审关注': '送审关注'}>
<Button <Button
className='mr-3' className='mr-3'
size='small' size='small'
...@@ -977,16 +979,27 @@ const ImportActionTable = (props) => { ...@@ -977,16 +979,27 @@ const ImportActionTable = (props) => {
record.needAttention = !record.needAttention; record.needAttention = !record.needAttention;
} }
setData(data); const newData = [...moveRowRef.current.data];
moveRowRef.current.data = data;
onChange && onChange(data, false); const index = newData.findIndex((item) => record.iid === item.iid);
if (index !== -1) {
newData.splice(index, 1, record);
setData(newData);
moveRowRef.current.data = newData;
onChange && onChange(newData, false);
if (!record.needAttention) { if (!record.needAttention) {
preSaveDataModel(record); preSaveDataModel(record);
} }
}
}} }}
/> />
</Tooltip> </Tooltip>
}
<Button <Button
className='mr-3' className='mr-3'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment