调度记录
parent
8c99a043a3
commit
1719155602
|
|
@ -416,6 +416,9 @@ export async function loadMenu(): Promise<MenuItem[]> {
|
|||
{ id: id(), title: '年度渗流统计表', path: '/mgr/gcaqjc/sjtjcx/ndsltjb' },
|
||||
]
|
||||
},
|
||||
{
|
||||
id: id(), title: '调度记录', path: '/mgr/gcaqjc/gcaqyj/diaodu',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -1138,6 +1138,14 @@ const apiurl = {
|
|||
upload:service_fxdd + '/SzRegulatoryFramework/file/upload/singleSimple',
|
||||
download:service_fxdd + '/SzRegulatoryFramework/file/download/',
|
||||
list:service_fxdd + '/SzRegulatoryFramework/page'
|
||||
},
|
||||
|
||||
ddjl:{
|
||||
page: service_fxdd + '/dispatchRecord/page',
|
||||
save: service_fxdd + '/dispatchRecord/insert',
|
||||
edit: service_fxdd + '/dispatchRecord/update',
|
||||
del: service_fxdd + '/dispatchRecord/del',
|
||||
export: service_fxdd + '/dispatchRecord/export',
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ import Ajtj from './sz/szzf/ajtj'
|
|||
import Clyj from './sz/szzf/clyj'
|
||||
|
||||
import Krgl from './KrLine'
|
||||
import Ddjl from './szydd/ddjl'
|
||||
|
||||
|
||||
|
||||
|
|
@ -174,6 +175,7 @@ const AppRouters: React.FC = () => {
|
|||
{ path: 'gcaqjc/gcaqyj/bzt', element: <Bzt isHome={false}/> },
|
||||
{ path: 'gcaqjc/gcaqyj/yhyj', element: <Yhyj /> },
|
||||
{ path: 'gcaqjc/gcaqyj/yjgzpz', element: <Yjgzpz /> },
|
||||
{ path: 'gcaqjc/gcaqyj/diaodu', element: <Ddjl/> },
|
||||
|
||||
//统计
|
||||
{ path: 'gcaqjc/sjtjcx/syjx', element: <Syjc /> },
|
||||
|
|
|
|||
|
|
@ -0,0 +1,315 @@
|
|||
import React,{useEffect,useState,useMemo,useRef} from 'react';
|
||||
import { Form, Button, Input, Row,Upload, Col, Table, DatePicker, InputNumber,message,Image,Modal,Typography ,Popconfirm } from 'antd';
|
||||
import { DeleteOutlined,FileWordOutlined,FilePdfOutlined,FileZipOutlined,FileExcelOutlined } from '@ant-design/icons';
|
||||
import { formItemLayout, btnItemLayout } from '../../../components/crud/FormLayoutProps';
|
||||
|
||||
import apiurl from '../../../service/apiurl';
|
||||
|
||||
import NormalSelect from '../../../components/Form/NormalSelect';
|
||||
|
||||
import "./index.less"
|
||||
import moment from 'moment';
|
||||
const { RangePicker } = DatePicker
|
||||
const { Dragger } = Upload;
|
||||
const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
|
||||
|
||||
|
||||
const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
|
||||
|
||||
const [form] = Form.useForm();
|
||||
const [fileList, setFileList] = useState([]) //上传文件列表
|
||||
const [fileIds, setFileIds] = useState([])
|
||||
const [iframeSrc, setIframeSrc] = useState('')
|
||||
const [pdfViewOPen, setPdfViewOPen] = useState(false)
|
||||
const [flag,setFlag] = useState(false)
|
||||
|
||||
const [loading, setLoading] = useState(false)
|
||||
|
||||
/**
|
||||
* @description 文件下载
|
||||
* @param {String} params 文件fileId
|
||||
*/
|
||||
const download = (params) => {
|
||||
let downloadLink = document.createElement("a");
|
||||
downloadLink.href = `http://local.gunshiiot.com:18083/gunshiApp/tsg/safety/hazard/invest/file/download/${params.fileId}`;
|
||||
downloadLink.download = `${params.fileName}`;
|
||||
downloadLink.style.display = "none";
|
||||
// 将链接添加到页面中
|
||||
document.body.appendChild(downloadLink);
|
||||
|
||||
// 模拟点击事件,开始下载
|
||||
downloadLink.click();
|
||||
}
|
||||
/**
|
||||
* @description 上传图片
|
||||
* @param {string} file 上传的文件
|
||||
*/
|
||||
const fileChange = (info) => {
|
||||
if (info.file.status === "done") {
|
||||
setLoading(false);
|
||||
}
|
||||
if (info.file.status === "uploading") {
|
||||
setLoading(true);
|
||||
}
|
||||
if (info.file.status === "error") {
|
||||
message.error("文件上传失败")
|
||||
setLoading(false);
|
||||
}
|
||||
let fileIds = info.fileList?.map(file => {
|
||||
return file.response?.data?.fileId
|
||||
})
|
||||
setFileIds(fileIds)
|
||||
setFileList(info.fileList)
|
||||
}
|
||||
/**
|
||||
* @description pdf文件预览
|
||||
* @param {String} params 文件预览url
|
||||
*/
|
||||
const viewPdf = (params) => {
|
||||
setIframeSrc(params)
|
||||
setPdfViewOPen(true)
|
||||
}
|
||||
|
||||
|
||||
const onfinish = (values) => {
|
||||
let oldFiles = fileList?.map(item => ({fileId:item.response?.data?.fileId}) )
|
||||
if (mode === 'edit') {
|
||||
values.files = oldFiles;
|
||||
values.id = record.id;
|
||||
// values.opUserId = record.opUserId;
|
||||
onEdit(apiurl.ddjl.edit,values)
|
||||
}
|
||||
if (mode === 'save') {
|
||||
values.files = oldFiles
|
||||
onSave(apiurl.ddjl.save,values)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 删除上传的图片
|
||||
* @param {string} id 删除的id
|
||||
*/
|
||||
const deleteFile = (fileId) => {
|
||||
console.log(fileId);
|
||||
let filterFile = fileList.filter(item => item.response?.data?.fileId !== fileId);
|
||||
setFileList(filterFile)
|
||||
}
|
||||
useEffect(() => {
|
||||
if (mode != 'save') {
|
||||
const imgFile = record?.files?.map(o => ({
|
||||
name: o.fileName,
|
||||
response: {
|
||||
data: {
|
||||
filePath: o.filePath,
|
||||
fileId:o.fileId
|
||||
}
|
||||
},
|
||||
}))
|
||||
setFileList(imgFile)
|
||||
}
|
||||
}, [record, mode])
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<Form
|
||||
form={form}
|
||||
{...formItemLayout}
|
||||
onFinish={onfinish}
|
||||
initialValues={record}
|
||||
onValuesChange={(v,b)=>{
|
||||
setFlag(b.status===0?false:true)
|
||||
}}
|
||||
>
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
label="调度开始时间"
|
||||
name="startTime"
|
||||
getValueFromEvent={(e,dateString) => dateString}
|
||||
getValueProps={(value) => ({ value: value ? moment(value) : undefined })}
|
||||
rules={[{required: true}]}
|
||||
>
|
||||
<DatePicker disabled={mode==='view'} format={'YYYY-MM-DD HH:mm:ss'} style={{width:'100%'}} showTime allowClear />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
label="调度结束时间"
|
||||
name="endTime"
|
||||
getValueFromEvent={(e,dateString) => dateString}
|
||||
getValueProps={(value) => ({ value: value ? moment(value) : undefined })}
|
||||
rules={[{required: flag}]}
|
||||
>
|
||||
<DatePicker disabled={mode==='view'||!flag} format={'YYYY-MM-DD HH:mm:ss'} style={{width:'100%'}} showTime allowClear />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
label="操作人"
|
||||
name="opUserName"
|
||||
rules={[{required: true}]}
|
||||
>
|
||||
<Input disabled={mode==='view'} style={{width:'100%'}} allowClear />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
label="调度状态"
|
||||
name="status"
|
||||
rules={[{required: true}]}
|
||||
>
|
||||
<NormalSelect disabled={mode==='view'} options={[{label:"执行中",value:0},{label:"完成",value:1}]}/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
<Row>
|
||||
<Col span={24}>
|
||||
<Form.Item
|
||||
label="调度原因"
|
||||
name="dispatchReason"
|
||||
labelCol={{ span: 3 }}
|
||||
wrapperCol={{ span: 19 }}
|
||||
>
|
||||
<Input.TextArea disabled={mode==='view'} style={{width:'100%',minHeight:'100px'}} allowClear />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
<Row>
|
||||
<Col span={24}>
|
||||
<Form.Item
|
||||
label="调度详情"
|
||||
name="dispatchDetail"
|
||||
labelCol={{ span: 3 }}
|
||||
wrapperCol={{ span: 19 }}
|
||||
>
|
||||
<Input.TextArea disabled={mode==='view'} style={{width:'100%',minHeight:'100px'}} allowClear />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
<Row>
|
||||
<Col span={24}>
|
||||
<Form.Item
|
||||
label="附件"
|
||||
name="fieldId"
|
||||
labelCol={{ span: 3 }}
|
||||
wrapperCol={{ span: 19 }}
|
||||
>
|
||||
{mode !== "view" &&
|
||||
<Dragger
|
||||
name='file'
|
||||
// multiple
|
||||
action="/gunshiApp/tsg/safety/hazard/invest/file/upload/singleSimple"
|
||||
onChange={fileChange}
|
||||
onDrop={(info) => { console.log(info.dataTransfer.files); }}
|
||||
fileList={fileList}
|
||||
disabled={loading}
|
||||
// onSuccess={handleSuccess}
|
||||
>
|
||||
<p className="ant-upload-text">点击或拖拽文件到此区域上传</p>
|
||||
<p className="ant-upload-hint">
|
||||
支持扩展名:.doc .docx .pdf .jpg .png .xlsx .xls
|
||||
</p>
|
||||
</Dragger>
|
||||
}
|
||||
<Row gutter={[16]}>
|
||||
{
|
||||
fileList?.length > 0 && fileList?.map(file => {
|
||||
return (
|
||||
<Col span={12}>
|
||||
<div className="file-item" style={{width:"75%"}}>
|
||||
<div className='file-description'>
|
||||
{file.name.indexOf('.docx') > -1 ?
|
||||
<div
|
||||
onClick={() => { download(file.response?.data?.fileId) }}
|
||||
style={{ cursor: 'pointer' }}
|
||||
>
|
||||
<FileWordOutlined
|
||||
style={{ fontSize: 40 }}
|
||||
/>
|
||||
</div>
|
||||
:
|
||||
file.name.indexOf('.pdf') > -1 ?
|
||||
<div
|
||||
onClick={() => { viewPdf(file.response?.data?.fileId) }}
|
||||
style={{ cursor: 'pointer' }}
|
||||
>
|
||||
<FilePdfOutlined style={{ fontSize: 40 }} />
|
||||
</div>
|
||||
:
|
||||
file.name.indexOf('.zip') > -1 ?
|
||||
<div
|
||||
onClick={() => { download(file.response?.data?.fileId) }}
|
||||
style={{ cursor: 'pointer' }}
|
||||
>
|
||||
<FileZipOutlined style={{ fontSize: 40 }} />
|
||||
</div>
|
||||
:
|
||||
file.name.indexOf('.xlsx') > -1 ?
|
||||
<div
|
||||
onClick={() => { download(file.response?.data?.fileId) }}
|
||||
style={{ cursor: 'pointer' }}
|
||||
>
|
||||
<FileExcelOutlined style={{ fontSize: 40 }} />
|
||||
</div>
|
||||
:
|
||||
<Image width={60} src={url +file.response?.data?.filePath} alt='' />
|
||||
}
|
||||
<span>{file.name}</span>
|
||||
</div>
|
||||
<div className={mode == "view" ? 'delete-icon disable-icon' : 'delete-icon'} onClick={() => deleteFile(file.response?.data?.fileId)}>
|
||||
<DeleteOutlined />
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
)
|
||||
})
|
||||
}
|
||||
</Row>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
{
|
||||
mode==='view'?null:(
|
||||
<>
|
||||
<Form.Item {...btnItemLayout}>
|
||||
<Button type="primary" htmlType="submit">
|
||||
{mode === 'save' ? '提交' : '修改'}
|
||||
</Button>
|
||||
</Form.Item>
|
||||
</>
|
||||
)
|
||||
}
|
||||
</Form>
|
||||
<Modal
|
||||
open={pdfViewOPen}
|
||||
width={1000}
|
||||
title=""
|
||||
footer={null}
|
||||
style={{marginTop:"-5%"}}
|
||||
onCancel={() => {
|
||||
setPdfViewOPen(false)
|
||||
}}
|
||||
>
|
||||
<iframe
|
||||
style={{
|
||||
height: '80vh',
|
||||
width: '100%',
|
||||
border: 0,
|
||||
marginTop: 20,
|
||||
}}
|
||||
src={`${process.env.PUBLIC_URL}/static/pdf/web/viewer.html?file=${encodeURIComponent(`/gunshiApp/tsg/safety/hazard/invest/file/download/${iframeSrc}`)}`}
|
||||
/>
|
||||
</Modal>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default ModalForm;
|
||||
|
|
@ -0,0 +1,184 @@
|
|||
import React, { Fragment, useRef, useMemo,useEffect,useState } from 'react';
|
||||
import BasicCrudModal from '../../../components/crud/BasicCrudModal';
|
||||
import { Table, Card, Alert } from 'antd';
|
||||
import { useSelector } from 'react-redux';
|
||||
import ToolBar from './toolbar';
|
||||
import ModalForm from './form';
|
||||
import apiurl from '../../../service/apiurl';
|
||||
import usePageTable from '../../../components/crud/usePageTable2';
|
||||
import { createCrudService } from '../../../components/crud/_';
|
||||
import {CrudOpRender_text} from '../../../components/crud/CrudOpRender';
|
||||
import { exportFile } from '../../../utils/tools.js';
|
||||
import { httppost2, httppost5 } from '../../../utils/request';
|
||||
import moment from 'moment';
|
||||
|
||||
const statusVal = {'0':'执行中','1':'完成'}
|
||||
|
||||
|
||||
const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
|
||||
const Page = () => {
|
||||
const role = useSelector(state => state.auth.role);
|
||||
const editBtn = role?.rule?.find(item => item.menuName == "编辑")||true;
|
||||
const viewBtn = role?.rule?.find(item => item.menuName == "查看")||true;
|
||||
const delBtn = role?.rule?.find(item => item.menuName == "删除")||true;
|
||||
const refModal = useRef();
|
||||
const [searchVal, setSearchVal] = useState(false)
|
||||
const [isChecked, setIsChecked] = useState(false)
|
||||
const [delVal, setDelVal] = useState([])
|
||||
const [num,setNum] = useState(0)
|
||||
|
||||
|
||||
const columns = [
|
||||
{ title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align: "center" },
|
||||
{title: '调度开始时间', key: 'startTime', dataIndex: 'startTime', width: 140,},
|
||||
{title: '调度结束时间', key: 'endTime', dataIndex: 'endTime', width: 140,},
|
||||
{title: '调度原因', key: 'dispatchReason', dataIndex: 'dispatchReason', width: 140,},
|
||||
{title: '调度详情', key: 'dispatchDetail', dataIndex: 'dispatchDetail', width: 140,},
|
||||
{title: '操作人', key: 'opUserName', dataIndex: 'opUserName', width: 140,},
|
||||
{title: '调度状态', key: 'status', dataIndex: 'status', width: 140, render:(v)=>statusVal[v]},
|
||||
{
|
||||
title: '操作', key: 'operation', width: 200, fixed: 'right',align: 'center',
|
||||
render: (value, row, index) => (
|
||||
<CrudOpRender_text
|
||||
edit={editBtn ? true : false}
|
||||
del={delBtn ? true : false}
|
||||
view={viewBtn ? true : false}
|
||||
command={(cmd) => () => command(cmd)(row)} />)
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
const width = useMemo(() => columns.reduce((total, cur) => total + (cur.width), 0), [columns]);
|
||||
|
||||
const command = (type) => (params) => {
|
||||
if (type === 'save') {
|
||||
refModal.current.showSave({status:0});
|
||||
} else if (type === 'edit') {
|
||||
refModal.current.showEdit({ ...params });
|
||||
} else if (type === 'view') {
|
||||
refModal.current.showView(params);
|
||||
} else if (type === 'del') {
|
||||
let myParams
|
||||
if(params.id){
|
||||
myParams = [params.id]
|
||||
}else{
|
||||
myParams = params
|
||||
}
|
||||
refModal.current.onDelete(apiurl.ddjl.del,myParams);
|
||||
setIsChecked(false)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const exportExcel = () => {
|
||||
let params = {
|
||||
...searchVal,
|
||||
"pageSo": {
|
||||
"pageSize": tableProps.pagination.current,
|
||||
"pageNumber": tableProps.pagination.pageSize
|
||||
},
|
||||
}
|
||||
httppost5(apiurl.ddjl.export, params).then(res => {
|
||||
exportFile(`调度记录.xlsx`,res.data)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const { tableProps, search, refresh } = usePageTable(createCrudService(apiurl.ddjl.page).find_noCode);
|
||||
|
||||
console.log(tableProps);
|
||||
|
||||
/**
|
||||
* @description 处理成功的回调
|
||||
*/
|
||||
useEffect(() => {
|
||||
if (searchVal) {
|
||||
const params = {
|
||||
search: {
|
||||
...searchVal,
|
||||
}
|
||||
};
|
||||
search(params)
|
||||
}
|
||||
}, [searchVal])
|
||||
|
||||
useEffect(()=>{
|
||||
(async()=>{
|
||||
const { code, data } = await httppost2(apiurl.ddjl.page,{
|
||||
"pageSo": {
|
||||
"pageSize": 10,
|
||||
"pageNumber": 1
|
||||
},
|
||||
"dateSo": {
|
||||
"start": moment().format('YYYY-01-01 00:00:00'),
|
||||
"end": moment().format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
})
|
||||
if(code===200){
|
||||
setNum(data.total)
|
||||
}
|
||||
})()
|
||||
})
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className='content-root clearFloat xybm' style={{paddingRight:"0",paddingBottom:"0"}}>
|
||||
<div className='lf CrudAdcdTreeTableBox' style={{width:"100%",overflowY:"auto"}}>
|
||||
<Card className='nonebox'>
|
||||
<ToolBar
|
||||
setSearchVal={setSearchVal}
|
||||
onSave={command('save')}
|
||||
setIsChecked={(v)=>setIsChecked(v)}
|
||||
setDelVal={(v)=>setDelVal(v)}
|
||||
isChecked={isChecked}
|
||||
exportFile={exportExcel}
|
||||
role={role}
|
||||
/>
|
||||
</Card>
|
||||
<div className="ant-card-body" style={{ padding: "20px 0 0 0" }}>
|
||||
|
||||
<Alert
|
||||
message={moment().format('YYYY')+'年共接收调度令'+num+'个。'}
|
||||
style={{marginBottom:'10px'}}
|
||||
type="info"
|
||||
/>
|
||||
|
||||
{
|
||||
isChecked?
|
||||
<Alert
|
||||
message={'已选择'+delVal.length+'项'}
|
||||
style={{marginBottom:'10px'}}
|
||||
type="error"
|
||||
action={delVal.length>0?<CrudOpRender_text del={true} command={(type) => () => command(type)(delVal)} />:null}
|
||||
/>:null
|
||||
}
|
||||
<Table
|
||||
columns={columns}
|
||||
rowKey="inx"
|
||||
{...tableProps}
|
||||
scroll={{ x: width , y: "calc( 100vh - 400px )"}}
|
||||
rowSelection={
|
||||
isChecked?
|
||||
{
|
||||
type: 'checkbox',
|
||||
onChange: (v,e)=>setDelVal(e.map((i)=>i.id))
|
||||
}:null
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<BasicCrudModal
|
||||
width={1000}
|
||||
ref={refModal}
|
||||
title=""
|
||||
component={ModalForm}
|
||||
onCrudSuccess={refresh}
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default Page;
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
.basic-info{
|
||||
position: relative;
|
||||
font-size: 16px;
|
||||
margin-bottom: 20px;
|
||||
padding:5px 25px;
|
||||
border-bottom: 1px solid #eee;
|
||||
&::before{
|
||||
position: absolute;
|
||||
top:8px;
|
||||
left:0;
|
||||
content: "";
|
||||
display: block;
|
||||
width: 5px;
|
||||
height: 20px;
|
||||
background-color: #0079fe;
|
||||
}
|
||||
}
|
||||
.time-line{
|
||||
width: 50%;
|
||||
margin-left: 6%;
|
||||
margin-top: 1%;
|
||||
.time-line-item{
|
||||
display: flex;
|
||||
// align-items: center;
|
||||
column-gap: 20px;
|
||||
.item-right{
|
||||
flex:1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
import React, { useEffect,useState } from 'react';
|
||||
import { Form, Input, Button, DatePicker } from 'antd';
|
||||
import NormalSelect from '../../../components/Form/NormalSelect';
|
||||
|
||||
import moment from 'moment';
|
||||
const { RangePicker } = DatePicker;
|
||||
const ToolBar = ({ setSearchVal, onSave, storeData, role, setIsChecked, setDelVal, isChecked, exportFile }) => {
|
||||
const addBtn = role?.rule?.find(item => item.menuName == "新增")||true;
|
||||
const searchBtn = role?.rule?.find(item => item.menuName == "查询")||true;
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const delChange = ()=>{
|
||||
if(isChecked){
|
||||
setIsChecked(false)
|
||||
setIsChecked(false)
|
||||
}else{
|
||||
setIsChecked(true)
|
||||
setIsChecked(true)
|
||||
setDelVal([])
|
||||
}
|
||||
}
|
||||
|
||||
const onFinish = (values) => {
|
||||
let dateSo;
|
||||
if (values.tm) {
|
||||
dateSo = {
|
||||
start: moment(values.tm[0]).format('YYYY-MM-DD 00:00:00'),
|
||||
end: moment(values.tm[1]).format('YYYY-MM-DD 00:00:00')
|
||||
}
|
||||
}
|
||||
delete values.tm
|
||||
setSearchVal({...values, dateSo});
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
let dateSo = {
|
||||
start: moment().format('YYYY-01-01 00:00:00'),
|
||||
end: moment().format('YYYY-MM-DD 00:00:00')
|
||||
}
|
||||
form.setFieldValue("tm", [moment(dateSo.start), moment(dateSo.end)])
|
||||
setSearchVal({ dateSo })
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<>
|
||||
<div style={{display:'flex',justifyContent:'space-between'}}>
|
||||
<Form form={form} className='toolbarBox' layout="inline" onFinish={onFinish}>
|
||||
<Form.Item label="时间段" name="tm">
|
||||
<RangePicker
|
||||
allowClear
|
||||
style={{ width: "300px" }}
|
||||
format="YYYY-MM-DD"
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item label="操作人" name="opUserName">
|
||||
<Input allowClear style={{width:'150px'}}/>
|
||||
</Form.Item>
|
||||
<Form.Item label="调度状态" name="status">
|
||||
<NormalSelect options={[{label:"执行中",value:"0"},{label:"完成",value:"1"}]} style={{width:'150px'}}/>
|
||||
</Form.Item>
|
||||
{searchBtn ? <Form.Item>
|
||||
<Button type="primary" htmlType="submit">查询</Button>
|
||||
</Form.Item> : null }
|
||||
|
||||
<Form.Item>
|
||||
<Button onClick={() => form.resetFields()}>重置</Button>
|
||||
</Form.Item>
|
||||
<Form.Item>
|
||||
<Button size='Default' onClick={delChange} type={isChecked?"primary":""}>删除</Button>
|
||||
</Form.Item>
|
||||
{
|
||||
(onSave && addBtn) ?
|
||||
<Form.Item>
|
||||
<Button onClick={onSave}>新增</Button>
|
||||
</Form.Item>
|
||||
:null
|
||||
}
|
||||
<Form.Item>
|
||||
<Button size='Default' onClick={exportFile}>导出</Button>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default ToolBar;
|
||||
Loading…
Reference in New Issue