Commit 24791fbc authored by Maofei94's avatar Maofei94

perf: 产配配置模块修改

parent f0be5103
Pipeline #22315 skipped with stages
...@@ -41,7 +41,8 @@ const EditForm = props => { ...@@ -41,7 +41,8 @@ const EditForm = props => {
}; };
return ( return (
<Spin spinning={loading} tip="loading..."> <Spin spinning={loading} tip="loading...">
<div style={{ minHeight: 'calc(100vh - 252px)', marginTop: '20px' }}> {/* <div style={{ marginLeft: '5%', marginTop: '-5px' }}>配置详情</div> */}
<div style={{ minHeight: 'calc(100vh - 252px)', marginTop: '35px' }}>
<Form form={form} name="formEdit" {...layout} onFinish={finished}> <Form form={form} name="formEdit" {...layout} onFinish={finished}>
<Item <Item
label="产品名称:" label="产品名称:"
...@@ -55,6 +56,18 @@ const EditForm = props => { ...@@ -55,6 +56,18 @@ const EditForm = props => {
> >
<Input placeholder="请输入产品名称" allowClear /> <Input placeholder="请输入产品名称" allowClear />
</Item> </Item>
<Item
label="产品别名:"
name="ProductAlias"
// rules={[
// {
// required: true,
// message: '请输入产品别名',
// },
// ]}
>
<Input placeholder="请输入产品别名" allowClear />
</Item>
<Item <Item
label="产品环境:" label="产品环境:"
......
...@@ -70,6 +70,18 @@ const AddForm = props => { ...@@ -70,6 +70,18 @@ const AddForm = props => {
> >
<Input placeholder="请输入产品名称" allowClear /> <Input placeholder="请输入产品名称" allowClear />
</Item> </Item>
<Item
label="产品别名:"
name="ProductAlias"
// rules={[
// {
// required: true,
// message: '请输入产品别名',
// },
// ]}
>
<Input placeholder="请输入产品别名" allowClear />
</Item>
<Item <Item
label="产品环境:" label="产品环境:"
name="Environment" name="Environment"
......
...@@ -25,7 +25,7 @@ const WebConfigPage = props => { ...@@ -25,7 +25,7 @@ const WebConfigPage = props => {
const [configVisible, setConfigVisible] = useState(false); const [configVisible, setConfigVisible] = useState(false);
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [webs, setWebs] = useState([]); const [webs, setWebs] = useState([]);
const [curWeb, setCurWeb] = useState('99'); // 当前展示的web const [curWeb, setCurWeb] = useState(''); // 当前展示的web
const [configObj, setConfigObj] = useState({}); // 获取当前的web的配置 const [configObj, setConfigObj] = useState({}); // 获取当前的web的配置
const [toEdit, setToEdit] = useState(null); // 编辑展示用的配置 const [toEdit, setToEdit] = useState(null); // 编辑展示用的配置
const [isEdit, setIsEdit] = useState(true); const [isEdit, setIsEdit] = useState(true);
...@@ -266,9 +266,9 @@ const WebConfigPage = props => { ...@@ -266,9 +266,9 @@ const WebConfigPage = props => {
<div className={styles.webConfigContainer}> <div className={styles.webConfigContainer}>
<Spin spinning={loading || submitting}> <Spin spinning={loading || submitting}>
<Tabs type="editable-card" onEdit={onEdit} onChange={handleTabChange}> <Tabs type="editable-card" onEdit={onEdit} onChange={handleTabChange}>
<TabPane key={99} tab="产品配置" closable={false}> {/* <TabPane key={99} tab="产品配置" closable={false}>
<ProductConfig /> <ProductConfig />
</TabPane> </TabPane> */}
{/* {webs.map(renderTabPane)} */} {/* {webs.map(renderTabPane)} */}
{webs.map(item => renderTabPane(item))} {webs.map(item => renderTabPane(item))}
</Tabs> </Tabs>
......
...@@ -121,8 +121,14 @@ const ProductConfig = props => { ...@@ -121,8 +121,14 @@ const ProductConfig = props => {
删除 删除
</Button> */} </Button> */}
</div> </div>
{} {productList && productList.length > 0 ? (
<List>{renderListItem(productList)}</List> <List>{renderListItem(productList)}</List>
) : (
<Empty
image={Empty.PRESENTED_IMAGE_SIMPLE}
description="暂无数据"
/>
)}
</Card> </Card>
<Card className={styles.rightForm}> <Card className={styles.rightForm}>
{productList && productList.length > 0 && productObj ? ( {productList && productList.length > 0 && productObj ? (
...@@ -133,6 +139,7 @@ const ProductConfig = props => { ...@@ -133,6 +139,7 @@ const ProductConfig = props => {
/> />
) : ( ) : (
<Empty <Empty
style={{ marginTop: '60px' }}
image={Empty.PRESENTED_IMAGE_SIMPLE} image={Empty.PRESENTED_IMAGE_SIMPLE}
description="当前未选中产品类型" description="当前未选中产品类型"
/> />
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.box{ .box{
width: 100%; width: 100%;
display: flex; display: flex;
height: calc(100vh - 132px); height: calc(100vh - 72px);
} }
.leftList{ .leftList{
width: 330px; width: 330px;
......
...@@ -31,6 +31,7 @@ import TestTable from '../pages/orgnazation/TestTable'; ...@@ -31,6 +31,7 @@ import TestTable from '../pages/orgnazation/TestTable';
import WebConfigPage from '@/pages/webConfig'; import WebConfigPage from '@/pages/webConfig';
// import AppConfigPage from '@/pages/appConfig'; // import AppConfigPage from '@/pages/appConfig';
import MobileConfigPage from '@/pages/mobileConfig'; import MobileConfigPage from '@/pages/mobileConfig';
import ProductConfig from '@/pages/webConfig/productConfig';
import { USER_MODE } from '@/utils/constants'; import { USER_MODE } from '@/utils/constants';
import BaseFrameContainer from '@/components/BaseFrameContainer'; import BaseFrameContainer from '@/components/BaseFrameContainer';
import JumpContainer from '@/components/JumpContainer'; import JumpContainer from '@/components/JumpContainer';
...@@ -214,6 +215,11 @@ export default { ...@@ -214,6 +215,11 @@ export default {
name: '应用中心', name: '应用中心',
icon: <HomeOutlined style={iconStyle} />, icon: <HomeOutlined style={iconStyle} />,
routes: [ routes: [
{
path: '/productCenter/product',
name: '产品配置',
component: ProductConfig,
},
{ {
path: '/productCenter/web', path: '/productCenter/web',
name: 'Web配置', name: 'Web配置',
......
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