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
305e5107
Commit
305e5107
authored
Nov 09, 2021
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整模型字段
parent
69e4caa0
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
87 additions
and
66 deletions
+87
-66
index.less
src/index.less
+2
-2
axios.js
src/util/axios.js
+3
-3
ImportActionTable.jsx
src/view/Manage/Model/Component/ImportActionTable.jsx
+51
-45
ModelTable.jsx
src/view/Manage/Model/Component/ModelTable.jsx
+29
-15
ModelTable.less
src/view/Manage/Model/Component/ModelTable.less
+2
-1
No files found.
src/index.less
View file @
305e5107
...
@@ -112,11 +112,11 @@ div[id^='__qiankun_microapp_wrapper_'] {
...
@@ -112,11 +112,11 @@ div[id^='__qiankun_microapp_wrapper_'] {
}
}
.yy-table-thead > tr > th {
.yy-table-thead > tr > th {
padding: 8px
16
px !important;
padding: 8px
8
px !important;
}
}
.yy-table-tbody > tr > td {
.yy-table-tbody > tr > td {
padding: 12px
16
px !important;
padding: 12px
8
px !important;
}
}
.yy-table-tbody > .yy-table-measure-row > td {
.yy-table-tbody > .yy-table-measure-row > td {
...
...
src/util/axios.js
View file @
305e5107
...
@@ -8,7 +8,7 @@ const baseURL = '/api/';
...
@@ -8,7 +8,7 @@ const baseURL = '/api/';
const
instance
=
axios
.
create
({
const
instance
=
axios
.
create
({
baseURL
,
baseURL
,
timeout
:
5000
,
timeout
:
1
5000
,
headers
:
{
headers
:
{
//'X-Custom-Header': 'rest',
//'X-Custom-Header': 'rest',
'Cache-Control'
:
'no-cache,no-store,must-revalidate,max-age=-1,private'
'Cache-Control'
:
'no-cache,no-store,must-revalidate,max-age=-1,private'
...
@@ -21,7 +21,7 @@ const instance = axios.create({
...
@@ -21,7 +21,7 @@ const instance = axios.create({
const
textplain
=
axios
.
create
({
const
textplain
=
axios
.
create
({
baseURL
,
baseURL
,
timeout
:
5000
,
timeout
:
1
5000
,
headers
:
{
headers
:
{
//'X-Custom-Header': 'rest',
//'X-Custom-Header': 'rest',
'Cache-Control'
:
'no-cache,no-store,must-revalidate,max-age=-1,private'
'Cache-Control'
:
'no-cache,no-store,must-revalidate,max-age=-1,private'
...
@@ -67,7 +67,7 @@ textplain.interceptors.request.use(
...
@@ -67,7 +67,7 @@ textplain.interceptors.request.use(
const
fileplain
=
axios
.
create
({
const
fileplain
=
axios
.
create
({
baseURL
,
baseURL
,
timeout
:
5000
,
timeout
:
1
5000
,
headers
:{
'Content-Type'
:
'multipart/form-data'
},
headers
:{
'Content-Type'
:
'multipart/form-data'
},
processData
:
false
,
processData
:
false
,
validateStatus
:
(
status
)
=>
{
validateStatus
:
(
status
)
=>
{
...
...
src/view/Manage/Model/Component/ImportActionTable.jsx
View file @
305e5107
...
@@ -499,6 +499,26 @@ const ImportActionTable = (props) => {
...
@@ -499,6 +499,26 @@ const ImportActionTable = (props) => {
}
}
},
},
{
{
title
:
'重点关注'
,
width
:
75
,
dataIndex
:
'needAttention'
,
fixed
:
'left'
,
editable
:
(
type
===
'model'
?
true
:
false
),
render
:
(
needAttention
,
record
,
index
)
=>
{
if
(
!
needAttention
)
{
return
(
<
CloseOutlined
/>
);
}
else
if
(
needAttention
===
true
)
{
return
(
<
CheckOutlined
/>
)
}
return
''
;
}
},
{
title
:
'中文名称'
,
title
:
'中文名称'
,
width
:
200
,
width
:
200
,
dataIndex
:
'cnName'
,
dataIndex
:
'cnName'
,
...
@@ -533,7 +553,7 @@ const ImportActionTable = (props) => {
...
@@ -533,7 +553,7 @@ const ImportActionTable = (props) => {
},
},
{
{
title
:
'类型'
,
title
:
'类型'
,
width
:
25
0
,
width
:
(
editingKey
!==
''
)?
250
:
10
0
,
dataIndex
:
'datatype'
,
dataIndex
:
'datatype'
,
editable
:
true
,
editable
:
true
,
ellipsis
:
true
,
ellipsis
:
true
,
...
@@ -545,7 +565,7 @@ const ImportActionTable = (props) => {
...
@@ -545,7 +565,7 @@ const ImportActionTable = (props) => {
return
`
${
record
?.
datatype
?.
name
||
''
}(
$
{(
record
?.
datatype
?.
parameterValues
[
0
]?
record
.
datatype
.
parameterValues
[
0
]:
0
)})
`;
return
`
${
record
?.
datatype
?.
name
||
''
}(
$
{(
record
?.
datatype
?.
parameterValues
[
0
]?
record
.
datatype
.
parameterValues
[
0
]:
0
)})
`;
} else if (
record?.datatype?.name==='Decimal'
&& record?.datatype?.parameterValues?.length>1) {
} else if (
(record?.datatype?.name==='Decimal'||record?.datatype?.name==='Numeric')
&& 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 `
$
{
record
?.
datatype
?.
name
||
''
}(
$
{(
record
?.
datatype
?.
parameterValues
[
0
]?
record
.
datatype
.
parameterValues
[
0
]:
0
)},
$
{(
record
?.
datatype
?.
parameterValues
[
1
]?
record
.
datatype
.
parameterValues
[
1
]:
0
)})
`;
}
}
...
@@ -556,8 +576,8 @@ const ImportActionTable = (props) => {
...
@@ -556,8 +576,8 @@ const ImportActionTable = (props) => {
}
}
},
},
{
{
title: '
可否为空
',
title: '
Null?
',
width:
10
0,
width:
5
0,
dataIndex: 'nullable',
dataIndex: 'nullable',
editable: (type==='model'?true:false),
editable: (type==='model'?true:false),
render: (nullable, record, index) => {
render: (nullable, record, index) => {
...
@@ -576,7 +596,7 @@ const ImportActionTable = (props) => {
...
@@ -576,7 +596,7 @@ const ImportActionTable = (props) => {
},
},
{
{
title: '主键',
title: '主键',
width:
8
0,
width:
5
0,
dataIndex: 'partOfPrimaryKey',
dataIndex: 'partOfPrimaryKey',
editable: (type==='model'?true:false),
editable: (type==='model'?true:false),
render: (partOfPrimaryKey, record, index) => {
render: (partOfPrimaryKey, record, index) => {
...
@@ -593,28 +613,28 @@ const ImportActionTable = (props) => {
...
@@ -593,28 +613,28 @@ const ImportActionTable = (props) => {
return '';
return '';
}
}
},
},
{
//
{
title: '分布键',
//
title: '分布键',
width: 8
0,
// width: 6
0,
dataIndex: 'partOfDistributionKey',
//
dataIndex: 'partOfDistributionKey',
editable: (type==='model'?true:false),
//
editable: (type==='model'?true:false),
render: (partOfDistributionKey, record, index) => {
//
render: (partOfDistributionKey, record, index) => {
if (!partOfDistributionKey) {
//
if (!partOfDistributionKey) {
return (
//
return (
<CloseOutlined />
//
<CloseOutlined />
);
//
);
} else if (partOfDistributionKey === true) {
//
} else if (partOfDistributionKey === true) {
return (
//
return (
<CheckOutlined />
//
<CheckOutlined />
)
//
)
}
//
}
return '';
//
return '';
}
//
}
},
//
},
{
{
title: '外键',
title: '外键',
width:
8
0,
width:
5
0,
dataIndex: 'foreignKey',
dataIndex: 'foreignKey',
editable: (type==='model'?true:false),
editable: (type==='model'?true:false),
render: (foreignKey, record, index) => {
render: (foreignKey, record, index) => {
...
@@ -632,25 +652,6 @@ const ImportActionTable = (props) => {
...
@@ -632,25 +652,6 @@ const ImportActionTable = (props) => {
}
}
},
},
{
{
title: '重点关注',
width: 100,
dataIndex: 'needAttention',
editable: (type==='model'?true:false),
render: (needAttention, record, index) => {
if (!needAttention) {
return (
<CloseOutlined />
);
} else if (needAttention === true) {
return (
<CheckOutlined />
)
}
return '';
}
},
{
title: '描述',
title: '描述',
dataIndex: 'remark',
dataIndex: 'remark',
editable: true,
editable: true,
...
@@ -722,7 +723,7 @@ const ImportActionTable = (props) => {
...
@@ -722,7 +723,7 @@ const ImportActionTable = (props) => {
{
{
title: '操作',
title: '操作',
dataIndex: 'action',
dataIndex: 'action',
width:
18
0,
width:
(action==='flow')?180:9
0,
fixed: 'right',
fixed: 'right',
render: (_, record) => {
render: (_, record) => {
return (
return (
...
@@ -867,6 +868,11 @@ const ImportActionTable = (props) => {
...
@@ -867,6 +868,11 @@ const ImportActionTable = (props) => {
let _columns = hasValidateReports ? includeValidateEditableColumn: editableColumn;
let _columns = hasValidateReports ? includeValidateEditableColumn: editableColumn;
//审批页面不显示重点关注
if (action==='flow') {
_columns = _columns.filter((col) => col.dataIndex!=='needAttention')
}
return _columns.map((col) => {
return _columns.map((col) => {
if (!col.editable) {
if (!col.editable) {
return col;
return col;
...
...
src/view/Manage/Model/Component/ModelTable.jsx
View file @
305e5107
...
@@ -358,6 +358,34 @@ const ModelTable = (props) => {
...
@@ -358,6 +358,34 @@ const ModelTable = (props) => {
'model-table-sub'
:
modelId
'model-table-sub'
:
modelId
});
});
let
expandable
=
undefined
;
if
(
!
modelId
)
{
let
needExpand
=
false
;
(
_data
||
[]).
forEach
(
record
=>
{
if
(
record
?.
alreadyCheckedOut
)
{
needExpand
=
true
;
}
})
if
(
needExpand
)
{
expandable
=
{
expandedRowRender
:
record
=>
<
ModelTable
modelId=
{
record
?.
checkedOutId
}
{
...
props
}
/>,
expandIcon
:
({
expanded
,
onExpand
,
record
})
=>
{
if
(
!
record
?.
alreadyCheckedOut
)
return
null
;
return
expanded
?
<
UpOutlined
style=
{
{
fontSize
:
10
}
}
onClick=
{
e
=>
onExpand
(
record
,
e
)
}
/>
:
<
DownOutlined
style=
{
{
fontSize
:
10
}
}
onClick=
{
e
=>
onExpand
(
record
,
e
)
}
/>
},
rowExpandable
:
record
=>
{
return
record
?.
alreadyCheckedOut
;
}
};
}
}
return
(
return
(
<
div
className=
{
classes
}
>
<
div
className=
{
classes
}
>
<
Table
<
Table
...
@@ -373,21 +401,7 @@ const ModelTable = (props) => {
...
@@ -373,21 +401,7 @@ const ModelTable = (props) => {
style
:
{
backgroundColor
:
(
record
?.
id
===
anchorId
)?
'#e7f7ff'
:
'transparent'
}
style
:
{
backgroundColor
:
(
record
?.
id
===
anchorId
)?
'#e7f7ff'
:
'transparent'
}
}
}
}
}
}
}
expandable=
{
{
expandable=
{
expandable
}
expandedRowRender
:
record
=>
<
ModelTable
modelId=
{
record
?.
checkedOutId
}
{
...
props
}
/>,
expandIcon
:
({
expanded
,
onExpand
,
record
})
=>
{
if
(
!
record
?.
alreadyCheckedOut
)
return
null
;
return
expanded
?
<
UpOutlined
onClick=
{
e
=>
onExpand
(
record
,
e
)
}
/>
:
<
DownOutlined
onClick=
{
e
=>
onExpand
(
record
,
e
)
}
/>
},
rowExpandable
:
record
=>
{
return
record
?.
alreadyCheckedOut
;
}
}
}
sticky=
{
!
modelId
}
sticky=
{
!
modelId
}
/>
/>
{
{
...
...
src/view/Manage/Model/Component/ModelTable.less
View file @
305e5107
...
@@ -26,6 +26,6 @@
...
@@ -26,6 +26,6 @@
}
}
.yy-table-tbody > tr > td {
.yy-table-tbody > tr > td {
padding: 8px
16
px !important;
padding: 8px
8
px !important;
}
}
}
}
\ No newline at end of file
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