diff --git a/src/common/libs/valtio/actions.ts b/src/common/libs/valtio/actions.ts index 1d2c4d5..d2cc0bd 100644 --- a/src/common/libs/valtio/actions.ts +++ b/src/common/libs/valtio/actions.ts @@ -17,6 +17,7 @@ export const stateActions = { state.session.campus = res.data.campus; state.session.company_configs = res.data.company_configs; state.session.permissions = res.data.permissions; + state.session.company = res.data.company; state.session.current_project = res.data.current_project; if (res.data?.token?.access_token) state.storage.access_token = res.data?.token?.access_token; diff --git a/src/common/libs/valtio/state.ts b/src/common/libs/valtio/state.ts index 83c185b..a1dbc1b 100644 --- a/src/common/libs/valtio/state.ts +++ b/src/common/libs/valtio/state.ts @@ -35,6 +35,10 @@ type SessionType = { id: number; name: string; }; + company?: { + id?: number; + name?: string; + }; company_configs?: { config_value?: { logo?: { diff --git a/src/pages/company/employees/index.tsx b/src/pages/company/employees/index.tsx index 11bf919..8586d6f 100644 --- a/src/pages/company/employees/index.tsx +++ b/src/pages/company/employees/index.tsx @@ -40,6 +40,24 @@ export default function Index({ title = '员工管理' }) { { + try { + await Apis.Company.CompanyEmployees.SyncWechatEmployees(); + action?.reload?.(); + } catch (error) { + console.error('同步企微信息失败:', error); + } + }} + /> + ), add: ( { @@ -70,6 +69,17 @@ export default function Update(props: MyBetaModalFormProps) { colProps: { span: 24 }, formItemProps: { ...rulesHelper.phone }, }, + { + title: '初始登录密码', + key: 'password', + type: 'password', + // formItemProps: { ...rulesHelper.text }, + tooltip: '必须超6位数,包含数字、大小字母、#-_@&*特殊字符', + colProps: { span: 24 }, + fieldProps: { + placeholder: '必须超6位数,包含数字、大小字母、#-_@&*特殊字符', + }, + }, MyFormItems.EnumRadio({ key: 'sex', title: '性别',