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