Browse Source

feat:查询按钮样式修改+服务器统计数错误+一些字段名称的更改

dev
zhaobing 2 years ago
parent
commit
5d74a1e992
  1. 2
      web/client/src/sections/facility/components/serverInfoModal.jsx
  2. 16
      web/client/src/sections/facility/containers/maintenanceRecords.jsx
  3. 2
      web/client/src/sections/service/containers/maintenanceRecords.jsx
  4. 2
      web/client/src/sections/service/containers/serviceRecord.jsx

2
web/client/src/sections/facility/components/serverInfoModal.jsx

@ -66,7 +66,7 @@ const ServerInfoModal = (props) => {
getFormApi={(formApi) => (api.current = formApi)}
labelPosition='left'
>
<Form.Input field='sketch' label='维护简述:' maxLength={50} rules={[{ required: true, message: '请输入设备类型' }]}></Form.Input>
<Form.Input field='sketch' label='维护简述:' maxLength={50} rules={[{ required: true, message: '请输入维护简述' }]}></Form.Input>
<Form.TextArea field='reason' label='维修原因:' rules={[{ required: true, message: '请输入维修原因' }]} ></Form.TextArea>
<Form.Select field='repairman' label='维修人:' style={{ width: '100%' }} multiple filter>
{pepList?.map((item) => {

16
web/client/src/sections/facility/containers/maintenanceRecords.jsx

@ -30,7 +30,17 @@ const MaintenanceRecords = (props) => {
const delHandler=(record)=>{
dispatch(facility.delServerInfoMaintenanceRecord(record.id)).then((res)=>{
if(res.success) {
getServerInfo({startTime,endTime,pageIndex:1,pageSize})
const query={startTime,endTime,pageIndex,pageSize}
dispatch(facility.getServerInfoMaintenanceRecord(query)).then((res)=>{
if(res.success) {
setRecordList(res.payload.data.responseRes);setTotal(res?.payload.data.count)
//-1
if(res?.payload.data.responseRes.length===0&&pageIndex!==1){
getServerInfo({startTime,endTime,pageIndex:pageIndex-1,pageSize})
setPageIndex(pageIndex-1)
}
}
})
setPageIndex(1)
}
@ -164,14 +174,14 @@ const MaintenanceRecords = (props) => {
</Button>
</div>
<div style={{ marginRight: 20, display: 'flex', alignItems: 'baseline' }}>
<span style={{ marginRight: 10 }}>上报时间</span>
<span style={{ marginRight: 10 }}>维护开始时间</span>
<DatePicker type='dateTimeRange' onChange={(dateTime)=>{
setStartTime(dateTime[0]+'')
setEndTime(dateTime[1]+'')
}} onClear={clearHandler}></DatePicker>
</div>
<div>
<Button onClick={searchHandler}>查询</Button>
<Button theme='solid' type="primary" onClick={searchHandler}>查询</Button>
</div>
</div>
<div>

2
web/client/src/sections/service/containers/maintenanceRecords.jsx

@ -183,7 +183,7 @@ const MaintenanceRecords = (props) => {
<DatePicker type='dateTimeRange' onChange={(e)=>{timeHandler(e)}} onClear={()=>{setStartTime('1970-1-1');setEndTime('2099-12-31')}}></DatePicker>
</div>
<div>
<Button onClick={findHandler}>查询</Button>
<Button theme='solid' type="primary" onClick={findHandler}>查询</Button>
</div>
</div>
<div>

2
web/client/src/sections/service/containers/serviceRecord.jsx

@ -208,7 +208,7 @@ const addHandler=()=>{
<DatePicker type="dateRange" insetInput style={{ width: 280,marginLeft:10 }} onChange={(e)=>{
setStartTime((e[0])+'');setEndTime(e[1]+'') }}
onClear={()=>{setStartTime('1970-1-1');setEndTime('2099-12-31')}} />
<Button style={{ marginLeft:20 }} onClick={()=>{
<Button theme='solid' type="primary" style={{ marginLeft:20 }} onClick={()=>{
setPageIndex(1);setPageSize(10)
getRecordList({ startTime,endTime,pageIndex:1,pageSize:10});
//console.log('setStartTime',startTime,'setEndTime',endTime)

Loading…
Cancel
Save