Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhaochengxiang
szse
Commits
e8f0f6b9
Commit
e8f0f6b9
authored
May 07, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉holder
parent
7dad4b57
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
21 deletions
+22
-21
constant.js
src/util/constant.js
+0
-1
EditModel.jsx
src/view/Manage/Model/Component/EditModel.jsx
+16
-14
ImportActionRelation.jsx
src/view/Manage/Model/Component/ImportActionRelation.jsx
+2
-2
start-flow.jsx
src/view/Manage/Model/Component/start-flow.jsx
+2
-2
index.jsx
src/view/Manage/Model/index.jsx
+2
-2
No files found.
src/util/constant.js
View file @
e8f0f6b9
...
...
@@ -16,7 +16,6 @@ export const PermitCheckOut = 'permitCheckOut';
export
const
StateId
=
'sid'
;
export
const
VersionId
=
'vid'
;
export
const
TemplateId
=
'tid'
;
export
const
Holder
=
'holder'
;
export
const
ReadOnly
=
'readOnly'
;
export
const
ApprovalId
=
'approvalId'
;
export
const
ApprovalType
=
'approvalType'
;
...
...
src/view/Manage/Model/Component/EditModel.jsx
View file @
e8f0f6b9
...
...
@@ -10,7 +10,7 @@ import ImportAction from './ImportAction';
import
CatalogModal
from
'./CatalogModal'
;
import
{
dispatchLatest
,
dispatch
}
from
'../../../../model'
;
import
{
getQueryParam
,
isSzseEnv
,
showMessage
,
showNotifaction
}
from
'../../../../util'
;
import
{
Action
,
CatalogId
,
ModelerId
,
Hints
,
ModelerData
,
PermitCheckOut
,
Editable
,
StateId
,
VersionId
,
Holder
,
DDL
,
ReadOnly
,
BranchId
,
ApprovalId
,
ApprovalType
,
TaskId
}
from
'../../../../util/constant'
;
import
{
Action
,
CatalogId
,
ModelerId
,
Hints
,
ModelerData
,
PermitCheckOut
,
Editable
,
StateId
,
VersionId
,
DDL
,
ReadOnly
,
BranchId
,
ApprovalId
,
ApprovalType
,
TaskId
}
from
'../../../../util/constant'
;
import
HistoryAndVersionDrawer
from
'./HistoryAndVersionDrawer'
;
import
{
EditModelContext
}
from
'./ContextManage'
;
import
EditInherited
from
'./EditInherited'
;
...
...
@@ -53,7 +53,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
,
taskId
}
=
actionData
;
const
{
action
,
catalogId
,
modelerId
,
hints
,
roughModelerData
,
permitCheckOut
,
editable
,
stateId
,
versionId
,
ddl
,
readOnly
,
branchId
,
approvalId
,
approvalType
,
taskId
}
=
actionData
;
const
[
form
]
=
Form
.
useForm
();
const
[
modal
,
contextHolder
]
=
Modal
.
useModal
()
...
...
@@ -69,7 +69,6 @@ const EditModel = (props) => {
const
_editable
=
getQueryParam
(
Editable
,
props
.
location
.
search
);
const
_stateId
=
getQueryParam
(
StateId
,
props
.
location
.
search
);
const
_versionId
=
getQueryParam
(
VersionId
,
props
.
location
.
search
);
const
_holder
=
getQueryParam
(
Holder
,
props
.
location
.
search
);
const
_ddl
=
getQueryParam
(
DDL
,
props
.
location
.
search
);
const
_readOnly
=
getQueryParam
(
ReadOnly
,
props
.
location
.
search
);
const
_branchId
=
getQueryParam
(
BranchId
,
props
.
location
.
search
)
...
...
@@ -89,7 +88,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
,
taskId
:
_taskId
});
setActionData
({
action
:
_action
,
catalogId
:
_catalogId
,
modelerId
:
_modelerId
,
hints
:
_hints
,
roughModelerData
:
_roughModelerData
,
permitCheckOut
:
(
_permitCheckOut
===
'true'
),
editable
:
(
_editable
===
'true'
),
stateId
:
_stateId
,
versionId
:
_versionId
,
ddl
:
_ddl
,
readOnly
:
_readOnly
,
branchId
:
_branchId
,
approvalId
:
_approvalId
,
approvalType
:
_approvalType
,
taskId
:
_taskId
});
actionRef
.
current
=
_action
;
if
(
_approvalId
)
{
...
...
@@ -459,19 +458,22 @@ const EditModel = (props) => {
</Space>
)
} else if (action === 'detail') {
let editTip = '', deleteTip = '';
let editTip = '', deleteTip = '', editDisabled = false;
if (modelerData?.inheritedFromEasyDataModelerDataModel) {
editTip = '请到对应的当前表修改';
editDisabled = true;
} else {
if (!editable && stateId !== '4') {
if (stateId === '2') {
editTip = '待发布的模型不允许编辑';
}
if (modelerData?.state?.id === '2') {
editTip = '待发布的模型不允许编辑';
}
if (!permitCheckOut && stateId === '4') {
editTip = `
$
{
holder
||
''
}
正在编辑中
,
不允许再编辑
`;
if (modelerData?.state?.id === '4') {
if (!modelerData?.permitCheckOut) {
editTip = `
$
{
modelerData
?.
holder
||
''
}
正在编辑中
,
不允许再编辑
`;
editDisabled = true;
}
} else if (!editable) {
editDisabled = true;
}
}
...
...
@@ -560,7 +562,7 @@ const EditModel = (props) => {
<PermissionButton
type='primary'
onClick={edit}
disabled={
modelerData?.inheritedFromEasyDataModelerDataModel?true:((stateId==='4')?!permitCheckOut:!editable)
}
disabled={
editDisabled
}
tip={editTip}
tooltipPlacement='topRight'
permissionKey='编辑'
...
...
src/view/Manage/Model/Component/ImportActionRelation.jsx
View file @
e8f0f6b9
...
...
@@ -2,7 +2,7 @@ import React from "react"
import
{
Button
,
Descriptions
,
Space
,
Popover
}
from
"antd"
import
{
DownOutlined
,
UpOutlined
,
QuestionCircleOutlined
}
from
'@ant-design/icons'
import
{
Action
,
ModelerId
,
PermitCheckOut
,
Editable
,
StateId
,
Holder
,
ReadOnly
}
from
'../../../../util/constant'
import
{
Action
,
ModelerId
,
PermitCheckOut
,
Editable
,
StateId
,
ReadOnly
}
from
'../../../../util/constant'
import
{
importActionSubject
}
from
"./ImportAction"
import
'./ImportActionHeader.less'
...
...
@@ -86,7 +86,7 @@ const FC = (props) => {
relationModelerDatas
?.
length
===
0
?
'暂无信息'
:
relationModelerDatas
?.
map
((
item
,
index
)
=>
(
<
a
className=
'mr-3'
key=
{
index
}
onClick=
{
()
=>
{
window
.
open
(
`/data-govern/data-model-action?${Action}=detail&${ModelerId}=${item.id}&${PermitCheckOut}=${item.permitCheckOut||false}&${Editable}=${item.editable||false}&${StateId}=${item.state?.id||''}&${
Holder}=${item.holder||''}&${
ReadOnly}=false`
);
window
.
open
(
`/data-govern/data-model-action?${Action}=detail&${ModelerId}=${item.id}&${PermitCheckOut}=${item.permitCheckOut||false}&${Editable}=${item.editable||false}&${StateId}=${item.state?.id||''}&${ReadOnly}=false`
);
}
}
>
{
item
.
cnName
}
</
a
>
...
...
src/view/Manage/Model/Component/start-flow.jsx
View file @
e8f0f6b9
...
...
@@ -6,7 +6,7 @@ import { useDebounceEffect } from 'ahooks'
import
{
isSzseEnv
,
showMessage
,
showNotifaction
}
from
'../../../../util'
import
Table
from
'../../../../util/Component/Table'
import
produce
from
'immer'
import
{
Action
,
CatalogId
,
Editable
,
Holder
,
ModelerId
,
PermitCheckOut
,
ReadOnly
,
StateId
}
from
'../../../../util/constant'
import
{
Action
,
CatalogId
,
Editable
,
ModelerId
,
PermitCheckOut
,
ReadOnly
,
StateId
}
from
'../../../../util/constant'
import
{
dispatch
}
from
'../../../../model'
const
FC
=
(
props
)
=>
{
...
...
@@ -327,7 +327,7 @@ const List = React.forwardRef(function ({ items }, ref) {
<
Typography
.
Paragraph
ellipsis=
{
{
rows
:
3
,
}
}
><
a
onClick=
{
()
=>
{
window
.
open
(
`/data-govern/data-model-action?${Action}=detail&${ModelerId}=${record.id}&${PermitCheckOut}=${record.permitCheckOut||false}&${Editable}=${record.editable||false}&${StateId}=${record.state?.id||''}&${
Holder}=${record.holder||''}&${
ReadOnly}=false`
);
window
.
open
(
`/data-govern/data-model-action?${Action}=detail&${ModelerId}=${record.id}&${PermitCheckOut}=${record.permitCheckOut||false}&${Editable}=${record.editable||false}&${StateId}=${record.state?.id||''}&${ReadOnly}=false`
);
}
}
>
{
text
}
</
a
></
Typography
.
Paragraph
>
</
Tooltip
>
)
...
...
src/view/Manage/Model/index.jsx
View file @
e8f0f6b9
...
...
@@ -15,7 +15,7 @@ import RecatalogModal from './Component/RecatalogModal';
import
HistoryAndVersionDrawer
from
'./Component/HistoryAndVersionDrawer'
;
import
{
showMessage
,
showNotifaction
,
inputWidth
,
DeleteTipModal
}
from
'../../../util'
;
import
{
dispatch
,
dispatchLatestHomepage
}
from
'../../../model'
;
import
{
Action
,
CatalogId
,
ModelerId
,
Hints
,
ModelerData
,
PermitCheckOut
,
Editable
,
StateId
,
Holder
,
DDL
,
ReadOnly
,
BranchId
}
from
'../../../util/constant'
;
import
{
Action
,
CatalogId
,
ModelerId
,
Hints
,
ModelerData
,
PermitCheckOut
,
Editable
,
StateId
,
DDL
,
ReadOnly
,
BranchId
}
from
'../../../util/constant'
;
import
{
AppContext
}
from
'../../../App'
;
import
DebounceInput
from
'./Component/DebounceInput'
;
import
ColSettingModal
from
'./Component/ColSettingModal'
;
...
...
@@ -384,7 +384,7 @@ class Model extends React.Component {
currentBranchId
=
catalogId
}
window
.
open
(
`/data-govern/data-model-action?
${
Action
}
=
${
importModalAction
}
&
${
CatalogId
}
=
${
currentCatalogId
}
&
${
ModelerId
}
=
${
modelerId
}
&
${
PermitCheckOut
}
=
${
record
.
permitCheckOut
||
false
}
&
${
Editable
}
=
${
record
.
editable
||
false
}
&
${
StateId
}
=
${
record
.
state
?.
id
||
''
}
&
$
{
Holder
}
=
$
{
record
.
holder
||
''
}
&
$
{
ReadOnly
}
=
$
{
readOnly
}
&
$
{
BranchId
}
=
$
{
currentBranchId
}
`);
window
.
open
(
`/data-govern/data-model-action?
${
Action
}
=
${
importModalAction
}
&
${
CatalogId
}
=
${
currentCatalogId
}
&
${
ModelerId
}
=
${
modelerId
}
&
${
PermitCheckOut
}
=
${
record
.
permitCheckOut
||
false
}
&
${
Editable
}
=
${
record
.
editable
||
false
}
&
${
StateId
}
=
${
record
.
state
?.
id
||
''
}
&
$
{
ReadOnly
}
=
$
{
readOnly
}
&
$
{
BranchId
}
=
$
{
currentBranchId
}
`);
});
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment