#
luxiaotao1123
2024-02-17 054273bc2e404e412b4673966c3101c313677758
#
1个文件已修改
18 ■■■■ 已修改文件
zy-asrs-flow/src/pages/system/role/index.jsx 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/system/role/index.jsx
@@ -16,7 +16,6 @@
    const hide = message.loading('正在添加');
    try {
        const resp = await Http.doPost('api/role/save', val);
        hide();
        if (resp.code === 200) {
            message.success('添加成功');
            return true;
@@ -25,9 +24,10 @@
            return false;
        }
    } catch (error) {
        hide();
        message.error('添加失败请重试!');
        return false;
    } finally {
        hide();
    }
};
@@ -35,7 +35,6 @@
    const hide = message.loading('正在更新');
    try {
        const resp = await Http.doPost('api/role/update', val);
        hide();
        if (resp.code === 200) {
            message.success('更新成功');
            return true;
@@ -44,9 +43,10 @@
            return false;
        }
    } catch (error) {
        hide();
        message.error('配置失败请重试!');
        return false;
    } finally {
        hide();
    }
};
@@ -55,7 +55,6 @@
    const hide = message.loading('正在删除');
    try {
        const resp = await Http.doPost('api/role/remove/' + rows.map((row) => row.id).join(','));
        hide();
        if (resp.code === 200) {
            message.success('删除成功');
            return true;
@@ -64,9 +63,10 @@
            return false;
        }
    } catch (error) {
        hide();
        message.error('删除失败,请重试');
        return false;
    } finally {
        hide();
    }
};
@@ -74,15 +74,15 @@
    const hide = message.loading('正在导出');
    try {
        const resp = await Http.doPostBlob('api/role/export');
        const blob = new Blob([resp], {type: 'application/vnd.ms-excel'});
        const blob = new Blob([resp], { type: 'application/vnd.ms-excel' });
        window.location.href = window.URL.createObjectURL(blob);
        hide();
        message.success('导出成功');
        return true;
    } catch (error) {
        hide();
        message.error('导出失败,请重试');
        return false;
    } finally {
        hide();
    }
};