Commit f8bbb3d1 by zhaochengxiang

资产关系图替换

parent 00240e9c
...@@ -10,12 +10,15 @@ module.exports = { ...@@ -10,12 +10,15 @@ module.exports = {
lessOptions: { lessOptions: {
modifyVars: { modifyVars: {
'@ant-prefix': 'yy', '@ant-prefix': 'yy',
// '@border-color-split': 'hsv(0, 0, 85%)', '@primary-color': '#c7000b',
'@border-radius-base': '4px',
'@primary-color': '#196AD2',
'@success-color': '#8FC31F', '@success-color': '#8FC31F',
'@warning-color': '#F7AB00', '@warning-color': '#F7AB00',
'@error-color': '#E94848', '@error-color': '#c7000b',
'@menu-dark-bg': '#c7000b',
'@menu-dark-submenu-bg': '#c7000b',
'@menu-dark-inline-submenu-bg': '#c7000b',
'@layout-header-background': '#c7000b',
'@border-radius-base': '4px',
}, },
javascriptEnabled: true, javascriptEnabled: true,
}, },
......
...@@ -199,11 +199,11 @@ tr.drop-over-upward td { ...@@ -199,11 +199,11 @@ tr.drop-over-upward td {
} }
.primary-color { .primary-color {
color: #196AD2; color: #c7000b;
} }
.primary-bg-color { .primary-bg-color {
background-color: #196AD2; background-color: #c7000b;
} }
.title-color { .title-color {
...@@ -355,7 +355,7 @@ svg { ...@@ -355,7 +355,7 @@ svg {
} }
.primary-bg-container { .primary-bg-container {
background-color: #196AD2; background-color: #c7000b;
} }
.yy-card-head { .yy-card-head {
......
...@@ -5,6 +5,6 @@ ...@@ -5,6 +5,6 @@
@scroll-height: 15px; @scroll-height: 15px;
@icon-normal-color: #6F6F6F; @icon-normal-color: #6F6F6F;
@icon-hover-color: #196AD2; @icon-hover-color: #c7000b;
@icon-grey-color: #D5D5D5; @icon-grey-color: #D5D5D5;
@icon-disable-color: #bfbfbf; @icon-disable-color: #bfbfbf;
\ No newline at end of file
...@@ -6,6 +6,7 @@ import Relation from './Relation'; ...@@ -6,6 +6,7 @@ import Relation from './Relation';
import Thermodynamic from './Thermodynamic'; import Thermodynamic from './Thermodynamic';
import { AssetBrowseReference, ResourceBrowseReference } from '../../../../util/constant'; import { AssetBrowseReference, ResourceBrowseReference } from '../../../../util/constant';
import { AppContext } from '../../../../App'; import { AppContext } from '../../../../App';
import DataAtlas from '../../../QianKun/Data-Atlas';
const relationTypes = [ const relationTypes = [
{ {
...@@ -267,7 +268,7 @@ const RelationContainer = (props) => { ...@@ -267,7 +268,7 @@ const RelationContainer = (props) => {
return ( return (
<div style={{ width: '100%', height: '100%', position: 'relative' }}> <div style={{ width: '100%', height: '100%', position: 'relative' }}>
{ {
(type==='relation') && <Relation data={relationData} expandId={nodeParams?.expandId} resize={resize} onCenterClick={onCenterClick} onExpandClick={onExpandClick} /> (type==='relation') && <DataAtlas data={dirs} did={nodeParams?.centerId} />
} }
{ {
(type==='thermodynamic') && <Thermodynamic data={thermodynamicData} resize={resize} onClick={onThermodynamicClick} /> (type==='thermodynamic') && <Thermodynamic data={thermodynamicData} resize={resize} onClick={onThermodynamicClick} />
......
import { loadMicroApp, MicroApp } from 'qiankun'
import React, { useEffect, useRef, useState } from 'react'
import {useSelector} from "react-redux"
const App= (props)=> {
const containerRef = useRef(null)
const microApp = useRef()
const {data, did} = props
const time = new Date().getTime()
const location = props.location;
useEffect(() => {
if (!!containerRef.current) {
microApp.current = loadMicroApp(
{ name: 'data-atlas', entry: `/data-atlas`, container: containerRef.current, props: { grpah: 1 } },
);
}
return () => {
microApp.current?.unmount();
}
}, [])
useEffect(() => {
function updateMicroApp() {
if (microApp.current?.update) {
microApp.current?.update?.({ data, did });
} else {
setTimeout(() => {
updateMicroApp();
}, 100)
}
}
updateMicroApp();
}, [data, did])
return (
<>
<div ref={containerRef} style={{ width: '100%', height: '100%' }} />
</>
);
}
export default App
\ 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