Browse Source

fix():修改路内BUG

tags/PMS_V1.0.0_Alpha5
guoxin 1 year ago
parent
commit
776db4072c
  1. 4
      src/components/TableModule/index.jsx
  2. 6
      src/pages/InRoadMgm/PersonMgm/Attendance/Fence/loadable.jsx
  3. 6
      src/pages/InRoadMgm/Stuff/StuffMgm/loadable.jsx

4
src/components/TableModule/index.jsx

@ -314,14 +314,16 @@ const TableModule = forwardRef((props, ref) => {
let last = options[options.length - 1];
if (last.children) {
addChild(last, res);
} else {
res = [last.id]
}
res.push(last.id);
}
console.log(res);
setAreaSelectedList(res);
}
const addChild = (child, res) => {
if (child.children) {
res.push(child.id)
child.children.forEach((item) => {
addChild(item, res);
});

6
src/pages/InRoadMgm/PersonMgm/Attendance/Fence/loadable.jsx

@ -69,8 +69,9 @@ function Fence(props) {
let last = options[options.length - 1];
if (last.children) {
addChild(last, res);
}
res.push(last.id);
}else {
res = [last.id]
}
}
console.log(res);
setAreaSelectedList(res);
@ -78,6 +79,7 @@ function Fence(props) {
}
const addChild = (child, res) => {
if (child.children) {
res.push(child.id)
child.children.forEach((item) => {
addChild(item, res);
});

6
src/pages/InRoadMgm/Stuff/StuffMgm/loadable.jsx

@ -79,8 +79,9 @@ function StuffMgm(props) {
let last = options[options.length - 1];
if (last.children) {
addChild(last, res);
}
res.push(last.id);
} else {
res = [last.id]
}
}
setGetOption(res)
setFormData({ ...formData, region_id: value })
@ -363,6 +364,7 @@ function StuffMgm(props) {
]
const addChild = (child, res) => {
if (child.children) {
res.push(child.id)
child.children.forEach((item) => {
addChild(item, res);
});

Loading…
Cancel
Save