Commit 1a60acfd authored by 皮倩雯's avatar 皮倩雯

fix: 'web搭建新增地图遮罩配置'

parent bd345940
Pipeline #64284 passed with stages
...@@ -70,18 +70,16 @@ export default props => { ...@@ -70,18 +70,16 @@ export default props => {
const [keepText, setKeepText] = useState([]); const [keepText, setKeepText] = useState([]);
const [keepValue, setKeepValue] = useState([]); const [keepValue, setKeepValue] = useState([]);
const [visibleChecked, setVisibleChecked] = useState(''); const [visibleChecked, setVisibleChecked] = useState(''); // 菜单开关
const [visibleChecked1, setVisibleChecked1] = useState(''); const [visibleChecked1, setVisibleChecked1] = useState(''); // SaaS样式开关
const [visibleChecked2, setVisibleChecked2] = useState(''); const [visibleChecked2, setVisibleChecked2] = useState(''); // Web4地图开关
const [visibleChecked3, setVisibleChecked3] = useState(''); const [visibleChecked3, setVisibleChecked3] = useState(''); // 消息标记开关
const [visibleChecked4, setVisibleChecked4] = useState(''); const [visibleChecked4, setVisibleChecked4] = useState(''); // 语音播报开关
const [visibleChecked5, setVisibleChecked5] = useState(''); const [visibleChecked5, setVisibleChecked5] = useState(''); // 菜单样式开关
const [visibleChecked7, setVisibleChecked7] = useState(''); // 地图遮罩开关
useEffect(() => { useEffect(() => {
console.log(webs);
onGetLoginPages(); onGetLoginPages();
console.log(productList);
console.log(isEdit);
let text = []; let text = [];
let value = []; let value = [];
webs.map(i => { webs.map(i => {
...@@ -91,9 +89,7 @@ export default props => { ...@@ -91,9 +89,7 @@ export default props => {
setKeepText(text); setKeepText(text);
setKeepValue(value); setKeepValue(value);
if (isEdit) { if (isEdit) {
console.log(config);
if (config != null && config.topMenu) { if (config != null && config.topMenu) {
console.log(config);
setCheckedList(config.topMenu.split(',')); setCheckedList(config.topMenu.split(','));
if (config.topMenu.split(',').length == 1 && config.topMenu.split(',')[0] == '') { if (config.topMenu.split(',').length == 1 && config.topMenu.split(',')[0] == '') {
setIndeterminate(false); setIndeterminate(false);
...@@ -144,10 +140,11 @@ export default props => { ...@@ -144,10 +140,11 @@ export default props => {
config.menuState == false; config.menuState == false;
setVisibleChecked5(false); setVisibleChecked5(false);
} }
console.log(config);
setVisibleChecked(config.navTheme == 'light'); setVisibleChecked(config.navTheme == 'light');
setVisibleChecked2(config.hideMap); setVisibleChecked2(config.hideMap);
setVisibleChecked4(config.messageVoice); setVisibleChecked4(config.messageVoice);
setVisibleChecked7(config.useCoverMap == 'true');
form.setFieldsValue({ form.setFieldsValue({
...config, ...config,
primaryColor: config.primaryColor ? config.primaryColor : '#0087F7', primaryColor: config.primaryColor ? config.primaryColor : '#0087F7',
...@@ -157,6 +154,7 @@ export default props => { ...@@ -157,6 +154,7 @@ export default props => {
hideMap: config.hideMap, hideMap: config.hideMap,
messageVoice: config.messageVoice, messageVoice: config.messageVoice,
menuState: config.menuState, menuState: config.menuState,
useCoverMap: config.useCoverMap == 'true',
headerPrimaryColor: config.headerPrimaryColor headerPrimaryColor: config.headerPrimaryColor
? config.headerPrimaryColor ? config.headerPrimaryColor
: 'linear-gradient(0deg, #0066D6 0%, #39A9FF 100%)', : 'linear-gradient(0deg, #0066D6 0%, #39A9FF 100%)',
...@@ -174,6 +172,7 @@ export default props => { ...@@ -174,6 +172,7 @@ export default props => {
setVisibleChecked3(true); setVisibleChecked3(true);
setVisibleChecked4(true); setVisibleChecked4(true);
setVisibleChecked5(true); setVisibleChecked5(true);
setVisibleChecked7(true);
form.setFieldsValue({ form.setFieldsValue({
shortcutIcon: 'assets\\images\\icon\\熊猫-蓝色.png', shortcutIcon: 'assets\\images\\icon\\熊猫-蓝色.png',
logo: 'assets\\images\\logo\\熊猫-蓝绿色.svg', logo: 'assets\\images\\logo\\熊猫-蓝绿色.svg',
...@@ -187,6 +186,7 @@ export default props => { ...@@ -187,6 +186,7 @@ export default props => {
primaryColor: '#0087F7', primaryColor: '#0087F7',
navTheme: false, navTheme: false,
CloudStyle: true, CloudStyle: true,
useCoverMap: true,
headerPrimaryColor: 'linear-gradient(0deg, #0066D6 0%, #39A9FF 100%)', headerPrimaryColor: 'linear-gradient(0deg, #0066D6 0%, #39A9FF 100%)',
}); });
} }
...@@ -258,6 +258,7 @@ export default props => { ...@@ -258,6 +258,7 @@ export default props => {
validate.CloudStyle = visibleChecked1 ? '是' : '否'; validate.CloudStyle = visibleChecked1 ? '是' : '否';
validate.messageMarking = visibleChecked3 ? 'All' : 'One'; validate.messageMarking = visibleChecked3 ? 'All' : 'One';
validate.menuState = visibleChecked5 ? 'open' : 'close'; validate.menuState = visibleChecked5 ? 'open' : 'close';
console.log(validate);
if (validate) { if (validate) {
const colorIndex = colorList.findIndex(item => item.color === validate.primaryColor); const colorIndex = colorList.findIndex(item => item.color === validate.primaryColor);
onOk({ onOk({
...@@ -277,20 +278,16 @@ export default props => { ...@@ -277,20 +278,16 @@ export default props => {
}; };
const onChange = list => { const onChange = list => {
console.log(checkedList);
console.log(list);
setCheckedList(list); setCheckedList(list);
setIndeterminate(!!list.length && list.length < plainOptions.length); setIndeterminate(!!list.length && list.length < plainOptions.length);
setCheckAll(list.length === plainOptions.length); setCheckAll(list.length === plainOptions.length);
}; };
const colorChange = value => { const colorChange = value => {
console.log(value, 'value');
setColor(value); setColor(value);
form.setFieldsValue({ headerPrimaryColor: value }); form.setFieldsValue({ headerPrimaryColor: value });
}; };
const addParama = () => { const addParama = () => {
console.log(form.getFieldValue('loginTemplate'));
if (!form.getFieldValue('loginTemplate')) { if (!form.getFieldValue('loginTemplate')) {
notification.error({ message: '提示', duration: 3, description: '请先选择登录模板' }); notification.error({ message: '提示', duration: 3, description: '请先选择登录模板' });
return; return;
...@@ -299,33 +296,31 @@ export default props => { ...@@ -299,33 +296,31 @@ export default props => {
}; };
const change = e => { const change = e => {
console.log(e);
setVisibleChecked(e); setVisibleChecked(e);
}; };
const change1 = e => { const change1 = e => {
console.log(e);
setVisibleChecked1(e); setVisibleChecked1(e);
}; };
const change2 = e => { const change2 = e => {
console.log(e);
setVisibleChecked2(e); setVisibleChecked2(e);
}; };
const change3 = e => { const change3 = e => {
console.log(e);
setVisibleChecked3(e); setVisibleChecked3(e);
}; };
const change4 = e => { const change4 = e => {
console.log(e);
setVisibleChecked4(e); setVisibleChecked4(e);
}; };
const change5 = e => { const change5 = e => {
console.log(e);
setVisibleChecked5(e); setVisibleChecked5(e);
}; };
const change7 = e => {
setVisibleChecked7(e);
};
return ( return (
<Drawer <Drawer
title={isEdit ? '查看/编辑网站配置' : '新增网站'} title={isEdit ? '查看/编辑网站配置' : '新增网站'}
...@@ -588,6 +583,14 @@ export default props => { ...@@ -588,6 +583,14 @@ export default props => {
onChange={change2} onChange={change2}
/> />
</Form.Item> </Form.Item>
<Form.Item label="地图遮罩" name="useCoverMap">
<Switch
checkedChildren="开启"
unCheckedChildren="关闭"
checked={visibleChecked7}
onChange={change7}
/>
</Form.Item>
<Form.Item <Form.Item
label={ label={
<div className={styles.formData_label}> <div className={styles.formData_label}>
......
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