mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-19 08:50:57 +00:00
[improvement](semantic-fe) Added parameter compatibility for network requests in different modes
This commit is contained in:
@@ -26,6 +26,7 @@ type Props = {
|
||||
const DEFAULT_LEFT_SIZE = '300px';
|
||||
|
||||
const DomainManger: React.FC<Props> = ({ domainManger, dispatch }) => {
|
||||
window.RUNNING_ENV = 'semantic';
|
||||
const [collapsed, setCollapsed] = useState(false);
|
||||
const [leftSize, setLeftSize] = useState('');
|
||||
const { selectDomainId, selectDomainName } = domainManger;
|
||||
|
||||
@@ -196,7 +196,6 @@ const DomainManger: React.FC<Props> = ({ domainManger, domainId }) => {
|
||||
};
|
||||
// const [visible, setVisible] = useState(false);
|
||||
useEffect(() => {
|
||||
console.log(domainId, graphData, 'domainId');
|
||||
if (!(Array.isArray(graphData.children) && graphData.children.length > 0)) {
|
||||
return;
|
||||
}
|
||||
@@ -356,7 +355,6 @@ const DomainManger: React.FC<Props> = ({ domainManger, domainId }) => {
|
||||
labelCfg: { style: { fill: '#3c3c3c' } },
|
||||
};
|
||||
});
|
||||
console.log(graphData, 'graphData');
|
||||
// graph.data(graphData);
|
||||
graph.changeData(graphData);
|
||||
graph.render();
|
||||
@@ -386,7 +384,6 @@ const DomainManger: React.FC<Props> = ({ domainManger, domainId }) => {
|
||||
value={graphShowType}
|
||||
onChange={(e) => {
|
||||
const { value } = e.target;
|
||||
console.log(value, 'value');
|
||||
setGraphShowType(value);
|
||||
changeGraphData(dataSourceListData, value);
|
||||
}}
|
||||
|
||||
@@ -53,14 +53,14 @@ const PermissionTable: React.FC<Props> = ({ domainManger }) => {
|
||||
|
||||
const queryDepartmentData = async () => {
|
||||
const { code, data } = await getDepartmentTree();
|
||||
if (code === 200) {
|
||||
if (code === 200 || code === '0') {
|
||||
setDepartmentTreeData(data);
|
||||
}
|
||||
};
|
||||
|
||||
const queryTmePersonData = async () => {
|
||||
const { code, data } = await getAllUser();
|
||||
if (code === 200) {
|
||||
if (code === 200 || Number(code) === 0) {
|
||||
setTmePerson(data);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user