Commit ff96c01d authored by 涂伟's avatar 涂伟

fix: '用户导入导出逻辑优化'

parent c9796a25
Pipeline #95420 failed with stages
...@@ -79,6 +79,7 @@ import { ...@@ -79,6 +79,7 @@ import {
ChangeSMSState, ChangeSMSState,
AddUserAppBindWhiteList, AddUserAppBindWhiteList,
ExportUserData, ExportUserData,
ExportUserTemplate,
ImportUserData, ImportUserData,
GetPasswordRegularization, GetPasswordRegularization,
SysConfiguration SysConfiguration
...@@ -100,6 +101,8 @@ const TdCell = props => { ...@@ -100,6 +101,8 @@ const TdCell = props => {
return <td {...restProps} />; return <td {...restProps} />;
}; };
const path = require('path');
const UserManage = () => { const UserManage = () => {
const [selectValue, setSelctValue] = useState(); // 用户鉴权 const [selectValue, setSelctValue] = useState(); // 用户鉴权
...@@ -947,21 +950,26 @@ const UserManage = () => { ...@@ -947,21 +950,26 @@ const UserManage = () => {
/** ***其他操作*** */ /** ***其他操作*** */
// 导出用户 // 导出用户
const exportRoles = async (data) => { const exportRoles = async (data) => {
// menuID if(data.isModal){
// searchWord let downloadLink = document.createElement('a');
// pageSize downloadLink.href = path.join(__dirname, `/civmanage/用户导出模板.xls`);
// currentPage downloadLink.download = '用户导出模板.xls';
document.body.appendChild(downloadLink);
ExportUserData({ downloadLink.click();
groupId: data.all ? 0 : menuID ? menuID : 0,
key: data.all ? '' : searchWord, document.body.removeChild(downloadLink);
isModel: data.isModal ? true : false, } else {
}).then(res => { ExportUserData({
// window.open(`http:192.168.10.167:8088/${res.data}`) groupId: data.all ? 0 : menuID ? menuID : 0,
window.open(`${window.origin}/${res.data}`) key: data.all ? '' : searchWord,
console.log(res, 'resssssssssssssssssss'); isModel: data.isModal ? true : false,
}) }).then(res => {
// window.open(`http:192.168.10.167:8088/${res.data}`)
window.open(`${window.origin}/${res.data}`)
console.log(res, 'resssssssssssssssssss');
})
}
} }
// 导入用户 // 导入用户
......
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