加入查询

dev
陈博文 3 years ago
parent 7ae1438d8b
commit 6a31462dfc

@ -99,6 +99,10 @@ export default defineConfig({
path: '/manager/basicManager/allotment',
component: '@/pages/Manager/BasicManager/List/Allotment',
},
{
path: '/manager/basicManager/demand',
component: '@/pages/Manager/BasicManager/List/Demand',
},
{ component: '@/pages/HttpStatus/404' },
],
},

@ -15,7 +15,7 @@
height: 44px;
display: flex;
align-items: center;
font-size: 14px;
font-size: 16px;
font-weight: 400;
color: #464f66;
padding: 20px 0;
@ -36,7 +36,7 @@
i {
padding-right: 10px;
font-size: 14px;
font-size: 16px;
}
}

@ -15,7 +15,7 @@
height: 44px;
display: flex;
align-items: center;
font-size: 14px;
font-size: 16px;
font-weight: 400;
color: #464f66;
padding: 20px 0;
@ -36,7 +36,7 @@
i {
padding-right: 10px;
font-size: 14px;
font-size: 16px;
}
}

@ -0,0 +1,53 @@
.page {
.title {
height: 36px;
background: #e3effc;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20px;
font-weight: 500;
color: #464f66;
i {
cursor: pointer;
}
}
.btn {
padding: 13px 20px;
i {
font-size: 14px;
margin-right: 5px;
}
}
.action {
cursor: pointer;
color: #6b758b;
padding: 0 10px;
&:hover {
color: @primary-color;
}
}
}
.li {
border-bottom: 1px solid #f5f5f5;
padding-bottom: 10px;
margin-bottom: 10px;
.name {
font-size: 14px;
font-weight: bold;
color: #333;
}
}
.li:last-child {
border-bottom: 0;
margin-bottom: 0;
padding-bottom: 0;
}

@ -0,0 +1,214 @@
import styles from './index.less';
import {
Button,
Select,
Row,
Modal,
Form,
message,
Empty,
Table,
InputNumber,
Input,
Col,
DatePicker,
} from 'antd';
import Fetch from '@/utils/fetch';
import { useEffect, useState, FC, useRef, Fragment } from 'react';
import { ColumnsType } from 'antd/lib/table';
const RangePicker: any = DatePicker.RangePicker;
import moment from 'moment';
interface PageProps {}
const Page: FC<PageProps> = () => {
const [data, setData] = useState<any>([]);
const [loading, setLoading] = useState<boolean>(true);
const [total, setTotal] = useState<number>(0);
const [deviceList, setDeviceList] = useState<any[]>([]);
const [form] = Form.useForm();
let [params, setParams] = useState<any>({
pageNumber: 1,
pageSize: 20,
});
useEffect(() => {
getData(params);
getDeviceList();
}, []);
const getData = async (record: any) => {
setLoading(true);
const res = await Fetch('/openi/device/page', {
method: 'get',
params: record,
});
if (res.result === 'success') {
setData(res?.data?.[0]?.list);
setTotal(res?.data?.[0]?.total);
}
setLoading(false);
};
const getDeviceList = async () => {
const res = await Fetch('/openi/deviceType/list');
if (res.result === 'success') {
const data = res?.data?.[0];
setDeviceList(data);
}
};
const columns: ColumnsType<any> = [
{
title: '序号',
align: 'center',
dataIndex: 'index',
render: (text: string, record: any, index: number) =>
params.pageSize * (params.pageNumber - 1) + index + 1,
},
{
title: '装备型号',
dataIndex: 'deviceType',
render: (v: any) => v?.name,
},
{
title: '装备名称',
dataIndex: 'name',
},
{
title: '铭牌编号',
dataIndex: 'deviceId',
},
{
title: '管理标识',
dataIndex: 'sign',
render: (v: any) => v || '--',
},
{
title: '生产厂商',
dataIndex: 'producer',
render: (v: any) => v?.name,
},
];
const handleChangePage = (param: any) => {
params.pageNumber = param?.current;
params.pageSize = param?.pageSize;
setParams({ ...params });
getData(params);
};
const handleFinish = async (v: any) => {
params = { ...params, ...v };
if (v.time) {
params.startDate = moment(v?.time?.[0]).format('YYYY-MM-DD HH:mm:ss');
params.endDate = moment(v?.time?.[1]).format('YYYY-MM-DD HH:mm:ss');
}
delete params.time;
setParams({ ...params });
getData(params);
};
return (
<div className={styles.page}>
<div className={styles.title}>
<span></span>
<i
onClick={() => getData(params)}
className="iconfont icon-a-shuaxin2"
/>
</div>
<Form
form={form}
colon={false}
layout="inline"
onFinish={handleFinish}
initialValues={{
time: '',
}}
style={{ padding: '0 20px 20px 20px' }}
>
<Row className="mt10 mb10">
<Form.Item label="设备类型" name="type" className="mr20">
<Input style={{ width: 200 }} />
</Form.Item>
<Form.Item label="铭牌号" name="deviceId" className="mr20">
<Input placeholder="支持模糊查询" style={{ width: 200 }} />
</Form.Item>
<Form.Item label="初装资源" name="status" className="mr20">
<Select
allowClear
placeholder="请选择初始资源状态"
style={{ width: 200 }}
>
<Select.Option key={'0'}></Select.Option>
<Select.Option key={'1'}></Select.Option>
</Select>
</Form.Item>
</Row>
<Row>
<Form.Item label="流转状态" name="distributionId" className="mr20">
<Select
allowClear
placeholder="请选择设备流转状态"
style={{ width: 200 }}
>
<Select.Option key={'0'}></Select.Option>
<Select.Option key={'1'}></Select.Option>
</Select>
</Form.Item>
<Form.Item label="注册时间" name="time" className="mr20">
<RangePicker
placeholder={['请选择起始时间', '请选择结束时间']}
format="YYYY-MM-DD HH:mm:ss"
showTime
/>
</Form.Item>
<Form.Item>
<Button
onClick={() => {
form.resetFields();
params = {
pageNumber: 1,
pageSize: 20,
};
setParams({ ...params });
getData(params);
}}
>
</Button>
</Form.Item>
<Form.Item>
<Button type="primary" htmlType="submit">
</Button>
</Form.Item>
</Row>
</Form>
<Table
dataSource={data}
bordered={false}
rowKey="id"
columns={columns}
loading={loading}
className="pr20 pl20"
onChange={handleChangePage}
pagination={{
pageSize: params.per_page,
total: total,
current: params.page,
showQuickJumper: true,
hideOnSinglePage: true,
position: ['bottomCenter'],
showTotal: (total) => (
<span className="mr10">
<span>{total}</span>
</span>
),
}}
/>
</div>
);
};
export default Page;

