#
luxiaotao1123
2024-02-23 9b06b6433dfe4b87e0a4ef506b620062ad44c445
#
1个文件已修改
155 ■■■■ 已修改文件
zy-asrs-flow/src/pages/system/user/index.jsx 155 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/system/user/index.jsx
@@ -686,84 +686,85 @@
                        }}
                    />
                </Col>
                <Edit
                    open={modalVisible}
                    values={currentRow || {}}
                    treeData={deptTreeData}
                    onCancel={
                        () => {
                            setModalVisible(false);
                            setCurrentRow(undefined);
                        }
                    }
                    onSubmit={async (values) => {
                        let ok = false;
                        if (values.id) {
                            ok = await handleUpdate({ ...values })
                        } else {
                            ok = await handleSave({ ...values })
                        }
                        if (ok) {
                            setModalVisible(false);
                            setCurrentRow(undefined);
                            if (actionRef.current) {
                                actionRef.current.reload();
                            }
                        }
                    }
                    }
                />
                <Pwd
                    open={pwdModalVisible}
                    values={currentRow || {}}
                    onCancel={
                        () => {
                            setPwdModalVisible(false);
                            setCurrentRow(undefined);
                        }
                    }
                    onSubmit={async (values) => {
                        let ok = false;
                        if (values.id) {
                            ok = await handlePwd({ ...values })
                        }
                        if (ok) {
                            setPwdModalVisible(false);
                            setCurrentRow(undefined);
                            if (actionRef.current) {
                                actionRef.current.reload();
                            }
                        }
                    }
                    }
                />
                <AssignRole
                    open={assignModalVisible}
                    values={currentRow || {}}
                    onCancel={
                        () => {
                            setAssignModalVisible(false);
                            setCurrentRow(undefined);
                        }
                    }
                    onSubmit={async (values) => {
                        let ok = false;
                        if (values.id) {
                            ok = await handleUpdate({ ...values })
                        }
                        if (ok) {
                            setAssignModalVisible(false);
                            setCurrentRow(undefined);
                            if (actionRef.current) {
                                actionRef.current.reload();
                            }
                        }
                    }}
                />
            </Row>
            <Edit
                open={modalVisible}
                values={currentRow || {}}
                treeData={deptTreeData}
                onCancel={
                    () => {
                        setModalVisible(false);
                        setCurrentRow(undefined);
                    }
                }
                onSubmit={async (values) => {
                    let ok = false;
                    if (values.id) {
                        ok = await handleUpdate({ ...values })
                    } else {
                        ok = await handleSave({ ...values })
                    }
                    if (ok) {
                        setModalVisible(false);
                        setCurrentRow(undefined);
                        if (actionRef.current) {
                            actionRef.current.reload();
                        }
                    }
                }
                }
            />
            <Pwd
                open={pwdModalVisible}
                values={currentRow || {}}
                onCancel={
                    () => {
                        setPwdModalVisible(false);
                        setCurrentRow(undefined);
                    }
                }
                onSubmit={async (values) => {
                    let ok = false;
                    if (values.id) {
                        ok = await handlePwd({ ...values })
                    }
                    if (ok) {
                        setPwdModalVisible(false);
                        setCurrentRow(undefined);
                        if (actionRef.current) {
                            actionRef.current.reload();
                        }
                    }
                }
                }
            />
            <AssignRole
                open={assignModalVisible}
                values={currentRow || {}}
                onCancel={
                    () => {
                        setAssignModalVisible(false);
                        setCurrentRow(undefined);
                    }
                }
                onSubmit={async (values) => {
                    let ok = false;
                    if (values.id) {
                        ok = await handleUpdate({ ...values })
                    }
                    if (ok) {
                        setAssignModalVisible(false);
                        setCurrentRow(undefined);
                        if (actionRef.current) {
                            actionRef.current.reload();
                        }
                    }
                }}
            />
        </PageContainer>
    );
};