fix(): bug修复

qzc-dev-demo
李神峰 2024-11-15 14:04:53 +08:00
parent 217da0c127
commit 51bcad93ce
25 changed files with 128 additions and 63 deletions

View File

@ -169,7 +169,7 @@ function usePageTable<T>(
current: state.pageNumber, current: state.pageNumber,
total: state.total, total: state.total,
pageSizeOptions: ['10', '15', '20', '50', '100'], pageSizeOptions: ['10', '15', '20', '50', '100'],
hideOnSinglePage: true, hideOnSinglePage: false,
position: ['bottomRight'], position: ['bottomRight'],
}, },
loading: state.loading, loading: state.loading,

View File

@ -7,7 +7,7 @@ import './index.less'
import MyImg from './myImg.js' import MyImg from './myImg.js'
import { httpget,httppost } from '../../../../../utils/request'; import { httpget,httppost } from '../../../../../utils/request';
import apiurl from '../../../../../service/apiurl'; import apiurl from '../../../../../service/apiurl';
import { Image } from 'antd'; import { Image,Divider } from 'antd';
function Skssjc({data}) { function Skssjc({data}) {
@ -45,26 +45,33 @@ function Skssjc({data}) {
</div> </div>
<div className="infoItem"> <div className="infoItem">
<div className="row-key">设计洪水位:</div> <div className="row-key">校验洪水位:</div>
<div className="row-value">{data.desFloodLev ? data.desFloodLev.toFixed(2):'-'}</div> <div className="row-value">{data?.calFloodLev ? data?.calFloodLev.toFixed(2) : '-'}</div>
<Divider type="vertical" style={{height:25,background:"#000",width:2,margin:"0 30px"}}/>
<div className="row-value" style={{width:"20%"}}>{(data.calFloodLev && data?.rz) ? (data?.rz - data.calFloodLev).toFixed(2):'-'}</div>
<div className="row-unit">m</div> <div className="row-unit">m</div>
</div> </div>
<div className="infoItem"> <div className="infoItem">
<div className="row-key">正常蓄水位:</div> <div className="row-key">设计洪水位:</div>
<div className="row-value">{data.normWatLev ? data.normWatLev.toFixed(2):'-'}</div> <div className="row-value">{data?.desFloodLev ? data?.desFloodLev.toFixed(2):'-'}</div>
<Divider type="vertical" style={{height:25,background:"#000",width:2,margin:"0 30px"}}/>
<div className="row-value" style={{width:"20%"}}>{(data.desFloodLev && data?.rz) ? (data?.rz - data.desFloodLev).toFixed(2):'-'}</div>
<div className="row-unit">m</div> <div className="row-unit">m</div>
</div> </div>
<div className="infoItem"> <div className="infoItem">
<div className="row-key">汛限水位:</div> <div className="row-key">汛限水位:</div>
<div className="row-value">{data.flLowLimLev ? data.flLowLimLev.toFixed(2):'-'}</div> <div className="row-value">{data.flLowLimLev ? data.flLowLimLev.toFixed(2):'-'}</div>
<Divider type="vertical" style={{height:25,background:"#000",width:2,margin:"0 30px"}}/>
<div className="row-value" style={{width:"20%"}}>{(data.flLowLimLev && data?.rz) ? (data?.rz - data.flLowLimLev).toFixed(2):'-'}</div>
<div className="row-unit">m</div> <div className="row-unit">m</div>
</div> </div>
<div className="infoItem"> <div className="infoItem">
<div className="row-key">死水位:</div> <div className="row-key">死水位:</div>
<div className="row-value">{data.deadLev ? data.deadLev.toFixed(2):'-'}</div> <div className="row-value">{data.deadLev ? data.deadLev.toFixed(2):'-'}</div>
<Divider type="vertical" style={{height:25,background:"#000",width:2,margin:"0 30px"}}/>
<div className="row-value" style={{width:"20%"}}>{(data.deadLev && data?.rz) ? (data?.rz - data.deadLev).toFixed(2):'-'}</div>
<div className="row-unit">m</div> <div className="row-unit">m</div>
</div> </div>
<div className="infoItem"> <div className="infoItem">

View File

@ -1,12 +1,11 @@
export default function drpOption({ data, wrz, grz }) { export default function drpOption({ data, wrz, grz }) {
console.log("data",wrz, grz); console.log("data",wrz, grz);
const maxVal = Math.max(...data.map(obj => obj.drp)) const maxVal = Math.max(...data.map(obj => obj.drp))
const maxSw = Math.max(...data.map(obj => obj.z)) const maxSw = Math.ceil(Math.max(...data.map(obj => obj.z)))
const minSw = Math.min(...data.map(obj => obj.z)) const minSw = Math.floor(Math.min(...data.map(obj => obj.z)))
const maxLl = Math.max(...data.map(obj => obj.tq)) const maxLl = Math.max(...data.map(obj => obj.tq))
const minLl = Math.min(...data.map(obj => obj.tq)) const minLl = Math.min(...data.map(obj => obj.tq))
return { return {
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',

View File

@ -121,6 +121,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
<Input <Input
style={{ width: '100%' }} style={{ width: '100%' }}
allowClear allowClear
disabled={mode==='view'}
/> />
</Form.Item> </Form.Item>
</Col> </Col>
@ -137,6 +138,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
<Input <Input
style={{ width: '100%' }} style={{ width: '100%' }}
allowClear allowClear
disabled={mode==='view'}
/> />
</Form.Item> </Form.Item>
</Col> </Col>
@ -150,7 +152,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
})} })}
rules={[{ required: true }]} rules={[{ required: true }]}
> >
<DatePicker allowClear style={{width:'280px'}} /> <DatePicker allowClear style={{width:'280px'}} disabled={mode==='view'}/>
</Form.Item> </Form.Item>
</Col> </Col>
</Row> </Row>
@ -164,6 +166,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
<Input <Input
style={{ width: '100%' }} style={{ width: '100%' }}
allowClear allowClear
disabled={mode==='view'}
/> />
</Form.Item> </Form.Item>
</Col> </Col>
@ -177,7 +180,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
})} })}
rules={[{ required: true }]} rules={[{ required: true }]}
> >
<DatePicker allowClear style={{width:'280px'}} /> <DatePicker allowClear style={{width:'280px'}} disabled={mode==='view'}/>
</Form.Item> </Form.Item>
</Col> </Col>
</Row> </Row>
@ -212,7 +215,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
</Col> </Col>
</Row> </Row>
<Row gutter={[16]}> <Row gutter={[16]} style={{margin:"-25px 0 0 14px"}}>
{ {
loading ? <span>文件正在上传中请等待</span> : loading ? <span>文件正在上传中请等待</span> :
fileList.length > 0 && fileList.map(file => { fileList.length > 0 && fileList.map(file => {

View File

@ -121,6 +121,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
<Input <Input
style={{ width: '100%' }} style={{ width: '100%' }}
allowClear allowClear
disabled={mode==='view'}
/> />
</Form.Item> </Form.Item>
</Col> </Col>
@ -137,6 +138,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
<Input <Input
style={{ width: '100%' }} style={{ width: '100%' }}
allowClear allowClear
disabled={mode==='view'}
/> />
</Form.Item> </Form.Item>
</Col> </Col>
@ -150,7 +152,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
})} })}
rules={[{ required: true }]} rules={[{ required: true }]}
> >
<DatePicker allowClear style={{width:'280px'}} /> <DatePicker allowClear style={{width:'280px'}} disabled={mode==='view'}/>
</Form.Item> </Form.Item>
</Col> </Col>
</Row> </Row>
@ -164,6 +166,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
<Input <Input
style={{ width: '100%' }} style={{ width: '100%' }}
allowClear allowClear
disabled={mode==='view'}
/> />
</Form.Item> </Form.Item>
</Col> </Col>
@ -177,7 +180,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
})} })}
rules={[{ required: true }]} rules={[{ required: true }]}
> >
<DatePicker allowClear style={{width:'280px'}} /> <DatePicker allowClear style={{width:'280px'}} disabled={mode==='view'}/>
</Form.Item> </Form.Item>
</Col> </Col>
</Row> </Row>
@ -212,7 +215,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onCrudSuccess }) => {
</Col> </Col>
</Row> </Row>
<Row gutter={[16]}> <Row gutter={[16]} style={{margin:"-25px 0 0 14px"}}>
{ {
loading ? <span>文件正在上传中请等待</span> : loading ? <span>文件正在上传中请等待</span> :
fileList.length > 0 && fileList.map(file => { fileList.length > 0 && fileList.map(file => {

View File

@ -242,7 +242,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onSimilarSave }) => {
</Col> </Col>
<Col span={12}> <Col span={12}>
<Form.Item <Form.Item
label="存放地点" label="仓库地点"
name="storeLocation" name="storeLocation"
> >
<Input type='text' disabled={mode==='view'} style={{width:'100%'}} allowClear /> <Input type='text' disabled={mode==='view'} style={{width:'100%'}} allowClear />
@ -271,7 +271,7 @@ const ModalForm = ({ mode, record,onEdit,onSave,onSimilarSave }) => {
<Row> <Row>
<Col span={24}> <Col span={24}>
<Form.Item <Form.Item
label={mode !== "view" ? "附件" : ''} label="附件"
name="fieldId" name="fieldId"
labelCol={{ span: 3 }} labelCol={{ span: 3 }}
wrapperCol={{ span: 19 }} wrapperCol={{ span: 19 }}

View File

@ -102,7 +102,8 @@ const Page = () => {
record.unit === 8 ? "箱" : record.unit === 8 ? "箱" :
record.unit === 9 ? "卷" : record.unit === 9 ? "卷" :
record.unit === 10 ? "立方米" : record.unit === 10 ? "立方米" :
"平方米" record.unit === 11 ? "平方米" :
""
}</span> }</span>
}, },
{ title: '库存数量', key: 'storeQuantity', dataIndex: 'storeQuantity', width: 150, ellipsis: true }, { title: '库存数量', key: 'storeQuantity', dataIndex: 'storeQuantity', width: 150, ellipsis: true },
@ -132,7 +133,7 @@ const Page = () => {
{ title: '联系电话', key: 'phone', dataIndex: 'phone', width: 150, ellipsis: true }, { title: '联系电话', key: 'phone', dataIndex: 'phone', width: 150, ellipsis: true },
{ {
title: '操作', key: 'operation', width: 240, fixed: 'right',align: 'center', title: '操作', key: 'operation', width: 240, fixed: 'right',align: 'center',
render: (value, row, index) => (<CrudOpRender_text edit={editBtn ? true : false} del={delBtn ? true : false} similarAdd={copyBtn ? true : false} command={(cmd) => () => command(cmd)(row)} />) render: (value, row, index) => (<CrudOpRender_text edit={editBtn ? true : false} view={true} del={delBtn ? true : false} similarAdd={copyBtn ? true : false} command={(cmd) => () => command(cmd)(row)} />)
}, },
]; ];

View File

@ -26,7 +26,7 @@ const ToolBar = ({ setSearchVal,jh}) => {
<Form.Item label="告警内容" name="warnContent"> <Form.Item label="告警内容" name="warnContent">
<Input allowClear style={{width:'180px'}}/> <Input allowClear style={{width:'180px'}}/>
</Form.Item> </Form.Item>
<Form.Item label="告警时间" name="tm"> <Form.Item label="播报时间" name="tm">
<RangePicker <RangePicker
allowClear allowClear
showTime showTime

View File

@ -70,7 +70,7 @@ export default function Gsnlfx() {
} }
const providerWater = useMemo(() => { const providerWater = useMemo(() => {
if (tableData[0]?.nowCap && tableData[0]?.deadCap) { if (tableData[0]?.nowCap && tableData[0]?.deadCap) {
let num = ((tableData[0]?.nowCap - tableData[0]?.deadCap) / 10000).toFixed(2) let num = (tableData[0]?.nowCap - tableData[0]?.deadCap).toFixed(2)
return num return num
} else { } else {
return "--" return "--"

View File

@ -22,7 +22,7 @@ const ToolBar = ({ setSearchVal, onSave, storeData, role }) => {
useEffect(() => { useEffect(() => {
let dateSo = { let dateSo = {
start: moment().subtract(1,"years").format('YYYY-MM-DD 00:00:00'), start: moment().startOf("year").format('YYYY-MM-DD 00:00:00'),
end: moment().format('YYYY-MM-DD 23:59:59') end: moment().format('YYYY-MM-DD 23:59:59')
} }
form.setFieldValue("tm", [moment(dateSo.start), moment(dateSo.end)]) form.setFieldValue("tm", [moment(dateSo.start), moment(dateSo.end)])

View File

@ -79,7 +79,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
const onfinish = (values) => { const onfinish = (values) => {
values.accidentDate = values.accidentDate?moment(values.accidentDate).format("YYYY-MM-DD 00:00:00"):'' values.accidentDate = values.accidentDate?moment(values.accidentDate).format("YYYY-MM-DD HH:mm:00"):''
values.closeCaseDate = values.closeCaseDate?moment(values.closeCaseDate).format("YYYY-MM-DD 00:00:00"):'' values.closeCaseDate = values.closeCaseDate?moment(values.closeCaseDate).format("YYYY-MM-DD 00:00:00"):''
let oldFiles = fileList.map(item => ({fileId:item.response?.data?.fileId}) ) let oldFiles = fileList.map(item => ({fileId:item.response?.data?.fileId}) )
let oldFiles1 = imgfileList.map(item => ({fileId:item.response?.data?.fileId}) ) let oldFiles1 = imgfileList.map(item => ({fileId:item.response?.data?.fileId}) )
@ -197,7 +197,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
}, },
]} ]}
> >
<DatePicker disabled={mode==='view'} format={'YYYY-MM-DD'} style={{width:'100%'}} allowClear /> <DatePicker disabled={mode==='view'} format={'YYYY-MM-DD HH:mm'} style={{width:'100%'}} allowClear showTime />
</Form.Item> </Form.Item>
</Col> </Col>
</Row> </Row>

View File

@ -22,7 +22,7 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
useEffect(() => { useEffect(() => {
let dateSo = { let dateSo = {
start: moment().subtract(1,"years").format('YYYY-MM-DD 00:00:00'), start: moment().startOf("year").format('YYYY-MM-DD 00:00:00'),
end: moment().format('YYYY-MM-DD 23:59:59') end: moment().format('YYYY-MM-DD 23:59:59')
} }
form.setFieldValue("tm", [moment(dateSo.start), moment(dateSo.end)]) form.setFieldValue("tm", [moment(dateSo.start), moment(dateSo.end)])

View File

@ -71,7 +71,11 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
const onfinish = (values) => { const onfinish = (values) => {
values.eventsDate = values.eventsDate?moment(values.eventsDate).format("YYYY-MM-DD 00:00:00"):'' const userId = localStorage.getItem('userId')
const userName = localStorage.getItem('userName')
values.reportUserId = userId;
values.reportUserName = userName;
values.eventsDate = values.eventsDate ? moment(values.eventsDate).format("YYYY-MM-DD 00:00:00") : ''
let oldFiles = fileList.map(item => ({fileId:item.response?.data?.fileId}) ) let oldFiles = fileList.map(item => ({fileId:item.response?.data?.fileId}) )
if (mode === 'edit') { if (mode === 'edit') {
values.files = oldFiles; values.files = oldFiles;

View File

@ -22,7 +22,7 @@ const ToolBar = ({ setSearchVal, onSave, storeData, role }) => {
useEffect(() => { useEffect(() => {
let dateSo = { let dateSo = {
start: moment().subtract(1,"years").format('YYYY-MM-DD 00:00:00'), start: moment().startOf("year").format('YYYY-MM-DD 00:00:00'),
end: moment().format('YYYY-MM-DD 23:59:59') end: moment().format('YYYY-MM-DD 23:59:59')
} }
form.setFieldValue("tm", [moment(dateSo.start), moment(dateSo.end)]) form.setFieldValue("tm", [moment(dateSo.start), moment(dateSo.end)])

View File

@ -122,7 +122,7 @@ const getResultList = async() => {
if (mode === 'edit') { if (mode === 'edit') {
values.files = oldFiles; values.files = oldFiles;
values.id = record.id; values.id = record.id;
onEdit(apiurl.rcgl.aqgl.fxgkqd.edit,values) onEdit(apiurl.rcgl.aqgl.fxgkqd.edit,{...record,...values});
} }
if (mode === 'save') { if (mode === 'save') {
values.files = oldFiles values.files = oldFiles

View File

@ -10,7 +10,7 @@ import apiurl from '../../../../service/apiurl';
import usePageTable from '../../../../components/crud/usePageTable2'; import usePageTable from '../../../../components/crud/usePageTable2';
import { createCrudService } from '../../../../components/crud/_'; import { createCrudService } from '../../../../components/crud/_';
import {CrudOpRender_text} from '../../../../components/crud/CrudOpRender'; import {CrudOpRender_text} from '../../../../components/crud/CrudOpRender';
import moment from 'moment';
const url = "http://223.75.53.141:9102/test.by-lyf.tmp" const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
const Page = () => { const Page = () => {
const role = useSelector(state => state.auth.role); const role = useSelector(state => state.auth.role);
@ -50,7 +50,10 @@ const Page = () => {
render: (value) => <span>{value ? value.map(item => item.dictNm).join():''}</span> render: (value) => <span>{value ? value.map(item => item.dictNm).join():''}</span>
}, },
{title: '主要防范措施', key: 'preventMeasure', dataIndex: 'preventMeasure', width: 300,ellipsis: true,align: 'center',}, {title: '主要防范措施', key: 'preventMeasure', dataIndex: 'preventMeasure', width: 300,ellipsis: true,align: 'center',},
{title: '创建日期', key: 'createDate', dataIndex: 'createDate', width: 200,align: 'center',}, {
title: '创建日期', key: 'createDate', dataIndex: 'createDate', width: 200, align: 'center',
render: (v) => <span>{v ? moment(v).format("YYYY-MM-DD"): ''}</span>
},
{ {
title: '操作', key: 'operation', width: 200, fixed: 'right',align: 'center', title: '操作', key: 'operation', width: 200, fixed: 'right',align: 'center',
render: (value, row, index) => ( render: (value, row, index) => (

View File

@ -19,15 +19,15 @@ export default function Sssw({data}) {
<div className="row-key">警戒水位:</div> <div className="row-key">警戒水位:</div>
<div className="row-value">{data?.wrz ? data?.wrz.toFixed(2) : '-'}</div> <div className="row-value">{data?.wrz ? data?.wrz.toFixed(2) : '-'}</div>
<Divider type="vertical" style={{height:25,background:"#000",width:2,margin:"0 30px"}}/> <Divider type="vertical" style={{height:25,background:"#000",width:2,margin:"0 30px"}}/>
<div className="row-value" style={{width:"20%"}}>{(data.wrz && data?.z) ? (data.wrz - data?.z).toFixed(2):'-'}</div> <div className="row-value" style={{width:"20%"}}>{(data.wrz && data?.z) ? (data?.z - data.wrz).toFixed(2):'-'}</div>
<div className="row-unit">m</div> <div className="row-unit">m</div>
</div> </div>
<div className="infoItem"> <div className="infoItem">
<div className="row-key">危险水位:</div> <div className="row-key">保证水位:</div>
<div className="row-value">{data.grz ? data.grz.toFixed(2) : '-'}</div> <div className="row-value">{data.grz ? data.grz.toFixed(2) : '-'}</div>
<Divider type="vertical" style={{height:25,background:"#000",width:2,margin:"0 30px"}}/> <Divider type="vertical" style={{height:25,background:"#000",width:2,margin:"0 30px"}}/>
<div className="row-value" style={{width:"20%"}}>{(data.grz && data?.z) ? (data.grz - data?.z).toFixed(2):'-'}</div> <div className="row-value" style={{width:"20%"}}>{(data.grz && data?.z) ? (data?.z - data.grz ).toFixed(2):'-'}</div>
<div className="row-unit">m</div> <div className="row-unit">m</div>
</div> </div>
</div> </div>

View File

@ -1,6 +1,8 @@
import React from 'react' import React from 'react'
import moment from 'moment' import moment from 'moment'
import MyImg from '../../../Home/MapCtrl/components/Skssjc/myImg' import MyImg from '../../../Home/MapCtrl/components/Skssjc/myImg'
import {Divider} from "antd"
export default function Sssw({data}) { export default function Sssw({data}) {
return ( return (
<div className="ssjc"> <div className="ssjc">
@ -17,26 +19,33 @@ export default function Sssw({data}) {
</div> </div>
<div className="infoItem"> <div className="infoItem">
<div className="row-key">设计洪水位:</div> <div className="row-key">校验洪水位:</div>
<div className="row-value">{data?.desFloodLev ? data?.desFloodLev.toFixed(2):'-'}</div> <div className="row-value">{data?.calFloodLev ? data?.calFloodLev.toFixed(2) : '-'}</div>
<Divider type="vertical" style={{height:25,background:"#000",width:2,margin:"0 30px"}}/>
<div className="row-value" style={{width:"20%"}}>{(data.calFloodLev && data?.rz) ? (data?.rz - data.calFloodLev).toFixed(2):'-'}</div>
<div className="row-unit">m</div> <div className="row-unit">m</div>
</div> </div>
<div className="infoItem"> <div className="infoItem">
<div className="row-key">正常蓄水位:</div> <div className="row-key">设计洪水位:</div>
<div className="row-value">{data.normWatLev ? data.normWatLev.toFixed(2):'-'}</div> <div className="row-value">{data?.desFloodLev ? data?.desFloodLev.toFixed(2):'-'}</div>
<Divider type="vertical" style={{height:25,background:"#000",width:2,margin:"0 30px"}}/>
<div className="row-value" style={{width:"20%"}}>{(data.desFloodLev && data?.rz) ? (data?.rz - data.desFloodLev).toFixed(2):'-'}</div>
<div className="row-unit">m</div> <div className="row-unit">m</div>
</div> </div>
<div className="infoItem"> <div className="infoItem">
<div className="row-key">汛限水位:</div> <div className="row-key">汛限水位:</div>
<div className="row-value">{data.flLowLimLev ? data.flLowLimLev.toFixed(2):'-'}</div> <div className="row-value">{data.flLowLimLev ? data.flLowLimLev.toFixed(2):'-'}</div>
<Divider type="vertical" style={{height:25,background:"#000",width:2,margin:"0 30px"}}/>
<div className="row-value" style={{width:"20%"}}>{(data.flLowLimLev && data?.rz) ? (data?.rz - data.flLowLimLev).toFixed(2):'-'}</div>
<div className="row-unit">m</div> <div className="row-unit">m</div>
</div> </div>
<div className="infoItem"> <div className="infoItem">
<div className="row-key">死水位:</div> <div className="row-key">死水位:</div>
<div className="row-value">{data.deadLev ? data.deadLev.toFixed(2):'-'}</div> <div className="row-value">{data.deadLev ? data.deadLev.toFixed(2):'-'}</div>
<Divider type="vertical" style={{height:25,background:"#000",width:2,margin:"0 30px"}}/>
<div className="row-value" style={{width:"20%"}}>{(data.deadLev && data?.rz) ? (data?.rz - data.deadLev).toFixed(2):'-'}</div>
<div className="row-unit">m</div> <div className="row-unit">m</div>
</div> </div>
<div className="infoItem"> <div className="infoItem">

View File

@ -20,7 +20,7 @@ const ToolBar = ({ setSearchVal }) => {
} }
useEffect(() => { useEffect(() => {
const value = {teamName:1,year:moment()} const value = {year:moment()}
form.setFieldsValue(value) form.setFieldsValue(value)
setSearchVal({...value,year:moment().format("YYYY")}) setSearchVal({...value,year:moment().format("YYYY")})
}, []) }, [])
@ -29,9 +29,9 @@ const ToolBar = ({ setSearchVal }) => {
<> <>
<div style={{display:'flex',justifyContent:'space-between'}}> <div style={{display:'flex',justifyContent:'space-between'}}>
<Form form={form} className='toolbarBox' layout="inline" onValuesChange={valuesChange}> <Form form={form} className='toolbarBox' layout="inline" onValuesChange={valuesChange}>
<Form.Item label="统计维度" name="teamName"> {/* <Form.Item label="" name="teamName">
<NormalSelect allowClear style={{ width: '150px' }} options={types} /> <NormalSelect allowClear style={{ width: '150px' }} options={types} />
</Form.Item> </Form.Item> */}
<Form.Item label="选择年份" name="year"> <Form.Item label="选择年份" name="year">
<DatePicker <DatePicker
allowClear allowClear

View File

@ -365,6 +365,19 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
</Col> </Col>
</Row> </Row>
<Row> <Row>
<Col span={24}>
<Form.Item
label="培训范围"
name="scope"
labelCol={{ span: 3 }}
wrapperCol={{ span: 19 }}
rules={[{ required: true }]}
>
<Input disabled={mode==='view'} style={{width:'100%'}} allowClear />
</Form.Item>
</Col>
</Row>
<Row>
</Row> </Row>
<Row> <Row>
<Col span={12}> <Col span={12}>
@ -419,7 +432,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
{mode !== "view" && {mode !== "view" &&
<Dragger <Dragger
name='file' name='file'
beforeUpload={imgbeforeUpload} // beforeUpload={imgbeforeUpload}
action="/gunshiApp/tsg/personnelPlanLog/file/upload/singleSimple" action="/gunshiApp/tsg/personnelPlanLog/file/upload/singleSimple"
onChange={fileChange1} onChange={fileChange1}
onDrop={(info) => { console.log(info.dataTransfer.files); }} onDrop={(info) => { console.log(info.dataTransfer.files); }}
@ -430,7 +443,7 @@ const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => {
> >
<p className="ant-upload-text">点击或拖拽文件到此区域上传</p> <p className="ant-upload-text">点击或拖拽文件到此区域上传</p>
<p className="ant-upload-hint"> <p className="ant-upload-hint">
支持扩展名.jpg .png 支持扩展名.rar .zip .doc .docx .pdf .jpg .png .ppt
</p> </p>
</Dragger> </Dragger>
} }

View File

@ -16,6 +16,25 @@ import { httpget2 } from '../../../utils/request';
import moment from 'moment'; import moment from 'moment';
const Page = () => { const Page = () => {
const types = [
{
label: "水利",
value:1
},
{
label: "岗前培训",
value:2
},{
label: "在岗培训",
value:3
},{
label: "政治学习教育",
value:4
},{
label: "其他",
value:5
},
]
const role = useSelector(state => state.auth.role); const role = useSelector(state => state.auth.role);
const editBtn = role?.rule?.find(item => item.menuName == "编辑") || true; const editBtn = role?.rule?.find(item => item.menuName == "编辑") || true;
const viewBtn = role?.rule?.find(item => item.menuName == "查看") || true; const viewBtn = role?.rule?.find(item => item.menuName == "查看") || true;
@ -30,6 +49,10 @@ const Page = () => {
title: '标题', key: 'name', dataIndex: 'name', width: 200,ellipsis: true title: '标题', key: 'name', dataIndex: 'name', width: 200,ellipsis: true
}, },
{ title: '主办单位', key: 'unit', dataIndex: 'unit', width: 150 }, { title: '主办单位', key: 'unit', dataIndex: 'unit', width: 150 },
{
title: '培训分类', key: 'type', dataIndex: 'type', width: 150,
render: (v) => <span>{types[v]?.label}</span>
},
{ {
title: '培训内容', key: 'content', dataIndex: 'content', width: 200,ellipsis: true title: '培训内容', key: 'content', dataIndex: 'content', width: 200,ellipsis: true
}, },

View File

@ -139,7 +139,7 @@ const Page = () => {
<div className="ant-card-body" style={{ padding: "20px 0 0 0" }}> <div className="ant-card-body" style={{ padding: "20px 0 0 0" }}>
<Alert <Alert
message={moment().format('YYYY')+'年共接收调度令'+num+'个。'} message={moment().format('YYYY')+'年共执行调度任务'+num+'个。'}
style={{marginBottom:'10px'}} style={{marginBottom:'10px'}}
type="info" type="info"
/> />

View File

@ -208,7 +208,7 @@ useEffect(() => {
<Row> <Row>
<Col span={24}> <Col span={24}>
<Form.Item <Form.Item
label="值班领导" label="值班人员"
name="2" name="2"
> >
<TreeSelect <TreeSelect

View File

@ -166,7 +166,7 @@ const ToolBar = ({ value, onChange, tm, callback,role }) => {
</Form.Item>: null} </Form.Item>: null}
<Form.Item style={{ marginLeft:"auto" }}> <Form.Item style={{ marginLeft:"auto" }}>
<Badge status="error" text="带班领导" style={{ marginRight: 8 }} /> <Badge status="error" text="带班领导" style={{ marginRight: 8 }} />
<Badge status="processing" text="值班领导" style={{ marginRight: 8 }} /> <Badge status="processing" text="值班人员" style={{ marginRight: 8 }} />
</Form.Item> </Form.Item>
</Form> </Form>
</div> </div>

View File

@ -41,7 +41,7 @@ const ToolBar = ({ setSearchVal, onSave, exportFile,role }) => {
<RangePicker <RangePicker
allowClear allowClear
style={{ width: "350px" }} style={{ width: "350px" }}
format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD"
/> />
</Form.Item> </Form.Item>
{searchBtn ? <Form.Item> {searchBtn ? <Form.Item>