41 lines
1.7 KiB
JavaScript
41 lines
1.7 KiB
JavaScript
import React, { useState } from 'react';
|
|
import { Tabs } from 'antd';
|
|
import Styles from './web.pc.module.less';
|
|
import OfflineConfig from '../../offlineAccount/config';
|
|
import WpAccountConfig from '../../wpAccount/config';
|
|
const PayChannelConfigDict = {
|
|
'wpAccount': WpAccountConfig,
|
|
};
|
|
export function registerPayChannelConfigDict(entity, component) {
|
|
PayChannelConfigDict[entity] = component;
|
|
}
|
|
export default function render(props) {
|
|
const { system, oakFullpath, operation, oakDirty, serverUrl, oakExecutable } = props.data;
|
|
const { t, update, setMessage, execute } = props.methods;
|
|
const [key, setKey] = useState('');
|
|
if (system && oakFullpath) {
|
|
return (<div className={Styles.container}>
|
|
<Tabs className={Styles.tabs} tabPosition="left" items={[
|
|
{
|
|
label: (<div className={Styles.systemLabel}>
|
|
{t('offlineAccount:name')}
|
|
</div>),
|
|
key: 'offlineAccount',
|
|
children: (<OfflineConfig oakPath={`${oakFullpath}.offlineAccount$system`} systemId={system.id}/>),
|
|
},
|
|
...Object.keys(PayChannelConfigDict).map((ele) => {
|
|
const C = PayChannelConfigDict[ele];
|
|
return {
|
|
label: (<div className={Styles.systemLabel}>
|
|
{t(`${ele}:name`)}
|
|
</div>),
|
|
key: 'ele',
|
|
children: <C oakPath={`${oakFullpath}.${ele}$system`} systemId={system.id}/>
|
|
};
|
|
})
|
|
]}/>
|
|
</div>);
|
|
}
|
|
return null;
|
|
}
|