Commit a5b6abd5 by Your Name

演示需要

parent 15bae5be
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
# production # production
/build /build
/data-govern* /data-govern-szse*
/data-govern*.zip /data-govern-szse*.zip
# misc # misc
.DS_Store .DS_Store
......
{ {
"name": "data-govern", "name": "data-govern-szse",
"version": "0.1.0", "version": "0.1.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
{ {
"name": "data-govern", "name": "data-govern-szse",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"dependencies": { "dependencies": {
...@@ -79,5 +79,5 @@ ...@@ -79,5 +79,5 @@
"last 1 safari version" "last 1 safari version"
] ]
}, },
"homepage": "http://myhost/data-govern" "homepage": "http://myhost/data-govern-szse"
} }
...@@ -188,7 +188,7 @@ export class App extends React.Component { ...@@ -188,7 +188,7 @@ export class App extends React.Component {
setGlobalState, setGlobalState,
onGlobalStateChange onGlobalStateChange
}}> }}>
<Router basename={window.__POWERED_BY_QIANKUN__ ? '/data-govern' : '/'}> <Router basename={window.__POWERED_BY_QIANKUN__ ? '/data-govern-szse' : '/'}>
<Switch> <Switch>
<Route path={`${ContextPath}/login`} component={Signin} exact /> <Route path={`${ContextPath}/login`} component={Signin} exact />
<Route path={`${ContextPath}/home`} component={Home} /> <Route path={`${ContextPath}/home`} component={Home} />
...@@ -229,7 +229,7 @@ export class App extends React.Component { ...@@ -229,7 +229,7 @@ export class App extends React.Component {
<Route path={'/center-home/data-model-action'} component={EditModel} exact /> <Route path={'/center-home/data-model-action'} component={EditModel} exact />
<Route path={'/center-home/asset-detail'} component={AssetDetailPage} exact /> <Route path={'/center-home/asset-detail'} component={AssetDetailPage} exact />
<Route path={'/center-home/model-review-detail'} component={ModelReviewDetail} /> <Route path={'/center-home/model-review-detail'} component={ModelReviewDetail} />
<Route path={'/data-govern/model-compare-list'} component={ModelCompareList} /> <Route path={'/data-govern-szse/model-compare-list'} component={ModelCompareList} />
<Route path={'/data-model-product/physics-model'} component={Model} exact /> <Route path={'/data-model-product/physics-model'} component={Model} exact />
<Route path={'/data-model-product/physics-model-branch'} component={Model} exact /> <Route path={'/data-model-product/physics-model-branch'} component={Model} exact />
......
...@@ -41,11 +41,11 @@ if (!window.__POWERED_BY_QIANKUN__) { ...@@ -41,11 +41,11 @@ if (!window.__POWERED_BY_QIANKUN__) {
} }
export async function bootstrap() { export async function bootstrap() {
console.log('[data-govern] react app bootstraped'); console.log('[data-govern-szse] react app bootstraped');
} }
export async function mount(props) { export async function mount(props) {
console.log('[data-govern] props from main framework', props); console.log('[data-govern-szse] props from main framework', props);
storeTest(props); storeTest(props);
render(props); render(props);
} }
...@@ -56,6 +56,6 @@ export async function unmount(props) { ...@@ -56,6 +56,6 @@ export async function unmount(props) {
} }
export async function update(props) { export async function update(props) {
console.log('[data-govern] props update from main framework', props); console.log('[data-govern-szse] props update from main framework', props);
$hostParams.next(props?.data); $hostParams.next(props?.data);
} }
\ No newline at end of file
...@@ -16,7 +16,7 @@ export const isSzseEnv = true; ...@@ -16,7 +16,7 @@ export const isSzseEnv = true;
export const inputWidth = isSzseEnv?360:200; export const inputWidth = isSzseEnv?360:200;
export const ContextPath = '/data-govern'; export const ContextPath = '/data-govern-szse';
export const $hostParams = new Subject(); export const $hostParams = new Subject();
...@@ -569,13 +569,13 @@ export function openMetadataDetail(id) { ...@@ -569,13 +569,13 @@ export function openMetadataDetail(id) {
} }
export function openModelDetail(id) { export function openModelDetail(id) {
window.open(`/data-govern/data-model-action?${Action}=detail&${ModelerId}=${id}`); window.open(`/data-govern-szse/data-model-action?${Action}=detail&${ModelerId}=${id}`);
} }
export function openNoticeDataModelById(id, versionId) { export function openNoticeDataModelById(id, versionId) {
window.open(`/data-govern/data-model-action?${Action}=detail&${ModelerId}=${id}&${NoticeModelerId}=${id}&${NoticeModelerLatestVersionId}=${versionId}`); window.open(`/data-govern-szse/data-model-action?${Action}=detail&${ModelerId}=${id}&${NoticeModelerId}=${id}&${NoticeModelerLatestVersionId}=${versionId}`);
} }
export function openNoticeDataModelByVersionId(id) { export function openNoticeDataModelByVersionId(id) {
window.open(`/data-govern/data-model-action?${Action}=detail&${ModelerId}=${id}&${NoticeModelerId}=${id}`); window.open(`/data-govern-szse/data-model-action?${Action}=detail&${ModelerId}=${id}&${NoticeModelerId}=${id}`);
} }
\ No newline at end of file
...@@ -534,7 +534,7 @@ const AssetAction = (props) => { ...@@ -534,7 +534,7 @@ const AssetAction = (props) => {
{ {
value => { value => {
value?.onGlobalStateChange&&value?.onGlobalStateChange((state, prev) => { value?.onGlobalStateChange&&value?.onGlobalStateChange((state, prev) => {
if (state.message === 'data-govern-show-metadata-list-callback-message') { if (state.message === 'data-govern-szse-show-metadata-list-callback-message') {
setMetadataId(state.data?.metadataId||''); setMetadataId(state.data?.metadataId||'');
onMetadataChange && onMetadataChange(state.data?.metadataId||''); onMetadataChange && onMetadataChange(state.data?.metadataId||'');
......
...@@ -43,7 +43,7 @@ const ImportDirectory = (props) => { ...@@ -43,7 +43,7 @@ const ImportDirectory = (props) => {
} }
const download = () => { const download = () => {
window.open("/data-govern/docs/AssetThemeModel.xlsx"); window.open("/data-govern-szse/docs/AssetThemeModel.xlsx");
} }
const upload = async (ignoreRepeatPath = false) => { const upload = async (ignoreRepeatPath = false) => {
......
...@@ -12,7 +12,7 @@ const ImportElement = (props) => { ...@@ -12,7 +12,7 @@ const ImportElement = (props) => {
const [ confirmLoading, setConfirmLoading ] = useState(false); const [ confirmLoading, setConfirmLoading ] = useState(false);
const downloadTemplate = () => { const downloadTemplate = () => {
window.open("/data-govern/docs/ElementModel.xlsx"); window.open("/data-govern-szse/docs/ElementModel.xlsx");
} }
const uploadProps = { const uploadProps = {
......
...@@ -86,7 +86,7 @@ const FC = ({ value, onChange, readonly = true, terms = [] }) => { ...@@ -86,7 +86,7 @@ const FC = ({ value, onChange, readonly = true, terms = [] }) => {
> >
<a onClick={() => { <a onClick={() => {
app?.setGlobalState?.({ app?.setGlobalState?.({
message: 'data-govern-show-metadata-message', message: 'data-govern-szse-show-metadata-message',
data: item data: item
}) })
}} }}
......
...@@ -1019,7 +1019,7 @@ const FC = (props) => { ...@@ -1019,7 +1019,7 @@ const FC = (props) => {
if (refresh) { if (refresh) {
setTimeout(() => { setTimeout(() => {
window.open(`/data-govern/edit-assets?ids=${(selectedRows??[]).map(item => item.id).toString()}&elementIds=${(value??[]).toString()}&type=${AssetManageReference}`) window.open(`/data-govern-szse/edit-assets?ids=${(selectedRows??[]).map(item => item.id).toString()}&elementIds=${(value??[]).toString()}&type=${AssetManageReference}`)
}, 300) }, 300)
} }
}} }}
......
...@@ -34,7 +34,7 @@ const FC = ({ value, onChange, readonly = true, terms = [] }) => { ...@@ -34,7 +34,7 @@ const FC = ({ value, onChange, readonly = true, terms = [] }) => {
> >
<a onClick={() => { <a onClick={() => {
app?.setGlobalState?.({ app?.setGlobalState?.({
message: 'data-govern-show-metadata-message', message: 'data-govern-szse-show-metadata-message',
data: decodeData[0] data: decodeData[0]
}) })
}} }}
...@@ -48,7 +48,7 @@ const FC = ({ value, onChange, readonly = true, terms = [] }) => { ...@@ -48,7 +48,7 @@ const FC = ({ value, onChange, readonly = true, terms = [] }) => {
{ {
!readonly && <Button type='text' icon={<SettingFilled />} onClick={() => { !readonly && <Button type='text' icon={<SettingFilled />} onClick={() => {
app?.setGlobalState?.({ app?.setGlobalState?.({
message: 'data-govern-show-metadata-list-message', message: 'data-govern-szse-show-metadata-list-message',
data: (IsArr(decodeData)&&decodeData.length>0) ? decodeData[0] : {} data: (IsArr(decodeData)&&decodeData.length>0) ? decodeData[0] : {}
}) })
}} /> }} />
......
...@@ -676,7 +676,7 @@ const FC = (props) => { ...@@ -676,7 +676,7 @@ const FC = (props) => {
} }
const onBatchAddToAssetClick = () => { const onBatchAddToAssetClick = () => {
window.open(`/data-govern/edit-assets?ids=${(selectedRows??[]).map(item => item.id).toString()}&type=${ResourceManageReference}`) window.open(`/data-govern-szse/edit-assets?ids=${(selectedRows??[]).map(item => item.id).toString()}&type=${ResourceManageReference}`)
} }
const onDistributeTaskClick = () => { const onDistributeTaskClick = () => {
...@@ -1537,7 +1537,7 @@ const FC = (props) => { ...@@ -1537,7 +1537,7 @@ const FC = (props) => {
if (refresh) { if (refresh) {
setTimeout(() => { setTimeout(() => {
window.open(`/data-govern/edit-assets?ids=${(selectedRows??[]).map(item => item.id).toString()}&elementIds=${(value??[]).toString()}&type=${ResourceManageReference}`) window.open(`/data-govern-szse/edit-assets?ids=${(selectedRows??[]).map(item => item.id).toString()}&elementIds=${(value??[]).toString()}&type=${ResourceManageReference}`)
}, 300) }, 300)
} }
}} }}
......
...@@ -390,7 +390,7 @@ const EditModel = (props) => { ...@@ -390,7 +390,7 @@ const EditModel = (props) => {
} }
const onCopy = () => { const onCopy = () => {
window.open(`/data-govern/data-model-action?${Action}=add&${CatalogId}=${privilege?.catalogId??''}&${ModelerId}=${modelerId}`) window.open(`/data-govern-szse/data-model-action?${Action}=add&${CatalogId}=${privilege?.catalogId??''}&${ModelerId}=${modelerId}`)
} }
const onMetadataCompare = () => { const onMetadataCompare = () => {
......
...@@ -123,7 +123,7 @@ const FC = (props) => { ...@@ -123,7 +123,7 @@ const FC = (props) => {
relationModelerDatas?.length===0 ? '暂无信息' : relationModelerDatas?.length===0 ? '暂无信息' :
relationModelerDatas?.map((item, index) => ( relationModelerDatas?.map((item, index) => (
<a className='mr-3' key={index} onClick={() => { <a className='mr-3' key={index} onClick={() => {
window.open(`/data-govern/data-model-action?${Action}=detail&${ModelerId}=${item.id}&${PermitCheckOut}=${item.permitCheckOut||false}&${Editable}=${item.editable||false}&${StateId}=${item.state?.id||''}&${ReadOnly}=false`); window.open(`/data-govern-szse/data-model-action?${Action}=detail&${ModelerId}=${item.id}&${PermitCheckOut}=${item.permitCheckOut||false}&${Editable}=${item.editable||false}&${StateId}=${item.state?.id||''}&${ReadOnly}=false`);
}}> }}>
{item.cnName} {item.cnName}
</a> </a>
......
...@@ -797,7 +797,7 @@ export const ImportActionTable = (props) => { ...@@ -797,7 +797,7 @@ export const ImportActionTable = (props) => {
const onAddToStandardClick = (record) => { const onAddToStandardClick = (record) => {
app.setGlobalState?.({ app.setGlobalState?.({
message: 'data-govern-show-standard-create', message: 'data-govern-szse-show-standard-create',
data: { data: {
column: {...record, ...{ modelName: modelerData?.name, modelCnName: modelerData?.cnName }}, column: {...record, ...{ modelName: modelerData?.name, modelCnName: modelerData?.cnName }},
type: record?.isPossibleNewRecommendedDefinition?.type type: record?.isPossibleNewRecommendedDefinition?.type
...@@ -807,7 +807,7 @@ export const ImportActionTable = (props) => { ...@@ -807,7 +807,7 @@ export const ImportActionTable = (props) => {
const onAddToWordClick = (record) => { const onAddToWordClick = (record) => {
app.setGlobalState?.({ app.setGlobalState?.({
message: 'data-govern-show-standard-create', message: 'data-govern-szse-show-standard-create',
data: { data: {
column: record, column: record,
type: record?.isPossibleNewTerm?.type type: record?.isPossibleNewTerm?.type
......
...@@ -19,7 +19,7 @@ class ImportExcel extends React.Component { ...@@ -19,7 +19,7 @@ class ImportExcel extends React.Component {
} }
downloadTemplate = () => { downloadTemplate = () => {
window.open("/data-govern/docs/DataModel.xlsx"); window.open("/data-govern-szse/docs/DataModel.xlsx");
} }
normFile = (e) => { normFile = (e) => {
......
...@@ -659,9 +659,9 @@ const ModelTable = (props) => { ...@@ -659,9 +659,9 @@ const ModelTable = (props) => {
historyItem(currentItem); historyItem(currentItem);
} else if (key === 'copy') { } else if (key === 'copy') {
if (view !== 'branch') { if (view !== 'branch') {
window.open(`/data-govern/data-model-action?${Action}=add&${CatalogId}=${(view==='dir')?(catalogId||''):''}&${ModelerId}=${currentItem.id}`); window.open(`/data-govern-szse/data-model-action?${Action}=add&${CatalogId}=${(view==='dir')?(catalogId||''):''}&${ModelerId}=${currentItem.id}`);
} else { } else {
window.open(`/data-govern/data-model-action?${Action}=add&${BranchId}=${catalogId??''}&${ModelerId}=${currentItem.id}`); window.open(`/data-govern-szse/data-model-action?${Action}=add&${BranchId}=${catalogId??''}&${ModelerId}=${currentItem.id}`);
} }
} else if (key === 'createTable') { } else if (key === 'createTable') {
deployAction(currentItem); deployAction(currentItem);
......
...@@ -39,7 +39,7 @@ const VersionHistory = (props) => { ...@@ -39,7 +39,7 @@ const VersionHistory = (props) => {
} }
const onVersionItemClick = (version) => { const onVersionItemClick = (version) => {
window.open(`/data-govern/data-model-action?${Action}=detail-version&${ModelerId}=${version.dataModelId||''}&${VersionId}=${version.id||''}`); window.open(`/data-govern-szse/data-model-action?${Action}=detail-version&${ModelerId}=${version.dataModelId||''}&${VersionId}=${version.id||''}`);
} }
return ( return (
......
...@@ -27,9 +27,9 @@ const FC = (props) => { ...@@ -27,9 +27,9 @@ const FC = (props) => {
callback: data => { callback: data => {
setWaiting(false) setWaiting(false)
if (type === 'notice') { if (type === 'notice') {
window.open(`/data-govern/data-model-action?${Action}=edit&${ModelerId}=${item?.id}&${ModelerMergeId}=${data?.id}&${ConflictItemId}=${item?.conflictItemId}`); window.open(`/data-govern-szse/data-model-action?${Action}=edit&${ModelerId}=${item?.id}&${ModelerMergeId}=${data?.id}&${ConflictItemId}=${item?.conflictItemId}`);
} else { } else {
window.open(`/data-govern/data-model-action?${Action}=edit&${ModelerId}=${item?.id}&${ModelerMergeId}=${data?.id}`); window.open(`/data-govern-szse/data-model-action?${Action}=edit&${ModelerId}=${item?.id}&${ModelerMergeId}=${data?.id}`);
} }
}, },
error: () => { error: () => {
......
...@@ -328,7 +328,7 @@ const List = React.forwardRef(function ({ items }, ref) { ...@@ -328,7 +328,7 @@ const List = React.forwardRef(function ({ items }, ref) {
<Typography.Paragraph ellipsis={{ <Typography.Paragraph ellipsis={{
rows: 3, rows: 3,
}}><a onClick={() => { }}><a onClick={() => {
window.open(`/data-govern/data-model-action?${Action}=detail&${ModelerId}=${record.id}&${PermitCheckOut}=${record.permitCheckOut||false}&${Editable}=${record.editable||false}&${StateId}=${record.state?.id||''}&${ReadOnly}=false`); window.open(`/data-govern-szse/data-model-action?${Action}=detail&${ModelerId}=${record.id}&${PermitCheckOut}=${record.permitCheckOut||false}&${Editable}=${record.editable||false}&${StateId}=${record.state?.id||''}&${ReadOnly}=false`);
}}>{text}</a></Typography.Paragraph> }}>{text}</a></Typography.Paragraph>
</Tooltip> </Tooltip>
) )
......
...@@ -378,7 +378,7 @@ class Model extends React.Component { ...@@ -378,7 +378,7 @@ class Model extends React.Component {
currentBranchId = catalogId currentBranchId = catalogId
} }
window.open(`/data-govern/data-model-action?${Action}=${importModalAction}&${CatalogId}=${currentCatalogId}&${ModelerId}=${modelerId}&${PermitCheckOut}=${record.permitCheckOut||false}&${Editable}=${record.editable||false}&${StateId}=${record.state?.id||''}&${ReadOnly}=${readOnly}&${BranchId}=${currentBranchId}`); window.open(`/data-govern-szse/data-model-action?${Action}=${importModalAction}&${CatalogId}=${currentCatalogId}&${ModelerId}=${modelerId}&${PermitCheckOut}=${record.permitCheckOut||false}&${Editable}=${record.editable||false}&${StateId}=${record.state?.id||''}&${ReadOnly}=${readOnly}&${BranchId}=${currentBranchId}`);
}); });
} }
...@@ -445,7 +445,7 @@ class Model extends React.Component { ...@@ -445,7 +445,7 @@ class Model extends React.Component {
onImportUnconditionBtnClick = () => { onImportUnconditionBtnClick = () => {
const { catalogId, currentView } = this.state; const { catalogId, currentView } = this.state;
window.open(`/data-govern/data-model-action?${Action}=add&${CatalogId}=${(currentView==='dir')?(catalogId||''):''}`); window.open(`/data-govern-szse/data-model-action?${Action}=add&${CatalogId}=${(currentView==='dir')?(catalogId||''):''}`);
} }
onExportDDLBtnClick = () => { onExportDDLBtnClick = () => {
...@@ -537,11 +537,11 @@ class Model extends React.Component { ...@@ -537,11 +537,11 @@ class Model extends React.Component {
if ((hints||[]).length > 0) { if ((hints||[]).length > 0) {
setTimeout(() => { setTimeout(() => {
window.open(`/data-govern/data-model-action?${Action}=add&${CatalogId}=${currentCatalogId}&${Hints}=${encodeURIComponent((hints||[]).join(','))}&${BranchId}=${branchId}`); window.open(`/data-govern-szse/data-model-action?${Action}=add&${CatalogId}=${currentCatalogId}&${Hints}=${encodeURIComponent((hints||[]).join(','))}&${BranchId}=${branchId}`);
}, 1000); }, 1000);
} else { } else {
setTimeout(() => { setTimeout(() => {
window.open(`/data-govern/data-model-action?${Action}=add&${CatalogId}=${currentCatalogId}&${BranchId}=${branchId}`); window.open(`/data-govern-szse/data-model-action?${Action}=add&${CatalogId}=${currentCatalogId}&${BranchId}=${branchId}`);
}, 1000); }, 1000);
} }
} }
...@@ -573,7 +573,7 @@ class Model extends React.Component { ...@@ -573,7 +573,7 @@ class Model extends React.Component {
} }
wordData.content.slice(0, 5).forEach(data => { wordData.content.slice(0, 5).forEach(data => {
window.open(`/data-govern/data-model-action?${Action}=add&${CatalogId}=${currentCatalogId}&${BranchId}=${branchId}&${ModelerData}=${encodeURIComponent(JSON.stringify(data))}`, '_blank'); window.open(`/data-govern-szse/data-model-action?${Action}=add&${CatalogId}=${currentCatalogId}&${BranchId}=${branchId}&${ModelerData}=${encodeURIComponent(JSON.stringify(data))}`, '_blank');
}) })
}, 2000); }, 2000);
...@@ -598,7 +598,7 @@ class Model extends React.Component { ...@@ -598,7 +598,7 @@ class Model extends React.Component {
branchId = catalogId branchId = catalogId
} }
window.open(`/data-govern/data-model-action?${Action}=add&${CatalogId}=${currentCatalogId}&${BranchId}=${branchId}&${DDL}=${encodeURIComponent(ddl)}`, '_blank'); window.open(`/data-govern-szse/data-model-action?${Action}=add&${CatalogId}=${currentCatalogId}&${BranchId}=${branchId}&${DDL}=${encodeURIComponent(ddl)}`, '_blank');
}, 1000); }, 1000);
} }
...@@ -753,7 +753,7 @@ class Model extends React.Component { ...@@ -753,7 +753,7 @@ class Model extends React.Component {
<Button <Button
onClick={()=>{ onClick={()=>{
value?.setGlobalState?.({ value?.setGlobalState?.({
message: "data-govern-show-select-metadata", message: "data-govern-szse-show-select-metadata",
data: { data: {
// TODO // TODO
cb: async (val) => { cb: async (val) => {
......
...@@ -158,11 +158,11 @@ const TemplateCURD = (props) => { ...@@ -158,11 +158,11 @@ const TemplateCURD = (props) => {
} }
const editItem = (record) => { const editItem = (record) => {
window.open(`/data-govern/model-template-action?${Action}=edit&${TemplateId}=${record.id}`); window.open(`/data-govern-szse/model-template-action?${Action}=edit&${TemplateId}=${record.id}`);
} }
const detailItem = (record) => { const detailItem = (record) => {
window.open(`/data-govern/model-template-action?${Action}=detail&${TemplateId}=${record.id}`); window.open(`/data-govern-szse/model-template-action?${Action}=detail&${TemplateId}=${record.id}`);
} }
const deleteItem = (record) => { const deleteItem = (record) => {
...@@ -187,7 +187,7 @@ const TemplateCURD = (props) => { ...@@ -187,7 +187,7 @@ const TemplateCURD = (props) => {
} }
const onAddClick = () => { const onAddClick = () => {
window.open(`/data-govern/model-template-action?${Action}=add`); window.open(`/data-govern-szse/model-template-action?${Action}=add`);
} }
return ( return (
......
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