Commit 57c19765 by zhaochengxiang

流程增加taskId

parent 6f420ec8
......@@ -20,6 +20,7 @@ export const Holder = 'holder';
export const ReadOnly = 'readOnly';
export const ApprovalId = 'approvalId';
export const ApprovalType = 'approvalType';
export const TaskId = 'taskId';
export const DataModelerRoleAdmin = 'admin';
export const DataModelerRoleUser = 'user';
......
......@@ -9,7 +9,7 @@ import ImportAction from './ImportAction';
import CatalogModal from './CatalogModal';
import { dispatchLatest, dispatch } from '../../../../model';
import { getQueryParam, showMessage, showNotifaction } from '../../../../util';
import { Action, CatalogId, ModelerId, Hints, ModelerData, PermitCheckOut, Editable, StateId, VersionId, Holder, DDL, ReadOnly, BranchId, ApprovalId, ApprovalType } from '../../../../util/constant';
import { Action, CatalogId, ModelerId, Hints, ModelerData, PermitCheckOut, Editable, StateId, VersionId, Holder, DDL, ReadOnly, BranchId, ApprovalId, ApprovalType, TaskId } from '../../../../util/constant';
import HistoryAndVersionDrawer from './HistoryAndVersionDrawer';
import { EditModelContext } from './ContextManage';
import EditInherited from './EditInherited';
......@@ -23,7 +23,7 @@ import './EditModel.less';
const EditModel = (props) => {
const [ actionData, setActionData ] = useState({ action: '', catalogId: '', modelerId: '', hints: [], roughModelerData: null, permitCheckOut: false, editable: false, stateId: '', versionId: '', ddl: '', readOnly: false, branchId: '', approvalId: '', approvalType: '' });
const [ actionData, setActionData ] = useState({ action: '', catalogId: '', modelerId: '', hints: [], roughModelerData: null, permitCheckOut: false, editable: false, stateId: '', versionId: '', ddl: '', readOnly: false, branchId: '', approvalId: '', approvalType: '', taskId: '' });
const [ modelerData, setModelerData ] = useState({});
const [ terms, setTerms ] = useState([]);
......@@ -51,7 +51,7 @@ const EditModel = (props) => {
const attrIsEditingRef = useRef(false);
const indexIsEditingRef = useRef(false);
const { action, catalogId, modelerId, hints, roughModelerData, permitCheckOut, editable, stateId, versionId, holder, ddl, readOnly, branchId, approvalId, approvalType } = actionData;
const { action, catalogId, modelerId, hints, roughModelerData, permitCheckOut, editable, stateId, versionId, holder, ddl, readOnly, branchId, approvalId, approvalType, taskId } = actionData;
const [form] = Form.useForm();
const [modal, contextHolder] = Modal.useModal()
......@@ -73,6 +73,7 @@ const EditModel = (props) => {
const _branchId = getQueryParam(BranchId, props.location.search)
const _approvalId = getQueryParam(ApprovalId, props.location.search)
const _approvalType = getQueryParam(ApprovalType, props.location.search)
const _taskId = getQueryParam(TaskId, props.location.search)
let _hints = [];
if ((_hintsStr||'') !== '') {
......@@ -86,7 +87,7 @@ const EditModel = (props) => {
judgeAttributeRepeat(_roughModelerData.easyDataModelerDataModelAttributes);
}
setActionData({ action: _action, catalogId: _catalogId, modelerId: _modelerId, hints: _hints, roughModelerData: _roughModelerData, permitCheckOut: (_permitCheckOut==='true'), editable: (_editable==='true'), stateId: _stateId, versionId: _versionId, holder: _holder, ddl: _ddl, readOnly: _readOnly, branchId: _branchId, approvalId: _approvalId, approvalType: _approvalType });
setActionData({ action: _action, catalogId: _catalogId, modelerId: _modelerId, hints: _hints, roughModelerData: _roughModelerData, permitCheckOut: (_permitCheckOut==='true'), editable: (_editable==='true'), stateId: _stateId, versionId: _versionId, holder: _holder, ddl: _ddl, readOnly: _readOnly, branchId: _branchId, approvalId: _approvalId, approvalType: _approvalType, taskId: _taskId });
actionRef.current = _action;
if (_approvalId) {
......@@ -590,6 +591,7 @@ const EditModel = (props) => {
loading={loadingApprovalData}
data={approvalData}
id={currentApprovalModelId}
taskId={taskId}
type={approvalType}
onExport={() => {
setExportParams({ visible: true })
......@@ -731,7 +733,7 @@ const EditModel = (props) => {
export default EditModel;
const PhysicalModelApprovalBottom = ({ loading, type, data, id, onChange, onOk, onHistory, onExport }) => {
const PhysicalModelApprovalBottom = ({ loading, type, data, id, taskId, onChange, onOk, onHistory, onExport }) => {
const [item, setItem] = useState()
const [waiting, setWaiting] = useState(false)
......@@ -792,6 +794,7 @@ const PhysicalModelApprovalBottom = ({ loading, type, data, id, onChange, onOk,
type: 'datamodel.updatePhysicalModelApproval',
payload: {
params: {
taskId,
physicalModelApprovalId: data?.id,
},
data: newModelInfoList,
......
......@@ -178,7 +178,7 @@ const ModelTable = (props) => {
return (
<div className='flex' style={{ alignItems: 'center' }}>
{
view === 'branch' && (behindAlramData??[]).indexOf(props.row.id)!== -1 && <Tooltip title='基线模型有变更'>
view === 'branch' && (behindAlramData??[]).findIndex(item => item.id === props.row.id) !== -1 && <Tooltip title='基线模型有变更'>
<Button size='small' type='text' icon={<ExclamationCircleFilled className='pointer' style={{ fontSize: 18, color: '#E94848' }} />} />
</Tooltip>
}
......
......@@ -5,7 +5,7 @@ import produce from "immer"
import Table from '../../../util/Component/Table'
import { isSzseEnv, getQueryParam, showMessage } from "../../../util"
import { dispatch } from '../../../model';
import { Action, ApprovalId, ApprovalType, ModelerId } from "../../../util/constant"
import { Action, ApprovalId, ApprovalType, ModelerId, TaskId } from "../../../util/constant"
const FC = (props) => {
const [loading, setLoading] = React.useState(false)
......@@ -15,6 +15,7 @@ const FC = (props) => {
const id = getQueryParam('id', props.location?.search)
const type = getQueryParam('type', props.location?.search)
const taskId = getQueryParam('taskId', props.location?.search)
const listRef = React.useRef()
......@@ -60,6 +61,7 @@ const FC = (props) => {
type: 'datamodel.updatePhysicalModelApproval',
payload: {
params: {
taskId,
physicalModelApprovalId: id,
},
data: tableData
......@@ -90,6 +92,7 @@ const FC = (props) => {
type: 'datamodel.commitPhysicalModelApproval',
payload: {
params: {
taskId,
physicalModelApprovalId: id,
...rows,
},
......@@ -161,7 +164,7 @@ const FC = (props) => {
</Form.Item>
</Form>
</div>
<List ref={listRef} type={type} data={data} />
<List ref={listRef} type={type} data={data} taskId={taskId} />
</div>
</Spin>
)
......@@ -169,7 +172,7 @@ const FC = (props) => {
export default FC
const List = React.forwardRef(function ({type, data}, ref) {
const List = React.forwardRef(function ({type, data, taskId}, ref) {
const [tableData, setTableData] = React.useState()
const [form] = Form.useForm()
......@@ -337,7 +340,7 @@ const List = React.forwardRef(function ({type, data}, ref) {
]
const onModelClick = (record, index) => {
window.open(`/data-govern/data-model-action?${Action}=flow&${ModelerId}=${record?.id}&${ApprovalId}=${data?.id}&${ApprovalType}=${type}`)
window.open(`/data-govern/data-model-action?${Action}=flow&${ModelerId}=${record?.id}&${ApprovalId}=${data?.id}&${ApprovalType}=${type}&${TaskId}=${taskId}`)
}
return (
......
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