@ -15,7 +15,7 @@
height: 44px;
display: flex;
align-items: center;
font-size: 14px;
font-size: 16px;
font-weight: 400;
color: #464f66;
padding: 20px 0;
@ -36,7 +36,7 @@
i {
padding-right: 10px;
font-size: 14px;
font-size: 16px;
}
}

@ -30,6 +30,11 @@ const Page = ({ ...props }) => {
name: '信息统计',
key: '2',
},
{
icon: 'iconfont icon-chaxun',
name: '信息查询',
key: '/demand',
},
];
return (

@ -15,7 +15,7 @@
height: 44px;
display: flex;
align-items: center;
font-size: 14px;
font-size: 16px;
font-weight: 400;
color: #464f66;
padding: 20px 0;
@ -36,7 +36,7 @@
i {
padding-right: 10px;
font-size: 14px;
font-size: 16px;
}
}

@ -54,6 +54,12 @@
<div class="content unicode" style="display: block;">
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont">&#xec4c;</span>
<div class="name">查询</div>
<div class="code-name">&amp;#xec4c;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe89e;</span>
<div class="name">统计</div>
@ -390,12 +396,12 @@
<pre><code class="language-css"
>@font-face {
font-family: 'iconfont';
src: url('iconfont.eot?t=1663756037950'); /* IE9 */
src: url('iconfont.eot?t=1663756037950#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('iconfont.woff2?t=1663756037950') format('woff2'),
url('iconfont.woff?t=1663756037950') format('woff'),
url('iconfont.ttf?t=1663756037950') format('truetype'),
url('iconfont.svg?t=1663756037950#iconfont') format('svg');
src: url('iconfont.eot?t=1663901035581'); /* IE9 */
src: url('iconfont.eot?t=1663901035581#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('iconfont.woff2?t=1663901035581') format('woff2'),
url('iconfont.woff?t=1663901035581') format('woff'),
url('iconfont.ttf?t=1663901035581') format('truetype'),
url('iconfont.svg?t=1663901035581#iconfont') format('svg');
}
</code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@ -421,6 +427,15 @@
<div class="content font-class">
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont icon-chaxun"></span>
<div class="name">
查询
</div>
<div class="code-name">.icon-chaxun
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-tongji"></span>
<div class="name">
@ -925,6 +940,14 @@
<div class="content symbol">
<ul class="icon_lists dib-box">
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-chaxun"></use>
</svg>
<div class="name">查询</div>
<div class="code-name">#icon-chaxun</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-tongji"></use>

@ -1,11 +1,11 @@
@font-face {
font-family: "iconfont"; /* Project id 3579477 */
src: url('iconfont.eot?t=1663756037950'); /* IE9 */
src: url('iconfont.eot?t=1663756037950#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('iconfont.woff2?t=1663756037950') format('woff2'),
url('iconfont.woff?t=1663756037950') format('woff'),
url('iconfont.ttf?t=1663756037950') format('truetype'),
url('iconfont.svg?t=1663756037950#iconfont') format('svg');
src: url('iconfont.eot?t=1663901035581'); /* IE9 */
src: url('iconfont.eot?t=1663901035581#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('iconfont.woff2?t=1663901035581') format('woff2'),
url('iconfont.woff?t=1663901035581') format('woff'),
url('iconfont.ttf?t=1663901035581') format('truetype'),
url('iconfont.svg?t=1663901035581#iconfont') format('svg');
}
.iconfont {
@ -16,6 +16,10 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-chaxun:before {
content: "\ec4c";
}
.icon-tongji:before {
content: "\e89e";
}

Binary file not shown.

File diff suppressed because one or more lines are too long

@ -5,6 +5,13 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "5961297",
"name": "查询",
"font_class": "chaxun",
"unicode": "ec4c",
"unicode_decimal": 60492
},
{
"icon_id": "10520233",
"name": "统计",

@ -14,6 +14,8 @@
/>
<missing-glyph />
<glyph glyph-name="chaxun" unicode="&#60492;" d="M896 832H128c-35.296 0-64-28.704-64-64v-768c0-35.296 28.704-64 64-64h592a32 32 0 1 1 0 64H128V768h768v-592a32 32 0 1 1 64 0V768c0 35.296-28.704 64-64 64zM791.744 149.50400000000002A206.752 206.752 0 0 1 832 272c0 114.688-93.312 208-208 208S416 386.688 416 272s93.312-208 208-208a206.752 206.752 0 0 1 122.496 40.256l110.88-110.88a31.904 31.904 0 0 1 45.248 0 31.968 31.968 0 0 1 0 45.248l-110.88 110.88zM480 272c0 79.392 64.608 144 144 144s144-64.608 144-144-64.608-144-144-144-144 64.608-144 144zM800 632a32 32 0 0 1-32 32H256a32 32 0 0 1 0-64h512a32 32 0 0 1 32 32zM256 473.344a32 32 0 0 1 0-64h96a32 32 0 0 1 0 64H256z" horiz-adv-x="1024" />
<glyph glyph-name="tongji" unicode="&#59550;" d="M1008.241778-44.714667c0-20.992-18.432-38.115556-40.049778-38.115555H62.179556A38.912 38.912 0 0 0 22.755556-44.714667C22.755556-23.665778 40.561778-6.542222 62.179556-6.542222H968.248889c21.617778 0 40.049778-17.180444 40.049778-38.115556M896.341333 705.592889c22.243556 0 40.049778-17.180444 40.049778-38.115556v-578.56c0-21.048889-17.806222-38.229333-40.049778-38.229333h-166.570666a38.968889 38.968889 0 0 0-39.424 38.172444V667.420444c0 21.048889 17.806222 38.172444 39.424 38.172445h166.570666z m-127.146666-578.56h87.722666v502.328889h-87.722666v-502.328889zM598.812444 572.074667c21.617778 0 39.424-17.180444 39.424-38.115556v-445.098667a38.968889 38.968889 0 0 0-39.424-38.115555h-167.253333a38.968889 38.968889 0 0 0-39.367111 38.115555V533.902222c0 21.048889 17.806222 38.172444 39.367111 38.172445h167.253333z m-127.146666-445.098667h87.096889V495.729778H471.665778v-368.753778zM300.600889 839.111111c21.617778 0 40.049778-17.180444 40.049778-38.115555v-712.135112c0-20.992-18.432-38.115556-40.049778-38.115555H133.404444a38.968889 38.968889 0 0 0-39.424 38.115555V800.995556c0 21.048889 17.806222 38.172444 39.424 38.172444h167.196445zM173.454222 126.976H260.551111V762.88H173.454222v-635.847111z" horiz-adv-x="1024" />
<glyph glyph-name="piliangshanchubeifen" unicode="&#59875;" d="M0 676.571429h1024v-73.142858H0zM899.657143-128H124.342857V618.057143h73.142857V-54.857143h629.028572V618.057143h73.142857zM292.571429 896h438.857142v-73.142857H292.571429zM358.4 618.057143h73.142857v-709.485714h-73.142857zM592.457143 618.057143h73.142857v-709.485714h-73.142857z" horiz-adv-x="1024" />

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Binary file not shown.
Loading…
Cancel
Save