Commit c05a17c5 by zhaochengxiang

资产浏览编辑资产

parent c09edecb
......@@ -84,7 +84,7 @@ export function constraints() {
return GetJSON("/datamodeler/easyDataModelerConstraint/constraints");
}
//模
//模
export function templates() {
return GetJSON("/datamodeler/easyDataModelerTemplateCURD/getAllDataModelTemplates");
}
......@@ -110,7 +110,7 @@ export function draftUsingDDL(payload) {
return PostJSON("/datamodeler/easyDataModelerDesign/draftUsingDDL", payload);
}
//切换模或者规范时调用
//切换模或者规范时调用
export function consult(payload) {
return PostJSON("/datamodeler/easyDataModelerDesign/consult", payload);
}
......
......@@ -552,6 +552,16 @@ const AssetAction = (props) => {
</div>
}
{
readOnly && <div className='flex' style={{ justifyContent: 'right' }}>
{
currentAction==='detail' ? <Button type='primary' onClick={onActionButtonClick}>编辑</Button> : <Space>
<Button type='primary' onClick={onCancelButtonClick}>取消</Button>
<Button type='primary' onClick={onActionButtonClick}>保存</Button>
</Space>
}
</div>
}
{
(action!=='add' && (id||'')!=='') && <div>
<div className='pl-common py-compact-common'>
<Descriptions column={1}>
......
......@@ -129,7 +129,7 @@ const ImportAssetDrawer = (props) => {
const handleOk = () => {
if ((fileList||[]).length === 0) {
showMessage('info', '请先选择模上传');
showMessage('info', '请先选择模上传');
return;
}
......@@ -182,7 +182,7 @@ const ImportAssetDrawer = (props) => {
<Form layout='inline'>
<Form.Item label='Excel导入:'>
<Button className='mr-2' icon={<DownloadOutlined />} onClick={ downloadTemplate }>
下载
下载
</Button>
<Upload style={{ display: 'inline' }} {...uploadProps }>
<Button icon={
......
......@@ -143,7 +143,7 @@ const ImportDirectory = (props) => {
onCancel={() => { onCancel && onCancel() }}
footer={
<Space>
<Button type="primary" onClick={ download } >下载</Button>
<Button type="primary" onClick={ download } >下载</Button>
<Button type="primary" onClick={() => { upload(false); } } loading={uploading}>上传</Button>
<Button onClick={() => { onCancel && onCancel() }}>返回</Button>
</Space>
......
......@@ -35,7 +35,7 @@ const ImportElement = (props) => {
const handleOk = () => {
if ((fileList||[]).length === 0) {
showMessage('info', '请先选择模上传');
showMessage('info', '请先选择模上传');
return;
}
......@@ -73,7 +73,7 @@ const ImportElement = (props) => {
>
<div>
<Button icon={<DownloadOutlined />} onClick={ downloadTemplate }>
下载
下载
</Button>
</div>
<div className='mt-3'>
......
......@@ -56,7 +56,7 @@ const DefineTable = (props) => {
ellipsis: true,
},
{
title: '模名称',
title: '模名称',
dataIndex: 'name',
width: 200,
ellipsis: true,
......@@ -65,7 +65,7 @@ const DefineTable = (props) => {
},
},
{
title: '模中文名称',
title: '模中文名称',
dataIndex: 'cnName',
width: 200,
ellipsis: true,
......@@ -77,7 +77,7 @@ const DefineTable = (props) => {
ellipsis: true,
},
{
title: '模描述',
title: '模描述',
dataIndex: 'comment',
width: 200,
ellipsis: true,
......@@ -185,7 +185,7 @@ const DefineTable = (props) => {
<Button onClick={onAddClick}>新建</Button>
</Space>
<Space>
<Tooltip title={(checkedKeys||[]).length===0?'请先选择模':''}>
<Tooltip title={(checkedKeys||[]).length===0?'请先选择模':''}>
<Button onClick={onBatchDeleteClick} disabled={(checkedKeys||[]).length===0} loading={deleteLoading}>删除</Button>
</Tooltip>
</Space>
......
......@@ -159,7 +159,7 @@ const DefineTree = (props) => {
const deleteNode = () => {
modal.confirm({
title: '提示!',
content: '删除目录会删除相关的模,您确定删除吗?',
content: '删除目录会删除相关的模,您确定删除吗?',
onOk: () => {
setLoading(true);
dispatch({
......
......@@ -26,17 +26,17 @@ const UpdateBasicInfo = (props) => {
>
<Row gutter={10}>
<Col xs={24} sm={24} lg={12}>
<Form.Item label='中文名称' name='cnName' rules={[{ required: true, message: '请填写模中文名称' }]}>
<Form.Item label='中文名称' name='cnName' rules={[{ required: true, message: '请填写模中文名称' }]}>
<Input />
</Form.Item>
</Col>
<Col xs={24} sm={24} lg={12}>
<Form.Item label='英文名称' name='name' rules={[{ required: true, message: '请填写模名称' }]}>
<Form.Item label='英文名称' name='name' rules={[{ required: true, message: '请填写模名称' }]}>
<Input />
</Form.Item>
</Col>
<Col xs={24} sm={24} lg={12}>
<Form.Item label='模描述' name='comment'>
<Form.Item label='模描述' name='comment'>
<TextArea row={4} />
</Form.Item>
</Col>
......@@ -44,7 +44,7 @@ const UpdateBasicInfo = (props) => {
</Form> : <Descriptions column={2}>
<Descriptions.Item label={<div style={{ textAlign: 'right', width: 85 }}>中文名称</div>} >{template?.cnName||''}</Descriptions.Item>
<Descriptions.Item label={<div style={{ textAlign: 'right', width: 85 }}>英文名称</div>}>{template?.name||''}</Descriptions.Item>
<Descriptions.Item label={<div style={{ textAlign: 'right', width: 85 }}>描述</div>}>{template?.comment||''}</Descriptions.Item>
<Descriptions.Item label={<div style={{ textAlign: 'right', width: 85 }}>描述</div>}>{template?.comment||''}</Descriptions.Item>
</Descriptions>
}
</div>
......
......@@ -28,14 +28,14 @@ export const UpdateTemplateModal = (props) => {
const title = useMemo(() => {
if (action === 'add') {
return '新建模';
return '新建模';
}
if (action === 'detail') {
return '模详情';
return '模详情';
}
if (action === 'update') {
return '编辑模';
return '编辑模';
}
return '';
}, [action])
......
......@@ -229,7 +229,7 @@ const ImportDataDrawer = (props) => {
</Form.Item>
<Form.Item>
<Button icon={<DownloadOutlined />} onClick={downloadTemplate }>
下载
下载
</Button>
</Form.Item>
</Form>
......
......@@ -79,7 +79,7 @@ class ImportExcel extends React.Component {
</Col>
<Col span={6}>
<Button icon={<DownloadOutlined />} onClick={ this.downloadTemplate }>
下载
下载
</Button>
</Col>
</Row>
......
......@@ -79,11 +79,11 @@ const EditTemplate = (props) => {
let title = '';
if (action === 'add') {
title = '新增模';
title = '新增模';
} else if (action === 'edit') {
title = '模编辑';
title = '模编辑';
} else if (action === 'detail') {
title = '模详情';
title = '模详情';
}
let actionsBtn = null;
......
......@@ -170,7 +170,7 @@ const PartitionCURD = (props) => {
}
},
callback: () => {
showMessage('success', '模分区成功');
showMessage('success', '模分区成功');
getPartitions();
}
})
......
......@@ -78,7 +78,7 @@ const TemplateAction = (props) => {
});
}
//模不需要对字段进行校验
//模不需要对字段进行校验
const onTableChange = (data) => {
let newTemplateData = {...templateData, ...{easyDataModelerDataModelAttributes: data}};
......
......@@ -35,7 +35,7 @@ const TemplateCURD = (props) => {
width: 60,
},
{
title: '模名称',
title: '模名称',
dataIndex: 'name',
width: 180,
ellipsis: true,
......@@ -56,7 +56,7 @@ const TemplateCURD = (props) => {
ellipsis: true,
},
{
title: '模描述',
title: '模描述',
dataIndex: 'remark',
ellipsis: true,
},
......@@ -124,7 +124,7 @@ const TemplateCURD = (props) => {
const deleteItem = (record) => {
modal.confirm({
title: '提示!',
content: '您确定要删除该模吗?',
content: '您确定要删除该模吗?',
onOk: () => {
dispatch({
type: 'datamodel.deleteTemplate',
......@@ -134,7 +134,7 @@ const TemplateCURD = (props) => {
}
},
callback: () => {
showMessage('success', '模删除成功');
showMessage('success', '模删除成功');
getTemplates();
}
})
......
......@@ -75,7 +75,7 @@ const WordTemplate = (props) => {
return (
<Form form={form} {...layout} onFinish={handleOk}>
<Form.Item
label='最新模上传'
label='最新模上传'
required={true}
>
<Row>
......@@ -101,7 +101,7 @@ const WordTemplate = (props) => {
</Col>
<Col>
<Button className='ml-3' icon={<DownloadOutlined />} onClick={ downloadTemplate }>
下载
下载
</Button>
</Col>
</Row>
......
......@@ -20,7 +20,7 @@ const ModelConfig = () => {
return (
<div className='model-config'>
<Tabs activeKey={tabKey} onChange={onTabChange}>
<TabPane tab='Word模配置' key='1'>
<TabPane tab='Word模配置' key='1'>
<WordTemplate />
</TabPane>
<TabPane tab='生成表类型配置' key='2'>
......
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