Commit 43db55a7 authored by 皮倩雯's avatar 皮倩雯

搜索数据高亮显示

parent 52c711ef
Pipeline #38278 skipped with stages
...@@ -27,6 +27,7 @@ const OmsLog = () => { ...@@ -27,6 +27,7 @@ const OmsLog = () => {
const [endTime, setEndTime] = useState( const [endTime, setEndTime] = useState(
moment(new Date(), 'YYYY-MM-DD HH:mm:ss'), // 默认值当前时间 moment(new Date(), 'YYYY-MM-DD HH:mm:ss'), // 默认值当前时间
); );
const [showSearchStyle, setShowSearchStyle] = useState(false); // 是否显示模糊查询样式
const columns = [ const columns = [
{ {
...@@ -45,6 +46,7 @@ const OmsLog = () => { ...@@ -45,6 +46,7 @@ const OmsLog = () => {
key: 'Function', key: 'Function',
ellipsis: 'true', ellipsis: 'true',
width: 200, width: 200,
render: item => searchStyle(item),
// filters: functionNameFilters, // filters: functionNameFilters,
// onFilter: (value, record) => record.functionName === value, // onFilter: (value, record) => record.functionName === value,
}, },
...@@ -54,6 +56,7 @@ const OmsLog = () => { ...@@ -54,6 +56,7 @@ const OmsLog = () => {
key: 'Label', key: 'Label',
ellipsis: 'true', ellipsis: 'true',
width: 300, width: 300,
render: item => searchStyle1(item),
}, },
{ {
title: '操作信息', title: '操作信息',
...@@ -90,6 +93,33 @@ const OmsLog = () => { ...@@ -90,6 +93,33 @@ const OmsLog = () => {
}, },
]; ];
//模糊查询匹配的样式
const searchStyle = val => {
let n;
if (showSearchStyle) {
n = val.replace(
new RegExp(functionName, 'g'),
`<span style='color:red'>${functionName}</span>`,
);
} else {
n = val;
}
return <div dangerouslySetInnerHTML={{ __html: n }} />;
};
const searchStyle1 = val => {
let n;
if (showSearchStyle) {
n = val.replace(
new RegExp(label, 'g'),
`<span style='color:red'>${label}</span>`,
);
} else {
n = val;
}
return <div dangerouslySetInnerHTML={{ __html: n }} />;
};
// 在起止时间任意一个变化后获取数据 // 在起止时间任意一个变化后获取数据
useEffect(() => { useEffect(() => {
if (startTime && endTime) { if (startTime && endTime) {
...@@ -162,6 +192,7 @@ const OmsLog = () => { ...@@ -162,6 +192,7 @@ const OmsLog = () => {
setFunctionName(''); setFunctionName('');
setFilteredValue([]); setFilteredValue([]);
setLabel(''); setLabel('');
setShowSearchStyle(false);
}; };
const onChangeInput = filters => { const onChangeInput = filters => {
console.log('filters', filters); console.log('filters', filters);
...@@ -218,7 +249,10 @@ const OmsLog = () => { ...@@ -218,7 +249,10 @@ const OmsLog = () => {
<Button <Button
type="primary" type="primary"
style={{ marginLeft: '10px' }} style={{ marginLeft: '10px' }}
onClick={getData} onClick={() =>{
getData()
setShowSearchStyle(true);
}}
> >
查询 查询
</Button> </Button>
......
...@@ -33,6 +33,7 @@ const ServiceLog = () => { ...@@ -33,6 +33,7 @@ const ServiceLog = () => {
); );
const [logType, setLogType] = useState('9999'); // 请求参数,日志类型,默认是正常,0:成功 -1:异常 9999:全部 const [logType, setLogType] = useState('9999'); // 请求参数,日志类型,默认是正常,0:成功 -1:异常 9999:全部
const [searchWord, setSearchWord] = useState(''); // 关键字 const [searchWord, setSearchWord] = useState(''); // 关键字
const [showSearchStyle, setShowSearchStyle] = useState(false); // 是否显示模糊查询样式
// 计算时间间隔(分钟) // 计算时间间隔(分钟)
const start = new Date(startTime).getTime(); const start = new Date(startTime).getTime();
...@@ -76,6 +77,7 @@ const ServiceLog = () => { ...@@ -76,6 +77,7 @@ const ServiceLog = () => {
key: 'Path', key: 'Path',
fixed: 'left', fixed: 'left',
width: 400, width: 400,
render: item => searchStyle(item),
}, },
{ {
title: '调用时间', title: '调用时间',
...@@ -130,6 +132,20 @@ const ServiceLog = () => { ...@@ -130,6 +132,20 @@ const ServiceLog = () => {
sorter: (a, b) => a.ResponseSize - b.ResponseSize, sorter: (a, b) => a.ResponseSize - b.ResponseSize,
}, },
]; ];
// 模糊查询匹配的样式
const searchStyle = val => {
let n;
if (showSearchStyle) {
n = val.replace(
new RegExp(searchWord, 'g'),
`<span style='color:red'>${searchWord}</span>`,
);
} else {
n = val;
}
return <div dangerouslySetInnerHTML={{ __html: n }} />;
};
// 在起止时间任意一个变化后获取数据,且起止时间应该早于结束时间,且不允许跨月查询 // 在起止时间任意一个变化后获取数据,且起止时间应该早于结束时间,且不允许跨月查询
useEffect(() => { useEffect(() => {
if ( if (
...@@ -251,6 +267,7 @@ const ServiceLog = () => { ...@@ -251,6 +267,7 @@ const ServiceLog = () => {
setStartTime(moment().startOf('week')); setStartTime(moment().startOf('week'));
setEndTime(moment(new Date(), 'YYYY-MM-DD HH:mm:ss')); setEndTime(moment(new Date(), 'YYYY-MM-DD HH:mm:ss'));
setSearchWord(''); setSearchWord('');
setShowSearchStyle(false);
}; };
return ( return (
<> <>
...@@ -298,6 +315,7 @@ const ServiceLog = () => { ...@@ -298,6 +315,7 @@ const ServiceLog = () => {
placeholder="请输入接口名称" placeholder="请输入接口名称"
onSearch={() => { onSearch={() => {
getData('/GetOMSLog', setDataTable); getData('/GetOMSLog', setDataTable);
setShowSearchStyle(true);
}} }}
onChange={e => handleSearch(e)} onChange={e => handleSearch(e)}
enterButton enterButton
......
...@@ -53,8 +53,10 @@ const TableManager = props => { ...@@ -53,8 +53,10 @@ const TableManager = props => {
const [tableData, setTableData] = useState([]); const [tableData, setTableData] = useState([]);
const [select, setSelect] = useState([]); const [select, setSelect] = useState([]);
const [selectTableName, setSelectTableName] = useState(''); const [selectTableName, setSelectTableName] = useState('');
const [showSearchStyle, setShowSearchStyle] = useState(false); // 是否显示模糊查询样式
useEffect( useEffect(
record => { record => {
console.log(343434)
loadTable(searchValue); loadTable(searchValue);
getField(); getField();
// if (props.history.location.query && selectTableName !== {}) { // if (props.history.location.query && selectTableName !== {}) {
...@@ -158,6 +160,7 @@ const TableManager = props => { ...@@ -158,6 +160,7 @@ const TableManager = props => {
const handleSearch = text => { const handleSearch = text => {
loadTable(text); loadTable(text);
setSearchValue(text); setSearchValue(text);
setShowSearchStyle(true);
}; };
const getField = () => { const getField = () => {
loadUnattachedTables().then(res => { loadUnattachedTables().then(res => {
...@@ -168,6 +171,7 @@ const TableManager = props => { ...@@ -168,6 +171,7 @@ const TableManager = props => {
}; };
// 加载表 // 加载表
const loadTable = keyword => { const loadTable = keyword => {
console.log(222)
setTreeLoading(true); setTreeLoading(true);
CM_Table_LoadTable({ CM_Table_LoadTable({
_version: 9999, _version: 9999,
...@@ -242,7 +246,7 @@ const TableManager = props => { ...@@ -242,7 +246,7 @@ const TableManager = props => {
key: 'tableName', key: 'tableName',
width: 300, width: 300,
render: (text, record) => ( render: (text, record) => (
<div onClick={e => fieldsConfig(record, e)}>{text}</div> <div onClick={e => fieldsConfig(record, e)}>{searchStyle(text)}</div>
), ),
}, },
{ {
...@@ -344,6 +348,20 @@ const TableManager = props => { ...@@ -344,6 +348,20 @@ const TableManager = props => {
}, },
]; ];
// 模糊查询匹配的样式
const searchStyle = val => {
let n;
if (showSearchStyle) {
n = val.replace(
new RegExp(searchValue, 'g'),
`<span style='color:red'>${searchValue}</span>`,
);
} else {
n = val;
}
return <div dangerouslySetInnerHTML={{ __html: n }} />;
};
return ( return (
<Table <Table
columns={columns1} columns={columns1}
......
...@@ -857,7 +857,7 @@ const AddModal = props => { ...@@ -857,7 +857,7 @@ const AddModal = props => {
> >
<div className={styles.filed_listItem} > <div className={styles.filed_listItem} >
<Input style={{ width: '83%' }} placeholder="请选择摘要字段" onChange={(e) => changeText(e, 'SummaryFields')} value={inputValue.SummaryFields} allowClear /> <Input style={{ width: '83%' }} placeholder="请选择摘要字段" onChange={(e) => changeText(e, 'SummaryFields')} value={inputValue.SummaryFields} allowClear />
<Button type="dashed" onClick={() => pickFiled('SummaryFields')} icon={<PlusOutlined />} style={{ marginLeft: '0.5rem', width: '4rem' }} /> <Button type="dashed" onClick={() => pickFiled('SummaryFields')} icon={<PlusOutlined style={{marginTop:'5px'}}/>} style={{ marginLeft: '0.5rem', width: '4rem' }} />
</div> </div>
</Item> </Item>
......
...@@ -39,21 +39,25 @@ const ProjectManage = () => { ...@@ -39,21 +39,25 @@ const ProjectManage = () => {
const [pageSize, setPageSize] = useState(10) const [pageSize, setPageSize] = useState(10)
const [dataList, setDataList] = useState([]) const [dataList, setDataList] = useState([])
const [treeLoading, setTreeLoading] = useState(false); const [treeLoading, setTreeLoading] = useState(false);
const [showSearchStyle, setShowSearchStyle] = useState(false); // 是否显示模糊查询样式
const [value, setValue] = useState('')
const columns = [ const columns = [
{ {
title: '方案名称', title: '方案名称',
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
render: (text, record) => ( render: (text, record) => (
<div>{record.type == '定时推送' ? text : <div style={{ display: 'flex', alignItems: 'center' }}> <div>{record.type == '定时推送' ? searchStyle(text) : <div style={{ display: 'flex', alignItems: 'center' }}>
<Tooltip title={text} > <Tooltip title={text} >
<FieldTimeOutlined <FieldTimeOutlined
style={{ fontSize: '16px', color: '#1890FF', marginRight: '0.1rem' }} style={{ fontSize: '16px', color: '#1890FF', marginRight: '0.1rem' }}
/> />
</Tooltip> </Tooltip>
{text} {searchStyle(text)}
</div>}</div> </div>}
) </div>
),
}, },
{ {
title: '方案类型', title: '方案类型',
...@@ -118,9 +122,28 @@ const ProjectManage = () => { ...@@ -118,9 +122,28 @@ const ProjectManage = () => {
}, },
]; ];
// 模糊查询匹配的样式
const searchStyle = val => {
console.log(val)
console.log(value)
let n;
if (showSearchStyle) {
n = val.replace(
new RegExp(value, 'g'),
`<span style='color:red'>${value}</span>`,
);
} else {
n = val;
}
console.log(val)
return <div dangerouslySetInnerHTML={{ __html: n }} />;
};
const placeholder = '请输入方案名称' const placeholder = '请输入方案名称'
const handleSearch = (value) => { const handleSearch = (value) => {
GetMessageList({ pageSize: 10, pageIndex: 0, search: value }) GetMessageList({ pageSize: 10, pageIndex: 0, search: value })
setShowSearchStyle(true);
} }
const changeDesc = (record) => { const changeDesc = (record) => {
setCurrentTempalte(record) setCurrentTempalte(record)
...@@ -188,6 +211,7 @@ const ProjectManage = () => { ...@@ -188,6 +211,7 @@ const ProjectManage = () => {
setCurrentType("全部") setCurrentType("全部")
setCurrentName("全部") setCurrentName("全部")
GetMessageList({ pageSize: 10, pageIndex: 0 }) GetMessageList({ pageSize: 10, pageIndex: 0 })
setShowSearchStyle(false);
} }
// 弹出模态框 // 弹出模态框
const handleShowModal = (key, value) => { const handleShowModal = (key, value) => {
...@@ -266,6 +290,10 @@ const ProjectManage = () => { ...@@ -266,6 +290,10 @@ const ProjectManage = () => {
) )
} }
const handleChange = e =>{
setValue(e.target.value)
}
const pagenation = { const pagenation = {
showTotal: (total, range) => `第${range[0]}-${range[1]} 条/共 ${total} 条`, showTotal: (total, range) => `第${range[0]}-${range[1]} 条/共 ${total} 条`,
pageSizeOptions: [10, 20, 50, 100], pageSizeOptions: [10, 20, 50, 100],
...@@ -306,9 +334,10 @@ const ProjectManage = () => { ...@@ -306,9 +334,10 @@ const ProjectManage = () => {
allowClear allowClear
placeholder={placeholder} placeholder={placeholder}
onSearch={handleSearch} onSearch={handleSearch}
// onChange={handleChange} onChange={e=>{handleChange(e)}}
enterButton enterButton
style={{ width: "300px" }} style={{ width: "300px" }}
value={value}
/> />
</div> </div>
<Button type="primary" onClick={handleReset}>重置</Button> <Button type="primary" onClick={handleReset}>重置</Button>
...@@ -322,7 +351,7 @@ const ProjectManage = () => { ...@@ -322,7 +351,7 @@ const ProjectManage = () => {
dataSource={dataList} dataSource={dataList}
pagination={pagenation} pagination={pagenation}
rowKey='ID' rowKey='ID'
/> />
</div> </div>
<EditModal <EditModal
visible={visibleParams.editVisible} visible={visibleParams.editVisible}
......
...@@ -39,6 +39,8 @@ const TemplateManage = () => { ...@@ -39,6 +39,8 @@ const TemplateManage = () => {
const [flag, setFlag] = useState(0) const [flag, setFlag] = useState(0)
const [option, setOption] = useState([]); // 下拉列表数据 const [option, setOption] = useState([]); // 下拉列表数据
const [treeLoading, setTreeLoading] = useState(false); const [treeLoading, setTreeLoading] = useState(false);
const [showSearchStyle, setShowSearchStyle] = useState(false); // 是否显示模糊查询样式
const [value, setValue] = useState('')
useEffect(() => { useEffect(() => {
getTemplateList() getTemplateList()
...@@ -105,6 +107,7 @@ const TemplateManage = () => { ...@@ -105,6 +107,7 @@ const TemplateManage = () => {
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
align: 'center', align: 'center',
render: item => searchStyle(item),
}, },
{ {
title: '模板类型', title: '模板类型',
...@@ -182,12 +185,34 @@ const TemplateManage = () => { ...@@ -182,12 +185,34 @@ const TemplateManage = () => {
]; ];
// 模糊查询匹配的样式
const searchStyle = val => {
let n;
if (showSearchStyle) {
n = val.replace(
new RegExp(value, 'g'),
`<span style='color:red'>${value}</span>`,
);
} else {
n = val;
}
console.log(n)
return <div dangerouslySetInnerHTML={{ __html: n }} />;
};
const placeholder = '请输入模板名称' const placeholder = '请输入模板名称'
const handleSearch = (value) => { const handleSearch = (value) => {
setValue(value)
getTemplateList({ queryInfo: value }) getTemplateList({ queryInfo: value })
setShowSearchStyle(true);
} }
const handleReset = () => { const handleReset = () => {
getTemplateList() getTemplateList()
setValue('')
setShowSearchStyle(false);
}
const handleChange = e =>{
setValue(e.target.value)
} }
const handleSelectType = (value) => { const handleSelectType = (value) => {
if (value === '全部') { if (value === '全部') {
...@@ -300,9 +325,10 @@ const TemplateManage = () => { ...@@ -300,9 +325,10 @@ const TemplateManage = () => {
allowClear allowClear
placeholder={placeholder} placeholder={placeholder}
onSearch={handleSearch} onSearch={handleSearch}
// onChange={handleChange} onChange={e => handleChange(e)}
enterButton enterButton
style={{ width: "300px" }} style={{ width: "300px" }}
value={value}
/> />
</div> </div>
<Button type="primary" onClick={handleReset}>重置</Button> <Button type="primary" onClick={handleReset}>重置</Button>
......
...@@ -49,6 +49,7 @@ const videoManager = () => { ...@@ -49,6 +49,7 @@ const videoManager = () => {
const [obj, setObj] = useState({}); const [obj, setObj] = useState({});
const [show1, setShow1] = useState('block'); const [show1, setShow1] = useState('block');
const [show2, setShow2] = useState('none'); const [show2, setShow2] = useState('none');
const [showSearchStyle, setShowSearchStyle] = useState(false); // 是否显示模糊查询样式
const columns = [ const columns = [
{ {
...@@ -57,6 +58,7 @@ const videoManager = () => { ...@@ -57,6 +58,7 @@ const videoManager = () => {
key: 'Name', key: 'Name',
width: 200, width: 200,
align: 'center', align: 'center',
render: item => searchStyle(item),
}, },
{ {
title: '视频厂商', title: '视频厂商',
...@@ -71,6 +73,7 @@ const videoManager = () => { ...@@ -71,6 +73,7 @@ const videoManager = () => {
key: 'LoginName', key: 'LoginName',
width: 350, width: 350,
align: 'center', align: 'center',
render: item => searchStyle(item),
}, },
{ {
title: '登录密码', title: '登录密码',
...@@ -85,6 +88,7 @@ const videoManager = () => { ...@@ -85,6 +88,7 @@ const videoManager = () => {
key: 'EquipmentCode', key: 'EquipmentCode',
width: 150, width: 150,
align: 'center', align: 'center',
render: item => searchStyle(item),
}, },
{ {
title: '通道ID', title: '通道ID',
...@@ -183,6 +187,20 @@ const videoManager = () => { ...@@ -183,6 +187,20 @@ const videoManager = () => {
}, },
]; ];
// 模糊查询匹配的样式
const searchStyle = val => {
let n;
if (showSearchStyle) {
n = val.replace(
new RegExp(searchWord, 'g'),
`<span style='color:red'>${searchWord}</span>`,
);
} else {
n = val;
}
return <div dangerouslySetInnerHTML={{ __html: n }} />;
};
const edit = record => { const edit = record => {
setAddVisible(true); setAddVisible(true);
setKind('edit'); setKind('edit');
...@@ -255,6 +273,7 @@ const videoManager = () => { ...@@ -255,6 +273,7 @@ const videoManager = () => {
useEffect(() => { useEffect(() => {
setLoading(true); setLoading(true);
getData(); getData();
setShowSearchStyle(false);
}, [type, flag]); }, [type, flag]);
const getData = () => { const getData = () => {
...@@ -304,6 +323,7 @@ const videoManager = () => { ...@@ -304,6 +323,7 @@ const videoManager = () => {
QueryWhere: searchWord, QueryWhere: searchWord,
}).then(res => { }).then(res => {
if (res.msg === 'Ok') { if (res.msg === 'Ok') {
setShowSearchStyle(true);
setTableData(res.data.list); setTableData(res.data.list);
} }
}); });
......
...@@ -108,6 +108,8 @@ const SiteManage = () => { ...@@ -108,6 +108,8 @@ const SiteManage = () => {
if (res.code === 0) { if (res.code === 0) {
const { roleList } = res.data; const { roleList } = res.data;
let arr = transTree(roleList); let arr = transTree(roleList);
console.log(roleList)
console.log(arr)
setTreeData(arr); setTreeData(arr);
} }
}); });
......
...@@ -64,7 +64,7 @@ const SiteManageV2 = () => { ...@@ -64,7 +64,7 @@ const SiteManageV2 = () => {
const [showSearchStyle, setShowSearchStyle] = useState(false); // 是否显示模糊查询样式
const [treeVisible, setTreeVisible] = useState(true); // 树是否可见 const [treeVisible, setTreeVisible] = useState(true); // 树是否可见
const [treeData, setTreeData] = useState([]); // 用户站点树 const [treeData, setTreeData] = useState([]); // 用户站点树
const [treeDataCopy, setTreeDataCopy] = useState([]); // 机构树数据备份,用于更改机构 const [treeDataCopy, setTreeDataCopy] = useState([]); // 机构树数据备份,用于更改机构
...@@ -175,14 +175,15 @@ const SiteManageV2 = () => { ...@@ -175,14 +175,15 @@ const SiteManageV2 = () => {
updateTrees(); updateTrees();
}, [flag]); }, [flag]);
useEffect(()=>{ useEffect(() => {
getValue() getValue()
},[]) }, [])
//切换站点,点击分页按钮,提交 //切换站点,点击分页按钮,提交
useEffect(() => { useEffect(() => {
if (!currentStation) return; if (!currentStation) return;
getList(); getList();
setShowSearchStyle(false);
}, [updatePageUser, name]); }, [updatePageUser, name]);
//切换站点,提交时触发已勾选列表更新 //切换站点,提交时触发已勾选列表更新
useEffect(() => { useEffect(() => {
...@@ -201,6 +202,7 @@ const SiteManageV2 = () => { ...@@ -201,6 +202,7 @@ const SiteManageV2 = () => {
if (name) params = { ...params, name }; if (name) params = { ...params, name };
groupUserPagingList(params).then(res => { groupUserPagingList(params).then(res => {
if (res.code === 0 && res.data) { if (res.code === 0 && res.data) {
setShowSearchStyle(true);
let { list } = res.data; let { list } = res.data;
// 还原选择的数据 // 还原选择的数据
if (selectList.length > 0) { if (selectList.length > 0) {
...@@ -303,33 +305,33 @@ const SiteManageV2 = () => { ...@@ -303,33 +305,33 @@ const SiteManageV2 = () => {
setPage({ pageNum: 1, pageSize: 10 }); setPage({ pageNum: 1, pageSize: 10 });
console.log(data) console.log(data)
data.map((item, index) => { data.map((item, index) => {
if(item.id == props[0]){ if (item.id == props[0]) {
console.log(item.id) console.log(item.id)
console.log(item.describe) console.log(item.describe)
setDes(item.describe) setDes(item.describe)
} }
}) })
} }
const getValue = () => { const getValue = () => {
getSiteTree({ selectNode: -1 }).then( getSiteTree({ selectNode: -1 }).then(
res => { res => {
console.log(res.data) console.log(res.data)
getData1(res.data) getData1(res.data)
} }
) )
} }
const getData1 = e => { const getData1 = e => {
console.log(e) console.log(e)
e.map((i, j)=>{ e.map((i, j) => {
a.push(i) a.push(i)
if(i.children.length>0){ if (i.children.length > 0) {
getData1(i.children) getData1(i.children)
} }
}) })
console.log(a) console.log(a)
setData(a) setData(a)
} }
// 弹出模态框 // 弹出模态框
...@@ -505,6 +507,23 @@ const SiteManageV2 = () => { ...@@ -505,6 +507,23 @@ const SiteManageV2 = () => {
const addTopStation = () => { const addTopStation = () => {
handleShowModal('modalVisible', true); handleShowModal('modalVisible', true);
} }
// 模糊查询匹配的样式
const searchStyle = val => {
console.log(name)
let n;
if (showSearchStyle) {
n = val.replace(
new RegExp(name, 'g'),
`<span style='color:red'>${name}</span>`,
);
} else {
n = val;
}
console.log(n)
return <div dangerouslySetInnerHTML={{ __html: n }} />;
};
return ( return (
<PageContainer className={styles.siteManageContainer}> <PageContainer className={styles.siteManageContainer}>
<div className={styles.contentContainer}> <div className={styles.contentContainer}>
...@@ -628,7 +647,7 @@ const SiteManageV2 = () => { ...@@ -628,7 +647,7 @@ const SiteManageV2 = () => {
key={`${item.userName}${item.GroupId}${index}`} key={`${item.userName}${item.GroupId}${index}`}
onClick={() => handleDel(index)} onClick={() => handleDel(index)}
> >
{`${item.userName}(${item.GroupName})`} {`${item.userName}(${searchStyle(item.GroupName)})`}
</li> </li>
))} ))}
</ul> </ul>
......
...@@ -50,6 +50,7 @@ const RelateRoleModal = props => { ...@@ -50,6 +50,7 @@ const RelateRoleModal = props => {
// 提交-关联角色 // 提交-关联角色
const submitRole = () => { const submitRole = () => {
console.log(1212121212)
SetUserRelationList( SetUserRelationList(
currentUser.userID, currentUser.userID,
Object.keys(roleValueList) Object.keys(roleValueList)
...@@ -83,13 +84,7 @@ const RelateRoleModal = props => { ...@@ -83,13 +84,7 @@ const RelateRoleModal = props => {
}; };
// 提交-批量关联角色 // 提交-批量关联角色
const submitRoles = () => { const submitRoles = () => {
console.log(64634676437)
console.log(roleValueList)
console.log(stationValueList)
console.log( Object.keys(roleValueList)
.map(k => roleValueList[k])
.flat()
.toString())
setUserRelations( setUserRelations(
userIDs, userIDs,
Object.keys(roleValueList) Object.keys(roleValueList)
......
...@@ -256,7 +256,7 @@ const WebConfigPage = props => { ...@@ -256,7 +256,7 @@ const WebConfigPage = props => {
}, 500); }, 500);
} else { } else {
notification.warning({ notification.warning({
message: res.message || failMsg, message: res.msg || failMsg,
duration: 5, duration: 5,
}); });
} }
......
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