Commit 5946debb authored by 邓超's avatar 邓超

fix: 修改web配置界面

parent aef5a577
Pipeline #52505 passed with stages
...@@ -15,6 +15,7 @@ import { ...@@ -15,6 +15,7 @@ import {
Divider, Divider,
Row, Row,
Col, Col,
Switch,
} from 'antd'; } from 'antd';
import { PlusOutlined, InfoCircleOutlined } from '@ant-design/icons'; import { PlusOutlined, InfoCircleOutlined } from '@ant-design/icons';
import WebConfigForm from './webConfigForm'; import WebConfigForm from './webConfigForm';
...@@ -44,6 +45,7 @@ export default props => { ...@@ -44,6 +45,7 @@ export default props => {
const [displayColorPicker, setDisplayColorPicker] = useState(false); const [displayColorPicker, setDisplayColorPicker] = useState(false);
const [color, setColor] = useState(''); const [color, setColor] = useState('');
const CheckboxGroup = Checkbox.Group; const CheckboxGroup = Checkbox.Group;
const [showAdvanced, setShowAdvanced] = useState(false); // 是否显示高级设置
useEffect(() => { useEffect(() => {
onGetLoginPages(); onGetLoginPages();
console.log(isEdit); console.log(isEdit);
...@@ -86,6 +88,7 @@ export default props => { ...@@ -86,6 +88,7 @@ export default props => {
}); });
setColor(config.headerPrimaryColor ? config.headerPrimaryColor : '#1890FF'); setColor(config.headerPrimaryColor ? config.headerPrimaryColor : '#1890FF');
} else { } else {
setColor('#1890FF');
form.setFieldsValue({ form.setFieldsValue({
messageMarking: 'All', messageMarking: 'All',
messageVoice: true, messageVoice: true,
...@@ -97,6 +100,7 @@ export default props => { ...@@ -97,6 +100,7 @@ export default props => {
}); });
} }
} else { } else {
setShowAdvanced(false);
form.resetFields(); form.resetFields();
} }
}, [visible]); }, [visible]);
...@@ -238,35 +242,34 @@ export default props => { ...@@ -238,35 +242,34 @@ export default props => {
> >
<Input autoComplete="off" disabled={isEdit} /> <Input autoComplete="off" disabled={isEdit} />
</Form.Item> </Form.Item>
<Form.Item name="topMenu" label="顶部功能"> <Form.Item label="登录模板" name="loginTemplate">
<Checkbox <Select placeholder="请选择登录模板">
indeterminate={indeterminate} {loginPages.map(item => (
onChange={onCheckAllChange} <Option value={item.value} key={item.value}>
checked={checkAll} {item.value}
style={{ marginTop: '5px', display: 'none' }}
>
全选
</Checkbox>
{/* <br />
<br /> */}
<CheckboxGroup options={plainOptions} value={checkedList} onChange={onChange} />
</Form.Item>
<Form.Item name="primaryColor" label="内容主题">
<Select placeholder="请选择颜色">
{colorList.map(item => (
<Option value={item.color} key={item.color}>
{`${item.key}${item.color})`}
</Option> </Option>
))} ))}
</Select> </Select>
</Form.Item> </Form.Item>
<Form.Item label="侧边导航主题" name="navTheme"> <Divider orientation="left" style={{ borderTopColor: '#99bbe8' }}>
<Select placeholder="请选择功能标签"> 主页配置
<Option value="light"></Option> </Divider>
<Option value="dark"></Option> <Form.Item label="产品类型" name="productType">
<Select placeholder="请选择主页产品类型">
{productList.map(item => (
<Option value={item.PackageName} key={item.PackageName}>
{`${item.ProductName}${item.PackageName})`}
</Option>
))}
</Select> </Select>
</Form.Item> </Form.Item>
<Form.Item name="headerPrimaryColor" label="顶部导航主题"> <Form.Item label="主页Url" name="homePage">
<Input placeholder="请输入主页路径" autoComplete="off" />
</Form.Item>
<Divider orientation="left" style={{ borderTopColor: '#99bbe8' }}>
主题配置
</Divider>
<Form.Item name="headerPrimaryColor" label="顶部">
<div className={styles.colorBox}> <div className={styles.colorBox}>
<div <div
className={styles.colorSwatch} className={styles.colorSwatch}
...@@ -303,27 +306,57 @@ export default props => { ...@@ -303,27 +306,57 @@ export default props => {
) : null} ) : null}
</div> </div>
</Form.Item> </Form.Item>
<Form.Item label="产品类型" name="productType"> <Form.Item name="navTheme" label="菜单">
<Select placeholder="请选择主页产品类型"> <Select placeholder="请选择功能标签">
{productList.map(item => ( <Option value="light"></Option>
<Option value={item.PackageName} key={item.PackageName}> <Option value="dark"></Option>
{`${item.ProductName}${item.PackageName})`}
</Option>
))}
</Select> </Select>
</Form.Item> </Form.Item>
<Form.Item label="主页Url" name="homePage"> <Form.Item name="primaryColor" label="基础">
<Input placeholder="请输入主页路径" autoComplete="off" /> <Select placeholder="请选择颜色">
</Form.Item> {colorList.map(item => (
<Form.Item label="登录模板" name="loginTemplate"> <Option value={item.color} key={item.color}>
<Select placeholder="请选择登录模板"> <div style={{ display: 'flex', alignItems: 'center' }}>
{loginPages.map(item => ( <div
<Option value={item.value} key={item.value}> style={{
{item.value} height: '10px',
width: '10px',
background: item.color,
marginRight: '5px',
}}
/>
{`${item.key}${item.color})`}
</div>
</Option> </Option>
))} ))}
</Select> </Select>
</Form.Item> </Form.Item>
<Form.Item>
<Switch
checked={showAdvanced}
checkedChildren="高级设置"
unCheckedChildren="高级设置"
onChange={() => setShowAdvanced(!showAdvanced)}
/>
</Form.Item>
<div style={{ display: showAdvanced ? 'block' : 'none' }}>
<Form.Item name="topMenu" label="顶部功能">
<Checkbox
indeterminate={indeterminate}
onChange={onCheckAllChange}
checked={checkAll}
style={{ marginTop: '5px', display: 'none' }}
>
全选
</Checkbox>
<CheckboxGroup
options={plainOptions}
value={checkedList}
checked={showAdvanced}
onChange={onChange}
/>
</Form.Item>
<Form.Item label="功能标签" name="mdi"> <Form.Item label="功能标签" name="mdi">
<Select placeholder="请选择功能标签"> <Select placeholder="请选择功能标签">
<Option value="MDI" key="0"> <Option value="MDI" key="0">
...@@ -374,6 +407,7 @@ export default props => { ...@@ -374,6 +407,7 @@ export default props => {
<Radio value={false}>关闭</Radio> <Radio value={false}>关闭</Radio>
</Radio.Group> </Radio.Group>
</Form.Item> </Form.Item>
</div>
</Form> </Form>
</Drawer> </Drawer>
); );
......
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