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
ffe61fe4
Commit
ffe61fe4
authored
Nov 08, 2021
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设置模型列宽度
parent
9f382d94
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
31 deletions
+34
-31
axios.js
src/util/axios.js
+4
-6
index.js
src/util/index.js
+4
-0
ImportActionTable.jsx
src/view/Manage/Model/Component/ImportActionTable.jsx
+21
-20
ModelTable.jsx
src/view/Manage/Model/Component/ModelTable.jsx
+3
-3
index.jsx
src/view/Manage/Model/index.jsx
+2
-2
No files found.
src/util/axios.js
View file @
ffe61fe4
import
axios
from
'axios'
;
import
axios
from
'axios'
;
import
{
IsArr
}
from
'./index'
;
import
{
IsArr
,
showMessage
,
isSzseEnv
}
from
'./index'
;
import
{
showMessage
}
from
'./index'
;
const
CancelToken
=
axios
.
CancelToken
;
const
CancelToken
=
axios
.
CancelToken
;
const
baseURL
=
'/api/'
;
const
baseURL
=
'/api/'
;
...
@@ -88,10 +87,9 @@ const callback = resp => {
...
@@ -88,10 +87,9 @@ const callback = resp => {
if
(
resp
.
status
===
401
)
{
if
(
resp
.
status
===
401
)
{
showMessage
(
'warn'
,
'session过期,请重新登录!'
);
showMessage
(
'warn'
,
'session过期,请重新登录!'
);
//外网
window
.
location
.
href
=
"/center-home/view/login"
window
.
location
.
href
=
isSzseEnv
?
"/api/auth/login"
:
"/center-home/view/login"
//内网
// window.location.href="/api/auth/login"
return
null
;
return
null
;
}
}
else
if
(
resp
.
status
!==
200
)
{
else
if
(
resp
.
status
!==
200
)
{
...
...
src/util/index.js
View file @
ffe61fe4
...
@@ -4,6 +4,10 @@ import { Redirect } from 'react-router-dom';
...
@@ -4,6 +4,10 @@ import { Redirect } from 'react-router-dom';
import
{
dispatchLatest
,
action
}
from
'../model'
;
import
{
dispatchLatest
,
action
}
from
'../model'
;
import
{
set_sess_state
}
from
"../model/reducer"
;
import
{
set_sess_state
}
from
"../model/reducer"
;
//内网深交所环境 isSzseEnv true
//元曜公网环境 isSzseEnv false
export
const
isSzseEnv
=
false
;
export
const
ContextPath
=
'/data-govern'
;
export
const
ContextPath
=
'/data-govern'
;
const
routeMap
=
{};
const
routeMap
=
{};
...
...
src/view/Manage/Model/Component/ImportActionTable.jsx
View file @
ffe61fe4
...
@@ -541,14 +541,15 @@ const ImportActionTable = (props) => {
...
@@ -541,14 +541,15 @@ const ImportActionTable = (props) => {
render
:
(
_
,
record
,
__
)
=>
{
render
:
(
_
,
record
,
__
)
=>
{
if
(
record
?.
datatype
)
{
if
(
record
?.
datatype
)
{
let
_text
=
`名称:
${
record
.
datatype
.
name
||
''
}
`
;
if
((
record
?.
datatype
?.
name
===
'Char'
||
record
?.
datatype
?.
name
===
'Varchar'
)
&&
record
?.
datatype
?.
parameterValues
?.
length
>
0
)
{
(
record
.
datatype
.
parameterCnNames
||
[]).
forEach
((
cnName
,
index
)
=>
{
return
`
${
record
?.
datatype
?.
name
||
''
}(
$
{(
record
?.
datatype
?.
parameterValues
[
0
]?
record
.
datatype
.
parameterValues
[
0
]:
0
)})
`;
_text
+=
`
${
cnName
}
:
${(
record
.
datatype
.
parameterValues
[
index
]?
record
.
datatype
.
parameterValues
[
index
]:
0
)}
`
;
} else if (record?.datatype?.name==='Decimal'&& record?.datatype?.parameterValues?.length>1) {
})
return `
$
{
record
?.
datatype
?.
name
||
''
}(
$
{(
record
?.
datatype
?.
parameterValues
[
0
]?
record
.
datatype
.
parameterValues
[
0
]:
0
)},
$
{(
record
?.
datatype
?.
parameterValues
[
1
]?
record
.
datatype
.
parameterValues
[
1
]:
0
)})
`;
}
return
_text
;
return
record.datatype.name||''
;
}
}
return '';
return '';
...
@@ -650,11 +651,12 @@ const ImportActionTable = (props) => {
...
@@ -650,11 +651,12 @@ const ImportActionTable = (props) => {
}
}
},
},
{
{
title
:
'
默认值
'
,
title: '
描述
',
dataIndex
:
'
defaultValue
'
,
dataIndex: '
remark
',
editable: true,
editable: true,
ellipsis: true,
ellipsis: true,
width
:
100
,
require: true,
width: 200,
render: (text, _, __) => {
render: (text, _, __) => {
return (
return (
<Tooltip title={text||''}>
<Tooltip title={text||''}>
...
@@ -666,11 +668,11 @@ const ImportActionTable = (props) => {
...
@@ -666,11 +668,11 @@ const ImportActionTable = (props) => {
}
}
},
},
{
{
title
:
'
业务定义
'
,
title: '
默认值
',
dataIndex
:
'def
inition
'
,
dataIndex: 'def
aultValue
',
editable: true,
editable: true,
ellipsis: true,
ellipsis: true,
width
:
2
00
,
width:
1
00,
render: (text, _, __) => {
render: (text, _, __) => {
return (
return (
<Tooltip title={text||''}>
<Tooltip title={text||''}>
...
@@ -682,11 +684,11 @@ const ImportActionTable = (props) => {
...
@@ -682,11 +684,11 @@ const ImportActionTable = (props) => {
}
}
},
},
{
{
title
:
'
值域
'
,
title: '
业务定义
',
dataIndex
:
'
valueRange
'
,
dataIndex: '
definition
',
editable: true,
editable: true,
ellipsis: true,
ellipsis: true,
width
:
1
00
,
width:
2
00,
render: (text, _, __) => {
render: (text, _, __) => {
return (
return (
<Tooltip title={text||''}>
<Tooltip title={text||''}>
...
@@ -698,12 +700,11 @@ const ImportActionTable = (props) => {
...
@@ -698,12 +700,11 @@ const ImportActionTable = (props) => {
}
}
},
},
{
{
title
:
'
描述
'
,
title: '
值域
',
dataIndex
:
'
remark
'
,
dataIndex: '
valueRange
',
editable: true,
editable: true,
ellipsis: true,
ellipsis: true,
require
:
true
,
width: 100,
width
:
200
,
render: (text, _, __) => {
render: (text, _, __) => {
return (
return (
<Tooltip title={text||''}>
<Tooltip title={text||''}>
...
@@ -794,7 +795,7 @@ const ImportActionTable = (props) => {
...
@@ -794,7 +795,7 @@ const ImportActionTable = (props) => {
const validateColumn = {
const validateColumn = {
title: '规范',
title: '规范',
dataIndex: 'validate',
dataIndex: 'validate',
width
:
18
0
,
width:
20
0,
fixed: 'right',
fixed: 'right',
render: (text, record, index) => {
render: (text, record, index) => {
let shortCauses = [];
let shortCauses = [];
...
...
src/view/Manage/Model/Component/ModelTable.jsx
View file @
ffe61fe4
...
@@ -5,7 +5,7 @@ import SmoothScroll from 'smooth-scroll';
...
@@ -5,7 +5,7 @@ import SmoothScroll from 'smooth-scroll';
import
classnames
from
'classnames'
;
import
classnames
from
'classnames'
;
import
{
dispatch
}
from
'../../../../model'
;
import
{
dispatch
}
from
'../../../../model'
;
import
{
showMessage
,
getQueryParam
,
paginate
}
from
'../../../../util'
;
import
{
showMessage
,
getQueryParam
,
paginate
,
isSzseEnv
}
from
'../../../../util'
;
import
{
AnchorId
,
AnchorTimestamp
,
Action
,
CatalogId
,
ModelerId
}
from
'../../../../util/constant'
;
import
{
AnchorId
,
AnchorTimestamp
,
Action
,
CatalogId
,
ModelerId
}
from
'../../../../util/constant'
;
import
'./ModelTable.less'
;
import
'./ModelTable.less'
;
...
@@ -54,7 +54,7 @@ const ModelTable = (props) => {
...
@@ -54,7 +54,7 @@ const ModelTable = (props) => {
{
{
title
:
'模型名称'
,
title
:
'模型名称'
,
dataIndex
:
'name'
,
dataIndex
:
'name'
,
width
:
180
,
width
:
isSzseEnv
?
360
:
180
,
ellipsis
:
true
,
ellipsis
:
true
,
render
:
(
text
,
record
,
_
)
=>
{
render
:
(
text
,
record
,
_
)
=>
{
return
(
return
(
...
@@ -69,7 +69,7 @@ const ModelTable = (props) => {
...
@@ -69,7 +69,7 @@ const ModelTable = (props) => {
{
{
title
:
'中文名称'
,
title
:
'中文名称'
,
dataIndex
:
'cnName'
,
dataIndex
:
'cnName'
,
width
:
180
,
width
:
isSzseEnv
?
420
:
180
,
ellipsis
:
true
,
ellipsis
:
true
,
render
:
(
text
,
_
,
__
)
=>
{
render
:
(
text
,
_
,
__
)
=>
{
return
(
return
(
...
...
src/view/Manage/Model/index.jsx
View file @
ffe61fe4
...
@@ -13,7 +13,7 @@ import ExportOtherModal from './Component/ExportOtherModal';
...
@@ -13,7 +13,7 @@ import ExportOtherModal from './Component/ExportOtherModal';
import
RecatalogModal
from
'./Component/RecatalogModal'
;
import
RecatalogModal
from
'./Component/RecatalogModal'
;
import
HistoryAndVersionDrawer
from
'./Component/HistoryAndVersionDrawer'
;
import
HistoryAndVersionDrawer
from
'./Component/HistoryAndVersionDrawer'
;
import
StartFlowModal
from
'./Component/StartFlowModal'
;
import
StartFlowModal
from
'./Component/StartFlowModal'
;
import
{
showMessage
,
showNotifaction
}
from
'../../../util'
;
import
{
showMessage
,
showNotifaction
,
isSzseEnv
}
from
'../../../util'
;
import
{
dispatch
,
dispatchLatestHomepage
}
from
'../../../model'
;
import
{
dispatch
,
dispatchLatestHomepage
}
from
'../../../model'
;
import
{
Action
,
CatalogId
,
ModelerId
,
Hints
,
ModelerData
,
PermitCheckOut
,
Editable
,
StateId
}
from
'../../../util/constant'
;
import
{
Action
,
CatalogId
,
ModelerId
,
Hints
,
ModelerData
,
PermitCheckOut
,
Editable
,
StateId
}
from
'../../../util/constant'
;
import
{
AppContext
}
from
'../../../App'
;
import
{
AppContext
}
from
'../../../App'
;
...
@@ -475,7 +475,7 @@ class Model extends React.Component {
...
@@ -475,7 +475,7 @@ class Model extends React.Component {
allowClear
allowClear
value={keyword}
value={keyword}
onChange={(e) => { this.onSearchInputChange(e); }}
onChange={(e) => { this.onSearchInputChange(e); }}
style={{ width: 240, marginLeft: 'auto' }}
style={{ width:
isSzseEnv?360:
240, marginLeft: 'auto' }}
/>
/>
</Space>
</Space>
...
...
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