Commit 1f6d727c authored by 涂伟's avatar 涂伟
parents e7bc916f 282c1363
Pipeline #94680 waiting for manual action with stages
variables:
TARGET_REPO_2021: "G:/CIV_CI/CivWebPublish2021_CivManage/CivWebPublish2021/"
TARGET_REPO_Solution: "G:/CIV_CI/PandaSolution/civmanage/"
TEMP_DIR: "G:/CIV_CI/tempV1/civmanage/"
TARGET_REPO_2021: "F:/CIV_CI/CivWebPublish2021_CivManage/CivWebPublish2021/"
TARGET_REPO_Solution: "F:/CIV_CI/PandaSolution/civmanage/"
TEMP_DIR: "F:/CIV_CI/tempV1/civmanage/"
GIT_STRATEGY: 'fetch'
GIT_CHECKOUT: 'false'
......@@ -10,29 +10,17 @@ before_script:
- 'git config core.autocrlf false'
stages:
- checkout
- install
- package
- push
checkout:
stage: checkout
tags:
- civ_manage_128
variables:
GIT_CHECKOUT: 'true'
script:
- echo "Got a clean git copy."
only:
- master
when: manual
install:
stage: install
tags:
- civ_manage_128
- civmanage
script:
- npm -v
- echo "${CI_PROJECT_DIR}"
- git pull origin master
- npm run init
only:
- master
......@@ -41,11 +29,11 @@ install:
package:
stage: package
tags:
- civ_manage_128
- civmanage
script:
- echo "${CI_PROJECT_DIR}"
- git pull origin master
- npm run build --releasepath=G:\\CIV_CI\\tempV1
- npm run build --releasepath=F:\\CIV_CI\\tempV1
#- npm run build --releasepath=../CivWebPublish2021
allow_failure: false
......@@ -58,7 +46,7 @@ push_2021:
GIT_STRATEGY: none
stage: push
tags:
- civ_manage_128
- civmanage
script:
- 'cd "${TARGET_REPO_2021}"'
- 'git reset --hard head'
......@@ -80,7 +68,7 @@ push_solution:
GIT_STRATEGY: none
stage: push
tags:
- civ_manage_128
- civmanage
script:
- 'cd "${TARGET_REPO_Solution}"'
- 'git reset --hard head'
......
......@@ -13,7 +13,7 @@
"author": "Max Stoiber",
"license": "MIT",
"scripts": {
"init": "npm install --registry=https://g.civnet.cn:4873",
"init": "yarn install --registry=https://g.civnet.cn:4873",
"analyze:clean": "rimraf stats.json",
"preanalyze": "npm run analyze:clean",
"analyze": "node ./internals/scripts/analyze.js",
......@@ -129,7 +129,7 @@
"jszip": "^3.10.1",
"lodash": "4.17.11",
"minimist": "1.2.0",
"panda-xform": "6.10.48",
"panda-xform": "6.10.53",
"parseForm": "^2.3.8",
"prop-types": "15.7.2",
"qrcode.react": "^3.1.0",
......
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
......@@ -99,7 +99,6 @@ class PicturesWall extends React.Component<PicturesWallType> {
static getDerivedStateFromProps = (props, state) => {
const { value, uploadContext = {} } = props;
const { imgBed, update } = uploadContext;
console.log(imgBed,'imgBedimgBedimgBedimgBed');
const fileList = state.fileList;
const shouldUpdate = fileList.every(f => Array.isArray(value) ? !value.some(v => f.url === v) : f.url !== value)
......
import React, { useState, useEffect } from 'react';
import { Form, Select, Input, Button, Radio, notification, Spin, Tag } from 'antd';
import {
Switch,
InputNumber,
Form,
Select,
Input,
Button,
Radio,
notification,
Spin,
Tag,
} from 'antd';
import { editWebsite, getWebsite, addWebsite } from '@/services/mobileConfig/api';
import PicturesWall from '@/components/Upload/index';
import { stripBasename } from 'history/pathutils';
const { Item } = Form;
const { Option } = Select;
const SiteConfig = props => {
const { miniTitle, submitCallback, addCallback, parentKey, clientName, singleList } = props;
const {
miniTitle,
submitCallback,
addCallback,
parentKey,
clientName,
singleList,
codeTypeList,
} = props;
const [config, setConfig] = useState(''); // 网站配置信息
const [loginList, setLoginList] = useState([
{ text: '科技蓝', value: 'default.html' },
......@@ -18,7 +37,7 @@ const SiteConfig = props => {
const [h5LoginList, setH5LoginList] = useState([
{ text: '科技蓝', value: 'h5_default' },
{ text: '江西水务', value: 'h5_jiangxi' },
{ text: 'h5_宿州', value: 'h5_suzhou' }
{ text: 'h5_宿州', value: 'h5_suzhou' },
]); // H5登陆页
const [styleList, setStyleList] = useState([
{ text: '熊猫产品', value: 'default' },
......@@ -29,19 +48,19 @@ const SiteConfig = props => {
const [keepText, setKeepText] = useState([]);
const [name, setName] = useState('');
const [form] = Form.useForm();
const isVerificationCode = Form.useWatch('isVerificationCode', form);
const layout = {
layout: 'horizontal',
labelCol: { span: 7 },
wrapperCol: { span: 8 },
};
useEffect(() => {
console.log(singleList);
let aa = [];
singleList.map(i => {
aa.push(i.text);
});
setKeepText(aa);
console.log(miniTitle, 'miniTitle');
if (!miniTitle) {
return;
}
......@@ -53,12 +72,16 @@ const SiteConfig = props => {
})
.then(res => {
setLoading(false);
const data = res.data || {};
let obj = {};
let arr = Object.keys(form.getFieldsValue());
arr.map(k => {
obj[k] = res.data[k];
arr.forEach(k => {
obj[k] = data[k];
});
console.log(obj);
obj.isVerificationCode = data.VerificationConfig?.IsVerificationCode || false;
obj.verificationCodeType = data.VerificationConfig?.VerificationCodeType || '图片验证码';
obj.verificationCodeTimeOut = data.VerificationConfig?.VerificationCodeTimeOut || 1;
setName(obj.title);
form.setFieldsValue(obj);
})
......@@ -74,6 +97,11 @@ const SiteConfig = props => {
if (valid) {
setLoading(true);
const obj = { ...form.getFieldsValue() };
obj.verificationConfig = {
isVerificationCode: obj.isVerificationCode || false,
VerificationCodeType: obj.verificationCodeType || '图片验证码',
verificationCodeTimeOut: obj.verificationCodeTimeOut || 1,
};
let params = { ...obj, mode: 'single', client: clientName };
editWebsite(params)
.then(res => {
......@@ -251,6 +279,33 @@ const SiteConfig = props => {
))}
</Select>
</Item>
<Item label="登录验证码" name="isVerificationCode" valuePropName="checked">
<Switch checkedChildren="开启" unCheckedChildren="关闭" />
</Item>
{isVerificationCode ? (
<>
<Item
label="验证码类型"
name="verificationCodeType"
rules={[
{
required: true,
message: '请选择验证码类型',
},
]}
>
<Select placeholder="请选择验证码类型" options={codeTypeList} />
</Item>
<Item label="验证码超时" name="verificationCodeTimeOut">
<InputNumber
style={{ width: '100%' }}
placeholder="请输入验证码超时时间"
min={1}
addonAfter="分钟"
/>
</Item>
</>
) : null}
{/* <Item
label="系统皮肤:"
name="theme"
......
import React, { useState, useEffect } from 'react';
import { Form, Select, Input, Button, Radio, notification, Spin, Tag } from 'antd';
import {
Form,
Select,
Input,
Button,
Radio,
notification,
Spin,
Tag,
Switch,
InputNumber,
} from 'antd';
import { editWebsite, getWebsite, addWebsite } from '@/services/mobileConfig/api';
import PicturesWall from '@/components/Upload/index';
const { Item } = Form;
const { Option } = Select;
const AddConfig = props => {
const { miniTitle, submitCallback, subType, addCallback, singleList, visible } = props;
const {
miniTitle,
submitCallback,
subType,
addCallback,
singleList,
visible,
codeTypeList,
} = props;
console.log(subType, 'ubType');
const [config, setConfig] = useState(''); // 网站配置信息
const [loginList, setLoginList] = useState([
......@@ -32,6 +51,8 @@ const AddConfig = props => {
const [keepTitle, setKeepTitle] = useState([]);
const [keepValue, setKeepValue] = useState([]);
const [form] = Form.useForm();
const isVerificationCode = Form.useWatch('isVerificationCode', form);
const layout = {
layout: 'horizontal',
labelCol: { span: 7 },
......@@ -39,7 +60,6 @@ const AddConfig = props => {
};
useEffect(() => {
console.log(singleList);
let text = [];
let value = [];
singleList.map(i => {
......@@ -59,6 +79,9 @@ const AddConfig = props => {
loginTemplate: loginList[0].value,
theme: themeList[0].value,
style: styleList[0].value,
isVerificationCode: false,
verificationCodeType: '图片验证码',
verificationCodeTimeOut: 1,
});
}
}, [visible]);
......@@ -80,6 +103,11 @@ const AddConfig = props => {
}
setLoading(true);
const obj = { ...form.getFieldsValue() };
obj.verificationConfig = {
isVerificationCode: obj.isVerificationCode || false,
VerificationCodeType: obj.verificationCodeType || '图片验证码',
verificationCodeTimeOut: obj.verificationCodeTimeOut || 1,
};
let params = { ...obj, mode: 'single' };
addWebsite(params)
.then(res => {
......@@ -286,6 +314,33 @@ const AddConfig = props => {
))}
</Select>
</Item>
<Item label="登录验证码" name="isVerificationCode" valuePropName="checked">
<Switch checkedChildren="开启" unCheckedChildren="关闭" />
</Item>
{isVerificationCode ? (
<>
<Item
label="验证码类型"
name="verificationCodeType"
rules={[
{
required: true,
message: '请选择验证码类型',
},
]}
>
<Select placeholder="请选择验证码类型" options={codeTypeList} />
</Item>
<Item label="验证码超时" name="verificationCodeTimeOut">
<InputNumber
style={{ width: '100%' }}
placeholder="请输入验证码超时时间"
min={1}
addonAfter="分钟"
/>
</Item>
</>
) : null}
{/* <Item
label="系统皮肤:"
name="theme"
......
......@@ -2,12 +2,13 @@ import React, { useState, useEffect, useMemo } from 'react';
import { Card, Tabs, Button, Popconfirm, notification, Spin, Modal, Drawer } from 'antd';
import ProCard from '@ant-design/pro-card';
import PageContainer from '@/components/BasePageContainer';
import { ExclamationCircleOutlined } from '@ant-design/icons';
import SevenParams from './menuconfig/SevenParams';
import VersionPublish from './menuconfig/VersionPublish';
import ApkUpload from './menuconfig/ApkUpload';
import WorkDesign from './menuconfig/WorkDesign';
import { getMiniAppModuleTree, deleteWebsite, deleteMiniMenu } from '@/services/mobileConfig/api';
import { ExclamationCircleOutlined } from '@ant-design/icons';
import { GetVerificationCodeType } from '@/services/webConfig/api';
import SiteConfig from './SiteConfig';
import MiniMenu from './menuconfig/miniMenu';
import AddConfig from './addConfig';
......@@ -27,6 +28,8 @@ const MobileConfigPage = props => {
const [singleList, setSingleList] = useState([]);
const [clientName, setClientName] = useState(''); // client
const [addVisible, setAddVisible] = useState(false);
const [codeTypeList, setCodeTypeList] = useState([]); // 验证码类型
useEffect(() => {
setLoading(true);
getMiniAppModuleTree({
......@@ -65,7 +68,22 @@ const MobileConfigPage = props => {
console.log(res);
});
}, [flag]);
useEffect(() => {
getCodeType();
}, []);
const getCodeType = () => {
GetVerificationCodeType({}).then(res => {
if (res.code === 0) {
setCodeTypeList(
(res.data || []).map(item => ({
label: item,
value: item,
})),
);
}
});
};
// 修改选中的tab
const handleChange = key => {
setActiveKey(key);
......@@ -233,6 +251,7 @@ const MobileConfigPage = props => {
clientName={clientName}
parentKey={parentKey}
singleList={singleList}
codeTypeList={codeTypeList}
/>
),
},
......@@ -285,6 +304,7 @@ const MobileConfigPage = props => {
addCallback={addCallback}
submitCallback={submitCallback}
singleList={singleList}
codeTypeList={codeTypeList}
/>
</Drawer>
</PageContainer>
......
......@@ -296,5 +296,35 @@
background: url('@{imgSrc}/新源_管网运维.png');
background-size: 100% 100%;
}
&[widget='WATER_OVERVIEW2'] {
height: 80px;
background: url('@{imgSrc}/供水总览.png');
background-size: 100% 100%;
}
&[widget='WATER_SCALE_QINZHOU'] {
height: 80px;
background: url('@{imgSrc}/钦州水厂规模.png');
background-size: 100% 100%;
}
&[widget='PIPE_MONITORING_QINZHOU'] {
height: 80px;
background: url('@{imgSrc}/钦州管网运营.png');
background-size: 100% 100%;
}
&[widget='WASTE_WATER_OVERVIEW_QINZHOU'] {
height: 80px;
background: url('@{imgSrc}/钦州污水总览.png');
background-size: 100% 100%;
}
&[widget='WASTE_WATER_SCALE_QINZHOU'] {
height: 80px;
background: url('@{imgSrc}/钦州污水厂规模.png');
background-size: 100% 100%;
}
&[widget='WASTE_STATION_OVERVIEW_QINZHOU'] {
height: 80px;
background: url('@{imgSrc}/钦州污水泵站总览.png');
background-size: 100% 100%;
}
}
}
......@@ -26,6 +26,7 @@ const cards = [
count: 3,
children: [
{ name: '水厂总览', widget: 'WATER_OVERVIEW', type: '运营' },
{ name: '供水总览', widget: 'WATER_OVERVIEW2', type: '运营' },
{ name: '供水量曲线', widget: 'WATER_CHART', type: '运营' },
{ name: '水厂监控', widget: 'WATER_MONITORING', type: '运营' },
],
......@@ -124,8 +125,8 @@ const cards = [
],
},
{
title:'新源县中西部乡镇城乡供水平台',
count:8,
title: '新源县中西部乡镇城乡供水平台',
count: 8,
children: [
{ name: '运营总览', widget: 'XINYUAN_OVERVIEW', type: '运营' },
{ name: '水量总览', widget: 'XINYUAN_WATER_OVERVIEW', type: '运营' },
......@@ -135,8 +136,19 @@ const cards = [
{ name: '管网监控', widget: 'XINYUAN_PIPE_NETWORK_MONITOR', type: '运营' },
{ name: '水池保障率', widget: 'XINYUAN_POOL_GUARANTEE_RATE', type: '运营' },
{ name: '管网运维', widget: 'XINYUAN_POLLING_MAINTENANCE', type: '运营' },
]
}
],
},
{
title: '钦州开投水务综合管理平台',
count: 5,
children: [
{ name: '水厂规模', widget: 'WATER_SCALE_QINZHOU', type: '运营' },
{ name: '管网监控', widget: 'PIPE_MONITORING_QINZHOU', type: '运营' },
{ name: '污水总览', widget: 'WASTE_WATER_OVERVIEW_QINZHOU', type: '运营' },
{ name: '污水厂规模', widget: 'WASTE_WATER_SCALE_QINZHOU', type: '运营' },
{ name: '污水泵站总览', widget: 'WASTE_STATION_OVERVIEW_QINZHOU', type: '运营' },
],
},
],
];
......
......@@ -337,6 +337,36 @@
background: url('@{imgSrc}/新源_管网运维.png');
background-size: 100% 100%;
}
&[widget='WATER_OVERVIEW2'] {
height: 80px;
background: url('@{imgSrc}/供水总览.png');
background-size: 100% 100%;
}
&[widget='WATER_SCALE_QINZHOU'] {
height: 80px;
background: url('@{imgSrc}/钦州水厂规模.png');
background-size: 100% 100%;
}
&[widget='PIPE_MONITORING_QINZHOU'] {
height: 80px;
background: url('@{imgSrc}/钦州管网运营.png');
background-size: 100% 100%;
}
&[widget='WASTE_WATER_OVERVIEW_QINZHOU'] {
height: 80px;
background: url('@{imgSrc}/钦州污水总览.png');
background-size: 100% 100%;
}
&[widget='WASTE_WATER_SCALE_QINZHOU'] {
height: 80px;
background: url('@{imgSrc}/钦州污水厂规模.png');
background-size: 100% 100%;
}
&[widget='WASTE_STATION_OVERVIEW_QINZHOU'] {
height: 80px;
background: url('@{imgSrc}/钦州污水泵站总览.png');
background-size: 100% 100%;
}
}
}
.cardType {
......
......@@ -64,7 +64,6 @@ const ColorLinear = props => {
onSubumit(colorValue);
handleCancel();
};
console.log(angle, 'angle');
return (
<Modal
title="顶部颜色配置"
......
......@@ -198,7 +198,6 @@ const HomeConfigModal = props => {
setCheckList(list);
};
const checkRender = list => {
console.log(list, 'fasldfjaslkdjf');
let num = list?.roleGroups?.filter(ele => ele.isCheck || ele.indeterminate).length;
return (
<>
......@@ -214,23 +213,21 @@ const HomeConfigModal = props => {
</Checkbox>
</div>
)}
{list?.roleGroups.map(item => {
return (
<>
{item.roleGroups ? (
checkRender(item)
) : (
<Checkbox
onChange={e => onChange(e, item)}
style={{ width: '150px', marginLeft: '0px', marginBottom: '10px' }}
checked={item.isCheck}
>
{item.roleName}
</Checkbox>
)}
</>
);
})}
{list?.roleGroups.map(item => (
<>
{item.roleGroups ? (
checkRender(item)
) : (
<Checkbox
onChange={e => onChange(e, item)}
style={{ width: '150px', marginLeft: '0px', marginBottom: '10px' }}
checked={item.isCheck}
>
{item.roleName}
</Checkbox>
)}
</>
))}
</div>
</>
);
......@@ -263,7 +260,7 @@ const HomeConfigModal = props => {
</Form.Item> */}
<Form.Item label="主页Url" name="homePage">
{/* <Input placeholder="请输入主页路径" autoComplete="off" /> */}
<TreeSelect menuChange={val => { }} userMode={userMode} curWeb={curWeb} />
<TreeSelect menuChange={val => {}} userMode={userMode} curWeb={curWeb} />
</Form.Item>
</Form>
<div className={styles.roleCheck}>{checkRender(checkList)}</div>
......
......@@ -17,7 +17,6 @@ const HomePageConfigs = (props, ref) => {
getHomePageConfig: () => orderTable,
}));
useEffect(() => {
console.log(roleHomePages, 'homePageConfig');
if (!roleHomePages) {
return;
}
......
......@@ -24,6 +24,7 @@ import {
Col,
Switch,
message,
InputNumber,
} from 'antd';
import RMSComponents from '@/components/RolePmSite/index';
import PersonnelSelector from '@/components/PersonnelSelector/index';
......@@ -77,8 +78,10 @@ export default props => {
userMode,
webs,
curWeb,
codeTypeList = [],
} = props;
const [form] = Form.useForm();
const isVerificationCode = Form.useWatch('isVerificationCode', form);
const [loginPages, setLoginPages] = useState([]);
const [checkedList, setCheckedList] = useState([]);
const [indeterminate, setIndeterminate] = useState(false);
......@@ -123,7 +126,7 @@ export default props => {
} else {
setIndeterminate(
!!config.topMenu.split(',').length &&
config.topMenu.split(',').length < plainOptions.length,
config.topMenu.split(',').length < plainOptions.length,
);
}
......@@ -174,7 +177,7 @@ export default props => {
setVisibleChecked4(config.messageVoice);
setVisibleChecked7(config.useCoverMap == 'true');
setHomePageConfig(config.roleHomePages);
setVisibleAmap(config.IsGodFirst)
setVisibleAmap(config.IsGodFirst);
setVisibleAnn(config.OpenAnnouncement);
form.setFieldsValue({
...config,
......@@ -194,6 +197,10 @@ export default props => {
headerPrimaryColor: config.headerPrimaryColor
? config.headerPrimaryColor
: 'linear-gradient(0deg, #0066D6 0%, #39A9FF 100%)',
isVerificationCode: config.VerificationConfig?.IsVerificationCode || false,
verificationCodeType: config.VerificationConfig?.VerificationCodeType || '图片验证码',
verificationCodeTimeOut: config.VerificationConfig?.VerificationCodeTimeOut || 1,
});
setColor(
config.headerPrimaryColor
......@@ -224,7 +231,7 @@ export default props => {
setVisibleChecked4(true);
setVisibleChecked5(true);
setVisibleChecked7(true);
setVisibleAmap(true)
setVisibleAmap(true);
setHomePageConfig([]);
form.setFieldsValue({
shortcutIcon: 'assets\\images\\icon\\熊猫-蓝色.png',
......@@ -245,6 +252,9 @@ export default props => {
OpenAnnouncement: false,
isGodFirst: true,
headerPrimaryColor: 'linear-gradient(0deg, #0066D6 0%, #39A9FF 100%)',
isVerificationCode: config.VerificationConfig?.IsVerificationCode || false,
verificationCodeType: config.VerificationConfig?.VerificationCodeType || '图片验证码',
verificationCodeTimeOut: config.VerificationConfig?.VerificationCodeTimeOut || 1,
});
setVisibleAnn(false);
setCheckValue([]);
......@@ -258,7 +268,7 @@ export default props => {
setVisibleChecked2('');
setVisibleChecked3('');
setVisibleChecked4('');
setVisibleAmap('')
setVisibleAmap('');
setVisibleChecked5('');
setVisibleAnn('');
setHomePageConfig([]);
......@@ -320,13 +330,13 @@ export default props => {
// return;
// }
validate.topMenu = checkedList.toString();
validate.navTheme = validate.primaryColor === '#009A3E' ? 'chinaWater' : visibleChecked ? 'light' : 'dark';
validate.navTheme =
validate.primaryColor === '#009A3E' ? 'chinaWater' : visibleChecked ? 'light' : 'dark';
validate.CloudStyle = visibleChecked1 ? '是' : '否';
validate.messageMarking = visibleChecked3 ? 'All' : 'One';
validate.menuState = visibleChecked5 ? 'open' : 'close';
validate.afterSales = checkValue && checkValue.toString();
console.log(validate);
if (validate.homePage) {
let arr = validate.homePage.split('/'); // 用const声明常量
let allProList = JSON.parse(JSON.stringify(allProductList));
......@@ -336,7 +346,6 @@ export default props => {
arr.shift();
validate.homePage = arr.join('/');
}
console.log(product, 'product');
validate.productType = product?.PackageName || 'civweb4';
let proList = JSON.parse(JSON.stringify(productList));
proList.push({ PackageName: 'civ_base' });
......@@ -349,27 +358,28 @@ export default props => {
}
}
console.log(validate, 'validatevalidate');
if (validate) {
const colorIndex = colorList.findIndex(item => item.color === validate.primaryColor);
let pages = homepageConfigRef.current.getHomePageConfig().map((item, index) => {
let str = item.homePage.replace(/^[^\/]+\/+/, '');
console.log(str, 'fasdasd');
return {
...item,
homePage: item.homePage.replace(/^[^\/]+\/+/, ''),
index,
};
});
console.log(pages, 'pages');
const verificationConfig = {
isVerificationCode: validate.isVerificationCode || false,
VerificationCodeType: validate.verificationCodeType || '图片验证码',
verificationCodeTimeOut: validate.verificationCodeTimeOut || 1,
};
onOk({
...validate,
roleHomePages: pages,
headerPrimaryColor: colorList[colorIndex].headerColor,
mode: 'single',
menu: 'banner-left',
verificationConfig,
});
}
});
......@@ -421,9 +431,9 @@ export default props => {
setVisibleAnn(e);
};
const changeAmapShow = (e) => {
setVisibleAmap(e)
}
const changeAmapShow = e => {
setVisibleAmap(e);
};
const change5 = e => {
setVisibleChecked5(e);
......@@ -555,6 +565,35 @@ export default props => {
<Form.Item label="登录模板" name="loginTemplate">
<AutoComplete placeholder="请选择登录模板" options={loginPages} allowClear filterOption />
</Form.Item>
<Form.Item label="登录验证码" name="isVerificationCode" valuePropName="checked">
<Switch checkedChildren="开启" unCheckedChildren="关闭" />
</Form.Item>
{isVerificationCode ? (
<>
<Form.Item
label="验证码类型"
name="verificationCodeType"
rules={[
{
required: true,
message: '请选择验证码类型',
},
]}
>
<Select placeholder="请选择验证码类型" options={codeTypeList} />
</Form.Item>
<Form.Item label="验证码超时" name="verificationCodeTimeOut">
<InputNumber
style={{ width: '100%' }}
placeholder="请输入验证码超时时间"
min={1}
addonAfter="分钟"
/>
</Form.Item>
</>
) : null}
<Form.Item label="页面缓存" name="isCache" valuePropName="checked">
<Switch checkedChildren="开启" unCheckedChildren="关闭" />
</Form.Item>
......@@ -565,7 +604,7 @@ export default props => {
主页配置
</Divider>
<Form.Item label="主页地址(默认)" name="homePage">
<TreeSelect menuChange={val => { }} userMode={userMode} curWeb={curWeb} />
<TreeSelect menuChange={val => {}} userMode={userMode} curWeb={curWeb} />
</Form.Item>
<HomePageConfigs
ref={homepageConfigRef}
......
......@@ -15,6 +15,7 @@ import {
omsDeleteWebsite,
SyncMapComponent,
BatchDragSingleWebsite,
GetVerificationCodeType,
} from '@/services/webConfig/api';
import debounce from 'lodash/debounce';
import { EditTwoTone, ExclamationCircleOutlined, OrderedListOutlined } from '@ant-design/icons';
......@@ -34,6 +35,7 @@ const WebConfigPage = props => {
const [configVisible, setConfigVisible] = useState(false);
const [loading, setLoading] = useState(false);
const [webs, setWebs] = useState([]);
const [codeTypeList, setCodeTypeList] = useState([]); // 验证码类型
const [curWeb, setCurWeb] = useState(''); // 当前展示的web
const [configObj, setConfigObj] = useState({}); // 获取当前的web的配置
const [toEdit, setToEdit] = useState(null); // 编辑展示用的配置
......@@ -53,13 +55,13 @@ const WebConfigPage = props => {
if (!canceled.cancel) setConfigFiles(res.data);
});
getProduct();
getCodeType(); // 获取验证码类型
return () => {
canceled.cancel = true;
};
}, []);
useEffect(() => {
console.log(curWeb, 'curWeb');
let canceled = { cancel: false };
if (!curWeb) return;
const title = curWeb.text;
......@@ -70,6 +72,20 @@ const WebConfigPage = props => {
canceled.cancel = true;
};
}, [curWeb]);
const getCodeType = () => {
GetVerificationCodeType({}).then(res => {
if (res.code === 0) {
setCodeTypeList(
(res.data || []).map(item => ({
label: item,
value: item,
})),
);
}
});
};
// 获取产品列表
const getProduct = () => {
getProductList({ isDel: 0 }).then(res => {
......@@ -110,7 +126,6 @@ const WebConfigPage = props => {
),
].flat(2);
if (!canceled.cancel) {
console.log(websArr, 'websArr');
setWebs(websArr);
if (!curWeb) setCurWeb(websArr[0]);
setLoading(false);
......@@ -225,8 +240,8 @@ const WebConfigPage = props => {
} else {
url =
localStorage.getItem('pd2-baseUrl') &&
localStorage.getItem('pd2-baseUrl') != 'null' &&
localStorage.getItem('pd2-baseUrl') != 'undefined'
localStorage.getItem('pd2-baseUrl') != 'null' &&
localStorage.getItem('pd2-baseUrl') != 'undefined'
? localStorage.getItem('pd2-baseUrl') + val
: val;
}
......@@ -302,7 +317,6 @@ const WebConfigPage = props => {
};
const SyncMap = e => {
console.log(e);
SyncMapComponent({ visible: e.subSystemValue }).then(res => {
if (res.code == 0) {
notification.success({
......@@ -324,7 +338,6 @@ const WebConfigPage = props => {
const delayedSyncMap = debounce(data => SyncMap(data), 500);
const sort = () => {
console.log(webs);
setSortVisible(true);
};
......@@ -404,7 +417,6 @@ const WebConfigPage = props => {
const onOK = e => {
setSortVisible(false);
console.log(e.str);
BatchDragSingleWebsite(e.str).then(res => {
if (res.code === 0) {
updateModuleTree(userMode || 'super');
......@@ -485,6 +497,7 @@ const WebConfigPage = props => {
onOk={handleSubmit}
submitting={submitting}
hasIntegerate={hasIntegerate()}
codeTypeList={codeTypeList}
/>
<SortModal
visible={sortVisible}
......
......@@ -351,3 +351,6 @@ export const ProductRepair = param => get(`${PUBLISH_SERVICE}/DBManager/ProductR
export const GetMapLayerStationList = param =>
get(`${PANDA_GIS}/MapLayer/GetMapLayerStationList`, param);
export const GetVerificationCodeType = param =>
get(`/PandaCore/GCK/BussinessAuth/GetVerificationCodeType`, param);
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