Commit d87d96e5 authored by 皮倩雯's avatar 皮倩雯
parents 43481064 3ac0e9a9
Pipeline #73942 passed with stages
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
"js-calendar-converter": "0.0.4", "js-calendar-converter": "0.0.4",
"lodash": "4.17.11", "lodash": "4.17.11",
"minimist": "1.2.0", "minimist": "1.2.0",
"panda-xform": "^4.4.5", "panda-xform": "^4.5.0",
"prop-types": "15.7.2", "prop-types": "15.7.2",
"quill": "^1.3.7", "quill": "^1.3.7",
"rc-tween-one": "^3.0.6", "rc-tween-one": "^3.0.6",
......
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
...@@ -231,7 +231,10 @@ class PicturesWall extends React.Component<PicturesWallType> { ...@@ -231,7 +231,10 @@ class PicturesWall extends React.Component<PicturesWallType> {
if (file.status === 'done') { if (file.status === 'done') {
const files = fileList.map(item => { const files = fileList.map(item => {
const { status, name, thumbUrl } = item; const { status, name, thumbUrl } = item;
const url = item.response && item.response.data || thumbUrl; let url = item.response && item.response.data || thumbUrl;
if (url && (!url.includes('CityTemp') && !url.includes('图库'))) {
url = 'CityTemp\\图库\\' + url
}
return { uid: uuid(8, 16), name, status, url }; return { uid: uuid(8, 16), name, status, url };
}); });
this.setState({ fileList: files }) this.setState({ fileList: files })
...@@ -273,8 +276,6 @@ class PicturesWall extends React.Component<PicturesWallType> { ...@@ -273,8 +276,6 @@ class PicturesWall extends React.Component<PicturesWallType> {
// reader.onload = () => resolve(reader.result as string); // reader.onload = () => resolve(reader.result as string);
// }) // })
// }); // });
if (path && path.indexOf('http') === 0) { if (path && path.indexOf('http') === 0) {
return path return path
} }
...@@ -284,6 +285,10 @@ class PicturesWall extends React.Component<PicturesWallType> { ...@@ -284,6 +285,10 @@ class PicturesWall extends React.Component<PicturesWallType> {
if (path && path.indexOf('assets') === 0) { if (path && path.indexOf('assets') === 0) {
return `${window.location.origin}/civweb4/${path}`.replace(/\\/g, '/') return `${window.location.origin}/civweb4/${path}`.replace(/\\/g, '/')
} }
if (path && (!path.includes('CityTemp') && !path.includes('图库'))) {
path = 'CityTemp\\图库\\' + path
}
if (previewFlag) { if (previewFlag) {
return path return path
} }
......
...@@ -568,6 +568,7 @@ const BookConfigNew = props => { ...@@ -568,6 +568,7 @@ const BookConfigNew = props => {
// }} // }}
// width="100vw" // width="100vw"
confirmLoading={modalLoading} confirmLoading={modalLoading}
okText="保存并查看"
> >
<div className={styles.top}> <div className={styles.top}>
<Form form={form} {...layout}> <Form form={form} {...layout}>
......
...@@ -259,7 +259,7 @@ const EditableCell = ({ ...@@ -259,7 +259,7 @@ const EditableCell = ({
}, },
}, },
{ {
pattern: /^(?!(\d+)$)[\u4e00-\u9fffa-zA-Z0-9_]+$/, pattern: /^[^\d][\u4e00-\u9fffA-Za-z0-9_]+$/,
message: '不能输入特殊符号或者纯数字', message: '不能输入特殊符号或者纯数字',
}, },
]; ];
......
...@@ -17,7 +17,13 @@ import FlowModal from './workFlowComponents/FlowModal'; ...@@ -17,7 +17,13 @@ import FlowModal from './workFlowComponents/FlowModal';
import FlowGroupModal from './workFlowComponents/FlowGroupModal'; import FlowGroupModal from './workFlowComponents/FlowGroupModal';
import Order from './workFlowComponents/Order'; import Order from './workFlowComponents/Order';
import styles from './WorkflowHomePage.less'; import styles from './WorkflowHomePage.less';
import { WFGetAllFlow, GetFlowNode, DeleteFlow } from '@/services/workflow/workflow'; import {
WFGetAllFlow,
GetFlowNode,
DeleteFlow,
CheckDoingFlowNodes,
CloseDoingFlowNodes,
} from '@/services/workflow/workflow';
import { DownLoadFiles } from '@/services/common/api'; import { DownLoadFiles } from '@/services/common/api';
import { UpdateFlowGroup } from '@/services/workflow/workflow'; import { UpdateFlowGroup } from '@/services/workflow/workflow';
const plugins = [ScrollToPlugin]; const plugins = [ScrollToPlugin];
...@@ -114,7 +120,7 @@ const WorkflowHomePage = () => { ...@@ -114,7 +120,7 @@ const WorkflowHomePage = () => {
let list = res.data.map((item, index) => { let list = res.data.map((item, index) => {
item.children.forEach(ele => { item.children.forEach(ele => {
flowNameList.push(ele.FlowName); flowNameList.push(ele.FlowName);
ele.PreviewImage = getImgUrl(ele.PreviewImage) ele.PreviewImage = getImgUrl(ele.PreviewImage);
}); });
item.isOld = true; item.isOld = true;
item.bgType = (index + 1) % 5; item.bgType = (index + 1) % 5;
...@@ -248,36 +254,81 @@ const WorkflowHomePage = () => { ...@@ -248,36 +254,81 @@ const WorkflowHomePage = () => {
}); });
}; };
// 删除流程 // 删除流程
const delFlow = (val, e) => { const delFlow = async (val, e) => {
e.stopPropagation(); e.stopPropagation();
confirm({ let res1 = await CheckDoingFlowNodes({ flowID: val.FlowID });
title: '确定要删除吗?', if (res1.code === 0) {
icon: <ExclamationCircleOutlined />, if (res1.data > 0) {
content: '', confirm({
okText: '是', title: '确定要删除当前流程吗?',
okType: 'danger', icon: <ExclamationCircleOutlined />,
cancelText: '否', content: <div>当前流程有{res1.data}条在办工单,确定删除会自动归档在办工单。</div>,
onOk() { okText: '是',
DeleteFlow({ FlowId: val.FlowID }) okType: 'danger',
.then(res => { cancelText: '否',
if (res.code === 0) {
setModalType('del'); onOk() {
getFlowList(); CloseDoingFlowNodes({ flowID: val.FlowID }).then(res2 => {
message.success('删除成功'); if (res2.code === 0) {
} else { DeleteFlow({ FlowId: val.FlowID })
message.error({ .then(res3 => {
content: ( if (res3.code === 0) {
<div style={{ whiteSpace: 'pre-line', textAlign: 'justify' }}>{res.msg}</div> setModalType('del');
), getFlowList();
message.success('删除成功');
} else {
message.error({
content: (
<div style={{ whiteSpace: 'pre-line', textAlign: 'justify' }}>
{res3.msg}
</div>
),
});
}
})
.catch(() => {
message.error('网络异常请稍后再试');
});
} else {
message.error(res2.msg);
}
});
},
onCancel() {},
});
} else {
confirm({
title: '确定要删除吗?',
icon: <ExclamationCircleOutlined />,
content: '',
okText: '是',
okType: 'danger',
cancelText: '否',
onOk() {
DeleteFlow({ FlowId: val.FlowID })
.then(res2 => {
if (res2.code === 0) {
setModalType('del');
getFlowList();
message.success('删除成功');
} else {
message.error({
content: (
<div style={{ whiteSpace: 'pre-line', textAlign: 'justify' }}>{res2.msg}</div>
),
});
}
})
.catch(() => {
message.error('网络异常请稍后再试');
}); });
} },
}) onCancel() {},
.catch(() => { });
message.error('网络异常请稍后再试'); }
}); } else {
}, message.error(res1.msg);
onCancel() {}, }
});
}; };
const getImgUrl = img => { const getImgUrl = img => {
// return new Promise((resolve, reject) => { // return new Promise((resolve, reject) => {
...@@ -287,7 +338,7 @@ const WorkflowHomePage = () => { ...@@ -287,7 +338,7 @@ const WorkflowHomePage = () => {
// reader.onload = () => resolve(reader.result); // reader.onload = () => resolve(reader.result);
// }); // });
// });a // });a
return `/PandaOMS/OMS/FileCenter/DownLoadFiles?module=熊猫智慧水务平台\\WorkFlowImage&filePath=${img}` return `/PandaOMS/OMS/FileCenter/DownLoadFiles?module=熊猫智慧水务平台\\WorkFlowImage&filePath=${img}`;
}; };
// tab栏选项渲染 // tab栏选项渲染
const tabRender = (val, index) => ( const tabRender = (val, index) => (
...@@ -405,7 +456,7 @@ const WorkflowHomePage = () => { ...@@ -405,7 +456,7 @@ const WorkflowHomePage = () => {
<a <a
style={{ display: 'inline-block', marginTop: '5px', marginRight: '20px' }} style={{ display: 'inline-block', marginTop: '5px', marginRight: '20px' }}
target="_blank" target="_blank"
href={path.join(__dirname, '/civmanage/第三方工单对接说明文档.pdf')} href={path.join(__dirname, '/civmanage/熊猫第三方工单对接说明文档.pdf')}
rel="noopener noreferer" rel="noopener noreferer"
> >
<FilePdfOutlined style={{ fontSize: '24px' }} /> <FilePdfOutlined style={{ fontSize: '24px' }} />
......
...@@ -10,6 +10,8 @@ import { ...@@ -10,6 +10,8 @@ import {
DeleteFlowNode, DeleteFlowNode,
DeleteFlowNodes, DeleteFlowNodes,
SaveWorkFlowImage, SaveWorkFlowImage,
CheckDoingFlowNodes,
CloseDoingFlowNodes,
} from '@/services/workflow/workflow'; } from '@/services/workflow/workflow';
import { compress } from '@/utils/utils'; import { compress } from '@/utils/utils';
import { ExclamationCircleOutlined, TrophyOutlined } from '@ant-design/icons'; import { ExclamationCircleOutlined, TrophyOutlined } from '@ant-design/icons';
...@@ -153,14 +155,24 @@ const FlowChart = props => { ...@@ -153,14 +155,24 @@ const FlowChart = props => {
delLinks.add(item.data.LineId); delLinks.add(item.data.LineId);
} }
}); });
showDeleteConfirm([...delNodeIds], [...delNodes], [...delLinks]); CheckDoingFlowNodes({ activityIds: [...delNodes] }).then(res => {
if (res.code === 0) {
if (res.data > 0) {
showCloseList([...delNodeIds], [...delNodes], [...delLinks], res.data);
} else {
showDeleteConfirm([...delNodeIds], [...delNodes], [...delLinks]);
}
} else {
message.error(res.msg);
}
});
return false; return false;
}; };
// 监听线,连接线的时候加上text属性 // 监听线,连接线的时候加上text属性
diagram.addDiagramListener('LinkDrawn', e => { diagram.addDiagramListener('LinkDrawn', e => {
// e.subject.data.text = ''; // e.subject.data.text = '';
e.subject.data.lineDetail = JSON.stringify(e.subject.data); e.subject.data.lineDetail = JSON.stringify(e.subject.data);
console.log(e, e.subject.data, 'fasdfasdgds');
diagram.model.updateTargetBindings(e.subject.data); diagram.model.updateTargetBindings(e.subject.data);
// leaveCallBack(true); // leaveCallBack(true);
}); });
...@@ -168,7 +180,6 @@ const FlowChart = props => { ...@@ -168,7 +180,6 @@ const FlowChart = props => {
diagram.addDiagramListener('externalobjectsdropped', e => { diagram.addDiagramListener('externalobjectsdropped', e => {
afterNodes.current = new Map([]); afterNodes.current = new Map([]);
const list = JSON.parse(diagram.model.toJson()).nodeDataArray; const list = JSON.parse(diagram.model.toJson()).nodeDataArray;
console.log(list, 'list');
let newNum; let newNum;
let newKey; let newKey;
...@@ -322,6 +333,27 @@ const FlowChart = props => { ...@@ -322,6 +333,27 @@ const FlowChart = props => {
return i; return i;
}; };
}, [currentFlowData]); }, [currentFlowData]);
const showCloseList = (delNodeIds, delNodes, delLinks, listMsg) => {
confirm({
title: '确定要删除所选节点吗?',
icon: <ExclamationCircleOutlined />,
content: <div>当前节点有{listMsg}条在办工单,确定删除会自动归档在办工单。</div>,
okText: '是',
okType: 'primary',
cancelText: '否',
onOk() {
CloseDoingFlowNodes({ activityIds: [...delNodes] }).then(res => {
if (res.code === 0) {
delNode(delNodeIds, delNodes, delLinks);
} else {
message.error(res.msg);
}
});
},
onCancel() {},
});
};
// 删除提醒 // 删除提醒
const showDeleteConfirm = (delNodeIds, delNodes, delLinks) => { const showDeleteConfirm = (delNodeIds, delNodes, delLinks) => {
confirm({ confirm({
...@@ -329,7 +361,7 @@ const FlowChart = props => { ...@@ -329,7 +361,7 @@ const FlowChart = props => {
icon: <ExclamationCircleOutlined />, icon: <ExclamationCircleOutlined />,
content: '', content: '',
okText: '是', okText: '是',
okType: 'danger', okType: 'primary',
cancelText: '否', cancelText: '否',
onOk() { onOk() {
delNode(delNodeIds, delNodes, delLinks); delNode(delNodeIds, delNodes, delLinks);
......
...@@ -71,6 +71,7 @@ const AddModal = props => { ...@@ -71,6 +71,7 @@ const AddModal = props => {
const [pick, setPick] = useState(''); // 复选框数据填入项 const [pick, setPick] = useState(''); // 复选框数据填入项
const [keepIds, setKeepIds] = useState(null); const [keepIds, setKeepIds] = useState(null);
const [account, setAccount] = useState(0); const [account, setAccount] = useState(0);
const [isFromLocal, setIsFromLocal] = useState(false);
const key = CryptoJS.enc.Utf8.parse('1p2a3n4d5a6o7m8s9a10n1e2t3c4o5re'); // 十六位十六进制数作为密钥 const key = CryptoJS.enc.Utf8.parse('1p2a3n4d5a6o7m8s9a10n1e2t3c4o5re'); // 十六位十六进制数作为密钥
const iv = CryptoJS.enc.Utf8.parse('1234567890000000'); const iv = CryptoJS.enc.Utf8.parse('1234567890000000');
...@@ -385,6 +386,13 @@ const AddModal = props => { ...@@ -385,6 +386,13 @@ const AddModal = props => {
message.error('请选择图标!'); message.error('请选择图标!');
return; return;
} }
if (!isFromLocal) {
if (obj.iconUrl.includes('CityTemp') && obj.iconUrl.includes('图库')) {
obj.iconUrl = obj.iconUrl;
} else {
obj.iconUrl = obj.iconUrl;
}
}
if (type === 'add') { if (type === 'add') {
AddIntegratedLogin({ AddIntegratedLogin({
systemName: obj.systemName, systemName: obj.systemName,
...@@ -535,7 +543,16 @@ const AddModal = props => { ...@@ -535,7 +543,16 @@ const AddModal = props => {
// }; // };
// }); // });
if (info.file.response.code === 0) { if (info.file.response.code === 0) {
setImageUrl(getImg(info.file.response.data)); setIsFromLocal(false);
console.log('触发咯');
if (
info.file.response.data.includes('CityTemp') &&
info.file.response.data.includes('图库')
) {
setImageUrl(getImg(info.file.response.data));
} else {
setImageUrl(getImg(info.file.response.data));
}
setLoading(false); setLoading(false);
} else { } else {
message.error(info.file.response.msg); message.error(info.file.response.msg);
...@@ -599,6 +616,7 @@ const AddModal = props => { ...@@ -599,6 +616,7 @@ const AddModal = props => {
// setImageUrl(window.location.origin + `/${props.path}`); // setImageUrl(window.location.origin + `/${props.path}`);
// setIm(props.path); // setIm(props.path);
// setKeepImgeUrl(props.path); // setKeepImgeUrl(props.path);
setIsFromLocal(true);
form.setFieldsValue({ iconUrl: `${props.path}` }); form.setFieldsValue({ iconUrl: `${props.path}` });
} }
}; };
......
...@@ -396,6 +396,25 @@ const Integrate = () => { ...@@ -396,6 +396,25 @@ const Integrate = () => {
if (resnew.code === 0) { if (resnew.code === 0) {
setTableData(resnew.data); setTableData(resnew.data);
setShowSearchStyle(true); setShowSearchStyle(true);
let aa = [];
if (resnew.data.length > 0) {
resnew.data.map((i, j) => {
aa.push(i.SystemName);
resnew.data[j].AccountParamKey = i.AccountParam[0].key;
resnew.data[j].AccountParamValue = i.AccountParam[0].value;
if (resnew.data[j].iconUrl && !resnew.data[j].iconUrl.includes('images')) {
resnew.data[j].showUrl = getImg(resnew.data[j].iconUrl);
} else {
resnew.data[j].showUrl = `${window.location.origin}/${resnew.data[j].iconUrl}`;
}
});
}
console.log(aa);
setKeepSystemName(aa);
console.log(resnew.data);
console.log(resnew.data, 'resnew.dataresnew.dataresnew.data');
setTableData(resnew.data);
} else { } else {
notification.error({ notification.error({
message: '获取失败', message: '获取失败',
...@@ -406,6 +425,40 @@ const Integrate = () => { ...@@ -406,6 +425,40 @@ const Integrate = () => {
}); });
}; };
// const getData = () => {
// setLoading(true);
// GetIntegratedLogin({ isHide: false }).then(resnew => {
// if (resnew.code === 0) {
// console.log(resnew.data);
// let aa = [];
// if (resnew.data.length > 0) {
// resnew.data.map((i, j) => {
// aa.push(i.SystemName);
// resnew.data[j].AccountParamKey = i.AccountParam[0].key;
// resnew.data[j].AccountParamValue = i.AccountParam[0].value;
// if (resnew.data[j].iconUrl && !resnew.data[j].iconUrl.includes('images')) {
// resnew.data[j].showUrl = getImg(resnew.data[j].iconUrl);
// } else {
// resnew.data[j].showUrl = `${window.location.origin}/${resnew.data[j].iconUrl}`;
// }
// });
// }
// console.log(aa);
// setKeepSystemName(aa);
// console.log(resnew.data);
// console.log(resnew.data, 'resnew.dataresnew.dataresnew.data');
// setTableData(resnew.data);
// } else {
// notification.error({
// message: '获取失败',
// description: resnew.msg,
// });
// }
// setLoading(false);
// });
// };
const handleReset = () => { const handleReset = () => {
setSearchWord(''); setSearchWord('');
setShowSearchStyle(false); setShowSearchStyle(false);
......
...@@ -21,7 +21,6 @@ const PreviewModal = props => { ...@@ -21,7 +21,6 @@ const PreviewModal = props => {
useEffect(() => { useEffect(() => {
console.log(imageUrl); console.log(imageUrl);
console.log(keepImgeUrl); console.log(keepImgeUrl);
debugger
console.log(type); console.log(type);
console.log(process.env, 'process.env.PROXY'); console.log(process.env, 'process.env.PROXY');
setPickItem(''); setPickItem('');
......
...@@ -14,6 +14,9 @@ import { ...@@ -14,6 +14,9 @@ import {
Tooltip, Tooltip,
Popconfirm, Popconfirm,
notification, notification,
Upload,
Modal,
message,
} from 'antd'; } from 'antd';
import { import {
SyncOutlined, SyncOutlined,
...@@ -25,10 +28,17 @@ import { ...@@ -25,10 +28,17 @@ import {
ZoomInOutlined, ZoomInOutlined,
CaretUpFilled, CaretUpFilled,
CaretDownFilled, CaretDownFilled,
ExportOutlined,
ImportOutlined,
DownloadOutlined,
} from '@ant-design/icons'; } from '@ant-design/icons';
import voca from 'voca'; import voca from 'voca';
import styles from './index.less'; import styles from './index.less';
import { GetVideoConfigList, deleteInsertVideoConfig } from '@/services/videoManger/videoManger'; import {
GetVideoConfigList,
deleteInsertVideoConfig,
ImportVideoConfig,
} from '@/services/videoManger/videoManger';
import AddModal from './AddModal'; import AddModal from './AddModal';
import CheckModal from './CheckModal'; import CheckModal from './CheckModal';
import VideoModal from './VideoModal'; import VideoModal from './VideoModal';
...@@ -36,6 +46,8 @@ import DHModal from './DHModal'; ...@@ -36,6 +46,8 @@ import DHModal from './DHModal';
import HKModal from './HKModal'; import HKModal from './HKModal';
import AddAllModal from './AddAllModal'; import AddAllModal from './AddAllModal';
const path = require('path');
const videoManager = () => { const videoManager = () => {
const [configurationType, setConfigurationType] = useState('1'); const [configurationType, setConfigurationType] = useState('1');
const [loading, setLoading] = useState(false); // 加载 const [loading, setLoading] = useState(false); // 加载
...@@ -414,6 +426,40 @@ const videoManager = () => { ...@@ -414,6 +426,40 @@ const videoManager = () => {
setAddVisible(false); setAddVisible(false);
setFlag(flag + 1); setFlag(flag + 1);
}; };
// 导入
const beforeUpload = val => {
const formData = new FormData();
formData.append('file', val);
console.log(formData, val, 'OK');
ImportVideoConfig(formData).then(response => {
if (response.code === 0) {
setFlag(flag + 1);
message.success('导入成功');
} else {
message.error(response.msg);
}
});
return false;
};
const downLoadObj = {
'1': '萤石云-视频导入模板',
'2': '海康-视频导入模板',
'3': '海康1-2-视频导入模板',
'4': '海康NVR-视频导入模板',
'5': '大华-视频导入模板',
'6': '海康ISC-视频导入模板',
};
// 下载模板
const downloadFile = () => {
let downloadLink = document.createElement('a');
downloadLink.href = path.join(__dirname, `/civmanage/${downLoadObj[configurationType]}.xlsx`);
downloadLink.download = downLoadObj[configurationType];
document.body.appendChild(downloadLink);
downloadLink.click();
document.body.removeChild(downloadLink);
};
return ( return (
<div className={styles.videoManagerContainer}> <div className={styles.videoManagerContainer}>
<Row className={styles.head}> <Row className={styles.head}>
...@@ -463,6 +509,16 @@ const videoManager = () => { ...@@ -463,6 +509,16 @@ const videoManager = () => {
> >
新增 新增
</Button> */} </Button> */}
<div style={{ float: 'right' }}>
<Upload showUploadList={false} accept=".xlsx" beforeUpload={beforeUpload}>
<Button style={{ marginLeft: '10px' }} type="primary" ghost>
<div style={{ display: 'flex', alignItems: 'center' }}>
<ImportOutlined style={{ marginRight: '5px' }} />
<div>导入</div>
</div>
</Button>
</Upload>
</div>
<Button <Button
icon={<PlusOutlined className={styles.icon} />} icon={<PlusOutlined className={styles.icon} />}
onClick={addAll} onClick={addAll}
...@@ -474,6 +530,17 @@ const videoManager = () => { ...@@ -474,6 +530,17 @@ const videoManager = () => {
> >
新增 新增
</Button> </Button>
<Button
icon={<DownloadOutlined className={styles.icon} />}
onClick={downloadFile}
style={{
float: 'right',
verticalAlign: 'middle',
marginRight: '10px',
}}
>
下载模板
</Button>
</Col> </Col>
</Row> </Row>
......
...@@ -276,7 +276,7 @@ export default props => { ...@@ -276,7 +276,7 @@ export default props => {
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));
allProList.push({ PackageName: 'civ_base' }); allProList.push({ PackageName: 'civ_base' });
const product = allProList.find(item => item.PackageName.includes(arr[0])); const product = allProList.find(item => item.PackageName === arr[0]);
if (product) { if (product) {
arr.shift(); arr.shift();
validate.homePage = arr.join('/'); validate.homePage = arr.join('/');
......
...@@ -36,7 +36,7 @@ const AddForm = props => { ...@@ -36,7 +36,7 @@ const AddForm = props => {
} }
let allProList = JSON.parse(JSON.stringify(allProductList)); let allProList = JSON.parse(JSON.stringify(allProductList));
allProList.push({ PackageName: 'civ_base' }); allProList.push({ PackageName: 'civ_base' });
const product = allProList.find(item => item.PackageName.includes(arr[0])); const product = allProList.find(item => item.PackageName === arr[0]);
if (product) { if (product) {
if (arr.length > 1) { if (arr.length > 1) {
arr.shift(); arr.shift();
......
...@@ -158,7 +158,7 @@ const EditForm = props => { ...@@ -158,7 +158,7 @@ const EditForm = props => {
} }
let allProList = JSON.parse(JSON.stringify(allProductList)); let allProList = JSON.parse(JSON.stringify(allProductList));
allProList.push({ PackageName: 'civ_base' }); allProList.push({ PackageName: 'civ_base' });
const product = allProList.find(item => item.PackageName.includes(arr[0])); const product = allProList.find(item => item.PackageName === arr[0]);
console.log(product, 'product'); console.log(product, 'product');
if (product) { if (product) {
arr.shift(); arr.shift();
......
...@@ -98,6 +98,11 @@ const AddUserModal = props => { ...@@ -98,6 +98,11 @@ const AddUserModal = props => {
message: '提交失败', message: '提交失败',
description: '密码至少为6位,且包含数字和字母!', description: '密码至少为6位,且包含数字和字母!',
}); });
} else if (passwordLevel === '弱') {
notification.error({
message: '提交失败',
description: '密码强度太弱,加强密码强度',
});
} else if (userName === '') { } else if (userName === '') {
notification.error({ notification.error({
message: '提交失败', message: '提交失败',
...@@ -257,8 +262,12 @@ const AddUserModal = props => { ...@@ -257,8 +262,12 @@ const AddUserModal = props => {
label="账号密码" label="账号密码"
rules={[ rules={[
{ {
pattern: /^[a-zA-Z0-9_]{6,16}$/, pattern: /^(?=.*[a-zA-Z])(?=.*\d)[\w\S]{6,16}$/,
message: '长度6-16位,支持字母与数字,允许下划线', message: '长度6-16位,必须包含数字与字母',
},
{
pattern: /^(?!.*(?:SELECT|UPDATE|INSERT|AND|OR|'|"|;|--|\\)).*$/,
message: '当前密码存在sql注入风险,请重新输入', // 防止sql注入
}, },
{ required: true }, { required: true },
]} ]}
......
...@@ -94,6 +94,7 @@ const EditUserModal = props => { ...@@ -94,6 +94,7 @@ const EditUserModal = props => {
// }); // });
// return; // return;
// } // }
if ((newPassword && newPassword.length < 6) || (passwordConfirm && passwordConfirm < 6)) { if ((newPassword && newPassword.length < 6) || (passwordConfirm && passwordConfirm < 6)) {
notification.error({ notification.error({
message: '提交失败', message: '提交失败',
...@@ -108,6 +109,25 @@ const EditUserModal = props => { ...@@ -108,6 +109,25 @@ const EditUserModal = props => {
}); });
return; return;
} }
if (newPassword && newPassword) {
if (newPasswordLevel === '弱') {
notification.error({
message: '提交失败',
description: '密码强度太弱,加强密码强度',
});
return;
}
if (
!/^(?=.*[a-zA-Z])(?=.*\d)[\w\S]{6,16}$/.test(newPassword) ||
!/^(?!.*(?:SELECT|UPDATE|INSERT|AND|OR|'|"|;|--|\\)).*$/.test(newPassword)
) {
notification.error({
message: '提交失败',
description: '密码验证未通过',
});
return;
}
}
// 所有验证通过才可以提交,phone/email为空时不验证 // 所有验证通过才可以提交,phone/email为空时不验证
if ( if (
loginName && loginName &&
...@@ -339,8 +359,12 @@ const EditUserModal = props => { ...@@ -339,8 +359,12 @@ const EditUserModal = props => {
label="新密码" label="新密码"
rules={[ rules={[
{ {
pattern: /^[a-zA-Z0-9_]{6,16}$/, pattern: /^(?=.*[a-zA-Z])(?=.*\d)[\w\S]{6,16}$/,
message: '长度6-16位,支持字母与数字,允许下划线', message: '长度6-16位,必须包含数字与字母',
},
{
pattern: /^(?!.*(?:SELECT|UPDATE|INSERT|AND|OR|'|"|;|--|\\)).*$/,
message: '当前密码存在sql注入风险,请重新输入', // 防止sql注入
}, },
// { required: true }, // { required: true },
]} ]}
...@@ -374,10 +398,13 @@ const EditUserModal = props => { ...@@ -374,10 +398,13 @@ const EditUserModal = props => {
label="确认密码" label="确认密码"
rules={[ rules={[
{ {
pattern: /^[a-zA-Z0-9_]{6,16}$/, pattern: /^(?=.*[a-zA-Z])(?=.*\d)[\w\S]{6,16}$/,
message: '长度6-16位,支持字母与数字,允许下划线', message: '长度6-16位,必须包含数字与字母',
},
{
pattern: /^(?!.*(?:SELECT|UPDATE|INSERT|AND|OR|'|"|;|--|\\)).*$/,
message: '当前密码存在sql注入风险,请重新输入', // 防止sql注入
}, },
// { required: true },
]} ]}
> >
<Input.Password <Input.Password
......
...@@ -15,3 +15,7 @@ export const editInsertVideoConfig = data => ...@@ -15,3 +15,7 @@ export const editInsertVideoConfig = data =>
// 删除配置 // 删除配置
export const deleteInsertVideoConfig = data => export const deleteInsertVideoConfig = data =>
post(`${PUBLISH_SERVICE}/VideoManager/InsertVideoConfig?type=delete`, data); post(`${PUBLISH_SERVICE}/VideoManager/InsertVideoConfig?type=delete`, data);
// 导入配置
export const ImportVideoConfig = data =>
post(`${PUBLISH_SERVICE}/VideoManager/ImportVideoConfig`, data);
...@@ -41,3 +41,9 @@ export const DeleteFlowNodes = param => post(`${PUBLISH_SERVICE}/WorkFlow/Delete ...@@ -41,3 +41,9 @@ export const DeleteFlowNodes = param => post(`${PUBLISH_SERVICE}/WorkFlow/Delete
// 保存basde65 // 保存basde65
export const SaveWorkFlowImage = param => export const SaveWorkFlowImage = param =>
post(`${PUBLISH_SERVICE}/FileCenter/SaveWorkFlowImage`, param); post(`${PUBLISH_SERVICE}/FileCenter/SaveWorkFlowImage`, param);
// 检查流程和节点的在办
export const CheckDoingFlowNodes = param =>
post(`${PUBLISH_SERVICE}/WorkFlow/CheckDoingFlowNodes`, param);
// 一键关单接口
export const CloseDoingFlowNodes = param =>
post(`${PUBLISH_SERVICE}/WorkFlow/CloseDoingFlowNodes`, 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