#
luxiaotao1123
2024-02-21 dca78d5fd0c67fd841d6841ef2cd94a10669c356
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();
    }
};
@@ -135,6 +135,7 @@
            valueType: 'text',
            filterDropdown: (props) => <LinkFilter
                name='hostId'
                major='host'
                {...props}
                actionRef={actionRef}
                setSearchParam={setSearchParam}
@@ -221,6 +222,7 @@
                    pagination={{ pageSize: 20 }}
                    search={false}
                    toolbar={{
                        multipleLine: true,
                        search: {
                            onSearch: (value) => {
                                setSearchParam(prevState => ({