+
),
@@ -114,45 +128,29 @@ export const LayoutConfig: RuntimeConfig['layout'] = () => {
- {/*
-
-
-
-
- }
- >
-
} />
-
-
} /> */}
-
}
onClick={() => history.push('/system/sys_permissions')}
+ /> */}
+
@@ -202,7 +200,6 @@ export const LayoutConfig: RuntimeConfig['layout'] = () => {
const repeatIndex = openKeys
.filter((key) => key !== currentOpenKey)
.findIndex((key) => levelKeys[key] === levelKeys[currentOpenKey]);
-
setStateOpenKeys(
openKeys
// remove repeat key
diff --git a/src/common/libs/umi/requestConfig.ts b/src/common/libs/umi/requestConfig.ts
index 5d48bf6..e3dc680 100644
--- a/src/common/libs/umi/requestConfig.ts
+++ b/src/common/libs/umi/requestConfig.ts
@@ -41,7 +41,9 @@ export const requestConfig: RequestConfig = {
// 错误接收及处理
errorHandler: (error: any) => {
if (error) {
- message.error(error.errorMessage);
+ if (error.errorMessage !== '用户未登录') {
+ message.error(error.errorMessage);
+ }
switch (error.errorCode) {
case 10000:
if (history.location.pathname !== '/login') history.push('/login');
diff --git a/src/common/libs/valtio/actions.ts b/src/common/libs/valtio/actions.ts
index 7f79f47..1d2c4d5 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.current_project = res.data.current_project;
if (res.data?.token?.access_token)
state.storage.access_token = res.data?.token?.access_token;
// 解析apis
diff --git a/src/common/libs/valtio/state.ts b/src/common/libs/valtio/state.ts
index 2ec6308..83c185b 100644
--- a/src/common/libs/valtio/state.ts
+++ b/src/common/libs/valtio/state.ts
@@ -48,6 +48,10 @@ type SessionType = {
permissions?: any;
apiKeys: string[];
loading: number;
+ current_project?: {
+ id: number;
+ name: string;
+ };
};
const session: SessionType = proxy({
@@ -58,6 +62,7 @@ const session: SessionType = proxy({
company_configs: {},
apiKeys: [],
loading: 0,
+ current_project: undefined,
});
export const state = proxy({
diff --git a/src/common/pages/MyLoginPage.tsx b/src/common/pages/MyLoginPage.tsx
index 5dc56c6..6957e8b 100644
--- a/src/common/pages/MyLoginPage.tsx
+++ b/src/common/pages/MyLoginPage.tsx
@@ -59,7 +59,9 @@ export function MyLoginPage() {
...values,
...{ captcha_key: getCaptcha?.key },
})
- .then(async (res) => {
+ .then(async (res: any) => {
+ let pass = btoa(`${res?.password}_01`);
+ sessionStorage.setItem('loginUserInfo', pass);
await stateActions.setLogin(res);
navigate('/');
})
diff --git a/src/components/MyModal.tsx b/src/components/MyModal.tsx
index d9249ae..edf9bed 100644
--- a/src/components/MyModal.tsx
+++ b/src/components/MyModal.tsx
@@ -34,6 +34,7 @@ export function MyModal(props?: any) {
type={props.type || 'primary'}
size={props.size || 'small'}
onClick={() => setOpen(true)}
+ {...props?.modal?.btnProps}
/>
)
) : (
diff --git a/src/gen/ApiTypes.d.ts b/src/gen/ApiTypes.d.ts
index d473266..bfc8b29 100644
--- a/src/gen/ApiTypes.d.ts
+++ b/src/gen/ApiTypes.d.ts
@@ -667,6 +667,156 @@ declare namespace ApiTypes {
};
}
}
+ namespace Attendance {
+ namespace AttendanceConfigs {
+ type List = {
+ "page"?: number; // -
+ "per_page"?: number; // -
+ };
+ type Store = {
+ "asset_projects_id": number; // 项目ID
+ "check_in_range": number; // 打卡范围(米)
+ "require_photo": boolean; // 是否要求拍照打卡
+ "allow_out_range_checkin"?: boolean; // 是否允许范围外打卡
+ };
+ type UpdateConfig = {
+ "id": number; // id
+ "check_in_range": number; // 打卡范围(米)
+ "require_photo": boolean; // 是否要求拍照打卡
+ "allow_out_range_checkin"?: boolean; // 是否允许范围外打卡
+ };
+ type Enable = {
+ "id": number; // id
+ "is_enabled": boolean; // 是否启用: 1:启用 0:禁用
+ };
+ }
+ namespace AttendanceEmployeeTracks {
+ type List = {
+ "company_employees_id"?: number; // 员工ID
+ "asset_projects_id"?: number; // 项目ID
+ "start_date"?: Date; // 开始日期
+ "end_date"?: Date; // 结束日期
+ };
+ type Detail = {
+ "company_employees_id": number; // 员工ID
+ "start_date": Date; // 开始日期
+ "end_date": Date; // 结束日期
+ "asset_projects_id"?: number; // 项目ID
+ };
+ type Heatmap = {
+ "company_employees_id": number; // 员工ID
+ "date": Date; // 日期
+ };
+ }
+ namespace AttendanceRecords {
+ type List = {
+ "company_employees_id"?: number; // 员工ID
+ "asset_projects_id"?: number; // 项目ID
+ "status"?: string; // 状态
+ "checkin_type"?: string; // 打卡类型
+ "checkin_time"?: string[]; // 打卡时间
+ };
+ type Show = {
+ "id": number; // 记录ID
+ };
+ type Export = {
+ "company_employees_id"?: number; // 员工ID
+ "asset_projects_id"?: number; // 项目ID
+ "status"?: string; // 状态
+ "checkin_type"?: string; // 打卡类型
+ "checkin_time"?: string[]; // 打卡时间
+ };
+ }
+ namespace AttendanceSchedules {
+ type List = {
+ "company_employees_id"?: number; // 员工ID
+ "asset_projects_id"?: number; // 项目ID
+ "schedule_date"?: Date; // 排班日期
+ "status"?: string; // 状态,[enum:AttendanceSchedulesStatusEnum]
+ "project_name"?: string; // 项目名称
+ "employee_name"?: string; // -
+ };
+ type Store = {
+ "company_employees_id": number; // 员工ID
+ "attendance_shifts_id": number; // 班次ID
+ "asset_projects_id": number; // 项目ID
+ "schedule_date": Date; // 排班日期
+ "remark"?: string; // 备注
+ };
+ type BatchStore = {
+ "schedules": string[]; // 排班列表
+ };
+ type ShiftList = {
+ "organizations_id": number; // 组织ID
+ "schedule_date": Date; // 排班日期
+ };
+ type Update = {
+ "id": number; // id
+ "company_employees_id"?: number; // 员工ID
+ "attendance_shifts_id"?: number; // 班次ID
+ "asset_projects_id"?: number; // 项目ID
+ "schedule_date"?: Date; // 排班日期
+ "remark"?: string; // 备注
+ };
+ type ChangeStatus = {
+ "id": number; // id
+ "status": string; // 状态,[enum:AttendanceSchedulesStatusEnum]
+ };
+ type Cancel = {
+ "id": number; // id
+ };
+ type Show = {
+ "id": number; // id
+ };
+ type SoftDelete = {
+ "id": number; // id
+ };
+ type Restore = {
+ "id": number; // id
+ };
+ type Delete = {
+ "id": number; // id
+ };
+ }
+ namespace AttendanceShifts {
+ type List = {
+ "name"?: string; // 班次名称
+ "is_enabled"?: boolean; // 状态
+ "asset_projects_id"?: number; // 项目ID
+ "project_name"?: string; // 项目名称
+ };
+ type Store = {
+ "name": string; // 班次名称
+ "asset_projects_id": number; // 关联项目IDs
+ "allow_checkin_start": date_format:H:i:s; // 可打卡开始时间
+ "allow_checkin_end": date_format:H:i:s; // 可打卡结束时间
+ "is_enabled"?: boolean; // 状态
+ "remark"?: string; // 备注
+ "periods": string[]; // 时段列表
+ };
+ type Update = {
+ "id": number; // id
+ "name"?: string; // 班次名称
+ "asset_projects_id"?: number; // 关联项目IDs
+ "allow_checkin_start"?: date_format:H:i:s; // 可打卡开始时间
+ "allow_checkin_end"?: date_format:H:i:s; // 可打卡结束时间
+ "is_enabled"?: boolean; // 状态
+ "remark"?: string; // 备注
+ "periods"?: string[]; // 时段列表
+ };
+ type Show = {
+ "id": number; // id
+ };
+ type Delete = {
+ "id": number; // id
+ };
+ type Select = {
+ "name"?: string; // 班次名称
+ "asset_projects_id"?: number; // 项目ID
+ "project_name"?: string; // 项目名称
+ };
+ }
+ }
namespace Bill {
namespace HouseBills {
type List = {
@@ -790,6 +940,9 @@ declare namespace ApiTypes {
type TemporaryUrl = {
"filename": string; // 文件名称
};
+ type SwitchProject = {
+ "project_id": string; // 项目ID all-查看所有
+ };
}
namespace ConvenienceServices {
type List = {
@@ -1784,6 +1937,10 @@ declare namespace ApiTypes {
};
}
}
+ namespace Statistics {
+ namespace IndexCount {
+ }
+ }
namespace Visitor {
namespace VisitorApplies {
type List = {
diff --git a/src/gen/Apis.ts b/src/gen/Apis.ts
index 2a8fd1b..bbfbda4 100644
--- a/src/gen/Apis.ts
+++ b/src/gen/Apis.ts
@@ -315,6 +315,102 @@ export const Apis = {
},
},
},
+ Attendance: {
+ AttendanceConfigs: {
+ List(data?: ApiTypes.Attendance.AttendanceConfigs.List): Promise
{
+ return request('company/attendance/attendance_configs/list', { data });
+ },
+ Store(data: ApiTypes.Attendance.AttendanceConfigs.Store): Promise {
+ return request('company/attendance/attendance_configs/store', { data });
+ },
+ UpdateConfig(data: ApiTypes.Attendance.AttendanceConfigs.UpdateConfig): Promise {
+ return request('company/attendance/attendance_configs/update_config', { data });
+ },
+ Enable(data: ApiTypes.Attendance.AttendanceConfigs.Enable): Promise {
+ return request('company/attendance/attendance_configs/enable', { data });
+ },
+ },
+ AttendanceEmployeeTracks: {
+ List(data?: ApiTypes.Attendance.AttendanceEmployeeTracks.List): Promise {
+ return request('company/attendance/attendance_employee_tracks/list', { data });
+ },
+ Detail(data: ApiTypes.Attendance.AttendanceEmployeeTracks.Detail): Promise {
+ return request('company/attendance/attendance_employee_tracks/detail', { data });
+ },
+ Heatmap(data: ApiTypes.Attendance.AttendanceEmployeeTracks.Heatmap): Promise {
+ return request('company/attendance/attendance_employee_tracks/heatmap', { data });
+ },
+ Cleanup(): Promise {
+ return request('company/attendance/attendance_employee_tracks/cleanup', {});
+ },
+ },
+ AttendanceRecords: {
+ List(data?: ApiTypes.Attendance.AttendanceRecords.List): Promise {
+ return request('company/attendance/attendance_records/list', { data });
+ },
+ Show(data: ApiTypes.Attendance.AttendanceRecords.Show): Promise {
+ return request('company/attendance/attendance_records/show', { data });
+ },
+ Export(data?: ApiTypes.Attendance.AttendanceRecords.Export): Promise {
+ return request('company/attendance/attendance_records/export', { responseType: 'blob',data });
+ },
+ },
+ AttendanceSchedules: {
+ List(data?: ApiTypes.Attendance.AttendanceSchedules.List): Promise {
+ return request('company/attendance/attendance_schedules/list', { data });
+ },
+ Store(data: ApiTypes.Attendance.AttendanceSchedules.Store): Promise {
+ return request('company/attendance/attendance_schedules/store', { data });
+ },
+ BatchStore(data: ApiTypes.Attendance.AttendanceSchedules.BatchStore): Promise {
+ return request('company/attendance/attendance_schedules/batch_store', { data });
+ },
+ ShiftList(data: ApiTypes.Attendance.AttendanceSchedules.ShiftList): Promise {
+ return request('company/attendance/attendance_schedules/shift_list', { data });
+ },
+ Update(data: ApiTypes.Attendance.AttendanceSchedules.Update): Promise {
+ return request('company/attendance/attendance_schedules/update', { data });
+ },
+ ChangeStatus(data: ApiTypes.Attendance.AttendanceSchedules.ChangeStatus): Promise {
+ return request('company/attendance/attendance_schedules/change_status', { data });
+ },
+ Cancel(data: ApiTypes.Attendance.AttendanceSchedules.Cancel): Promise {
+ return request('company/attendance/attendance_schedules/cancel', { data });
+ },
+ Show(data: ApiTypes.Attendance.AttendanceSchedules.Show): Promise {
+ return request('company/attendance/attendance_schedules/show', { data });
+ },
+ SoftDelete(data: ApiTypes.Attendance.AttendanceSchedules.SoftDelete): Promise {
+ return request('company/attendance/attendance_schedules/soft_delete', { data });
+ },
+ Restore(data: ApiTypes.Attendance.AttendanceSchedules.Restore): Promise {
+ return request('company/attendance/attendance_schedules/restore', { data });
+ },
+ Delete(data: ApiTypes.Attendance.AttendanceSchedules.Delete): Promise {
+ return request('company/attendance/attendance_schedules/delete', { data });
+ },
+ },
+ AttendanceShifts: {
+ List(data?: ApiTypes.Attendance.AttendanceShifts.List): Promise {
+ return request('company/attendance/attendance_shifts/list', { data });
+ },
+ Store(data: ApiTypes.Attendance.AttendanceShifts.Store): Promise {
+ return request('company/attendance/attendance_shifts/store', { data });
+ },
+ Update(data: ApiTypes.Attendance.AttendanceShifts.Update): Promise {
+ return request('company/attendance/attendance_shifts/update', { data });
+ },
+ Show(data: ApiTypes.Attendance.AttendanceShifts.Show): Promise {
+ return request('company/attendance/attendance_shifts/show', { data });
+ },
+ Delete(data: ApiTypes.Attendance.AttendanceShifts.Delete): Promise {
+ return request('company/attendance/attendance_shifts/delete', { data });
+ },
+ Select(data?: ApiTypes.Attendance.AttendanceShifts.Select): Promise {
+ return request('company/attendance/attendance_shifts/select', { data });
+ },
+ },
+ },
Bill: {
HouseBills: {
List(data?: ApiTypes.Bill.HouseBills.List): Promise {
@@ -390,6 +486,12 @@ export const Apis = {
TemporaryUrl(data: ApiTypes.Common.Auth.TemporaryUrl): Promise {
return request('company/common/auth/temporary_url', { data });
},
+ SwitchProject(data: ApiTypes.Common.Auth.SwitchProject): Promise {
+ return request('company/common/auth/switch_project', { data });
+ },
+ GetProjects(): Promise {
+ return request('company/common/auth/get_projects', {});
+ },
},
ConvenienceServices: {
List(data?: ApiTypes.Common.ConvenienceServices.List): Promise {
@@ -1019,6 +1121,13 @@ export const Apis = {
},
},
},
+ Statistics: {
+ IndexCount: {
+ FinancialAnalysis(): Promise {
+ return request('company/statistics/index_count/financial_analysis', {});
+ },
+ },
+ },
Visitor: {
VisitorApplies: {
List(data?: ApiTypes.Visitor.VisitorApplies.List): Promise {
diff --git a/src/gen/Enums.ts b/src/gen/Enums.ts
index 9c33826..4c30dcc 100644
--- a/src/gen/Enums.ts
+++ b/src/gen/Enums.ts
@@ -227,6 +227,37 @@ export const AssetUnitsBuildingTypeEnum= {
'Tower': {"text":"塔楼","color":"#ffc107","value":"Tower"},
};
+// AttendanceRecordsCheckinTypeEnum
+export const AttendanceRecordsCheckinTypeEnum= {
+ 'CheckIn': {"text":"上班","color":"#1890ff","value":"CheckIn"},
+ 'CheckOut': {"text":"下班","color":"#52c41a","value":"CheckOut"},
+};
+
+// AttendanceRecordsStatusEnum
+export const AttendanceRecordsStatusEnum= {
+ 'Normal': {"text":"正常","color":"#52c41a","value":"Normal"},
+ 'Late': {"text":"迟到","color":"#faad14","value":"Late"},
+ 'EarlyLeave': {"text":"早退","color":"#fa8c16","value":"EarlyLeave"},
+ 'OutOfRange': {"text":"范围外","color":"#ff4d4f","value":"OutOfRange"},
+ 'Reissue': {"text":"补卡","color":"#1890ff","value":"Reissue"},
+};
+
+// AttendanceSchedulesStatusEnum
+export const AttendanceSchedulesStatusEnum= {
+ 'Pending': {"text":"待生效","color":"#faad14","value":"Pending"},
+ 'Active': {"text":"生效中","color":"#52c41a","value":"Active"},
+ 'Cancelled': {"text":"已取消","color":"#ff4d4f","value":"Cancelled"},
+};
+
+// 打卡状态枚举
+export const AttendanceStatusEnum= {
+ 'Normal': {"text":"正常","color":"#52c41a","value":"Normal"},
+ 'Late': {"text":"迟到","color":"#faad14","value":"Late"},
+ 'Early': {"text":"早退","color":"#faad14","value":"Early"},
+ 'OutOfRange': {"text":"范围外","color":"#ff4d4f","value":"OutOfRange"},
+ 'MakeUp': {"text":"补卡","color":"#722ed1","value":"MakeUp"},
+};
+
// BannerSpacesTypeEnum
export const BannerSpacesTypeEnum= {
'Popup': {"text":"弹窗","color":"#ff0000","value":"Popup"},
@@ -251,7 +282,7 @@ export const BannersTypeEnum= {
// 缓存类型
export const CacheTypeEnum= {
- 'MobilePhoneVerificationCode': {"text":"手机验证码","color":"#e482d3","value":"MobilePhoneVerificationCode"},
+ 'MobilePhoneVerificationCode': {"text":"手机验证码","color":"#ba2dfa","value":"MobilePhoneVerificationCode"},
};
// CompaniesMerchantTypeEnum
@@ -297,6 +328,13 @@ export const CompanyEmployeeBacklogsTypeEnum= {
'MomentTask': {"text":"朋友圈任务","color":"#FF6600","value":"MomentTask"},
};
+// CompanyEmployeesTypeEnum
+export const CompanyEmployeesTypeEnum= {
+ 'Staff': {"text":"员工","color":"#1890ff","value":"Staff"},
+ 'WeCom': {"text":"企微","color":"#2196f3","value":"WeCom"},
+ 'External': {"text":"外部","color":"#4caf50","value":"External"},
+};
+
// CompanyReceiptAccountsPayChannelEnum
export const CompanyReceiptAccountsPayChannelEnum= {
'WeChat': {"text":"微信","color":"#07c160","value":"WeChat"},
@@ -762,6 +800,12 @@ export const HouseWorkOrdersTypeEnum= {
'Complaint': {"text":"投诉","color":"#aa00ff","value":"Complaint"},
};
+// 公告阅读者类型
+export const MsgPropertyAnnouncementReadsReaderTypeEnum= {
+ 'Customer': {"text":"客户","color":"#3b82f6","value":"Customer"},
+ 'Employee': {"text":"员工","color":"#10b981","value":"Employee"},
+};
+
// 公告接收对象
export const MsgPropertyAnnouncementsObjectEnum= {
'Customer': {"text":"客户","color":"#3b82f6","value":"Customer"},
diff --git a/src/pages/asset/activities/index.tsx b/src/pages/asset/activities/index.tsx
index 9d10779..7b6a87f 100644
--- a/src/pages/asset/activities/index.tsx
+++ b/src/pages/asset/activities/index.tsx
@@ -38,13 +38,7 @@ export default function Index({ title = '项目活动' }) {
// title={title}
/>
),
- enrolls: (
- <>
- {item.is_enroll === 1 && (
-
- )}
- >
- ),
+ enrolls: ,
publish: (
(
-
<>{tableRender(item, action)}>
),
diff --git a/src/pages/asset/activities/modals/EnrollsList.tsx b/src/pages/asset/activities/modals/EnrollsList.tsx
index a408e11..f5d4164 100644
--- a/src/pages/asset/activities/modals/EnrollsList.tsx
+++ b/src/pages/asset/activities/modals/EnrollsList.tsx
@@ -16,6 +16,11 @@ export default function EnrollsList(props: MyBetaModalFormProps) {
title={props.title || '报名'}
type={props.item?.type || 'primary'}
width="800px"
+ modal={{
+ btnProps: {
+ disabled: !props?.item.is_enroll,
+ },
+ }}
node={
(
- {item?.status === HouseRegistersStatusEnum.Pending.value && (
-
- )}
+
),
}),
diff --git a/src/pages/customer/house_registers_audit/modals/Audit.tsx b/src/pages/customer/house_registers_audit/modals/Audit.tsx
index 1530e94..5941f29 100644
--- a/src/pages/customer/house_registers_audit/modals/Audit.tsx
+++ b/src/pages/customer/house_registers_audit/modals/Audit.tsx
@@ -32,7 +32,15 @@ export default function Update(props: MyBetaModalFormProps) {
{...MyModalFormProps.props}
title={props.title}
- trigger={}
+ trigger={
+
+ }
wrapperCol={{ span: 24 }}
width="800px"
modalProps={{
diff --git a/src/pages/customer/list/index.tsx b/src/pages/customer/list/index.tsx
index 035cc47..693bc5b 100644
--- a/src/pages/customer/list/index.tsx
+++ b/src/pages/customer/list/index.tsx
@@ -106,7 +106,7 @@ export default function Index({ title = '客户列表' }) {
search: false,
}),
MyColumns.Option({
- render: (_, item: any, index, action) => (
+ render: (_, item: any, index) => (
({});
+ const config = {
+ data: [
+ {
+ name: '收缴率',
+ 月份: '01',
+ 金额: 79.0,
+ },
+ {
+ name: '月收款(万元)',
+ 月份: '01',
+ 金额: 69.0,
+ },
+ {
+ name: '收缴率',
+ 月份: '02',
+ 金额: 89.0,
+ },
+ {
+ name: '月收款(万元)',
+ 月份: '02',
+ 金额: 62.0,
+ },
+ ],
+ xField: '月份',
+ yField: '金额',
+ colorField: 'name',
+ point: {
+ size: 7,
+ },
+ legend: {
+ position: 'top',
+ },
+ tooltip: {},
+ style: {
+ // 矩形四个方向的内边距
+ inset: 5,
+ },
+
+ // 使用双Y轴,因为两个指标数值范围差异大
+ yAxis: [
+ {
+ title: {
+ text: '月收款(万元)',
+ },
+ },
+ {
+ title: {
+ text: '收缴率(%)',
+ },
+ grid: null,
+ },
+ ],
+ };
+
+ useEffect(() => {
+ setHouseBillsCount({ ...config, data: [] });
+ }, []);
+
+ return (
+
+
+
+ );
+}
diff --git a/src/pages/index/components/LayoutLeft.tsx b/src/pages/index/components/LayoutLeft.tsx
new file mode 100644
index 0000000..0259a68
--- /dev/null
+++ b/src/pages/index/components/LayoutLeft.tsx
@@ -0,0 +1,174 @@
+import { ProCard } from '@ant-design/pro-components';
+import { Col, Row, Space } from 'antd';
+import MyFinancialAnalysisLine from '../charts/FinancialAnalysisLine';
+export default function LayoutLeft() {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+ 下部分内容
+
+
+ );
+}
diff --git a/src/pages/index/components/LayoutRight.tsx b/src/pages/index/components/LayoutRight.tsx
new file mode 100644
index 0000000..58b43ce
--- /dev/null
+++ b/src/pages/index/components/LayoutRight.tsx
@@ -0,0 +1,3 @@
+export default function LayoutRight() {
+ return LayoutRight
;
+}
diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx
index 98f1084..280aa1f 100644
--- a/src/pages/index/index.tsx
+++ b/src/pages/index/index.tsx
@@ -1,5 +1,16 @@
// import MyModalsMapLeaflet from '@/components/ModalsMapLeaflet';
+import LayoutLeft from './components/LayoutLeft';
+import LayoutRight from './components/LayoutRight';
import './style.scss';
export default function Index() {
- return 2
;
+ return (
+
+ );
}
diff --git a/src/pages/index/style.scss b/src/pages/index/style.scss
index a661493..ec03d9a 100644
--- a/src/pages/index/style.scss
+++ b/src/pages/index/style.scss
@@ -6,9 +6,11 @@
justify-content: space-between;
gap: 15px;
}
-.overview_left,
+.overview_left {
+ flex: 3;
+}
.overview_right {
- width: 500px;
+ flex: 1;
}
.overview_center {
flex: 1;
diff --git a/src/pages/meter/readings/modals/CorrectReading.tsx b/src/pages/meter/readings/modals/CorrectReading.tsx
index fdd78bd..35d51b3 100644
--- a/src/pages/meter/readings/modals/CorrectReading.tsx
+++ b/src/pages/meter/readings/modals/CorrectReading.tsx
@@ -197,7 +197,6 @@ export default function Create(props: MyBetaModalFormProps) {
value: 'value',
},
labelRender: (res: any) => {
- console.log(res, '222');
if (res?.label) {
return res?.label;
} else {
diff --git a/src/pages/work_order/list/index.tsx b/src/pages/work_order/list/index.tsx
index d2bb001..c0fe84d 100644
--- a/src/pages/work_order/list/index.tsx
+++ b/src/pages/work_order/list/index.tsx
@@ -16,7 +16,7 @@ import {
} from '@/gen/Enums';
import { ProTable } from '@ant-design/pro-components';
import { useSearchParams } from '@umijs/max';
-import { Space, Tooltip } from 'antd';
+import { Dropdown, Space, Tooltip } from 'antd';
import WorkOrderAssign from './modals/WorkOrderAssign';
import WorkOrderCreate from './modals/WorkOrderCreate';
import WorkOrderShow from './modals/WorkOrderShow';
@@ -52,49 +52,48 @@ export default function Index({ title = '报修报事' }) {
});
};
let tableRender = (item: any, action: any) => {
- return getCurrentPermissions({
- show: ,
- update: (
- <>
- {item.status === 'Pending' && (
-
- )}
- >
- ),
+ let permissions = getCurrentPermissions({
assign: (
- <>
- {item.assign_status === 'Unassigned' &&
- item.type !== 'SecurityInspection' &&
- item.status !== 'Closed' && (
-
- )}
- >
+
),
completed: (
- <>
- {item.status === 'Completed' && item.is_visited === 0 && (
-
- )}
- >
- ),
- delete: (
-
- Apis.WorkOrder.HouseWorkOrders.Delete({
- id: item.id,
- }).then(() => action?.reload())
- }
- />
+
),
});
+
+ let permissionsSpace = getCurrentPermissions({
+ show: {
+ key: '1',
+ label: (
+
+ ),
+ },
+ update: {
+ key: '2',
+ label: (
+
+ ),
+ },
+ delete: {
+ key: '3',
+ label: (
+
+ Apis.WorkOrder.HouseWorkOrders.Delete({
+ id: item.id,
+ }).then(() => action?.reload())
+ }
+ />
+ ),
+ },
+ });
+
+ let Others = (
+
+
+
+ );
+ return [...permissions, ...[Others]];
};
return (
diff --git a/src/pages/work_order/list/modals/WorkOrderAssign.tsx b/src/pages/work_order/list/modals/WorkOrderAssign.tsx
index 97cb4e2..37cc1b7 100644
--- a/src/pages/work_order/list/modals/WorkOrderAssign.tsx
+++ b/src/pages/work_order/list/modals/WorkOrderAssign.tsx
@@ -33,7 +33,15 @@ export default function WorkOrderAssign(
labelCol={{ span: 5 }}
labelAlign="left"
trigger={
-
+
}
key={new Date().getTime()}
form={form}
diff --git a/src/pages/work_order/list/modals/WorkOrderShow.tsx b/src/pages/work_order/list/modals/WorkOrderShow.tsx
index 39c5e63..daec315 100644
--- a/src/pages/work_order/list/modals/WorkOrderShow.tsx
+++ b/src/pages/work_order/list/modals/WorkOrderShow.tsx
@@ -41,7 +41,7 @@ export default function WorkOrderShow({
<>
diff --git a/src/pages/work_order/list/modals/WorkOrderUpdate.tsx b/src/pages/work_order/list/modals/WorkOrderUpdate.tsx
index 76d6949..07dd685 100644
--- a/src/pages/work_order/list/modals/WorkOrderUpdate.tsx
+++ b/src/pages/work_order/list/modals/WorkOrderUpdate.tsx
@@ -27,7 +27,7 @@ export default function WorkOrderUpdate(
width="600px"
layout="horizontal"
key={new Date().getTime()}
- trigger={}
+ trigger={}
onOpenChange={(open: any) => {
if (open && props.item) {
const formValues = {