Browse Source

fix():修改路内bug

tags/PMS_V1.0.0_Alpha5
guoxin 1 year ago
parent
commit
7918401758
  1. 3
      src/pages/InRoadMgm/PersonMgm/Attendance/ScheduleMgm/index.scss
  2. 46
      src/pages/InRoadMgm/PersonMgm/Attendance/ScheduleMgm/loadable.jsx
  3. 4
      src/pages/InRoadMgm/RoadMgm/ConfigRoad/index.scss
  4. 1
      src/pages/InRoadMgm/RoadMgm/ConfigRoad/loadable.jsx
  5. 2
      src/pages/InRoadMgm/RoadMgm/RoadConf/index.scss
  6. 1
      src/pages/InRoadMgm/RoadMgm/RoadConf/loadable.jsx

3
src/pages/InRoadMgm/PersonMgm/Attendance/ScheduleMgm/index.scss

@ -20,6 +20,9 @@ $color-primary : var(--color-primary);
border-radius: 4px; border-radius: 4px;
} }
} }
.time-style{
width: 150px;
}
.colorReset { .colorReset {
width: 90px; width: 90px;
height: 36px; height: 36px;

46
src/pages/InRoadMgm/PersonMgm/Attendance/ScheduleMgm/loadable.jsx

@ -12,7 +12,6 @@ import {
TimePicker, TimePicker,
} from "antd"; } from "antd";
import { operator, name, pageSizeOptions } from "@/config/character.config.js"; import { operator, name, pageSizeOptions } from "@/config/character.config.js";
import utils from '@/config/utils'
import "./index.scss"; import "./index.scss";
import { SearchOutlined } from "@ant-design/icons"; import { SearchOutlined } from "@ant-design/icons";
import ajax from "@/services"; import ajax from "@/services";
@ -164,6 +163,8 @@ function ScheduleMgm(props) {
const translateBtn = (record) => { const translateBtn = (record) => {
setGetEditId(record); setGetEditId(record);
setTranslateVisible(true); setTranslateVisible(true);
setGetStartTime(moment(record.onTime))
setGetEndTime(moment(record.offTime))
setEditModal( setEditModal(
Object.assign({}, editModal, { Object.assign({}, editModal, {
scheduleName: record.scheduleName, // scheduleName: record.scheduleName, //
@ -274,8 +275,8 @@ function ScheduleMgm(props) {
let minutes1 = getStartTime != '' ? getStartTime.hour() * 60 + getStartTime.minute() : ''; let minutes1 = getStartTime != '' ? getStartTime.hour() * 60 + getStartTime.minute() : '';
let minutes2 = getEndTime != '' ? getEndTime.hour() * 60 + getEndTime.minute() : ''; let minutes2 = getEndTime != '' ? getEndTime.hour() * 60 + getEndTime.minute() : '';
let totalMinutes = minutes2 - minutes1; let totalMinutes = minutes2 - minutes1;
console.log(minutes1, minutes2);
console.log(totalMinutes);
console.log(getStartTime);
console.log(minutes1,minutes2);
const reg = /^(?:[1-9]\d?|1[0-7]\d|180|0)$/; const reg = /^(?:[1-9]\d?|1[0-7]\d|180|0)$/;
if (editModal.scheduleName == "") { if (editModal.scheduleName == "") {
message.error("请输入班次名称"); message.error("请输入班次名称");
@ -333,7 +334,7 @@ function ScheduleMgm(props) {
setDeleteVisible(false); setDeleteVisible(false);
message.success("删除成功"); message.success("删除成功");
getData(formData); getData(formData);
}else{
} else {
message.error(res.message) message.error(res.message)
} }
}); });
@ -399,7 +400,6 @@ function ScheduleMgm(props) {
setGetStartTime(time); setGetStartTime(time);
}; };
const goingEditWork = (time, timeString) => { const goingEditWork = (time, timeString) => {
console.log(time);
setEditModal({ ...editModal, onTime: timeString }); setEditModal({ ...editModal, onTime: timeString });
setGetStartTime(time); setGetStartTime(time);
}; };
@ -413,9 +413,9 @@ function ScheduleMgm(props) {
}; };
// //
const getSearchData = (data = formData) => { const getSearchData = (data = formData) => {
setFormData(Object.assign({}, formData, { pn: 1}))
setFormData(Object.assign({}, formData, { pn: 1 }))
setLastFormData(Object.assign({}, lastFormData, { pn: 1 })) setLastFormData(Object.assign({}, lastFormData, { pn: 1 }))
getData({...data, pn: 1})
getData({ ...data, pn: 1 })
}; };
const [getOperationName, setGetOperationName] = useState([]); const [getOperationName, setGetOperationName] = useState([]);
const [getNewOperationName, setGetNewOperationName] = useState([]); const [getNewOperationName, setGetNewOperationName] = useState([]);
@ -486,14 +486,14 @@ function ScheduleMgm(props) {
<Button <Button
type="primary" type="primary"
className="yisa-btn colorBtn" className="yisa-btn colorBtn"
onClick={() => { onClick={() => {
getSearchData(); getSearchData();
}} }}
> >
查询 查询
</Button> </Button>
</div> </div>
</div> </div>
</div> </div>
@ -504,16 +504,16 @@ function ScheduleMgm(props) {
共检索到<em>{resultData.total_records}</em>条结果 共检索到<em>{resultData.total_records}</em>条结果
</span> </span>
<Button <Button
type="primary"
className="yisa-btn colorBtn"
onClick={() => {
addClasses();
}}
>
添加班次
</Button>
type="primary"
className="yisa-btn colorBtn"
onClick={() => {
addClasses();
}}
>
添加班次
</Button>
</div> </div>
<ResultFlowResult <ResultFlowResult
ajaxLoad={ajaxLoading} ajaxLoad={ajaxLoading}
resultData={resultData.data ? resultData.data : []} resultData={resultData.data ? resultData.data : []}
@ -521,9 +521,9 @@ function ScheduleMgm(props) {
<Table <Table
bordered bordered
// className='yisa-table' // className='yisa-table'
className="yisa-table-scroll"
scroll={{ y: "calc(100% - 50px)" }}
dataSource={resultData.data} dataSource={resultData.data}
className="yisa-table-scroll"
scroll={{ y: "calc(100%-50px)" }}
columns={handleColumns()} columns={handleColumns()}
// rowKey={record => record.cap_id + "_" + record.bk_id} // rowKey={record => record.cap_id + "_" + record.bk_id}
pagination={false} pagination={false}
@ -612,6 +612,7 @@ function ScheduleMgm(props) {
<TimePicker <TimePicker
onChange={goingWork} onChange={goingWork}
format={format} format={format}
className="time-style"
allowClear={false} allowClear={false}
// value={moment("00:00", "HH:mm")} // value={moment("00:00", "HH:mm")}
style={{ marginLeft: 30 }} style={{ marginLeft: 30 }}
@ -623,6 +624,7 @@ function ScheduleMgm(props) {
<TimePicker <TimePicker
onChange={leavingWork} onChange={leavingWork}
format={format} format={format}
className="time-style"
allowClear={false} allowClear={false}
// value={moment("00:00", "HH:mm")} // value={moment("00:00", "HH:mm")}
style={{ marginLeft: 30 }} style={{ marginLeft: 30 }}
@ -737,6 +739,7 @@ function ScheduleMgm(props) {
onChange={goingWork} onChange={goingWork}
disabled disabled
allowClear={false} allowClear={false}
className="time-style"
format={format} format={format}
value={moment(getDetail.onTime, "HH:mm")} value={moment(getDetail.onTime, "HH:mm")}
style={{ marginLeft: 30 }} style={{ marginLeft: 30 }}
@ -748,6 +751,7 @@ function ScheduleMgm(props) {
<TimePicker <TimePicker
onChange={leavingWork} onChange={leavingWork}
disabled disabled
className="time-style"
allowClear={false} allowClear={false}
format={format} format={format}
value={moment(getDetail.offTime, "HH:mm")} value={moment(getDetail.offTime, "HH:mm")}
@ -859,6 +863,7 @@ function ScheduleMgm(props) {
<TimePicker <TimePicker
onChange={goingEditWork} onChange={goingEditWork}
format={format} format={format}
className="time-style"
allowClear={false} allowClear={false}
value={moment(editModal.onTime, "HH:mm")} value={moment(editModal.onTime, "HH:mm")}
style={{ marginLeft: 30, width: 100 }} style={{ marginLeft: 30, width: 100 }}
@ -871,6 +876,7 @@ function ScheduleMgm(props) {
onChange={leavingEditWork} onChange={leavingEditWork}
format={format} format={format}
allowClear={false} allowClear={false}
className="time-style"
value={moment(editModal.offTime, "HH:mm")} value={moment(editModal.offTime, "HH:mm")}
style={{ marginLeft: 30, width: 100 }} style={{ marginLeft: 30, width: 100 }}
/> />

4
src/pages/InRoadMgm/RoadMgm/ConfigRoad/index.scss

@ -180,4 +180,8 @@ $color-primary: var(--color-primary);
color: var(--color-text); color: var(--color-text);
// border-color:var(--checkable-tag-border); // border-color:var(--checkable-tag-border);
} }
.right-list .cc-result-flow{
overflow: auto;
height: 662px;
}
} }

1
src/pages/InRoadMgm/RoadMgm/ConfigRoad/loadable.jsx

@ -159,7 +159,6 @@ const ConfigRoad = (props) => {
return ( return (
<> <>
<Popover <Popover
trigger="click"
content={ content={
<> <>
<div> <div>

2
src/pages/InRoadMgm/RoadMgm/RoadConf/index.scss

@ -170,8 +170,6 @@ $color-primary: var(--color-primary);
position: absolute; position: absolute;
top: 30px; top: 30px;
left: 100px; left: 100px;
max-height: 850px;
overflow: auto;
} }
.handleCloseDetail::-webkit-scrollbar { .handleCloseDetail::-webkit-scrollbar {
width: 5px; width: 5px;

1
src/pages/InRoadMgm/RoadMgm/RoadConf/loadable.jsx

@ -154,7 +154,6 @@ function RoadConf() {
</a> </a>
</div> </div>
} }
trigger="click"
> >
<Button type="primary">操作</Button> <Button type="primary">操作</Button>
</Popover> </Popover>

Loading…
Cancel
Save