Compare commits
7 Commits
24bfd8a3ed
...
e8958ac9d5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e8958ac9d5 | ||
|
|
a1de697f9d | ||
|
|
7501a60dc7 | ||
|
|
13e98eaf4c | ||
|
|
96f0ac68de | ||
|
|
3255c9deb6 | ||
|
|
866ce14210 |
@ -18,8 +18,8 @@ export default defineConfig({
|
|||||||
proxy: {
|
proxy: {
|
||||||
'/api/': {
|
'/api/': {
|
||||||
target: 'http://10.39.13.78:8001/',
|
target: 'http://10.39.13.78:8001/',
|
||||||
// target: 'https://test-admin.linyikj.com.cn/',
|
// target: 'https://test-company.linyikj.com.cn/',
|
||||||
// target: 'https://admin.linyikj.com.cn/',
|
// target: 'https://company.linyikj.com.cn/',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: { '^': '' },
|
pathRewrite: { '^': '' },
|
||||||
},
|
},
|
||||||
|
|||||||
@ -31,6 +31,7 @@
|
|||||||
"leaflet": "^1.9.4",
|
"leaflet": "^1.9.4",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"react-activation": "^0.13.4",
|
"react-activation": "^0.13.4",
|
||||||
|
"react-countup": "^6.5.3",
|
||||||
"react-use": "^17.5.1",
|
"react-use": "^17.5.1",
|
||||||
"valtio": "^1.13.2"
|
"valtio": "^1.13.2"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,12 +1,13 @@
|
|||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import {
|
import {
|
||||||
|
DownOutlined,
|
||||||
LogoutOutlined,
|
LogoutOutlined,
|
||||||
UnlockOutlined,
|
UnlockOutlined,
|
||||||
UserOutlined,
|
UserOutlined,
|
||||||
} from '@ant-design/icons';
|
} from '@ant-design/icons';
|
||||||
import { history } from '@umijs/max';
|
import { history } from '@umijs/max';
|
||||||
import { Avatar, Dropdown, MenuProps, Space } from 'antd';
|
import { Avatar, Dropdown, MenuProps, Space } from 'antd';
|
||||||
import { useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { stateActions } from '../../libs/valtio/actions';
|
import { stateActions } from '../../libs/valtio/actions';
|
||||||
import AvatarIcon from './AvatarIcon.png';
|
import AvatarIcon from './AvatarIcon.png';
|
||||||
import ChangePassword from './ChangePassword';
|
import ChangePassword from './ChangePassword';
|
||||||
@ -41,6 +42,7 @@ export default function AvatarProps({ user }: { user: any }) {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
Apis.Common.Auth.Logout().then(() => {
|
Apis.Common.Auth.Logout().then(() => {
|
||||||
stateActions.setLogout();
|
stateActions.setLogout();
|
||||||
|
sessionStorage.removeItem('loginUserInfo');
|
||||||
history.push('/login');
|
history.push('/login');
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
@ -52,6 +54,15 @@ export default function AvatarProps({ user }: { user: any }) {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
let loginUserInfo = sessionStorage.getItem('loginUserInfo');
|
||||||
|
console.log(loginUserInfo, 'loginUserInfo');
|
||||||
|
if (loginUserInfo === 'I0xZMDEyM18wMQ==') {
|
||||||
|
setOpen(true);
|
||||||
|
console.log('登录成功');
|
||||||
|
}
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Dropdown menu={{ items }} trigger={['click']}>
|
<Dropdown menu={{ items }} trigger={['click']}>
|
||||||
@ -59,6 +70,7 @@ export default function AvatarProps({ user }: { user: any }) {
|
|||||||
<Space>
|
<Space>
|
||||||
<Avatar icon={<UserOutlined />} src={AvatarIcon} size={28} />
|
<Avatar icon={<UserOutlined />} src={AvatarIcon} size={28} />
|
||||||
<span>{user?.name}</span>
|
<span>{user?.name}</span>
|
||||||
|
<DownOutlined />
|
||||||
</Space>
|
</Space>
|
||||||
</a>
|
</a>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { ModalForm, ProFormText } from '@ant-design/pro-components';
|
import { ModalForm, ProFormText } from '@ant-design/pro-components';
|
||||||
|
import { history } from '@umijs/max';
|
||||||
import { message } from 'antd';
|
import { message } from 'antd';
|
||||||
|
import { stateActions } from '../../libs/valtio/actions';
|
||||||
export default function ChangePassword({
|
export default function ChangePassword({
|
||||||
open,
|
open,
|
||||||
setOpen,
|
setOpen,
|
||||||
@ -14,12 +15,17 @@ export default function ChangePassword({
|
|||||||
open={open}
|
open={open}
|
||||||
wrapperCol={{ span: 24 }}
|
wrapperCol={{ span: 24 }}
|
||||||
width="500px"
|
width="500px"
|
||||||
title="修改密码"
|
title="请修改初始密码"
|
||||||
onFinish={async (values) => {
|
onFinish={async (values) => {
|
||||||
return Apis.Common.Auth.ChangePassword(values)
|
return Apis.Common.Auth.ChangePassword(values)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
message.success('修改密码成功');
|
message.success('修改密码成功');
|
||||||
setOpen(false);
|
Apis.Common.Auth.Logout().then(() => {
|
||||||
|
stateActions.setLogout();
|
||||||
|
sessionStorage.removeItem('loginUserInfo');
|
||||||
|
history.push('/login');
|
||||||
|
setOpen(false);
|
||||||
|
});
|
||||||
})
|
})
|
||||||
.catch(() => false);
|
.catch(() => false);
|
||||||
}}
|
}}
|
||||||
|
|||||||
@ -1,15 +1,16 @@
|
|||||||
import { MyIcons, MyIconsType, PermissionsType, useMyState } from '@/common';
|
import { MyIcons, MyIconsType, PermissionsType, useMyState } from '@/common';
|
||||||
import AvatarProps from '@/common/components/layout/AvatarProps';
|
import AvatarProps from '@/common/components/layout/AvatarProps';
|
||||||
import { SettingOutlined } from '@ant-design/icons';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { Link, RuntimeConfig, history, useNavigate } from '@umijs/max';
|
import { Link, RuntimeConfig, history, useNavigate } from '@umijs/max';
|
||||||
import { AutoComplete, Button, Input, Menu, MenuProps, Space } from 'antd';
|
import { AutoComplete, Input, Menu, MenuProps, Select, Space } from 'antd';
|
||||||
import { useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import './allConfig.scss';
|
import './allConfig.scss';
|
||||||
// import Logo from './logo.png';
|
// import Logo from './logo.png';
|
||||||
interface LevelKeysProps {
|
interface LevelKeysProps {
|
||||||
key?: string;
|
key?: string;
|
||||||
children?: LevelKeysProps[];
|
children?: LevelKeysProps[];
|
||||||
}
|
}
|
||||||
|
|
||||||
const loopMenu = (permissions: PermissionsType[] | undefined) => {
|
const loopMenu = (permissions: PermissionsType[] | undefined) => {
|
||||||
let tree: PermissionsType[] = [];
|
let tree: PermissionsType[] = [];
|
||||||
let map: Record<number, PermissionsType> = {};
|
let map: Record<number, PermissionsType> = {};
|
||||||
@ -57,6 +58,7 @@ const loopMenu = (permissions: PermissionsType[] | undefined) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const LayoutConfig: RuntimeConfig['layout'] = () => {
|
export const LayoutConfig: RuntimeConfig['layout'] = () => {
|
||||||
|
const [getSelectProject, setSelectProject] = useState<LevelKeysProps[]>([]);
|
||||||
const { snap } = useMyState();
|
const { snap } = useMyState();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const permissionsList = (snap.session.permissions || [])
|
const permissionsList = (snap.session.permissions || [])
|
||||||
@ -69,12 +71,20 @@ export const LayoutConfig: RuntimeConfig['layout'] = () => {
|
|||||||
{ label: '收费Bi', path: '/charge/charge_bi' },
|
{ label: '收费Bi', path: '/charge/charge_bi' },
|
||||||
{ label: '项目Bi', path: '/asset/asset_bi' },
|
{ label: '项目Bi', path: '/asset/asset_bi' },
|
||||||
];
|
];
|
||||||
|
const handleLoadProject = async () => {
|
||||||
|
let res = await Apis.Common.Auth.GetProjects();
|
||||||
|
setSelectProject(
|
||||||
|
res?.data?.map((item) => ({
|
||||||
|
value: item.id,
|
||||||
|
label: item.name,
|
||||||
|
})),
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
const [stateOpenKeys, setStateOpenKeys] = useState(['2', '23']);
|
const [stateOpenKeys, setStateOpenKeys] = useState(['2', '23']);
|
||||||
const getLevelKeys: any = (items1: LevelKeysProps[]) => {
|
const getLevelKeys: any = (items1: LevelKeysProps[]) => {
|
||||||
const key: Record<string, number> = {};
|
const key: Record<string, number> = {};
|
||||||
const func = (items2: LevelKeysProps[], level = 1) => {
|
const func = (items2: LevelKeysProps[], level = 1) => {
|
||||||
console.log(items2, 'level');
|
|
||||||
items2?.forEach((item) => {
|
items2?.forEach((item) => {
|
||||||
if (item.key) {
|
if (item.key) {
|
||||||
key[item.key] = level;
|
key[item.key] = level;
|
||||||
@ -88,18 +98,22 @@ export const LayoutConfig: RuntimeConfig['layout'] = () => {
|
|||||||
return key;
|
return key;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
handleLoadProject('');
|
||||||
|
}, []);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
// 首页 logo
|
// 首页 logo
|
||||||
logo: (
|
logo: (
|
||||||
<div style={{ width: 181 }}>
|
<div style={{ width: 136, display: 'flex', justifyContent: 'center' }}>
|
||||||
<img
|
<img
|
||||||
src={
|
src={
|
||||||
snap.session?.company_configs?.config_value?.admin_logo
|
snap.session?.company_configs?.config_value?.admin_logo
|
||||||
? snap.session?.company_configs?.config_value?.admin_logo[0]?.url
|
? snap.session?.company_configs?.config_value?.admin_logo[0]?.url
|
||||||
: ''
|
: ''
|
||||||
}
|
}
|
||||||
style={{ height: '42px' }}
|
style={{ width: 'auto', height: '42px' }}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
@ -114,45 +128,29 @@ export const LayoutConfig: RuntimeConfig['layout'] = () => {
|
|||||||
<div className="headerContentRender">
|
<div className="headerContentRender">
|
||||||
<div style={{ display: 'flex', alignItems: 'center', gap: 20 }}>
|
<div style={{ display: 'flex', alignItems: 'center', gap: 20 }}>
|
||||||
<HeaderSearch permissionsList={permissionsList} />
|
<HeaderSearch permissionsList={permissionsList} />
|
||||||
{/* <Space size={20} style={{ color: '#666' }}>
|
|
||||||
常用功能:
|
|
||||||
{quickLinks.map((q) => (
|
|
||||||
<a
|
|
||||||
key={q.path}
|
|
||||||
onClick={() => history.push(q.path)}
|
|
||||||
className="quick_link"
|
|
||||||
>
|
|
||||||
{q.label}
|
|
||||||
</a>
|
|
||||||
))}
|
|
||||||
</Space> */}
|
|
||||||
</div>
|
</div>
|
||||||
<Space size={10}>
|
<Space size={10}>
|
||||||
{/* <Popover
|
{/* <Button
|
||||||
placement="bottom"
|
|
||||||
title="小程序二维码"
|
|
||||||
content={
|
|
||||||
<Space style={{ textAlign: 'center' }} size="large">
|
|
||||||
<div>
|
|
||||||
<Image src={ImgEmployeeWxApp} style={{ height: '120px' }} />
|
|
||||||
<div style={{ marginTop: 10 }}>员工端</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<Image src={ImgCustomerWxApp} style={{ height: '120px' }} />
|
|
||||||
<div style={{ marginTop: 10 }}>客户端</div>
|
|
||||||
</div>
|
|
||||||
</Space>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<Button type="default" shape="circle" icon={<TabletOutlined />} />
|
|
||||||
</Popover>
|
|
||||||
<Button type="default" shape="circle" icon={<BellOutlined />} /> */}
|
|
||||||
<Button
|
|
||||||
type="default"
|
type="default"
|
||||||
shape="circle"
|
shape="circle"
|
||||||
icon={<SettingOutlined />}
|
icon={<SettingOutlined />}
|
||||||
onClick={() => history.push('/system/sys_permissions')}
|
onClick={() => history.push('/system/sys_permissions')}
|
||||||
|
/> */}
|
||||||
|
<Select
|
||||||
|
onSearch={handleLoadProject}
|
||||||
|
options={getSelectProject}
|
||||||
|
allowClear
|
||||||
|
style={{ width: 160 }}
|
||||||
|
defaultValue={snap.session.current_project?.id}
|
||||||
|
onChange={(e: any) => {
|
||||||
|
Apis.Common.Auth.SwitchProject({
|
||||||
|
project_id: e ? e?.toString() : 'all',
|
||||||
|
}).then(() => {
|
||||||
|
window.location.reload();
|
||||||
|
});
|
||||||
|
console.log(e, 'e');
|
||||||
|
}}
|
||||||
|
placeholder="选择项目"
|
||||||
/>
|
/>
|
||||||
</Space>
|
</Space>
|
||||||
</div>
|
</div>
|
||||||
@ -202,7 +200,6 @@ export const LayoutConfig: RuntimeConfig['layout'] = () => {
|
|||||||
const repeatIndex = openKeys
|
const repeatIndex = openKeys
|
||||||
.filter((key) => key !== currentOpenKey)
|
.filter((key) => key !== currentOpenKey)
|
||||||
.findIndex((key) => levelKeys[key] === levelKeys[currentOpenKey]);
|
.findIndex((key) => levelKeys[key] === levelKeys[currentOpenKey]);
|
||||||
|
|
||||||
setStateOpenKeys(
|
setStateOpenKeys(
|
||||||
openKeys
|
openKeys
|
||||||
// remove repeat key
|
// remove repeat key
|
||||||
|
|||||||
@ -41,7 +41,9 @@ export const requestConfig: RequestConfig = {
|
|||||||
// 错误接收及处理
|
// 错误接收及处理
|
||||||
errorHandler: (error: any) => {
|
errorHandler: (error: any) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
message.error(error.errorMessage);
|
if (error.errorMessage !== '用户未登录') {
|
||||||
|
message.error(error.errorMessage);
|
||||||
|
}
|
||||||
switch (error.errorCode) {
|
switch (error.errorCode) {
|
||||||
case 10000:
|
case 10000:
|
||||||
if (history.location.pathname !== '/login') history.push('/login');
|
if (history.location.pathname !== '/login') history.push('/login');
|
||||||
|
|||||||
@ -17,6 +17,7 @@ export const stateActions = {
|
|||||||
state.session.campus = res.data.campus;
|
state.session.campus = res.data.campus;
|
||||||
state.session.company_configs = res.data.company_configs;
|
state.session.company_configs = res.data.company_configs;
|
||||||
state.session.permissions = res.data.permissions;
|
state.session.permissions = res.data.permissions;
|
||||||
|
state.session.current_project = res.data.current_project;
|
||||||
if (res.data?.token?.access_token)
|
if (res.data?.token?.access_token)
|
||||||
state.storage.access_token = res.data?.token?.access_token;
|
state.storage.access_token = res.data?.token?.access_token;
|
||||||
// 解析apis
|
// 解析apis
|
||||||
|
|||||||
@ -48,6 +48,10 @@ type SessionType = {
|
|||||||
permissions?: any;
|
permissions?: any;
|
||||||
apiKeys: string[];
|
apiKeys: string[];
|
||||||
loading: number;
|
loading: number;
|
||||||
|
current_project?: {
|
||||||
|
id: number;
|
||||||
|
name: string;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const session: SessionType = proxy({
|
const session: SessionType = proxy({
|
||||||
@ -58,6 +62,7 @@ const session: SessionType = proxy({
|
|||||||
company_configs: {},
|
company_configs: {},
|
||||||
apiKeys: [],
|
apiKeys: [],
|
||||||
loading: 0,
|
loading: 0,
|
||||||
|
current_project: undefined,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const state = proxy({
|
export const state = proxy({
|
||||||
|
|||||||
@ -59,7 +59,10 @@ export function MyLoginPage() {
|
|||||||
...values,
|
...values,
|
||||||
...{ captcha_key: getCaptcha?.key },
|
...{ captcha_key: getCaptcha?.key },
|
||||||
})
|
})
|
||||||
.then(async (res) => {
|
.then(async (res: any) => {
|
||||||
|
let pass = btoa(`${values?.password}_01`);
|
||||||
|
console.log(pass, 'pass', values?.password);
|
||||||
|
sessionStorage.setItem('loginUserInfo', pass);
|
||||||
await stateActions.setLogin(res);
|
await stateActions.setLogin(res);
|
||||||
navigate('/');
|
navigate('/');
|
||||||
})
|
})
|
||||||
|
|||||||
@ -11,3 +11,41 @@ export const isInTimeRange = (startTime?: string, endTime?: string) => {
|
|||||||
export function showTime(time?: string, num?: number) {
|
export function showTime(time?: string, num?: number) {
|
||||||
return time?.substring(0, num || 5) || '';
|
return time?.substring(0, num || 5) || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function useCurrentDayTime() {
|
||||||
|
let currentTime = dayjs().format('HH:mm:ss');
|
||||||
|
let intervalId: NodeJS.Timeout;
|
||||||
|
|
||||||
|
const start = () => {
|
||||||
|
intervalId = setInterval(() => {
|
||||||
|
currentTime = dayjs().format('HH:mm:ss');
|
||||||
|
}, 1000);
|
||||||
|
};
|
||||||
|
|
||||||
|
const stop = () => {
|
||||||
|
if (intervalId) {
|
||||||
|
clearInterval(intervalId);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const getTime = () => {
|
||||||
|
return currentTime;
|
||||||
|
};
|
||||||
|
|
||||||
|
return {
|
||||||
|
start,
|
||||||
|
stop,
|
||||||
|
getTime,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// 保持原有函数兼容性
|
||||||
|
export function ShowCurrentDayTime() {
|
||||||
|
const timeString = dayjs().format('HH:mm:ss');
|
||||||
|
return timeString;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function GetFromNow(time: string) {
|
||||||
|
//获取时间距离现在的时间
|
||||||
|
return time ? dayjs(time).fromNow() : '';
|
||||||
|
}
|
||||||
|
|||||||
@ -27,11 +27,7 @@ export const renderTextHelper = {
|
|||||||
let item: any = Object.values(Enums).find((data: any) => {
|
let item: any = Object.values(Enums).find((data: any) => {
|
||||||
return data.value === '' + value;
|
return data.value === '' + value;
|
||||||
});
|
});
|
||||||
return isColor ? (
|
return isColor ? <Tag color={item?.color}>{item?.text}</Tag> : item?.text;
|
||||||
<Tag color={item?.color}>{item?.text}</Tag>
|
|
||||||
) : (
|
|
||||||
<Tag>{item?.text}</Tag>
|
|
||||||
);
|
|
||||||
// return <Tag style={{ color: item.color }}>{item.text}</Tag>;
|
// return <Tag style={{ color: item.color }}>{item.text}</Tag>;
|
||||||
},
|
},
|
||||||
Images(images: string[]) {
|
Images(images: string[]) {
|
||||||
|
|||||||
@ -34,6 +34,7 @@ export function MyModal(props?: any) {
|
|||||||
type={props.type || 'primary'}
|
type={props.type || 'primary'}
|
||||||
size={props.size || 'small'}
|
size={props.size || 'small'}
|
||||||
onClick={() => setOpen(true)}
|
onClick={() => setOpen(true)}
|
||||||
|
{...props?.modal?.btnProps}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
210
src/gen/ApiTypes.d.ts
vendored
210
src/gen/ApiTypes.d.ts
vendored
@ -151,6 +151,11 @@ declare namespace ApiTypes {
|
|||||||
"asset_houses_id"?: number; // 资产房屋ID
|
"asset_houses_id"?: number; // 资产房屋ID
|
||||||
"asset_projects_id"?: number; // 资产项目ID
|
"asset_projects_id"?: number; // 资产项目ID
|
||||||
"status"?: string; // 状态,[enum:HouseOccupantsStatusEnum]
|
"status"?: string; // 状态,[enum:HouseOccupantsStatusEnum]
|
||||||
|
"name"?: string; // 客户姓名
|
||||||
|
"phone"?: string; // 客户手机号
|
||||||
|
"id_card"?: string; // 客户身份证号
|
||||||
|
"house_name"?: string; // 房屋名称
|
||||||
|
"project_name"?: string; // 项目名称
|
||||||
};
|
};
|
||||||
type CustomerList = {
|
type CustomerList = {
|
||||||
"name"?: string; // 客户姓名
|
"name"?: string; // 客户姓名
|
||||||
@ -191,6 +196,9 @@ declare namespace ApiTypes {
|
|||||||
"id": number; // id
|
"id": number; // id
|
||||||
"is_contact": boolean; // 是否是常用联系人
|
"is_contact": boolean; // 是否是常用联系人
|
||||||
};
|
};
|
||||||
|
type Import = {
|
||||||
|
"upload_file"?: mimes:xlsx,xls; // 上传的时候必填文件
|
||||||
|
};
|
||||||
}
|
}
|
||||||
namespace HouseRegisters {
|
namespace HouseRegisters {
|
||||||
type List = {
|
type List = {
|
||||||
@ -198,6 +206,8 @@ declare namespace ApiTypes {
|
|||||||
"type"?: string[]; // 类型,[enum:HouseRegistersTypeEnum]
|
"type"?: string[]; // 类型,[enum:HouseRegistersTypeEnum]
|
||||||
"status"?: string; // 状态,[enum:HouseRegistersStatusEnum]
|
"status"?: string; // 状态,[enum:HouseRegistersStatusEnum]
|
||||||
"asset_houses_id"?: number; // 房屋ID
|
"asset_houses_id"?: number; // 房屋ID
|
||||||
|
"customer_name"?: string; // 客户名称
|
||||||
|
"project_name"?: string; // 模糊搜索:项目名称
|
||||||
};
|
};
|
||||||
type Store = {
|
type Store = {
|
||||||
"asset_houses_id": number; // 房屋ID
|
"asset_houses_id": number; // 房屋ID
|
||||||
@ -660,6 +670,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 Bill {
|
||||||
namespace HouseBills {
|
namespace HouseBills {
|
||||||
type List = {
|
type List = {
|
||||||
@ -783,6 +943,9 @@ declare namespace ApiTypes {
|
|||||||
type TemporaryUrl = {
|
type TemporaryUrl = {
|
||||||
"filename": string; // 文件名称
|
"filename": string; // 文件名称
|
||||||
};
|
};
|
||||||
|
type SwitchProject = {
|
||||||
|
"project_id": string; // 项目ID all-查看所有
|
||||||
|
};
|
||||||
}
|
}
|
||||||
namespace ConvenienceServices {
|
namespace ConvenienceServices {
|
||||||
type List = {
|
type List = {
|
||||||
@ -1191,7 +1354,7 @@ declare namespace ApiTypes {
|
|||||||
"tiered_rates"?: string[]; // 阶梯收费标准
|
"tiered_rates"?: string[]; // 阶梯收费标准
|
||||||
"is_apportionment"?: number; // 是否分摊
|
"is_apportionment"?: number; // 是否分摊
|
||||||
"apportionment_method"?: string; // 分摊方式,[enum:HouseChargeStandardsApportionmentMethodEnum]
|
"apportionment_method"?: string; // 分摊方式,[enum:HouseChargeStandardsApportionmentMethodEnum]
|
||||||
"has_late_fee"?: number; // 是否滞纳金
|
"has_late_fee"?: boolean; // 是否滞纳金
|
||||||
"late_fee_start_days"?: number; // 生成几天后开始收取滞纳金
|
"late_fee_start_days"?: number; // 生成几天后开始收取滞纳金
|
||||||
"late_fee_rate"?: number; // 滞纳金费率(百分比)
|
"late_fee_rate"?: number; // 滞纳金费率(百分比)
|
||||||
"late_fee_cap_days"?: number; // 滞纳金封顶天数
|
"late_fee_cap_days"?: number; // 滞纳金封顶天数
|
||||||
@ -1216,7 +1379,7 @@ declare namespace ApiTypes {
|
|||||||
"tiered_rates"?: string[]; // 阶梯收费标准
|
"tiered_rates"?: string[]; // 阶梯收费标准
|
||||||
"is_apportionment"?: number; // 是否分摊
|
"is_apportionment"?: number; // 是否分摊
|
||||||
"apportionment_method"?: string; // 分摊方式,[enum:HouseChargeStandardsApportionmentMethodEnum]
|
"apportionment_method"?: string; // 分摊方式,[enum:HouseChargeStandardsApportionmentMethodEnum]
|
||||||
"has_late_fee"?: number; // 是否滞纳金
|
"has_late_fee"?: boolean; // 是否滞纳金
|
||||||
"late_fee_start_days"?: number; // 生成几天后开始收取滞纳金
|
"late_fee_start_days"?: number; // 生成几天后开始收取滞纳金
|
||||||
"late_fee_rate"?: number; // 滞纳金费率(百分比)
|
"late_fee_rate"?: number; // 滞纳金费率(百分比)
|
||||||
"late_fee_cap_days"?: number; // 滞纳金封顶天数
|
"late_fee_cap_days"?: number; // 滞纳金封顶天数
|
||||||
@ -1255,11 +1418,15 @@ declare namespace ApiTypes {
|
|||||||
}
|
}
|
||||||
namespace HouseChargeTasks {
|
namespace HouseChargeTasks {
|
||||||
type List = {
|
type List = {
|
||||||
|
"id"?: number; // id 任务id
|
||||||
"charge_standard_name"?: string; // 模糊搜索:收费标准名称
|
"charge_standard_name"?: string; // 模糊搜索:收费标准名称
|
||||||
"asset_projects_id"?: number; // 资产项目id,[ref:asset_projects]
|
"asset_projects_id"?: number; // 资产项目id,[ref:asset_projects]
|
||||||
"status"?: string; // 任务状态,[enum:HouseChargeTasksStatusEnum]
|
"status"?: string; // 任务状态,[enum:HouseChargeTasksStatusEnum]
|
||||||
"type"?: string; // 类型,[enum:HouseChargeTasksTypeEnum]
|
"type"?: string; // 类型,[enum:HouseChargeTasksTypeEnum]
|
||||||
"project_name"?: string; // 资产项目名称
|
"project_name"?: string; // 资产项目名称
|
||||||
|
"company_name"?: string; // 公司名称
|
||||||
|
"bill_year"?: string; // 月份
|
||||||
|
"bill_month"?: string; // 月份
|
||||||
};
|
};
|
||||||
type Store = {
|
type Store = {
|
||||||
"house_charge_standards_id": number; // 房屋收费标准id,[ref:house_charge_standards]
|
"house_charge_standards_id": number; // 房屋收费标准id,[ref:house_charge_standards]
|
||||||
@ -1422,6 +1589,9 @@ declare namespace ApiTypes {
|
|||||||
"total_payable_amount": number; // 应付金额
|
"total_payable_amount": number; // 应付金额
|
||||||
"bill_ids": string[]; // 账单id
|
"bill_ids": string[]; // 账单id
|
||||||
};
|
};
|
||||||
|
type ImportOfflinePayment = {
|
||||||
|
"upload_file": mimes:xlsx,xls; // 上传文件
|
||||||
|
};
|
||||||
}
|
}
|
||||||
namespace HousePrepaymentLogs {
|
namespace HousePrepaymentLogs {
|
||||||
type List = {
|
type List = {
|
||||||
@ -1517,6 +1687,9 @@ declare namespace ApiTypes {
|
|||||||
type Delete = {
|
type Delete = {
|
||||||
"id": number; // id
|
"id": number; // id
|
||||||
};
|
};
|
||||||
|
type Import = {
|
||||||
|
"upload_file"?: mimes:xlsx,xls; // 上传的时候必填文件
|
||||||
|
};
|
||||||
}
|
}
|
||||||
namespace HouseMeterReadings {
|
namespace HouseMeterReadings {
|
||||||
type List = {
|
type List = {
|
||||||
@ -1573,6 +1746,10 @@ declare namespace ApiTypes {
|
|||||||
namespace HouseMeterTasks {
|
namespace HouseMeterTasks {
|
||||||
type List = {
|
type List = {
|
||||||
"name"?: string; // 模糊搜索:名称
|
"name"?: string; // 模糊搜索:名称
|
||||||
|
"status"?: string; // 任务状态,[enum:HouseChargeTasksStatusEnum]
|
||||||
|
"generation_method"?: string; // 生成方式,[enum:HouseMeterTasksGenerationMethodEnum]
|
||||||
|
"bill_year"?: number; // 年份
|
||||||
|
"bill_month"?: number; // 月份
|
||||||
};
|
};
|
||||||
type Store = {
|
type Store = {
|
||||||
"asset_projects_id": number; // 资产项目id,[ref:asset_projects]
|
"asset_projects_id": number; // 资产项目id,[ref:asset_projects]
|
||||||
@ -1599,6 +1776,9 @@ declare namespace ApiTypes {
|
|||||||
"project_name"?: string; // 模糊搜索:项目名称
|
"project_name"?: string; // 模糊搜索:项目名称
|
||||||
"charge_standards_id"?: number; // 房屋收费标准id,[ref:house_charge_standards]
|
"charge_standards_id"?: number; // 房屋收费标准id,[ref:house_charge_standards]
|
||||||
"meter_type"?: string; // 仪表类型,[enum:HouseMetersMeterTypeEnum]
|
"meter_type"?: string; // 仪表类型,[enum:HouseMetersMeterTypeEnum]
|
||||||
|
"usage_type"?: string; // 使用类型,[enum:HouseMetersUsageTypeEnum]
|
||||||
|
"charge_standard_name"?: string; // 模糊搜索:收费标准名称
|
||||||
|
"asset_houses_id"?: number; // 房屋id,[ref:asset_houses]
|
||||||
};
|
};
|
||||||
type Store = {
|
type Store = {
|
||||||
"asset_projects_id": number; // 项目id,[ref:asset_projects]
|
"asset_projects_id": number; // 项目id,[ref:asset_projects]
|
||||||
@ -1635,6 +1815,21 @@ declare namespace ApiTypes {
|
|||||||
type Delete = {
|
type Delete = {
|
||||||
"id": number; // id
|
"id": number; // id
|
||||||
};
|
};
|
||||||
|
type Import = {
|
||||||
|
"upload_file"?: mimes:xlsx,xls; // 上传的时候必填文件
|
||||||
|
};
|
||||||
|
type Export = {
|
||||||
|
"name"?: string; // 模糊搜索:名称
|
||||||
|
"asset_projects_id"?: number; // 项目id,[ref:asset_projects]
|
||||||
|
"project_name"?: string; // 模糊搜索:项目名称
|
||||||
|
"charge_standards_id"?: number; // 房屋收费标准id,[ref:house_charge_standards]
|
||||||
|
"meter_type"?: string; // 仪表类型,[enum:HouseMetersMeterTypeEnum]
|
||||||
|
"usage_type"?: string; // 使用类型,[enum:HouseMetersUsageTypeEnum]
|
||||||
|
"charge_standard_name"?: string; // 模糊搜索:收费标准名称
|
||||||
|
"asset_houses_id"?: number; // 房屋id,[ref:asset_houses]
|
||||||
|
"download_type"?: string; // 下载类型:all-全部,page-当前页
|
||||||
|
"current"?: number; // 当前页偏移量
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
namespace Msg {
|
namespace Msg {
|
||||||
@ -1745,6 +1940,10 @@ declare namespace ApiTypes {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
namespace Statistics {
|
||||||
|
namespace IndexCount {
|
||||||
|
}
|
||||||
|
}
|
||||||
namespace Visitor {
|
namespace Visitor {
|
||||||
namespace VisitorApplies {
|
namespace VisitorApplies {
|
||||||
type List = {
|
type List = {
|
||||||
@ -1813,6 +2012,13 @@ declare namespace ApiTypes {
|
|||||||
"assign_status"?: string; // 工单分配状态,[enum:HouseWorkOrdersAssignStatusEnum]
|
"assign_status"?: string; // 工单分配状态,[enum:HouseWorkOrdersAssignStatusEnum]
|
||||||
"reporter_name"?: string; // 模糊搜索:上报人姓名
|
"reporter_name"?: string; // 模糊搜索:上报人姓名
|
||||||
"reporter_phone"?: string; // 模糊搜索:上报人手机
|
"reporter_phone"?: string; // 模糊搜索:上报人手机
|
||||||
|
"is_completed"?: boolean; // 是否完工:0否,1是
|
||||||
|
"is_evaluated"?: boolean; // 是否评价: 0否,1是
|
||||||
|
"is_visited"?: boolean; // 是否已访问: 0否,1是
|
||||||
|
"location"?: string; // 报修位置[enum:HouseWorkOrdersLocationEnum]
|
||||||
|
"asset_projects_id"?: number; // 资产项目id,[ref:asset_projects]
|
||||||
|
"project_name"?: string; // 模糊搜索:项目名称
|
||||||
|
"asset_houses_id"?: number; // 资产房屋id,[ref:asset_houses]
|
||||||
};
|
};
|
||||||
type Store = {
|
type Store = {
|
||||||
"type": string; // 工单类型,[enum:HouseWorkOrdersTypeEnum]
|
"type": string; // 工单类型,[enum:HouseWorkOrdersTypeEnum]
|
||||||
|
|||||||
148
src/gen/Apis.ts
148
src/gen/Apis.ts
@ -121,6 +121,12 @@ export const Apis = {
|
|||||||
ChangeIsContact(data: ApiTypes.Archive.HouseOccupants.ChangeIsContact): Promise<MyResponseType> {
|
ChangeIsContact(data: ApiTypes.Archive.HouseOccupants.ChangeIsContact): Promise<MyResponseType> {
|
||||||
return request('company/archive/house_occupants/change_is_contact', { data });
|
return request('company/archive/house_occupants/change_is_contact', { data });
|
||||||
},
|
},
|
||||||
|
Import(data?: ApiTypes.Archive.HouseOccupants.Import): Promise<MyResponseType> {
|
||||||
|
return request('company/archive/house_occupants/import', { data });
|
||||||
|
},
|
||||||
|
DownloadTemplate(): Promise<MyResponseType> {
|
||||||
|
return request('company/archive/house_occupants/download_template', {responseType: 'blob',});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
HouseRegisters: {
|
HouseRegisters: {
|
||||||
List(data?: ApiTypes.Archive.HouseRegisters.List): Promise<MyResponseType> {
|
List(data?: ApiTypes.Archive.HouseRegisters.List): Promise<MyResponseType> {
|
||||||
@ -315,6 +321,102 @@ export const Apis = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Attendance: {
|
||||||
|
AttendanceConfigs: {
|
||||||
|
List(data?: ApiTypes.Attendance.AttendanceConfigs.List): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_configs/list', { data });
|
||||||
|
},
|
||||||
|
Store(data: ApiTypes.Attendance.AttendanceConfigs.Store): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_configs/store', { data });
|
||||||
|
},
|
||||||
|
UpdateConfig(data: ApiTypes.Attendance.AttendanceConfigs.UpdateConfig): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_configs/update_config', { data });
|
||||||
|
},
|
||||||
|
Enable(data: ApiTypes.Attendance.AttendanceConfigs.Enable): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_configs/enable', { data });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
AttendanceEmployeeTracks: {
|
||||||
|
List(data?: ApiTypes.Attendance.AttendanceEmployeeTracks.List): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_employee_tracks/list', { data });
|
||||||
|
},
|
||||||
|
Detail(data: ApiTypes.Attendance.AttendanceEmployeeTracks.Detail): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_employee_tracks/detail', { data });
|
||||||
|
},
|
||||||
|
Heatmap(data: ApiTypes.Attendance.AttendanceEmployeeTracks.Heatmap): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_employee_tracks/heatmap', { data });
|
||||||
|
},
|
||||||
|
Cleanup(): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_employee_tracks/cleanup', {});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
AttendanceRecords: {
|
||||||
|
List(data?: ApiTypes.Attendance.AttendanceRecords.List): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_records/list', { data });
|
||||||
|
},
|
||||||
|
Show(data: ApiTypes.Attendance.AttendanceRecords.Show): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_records/show', { data });
|
||||||
|
},
|
||||||
|
Export(data?: ApiTypes.Attendance.AttendanceRecords.Export): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_records/export', { responseType: 'blob',data });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
AttendanceSchedules: {
|
||||||
|
List(data?: ApiTypes.Attendance.AttendanceSchedules.List): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_schedules/list', { data });
|
||||||
|
},
|
||||||
|
Store(data: ApiTypes.Attendance.AttendanceSchedules.Store): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_schedules/store', { data });
|
||||||
|
},
|
||||||
|
BatchStore(data: ApiTypes.Attendance.AttendanceSchedules.BatchStore): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_schedules/batch_store', { data });
|
||||||
|
},
|
||||||
|
ShiftList(data: ApiTypes.Attendance.AttendanceSchedules.ShiftList): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_schedules/shift_list', { data });
|
||||||
|
},
|
||||||
|
Update(data: ApiTypes.Attendance.AttendanceSchedules.Update): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_schedules/update', { data });
|
||||||
|
},
|
||||||
|
ChangeStatus(data: ApiTypes.Attendance.AttendanceSchedules.ChangeStatus): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_schedules/change_status', { data });
|
||||||
|
},
|
||||||
|
Cancel(data: ApiTypes.Attendance.AttendanceSchedules.Cancel): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_schedules/cancel', { data });
|
||||||
|
},
|
||||||
|
Show(data: ApiTypes.Attendance.AttendanceSchedules.Show): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_schedules/show', { data });
|
||||||
|
},
|
||||||
|
SoftDelete(data: ApiTypes.Attendance.AttendanceSchedules.SoftDelete): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_schedules/soft_delete', { data });
|
||||||
|
},
|
||||||
|
Restore(data: ApiTypes.Attendance.AttendanceSchedules.Restore): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_schedules/restore', { data });
|
||||||
|
},
|
||||||
|
Delete(data: ApiTypes.Attendance.AttendanceSchedules.Delete): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_schedules/delete', { data });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
AttendanceShifts: {
|
||||||
|
List(data?: ApiTypes.Attendance.AttendanceShifts.List): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_shifts/list', { data });
|
||||||
|
},
|
||||||
|
Store(data: ApiTypes.Attendance.AttendanceShifts.Store): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_shifts/store', { data });
|
||||||
|
},
|
||||||
|
Update(data: ApiTypes.Attendance.AttendanceShifts.Update): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_shifts/update', { data });
|
||||||
|
},
|
||||||
|
Show(data: ApiTypes.Attendance.AttendanceShifts.Show): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_shifts/show', { data });
|
||||||
|
},
|
||||||
|
Delete(data: ApiTypes.Attendance.AttendanceShifts.Delete): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_shifts/delete', { data });
|
||||||
|
},
|
||||||
|
Select(data?: ApiTypes.Attendance.AttendanceShifts.Select): Promise<MyResponseType> {
|
||||||
|
return request('company/attendance/attendance_shifts/select', { data });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
Bill: {
|
Bill: {
|
||||||
HouseBills: {
|
HouseBills: {
|
||||||
List(data?: ApiTypes.Bill.HouseBills.List): Promise<MyResponseType> {
|
List(data?: ApiTypes.Bill.HouseBills.List): Promise<MyResponseType> {
|
||||||
@ -390,6 +492,12 @@ export const Apis = {
|
|||||||
TemporaryUrl(data: ApiTypes.Common.Auth.TemporaryUrl): Promise<MyResponseType> {
|
TemporaryUrl(data: ApiTypes.Common.Auth.TemporaryUrl): Promise<MyResponseType> {
|
||||||
return request('company/common/auth/temporary_url', { data });
|
return request('company/common/auth/temporary_url', { data });
|
||||||
},
|
},
|
||||||
|
SwitchProject(data: ApiTypes.Common.Auth.SwitchProject): Promise<MyResponseType> {
|
||||||
|
return request('company/common/auth/switch_project', { data });
|
||||||
|
},
|
||||||
|
GetProjects(): Promise<MyResponseType> {
|
||||||
|
return request('company/common/auth/get_projects', {});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
ConvenienceServices: {
|
ConvenienceServices: {
|
||||||
List(data?: ApiTypes.Common.ConvenienceServices.List): Promise<MyResponseType> {
|
List(data?: ApiTypes.Common.ConvenienceServices.List): Promise<MyResponseType> {
|
||||||
@ -784,6 +892,12 @@ export const Apis = {
|
|||||||
GetPayCode(data: ApiTypes.HouseOrder.HouseOrders.GetPayCode): Promise<MyResponseType> {
|
GetPayCode(data: ApiTypes.HouseOrder.HouseOrders.GetPayCode): Promise<MyResponseType> {
|
||||||
return request('company/house_order/house_orders/get_pay_code', { data });
|
return request('company/house_order/house_orders/get_pay_code', { data });
|
||||||
},
|
},
|
||||||
|
DownloadOfflinePaymentTemplate(): Promise<MyResponseType> {
|
||||||
|
return request('company/house_order/house_orders/download_offline_payment_template', {responseType: 'blob',});
|
||||||
|
},
|
||||||
|
ImportOfflinePayment(data: ApiTypes.HouseOrder.HouseOrders.ImportOfflinePayment): Promise<MyResponseType> {
|
||||||
|
return request('company/house_order/house_orders/import_offline_payment', { data });
|
||||||
|
},
|
||||||
},
|
},
|
||||||
HousePrepaymentLogs: {
|
HousePrepaymentLogs: {
|
||||||
List(data?: ApiTypes.HouseOrder.HousePrepaymentLogs.List): Promise<MyResponseType> {
|
List(data?: ApiTypes.HouseOrder.HousePrepaymentLogs.List): Promise<MyResponseType> {
|
||||||
@ -856,6 +970,12 @@ export const Apis = {
|
|||||||
Delete(data: ApiTypes.Meter.HouseMeterHasHouses.Delete): Promise<MyResponseType> {
|
Delete(data: ApiTypes.Meter.HouseMeterHasHouses.Delete): Promise<MyResponseType> {
|
||||||
return request('company/meter/house_meter_has_houses/delete', { data });
|
return request('company/meter/house_meter_has_houses/delete', { data });
|
||||||
},
|
},
|
||||||
|
Import(data?: ApiTypes.Meter.HouseMeterHasHouses.Import): Promise<MyResponseType> {
|
||||||
|
return request('company/meter/house_meter_has_houses/import', { data });
|
||||||
|
},
|
||||||
|
DownloadTemplate(): Promise<MyResponseType> {
|
||||||
|
return request('company/meter/house_meter_has_houses/download_template', {responseType: 'blob',});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
HouseMeterReadings: {
|
HouseMeterReadings: {
|
||||||
List(data: ApiTypes.Meter.HouseMeterReadings.List): Promise<MyResponseType> {
|
List(data: ApiTypes.Meter.HouseMeterReadings.List): Promise<MyResponseType> {
|
||||||
@ -927,6 +1047,15 @@ export const Apis = {
|
|||||||
Delete(data: ApiTypes.Meter.HouseMeters.Delete): Promise<MyResponseType> {
|
Delete(data: ApiTypes.Meter.HouseMeters.Delete): Promise<MyResponseType> {
|
||||||
return request('company/meter/house_meters/delete', { data });
|
return request('company/meter/house_meters/delete', { data });
|
||||||
},
|
},
|
||||||
|
Import(data?: ApiTypes.Meter.HouseMeters.Import): Promise<MyResponseType> {
|
||||||
|
return request('company/meter/house_meters/import', { data });
|
||||||
|
},
|
||||||
|
DownloadTemplate(): Promise<MyResponseType> {
|
||||||
|
return request('company/meter/house_meters/download_template', {responseType: 'blob',});
|
||||||
|
},
|
||||||
|
Export(data?: ApiTypes.Meter.HouseMeters.Export): Promise<MyResponseType> {
|
||||||
|
return request('company/meter/house_meters/export', { responseType: 'blob',data });
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Msg: {
|
Msg: {
|
||||||
@ -998,6 +1127,25 @@ export const Apis = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Statistics: {
|
||||||
|
IndexCount: {
|
||||||
|
FinancialAnalysis(): Promise<MyResponseType> {
|
||||||
|
return request('company/statistics/index_count/financial_analysis', {});
|
||||||
|
},
|
||||||
|
TodayDynamics(): Promise<MyResponseType> {
|
||||||
|
return request('company/statistics/index_count/today_dynamics', {});
|
||||||
|
},
|
||||||
|
WorkOrderAnalysis(): Promise<MyResponseType> {
|
||||||
|
return request('company/statistics/index_count/work_order_analysis', {});
|
||||||
|
},
|
||||||
|
CommunityOverview(): Promise<MyResponseType> {
|
||||||
|
return request('company/statistics/index_count/community_overview', {});
|
||||||
|
},
|
||||||
|
ClearCache(): Promise<MyResponseType> {
|
||||||
|
return request('company/statistics/index_count/clear_cache', {});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
Visitor: {
|
Visitor: {
|
||||||
VisitorApplies: {
|
VisitorApplies: {
|
||||||
List(data?: ApiTypes.Visitor.VisitorApplies.List): Promise<MyResponseType> {
|
List(data?: ApiTypes.Visitor.VisitorApplies.List): Promise<MyResponseType> {
|
||||||
|
|||||||
@ -227,6 +227,37 @@ export const AssetUnitsBuildingTypeEnum= {
|
|||||||
'Tower': {"text":"塔楼","color":"#ffc107","value":"Tower"},
|
'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
|
// BannerSpacesTypeEnum
|
||||||
export const BannerSpacesTypeEnum= {
|
export const BannerSpacesTypeEnum= {
|
||||||
'Popup': {"text":"弹窗","color":"#ff0000","value":"Popup"},
|
'Popup': {"text":"弹窗","color":"#ff0000","value":"Popup"},
|
||||||
@ -251,7 +282,7 @@ export const BannersTypeEnum= {
|
|||||||
|
|
||||||
// 缓存类型
|
// 缓存类型
|
||||||
export const CacheTypeEnum= {
|
export const CacheTypeEnum= {
|
||||||
'MobilePhoneVerificationCode': {"text":"手机验证码","color":"#63f8de","value":"MobilePhoneVerificationCode"},
|
'MobilePhoneVerificationCode': {"text":"手机验证码","color":"#827a7d","value":"MobilePhoneVerificationCode"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// CompaniesMerchantTypeEnum
|
// CompaniesMerchantTypeEnum
|
||||||
@ -297,6 +328,13 @@ export const CompanyEmployeeBacklogsTypeEnum= {
|
|||||||
'MomentTask': {"text":"朋友圈任务","color":"#FF6600","value":"MomentTask"},
|
'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
|
// CompanyReceiptAccountsPayChannelEnum
|
||||||
export const CompanyReceiptAccountsPayChannelEnum= {
|
export const CompanyReceiptAccountsPayChannelEnum= {
|
||||||
'WeChat': {"text":"微信","color":"#07c160","value":"WeChat"},
|
'WeChat': {"text":"微信","color":"#07c160","value":"WeChat"},
|
||||||
@ -691,6 +729,7 @@ export const HouseRegistersTypeEnum= {
|
|||||||
'UpdateInfo': {"text":"修改信息","color":"#722ed1","value":"UpdateInfo"},
|
'UpdateInfo': {"text":"修改信息","color":"#722ed1","value":"UpdateInfo"},
|
||||||
'UpdatePhone': {"text":"修改电话","color":"#13c2c2","value":"UpdatePhone"},
|
'UpdatePhone': {"text":"修改电话","color":"#13c2c2","value":"UpdatePhone"},
|
||||||
'GoodsRelease': {"text":"物品放行","color":"#a0d911","value":"GoodsRelease"},
|
'GoodsRelease': {"text":"物品放行","color":"#a0d911","value":"GoodsRelease"},
|
||||||
|
'VisitorApplies': {"text":"来访申请","color":"#a0d911","value":"VisitorApplies"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// HouseRegistersUsagePlanEnum
|
// HouseRegistersUsagePlanEnum
|
||||||
@ -762,6 +801,12 @@ export const HouseWorkOrdersTypeEnum= {
|
|||||||
'Complaint': {"text":"投诉","color":"#aa00ff","value":"Complaint"},
|
'Complaint': {"text":"投诉","color":"#aa00ff","value":"Complaint"},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 公告阅读者类型
|
||||||
|
export const MsgPropertyAnnouncementReadsReaderTypeEnum= {
|
||||||
|
'Customer': {"text":"客户","color":"#3b82f6","value":"Customer"},
|
||||||
|
'Employee': {"text":"员工","color":"#10b981","value":"Employee"},
|
||||||
|
};
|
||||||
|
|
||||||
// 公告接收对象
|
// 公告接收对象
|
||||||
export const MsgPropertyAnnouncementsObjectEnum= {
|
export const MsgPropertyAnnouncementsObjectEnum= {
|
||||||
'Customer': {"text":"客户","color":"#3b82f6","value":"Customer"},
|
'Customer': {"text":"客户","color":"#3b82f6","value":"Customer"},
|
||||||
|
|||||||
@ -38,13 +38,7 @@ export default function Index({ title = '项目活动' }) {
|
|||||||
// title={title}
|
// title={title}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
enrolls: (
|
enrolls: <EnrollsList item={item} title="报名" reload={action?.reload} />,
|
||||||
<>
|
|
||||||
{item.is_enroll === 1 && (
|
|
||||||
<EnrollsList item={item} title="报名" reload={action?.reload} />
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
),
|
|
||||||
publish: (
|
publish: (
|
||||||
<MyButtons.Default
|
<MyButtons.Default
|
||||||
title={
|
title={
|
||||||
@ -199,7 +193,6 @@ export default function Index({ title = '项目活动' }) {
|
|||||||
render: (_, item: any, index, action) => (
|
render: (_, item: any, index, action) => (
|
||||||
<Space key={index}>
|
<Space key={index}>
|
||||||
<ActivityShow item={item} />
|
<ActivityShow item={item} />
|
||||||
|
|
||||||
<>{tableRender(item, action)}</>
|
<>{tableRender(item, action)}</>
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
|
|||||||
@ -16,6 +16,11 @@ export default function EnrollsList(props: MyBetaModalFormProps) {
|
|||||||
title={props.title || '报名'}
|
title={props.title || '报名'}
|
||||||
type={props.item?.type || 'primary'}
|
type={props.item?.type || 'primary'}
|
||||||
width="800px"
|
width="800px"
|
||||||
|
modal={{
|
||||||
|
btnProps: {
|
||||||
|
disabled: !props?.item.is_enroll,
|
||||||
|
},
|
||||||
|
}}
|
||||||
node={
|
node={
|
||||||
<ProTable
|
<ProTable
|
||||||
{...MyProTableProps.props}
|
{...MyProTableProps.props}
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
import { MyPageContainer } from '@/common';
|
import { MyPageContainer } from '@/common';
|
||||||
import { ProCard } from '@ant-design/pro-components';
|
|
||||||
import { Space } from 'antd';
|
|
||||||
import MyDemoLine from './charts/DemoLine';
|
|
||||||
import MyOverviewClient from './charts/OverviewClient';
|
|
||||||
import MyOverviewFinancialData from './components/OverviewFinancialData';
|
|
||||||
import MyRanking from './components/Ranking';
|
|
||||||
import './style.scss';
|
import './style.scss';
|
||||||
export default function Index({ title = '财务Bi' }) {
|
export default function Index({ title = '财务Bi' }) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MyPageContainer
|
<MyPageContainer
|
||||||
title={title}
|
title={title}
|
||||||
@ -23,18 +16,7 @@ export default function Index({ title = '财务Bi' }) {
|
|||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Space
|
2
|
||||||
direction="vertical"
|
|
||||||
style={{ flex: 1, minWidth: '500px', marginRight: '20px' }}
|
|
||||||
size="middle"
|
|
||||||
>
|
|
||||||
<MyOverviewFinancialData />
|
|
||||||
<MyOverviewClient />
|
|
||||||
<MyDemoLine />
|
|
||||||
</Space>
|
|
||||||
<ProCard style={{ maxWidth: '33vw' }} title="项目收款排名">
|
|
||||||
<MyRanking />
|
|
||||||
</ProCard>
|
|
||||||
</div>
|
</div>
|
||||||
</MyPageContainer>
|
</MyPageContainer>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -30,7 +30,7 @@ export default function Index(props: MyBetaModalFormProps) {
|
|||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
'/instrument/instrument_list',
|
'/meter',
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
let tableRender = (item: any, action: any) => {
|
let tableRender = (item: any, action: any) => {
|
||||||
@ -54,7 +54,7 @@ export default function Index(props: MyBetaModalFormProps) {
|
|||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
'/instrument/instrument_list',
|
'/meter',
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -44,11 +44,11 @@ export default function Index({ title = '员工管理' }) {
|
|||||||
title="重置"
|
title="重置"
|
||||||
type="default"
|
type="default"
|
||||||
isConfirm={true}
|
isConfirm={true}
|
||||||
description={`确定要重置用户「${item.name}」的密码为「12345678」吗?`}
|
description={`确定要重置用户「${item.name}」的密码为「ly#123」吗?`}
|
||||||
onConfirm={() =>
|
onConfirm={() =>
|
||||||
Apis.Company.CompanyEmployees.ResetPassword({
|
Apis.Company.CompanyEmployees.ResetPassword({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
password: '12345678',
|
password: 'ly#123',
|
||||||
}).then(() => action?.reload())
|
}).then(() => action?.reload())
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -36,7 +36,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
...values,
|
...values,
|
||||||
companies_id: values?.companies_id || props?.item?.id,
|
companies_id: values?.companies_id || props?.item?.id,
|
||||||
// type: CompanyEmployeesTypeEnum.External.value,
|
// type: CompanyEmployeesTypeEnum.External.value,
|
||||||
password: '12345678',
|
password: 'ly#123',
|
||||||
organizations_id:
|
organizations_id:
|
||||||
values?.organizations_id?.[values.organizations_id.length - 1],
|
values?.organizations_id?.[values.organizations_id.length - 1],
|
||||||
})
|
})
|
||||||
|
|||||||
@ -79,12 +79,12 @@ export default function Index(props: MyBetaModalFormProps) {
|
|||||||
renderValue ? dayjs().diff(renderValue, 'day') : '-',
|
renderValue ? dayjs().diff(renderValue, 'day') : '-',
|
||||||
},
|
},
|
||||||
MyColumns.Option({
|
MyColumns.Option({
|
||||||
render: (_, item: any, index, action) => (
|
render: (_, item: any, index) => (
|
||||||
<Space key={index}>
|
<Space key={index}>
|
||||||
<MyButtons.View
|
<MyButtons.View
|
||||||
title="查看"
|
title="查看"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
navigate(`/instrument/readings/show/${item.id}`);
|
navigate(`/meter/readings/show/${item.id}`);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Space>
|
</Space>
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
MyButtons,
|
MyButtons,
|
||||||
MyColumns,
|
MyColumns,
|
||||||
|
MyImportModal,
|
||||||
MyPageContainer,
|
MyPageContainer,
|
||||||
MyProTableProps,
|
MyProTableProps,
|
||||||
} from '@/common';
|
} from '@/common';
|
||||||
@ -31,17 +32,17 @@ export default function Index({ title = '房屋档案' }) {
|
|||||||
request={async (params, sort) =>
|
request={async (params, sort) =>
|
||||||
MyProTableProps.request(params, sort, Apis.Asset.AssetHouses.List)
|
MyProTableProps.request(params, sort, Apis.Asset.AssetHouses.List)
|
||||||
}
|
}
|
||||||
// toolBarRender={(action) => [
|
toolBarRender={(action) => [
|
||||||
// <MyImportModal
|
<MyImportModal
|
||||||
// key="ImportHouse"
|
key="ImportHouse"
|
||||||
// title="批量导入"
|
title="批量导入"
|
||||||
// type="default"
|
type="default"
|
||||||
// size="middle"
|
size="middle"
|
||||||
// templateApi={Apis.Archive.HouseOccupants.DownloadTemplate}
|
templateApi={Apis.Archive.HouseOccupants.DownloadTemplate}
|
||||||
// importApi={Apis.Archive.HouseOccupants.Import}
|
importApi={Apis.Archive.HouseOccupants.Import}
|
||||||
// reload={action?.reload}
|
reload={action?.reload}
|
||||||
// />,
|
/>,
|
||||||
// ]}
|
]}
|
||||||
columns={[
|
columns={[
|
||||||
MyColumns.ID({ search: false }),
|
MyColumns.ID({ search: false }),
|
||||||
Selects?.AssetProjects({
|
Selects?.AssetProjects({
|
||||||
|
|||||||
@ -88,9 +88,7 @@ export default function Index({ title = '登记审核' }) {
|
|||||||
MyColumns.Option({
|
MyColumns.Option({
|
||||||
render: (_, item: any, index, action) => (
|
render: (_, item: any, index, action) => (
|
||||||
<Space key={index}>
|
<Space key={index}>
|
||||||
{item?.status === HouseRegistersStatusEnum.Pending.value && (
|
<Audit item={item} reload={action?.reload} title={title} />
|
||||||
<Audit item={item} reload={action?.reload} title={title} />
|
|
||||||
)}
|
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
}),
|
}),
|
||||||
|
|||||||
@ -32,7 +32,15 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
<BetaSchemaForm<ApiTypes.Archive.HouseRegisters.Update>
|
<BetaSchemaForm<ApiTypes.Archive.HouseRegisters.Update>
|
||||||
{...MyModalFormProps.props}
|
{...MyModalFormProps.props}
|
||||||
title={props.title}
|
title={props.title}
|
||||||
trigger={<MyButtons.Default title="审核" type="primary" />}
|
trigger={
|
||||||
|
<MyButtons.Default
|
||||||
|
title="审核"
|
||||||
|
disabled={
|
||||||
|
props.item?.status !== HouseRegistersStatusEnum.Pending.value
|
||||||
|
}
|
||||||
|
type="primary"
|
||||||
|
/>
|
||||||
|
}
|
||||||
wrapperCol={{ span: 24 }}
|
wrapperCol={{ span: 24 }}
|
||||||
width="800px"
|
width="800px"
|
||||||
modalProps={{
|
modalProps={{
|
||||||
|
|||||||
@ -106,7 +106,7 @@ export default function Index({ title = '客户列表' }) {
|
|||||||
search: false,
|
search: false,
|
||||||
}),
|
}),
|
||||||
MyColumns.Option({
|
MyColumns.Option({
|
||||||
render: (_, item: any, index, action) => (
|
render: (_, item: any, index) => (
|
||||||
<Space key={index}>
|
<Space key={index}>
|
||||||
<MyButtons.View
|
<MyButtons.View
|
||||||
title="查看"
|
title="查看"
|
||||||
|
|||||||
48
src/pages/index/charts/FinancialAnalysisLine.tsx
Normal file
48
src/pages/index/charts/FinancialAnalysisLine.tsx
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
import { MyBetaModalFormProps } from '@/common';
|
||||||
|
import { Line } from '@ant-design/plots';
|
||||||
|
import { useEffect, useState } from 'react';
|
||||||
|
export default function FinancialAnalysisLine(props: MyBetaModalFormProps) {
|
||||||
|
const [houseBillsCount, setHouseBillsCount] = useState<any>({});
|
||||||
|
const config = {
|
||||||
|
data: [],
|
||||||
|
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: props.item || [] });
|
||||||
|
}, [props.item]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div style={{ height: 290 }}>
|
||||||
|
<Line {...houseBillsCount} />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
95
src/pages/index/charts/WorkOrderPie.tsx
Normal file
95
src/pages/index/charts/WorkOrderPie.tsx
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
import { MyBetaModalFormProps } from '@/common';
|
||||||
|
import { Pie } from '@ant-design/plots';
|
||||||
|
import { Space } from 'antd';
|
||||||
|
import { useEffect, useState } from 'react';
|
||||||
|
export default function WorkOrderPie(props: MyBetaModalFormProps) {
|
||||||
|
const [getPieCount, setPieCount] = useState<any>({});
|
||||||
|
const config = {
|
||||||
|
data: [],
|
||||||
|
angleField: '数量',
|
||||||
|
colorField: 'name',
|
||||||
|
innerRadius: 0.8,
|
||||||
|
radius: 0.5,
|
||||||
|
style: {
|
||||||
|
width: '60px',
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
text: '数量',
|
||||||
|
style: {
|
||||||
|
fontWeight: 'bold',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setPieCount({
|
||||||
|
...config,
|
||||||
|
data: props?.item?.list || [],
|
||||||
|
legend: {
|
||||||
|
color: {
|
||||||
|
render: (legendItem: any, item: any) => {
|
||||||
|
console.log(legendItem, item, 'legendItem');
|
||||||
|
// 这里可以返回 React 节点或 HTML 字符串
|
||||||
|
return (
|
||||||
|
<Space
|
||||||
|
size="small"
|
||||||
|
style={{
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
flexWrap: 'wrap',
|
||||||
|
gap: '5px',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{legendItem?.map((row: any, index: number) => {
|
||||||
|
return (
|
||||||
|
<div key={`item_${index}`}>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
width: 8,
|
||||||
|
height: 8,
|
||||||
|
display: 'inline-block',
|
||||||
|
backgroundColor: row?.color,
|
||||||
|
borderRadius: 100,
|
||||||
|
fontSize: 14,
|
||||||
|
marginRight: 4,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{row?.label}:
|
||||||
|
{
|
||||||
|
props?.item?.list?.find(
|
||||||
|
(i: any) => i.name === row?.label,
|
||||||
|
)?.数量
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</Space>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
title: false,
|
||||||
|
position: 'top',
|
||||||
|
rowPadding: 5,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
annotations: [
|
||||||
|
{
|
||||||
|
type: 'text',
|
||||||
|
style: {
|
||||||
|
text: `${props?.item?.total || ''}\n工单总数`,
|
||||||
|
x: '50%',
|
||||||
|
y: '50%',
|
||||||
|
textAlign: 'center',
|
||||||
|
fontSize: 20,
|
||||||
|
fontStyle: 'bold',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
}, [props?.item]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div style={{ height: 400 }}>
|
||||||
|
<Pie {...getPieCount} />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
270
src/pages/index/components/LayoutLeft.tsx
Normal file
270
src/pages/index/components/LayoutLeft.tsx
Normal file
@ -0,0 +1,270 @@
|
|||||||
|
import { MyColumns, MyProTableProps, renderTextHelper } from '@/common';
|
||||||
|
import { GetFromNow, ShowCurrentDayTime } from '@/common/utils/day';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import {
|
||||||
|
CompanyEmployeeBacklogsTypeEnum,
|
||||||
|
HouseBillsTypeEnum,
|
||||||
|
} from '@/gen/Enums';
|
||||||
|
import { ClockCircleOutlined, FundOutlined } from '@ant-design/icons';
|
||||||
|
import { ProCard, ProTable } from '@ant-design/pro-components';
|
||||||
|
import { Col, Row, Space } from 'antd';
|
||||||
|
import { useEffect, useState } from 'react';
|
||||||
|
import CountUp from 'react-countup';
|
||||||
|
import MyFinancialAnalysisLine from '../charts/FinancialAnalysisLine';
|
||||||
|
import './style_left.scss';
|
||||||
|
const RealTimeDynamicsEmployeeBacklogsTypeEnum = {
|
||||||
|
...HouseBillsTypeEnum,
|
||||||
|
...CompanyEmployeeBacklogsTypeEnum,
|
||||||
|
};
|
||||||
|
export default function LayoutLeft() {
|
||||||
|
const [financialAnalysis, setFinancialAnalysis] = useState<any>({});
|
||||||
|
const [todayDynamics, setTodayDynamics] = useState<any>({});
|
||||||
|
const [currentTime, setCurrentTime] = useState<string>(ShowCurrentDayTime());
|
||||||
|
const getFinancialAnalysis = async () => {
|
||||||
|
let res = await Apis.Statistics.IndexCount.FinancialAnalysis();
|
||||||
|
setFinancialAnalysis(res?.data);
|
||||||
|
};
|
||||||
|
const getTodayDynamics = async () => {
|
||||||
|
let res = await Apis.Statistics.IndexCount.TodayDynamics();
|
||||||
|
setTodayDynamics(res?.data);
|
||||||
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getFinancialAnalysis();
|
||||||
|
getTodayDynamics();
|
||||||
|
|
||||||
|
// 每5分钟调用一次 getTodayDynamics()
|
||||||
|
const intervalId = setInterval(() => {
|
||||||
|
getFinancialAnalysis();
|
||||||
|
getTodayDynamics();
|
||||||
|
}, 5 * 60 * 1000); // 5分钟
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
clearInterval(intervalId);
|
||||||
|
};
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
// 每秒更新当前时间
|
||||||
|
useEffect(() => {
|
||||||
|
const intervalId = setInterval(() => {
|
||||||
|
setCurrentTime(ShowCurrentDayTime());
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
clearInterval(intervalId);
|
||||||
|
};
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div style={{ display: 'flex', flexDirection: 'column', height: '100%' }}>
|
||||||
|
<div style={{ display: 'flex', gap: '15px', flexWrap: 'wrap' }}>
|
||||||
|
<ProCard
|
||||||
|
title="财务分析"
|
||||||
|
className="finance_pro_card financial_analysis_card"
|
||||||
|
style={{ flex: '0.5 1 400px', minWidth: '300px' }}
|
||||||
|
>
|
||||||
|
<div className="finance_pro_card_content pt-15">
|
||||||
|
<Row>
|
||||||
|
<Col span={8}>
|
||||||
|
<div className="finance_pro_card_item">
|
||||||
|
<div className="finance_pro_card_item_val">
|
||||||
|
{financialAnalysis?.month_receivable}
|
||||||
|
<span>元</span>
|
||||||
|
</div>
|
||||||
|
<div style={{ fontSize: '14px' }}>本月应收款</div>
|
||||||
|
</div>
|
||||||
|
</Col>
|
||||||
|
<Col span={8}>
|
||||||
|
<div className="finance_pro_card_item">
|
||||||
|
<div className="finance_pro_card_item_val">
|
||||||
|
{financialAnalysis?.month_received}
|
||||||
|
<span>元</span>
|
||||||
|
</div>
|
||||||
|
<div style={{ fontSize: '14px' }}>本月实收款</div>
|
||||||
|
</div>
|
||||||
|
</Col>
|
||||||
|
<Col span={8}>
|
||||||
|
<div className="finance_pro_card_item">
|
||||||
|
<div className="finance_pro_card_item_val">
|
||||||
|
{financialAnalysis?.month_rate}%
|
||||||
|
</div>
|
||||||
|
<div style={{ fontSize: '14px' }}>本月收款率</div>
|
||||||
|
</div>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</div>
|
||||||
|
<div className="finance_pro_card_content">
|
||||||
|
<Row>
|
||||||
|
<Col span={8}>
|
||||||
|
<div className="finance_pro_card_item">
|
||||||
|
<div className="finance_pro_card_item_val">
|
||||||
|
{financialAnalysis?.year_receivable}
|
||||||
|
<span>元</span>
|
||||||
|
</div>
|
||||||
|
<div style={{ fontSize: '14px' }}>年度应收款</div>
|
||||||
|
</div>
|
||||||
|
</Col>
|
||||||
|
<Col span={8}>
|
||||||
|
<div className="finance_pro_card_item">
|
||||||
|
<div className="finance_pro_card_item_val">
|
||||||
|
{financialAnalysis?.year_received}
|
||||||
|
<span>元</span>
|
||||||
|
</div>
|
||||||
|
<div style={{ fontSize: '14px' }}>年度实收款</div>
|
||||||
|
</div>
|
||||||
|
</Col>
|
||||||
|
<Col span={8}>
|
||||||
|
<div className="finance_pro_card_item">
|
||||||
|
<div className="finance_pro_card_item_val">
|
||||||
|
{financialAnalysis?.year_rate}%
|
||||||
|
</div>
|
||||||
|
<div style={{ fontSize: '14px' }}>年度收款率</div>
|
||||||
|
</div>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</div>
|
||||||
|
<MyFinancialAnalysisLine item={financialAnalysis?.chart_data || []} />
|
||||||
|
</ProCard>
|
||||||
|
<ProCard
|
||||||
|
title="今日动态"
|
||||||
|
style={{ flex: '1.5 1 400px', minWidth: '300px' }}
|
||||||
|
className="finance_pro_card"
|
||||||
|
extra={
|
||||||
|
<Space align="center">
|
||||||
|
<ClockCircleOutlined />
|
||||||
|
{currentTime}
|
||||||
|
<div className="circle_content">
|
||||||
|
<div className="circle_center"></div>
|
||||||
|
</div>
|
||||||
|
</Space>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Space
|
||||||
|
direction="vertical"
|
||||||
|
style={{
|
||||||
|
width: '100%',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ProCard
|
||||||
|
style={{
|
||||||
|
backgroundColor: '#F3F8FB',
|
||||||
|
width: '100%',
|
||||||
|
borderRadius: '8px',
|
||||||
|
}}
|
||||||
|
title="今日收款"
|
||||||
|
extra={
|
||||||
|
<div className="today_amount_contents">
|
||||||
|
<span className="amount">
|
||||||
|
<CountUp
|
||||||
|
end={todayDynamics?.today_amount}
|
||||||
|
duration={3}
|
||||||
|
separator=","
|
||||||
|
prefix="¥"
|
||||||
|
decimals={2}
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
<span className="unit">元</span>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Row gutter={[15, 15]}>
|
||||||
|
{todayDynamics?.type_distribution?.map(
|
||||||
|
(res: any, index: number) => {
|
||||||
|
return (
|
||||||
|
<Col span={6} key={`item_${index}`}>
|
||||||
|
<div className="card_item">
|
||||||
|
<div className="card_item_title">{res?.name}</div>
|
||||||
|
<div>
|
||||||
|
<CountUp
|
||||||
|
end={res?.value}
|
||||||
|
duration={3}
|
||||||
|
separator=","
|
||||||
|
prefix="¥"
|
||||||
|
decimals={2}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Col>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
)}
|
||||||
|
</Row>
|
||||||
|
</ProCard>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<Space className="bi_min_title">
|
||||||
|
<FundOutlined />
|
||||||
|
<div className="title">实时动态</div>
|
||||||
|
</Space>
|
||||||
|
<div className="dynamics_contents">
|
||||||
|
{todayDynamics?.dynamics?.map((res: any, index: number) => {
|
||||||
|
return (
|
||||||
|
<div key={`item_${index}`} className="real_time_dynamics">
|
||||||
|
<div className={`dynamics_type type_${res?.type}`}></div>
|
||||||
|
<span>{GetFromNow(res?.time)}</span>
|
||||||
|
{res?.type === 'WorkOrder' ? '提报' : '收到'}【
|
||||||
|
{res?.target}】 【
|
||||||
|
<renderTextHelper.Tag
|
||||||
|
Enums={RealTimeDynamicsEmployeeBacklogsTypeEnum}
|
||||||
|
value={res?.type}
|
||||||
|
isColor={false}
|
||||||
|
key="type"
|
||||||
|
/>
|
||||||
|
】{res?.amount ? `${res?.amount}元` : ''}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Space>
|
||||||
|
</ProCard>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
flex: 1,
|
||||||
|
marginTop: '15px',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ProCard title="小区概括分析" className="finance_pro_card">
|
||||||
|
<ProTable
|
||||||
|
{...MyProTableProps.props}
|
||||||
|
request={async (params, sort) => {
|
||||||
|
return MyProTableProps.request(
|
||||||
|
params,
|
||||||
|
sort,
|
||||||
|
Apis.Statistics.IndexCount.CommunityOverview,
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
search={false}
|
||||||
|
options={false}
|
||||||
|
columns={[
|
||||||
|
MyColumns.ID({
|
||||||
|
search: false,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
title: '项目名称',
|
||||||
|
dataIndex: 'name',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '房屋数',
|
||||||
|
dataIndex: 'house_count',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '车位数',
|
||||||
|
dataIndex: 'car_port_count',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '绑定客户数',
|
||||||
|
dataIndex: 'customer_count',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '收缴率',
|
||||||
|
dataIndex: 'collection_rate',
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</ProCard>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
175
src/pages/index/components/LayoutRight.tsx
Normal file
175
src/pages/index/components/LayoutRight.tsx
Normal file
@ -0,0 +1,175 @@
|
|||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import { RightOutlined } from '@ant-design/icons';
|
||||||
|
import { useNavigate } from '@umijs/max';
|
||||||
|
import { Col, Progress, Row, Space } from 'antd';
|
||||||
|
import { useEffect, useState } from 'react';
|
||||||
|
import CountUp from 'react-countup';
|
||||||
|
import WorkOrderPie from '../charts/WorkOrderPie';
|
||||||
|
import './style_right.scss';
|
||||||
|
export default function LayoutRight() {
|
||||||
|
const navigate = useNavigate();
|
||||||
|
const [workOrderAnalysis, setWorkOrderAnalysis] = useState<any>({});
|
||||||
|
const getWorkOrderAnalysis = () => {
|
||||||
|
Apis.Statistics.IndexCount.WorkOrderAnalysis().then((res) => {
|
||||||
|
setWorkOrderAnalysis(res.data);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getWorkOrderAnalysis();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="right_content">
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
padding: '0 0 20px 0',
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: 600,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
工单分析
|
||||||
|
</div>
|
||||||
|
<Space direction="vertical" style={{ width: '100%' }}>
|
||||||
|
<div
|
||||||
|
style={{ backgroundColor: '#F3FAFF', borderRadius: 8, padding: 20 }}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
padding: '0 0 15px 0',
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: 600,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
待处理工单
|
||||||
|
</div>
|
||||||
|
<Row gutter={[12, 12]}>
|
||||||
|
<Col span={12}>
|
||||||
|
<div
|
||||||
|
className="work_card_title"
|
||||||
|
onClick={() => {
|
||||||
|
navigate('/work_order/list');
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
报修工单 <RightOutlined />
|
||||||
|
</div>
|
||||||
|
<div className="work_card_number">
|
||||||
|
{/* {workOrderAnalysis?.repair || 0} */}
|
||||||
|
<CountUp
|
||||||
|
end={workOrderAnalysis?.repair}
|
||||||
|
duration={3}
|
||||||
|
separator=","
|
||||||
|
prefix=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</Col>
|
||||||
|
<Col span={12}>
|
||||||
|
<div
|
||||||
|
className="work_card_title"
|
||||||
|
onClick={() => {
|
||||||
|
navigate('/work_order/list');
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
报事工单 <RightOutlined />
|
||||||
|
</div>
|
||||||
|
<div className="work_card_number">
|
||||||
|
<CountUp
|
||||||
|
end={workOrderAnalysis?.incident}
|
||||||
|
duration={3}
|
||||||
|
separator=","
|
||||||
|
prefix=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</Col>
|
||||||
|
<Col span={12}>
|
||||||
|
<div
|
||||||
|
className="work_card_title"
|
||||||
|
onClick={() => {
|
||||||
|
navigate('/work_order/complaint');
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
投诉工单 <RightOutlined size={12} />
|
||||||
|
</div>
|
||||||
|
<div className="work_card_number">
|
||||||
|
<CountUp
|
||||||
|
end={workOrderAnalysis?.complaint}
|
||||||
|
duration={3}
|
||||||
|
separator=","
|
||||||
|
prefix=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
padding: '15px 0',
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: 600,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
工单统计
|
||||||
|
</div>
|
||||||
|
<WorkOrderPie
|
||||||
|
item={{
|
||||||
|
list: workOrderAnalysis?.distribution || [],
|
||||||
|
total: workOrderAnalysis?.total || 0,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
padding: '15px 0',
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: 600,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
工单数据
|
||||||
|
</div>
|
||||||
|
<div className="work_order_data">
|
||||||
|
<div className="work_order_data_item">
|
||||||
|
<Progress
|
||||||
|
type="dashboard"
|
||||||
|
size={[160, 30]}
|
||||||
|
percent={workOrderAnalysis?.data?.completion_rate}
|
||||||
|
format={(percent) => {
|
||||||
|
return (
|
||||||
|
<div className="dashboard_progress">
|
||||||
|
<div className="dashboard_value">{`${percent}%`}</div>
|
||||||
|
<div className="dashboard_label">完成率</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<div className="work_order_data_cell">
|
||||||
|
已完成:{workOrderAnalysis?.data?.completed_count || 0}
|
||||||
|
</div>
|
||||||
|
<div className="work_order_data_cell">已关闭:{0}</div>
|
||||||
|
</div>
|
||||||
|
<div className="work_order_data_item">
|
||||||
|
<Progress
|
||||||
|
type="dashboard"
|
||||||
|
size={[160, 30]}
|
||||||
|
percent={workOrderAnalysis?.data?.satisfaction_rate}
|
||||||
|
format={(percent) => {
|
||||||
|
return (
|
||||||
|
<div className="dashboard_progress">
|
||||||
|
<div className="dashboard_value">{`${percent}%`}</div>
|
||||||
|
<div className="dashboard_label">好评率</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<div className="work_order_data_cell">
|
||||||
|
已评价:{workOrderAnalysis?.data?.evaluated_count || 0}
|
||||||
|
</div>
|
||||||
|
<div className="work_order_data_cell">已好评:{0}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Space>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
294
src/pages/index/components/style_left.scss
Normal file
294
src/pages/index/components/style_left.scss
Normal file
@ -0,0 +1,294 @@
|
|||||||
|
.finance_pro_card {
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
.financial_analysis_card {
|
||||||
|
width: 470px;
|
||||||
|
}
|
||||||
|
.finance_pro_card_content {
|
||||||
|
background: linear-gradient(135deg, #6499ff 0%, #95b8ff 100%);
|
||||||
|
padding: 25px 0;
|
||||||
|
border-radius: 12px;
|
||||||
|
box-shadow: 0 10px 25px -5px rgba(42, 126, 251, 0.3);
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
box-shadow: 0 15px 30px -5px rgba(42, 126, 251, 0.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
// animation: fadeInUp 0.6s ease-out forwards;
|
||||||
|
// opacity: 0;
|
||||||
|
// transform: translateY(20px);
|
||||||
|
|
||||||
|
// &.pt-15 {
|
||||||
|
// animation-delay: 0.2s;
|
||||||
|
// }
|
||||||
|
|
||||||
|
.finance_pro_card_item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
color: #fff;
|
||||||
|
animation: scaleIn 0.8s ease-out forwards;
|
||||||
|
opacity: 0;
|
||||||
|
transform: scale(0.9);
|
||||||
|
|
||||||
|
&:nth-child(1) {
|
||||||
|
animation-delay: 0.3s;
|
||||||
|
}
|
||||||
|
&:nth-child(2) {
|
||||||
|
animation-delay: 0.4s;
|
||||||
|
}
|
||||||
|
&:nth-child(3) {
|
||||||
|
animation-delay: 0.5s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.finance_pro_card_item_val {
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: 700;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
animation: textSlideUp 0.8s ease-out forwards;
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(10px);
|
||||||
|
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||||
|
|
||||||
|
span {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-left: 4px;
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.finance_pro_card_item > div:last-child {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 500;
|
||||||
|
animation: textFadeIn 1s ease-out forwards;
|
||||||
|
opacity: 0;
|
||||||
|
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 为每个子元素添加不同的动画延迟
|
||||||
|
.finance_pro_card_item {
|
||||||
|
&:nth-child(1) {
|
||||||
|
.finance_pro_card_item_val {
|
||||||
|
animation-delay: 0.5s;
|
||||||
|
}
|
||||||
|
> div:last-child {
|
||||||
|
animation-delay: 0.7s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:nth-child(2) {
|
||||||
|
.finance_pro_card_item_val {
|
||||||
|
animation-delay: 0.6s;
|
||||||
|
}
|
||||||
|
> div:last-child {
|
||||||
|
animation-delay: 0.8s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:nth-child(3) {
|
||||||
|
.finance_pro_card_item_val {
|
||||||
|
animation-delay: 0.7s;
|
||||||
|
}
|
||||||
|
> div:last-child {
|
||||||
|
animation-delay: 0.9s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fadeInUp {
|
||||||
|
0% {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(20px);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes scaleIn {
|
||||||
|
0% {
|
||||||
|
opacity: 0;
|
||||||
|
transform: scale(0.9);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
opacity: 1;
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes textSlideUp {
|
||||||
|
0% {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(10px);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes textFadeIn {
|
||||||
|
0% {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.pt-15 {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
.card_item {
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 25px 20px;
|
||||||
|
border-radius: 10px;
|
||||||
|
text-align: center;
|
||||||
|
color: #3d3d3d;
|
||||||
|
font-size: 16px;
|
||||||
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
border: 1px solid #f0f0f0;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
transform: translateY(-3px);
|
||||||
|
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
|
||||||
|
border-color: #e0e7ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
&_title {
|
||||||
|
font-weight: 600;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #1f2937;
|
||||||
|
}
|
||||||
|
|
||||||
|
> div:last-child {
|
||||||
|
font-size: 18px;
|
||||||
|
color: #3d3d3d;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bi_min_title {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 500;
|
||||||
|
padding: 12px 0;
|
||||||
|
color: #2a7efb;
|
||||||
|
.title {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.dynamics_contents {
|
||||||
|
height: 170px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.real_time_dynamics {
|
||||||
|
color: #333;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 16px;
|
||||||
|
padding: 0 0 15px 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.dynamics_type {
|
||||||
|
width: 7px;
|
||||||
|
height: 7px;
|
||||||
|
border-radius: 100px;
|
||||||
|
background-color: #eee;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
color: #666;
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
.type_WorkOrder {
|
||||||
|
background-color: #faad14;
|
||||||
|
}
|
||||||
|
.type_PropertyFee {
|
||||||
|
background-color: #00a154;
|
||||||
|
}
|
||||||
|
.type_MaintenanceFund {
|
||||||
|
background-color: #1bc0c4;
|
||||||
|
}
|
||||||
|
.type_WaterFee {
|
||||||
|
background-color: #007bff;
|
||||||
|
}
|
||||||
|
.type_ElectricityFee {
|
||||||
|
background-color: #f8860c;
|
||||||
|
}
|
||||||
|
.type_SharedWaterFee {
|
||||||
|
background-color: #60ffb2;
|
||||||
|
}
|
||||||
|
.type_SharedElectricityFee {
|
||||||
|
background-color: #7912ff;
|
||||||
|
}
|
||||||
|
.type_CarPortFee {
|
||||||
|
background-color: #ffb547;
|
||||||
|
}
|
||||||
|
.type_WorkOrderRepairFee {
|
||||||
|
background-color: #ff4141;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.today_amount_contents {
|
||||||
|
.amount {
|
||||||
|
font-size: 19px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #389e0d;
|
||||||
|
}
|
||||||
|
.unit {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.circle_content {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background-color: #deffcb;
|
||||||
|
padding: 6px;
|
||||||
|
border-radius: 100px;
|
||||||
|
position: relative;
|
||||||
|
overflow: visible;
|
||||||
|
|
||||||
|
&::before,
|
||||||
|
&::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 50%;
|
||||||
|
background-color: rgba(73, 213, 13, 0.3);
|
||||||
|
animation: ripple 2.4s infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
animation-delay: 1s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.circle_center {
|
||||||
|
width: 9px;
|
||||||
|
height: 9px;
|
||||||
|
border-radius: 100px;
|
||||||
|
background-color: #389e0d;
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes ripple {
|
||||||
|
0% {
|
||||||
|
transform: scale(1);
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: scale(1.5);
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
49
src/pages/index/components/style_right.scss
Normal file
49
src/pages/index/components/style_right.scss
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
.work_card_title {
|
||||||
|
color: #666666;
|
||||||
|
font-size: 16px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.right_content {
|
||||||
|
flex: 1;
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 8px;
|
||||||
|
height: 92vh;
|
||||||
|
}
|
||||||
|
.work_card_number {
|
||||||
|
color: #333333;
|
||||||
|
font-size: 28px;
|
||||||
|
font-weight: 500;
|
||||||
|
padding-top: 5px;
|
||||||
|
}
|
||||||
|
.work_order_data {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding-top: 10px;
|
||||||
|
&_item {
|
||||||
|
width: 50%;
|
||||||
|
text-align: center;
|
||||||
|
color: #3d3d3d;
|
||||||
|
font-size: 16rpx;
|
||||||
|
}
|
||||||
|
&_cell {
|
||||||
|
padding-top: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.dashboard_progress {
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
text-align: center;
|
||||||
|
// padding-top: 100px;
|
||||||
|
.dashboard_label {
|
||||||
|
font-size: 16px;
|
||||||
|
color: #3d3d3d;
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
top: 50px;
|
||||||
|
}
|
||||||
|
.dashboard_value {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,5 +1,28 @@
|
|||||||
// import MyModalsMapLeaflet from '@/components/ModalsMapLeaflet';
|
// import MyModalsMapLeaflet from '@/components/ModalsMapLeaflet';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import { FloatButton } from 'antd';
|
||||||
|
import LayoutLeft from './components/LayoutLeft';
|
||||||
|
import LayoutRight from './components/LayoutRight';
|
||||||
import './style.scss';
|
import './style.scss';
|
||||||
export default function Index() {
|
export default function Index() {
|
||||||
return <div className="overview_content">欢迎登录系统</div>;
|
return (
|
||||||
|
<div className="overview_content">
|
||||||
|
<div className="overview_left">
|
||||||
|
<LayoutLeft />
|
||||||
|
</div>
|
||||||
|
<div className="overview_right">
|
||||||
|
<LayoutRight />
|
||||||
|
</div>
|
||||||
|
<FloatButton
|
||||||
|
// icon={<Loading3QuartersOutlined />}
|
||||||
|
description="刷新"
|
||||||
|
onClick={() => {
|
||||||
|
Apis.Statistics.IndexCount.ClearCache().then(() => {
|
||||||
|
// message.success('刷新成功');
|
||||||
|
window.location.reload();
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,9 +6,11 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
gap: 15px;
|
gap: 15px;
|
||||||
}
|
}
|
||||||
.overview_left,
|
.overview_left {
|
||||||
|
flex: 3;
|
||||||
|
}
|
||||||
.overview_right {
|
.overview_right {
|
||||||
width: 500px;
|
flex: 1;
|
||||||
}
|
}
|
||||||
.overview_center {
|
.overview_center {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|||||||
@ -72,19 +72,19 @@ export default function CommonMeter({ title = '公摊表' }) {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
update: <Update item={item} reload={action?.reload} title={title} />,
|
has: (
|
||||||
|
<MeterHasHouse
|
||||||
|
item={{ ...item, size: 'small' }}
|
||||||
|
reload={action?.reload}
|
||||||
|
title="绑房"
|
||||||
|
/>
|
||||||
|
),
|
||||||
});
|
});
|
||||||
|
|
||||||
let permissionsSpace = getCurrentPermissions({
|
let permissionsSpace = getCurrentPermissions({
|
||||||
has: {
|
update: {
|
||||||
key: '1',
|
key: '1',
|
||||||
label: (
|
label: <Update item={item} reload={action?.reload} title={title} />,
|
||||||
<MeterHasHouse
|
|
||||||
item={{ ...item, size: 'small' }}
|
|
||||||
reload={action?.reload}
|
|
||||||
title="绑房"
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
delete: {
|
delete: {
|
||||||
key: '2',
|
key: '2',
|
||||||
@ -135,6 +135,20 @@ export default function CommonMeter({ title = '公摊表' }) {
|
|||||||
// search: { transform: (value) => ({ project_name: value }) }
|
// search: { transform: (value) => ({ project_name: value }) }
|
||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '房屋',
|
||||||
|
render: (_, item: any) => {
|
||||||
|
return (
|
||||||
|
<Space>
|
||||||
|
{item.house_meter_has_houses?.map(
|
||||||
|
(res: { full_name: string }) => {
|
||||||
|
return res?.full_name;
|
||||||
|
},
|
||||||
|
)}
|
||||||
|
</Space>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '仪表编号',
|
title: '仪表编号',
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
|
|||||||
@ -72,19 +72,19 @@ export default function HouseMeter({ title = '房屋表' }) {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
update: <Update item={item} reload={action?.reload} title={title} />,
|
has: (
|
||||||
|
<MeterHasOne
|
||||||
|
item={{ ...item, size: 'small' }}
|
||||||
|
reload={action?.reload}
|
||||||
|
title="绑房"
|
||||||
|
/>
|
||||||
|
),
|
||||||
});
|
});
|
||||||
|
|
||||||
let permissionsSpace = getCurrentPermissions({
|
let permissionsSpace = getCurrentPermissions({
|
||||||
has: {
|
update: {
|
||||||
key: '1',
|
key: '1',
|
||||||
label: (
|
label: <Update item={item} reload={action?.reload} title={title} />,
|
||||||
<MeterHasOne
|
|
||||||
item={{ ...item, size: 'small' }}
|
|
||||||
reload={action?.reload}
|
|
||||||
title="绑房"
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
delete: {
|
delete: {
|
||||||
key: '2',
|
key: '2',
|
||||||
@ -135,6 +135,16 @@ export default function HouseMeter({ title = '房屋表' }) {
|
|||||||
// search: { transform: (value) => ({ project_name: value }) }
|
// search: { transform: (value) => ({ project_name: value }) }
|
||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '房屋',
|
||||||
|
render: (_, item: any) => {
|
||||||
|
return item.house_meter_has_houses?.map(
|
||||||
|
(res: { full_name: string }) => {
|
||||||
|
return res?.full_name;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '仪表编号',
|
title: '仪表编号',
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
@ -205,14 +215,14 @@ export default function HouseMeter({ title = '房屋表' }) {
|
|||||||
// dataIndex: 'remark',
|
// dataIndex: 'remark',
|
||||||
// search: false,
|
// search: false,
|
||||||
// },
|
// },
|
||||||
MyColumns.SoftDelete({
|
// MyColumns.SoftDelete({
|
||||||
onRestore: Apis.Meter.HouseMeters.Restore,
|
// onRestore: Apis.Meter.HouseMeters.Restore,
|
||||||
onSoftDelete: Apis.Meter.HouseMeters.SoftDelete,
|
// onSoftDelete: Apis.Meter.HouseMeters.SoftDelete,
|
||||||
search: false,
|
// search: false,
|
||||||
setPermissions: getCurrentPermissions({
|
// setPermissions: getCurrentPermissions({
|
||||||
enableDisable: true,
|
// enableDisable: true,
|
||||||
}),
|
// }),
|
||||||
}),
|
// }),
|
||||||
// MyColumns.CreatedAt(),
|
// MyColumns.CreatedAt(),
|
||||||
MyColumns.Option({
|
MyColumns.Option({
|
||||||
render: (_, item: any, index, action) => (
|
render: (_, item: any, index, action) => (
|
||||||
|
|||||||
@ -27,7 +27,7 @@ export default function Index({ title = '抄表数据' }) {
|
|||||||
<MyButtons.View
|
<MyButtons.View
|
||||||
title="查看"
|
title="查看"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
navigate(`/instrument/readings/show/${item.id}`);
|
navigate(`/meter/readings/show/${item.id}`);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
|
|||||||
@ -197,7 +197,6 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
value: 'value',
|
value: 'value',
|
||||||
},
|
},
|
||||||
labelRender: (res: any) => {
|
labelRender: (res: any) => {
|
||||||
console.log(res, '222');
|
|
||||||
if (res?.label) {
|
if (res?.label) {
|
||||||
return res?.label;
|
return res?.label;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { MyPageContainer, usePageTabs } from '@/common';
|
import { MyPageContainer } from '@/common';
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { ProCard } from '@ant-design/pro-components';
|
import { ProCard } from '@ant-design/pro-components';
|
||||||
import { useParams } from '@umijs/max';
|
import { useParams } from '@umijs/max';
|
||||||
@ -12,13 +12,6 @@ import Tasks from '../table/Tasks';
|
|||||||
export default function Show({ title = '仪表详情' }) {
|
export default function Show({ title = '仪表详情' }) {
|
||||||
const { id } = useParams<{ id: string }>();
|
const { id } = useParams<{ id: string }>();
|
||||||
const [data, setShow] = useState<any>({});
|
const [data, setShow] = useState<any>({});
|
||||||
console.log('id', data);
|
|
||||||
|
|
||||||
// 注册标签页
|
|
||||||
const { addTab } = usePageTabs({
|
|
||||||
tabKey: `meter-detail-${id}`,
|
|
||||||
tabLabel: `仪表:${data?.name}` || title,
|
|
||||||
});
|
|
||||||
|
|
||||||
const loadShow = () => {
|
const loadShow = () => {
|
||||||
let paramsId: any = { id: id ?? 0 };
|
let paramsId: any = { id: id ?? 0 };
|
||||||
@ -68,7 +61,12 @@ export default function Show({ title = '仪表详情' }) {
|
|||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MyPageContainer title={title}>
|
<MyPageContainer
|
||||||
|
title={`仪表:${data?.name}` || title}
|
||||||
|
enableTabs={true}
|
||||||
|
tabKey={`meter-detail-${id}`}
|
||||||
|
tabLabel={`仪表:${data?.name}` || title}
|
||||||
|
>
|
||||||
<MeteInfo item={data} reload={loadShow} />
|
<MeteInfo item={data} reload={loadShow} />
|
||||||
<ProCard style={{ marginTop: 16 }}>
|
<ProCard style={{ marginTop: 16 }}>
|
||||||
<Tabs type="card" items={items} defaultActiveKey="1" />
|
<Tabs type="card" items={items} defaultActiveKey="1" />
|
||||||
|
|||||||
@ -9,6 +9,8 @@ import { HouseMetersMeterTypeEnum } from '@/gen/Enums';
|
|||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { useNavigate } from '@umijs/max';
|
import { useNavigate } from '@umijs/max';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
|
import MeterHasHouse from '../../house_meter/modals/MeterHasHouse';
|
||||||
|
import MeterHasOne from '../../house_meter/modals/MeterHasOne';
|
||||||
|
|
||||||
export default function Index(props: MyBetaModalFormProps) {
|
export default function Index(props: MyBetaModalFormProps) {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|||||||
@ -16,7 +16,7 @@ import {
|
|||||||
} from '@/gen/Enums';
|
} from '@/gen/Enums';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { useSearchParams } from '@umijs/max';
|
import { useSearchParams } from '@umijs/max';
|
||||||
import { Space, Tooltip } from 'antd';
|
import { Dropdown, Space, Tooltip } from 'antd';
|
||||||
import WorkOrderAssign from './modals/WorkOrderAssign';
|
import WorkOrderAssign from './modals/WorkOrderAssign';
|
||||||
import WorkOrderCreate from './modals/WorkOrderCreate';
|
import WorkOrderCreate from './modals/WorkOrderCreate';
|
||||||
import WorkOrderShow from './modals/WorkOrderShow';
|
import WorkOrderShow from './modals/WorkOrderShow';
|
||||||
@ -52,49 +52,48 @@ export default function Index({ title = '报修报事' }) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
let tableRender = (item: any, action: any) => {
|
let tableRender = (item: any, action: any) => {
|
||||||
return getCurrentPermissions({
|
let permissions = getCurrentPermissions({
|
||||||
show: <WorkOrderShow item={item} title="详情" reload={action?.reload} />,
|
|
||||||
update: (
|
|
||||||
<>
|
|
||||||
{item.status === 'Pending' && (
|
|
||||||
<WorkOrderUpdate
|
|
||||||
item={item}
|
|
||||||
reload={action?.reload}
|
|
||||||
title={title}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
),
|
|
||||||
assign: (
|
assign: (
|
||||||
<>
|
<WorkOrderAssign item={item} reload={action?.reload} title="指派" />
|
||||||
{item.assign_status === 'Unassigned' &&
|
|
||||||
item.type !== 'SecurityInspection' &&
|
|
||||||
item.status !== 'Closed' && (
|
|
||||||
<WorkOrderAssign
|
|
||||||
item={item}
|
|
||||||
reload={action?.reload}
|
|
||||||
title="指派"
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
),
|
),
|
||||||
completed: (
|
completed: (
|
||||||
<>
|
<WorkOrderShow item={item} title="回访" reload={action?.reload} />
|
||||||
{item.status === 'Completed' && item.is_visited === 0 && (
|
|
||||||
<WorkOrderShow item={item} title="回访" reload={action?.reload} />
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
),
|
|
||||||
delete: (
|
|
||||||
<MyButtons.Delete
|
|
||||||
onConfirm={() =>
|
|
||||||
Apis.WorkOrder.HouseWorkOrders.Delete({
|
|
||||||
id: item.id,
|
|
||||||
}).then(() => action?.reload())
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let permissionsSpace = getCurrentPermissions({
|
||||||
|
show: {
|
||||||
|
key: '1',
|
||||||
|
label: (
|
||||||
|
<WorkOrderShow item={item} title="详情" reload={action?.reload} />
|
||||||
|
),
|
||||||
|
},
|
||||||
|
update: {
|
||||||
|
key: '2',
|
||||||
|
label: (
|
||||||
|
<WorkOrderUpdate item={item} reload={action?.reload} title={title} />
|
||||||
|
),
|
||||||
|
},
|
||||||
|
delete: {
|
||||||
|
key: '3',
|
||||||
|
label: (
|
||||||
|
<MyButtons.Delete
|
||||||
|
onConfirm={() =>
|
||||||
|
Apis.WorkOrder.HouseWorkOrders.Delete({
|
||||||
|
id: item.id,
|
||||||
|
}).then(() => action?.reload())
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
let Others = (
|
||||||
|
<Dropdown menu={{ items: permissionsSpace }} trigger={['click']}>
|
||||||
|
<MyButtons.Default title="更多" />
|
||||||
|
</Dropdown>
|
||||||
|
);
|
||||||
|
return [...permissions, ...[Others]];
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -33,7 +33,15 @@ export default function WorkOrderAssign(
|
|||||||
labelCol={{ span: 5 }}
|
labelCol={{ span: 5 }}
|
||||||
labelAlign="left"
|
labelAlign="left"
|
||||||
trigger={
|
trigger={
|
||||||
<MyButtons.Default title={props.title || '指派'} type="primary" />
|
<MyButtons.Default
|
||||||
|
title={props.title || '指派'}
|
||||||
|
disabled={
|
||||||
|
props?.item.assign_status !== 'Unassigned' ||
|
||||||
|
props?.item.type === 'SecurityInspection' ||
|
||||||
|
props?.item.status === 'Closed'
|
||||||
|
}
|
||||||
|
type="primary"
|
||||||
|
/>
|
||||||
}
|
}
|
||||||
key={new Date().getTime()}
|
key={new Date().getTime()}
|
||||||
form={form}
|
form={form}
|
||||||
|
|||||||
@ -41,7 +41,7 @@ export default function WorkOrderShow({
|
|||||||
<>
|
<>
|
||||||
<MyButtons.Default
|
<MyButtons.Default
|
||||||
onClick={handleOpen}
|
onClick={handleOpen}
|
||||||
disabled={item?.is_visited}
|
disabled={item?.is_visited || item.status !== 'Completed'}
|
||||||
type={'primary'}
|
type={'primary'}
|
||||||
title={title}
|
title={title}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -27,7 +27,7 @@ export default function WorkOrderUpdate(
|
|||||||
width="600px"
|
width="600px"
|
||||||
layout="horizontal"
|
layout="horizontal"
|
||||||
key={new Date().getTime()}
|
key={new Date().getTime()}
|
||||||
trigger={<MyButtons.Edit title={`编辑`} />}
|
trigger={<MyButtons.Edit title={`编辑`} disabled={props.item?.status !== 'Pending'} />}
|
||||||
onOpenChange={(open: any) => {
|
onOpenChange={(open: any) => {
|
||||||
if (open && props.item) {
|
if (open && props.item) {
|
||||||
const formValues = {
|
const formValues = {
|
||||||
|
|||||||
43
yarn.lock
43
yarn.lock
@ -4870,6 +4870,11 @@ cosmiconfig@^9.0.0:
|
|||||||
js-yaml "^4.1.0"
|
js-yaml "^4.1.0"
|
||||||
parse-json "^5.2.0"
|
parse-json "^5.2.0"
|
||||||
|
|
||||||
|
countup.js@^2.8.0:
|
||||||
|
version "2.9.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/countup.js/-/countup.js-2.9.0.tgz#599e6482e502e5e3f00f8816637120c9b21856ed"
|
||||||
|
integrity sha512-llqrvyXztRFPp6+i8jx25phHWcVWhrHO4Nlt0uAOSKHB8778zzQswa4MU3qKBvkXfJKftRYFJuVHez67lyKdHg==
|
||||||
|
|
||||||
create-ecdh@^4.0.4:
|
create-ecdh@^4.0.4:
|
||||||
version "4.0.4"
|
version "4.0.4"
|
||||||
resolved "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz"
|
resolved "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz"
|
||||||
@ -10584,6 +10589,13 @@ react-activation@^0.13.4:
|
|||||||
react-node-key "^0.4.0"
|
react-node-key "^0.4.0"
|
||||||
szfe-tools "^0.0.0-beta.7"
|
szfe-tools "^0.0.0-beta.7"
|
||||||
|
|
||||||
|
react-countup@^6.5.3:
|
||||||
|
version "6.5.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/react-countup/-/react-countup-6.5.3.tgz#e892aa3eab2d6ba9c3cdba30bf4ed6764826d848"
|
||||||
|
integrity sha512-udnqVQitxC7QWADSPDOxVWULkLvKUWrDapn5i53HE4DPRVgs+Y5rr4bo25qEl8jSh+0l2cToJgGMx+clxPM3+w==
|
||||||
|
dependencies:
|
||||||
|
countup.js "^2.8.0"
|
||||||
|
|
||||||
react-dom@18.3.1:
|
react-dom@18.3.1:
|
||||||
version "18.3.1"
|
version "18.3.1"
|
||||||
resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz"
|
resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz"
|
||||||
@ -11635,16 +11647,7 @@ string-convert@^0.2.0:
|
|||||||
resolved "https://registry.npmjs.org/string-convert/-/string-convert-0.2.1.tgz"
|
resolved "https://registry.npmjs.org/string-convert/-/string-convert-0.2.1.tgz"
|
||||||
integrity sha512-u/1tdPl4yQnPBjnVrmdLo9gtuLvELKsAoRapekWggdiQNvvvum+jYF329d84NAa660KQw7pB2n36KrIKVoXa3A==
|
integrity sha512-u/1tdPl4yQnPBjnVrmdLo9gtuLvELKsAoRapekWggdiQNvvvum+jYF329d84NAa660KQw7pB2n36KrIKVoXa3A==
|
||||||
|
|
||||||
"string-width-cjs@npm:string-width@^4.2.0":
|
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
|
||||||
version "4.2.3"
|
|
||||||
resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz"
|
|
||||||
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
|
|
||||||
dependencies:
|
|
||||||
emoji-regex "^8.0.0"
|
|
||||||
is-fullwidth-code-point "^3.0.0"
|
|
||||||
strip-ansi "^6.0.1"
|
|
||||||
|
|
||||||
string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
|
|
||||||
version "4.2.3"
|
version "4.2.3"
|
||||||
resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz"
|
resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz"
|
||||||
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
|
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
|
||||||
@ -11734,14 +11737,7 @@ string_decoder@~1.1.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
safe-buffer "~5.1.0"
|
safe-buffer "~5.1.0"
|
||||||
|
|
||||||
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
|
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
|
||||||
version "6.0.1"
|
|
||||||
resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz"
|
|
||||||
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
|
|
||||||
dependencies:
|
|
||||||
ansi-regex "^5.0.1"
|
|
||||||
|
|
||||||
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
|
|
||||||
version "6.0.1"
|
version "6.0.1"
|
||||||
resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz"
|
resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz"
|
||||||
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
|
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
|
||||||
@ -12645,16 +12641,7 @@ word-wrap@^1.2.5:
|
|||||||
resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz"
|
resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz"
|
||||||
integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==
|
integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==
|
||||||
|
|
||||||
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
|
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
|
||||||
version "7.0.0"
|
|
||||||
resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz"
|
|
||||||
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
|
|
||||||
dependencies:
|
|
||||||
ansi-styles "^4.0.0"
|
|
||||||
string-width "^4.1.0"
|
|
||||||
strip-ansi "^6.0.0"
|
|
||||||
|
|
||||||
wrap-ansi@^7.0.0:
|
|
||||||
version "7.0.0"
|
version "7.0.0"
|
||||||
resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz"
|
resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz"
|
||||||
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
|
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user