Commit 3df1e6e9 authored by 田翔's avatar 田翔
parents db009708 47161798
Pipeline #88052 passed with stages
......@@ -127,7 +127,7 @@
"js-calendar-converter": "0.0.4",
"lodash": "4.17.11",
"minimist": "1.2.0",
"panda-xform": "6.0.14",
"panda-xform": "6.0.16",
"parseForm": "^2.3.8",
"prop-types": "15.7.2",
"qrcode.react": "^3.1.0",
......
......@@ -14,7 +14,7 @@ const PictureWallProvider = props => {
const [imgBed, setImgBed] = useState([]);
const update = () =>
getImageBases('icon,androidMenu,menuNew,logo,CityTemp,bootAnimation,loginPageImage,homePageImage')
getImageBases('icon,androidMenu,menuNew,logo,CityTemp,bootAnimation,loginPageImage,homePageImage,userPageImage')
.then(res => {
if (res.code === 0) {
const { data } = res;
......
......@@ -34,7 +34,7 @@ const tabNames: any = {
loginPageImage: '登录页',
homePageImage: '主页焦点图',
userPageImage: '背景图',
bootAnimation: '过渡页',
bootAnimation: '启动过渡页',
}
function getBase64(file: File | Blob) {
......
......@@ -402,7 +402,12 @@ const StandingBook = props => {
const searchStyle = val => {
let n;
if (showSearchStyle) {
n = val.replace(new RegExp(searchWord, 'g'), `<span style='color:red'>${searchWord}</span>`);
const escapedSearchValue = searchWord.replace(/\\/g, '\\\\');
const regex = new RegExp(escapedSearchValue, 'g');
n = val.replace(
regex,
`<span style='color:red'>${searchWord}</span>`
);
} else {
n = val;
}
......
......@@ -366,9 +366,11 @@ const TableManager = props => {
const searchStyle = val => {
let n;
if (showSearchStyle) {
const escapedSearchValue = searchValue.replace(/\\/g, '\\\\');
const regex = new RegExp(escapedSearchValue, 'g');
n = val.replace(
new RegExp(searchValue, 'g'),
`<span style='color:red'>${searchValue}</span>`,
regex,
`<span style='color:red'>${searchValue}</span>`
);
} else {
n = val;
......
......@@ -514,9 +514,11 @@ const incident = () => {
const searchStyle = val => {
let n;
if (showSearchStyle) {
const escapedSearchValue = searchValue.replace(/\\/g, '\\\\');
const regex = new RegExp(escapedSearchValue, 'g');
n = val.replace(
new RegExp(searchValue, 'g'),
`<span style='color:red'>${searchValue}</span>`,
regex,
`<span style='color:red'>${searchValue}</span>`
);
} else {
n = val;
......
......@@ -288,9 +288,11 @@ const Flow = () => {
const searchStyle = val => {
let n;
if (showSearchStyle) {
const escapedSearchValue = searchValue.replace(/\\/g, '\\\\');
const regex = new RegExp(escapedSearchValue, 'g');
n = val.replace(
new RegExp(searchValue, 'g'),
`<span style='color:red'>${searchValue}</span>`,
regex,
`<span style='color:red'>${searchValue}</span>`
);
} else {
n = val;
......
......@@ -287,7 +287,12 @@ const WebDic = () => {
const searchStyle = val => {
let n;
if (showSearchStyle) {
n = val.replace(new RegExp(searchWord, 'g'), `<span style='color:red'>${searchWord}</span>`);
const escapedSearchValue = searchWord.replace(/\\/g, '\\\\');
const regex = new RegExp(escapedSearchValue, 'g');
n = val.replace(
regex,
`<span style='color:red'>${searchWord}</span>`
);
} else {
n = val;
}
......
......@@ -565,7 +565,12 @@ const LogCenter = () => {
const searchStyle = val => {
let n;
if (showSearchStyle) {
n = val.replace(new RegExp(requestUrl, 'g'), `<span style='color:red'>${requestUrl}</span>`);
const escapedSearchValue = requestUrl.replace(/\\/g, '\\\\');
const regex = new RegExp(escapedSearchValue, 'g');
n = val.replace(
regex,
`<span style='color:red'>${requestUrl}</span>`
);
} else {
n = val;
}
......
......@@ -127,9 +127,11 @@ const OmsLog = () => {
const searchStyle = val => {
let n;
if (showSearchStyle) {
const escapedSearchValue = functionName.replace(/\\/g, '\\\\');
const regex = new RegExp(escapedSearchValue, 'g');
n = val.replace(
new RegExp(functionName, 'g'),
`<span style='color:red'>${functionName}</span>`,
regex,
`<span style='color:red'>${functionName}</span>`
);
} else {
n = val;
......
......@@ -310,7 +310,12 @@ const ServiceLog = () => {
const searchStyle = val => {
let n;
if (showSearchStyle) {
n = val.replace(new RegExp(searchWord, 'g'), `<span style='color:red'>${searchWord}</span>`);
const escapedSearchValue = searchWord.replace(/\\/g, '\\\\');
const regex = new RegExp(escapedSearchValue, 'g');
n = val.replace(
regex,
`<span style='color:red'>${searchWord}</span>`
);
} else {
n = val;
}
......
......@@ -577,7 +577,12 @@ const DrawBoardManage = () => {
const searchStyle = val => {
let n;
if (showSearchStyle) {
n = val.replace(new RegExp(searchWord, 'g'), `<span style='color:red'>${searchWord}</span>`);
const escapedSearchValue = searchWord.replace(/\\/g, '\\\\');
const regex = new RegExp(escapedSearchValue, 'g');
n = val.replace(
regex,
`<span style='color:red'>${searchWord}</span>`
);
} else {
n = val;
}
......
......@@ -253,7 +253,12 @@ const ModelFileManage = () => {
const searchStyle = val => {
let n;
if (showSearchStyle) {
n = val.replace(new RegExp(searchWord, 'g'), `<span style='color:red'>${searchWord}</span>`);
const escapedSearchValue = searchWord.replace(/\\/g, '\\\\');
const regex = new RegExp(escapedSearchValue, 'g');
n = val.replace(
regex,
`<span style='color:red'>${searchWord}</span>`
);
} else {
n = val;
}
......
......@@ -421,7 +421,12 @@ const GateConfig = () => {
const searchStyle = val => {
let n;
if (showSearchStyle) {
n = val.replace(new RegExp(searchWord, 'g'), `<span style='color:red'>${searchWord}</span>`);
const escapedSearchValue = searchWord.replace(/\\/g, '\\\\');
const regex = new RegExp(escapedSearchValue, 'g');
n = val.replace(
regex,
`<span style='color:red'>${searchWord}</span>`
);
} else {
n = val;
}
......
......@@ -317,7 +317,12 @@ const Integrate = () => {
const searchStyle = val => {
let n;
if (showSearchStyle) {
n = val.replace(new RegExp(searchWord, 'g'), `<span style='color:red'>${searchWord}</span>`);
const escapedSearchValue = searchWord.replace(/\\/g, '\\\\');
const regex = new RegExp(escapedSearchValue, 'g');
n = val.replace(
regex,
`<span style='color:red'>${searchWord}</span>`
);
} else {
n = val;
}
......
......@@ -241,7 +241,12 @@ const ProjectManage = props => {
const searchStyle = val => {
let n;
if (showSearchStyle) {
n = val.replace(new RegExp(value, 'g'), `<span style='color:red'>${value}</span>`);
const escapedSearchValue = value.replace(/\\/g, '\\\\');
const regex = new RegExp(escapedSearchValue, 'g');
n = val.replace(
regex,
`<span style='color:red'>${value}</span>`
);
} else {
n = val;
}
......
......@@ -345,7 +345,12 @@ const TemplateManage = () => {
const searchStyle = val => {
let n;
if (showSearchStyle) {
n = val.replace(new RegExp(value, 'g'), `<span style='color:red'>${value}</span>`);
const escapedSearchValue = value.replace(/\\/g, '\\\\');
const regex = new RegExp(escapedSearchValue, 'g');
n = val.replace(
regex,
`<span style='color:red'>${value}</span>`
);
} else {
n = val;
}
......
......@@ -342,7 +342,12 @@ const ScheduledTasks = () => {
const searchStyle = val => {
let n;
if (showSearchStyle) {
n = val.replace(new RegExp(requestUrl, 'g'), `<span style='color:red'>${requestUrl}</span>`);
const escapedSearchValue = requestUrl.replace(/\\/g, '\\\\');
const regex = new RegExp(escapedSearchValue, 'g');
n = val.replace(
regex,
`<span style='color:red'>${requestUrl}</span>`
);
} else {
n = val;
}
......
......@@ -244,7 +244,12 @@ const videoManager = () => {
const searchStyle = val => {
let n;
if (showSearchStyle) {
n = val.replace(new RegExp(searchWord, 'g'), `<span style='color:red'>${searchWord}</span>`);
const escapedSearchValue = searchWord.replace(/\\/g, '\\\\');
const regex = new RegExp(escapedSearchValue, 'g');
n = val.replace(
regex,
`<span style='color:red'>${searchWord}</span>`
);
} else {
n = val;
}
......
......@@ -216,7 +216,7 @@ const AddConfig = props => {
name="userPageImage"
rules={[
{
required: true,
// required: true,
message: '请选择背景图',
},
]}
......
......@@ -629,7 +629,12 @@ const SiteManageV2 = () => {
const searchStyle = val => {
let n;
if (showSearchStyle) {
n = val.replace(new RegExp(name, 'g'), `<span style='color:red'>${name}</span>`);
const escapedSearchValue = name.replace(/\\/g, '\\\\');
const regex = new RegExp(escapedSearchValue, 'g');
n = val.replace(
regex,
`<span style='color:red'>${name}</span>`
);
} else {
n = val;
}
......
......@@ -512,12 +512,14 @@ const UserManage = () => {
};
// 模糊查询匹配的样式
const searchStyle = val => {
if (!val) {
return val;
}
let n;
if (showSearchStyle) {
n = val.replace(new RegExp(searchWord, 'g'), `<span style='color:red'>${searchWord}</span>`);
const escapedSearchValue = searchWord.replace(/\\/g, '\\\\');
const regex = new RegExp(escapedSearchValue, 'g');
n = val.replace(
regex,
`<span style='color:red'>${searchWord}</span>`
);
} else {
n = val;
}
......
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