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

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

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