Commit 24791fbc authored by Maofei94's avatar Maofei94

perf: 产配配置模块修改

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