Compare commits
No commits in common. "2d9ffcc02d1c1063c445a82d4ca824dd9c3514de" and "a74103f6f6fa9a12402a3a8f7e915ca12bf1f295" have entirely different histories.
2d9ffcc02d
...
a74103f6f6
@ -14,10 +14,12 @@ export default defineConfig({
|
||||
},
|
||||
proxy: {
|
||||
'/api/': {
|
||||
target: 'http://10.39.13.78:8001',
|
||||
// target: 'http://yt:8003',
|
||||
// target: 'http://10.39.13.78:8001/',
|
||||
// target: 'https://test-admin.linyikj.com.cn/',
|
||||
target: 'https://test-admin.linyikj.com.cn/',
|
||||
// target: 'https://admin.linyikj.com.cn/',
|
||||
// target: 'http://k369a3d6.natappfree.cc/',
|
||||
|
||||
changeOrigin: true,
|
||||
pathRewrite: { '^': '' },
|
||||
},
|
||||
|
||||
242
src/gen/ApiTypes.d.ts
vendored
242
src/gen/ApiTypes.d.ts
vendored
@ -660,13 +660,11 @@ declare namespace ApiTypes {
|
||||
type Store = {
|
||||
"name": string; // 岗位名称
|
||||
"is_use"?: number; // 是否启用,1启用,0禁用
|
||||
"remark"?: string; // 备注
|
||||
};
|
||||
type Update = {
|
||||
"id": number; // id
|
||||
"name": string; // 岗位名称
|
||||
"is_use"?: number; // 是否启用,1启用,0禁用
|
||||
"remark"?: string; // 备注
|
||||
};
|
||||
type Show = {
|
||||
"id": number; // id
|
||||
@ -750,9 +748,7 @@ declare namespace ApiTypes {
|
||||
}
|
||||
namespace CompanyApps {
|
||||
type List = {
|
||||
"id"?: number; // id
|
||||
"name"?: string; // 模糊搜索:名称
|
||||
"companies_id": number; // 机构id,[ref:companies]
|
||||
};
|
||||
type Store = {
|
||||
"companies_id": number; // 机构id,[ref:companies]
|
||||
@ -776,33 +772,6 @@ declare namespace ApiTypes {
|
||||
"id": number; // id
|
||||
};
|
||||
}
|
||||
namespace CompanyConfigs {
|
||||
type List = {
|
||||
"companies_id"?: number; // 机构IDid,[ref:companies]
|
||||
"config_key"?: string; // 模糊搜索:名称
|
||||
};
|
||||
type Store = {
|
||||
"companies_id": number; // 机构IDid,[ref:companies]
|
||||
"config_key": string; // 机构配置键,[enum:CompanyConfigsConfigKeyEnum]
|
||||
"config_value": string[]; // 机构配置值
|
||||
};
|
||||
type Update = {
|
||||
"id": number; // id
|
||||
"companies_id": number; // 机构IDid,[ref:companies]
|
||||
"config_key": string; // 机构配置键,[enum:CompanyConfigsConfigKeyEnum]
|
||||
"config_value": string[]; // 机构配置值
|
||||
};
|
||||
type GetDetail = {
|
||||
"companies_id": number; // 机构IDid,[ref:companies]
|
||||
"config_key": string; // 机构配置键,[enum:CompanyConfigsConfigKeyEnum]
|
||||
};
|
||||
type Show = {
|
||||
"id": number; // id
|
||||
};
|
||||
type Delete = {
|
||||
"id": number; // id
|
||||
};
|
||||
}
|
||||
namespace CompanyEmployees {
|
||||
type List = {
|
||||
"companies_id"?: number; // 机构ID
|
||||
@ -819,7 +788,6 @@ declare namespace ApiTypes {
|
||||
"positions_id"?: number; // 岗位id,[ref:company_positions]
|
||||
"sex"?: string; // 性别,[enum:SexEnum]
|
||||
"remark"?: string; // 备注
|
||||
"is_company_admin"?: boolean; // 是否机构管理员
|
||||
};
|
||||
type Update = {
|
||||
"id": number; // id
|
||||
@ -830,7 +798,6 @@ declare namespace ApiTypes {
|
||||
"positions_id"?: number; // 岗位id,[ref:company_positions]
|
||||
"sex"?: string; // 性别,[enum:SexEnum]
|
||||
"remark"?: string; // 备注
|
||||
"is_company_admin"?: boolean; // 是否机构管理员
|
||||
};
|
||||
type Show = {
|
||||
"id": number; // id
|
||||
@ -853,15 +820,6 @@ declare namespace ApiTypes {
|
||||
"upload_file": mimes:xlsx,xls; // 上传文件
|
||||
};
|
||||
}
|
||||
namespace CompanyPermissions {
|
||||
type GetPermissions = {
|
||||
"companies_id": number; // 机构ID
|
||||
};
|
||||
type SetPermissions = {
|
||||
"companies_id": number; // 机构ID
|
||||
"permissions_ids": string[]; // 菜单权限ID列表
|
||||
};
|
||||
}
|
||||
namespace CompanyPositions {
|
||||
type List = {
|
||||
"companies_id"?: number; // 机构ID
|
||||
@ -955,33 +913,6 @@ declare namespace ApiTypes {
|
||||
"company_name"?: string; // 模糊搜索:机构名称
|
||||
};
|
||||
}
|
||||
namespace CompanyQuickActions {
|
||||
type List = {
|
||||
"name"?: string; // 模糊搜索:名称
|
||||
};
|
||||
type Store = {
|
||||
"companies_id": number; // 机构IDid,[ref:companies]
|
||||
"name": string; // 名称
|
||||
"icon": string[]; // 图标
|
||||
"sort"?: number; // 排序:越小越靠前
|
||||
};
|
||||
type BatchStore = {
|
||||
"companies_id": number; // 机构IDid,[ref:companies]
|
||||
};
|
||||
type Update = {
|
||||
"id": number; // id
|
||||
"companies_id": number; // 机构IDid,[ref:companies]
|
||||
"name": string; // 名称
|
||||
"icon": string[]; // 图标
|
||||
"sort"?: number; // 排序:越小越靠前
|
||||
};
|
||||
type Show = {
|
||||
"id": number; // id
|
||||
};
|
||||
type Delete = {
|
||||
"id": number; // id
|
||||
};
|
||||
}
|
||||
namespace CompanyReceiptAccounts {
|
||||
type List = {
|
||||
"company_name"?: string; // 模糊搜索:名称
|
||||
@ -1203,9 +1134,6 @@ declare namespace ApiTypes {
|
||||
type List = {
|
||||
"name"?: string; // 模糊搜索:名称
|
||||
"asset_projects_id"?: number; // 所属项目id,[ref:asset_projects]
|
||||
"project_name"?: string; // 项目名称
|
||||
"companies_id"?: number; // 所属机构id,[ref:companies]
|
||||
"company_name"?: string; // 机构名称
|
||||
};
|
||||
type Store = {
|
||||
"asset_projects_id": number; // 所属项目id,[ref:asset_projects]
|
||||
@ -1394,44 +1322,6 @@ declare namespace ApiTypes {
|
||||
"id": number; // id
|
||||
};
|
||||
}
|
||||
namespace HouseOrderRefunds {
|
||||
type List = {
|
||||
"house_orders_id"?: number; // 订单id
|
||||
"refund_status"?: string; // 退款状态
|
||||
"payment_method"?: string; // 支付方式
|
||||
"refund_no"?: string; // 退款编号
|
||||
"apply_employees_id"?: number; // 申请员工id
|
||||
"date_range"?: string[]; // 日期范围 [start_date, end_date]
|
||||
};
|
||||
type Store = {
|
||||
"house_orders_id": number; // 房屋物业费账单id,[ref:house_orders]
|
||||
"refund_amount": number; // 退款金额(元,前端提交)
|
||||
"refund_reason"?: string; // 退款原因
|
||||
};
|
||||
type Update = {
|
||||
"id": number; // id
|
||||
"house_orders_id": number; // 房屋物业费账单id,[ref:house_orders]
|
||||
"refund_amount": number; // 退款金额(元,前端提交)
|
||||
"refund_reason"?: string; // 退款原因
|
||||
};
|
||||
type Show = {
|
||||
"id": number; // id
|
||||
};
|
||||
type Audit = {
|
||||
"id": number; // 退款记录id
|
||||
"approved": boolean; // 是否通过审核
|
||||
"audit_remark"?: string; // 审核备注
|
||||
};
|
||||
type SoftDelete = {
|
||||
"id": number; // id
|
||||
};
|
||||
type Restore = {
|
||||
"id": number; // id
|
||||
};
|
||||
type Delete = {
|
||||
"id": number; // id
|
||||
};
|
||||
}
|
||||
namespace HouseOrders {
|
||||
type List = {
|
||||
"id"?: number; // id
|
||||
@ -1453,31 +1343,6 @@ declare namespace ApiTypes {
|
||||
"id": number; // id
|
||||
};
|
||||
}
|
||||
namespace HousePrepaymentLogs {
|
||||
type List = {
|
||||
"house_prepayments_id"?: number; // 房屋预付缴费id,[ref:house_prepayments]
|
||||
"asset_houses_id"?: number; // 房屋id,[ref:asset_houses]
|
||||
"house_prepayment_payments_id"?: number; // 房屋预付缴费支付记录id,[ref:house_prepayment_payments]
|
||||
"full_name"?: string; // 房屋名称
|
||||
};
|
||||
type Deduct = {
|
||||
"asset_houses_id": number; // 房屋id,[ref:asset_houses]
|
||||
"bills_id": string[]; // 账单id,[ref:house_bills]
|
||||
"amount": number; // 扣款金额
|
||||
};
|
||||
type Show = {
|
||||
"id": number; // id
|
||||
};
|
||||
type SoftDelete = {
|
||||
"id": number; // id
|
||||
};
|
||||
type Restore = {
|
||||
"id": number; // id
|
||||
};
|
||||
type Delete = {
|
||||
"id": number; // id
|
||||
};
|
||||
}
|
||||
namespace HousePrepaymentPayments {
|
||||
type List = {
|
||||
"house_prepayments_id"?: number; // 房屋预付id,[ref:house_prepayments]
|
||||
@ -1491,45 +1356,6 @@ declare namespace ApiTypes {
|
||||
"id": number; // id
|
||||
};
|
||||
}
|
||||
namespace HousePrepaymentRefunds {
|
||||
type List = {
|
||||
"house_prepayments_id"?: number; // 预缴id
|
||||
"house_prepayment_payments_id"?: number; // 预缴支付id
|
||||
"refund_status"?: string; // 退款状态
|
||||
"payment_method"?: string; // 支付方式
|
||||
"refund_no"?: string; // 退款编号
|
||||
"apply_employees_id"?: number; // 申请员工id
|
||||
"date_range"?: string[]; // 日期范围 [start_date, end_date]
|
||||
};
|
||||
type Store = {
|
||||
"house_prepayment_payments_id": number; // 房屋预缴支付记录id,[ref:house_prepayment_payments]
|
||||
"refund_amount": number; // 退款金额(元,前端提交)
|
||||
"refund_reason"?: string; // 退款原因
|
||||
};
|
||||
type Update = {
|
||||
"id": number; // id
|
||||
"house_prepayments_id": number; // 房屋预缴id,[ref:house_prepayments]
|
||||
"refund_amount": number; // 退款金额(元,前端提交)
|
||||
"refund_reason"?: string; // 退款原因
|
||||
};
|
||||
type Show = {
|
||||
"id": number; // id
|
||||
};
|
||||
type Audit = {
|
||||
"id": number; // 退款记录id
|
||||
"approved": boolean; // 是否通过审核
|
||||
"audit_remark"?: string; // 审核备注
|
||||
};
|
||||
type SoftDelete = {
|
||||
"id": number; // id
|
||||
};
|
||||
type Restore = {
|
||||
"id": number; // id
|
||||
};
|
||||
type Delete = {
|
||||
"id": number; // id
|
||||
};
|
||||
}
|
||||
namespace HousePrepayments {
|
||||
type List = {
|
||||
"full_name"?: string; // 模糊搜索:房屋名称
|
||||
@ -1830,70 +1656,9 @@ declare namespace ApiTypes {
|
||||
"id": number; // id
|
||||
};
|
||||
}
|
||||
namespace HouseWorkOrderPayments {
|
||||
type List = {
|
||||
"name"?: string; // 模糊搜索:名称
|
||||
};
|
||||
type Store = {
|
||||
"house_work_orders_id": number; // 工单id,[ref:house_work_orders]
|
||||
"amount": number; // 金额(单位分)
|
||||
"actual_amount"?: number; // 实际支付金额(单位分)
|
||||
"payment_method": string; // 支付方式,[enum:HouseOrdersPaymentMethodEnum]
|
||||
"payment_status"?: string; // 支付状态,[enum:HouseOrdersOrderStatusEnum]
|
||||
"paid_time"?: Date; // 支付时间
|
||||
"payment_no"?: string; // 支付发起单号
|
||||
"transaction_id"?: string; // 交易号(微信、支付宝的单号)
|
||||
"third_trade_no"?: string; // 第三方交易号(如通联、乐刷)
|
||||
"bank_type"?: string; // 银行类型
|
||||
"notify_json"?: string[]; // 回调通知参数
|
||||
"receipt_account": string[]; // 收款账号信息
|
||||
"asset_houses_id"?: number; // 资产房屋id,[ref:asset_houses]
|
||||
"asset_units_id"?: number; // 资产单元id,[ref:asset_units]
|
||||
"asset_buildings_id"?: number; // 资产楼栋id,[ref:asset_buildings]
|
||||
"asset_projects_id": number; // 资产项目id,[ref:asset_projects]
|
||||
"companies_id": number; // 公司id,[ref:companies]
|
||||
"customers_id"?: number; // 客户[ref:customers]
|
||||
"phone"?: string; // 手机号
|
||||
"openid"?: string; // 付款人的openid
|
||||
};
|
||||
type Update = {
|
||||
"id": number; // id
|
||||
"house_work_orders_id": number; // 工单id,[ref:house_work_orders]
|
||||
"amount": number; // 金额(单位分)
|
||||
"actual_amount"?: number; // 实际支付金额(单位分)
|
||||
"payment_method": string; // 支付方式,[enum:HouseOrdersPaymentMethodEnum]
|
||||
"payment_status"?: string; // 支付状态,[enum:HouseOrdersOrderStatusEnum]
|
||||
"paid_time"?: Date; // 支付时间
|
||||
"payment_no"?: string; // 支付发起单号
|
||||
"transaction_id"?: string; // 交易号(微信、支付宝的单号)
|
||||
"third_trade_no"?: string; // 第三方交易号(如通联、乐刷)
|
||||
"bank_type"?: string; // 银行类型
|
||||
"notify_json"?: string[]; // 回调通知参数
|
||||
"receipt_account": string[]; // 收款账号信息
|
||||
"asset_houses_id"?: number; // 资产房屋id,[ref:asset_houses]
|
||||
"asset_units_id"?: number; // 资产单元id,[ref:asset_units]
|
||||
"asset_buildings_id"?: number; // 资产楼栋id,[ref:asset_buildings]
|
||||
"asset_projects_id": number; // 资产项目id,[ref:asset_projects]
|
||||
"companies_id": number; // 公司id,[ref:companies]
|
||||
"customers_id"?: number; // 客户[ref:customers]
|
||||
"phone"?: string; // 手机号
|
||||
"openid"?: string; // 付款人的openid
|
||||
};
|
||||
type Show = {
|
||||
"id": number; // id
|
||||
};
|
||||
type SoftDelete = {
|
||||
"id": number; // id
|
||||
};
|
||||
type Restore = {
|
||||
"id": number; // id
|
||||
};
|
||||
type Delete = {
|
||||
"id": number; // id
|
||||
};
|
||||
}
|
||||
namespace HouseWorkOrders {
|
||||
type List = {
|
||||
"title"?: string; // 模糊搜索:名称
|
||||
"house_name"?: string; // 模糊搜索:房屋名称
|
||||
"type"?: string[]; // 工单类型,[enum:HouseWorkOrdersTypeEnum]
|
||||
"level"?: string; // 工单优先级,[enum:HouseWorkOrdersLevelEnum]
|
||||
@ -1936,11 +1701,6 @@ declare namespace ApiTypes {
|
||||
"predict_complete_at"?: Date; // 预计完成时间
|
||||
"level"?: string; // 优先级,[enum:HouseWorkOrdersLevelEnum]
|
||||
};
|
||||
type Visited = {
|
||||
"id": number; // id
|
||||
"visited_remark"?: string; // 访问说明
|
||||
"visited_attachment"?: string[]; // 访问附件
|
||||
};
|
||||
type SoftDelete = {
|
||||
"id": number; // id
|
||||
};
|
||||
|
||||
151
src/gen/Apis.ts
151
src/gen/Apis.ts
@ -435,7 +435,7 @@ export const Apis = {
|
||||
},
|
||||
},
|
||||
CompanyApps: {
|
||||
List(data: ApiTypes.Company.CompanyApps.List): Promise<MyResponseType> {
|
||||
List(data?: ApiTypes.Company.CompanyApps.List): Promise<MyResponseType> {
|
||||
return request('admin/company/company_apps/list', { data });
|
||||
},
|
||||
Store(data: ApiTypes.Company.CompanyApps.Store): Promise<MyResponseType> {
|
||||
@ -451,26 +451,6 @@ export const Apis = {
|
||||
return request('admin/company/company_apps/delete', { data });
|
||||
},
|
||||
},
|
||||
CompanyConfigs: {
|
||||
List(data?: ApiTypes.Company.CompanyConfigs.List): Promise<MyResponseType> {
|
||||
return request('admin/company/company_configs/list', { data });
|
||||
},
|
||||
Store(data: ApiTypes.Company.CompanyConfigs.Store): Promise<MyResponseType> {
|
||||
return request('admin/company/company_configs/store', { data });
|
||||
},
|
||||
Update(data: ApiTypes.Company.CompanyConfigs.Update): Promise<MyResponseType> {
|
||||
return request('admin/company/company_configs/update', { data });
|
||||
},
|
||||
GetDetail(data: ApiTypes.Company.CompanyConfigs.GetDetail): Promise<MyResponseType> {
|
||||
return request('admin/company/company_configs/get_detail', { data });
|
||||
},
|
||||
Show(data: ApiTypes.Company.CompanyConfigs.Show): Promise<MyResponseType> {
|
||||
return request('admin/company/company_configs/show', { data });
|
||||
},
|
||||
Delete(data: ApiTypes.Company.CompanyConfigs.Delete): Promise<MyResponseType> {
|
||||
return request('admin/company/company_configs/delete', { data });
|
||||
},
|
||||
},
|
||||
CompanyEmployees: {
|
||||
List(data?: ApiTypes.Company.CompanyEmployees.List): Promise<MyResponseType> {
|
||||
return request('admin/company/company_employees/list', { data });
|
||||
@ -503,17 +483,6 @@ export const Apis = {
|
||||
return request('admin/company/company_employees/download_template', {responseType: 'blob',});
|
||||
},
|
||||
},
|
||||
CompanyPermissions: {
|
||||
GetPermissions(data: ApiTypes.Company.CompanyPermissions.GetPermissions): Promise<MyResponseType> {
|
||||
return request('admin/company/company_permissions/get_permissions', { data });
|
||||
},
|
||||
SetPermissions(data: ApiTypes.Company.CompanyPermissions.SetPermissions): Promise<MyResponseType> {
|
||||
return request('admin/company/company_permissions/set_permissions', { data });
|
||||
},
|
||||
PermissionTree(): Promise<MyResponseType> {
|
||||
return request('admin/company/company_permissions/permission_tree', {});
|
||||
},
|
||||
},
|
||||
CompanyPositions: {
|
||||
List(data?: ApiTypes.Company.CompanyPositions.List): Promise<MyResponseType> {
|
||||
return request('admin/company/company_positions/list', { data });
|
||||
@ -577,26 +546,6 @@ export const Apis = {
|
||||
return request('admin/company/company_property_brands/select', { data });
|
||||
},
|
||||
},
|
||||
CompanyQuickActions: {
|
||||
List(data?: ApiTypes.Company.CompanyQuickActions.List): Promise<MyResponseType> {
|
||||
return request('admin/company/company_quick_actions/list', { data });
|
||||
},
|
||||
Store(data: ApiTypes.Company.CompanyQuickActions.Store): Promise<MyResponseType> {
|
||||
return request('admin/company/company_quick_actions/store', { data });
|
||||
},
|
||||
BatchStore(data: ApiTypes.Company.CompanyQuickActions.BatchStore): Promise<MyResponseType> {
|
||||
return request('admin/company/company_quick_actions/batch_store', { data });
|
||||
},
|
||||
Update(data: ApiTypes.Company.CompanyQuickActions.Update): Promise<MyResponseType> {
|
||||
return request('admin/company/company_quick_actions/update', { data });
|
||||
},
|
||||
Show(data: ApiTypes.Company.CompanyQuickActions.Show): Promise<MyResponseType> {
|
||||
return request('admin/company/company_quick_actions/show', { data });
|
||||
},
|
||||
Delete(data: ApiTypes.Company.CompanyQuickActions.Delete): Promise<MyResponseType> {
|
||||
return request('admin/company/company_quick_actions/delete', { data });
|
||||
},
|
||||
},
|
||||
CompanyReceiptAccounts: {
|
||||
List(data?: ApiTypes.Company.CompanyReceiptAccounts.List): Promise<MyResponseType> {
|
||||
return request('admin/company/company_receipt_accounts/list', { data });
|
||||
@ -834,32 +783,6 @@ export const Apis = {
|
||||
return request('admin/house_order/house_order_payments/delete', { data });
|
||||
},
|
||||
},
|
||||
HouseOrderRefunds: {
|
||||
List(data?: ApiTypes.HouseOrder.HouseOrderRefunds.List): Promise<MyResponseType> {
|
||||
return request('admin/house_order/house_order_refunds/list', { data });
|
||||
},
|
||||
Store(data: ApiTypes.HouseOrder.HouseOrderRefunds.Store): Promise<MyResponseType> {
|
||||
return request('admin/house_order/house_order_refunds/store', { data });
|
||||
},
|
||||
Update(data: ApiTypes.HouseOrder.HouseOrderRefunds.Update): Promise<MyResponseType> {
|
||||
return request('admin/house_order/house_order_refunds/update', { data });
|
||||
},
|
||||
Show(data: ApiTypes.HouseOrder.HouseOrderRefunds.Show): Promise<MyResponseType> {
|
||||
return request('admin/house_order/house_order_refunds/show', { data });
|
||||
},
|
||||
Audit(data: ApiTypes.HouseOrder.HouseOrderRefunds.Audit): Promise<MyResponseType> {
|
||||
return request('admin/house_order/house_order_refunds/audit', { data });
|
||||
},
|
||||
SoftDelete(data: ApiTypes.HouseOrder.HouseOrderRefunds.SoftDelete): Promise<MyResponseType> {
|
||||
return request('admin/house_order/house_order_refunds/soft_delete', { data });
|
||||
},
|
||||
Restore(data: ApiTypes.HouseOrder.HouseOrderRefunds.Restore): Promise<MyResponseType> {
|
||||
return request('admin/house_order/house_order_refunds/restore', { data });
|
||||
},
|
||||
Delete(data: ApiTypes.HouseOrder.HouseOrderRefunds.Delete): Promise<MyResponseType> {
|
||||
return request('admin/house_order/house_order_refunds/delete', { data });
|
||||
},
|
||||
},
|
||||
HouseOrders: {
|
||||
List(data?: ApiTypes.HouseOrder.HouseOrders.List): Promise<MyResponseType> {
|
||||
return request('admin/house_order/house_orders/list', { data });
|
||||
@ -877,26 +800,6 @@ export const Apis = {
|
||||
return request('admin/house_order/house_orders/delete', { data });
|
||||
},
|
||||
},
|
||||
HousePrepaymentLogs: {
|
||||
List(data?: ApiTypes.HouseOrder.HousePrepaymentLogs.List): Promise<MyResponseType> {
|
||||
return request('admin/house_order/house_prepayment_logs/list', { data });
|
||||
},
|
||||
Deduct(data: ApiTypes.HouseOrder.HousePrepaymentLogs.Deduct): Promise<MyResponseType> {
|
||||
return request('admin/house_order/house_prepayment_logs/deduct', { data });
|
||||
},
|
||||
Show(data: ApiTypes.HouseOrder.HousePrepaymentLogs.Show): Promise<MyResponseType> {
|
||||
return request('admin/house_order/house_prepayment_logs/show', { data });
|
||||
},
|
||||
SoftDelete(data: ApiTypes.HouseOrder.HousePrepaymentLogs.SoftDelete): Promise<MyResponseType> {
|
||||
return request('admin/house_order/house_prepayment_logs/soft_delete', { data });
|
||||
},
|
||||
Restore(data: ApiTypes.HouseOrder.HousePrepaymentLogs.Restore): Promise<MyResponseType> {
|
||||
return request('admin/house_order/house_prepayment_logs/restore', { data });
|
||||
},
|
||||
Delete(data: ApiTypes.HouseOrder.HousePrepaymentLogs.Delete): Promise<MyResponseType> {
|
||||
return request('admin/house_order/house_prepayment_logs/delete', { data });
|
||||
},
|
||||
},
|
||||
HousePrepaymentPayments: {
|
||||
List(data?: ApiTypes.HouseOrder.HousePrepaymentPayments.List): Promise<MyResponseType> {
|
||||
return request('admin/house_order/house_prepayment_payments/list', { data });
|
||||
@ -908,32 +811,6 @@ export const Apis = {
|
||||
return request('admin/house_order/house_prepayment_payments/delete', { data });
|
||||
},
|
||||
},
|
||||
HousePrepaymentRefunds: {
|
||||
List(data?: ApiTypes.HouseOrder.HousePrepaymentRefunds.List): Promise<MyResponseType> {
|
||||
return request('admin/house_order/house_prepayment_refunds/list', { data });
|
||||
},
|
||||
Store(data: ApiTypes.HouseOrder.HousePrepaymentRefunds.Store): Promise<MyResponseType> {
|
||||
return request('admin/house_order/house_prepayment_refunds/store', { data });
|
||||
},
|
||||
Update(data: ApiTypes.HouseOrder.HousePrepaymentRefunds.Update): Promise<MyResponseType> {
|
||||
return request('admin/house_order/house_prepayment_refunds/update', { data });
|
||||
},
|
||||
Show(data: ApiTypes.HouseOrder.HousePrepaymentRefunds.Show): Promise<MyResponseType> {
|
||||
return request('admin/house_order/house_prepayment_refunds/show', { data });
|
||||
},
|
||||
Audit(data: ApiTypes.HouseOrder.HousePrepaymentRefunds.Audit): Promise<MyResponseType> {
|
||||
return request('admin/house_order/house_prepayment_refunds/audit', { data });
|
||||
},
|
||||
SoftDelete(data: ApiTypes.HouseOrder.HousePrepaymentRefunds.SoftDelete): Promise<MyResponseType> {
|
||||
return request('admin/house_order/house_prepayment_refunds/soft_delete', { data });
|
||||
},
|
||||
Restore(data: ApiTypes.HouseOrder.HousePrepaymentRefunds.Restore): Promise<MyResponseType> {
|
||||
return request('admin/house_order/house_prepayment_refunds/restore', { data });
|
||||
},
|
||||
Delete(data: ApiTypes.HouseOrder.HousePrepaymentRefunds.Delete): Promise<MyResponseType> {
|
||||
return request('admin/house_order/house_prepayment_refunds/delete', { data });
|
||||
},
|
||||
},
|
||||
HousePrepayments: {
|
||||
List(data?: ApiTypes.HouseOrder.HousePrepayments.List): Promise<MyResponseType> {
|
||||
return request('admin/house_order/house_prepayments/list', { data });
|
||||
@ -1148,29 +1025,6 @@ export const Apis = {
|
||||
return request('admin/work_order/house_work_logs/delete', { data });
|
||||
},
|
||||
},
|
||||
HouseWorkOrderPayments: {
|
||||
List(data?: ApiTypes.WorkOrder.HouseWorkOrderPayments.List): Promise<MyResponseType> {
|
||||
return request('admin/work_order/house_work_order_payments/list', { data });
|
||||
},
|
||||
Store(data: ApiTypes.WorkOrder.HouseWorkOrderPayments.Store): Promise<MyResponseType> {
|
||||
return request('admin/work_order/house_work_order_payments/store', { data });
|
||||
},
|
||||
Update(data: ApiTypes.WorkOrder.HouseWorkOrderPayments.Update): Promise<MyResponseType> {
|
||||
return request('admin/work_order/house_work_order_payments/update', { data });
|
||||
},
|
||||
Show(data: ApiTypes.WorkOrder.HouseWorkOrderPayments.Show): Promise<MyResponseType> {
|
||||
return request('admin/work_order/house_work_order_payments/show', { data });
|
||||
},
|
||||
SoftDelete(data: ApiTypes.WorkOrder.HouseWorkOrderPayments.SoftDelete): Promise<MyResponseType> {
|
||||
return request('admin/work_order/house_work_order_payments/soft_delete', { data });
|
||||
},
|
||||
Restore(data: ApiTypes.WorkOrder.HouseWorkOrderPayments.Restore): Promise<MyResponseType> {
|
||||
return request('admin/work_order/house_work_order_payments/restore', { data });
|
||||
},
|
||||
Delete(data: ApiTypes.WorkOrder.HouseWorkOrderPayments.Delete): Promise<MyResponseType> {
|
||||
return request('admin/work_order/house_work_order_payments/delete', { data });
|
||||
},
|
||||
},
|
||||
HouseWorkOrders: {
|
||||
List(data?: ApiTypes.WorkOrder.HouseWorkOrders.List): Promise<MyResponseType> {
|
||||
return request('admin/work_order/house_work_orders/list', { data });
|
||||
@ -1187,9 +1041,6 @@ export const Apis = {
|
||||
Assign(data: ApiTypes.WorkOrder.HouseWorkOrders.Assign): Promise<MyResponseType> {
|
||||
return request('admin/work_order/house_work_orders/assign', { data });
|
||||
},
|
||||
Visited(data: ApiTypes.WorkOrder.HouseWorkOrders.Visited): Promise<MyResponseType> {
|
||||
return request('admin/work_order/house_work_orders/visited', { data });
|
||||
},
|
||||
SoftDelete(data: ApiTypes.WorkOrder.HouseWorkOrders.SoftDelete): Promise<MyResponseType> {
|
||||
return request('admin/work_order/house_work_orders/soft_delete', { data });
|
||||
},
|
||||
|
||||
@ -154,7 +154,7 @@ export const BannersTypeEnum= {
|
||||
|
||||
// 缓存类型
|
||||
export const CacheTypeEnum= {
|
||||
'MobilePhoneVerificationCode': {"text":"手机验证码","color":"#c639cc","value":"MobilePhoneVerificationCode"},
|
||||
'MobilePhoneVerificationCode': {"text":"手机验证码","color":"#ad9561","value":"MobilePhoneVerificationCode"},
|
||||
};
|
||||
|
||||
// CompaniesMerchantTypeEnum
|
||||
@ -182,11 +182,6 @@ export const CompanyAppsWorkTypeEnum= {
|
||||
'WorkWechat': {"text":"企微","color":"#0091ea","value":"WorkWechat"},
|
||||
};
|
||||
|
||||
// CompanyConfigsConfigKeyEnum
|
||||
export const CompanyConfigsConfigKeyEnum= {
|
||||
'Theme': {"text":"主题色","color":"#3b82f6","value":"Theme"},
|
||||
};
|
||||
|
||||
// CompanyEmployeeBacklogsStatusEnum
|
||||
export const CompanyEmployeeBacklogsStatusEnum= {
|
||||
'Pending': {"text":"待办","color":"#FF6600","value":"Pending"},
|
||||
@ -476,16 +471,6 @@ export const HouseOccupantsStatusEnum= {
|
||||
'Unbound': {"text":"解绑","color":"#f5222d","value":"Unbound"},
|
||||
};
|
||||
|
||||
// HouseOrderRefundsRefundStatusEnum
|
||||
export const HouseOrderRefundsRefundStatusEnum= {
|
||||
'Requested': {"text":"已申请","color":"#2196f3","value":"Requested"},
|
||||
'Reviewing': {"text":"审核中","color":"#ff9800","value":"Reviewing"},
|
||||
'Rejected': {"text":"已拒绝","color":"#f44336","value":"Rejected"},
|
||||
'Processing': {"text":"退款中","color":"#9c27b0","value":"Processing"},
|
||||
'Refunded': {"text":"已退款","color":"#4caf50","value":"Refunded"},
|
||||
'Failed': {"text":"退款失败","color":"#e91e63","value":"Failed"},
|
||||
};
|
||||
|
||||
// 订单状态枚举
|
||||
export const HouseOrdersOrderStatusEnum= {
|
||||
'Pending': {"text":"待支付","color":"#facc15","value":"Pending"},
|
||||
@ -502,8 +487,6 @@ export const HouseOrdersPaymentMethodEnum= {
|
||||
'BankTransfer': {"text":"银行转账","color":"#6c757d","value":"BankTransfer"},
|
||||
'TongLian': {"text":"通联支付","color":"#ff9f0a","value":"TongLian"},
|
||||
'Prepayment': {"text":"预缴支付","color":"#f59e0b","value":"Prepayment"},
|
||||
'POS': {"text":"POS机","color":"#8b5cf6","value":"POS"},
|
||||
'Cash': {"text":"现金","color":"#dc2626","value":"Cash"},
|
||||
};
|
||||
|
||||
// HousePrepaymentLogsTypeEnum
|
||||
@ -561,12 +544,6 @@ export const HouseRegistersUsagePlanEnum= {
|
||||
'Commercial': {"text":"商用","color":"#f5222d","value":"Commercial"},
|
||||
};
|
||||
|
||||
// HouseWorkOrdersAcceptResultEnum
|
||||
export const HouseWorkOrdersAcceptResultEnum= {
|
||||
'Satisfied': {"text":"满意","color":"#28A745","value":"Satisfied"},
|
||||
'Unsatisfied': {"text":"不满意","color":"#DC3545","value":"Unsatisfied"},
|
||||
};
|
||||
|
||||
// HouseWorkOrdersAssignStatusEnum
|
||||
export const HouseWorkOrdersAssignStatusEnum= {
|
||||
'Unassigned': {"text":"未指派","color":"#ff0000","value":"Unassigned"},
|
||||
@ -595,22 +572,13 @@ export const HouseWorkOrdersLevelEnum= {
|
||||
// HouseWorkOrdersLocationEnum
|
||||
export const HouseWorkOrdersLocationEnum= {
|
||||
'CommonArea': {"text":"公共区域","color":"#ff0000","value":"CommonArea"},
|
||||
'MyHome': {"text":"房屋","color":"#00ff00","value":"MyHome"},
|
||||
};
|
||||
|
||||
// HouseWorkOrdersRefundStatusEnum
|
||||
export const HouseWorkOrdersRefundStatusEnum= {
|
||||
'Refunding': {"text":"退款中","color":"#FFA500","value":"Refunding"},
|
||||
'Refunded': {"text":"已退款","color":"#28A745","value":"Refunded"},
|
||||
'PartialRefund': {"text":"部分退款","color":"#17A2B8","value":"PartialRefund"},
|
||||
'MyHome': {"text":"我家","color":"#00ff00","value":"MyHome"},
|
||||
};
|
||||
|
||||
// HouseWorkOrdersStatusEnum
|
||||
export const HouseWorkOrdersStatusEnum= {
|
||||
'Pending': {"text":"待处理","color":"#FFA500","value":"Pending"},
|
||||
'Processing': {"text":"处理中","color":"#1E90FF","value":"Processing"},
|
||||
'PendingPayment': {"text":"待支付","color":"#FF8C00","value":"PendingPayment"},
|
||||
'PendingAcceptance': {"text":"待验收","color":"#17A2B8","value":"PendingAcceptance"},
|
||||
'Completed': {"text":"已完成","color":"#28A745","value":"Completed"},
|
||||
'Closed': {"text":"已关闭","color":"#6C757D","value":"Closed"},
|
||||
};
|
||||
@ -646,7 +614,6 @@ export const SexEnum= {
|
||||
export const SysModuleEnum= {
|
||||
'Admin': {"text":"管理员","color":"#cf1322","value":"Admin"},
|
||||
'Customer': {"text":"客户","color":"#d4b106","value":"Customer"},
|
||||
'Company': {"text":"机构","color":"#1890ff","value":"Company"},
|
||||
};
|
||||
|
||||
// SysPermissionsTypeEnum
|
||||
|
||||
@ -8,12 +8,15 @@ import {
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import { BannersRedirectTypeEnum, BannersTypeEnum } from '@/gen/Enums';
|
||||
import { ProTable } from '@ant-design/pro-components';
|
||||
import { useNavigate } from '@umijs/max';
|
||||
import { Space } from 'antd';
|
||||
import BannerCreate from './modals/BannerCreate';
|
||||
import BannerShow from './modals/BannerShow';
|
||||
import BannerUpdate from './modals/BannerUpdate';
|
||||
|
||||
export default function Index({ title = '内容管理' }) {
|
||||
const navigate = useNavigate();
|
||||
|
||||
// 注册当前页面为标签页
|
||||
usePageTabs({
|
||||
tabKey: 'banners',
|
||||
|
||||
@ -79,13 +79,6 @@ export default function Index({ title = '员工管理' }) {
|
||||
dataIndex: ['position', 'name'],
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '是否管理员',
|
||||
dataIndex: 'is_company_admin',
|
||||
render: (_, item: any) => {
|
||||
return item?.is_company_admin ? '是' : '否';
|
||||
},
|
||||
},
|
||||
MyColumns.UpdatedAt(),
|
||||
// MyColumns.CreatedAt(),
|
||||
MyColumns.Option({
|
||||
|
||||
@ -35,7 +35,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
||||
})
|
||||
.then(() => {
|
||||
props.reload?.();
|
||||
message.success('编辑成功');
|
||||
message.success(props.title + '成功');
|
||||
return true;
|
||||
})
|
||||
.catch(() => false)
|
||||
@ -50,7 +50,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
||||
colProps: { span: 24 },
|
||||
required: true,
|
||||
fieldProps: {
|
||||
onChange: () => {
|
||||
onChange: (val: any) => {
|
||||
form.setFieldsValue({
|
||||
organizations_id: undefined,
|
||||
positions_id: undefined,
|
||||
@ -59,6 +59,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
||||
},
|
||||
}),
|
||||
]),
|
||||
|
||||
{
|
||||
valueType: 'dependency',
|
||||
name: ['companies_id'],
|
||||
@ -76,6 +77,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
||||
];
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
key: 'name',
|
||||
title: '姓名',
|
||||
@ -99,14 +101,6 @@ export default function Create(props: MyBetaModalFormProps) {
|
||||
valueEnum: SexEnum,
|
||||
required: true,
|
||||
}),
|
||||
{
|
||||
title: '密码',
|
||||
key: 'password',
|
||||
formItemProps: { ...rulesHelper.text },
|
||||
tooltip: '请设置机构端登录密码',
|
||||
colProps: { span: 24 },
|
||||
},
|
||||
|
||||
{
|
||||
valueType: 'dependency',
|
||||
name: ['companies_id'],
|
||||
@ -123,12 +117,13 @@ export default function Create(props: MyBetaModalFormProps) {
|
||||
];
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '是否管理员',
|
||||
key: 'is_company_admin',
|
||||
valueType: 'switch',
|
||||
colProps: { span: 6 },
|
||||
},
|
||||
|
||||
// {
|
||||
// key: 'password',
|
||||
// title: '密码',
|
||||
// colProps: { span: 24 },
|
||||
// valueType: 'password',
|
||||
// },
|
||||
{
|
||||
key: 'remark',
|
||||
title: '备注',
|
||||
|
||||
@ -69,11 +69,6 @@ export default function Update(props: MyBetaModalFormProps) {
|
||||
valueEnum: SexEnum,
|
||||
required: true,
|
||||
}),
|
||||
{
|
||||
title: '密码',
|
||||
key: 'password',
|
||||
colProps: { span: 24 },
|
||||
},
|
||||
Selects?.Positions({
|
||||
title: '岗位',
|
||||
params: { companies_id: props?.item?.companies_id },
|
||||
@ -81,21 +76,14 @@ export default function Update(props: MyBetaModalFormProps) {
|
||||
formItemProps: { ...rulesHelper.text },
|
||||
fieldProps: {
|
||||
showSearch: true,
|
||||
labelRender: (res: any) => {
|
||||
if (res?.label) {
|
||||
return res?.label;
|
||||
} else {
|
||||
return props?.item?.position?.name;
|
||||
}
|
||||
},
|
||||
},
|
||||
}),
|
||||
{
|
||||
title: '是否管理员',
|
||||
key: 'is_company_admin',
|
||||
valueType: 'switch',
|
||||
colProps: { span: 6 },
|
||||
},
|
||||
// {
|
||||
// key: 'password',
|
||||
// title: '密码',
|
||||
// colProps: { span: 24 },
|
||||
// valueType: 'password',
|
||||
// },
|
||||
{
|
||||
key: 'remark',
|
||||
title: '备注',
|
||||
|
||||
@ -3,6 +3,7 @@ import {
|
||||
MyColumns,
|
||||
MyPageContainer,
|
||||
MyProTableProps,
|
||||
usePageTabs,
|
||||
} from '@/common';
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import { ProTable } from '@ant-design/pro-components';
|
||||
@ -15,6 +16,12 @@ import CompanyUpdate from './modals/CompanyUpdate';
|
||||
export default function Index({ title = '机构列表' }) {
|
||||
const navigate = useNavigate();
|
||||
|
||||
// 注册当前页面为标签页
|
||||
usePageTabs({
|
||||
tabKey: 'company-companies',
|
||||
tabLabel: title,
|
||||
});
|
||||
|
||||
return (
|
||||
<MyPageContainer
|
||||
title={title}
|
||||
|
||||
@ -1,336 +0,0 @@
|
||||
import {
|
||||
MyButtons,
|
||||
MyFormItems,
|
||||
MyModalFormProps,
|
||||
MyPageContainer,
|
||||
} from '@/common';
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import { CaretDownOutlined } from '@ant-design/icons';
|
||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||
import { useSearchParams } from '@umijs/max';
|
||||
import { Card, Col, Flex, Form, message, Row, Tag } from 'antd';
|
||||
import { useEffect, useState } from 'react';
|
||||
import './style.scss';
|
||||
|
||||
interface FormData {
|
||||
logo: { url: string }[];
|
||||
color: string;
|
||||
pageColor: string;
|
||||
pageColorValue?: string[];
|
||||
}
|
||||
|
||||
export default function Index({ title = '小程序页面配置' }) {
|
||||
const [form] = Form.useForm<FormData>();
|
||||
const [getShowData, setShowData] = useState<any>({});
|
||||
const [searchParams] = useSearchParams();
|
||||
const [formValues, setFormValues] = useState<FormData>({
|
||||
logo: [],
|
||||
color: '#1890ff',
|
||||
pageColor: `linear-gradient(180deg,rgba(208, 229, 255, 0.44) 0%,rgba(255, 255, 255, 0) 100%),linear-gradient(146deg,#d3d7ff 0%,rgba(255, 255, 255, 0) 37%),linear-gradient(194deg,#dffff3 0%,#f8f8f8 30%)`,
|
||||
});
|
||||
const [GET_DEFAULT_COLOR, SET_DEFAULT_COLOR] = useState([
|
||||
{
|
||||
color: '#d3d7ff',
|
||||
percent: 0,
|
||||
},
|
||||
{
|
||||
color: '#dffff3',
|
||||
percent: 100,
|
||||
},
|
||||
]);
|
||||
// 处理表单值变化,用于实时预览
|
||||
const handleValuesChange = (row: FormData) => {
|
||||
console.log('row', row);
|
||||
let data: ApiTypes.Company.CompanyConfigs.Store = {
|
||||
companies_id: Number(searchParams.get('id')) || 0,
|
||||
config_key: 'Theme',
|
||||
config_value: {
|
||||
color: formValues?.color,
|
||||
pageColor: formValues?.pageColor,
|
||||
logo: row?.logo || formValues?.logo,
|
||||
pageColorValue: formValues?.pageColorValue,
|
||||
},
|
||||
};
|
||||
|
||||
console.log(data);
|
||||
if (getShowData?.id) {
|
||||
Apis.Company.CompanyConfigs.Update({
|
||||
...data,
|
||||
id: getShowData?.id || 0,
|
||||
}).then(() => {
|
||||
message.success('保存成功');
|
||||
});
|
||||
} else {
|
||||
Apis.Company.CompanyConfigs.Store(data).then(() => {
|
||||
message.success('保存成功');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (searchParams.get('id')) {
|
||||
Apis.Company.CompanyConfigs.GetDetail({
|
||||
companies_id: searchParams.get('id'),
|
||||
config_key: 'Theme',
|
||||
}).then((res: any) => {
|
||||
console.log('res', res);
|
||||
let cssStrColor =
|
||||
res?.data?.config_value?.pageColorValue?.[0] || '#d3d7ff';
|
||||
let cssEndColor =
|
||||
res?.data?.config_value?.pageColorValue?.[1] || '#dffff3';
|
||||
setShowData(res?.data);
|
||||
let newCss = `linear-gradient(180deg,rgba(208, 229, 255, 0.44) 0%,rgba(255, 255, 255, 0) 100%),linear-gradient(146deg, ${cssStrColor} 0%, rgba(255, 255, 255, 0) 37%),linear-gradient(194deg, ${cssEndColor} 0%, #f8f8f8 30%)`;
|
||||
setFormValues({
|
||||
...res?.data?.config_value,
|
||||
pageColor: newCss,
|
||||
});
|
||||
console.log('newCss', newCss);
|
||||
form.setFieldsValue({
|
||||
...res?.data?.config_value,
|
||||
pageColorOtherValue: [
|
||||
{
|
||||
color: cssStrColor || '',
|
||||
percent: 0,
|
||||
},
|
||||
{
|
||||
color: cssEndColor || '',
|
||||
percent: 100,
|
||||
},
|
||||
],
|
||||
});
|
||||
console.log('res', res);
|
||||
});
|
||||
}
|
||||
}, [searchParams.get('id')]);
|
||||
|
||||
return (
|
||||
<MyPageContainer
|
||||
title={title}
|
||||
enableTabs={true}
|
||||
tabKey="company-set-page-info"
|
||||
tabLabel={title}
|
||||
>
|
||||
<div className="page-config-container">
|
||||
<Row gutter={[24, 0]}>
|
||||
{/* 左侧表单区域 */}
|
||||
<Col span={12}>
|
||||
<Card title="页面配置" className="form-card">
|
||||
<BetaSchemaForm<ApiTypes.Company.CompanyConfigs.Store>
|
||||
{...MyModalFormProps.props}
|
||||
title={title}
|
||||
// 基础表单
|
||||
layoutType="Form"
|
||||
width="800px"
|
||||
wrapperCol={{ span: 24 }}
|
||||
labelAlign="left"
|
||||
form={form}
|
||||
submitter={{
|
||||
render: () => {
|
||||
return [
|
||||
<div
|
||||
key="submitter"
|
||||
style={{
|
||||
display: 'flex',
|
||||
paddingTop: '50px',
|
||||
justifyContent: 'flex-end',
|
||||
}}
|
||||
>
|
||||
<MyButtons.Default
|
||||
key="TemporaryStorage"
|
||||
size="middle"
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
handleValuesChange(form.getFieldsValue());
|
||||
}}
|
||||
title="保存"
|
||||
/>
|
||||
</div>,
|
||||
];
|
||||
},
|
||||
}}
|
||||
onFinish={async (values: any) => {
|
||||
// onSave(values);
|
||||
}}
|
||||
columns={[
|
||||
MyFormItems.UploadImages({
|
||||
key: 'logo',
|
||||
title: (
|
||||
<div>
|
||||
机构Logo
|
||||
<span style={{ fontSize: '12px', color: '#999' }}>
|
||||
(请上传480*480,png格式的Logo)
|
||||
</span>
|
||||
</div>
|
||||
),
|
||||
max: 1,
|
||||
colProps: { span: 24 },
|
||||
fieldProps: {
|
||||
onChange: (val: { url: string }[]) => {
|
||||
setFormValues({ ...formValues, logo: val });
|
||||
},
|
||||
},
|
||||
}),
|
||||
{
|
||||
title: (
|
||||
<div>
|
||||
品牌主色配置
|
||||
<span style={{ fontSize: '12px', color: '#999' }}>
|
||||
(设置主品牌色,将应用于按钮、链接等交互组件)
|
||||
</span>
|
||||
</div>
|
||||
),
|
||||
colProps: { span: 24 },
|
||||
valueType: 'color',
|
||||
key: 'color',
|
||||
fieldProps: {
|
||||
showText: true,
|
||||
defaultValue: formValues?.color || '#1890ff',
|
||||
format: 'rgb',
|
||||
onChange: (value: any, css: string) => {
|
||||
console.log('value', value, css);
|
||||
setFormValues({ ...formValues, color: css });
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
title: (
|
||||
<div>
|
||||
全局渐变色配置
|
||||
<span style={{ fontSize: '12px', color: '#999' }}>
|
||||
(设置全局渐变色,将应用于页面背景等元素)
|
||||
</span>
|
||||
</div>
|
||||
),
|
||||
key: 'pageColorOtherValue',
|
||||
colProps: { span: 24 },
|
||||
valueType: 'color',
|
||||
fieldProps: {
|
||||
defaultValue: GET_DEFAULT_COLOR,
|
||||
mode: 'gradient',
|
||||
arrow: true,
|
||||
color: 'toRgb',
|
||||
format: 'rgb',
|
||||
showText: true,
|
||||
onChange: (value: any, css: any) => {
|
||||
console.log('value', value, css);
|
||||
let cssStrColor = value?.colors
|
||||
? value?.colors?.[0]?.color?.metaColor
|
||||
: value;
|
||||
let cssEndColor = value?.colors
|
||||
? value?.colors?.[1]?.color?.metaColor
|
||||
: value;
|
||||
let newCss = `linear-gradient(180deg,rgba(208, 229, 255, 0.44) 0%,rgba(255, 255, 255, 0) 100%),linear-gradient(146deg, rgba(${cssStrColor?.r}, ${cssStrColor?.g}, ${cssStrColor?.b},${cssStrColor?.a}) 0%, rgba(255, 255, 255, 0) 37%),linear-gradient(194deg, rgba(${cssEndColor?.r}, ${cssEndColor?.g}, ${cssEndColor?.b},${cssEndColor?.a}) 0%, #f8f8f8 30%)`;
|
||||
setFormValues({
|
||||
...formValues,
|
||||
pageColor: newCss,
|
||||
pageColorValue: [
|
||||
`rgba(${cssStrColor?.r}, ${cssStrColor?.g}, ${cssStrColor?.b},${cssStrColor?.a})`,
|
||||
`rgba(${cssEndColor?.r}, ${cssEndColor?.g}, ${cssEndColor?.b},${cssEndColor?.a})`,
|
||||
],
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Card>
|
||||
</Col>
|
||||
{/* 右侧手机预览区域 */}
|
||||
<Col span={12}>
|
||||
<Card title="实时预览" className="preview-card">
|
||||
<div className="phone-frame">
|
||||
<div className="phone-screen">
|
||||
{/* 手机顶部状态栏 */}
|
||||
<div className="phone-status-bar">
|
||||
<div className="status-left">9:41</div>
|
||||
<div className="status-right">信号 电池</div>
|
||||
</div>
|
||||
{/* 页面内容 */}
|
||||
<div
|
||||
className="phone-content"
|
||||
style={{ background: formValues?.pageColor }}
|
||||
>
|
||||
<div className="page-title">
|
||||
{formValues?.logo?.[0] && (
|
||||
<img
|
||||
src={formValues?.logo?.[0]?.url}
|
||||
width="24"
|
||||
height="24"
|
||||
style={{ marginRight: 8 }}
|
||||
alt=""
|
||||
/>
|
||||
)}
|
||||
某小区1栋1单元2102 <CaretDownOutlined />
|
||||
</div>
|
||||
|
||||
<div className="tab-content">
|
||||
<Flex vertical gap="large">
|
||||
<Flex gap="small" wrap>
|
||||
<div
|
||||
className="phone-button"
|
||||
style={{
|
||||
backgroundColor: formValues?.color,
|
||||
}}
|
||||
>
|
||||
按钮
|
||||
</div>
|
||||
<div
|
||||
className="phone-button"
|
||||
style={{
|
||||
border: `1px solid ${formValues?.color}`,
|
||||
color: formValues?.color,
|
||||
}}
|
||||
>
|
||||
按钮
|
||||
</div>
|
||||
<div
|
||||
className="phone-button"
|
||||
style={{
|
||||
color: formValues?.color,
|
||||
}}
|
||||
>
|
||||
按钮
|
||||
</div>
|
||||
</Flex>
|
||||
<Flex gap="small" wrap>
|
||||
<Tag color={formValues?.color}>标签</Tag>
|
||||
<Tag color={formValues?.color}>标签</Tag>
|
||||
<Tag color={formValues?.color}>标签</Tag>
|
||||
</Flex>
|
||||
<div className="tabs-content">
|
||||
<div
|
||||
className="tab-item"
|
||||
style={{
|
||||
backgroundColor: formValues?.color,
|
||||
color: '#fff',
|
||||
}}
|
||||
>
|
||||
tab 1
|
||||
</div>
|
||||
<div className="tab-item">tab 2</div>
|
||||
<div className="tab-item">tab 3</div>
|
||||
</div>
|
||||
<div className="tabs-content">
|
||||
<div
|
||||
className="tab-item"
|
||||
style={{
|
||||
borderBottom: `5px solid ${formValues?.color}`,
|
||||
}}
|
||||
>
|
||||
tab 1
|
||||
</div>
|
||||
<div className="tab-item">tab 2</div>
|
||||
<div className="tab-item">tab 3</div>
|
||||
</div>
|
||||
</Flex>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</MyPageContainer>
|
||||
);
|
||||
}
|
||||
@ -1,198 +0,0 @@
|
||||
.page-config-container {
|
||||
padding: 20px;
|
||||
min-height: calc(100vh - 160px);
|
||||
}
|
||||
|
||||
.form-card {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
|
||||
.page-config-form {
|
||||
.ant-form-item {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.preview-card {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.ant-card-body {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.phone-frame {
|
||||
width: 375px;
|
||||
height: 812px;
|
||||
border: 10px solid #333;
|
||||
border-radius: 40px;
|
||||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
background-color: #000;
|
||||
|
||||
// 手机顶部听筒
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 60px;
|
||||
height: 5px;
|
||||
background-color: #222;
|
||||
border-radius: 3px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
// 手机底部home键
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border: 2px solid #333;
|
||||
border-radius: 50%;
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.phone-screen {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f8f8f8;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
position: relative;
|
||||
overflow-y: auto;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
|
||||
// 滚动条样式
|
||||
&::-webkit-scrollbar {
|
||||
width: 4px;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-track {
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
border-radius: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.phone-status-bar {
|
||||
height: 44px;
|
||||
background-color: rgba(0, 0, 0, 0.8);
|
||||
color: #fff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 16px;
|
||||
font-size: 12px;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.phone-header {
|
||||
background-color: #1890ff;
|
||||
color: #fff;
|
||||
padding: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.phone-content {
|
||||
padding: 20px;
|
||||
height: 300px;
|
||||
// min-height: calc(100% - 120px);
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
rgba(208, 229, 255, 0.44) 0%,
|
||||
rgba(255, 255, 255, 0) 100%
|
||||
),
|
||||
linear-gradient(146deg, #d3d7ff 0%, rgba(255, 255, 255, 0) 37%),
|
||||
linear-gradient(194deg, #dffff3 0%, #ffffff 30%);
|
||||
p {
|
||||
margin: 0 0 16px 0;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.page-type-indicator {
|
||||
background-color: #f0f0f0;
|
||||
padding: 8px;
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.page-title {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
img {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.tab-content {
|
||||
padding: 15px 0 0 0;
|
||||
}
|
||||
.phone-button {
|
||||
padding: 4px 12px;
|
||||
border-radius: 4px;
|
||||
color: #fff;
|
||||
}
|
||||
.tabs-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.tab-item {
|
||||
padding: 5px 15px;
|
||||
border-radius: 4px;
|
||||
margin-right: 10px;
|
||||
color: #333;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.phone-footer {
|
||||
background-color: #f5f5f5;
|
||||
color: #666;
|
||||
padding: 12px;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
.page-config-container {
|
||||
.ant-row {
|
||||
.ant-col {
|
||||
&[span='12'] {
|
||||
width: 100%;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -10,12 +10,10 @@ import CompanyUpdate from '../modals/CompanyUpdate';
|
||||
import CompanyApps from '../table/Apps';
|
||||
import Assets from '../table/Assets';
|
||||
import Brands from '../table/Brands';
|
||||
import CustomerEnd from '../table/CustomerEnd';
|
||||
import Employees from '../table/Employees';
|
||||
import Organizations from '../table/Organizations';
|
||||
import Positions from '../table/Positions';
|
||||
import ReceiptAccounts from '../table/ReceiptAccounts';
|
||||
import Roles from '../table/Roles';
|
||||
|
||||
export default function Show({ title }: { title?: string } = {}) {
|
||||
const { id } = useParams<{ id: string }>();
|
||||
@ -46,60 +44,49 @@ export default function Show({ title }: { title?: string } = {}) {
|
||||
|
||||
let items = [
|
||||
{
|
||||
label: '项目配置',
|
||||
label: '1-应用配置',
|
||||
key: '1',
|
||||
closable: false,
|
||||
children: <CompanyApps item={data} />,
|
||||
},
|
||||
|
||||
{
|
||||
label: '组织配置',
|
||||
label: '2-组织配置',
|
||||
key: '2',
|
||||
closable: false,
|
||||
children: <Organizations item={data} />,
|
||||
},
|
||||
{
|
||||
label: '岗位配置',
|
||||
label: '3-岗位配置',
|
||||
key: '3',
|
||||
closable: false,
|
||||
children: <Positions item={data} />,
|
||||
},
|
||||
{
|
||||
label: '员工配置',
|
||||
label: '4-员工管理',
|
||||
key: '4',
|
||||
closable: false,
|
||||
children: <Employees item={data} />,
|
||||
},
|
||||
{
|
||||
label: '账号配置',
|
||||
label: '5-收款账号添加',
|
||||
key: '5',
|
||||
closable: false,
|
||||
children: <ReceiptAccounts item={data} />,
|
||||
},
|
||||
|
||||
{
|
||||
label: '应用配置',
|
||||
label: '6-品牌配置',
|
||||
key: '6',
|
||||
closable: false,
|
||||
children: <Brands item={data} />,
|
||||
},
|
||||
{
|
||||
label: '品牌配置',
|
||||
label: '7-项目配置',
|
||||
key: '7',
|
||||
closable: false,
|
||||
children: <Assets item={data} />,
|
||||
},
|
||||
{
|
||||
label: '权限配置',
|
||||
key: '8',
|
||||
closable: false,
|
||||
children: <Roles item={data} />,
|
||||
},
|
||||
{
|
||||
label: '客户端配置',
|
||||
key: '9',
|
||||
closable: false,
|
||||
children: <CustomerEnd item={data} />,
|
||||
},
|
||||
];
|
||||
return (
|
||||
<MyPageContainer title={title}>
|
||||
|
||||
@ -1,46 +0,0 @@
|
||||
import { MyBetaModalFormProps, MyButtons } from '@/common';
|
||||
import { ProCard } from '@ant-design/pro-components';
|
||||
import { useNavigate } from '@umijs/max';
|
||||
|
||||
export default function CustomerEnd(props: MyBetaModalFormProps) {
|
||||
const navigate = useNavigate();
|
||||
return (
|
||||
<div>
|
||||
<ProCard title="客户端小程序配置" bordered headerBordered gutter={16}>
|
||||
<ProCard
|
||||
title="品牌主色、全局渐变色配置"
|
||||
type="inner"
|
||||
bordered
|
||||
extra={
|
||||
<MyButtons.Default
|
||||
title="去配置"
|
||||
type="primary"
|
||||
size="small"
|
||||
onClick={() => {
|
||||
navigate(
|
||||
`/company/list/pages/set_page_info?id=${props?.item?.id}`,
|
||||
);
|
||||
}}
|
||||
/>
|
||||
}
|
||||
>
|
||||
<div style={{ height: '80px' }}>
|
||||
替换系统默认的金刚区图标,将图标颜色统一调整为机构主色,保持视觉格一致
|
||||
</div>
|
||||
</ProCard>
|
||||
<ProCard
|
||||
title="金刚区图标配置"
|
||||
type="inner"
|
||||
bordered
|
||||
extra={
|
||||
<MyButtons.Default title="去配置" type="primary" size="small" />
|
||||
}
|
||||
>
|
||||
<div style={{ height: '80px' }}>
|
||||
品牌主色是机构在小程序中最核心的视觉代表色。通过配置品牌主色,你可以让整个小程序的交互组件自动统一为机构专属风格,提升品牌识别度。
|
||||
</div>
|
||||
</ProCard>
|
||||
</ProCard>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@ -1,90 +0,0 @@
|
||||
import { MyBetaModalFormProps, MyButtons } from '@/common';
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import { ProCard } from '@ant-design/pro-components';
|
||||
import { message, Space, Tree, TreeProps } from 'antd';
|
||||
import { DataNode } from 'antd/es/tree';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
export default function Index(props: MyBetaModalFormProps) {
|
||||
const [treeData, setTreeData] = useState<DataNode[]>([]);
|
||||
const [checkedKeys, setCheckedKeys] = useState<string[]>([]);
|
||||
|
||||
const processTree = (item: any): DataNode => {
|
||||
return {
|
||||
...item,
|
||||
key: item.id,
|
||||
title: item.id + '_' + item.name,
|
||||
children: item.children?.map(processTree),
|
||||
};
|
||||
};
|
||||
|
||||
const getPermissions = () => {
|
||||
//获取已经配置的,菜单
|
||||
Apis.Company.CompanyPermissions.GetPermissions({
|
||||
companies_id: props?.item?.id || 0,
|
||||
}).then((res: any) => {
|
||||
console.log('res', res);
|
||||
setCheckedKeys(res?.data?.permissions_ids);
|
||||
});
|
||||
};
|
||||
|
||||
const getPermissionTree = () => {
|
||||
//获取机构可配置菜单
|
||||
Apis.Company.CompanyPermissions.PermissionTree().then((res: any) => {
|
||||
const data = res.data?.map(processTree);
|
||||
setTreeData(data);
|
||||
getPermissions();
|
||||
});
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getPermissionTree();
|
||||
}, []);
|
||||
|
||||
const onCheck: TreeProps['onCheck'] = (checkedKeys, info) => {
|
||||
console.log('onCheck', checkedKeys, info);
|
||||
const ids: string[] = [];
|
||||
info.checkedNodes?.forEach((item: DataNode) => {
|
||||
if (item.children?.length === 0) {
|
||||
ids.push(item.key as string);
|
||||
}
|
||||
});
|
||||
console.log('ids', ids);
|
||||
setCheckedKeys(ids);
|
||||
// props.onChange?.(ids);
|
||||
};
|
||||
|
||||
return (treeData?.length ?? 0) > 0 ? (
|
||||
<ProCard
|
||||
extra={[
|
||||
<MyButtons.Default
|
||||
title="保存"
|
||||
size="middle"
|
||||
type="primary"
|
||||
key="save"
|
||||
onClick={() => {
|
||||
Apis.Company.CompanyPermissions.SetPermissions({
|
||||
companies_id: props?.item?.id || 0,
|
||||
permissions_ids: checkedKeys || [],
|
||||
}).then(() => {
|
||||
message.success('保存成功');
|
||||
});
|
||||
}}
|
||||
/>,
|
||||
]}
|
||||
>
|
||||
<Space direction="vertical">
|
||||
<Tree
|
||||
checkable
|
||||
defaultExpandAll
|
||||
treeData={treeData}
|
||||
onCheck={onCheck}
|
||||
checkedKeys={checkedKeys || []}
|
||||
{...props}
|
||||
/>
|
||||
</Space>
|
||||
</ProCard>
|
||||
) : (
|
||||
<></>
|
||||
);
|
||||
}
|
||||
@ -3,6 +3,7 @@ import {
|
||||
MyColumns,
|
||||
MyPageContainer,
|
||||
MyProTableProps,
|
||||
usePageTabs,
|
||||
} from '@/common';
|
||||
import MyEnumRadioGroup from '@/common/components/formFields/MyEnumRadioGroup';
|
||||
import { Apis } from '@/gen/Apis';
|
||||
@ -19,6 +20,12 @@ export default function Index({ title = '功能' }) {
|
||||
const actionRef = useRef<ActionType>();
|
||||
const [guardName, setGuardName] = useState<string>('Admin');
|
||||
|
||||
// 注册当前页面为标签页
|
||||
usePageTabs({
|
||||
tabKey: 'system-permissions',
|
||||
tabLabel: title,
|
||||
});
|
||||
|
||||
const getData = async () => {
|
||||
let data = await Apis.Permission.SysPermissions.List({
|
||||
guard_name: guardName,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user