Browse Source

fix():修改路内bug

master
guoxin 1 year ago
parent
commit
7ed4a895c9
  1. 105
      src/pages/InRoadMgm/PersonMgm/AuditMgm/AuditCheck/loadable.jsx
  2. 33
      src/pages/SystemMgm/RoleMgm/loadable.jsx

105
src/pages/InRoadMgm/PersonMgm/AuditMgm/AuditCheck/loadable.jsx

@ -92,18 +92,6 @@ function AuditCheck() {
align: "center"
},
{
title: "处理人",
dataIndex: "deal_user",
key: "deal_user",
align: "center"
},
{
title: "处理时间",
dataIndex: "deal_time",
key: "deal_time",
align: "center"
},
{
title: "状态",
dataIndex: "status",
key: "status",
@ -118,7 +106,7 @@ function AuditCheck() {
key: "address",
align: "center",
render: (_, record) => {
return type === "1" ? (
return (
<Popover
content={
<div
@ -150,7 +138,90 @@ function AuditCheck() {
>
<Button type="primary">操作</Button>
</Popover>
) : (
)
},
},
];
// const columns2 = columns1
const columns2 = [
{
title: "序号",
dataIndex: "index",
key: "index",
render: (text, record, index) => index + 1,
},
{
title: "记录编号",
dataIndex: "number_code",
key: "number_code",
align: "center"
},
{
title: "违规人员名称",
dataIndex: "inspected_person",
key: "inspected_person",
align: "center"
},
{
title: "违规类型",
dataIndex: "type_name",
key: "type_name",
align: "center"
},
{
title: "稽查员",
dataIndex: "inspect_person",
key: "inspect_person",
align: "center"
},
{
title: "所属运营商",
dataIndex: "operator",
key: "operator",
align: "center"
},
{
title: "所属路段",
dataIndex: "road_name",
key: "road_name",
align: "center"
},
{
title: "上报时间",
dataIndex: "insert_time",
key: "insert_time",
align: "center"
},
{
title: "处理人",
dataIndex: "deal_user",
key: "deal_user",
align: "center"
},
{
title: "处理时间",
dataIndex: "deal_time",
key: "deal_time",
align: "center"
},
{
title: "状态",
dataIndex: "status",
key: "status",
align: "center",
render: (text) => {
return <Tag color="green">{text}</Tag>;
},
},
{
title: "操作",
dataIndex: "address",
key: "address",
align: "center",
render: (_, record) => {
return (
<Button
>
<Link
@ -162,11 +233,12 @@ function AuditCheck() {
查看
</Link>
</Button>
);
)
},
},
];
const columns2 = columns1
useEffect(() => {
if (type === "1") {
setColumns(columns1);
@ -344,6 +416,7 @@ function AuditCheck() {
showSearch
placeholder="请选择违规类型"
options={inspectType}
defaultValue={'0'}
filterOption={(input, option) => {
return option.label.indexOf(input) >= 0;
}}

33
src/pages/SystemMgm/RoleMgm/loadable.jsx

@ -508,6 +508,37 @@ function RoleMgm(props) {
let lastElement = addManage[arrStr.length - 1];
// console.log(addManage);
if (getGovernment != 0) {
let emptyString = JSON.stringify(getAuthId);
if (emptyString == '{}') {
let data = {
id: getGovernment
}
ajax.getDepartId(data).then(res => {
if (res.status === 20000) {
if (res.status == []) {
message.error('部门没有配置对应菜单权限')
} else {
setGetGovernmentArea(res.data)
// idsetAllGover
// console.log(digui(res.data))
let data = JSON.parse(JSON.stringify(res.data))
const arr = flatten(data)
const length = calculateArrayLength(res.data);
let key = arr.filter(item => {
return item.key
})
let arr_id = key.map(item => item.id)
console.log(arr_id);
setCheckedKeys(arr_id);
let str = arr_id.toString()
setAddManage({ ...addManage, auth: str })
setRoleLength(length)
// console.log(arr);
setAllGover(arr)
}
}
})
} else {
let data = {
id: getGovernment,
auth: getAuthId
@ -538,6 +569,8 @@ function RoleMgm(props) {
}
})
}
}
}, [getGovernment])
useEffect(() => {
getData()

Loading…
Cancel
Save