Commit e4acdc96 by zhaochengxiang

审批隐藏重点关注按钮

parent a5b16f1c
......@@ -472,6 +472,7 @@ const ImportAction = (props) => {
onChange={onTableChange}
editable={action!=='detail'&&action!=='flow'&&action!=='detail-version'}
action={action}
originAction={getQueryParam(Action, props?.location?.search)}
terms={terms}
/>
<ImportActionIndex
......
......@@ -9,12 +9,13 @@ import { useContextMenu, Menu as RcMenu, Item as RcItem } from "react-contexify"
import ResizeObserver from 'rc-resize-observer';
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 { addEventListenerForSidebar, removeEventListenerForSidebar } from './Help';
import { AppContext } from '../../../../App';
import DebounceInput from './DebounceInput';
import SuggestTable from './SuggestTable';
import { Action } from '../../../../util/constant';
import './ImportActionTable.less';
......@@ -274,7 +275,7 @@ const DragableBodyRow = ({ index, moveRow, className, style, ...restProps }) =>
};
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 [ form ] = Form.useForm();
......@@ -920,7 +921,7 @@ const ImportActionTable = (props) => {
{
title: '操作',
dataIndex: 'action',
width: (action==='flow')?220:130,
width: (action==='flow')?220: ((originAction==='flow')?90:130),
fixed: 'right',
render: (_, record) => {
return (
......@@ -963,7 +964,8 @@ const ImportActionTable = (props) => {
editable && <React.Fragment>
{
<React.Fragment>
<Tooltip title={record.needAttention ? '取消送审关注': '送审关注'}>
{
(originAction!=='flow') && <Tooltip title={record.needAttention ? '取消送审关注': '送审关注'}>
<Button
className='mr-3'
size='small'
......@@ -977,16 +979,27 @@ const ImportActionTable = (props) => {
record.needAttention = !record.needAttention;
}
setData(data);
moveRowRef.current.data = data;
onChange && onChange(data, false);
const newData = [...moveRowRef.current.data];
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) {
preSaveDataModel(record);
}
}
}}
/>
</Tooltip>
}
<Button
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