Commit ffe61fe4 by zhaochengxiang

设置模型列宽度

parent 9f382d94
import axios from 'axios';
import { IsArr } from './index';
import { showMessage } from './index';
import { IsArr, showMessage, isSzseEnv } from './index';
const CancelToken = axios.CancelToken;
const baseURL = '/api/';
......@@ -88,10 +87,9 @@ const callback = resp => {
if (resp.status === 401) {
showMessage('warn', 'session过期,请重新登录!');
//外网
window.location.href="/center-home/view/login"
//内网
// window.location.href="/api/auth/login"
window.location.href = isSzseEnv?"/api/auth/login":"/center-home/view/login"
return null;
}
else if (resp.status !== 200) {
......
......@@ -4,6 +4,10 @@ import { Redirect } from 'react-router-dom';
import { dispatchLatest, action } from '../model';
import { set_sess_state } from "../model/reducer";
//内网深交所环境 isSzseEnv true
//元曜公网环境 isSzseEnv false
export const isSzseEnv = false;
export const ContextPath = '/data-govern';
const routeMap = {};
......
......@@ -541,14 +541,15 @@ const ImportActionTable = (props) => {
render: (_, record, __) => {
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) => {
_text += ` ${cnName}: ${(record.datatype.parameterValues[index]?record.datatype.parameterValues[index]: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) {
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 '';
......@@ -650,11 +651,12 @@ const ImportActionTable = (props) => {
}
},
{
title: '默认值',
dataIndex: 'defaultValue',
title: '描述',
dataIndex: 'remark',
editable: true,
ellipsis: true,
width: 100,
require: true,
width: 200,
render: (text, _, __) => {
return (
<Tooltip title={text||''}>
......@@ -666,11 +668,11 @@ const ImportActionTable = (props) => {
}
},
{
title: '业务定义',
dataIndex: 'definition',
title: '默认值',
dataIndex: 'defaultValue',
editable: true,
ellipsis: true,
width: 200,
width: 100,
render: (text, _, __) => {
return (
<Tooltip title={text||''}>
......@@ -682,11 +684,11 @@ const ImportActionTable = (props) => {
}
},
{
title: '值域',
dataIndex: 'valueRange',
title: '业务定义',
dataIndex: 'definition',
editable: true,
ellipsis: true,
width: 100,
width: 200,
render: (text, _, __) => {
return (
<Tooltip title={text||''}>
......@@ -698,12 +700,11 @@ const ImportActionTable = (props) => {
}
},
{
title: '描述',
dataIndex: 'remark',
title: '值域',
dataIndex: 'valueRange',
editable: true,
ellipsis: true,
require: true,
width: 200,
width: 100,
render: (text, _, __) => {
return (
<Tooltip title={text||''}>
......@@ -794,7 +795,7 @@ const ImportActionTable = (props) => {
const validateColumn = {
title: '规范',
dataIndex: 'validate',
width: 180,
width: 200,
fixed: 'right',
render: (text, record, index) => {
let shortCauses = [];
......
......@@ -5,7 +5,7 @@ import SmoothScroll from 'smooth-scroll';
import classnames from 'classnames';
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 './ModelTable.less';
......@@ -54,7 +54,7 @@ const ModelTable = (props) => {
{
title: '模型名称',
dataIndex: 'name',
width: 180,
width: isSzseEnv?360:180,
ellipsis: true,
render: (text, record, _) => {
return (
......@@ -69,7 +69,7 @@ const ModelTable = (props) => {
{
title: '中文名称',
dataIndex: 'cnName',
width: 180,
width: isSzseEnv?420:180,
ellipsis: true,
render: (text, _, __) => {
return (
......
......@@ -13,7 +13,7 @@ import ExportOtherModal from './Component/ExportOtherModal';
import RecatalogModal from './Component/RecatalogModal';
import HistoryAndVersionDrawer from './Component/HistoryAndVersionDrawer';
import StartFlowModal from './Component/StartFlowModal';
import { showMessage, showNotifaction } from '../../../util';
import { showMessage, showNotifaction, isSzseEnv } from '../../../util';
import { dispatch, dispatchLatestHomepage } from '../../../model';
import { Action, CatalogId, ModelerId, Hints, ModelerData, PermitCheckOut, Editable, StateId } from '../../../util/constant';
import { AppContext } from '../../../App';
......@@ -475,7 +475,7 @@ class Model extends React.Component {
allowClear
value={keyword}
onChange={(e) => { this.onSearchInputChange(e); }}
style={{ width: 240, marginLeft: 'auto' }}
style={{ width: isSzseEnv?360:240, marginLeft: 'auto' }}
/>
</Space>
......
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