Commit 305e5107 by zhaochengxiang

调整模型字段

parent 69e4caa0
......@@ -112,11 +112,11 @@ div[id^='__qiankun_microapp_wrapper_'] {
}
.yy-table-thead > tr > th {
padding: 8px 16px !important;
padding: 8px 8px !important;
}
.yy-table-tbody > tr > td {
padding: 12px 16px !important;
padding: 12px 8px !important;
}
.yy-table-tbody > .yy-table-measure-row > td {
......
......@@ -8,7 +8,7 @@ const baseURL = '/api/';
const instance = axios.create({
baseURL,
timeout: 5000,
timeout: 15000,
headers: {
//'X-Custom-Header': 'rest',
'Cache-Control': 'no-cache,no-store,must-revalidate,max-age=-1,private'
......@@ -21,7 +21,7 @@ const instance = axios.create({
const textplain = axios.create({
baseURL,
timeout: 5000,
timeout: 15000,
headers: {
//'X-Custom-Header': 'rest',
'Cache-Control': 'no-cache,no-store,must-revalidate,max-age=-1,private'
......@@ -67,7 +67,7 @@ textplain.interceptors.request.use(
const fileplain = axios.create({
baseURL,
timeout: 5000,
timeout: 15000,
headers:{'Content-Type':'multipart/form-data'},
processData:false,
validateStatus: (status) => {
......
......@@ -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: '中文名称',
width: 200,
dataIndex: 'cnName',
......@@ -533,7 +553,7 @@ const ImportActionTable = (props) => {
},
{
title: '类型',
width: 250,
width: (editingKey!=='')?250:100,
dataIndex: 'datatype',
editable: true,
ellipsis: true,
......@@ -545,7 +565,7 @@ const ImportActionTable = (props) => {
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)})`;
}
......@@ -556,8 +576,8 @@ const ImportActionTable = (props) => {
}
},
{
title: '可否为空',
width: 100,
title: 'Null?',
width: 50,
dataIndex: 'nullable',
editable: (type==='model'?true:false),
render: (nullable, record, index) => {
......@@ -576,7 +596,7 @@ const ImportActionTable = (props) => {
},
{
title: '主键',
width: 80,
width: 50,
dataIndex: 'partOfPrimaryKey',
editable: (type==='model'?true:false),
render: (partOfPrimaryKey, record, index) => {
......@@ -593,28 +613,28 @@ const ImportActionTable = (props) => {
return '';
}
},
{
title: '分布键',
width: 80,
dataIndex: 'partOfDistributionKey',
editable: (type==='model'?true:false),
render: (partOfDistributionKey, record, index) => {
if (!partOfDistributionKey) {
return (
<CloseOutlined />
);
} else if (partOfDistributionKey === true) {
return (
<CheckOutlined />
)
}
return '';
}
},
// {
// title: '分布键',
// width: 60,
// dataIndex: 'partOfDistributionKey',
// editable: (type==='model'?true:false),
// render: (partOfDistributionKey, record, index) => {
// if (!partOfDistributionKey) {
// return (
// <CloseOutlined />
// );
// } else if (partOfDistributionKey === true) {
// return (
// <CheckOutlined />
// )
// }
// return '';
// }
// },
{
title: '外键',
width: 80,
width: 50,
dataIndex: 'foreignKey',
editable: (type==='model'?true:false),
render: (foreignKey, record, index) => {
......@@ -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: '描述',
dataIndex: 'remark',
editable: true,
......@@ -722,7 +723,7 @@ const ImportActionTable = (props) => {
{
title: '操作',
dataIndex: 'action',
width: 180,
width: (action==='flow')?180:90,
fixed: 'right',
render: (_, record) => {
return (
......@@ -867,6 +868,11 @@ const ImportActionTable = (props) => {
let _columns = hasValidateReports ? includeValidateEditableColumn: editableColumn;
//审批页面不显示重点关注
if (action==='flow') {
_columns = _columns.filter((col) => col.dataIndex!=='needAttention')
}
return _columns.map((col) => {
if (!col.editable) {
return col;
......
......@@ -358,6 +358,34 @@ const ModelTable = (props) => {
'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 (
<div className={classes}>
<Table
......@@ -373,21 +401,7 @@ const ModelTable = (props) => {
style: { backgroundColor: (record?.id===anchorId)?'#e7f7ff':'transparent' }
}
}}
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;
}
}}
expandable={expandable}
sticky={!modelId}
/>
{
......
......@@ -26,6 +26,6 @@
}
.yy-table-tbody > tr > td {
padding: 8px 16px !important;
padding: 8px 8px !important;
}
}
\ No newline at end of file
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