Commit a30dedd7 authored by Maofei94's avatar Maofei94

fix: 删除503

parent 1dea9961
Pipeline #22697 passed with stages
in 17 minutes 13 seconds
...@@ -143,8 +143,12 @@ const MobileConfigPage = props => { ...@@ -143,8 +143,12 @@ const MobileConfigPage = props => {
setLoading(false); setLoading(false);
if (res.success) { if (res.success) {
setMiniTitle(''); setMiniTitle('');
setFlag(flag + 1); setTimeout(() => {
deleteMiniMenu({ visible: val }); setFlag(flag + 1);
}, 500);
setTimeout(() => {
deleteMiniMenu({ visible: val });
}, 1500);
notification.success({ notification.success({
message: '提示', message: '提示',
duration: 3, duration: 3,
......
...@@ -4,6 +4,7 @@ import { ...@@ -4,6 +4,7 @@ import {
getLoginPage, getLoginPage,
getMapCofigs, getMapCofigs,
getWebThemes, getWebThemes,
getProductList,
} from '@/services/webConfig/api'; } from '@/services/webConfig/api';
import { Row, Col } from 'antd'; import { Row, Col } from 'antd';
import { getDefaultGetWebconfig, singleStyleData, webMode } from '../utils'; import { getDefaultGetWebconfig, singleStyleData, webMode } from '../utils';
...@@ -21,6 +22,7 @@ const WebConfigForm = props => { ...@@ -21,6 +22,7 @@ const WebConfigForm = props => {
const [webThemes, setWebThemes] = useState([]); const [webThemes, setWebThemes] = useState([]);
const [mapConfigs, setMapConfigs] = useState([]); const [mapConfigs, setMapConfigs] = useState([]);
const [loginPages, setLoginPages] = useState([]); const [loginPages, setLoginPages] = useState([]);
const [products, setProducts] = useState([]);
const [form, setForm] = useState(null); const [form, setForm] = useState(null);
const getForm = f => { const getForm = f => {
...@@ -50,6 +52,15 @@ const WebConfigForm = props => { ...@@ -50,6 +52,15 @@ const WebConfigForm = props => {
getMapCofigs().then(res => setMapConfigs(res)); getMapCofigs().then(res => setMapConfigs(res));
} }
}; };
const onGetProduct = () => {
if (products.length === 0) {
getProductList().then(res => {
if (res.code === 0) {
setProducts(res.data);
}
});
}
};
const itemsMap = getDefaultGetWebconfig({ const itemsMap = getDefaultGetWebconfig({
initialValues: config, initialValues: config,
...@@ -61,6 +72,8 @@ const WebConfigForm = props => { ...@@ -61,6 +72,8 @@ const WebConfigForm = props => {
mapConfigs, mapConfigs,
onGetLoginPages, onGetLoginPages,
onGetMapConfig, onGetMapConfig,
products,
onGetProduct,
isEdit, isEdit,
}); });
......
...@@ -80,6 +80,8 @@ export const getDefaultGetWebconfig = ({ ...@@ -80,6 +80,8 @@ export const getDefaultGetWebconfig = ({
onGetLoginPages, onGetLoginPages,
mapConfigs, mapConfigs,
onGetMapConfig, onGetMapConfig,
products,
onGetProduct,
isEdit, isEdit,
}) => { }) => {
const config = { const config = {
...@@ -183,6 +185,26 @@ export const getDefaultGetWebconfig = ({ ...@@ -183,6 +185,26 @@ export const getDefaultGetWebconfig = ({
}, },
], ],
}, },
product: {
label: '产品类型',
formType: ITEM_TYPE.SELECT,
placeholder: '请选择产品类型',
options: products.map(t => ({
value: t.ProductName,
children: t.ProductName,
key: t.Id,
})),
onDropdownVisibleChange: onGetProduct,
showSearch: true,
filterOption: (input, option) =>
option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
rules: [
{
required: false,
message: '产品类型必填',
},
],
},
theme: { theme: {
label: '系统皮肤', label: '系统皮肤',
formType: ITEM_TYPE.SELECT, formType: ITEM_TYPE.SELECT,
......
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