Browse Source

feat:指派任务的完善+权限的调整

dev
zhaobing 1 year ago
parent
commit
785f19de44
  1. 14
      api/app/lib/controllers/report/index.js
  2. 12
      api/app/lib/routes/data/index.js
  3. 2
      api/sequelize-automate.config.js
  4. 2
      web/client/src/layout/index.js
  5. 6
      web/client/src/sections/auth/containers/login.js
  6. 6
      web/client/src/sections/fillion/components/buildingTable.js
  7. 2
      web/client/src/sections/fillion/components/datajuji.js
  8. 108
      web/client/src/sections/fillion/components/editGuanlang.js
  9. 40
      web/client/src/sections/fillion/components/feedback/nominateModal.js
  10. 2
      web/client/src/sections/fillion/components/highwaysTable.js
  11. 10
      web/client/src/sections/fillion/components/maintenanceTable.js
  12. 2
      web/client/src/sections/fillion/components/operationalTable.js
  13. 55
      web/client/src/sections/fillion/components/patrolTable.js
  14. 2
      web/client/src/sections/fillion/components/project/project.js
  15. 4
      web/client/src/sections/fillion/components/transportationTable.js
  16. 16
      web/client/src/sections/fillion/containers/assess.js
  17. 2
      web/client/src/sections/fillion/containers/building.js
  18. 16
      web/client/src/sections/fillion/containers/highways.js
  19. 2
      web/client/src/sections/fillion/containers/task.js
  20. 24
      web/client/src/sections/fillion/containers/transportation.js
  21. 59
      web/client/src/sections/fillion/nav-item.js
  22. 5
      web/client/src/sections/fillion/routes.js
  23. 13
      web/client/src/sections/organization/containers/authority.js
  24. 29
      web/client/src/sections/organization/containers/user.js
  25. 6
      web/client/src/sections/organization/nav-item.js

14
api/app/lib/controllers/report/index.js

@ -1,7 +1,7 @@
'use strict';
const { QueryTypes } = require('sequelize');
async function reportList (ctx) {
async function reportList(ctx) {
try {
const models = ctx.fs.dc.models;
const { limit, page, startTime, endTime, keyword, userId, reportType, isTop, asc, projectType, handleState = '', performerId = '' } = ctx.query
@ -43,7 +43,7 @@ async function reportList (ctx) {
where: {
},
attributes: ['id', 'road', 'time', 'projectType', 'roadSectionStart', 'roadSectionEnd', 'reportType', 'content', 'longitude', 'latitude', 'projectName', 'handleState'],
attributes: ['id', 'road', 'time', 'projectType', 'roadSectionStart', 'performerId', 'roadSectionEnd', 'reportType', 'content', 'longitude', 'latitude', 'projectName', 'handleState'],
include: [{
model: models.User,
attributes: ['name']
@ -114,7 +114,7 @@ async function reportList (ctx) {
}
}
async function reportPosition (ctx) {
async function reportPosition(ctx) {
try {
const models = ctx.fs.dc.models;
const { startTime, endTime, userId, reportType } = ctx.query
@ -164,7 +164,7 @@ async function reportPosition (ctx) {
}
}
async function reportDetail (ctx) {
async function reportDetail(ctx) {
try {
const models = ctx.fs.dc.models;
const { reportId } = ctx.params
@ -186,7 +186,7 @@ async function reportDetail (ctx) {
}
}
async function reportHandle (ctx) {
async function reportHandle(ctx) {
try {
const { models } = ctx.fs.dc;
@ -216,7 +216,7 @@ async function reportHandle (ctx) {
}
}
async function createReport (ctx) {
async function createReport(ctx) {
try {
const { userId } = ctx.fs.api
const models = ctx.fs.dc.models;
@ -238,7 +238,7 @@ async function createReport (ctx) {
}
}
async function deleteReport (ctx) {
async function deleteReport(ctx) {
try {
const models = ctx.fs.dc.models;
const { reportId } = ctx.params;

12
api/app/lib/routes/data/index.js

@ -11,7 +11,7 @@ const dataIndex = require('../../controllers/data/index');
const task = require('../../controllers/data/task')
const assess = require('../../controllers/data/assess')
const videoCenter = require('../../controllers/data/videoCenter')
const appointTask = require('../../controllers/data/appointed')
module.exports = function (app, router, opts) {
// 数据导出
@ -24,7 +24,7 @@ module.exports = function (app, router, opts) {
// 运政
//货运
async function setFreightType (ctx, next) {
async function setFreightType(ctx, next) {
ctx.request.body = {
...(ctx.request.body || {}),
type: 'freight'
@ -41,7 +41,7 @@ module.exports = function (app, router, opts) {
router.del('/vehicle/freight/:id', setFreightType, vehicle.del);
//客运车
async function setVehicleType (ctx, next) {
async function setVehicleType(ctx, next) {
ctx.request.body = {
...(ctx.request.body || {}),
type: 'vehicle'
@ -58,7 +58,7 @@ module.exports = function (app, router, opts) {
router.del('/vehicle/:id', setVehicleType, vehicle.del);
// 路政
async function setRoadManageType (ctx, next) {
async function setRoadManageType(ctx, next) {
ctx.request.body = {
...(ctx.request.body || {}),
type: 'road_manage'
@ -202,4 +202,8 @@ module.exports = function (app, router, opts) {
app.fs.api.logAttr['GET/videoCenter/list'] = { content: '获取萤石设备列表', visible: true };
router.get('/videoCenter/list', videoCenter.videoList(opts));
// 视频中心 END
// 指派任务
app.fs.api.logAttr['PUT/appointTask'] = { content: '指派任务', visible: true };
router.put('/appointTask', appointTask.appoint);
// 指派任务 END
};

2
api/sequelize-automate.config.js

@ -27,7 +27,7 @@ module.exports = {
dir: './app/lib/models', // 指定输出 models 文件的目录
typesDir: 'models', // 指定输出 TypeScript 类型定义的文件目录,只有 TypeScript / Midway 等会有类型定义
emptyDir: false, // !!! 谨慎操作 生成 models 之前是否清空 `dir` 以及 `typesDir`
tables: ['assess'], // 指定生成哪些表的 models,如 ['user', 'user_post'];如果为 null,则忽略改属性
tables: ['user_resource'], // 指定生成哪些表的 models,如 ['user', 'user_post'];如果为 null,则忽略改属性
skipTables: [], // 指定跳过哪些表的 models,如 ['user'];如果为 null,则忽略改属性
tsNoCheck: false, // 是否添加 `@ts-nocheck` 注释到 models 文件中
ignorePrefix: [], // 生成的模型名称忽略的前缀,因为 项目中有以下表名是以 t_ 开头的,在实际模型中不需要, 可以添加多个 [ 't_data_', 't_',] ,长度较长的 前缀放前面

2
web/client/src/layout/index.js

@ -61,7 +61,7 @@ const Root = props => {
flat(routes);
//将路由信息全部放在session,方便后面拿了用(权限控制的时候)
console.log('combineRoutes1', combineRoutes)
//console.log('combineRoutes1', combineRoutes)
sessionStorage.setItem('allRoutes', JSON.stringify(combineRoutes));
return combineRoutes;
}

6
web/client/src/sections/auth/containers/login.js

@ -35,7 +35,7 @@ const Login = props => {
}
else if (hasAuth && hasAuth.length > 0) {
const path = hasAuth[0].path
console.log('sasa', `${path}`)
//console.log('sasa', `${path}`)
dispatch(push(path))
} else {
dispatch(push('/noContent'))
@ -86,7 +86,7 @@ const Login = props => {
value={username}
maxlength={11}
onChange={e => {
console.log('e.target.value', e.target.value)
//('e.target.value', e.target.value)
setUserName(e.target.value)
setInputChanged(true)
}}
@ -100,7 +100,7 @@ const Login = props => {
value={password}
onChange={e => {
console.log('setPassword', e.target.value)
//console.log('setPassword', e.target.value)
setPassword(e.target.value)
setInputChanged(true)
}}

6
web/client/src/sections/fillion/components/buildingTable.js

@ -25,8 +25,8 @@ const BuildingTable = (props) => {
const [differentiate, setDifferentiate] = useState('road')
const [grade, setGrade] = useState('project')
const [departmentInfo, setDepartment] = useState('')
const [editAble, setEditAble] = useState(user?.username !== 'SuperAdmin' && user?.userResources?.filter(i => i.resourceId === 'ROADMANAGE')[0].isshow === "true" ? true : '')
const [editAble, setEditAble] = useState(user?.username !== 'SuperAdmin' && user?.userResources?.find(i => i.resourceId === 'BUILDINGPROJECT')?.isshow === "true" ? true : '')
console.log('user111', user)
const ref = useRef()
const [activeKey, setActiveKey] = useState('tab1');
//打开弹窗
@ -309,7 +309,7 @@ const BuildingTable = (props) => {
columns={columns[activeKey]}
dataSource={counts || []}
request={async (params) => {
console.log(whichofits)
//console.log(whichofits)
if (whichofits == '在建项目') {
const query = {
entryName: sitename

2
web/client/src/sections/fillion/components/datajuji.js

@ -60,7 +60,7 @@ const EditGuanlang = (props) => {
const handleSave = () => {
const data = form.getFieldsValue(true);
console.log(data, 'data')
//console.log(data, 'data')
handleSaveScore();
}

108
web/client/src/sections/fillion/components/editGuanlang.js

@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react';
import { Modal, Form, Input, Select, DatePicker, AutoComplete, Col, Button,Row } from 'antd';
import { Modal, Form, Input, Select, DatePicker, AutoComplete, Col, Button, Row } from 'antd';
import { MinusCircleOutlined, PlusOutlined,PlusCircleOutlined } from '@ant-design/icons';
import { MinusCircleOutlined, PlusOutlined, PlusCircleOutlined } from '@ant-design/icons';
const Search = Input.Search
const { TextArea } = Input;
import moment from 'moment';
@ -60,8 +60,8 @@ const EditGuanlang = (props) => {
const handleSave = () => {
const data = form.getFieldsValue(true);
console.log(data,'data')
handleSaveScore();
//console.log(data,'data')
handleSaveScore();
}
const onFileUploaded = (fileList) => {
@ -86,8 +86,8 @@ const EditGuanlang = (props) => {
footer={null}
>
<Form form={form} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }} onFinish={handleSave}>
<img src='/assets/images/tiptop.png' style={{width:'100%'}}></img>
<Row style={{marginBottom:'20px'}}>
<img src='/assets/images/tiptop.png' style={{ width: '100%' }}></img>
<Row style={{ marginBottom: '20px' }}>
<Col span={20}> <a>配置属性</a> </Col>
<Col span={2}> <Button>视频格式转换</Button> </Col>
{/* <Col span={2}> <Button>测试</Button> </Col> */}
@ -95,38 +95,38 @@ const EditGuanlang = (props) => {
</Row>
<Row>
<Col span={12}>
<Form.Item
// style={{ width: 'calc(45% - 4px' }}
label={'设备名称'}
rules={[{ required: true, message: '设备名称为必填项' }]}
name={'guanlangname'}>
<Input placeholder="请输入设备名称、常用项目或者位置定义"/>
<Form.Item
// style={{ width: 'calc(45% - 4px' }}
label={'设备名称'}
rules={[{ required: true, message: '设备名称为必填项' }]}
name={'guanlangname'}>
<Input placeholder="请输入设备名称、常用项目或者位置定义" />
</Form.Item>
</Col>
<Col span={12}>
<Form.Item
label={'云台支持'}
name={'roadnamee'}
rules={[{ required: true, message: '所在道路名称不能为空' }]}
label={'云台支持'}
name={'roadnamee'}
rules={[{ required: true, message: '所在道路名称不能为空' }]}
>
<Select options={[{label:'支持',value:'支持'},{label:'不支持',value:'不支持'}]} defaultValue="支持"></Select>
<Select options={[{ label: '支持', value: '支持' }, { label: '不支持', value: '不支持' }]} defaultValue="支持"></Select>
</Form.Item>
</Col>
</Col>
</Row>
<Row>
<Col span={12}>
<Form.Item
label={'高清切换'}
name={'startposition'}>
<Select options={[{label:'支持',value:'支持'},{label:'不支持',value:'不支持'}]} defaultValue="支持"></Select>
<Form.Item
label={'高清切换'}
name={'startposition'}>
<Select options={[{ label: '支持', value: '支持' }, { label: '不支持', value: '不支持' }]} defaultValue="支持"></Select>
</Form.Item>
</Col>
<Col span={12}>
<Form.Item
label={'语音支持'}
name={'endposition'}>
<Select options={[{label:'支持',value:'支持'},{label:'不支持',value:'不支持'}]} defaultValue="支持"></Select>
</Form.Item>
label={'语音支持'}
name={'endposition'}>
<Select options={[{ label: '支持', value: '支持' }, { label: '不支持', value: '不支持' }]} defaultValue="支持"></Select>
</Form.Item>
</Col>
</Row>
<Row>
@ -135,65 +135,65 @@ const EditGuanlang = (props) => {
style={{ width: 'calc(45%-4px' }}
label={'内存'}
name={'guanlangmaterial'}
rules={[{ required: true, message: '管廊材质不能为空' }]}>
<Select options={[{label:'8g',value:'8g'},{label:'16g',value:'16g'},{label:'32g',value:'32g'}
,{label:'64g',value:'64g'},{label:'128g',value:'128g'},{label:'256g',value:'256g'},{label:'>256g',value:'>256g'}]} defaultValue="未安装"></Select>
rules={[{ required: true, message: '管廊材质不能为空' }]}>
<Select options={[{ label: '8g', value: '8g' }, { label: '16g', value: '16g' }, { label: '32g', value: '32g' }
, { label: '64g', value: '64g' }, { label: '128g', value: '128g' }, { label: '256g', value: '256g' }, { label: '>256g', value: '>256g' }]} defaultValue="未安装"></Select>
</Form.Item>
</Col>
<Col span={12}>
<Form.Item
label={'序列设备号'}
name={'guanlanglayer'}
rules={[{ required: true, message: '序列设备号不能为空' }]}>
<Input placeholder="请输入序列设备号"/>
label={'序列设备号'}
name={'guanlanglayer'}
rules={[{ required: true, message: '序列设备号不能为空' }]}>
<Input placeholder="请输入序列设备号" />
</Form.Item>
</Col>
</Row>
<Row>
<Col span={12}>
<Form.Item
style={{ width: 'calc(45%-4px' }}
label={'安装位置'}
name={'guanlanglength'}
rules={[{ required: true, message: '安装位置不能为空' }]}>
<Input placeholder="请输入高德经纬度坐标"/>
style={{ width: 'calc(45%-4px' }}
label={'安装位置'}
name={'guanlanglength'}
rules={[{ required: true, message: '安装位置不能为空' }]}>
<Input placeholder="请输入高德经纬度坐标" />
</Form.Item>
</Col>
<Col span={12}>
<Form.Item
label={'通道号'}
name={'manageunit'}
rules={[{ required: true, message: '通道号不能为空' }]}>
label={'通道号'}
name={'manageunit'}
rules={[{ required: true, message: '通道号不能为空' }]}>
<Col span={24} style={{ display: 'flex', justifyContent: 'space-around' }}>
<Input/>
<Input />
</Col>
</Form.Item>
</Col>
</Row>
<Row>
<Col span={12}>
<Form.Item
label={'设备类型'}
name={'startposition'}>
<Select options={[{label:'枪机',value:'枪机'},{label:'球机',value:'球机'},{label:'其他',value:'其他'}]} placeholder="请选择摄像头类型"></Select>
<Form.Item
label={'设备类型'}
name={'startposition'}>
<Select options={[{ label: '枪机', value: '枪机' }, { label: '球机', value: '球机' }, { label: '其他', value: '其他' }]} placeholder="请选择摄像头类型"></Select>
</Form.Item>
</Col>
<Col span={12}>
<Form.Item
label={'设备能力'}
name={'endposition'}>
<Select options={[{label:'普通摄像头',value:'普通摄像头'},{label:'人流量计数',value:'人流量计数'},{label:'热成像',value:'热成像'},{label:'AI摄像头',value:'AI摄像头'},{label:'其他',value:'其他'}]} placeholder="请选择能力"></Select>
</Form.Item>
label={'设备能力'}
name={'endposition'}>
<Select options={[{ label: '普通摄像头', value: '普通摄像头' }, { label: '人流量计数', value: '人流量计数' }, { label: '热成像', value: '热成像' }, { label: 'AI摄像头', value: 'AI摄像头' }, { label: '其他', value: '其他' }]} placeholder="请选择能力"></Select>
</Form.Item>
</Col>
</Row>
<Form.Item wrapperCol={{ span: 12, offset: 6 }}>
<Col span={24} style={{ display: 'flex', justifyContent: 'space-around' }}>
<Button htmlType="submit" onClick={()=>{
onCancel()
}}>
<Button htmlType="submit" onClick={() => {
onCancel()
}}>
取消
</Button>
<Button type="primary" htmlType="submit">

40
web/client/src/sections/fillion/components/feedback/nominateModal.js

@ -2,40 +2,49 @@
import React, { useState, useEffect, useCallback, useRef } from 'react';
import { connect } from 'react-redux';
import { Spin } from 'antd';
import ProForm, { ProFormText, ModalForm, ProFormSwitch, ProFormTreeSelect, ProFormSelect } from '@ant-design/pro-form';
import ProForm, { ProFormText, ModalForm, ProFormSwitch, ProFormTreeSelect, ProFormSelect, Form } from '@ant-design/pro-form';
import { getDepUser } from '../../../organization/actions/user'
import { appointTask } from '../../actions/appointTask'
import { getReportList, } from '../../../fillion/actions/patrol';
import moment from 'moment';
import { v4 as uuidv4 } from 'uuid';
const NominateModal = (props) => {
const { recordId, visible, user, onCancel, depMessage, loading, depUser, clientHeight, depData, onVisibleChange, dispatch } = props
const { queryData, recordId, visible, user, onCancel, depMessage, loading, depUser, clientHeight, depData, onVisibleChange, dispatch } = props
const [depId, setDepId] = useState(null)
const [depUsers, setDepUsers] = useState()
const selectRef = useRef(null);
const formRef = useRef();
const [selectKey, setSelectKey] = useState(0);
const handleTreeSelectChange = async (value) => {
console.log('recordId', recordId)
//console.log('recordId', recordId)
setDepId(value)
// 根据选择的部门ID获取对应的用户数据
setDepUsers(null)
const res = await dispatch(getDepUser(value));
setDepUsers(res?.payload.data);
//setSelectKey(selectKey + 1)
// 清空第二个输入框的值
if (selectRef.current) {
selectRef.current.value = '';
selectRef.current.reset();
}
}
useEffect(() => {
setSelectKey(selectKey + 1)
}, [depUsers])
const handleFinish = async (values) => {
const { name } = values;
// 在这里使用第二个框的值进行网络请求或其他操作
await dispatch(appointTask({ recordId, performerId: name }))
//form.resetFields(); // 重置表单字段
//formRef.current.resetFields();
queryData()
onCancel()
// await dispatch(yourAction(name));
// 其他操作...
// 取消弹窗
onCancel();
};
const dispatchGetDepUser = useCallback(async () => {
if (depId) {
@ -51,15 +60,17 @@ const NominateModal = (props) => {
return (
<Spin spinning={false}>
<ModalForm
ref={formRef}
title='指派'
visible={visible}
onVisibleChange={onVisibleChange}
onFinish={handleFinish}
destroyOnClose
destroyOnClose={true}
initialValues={{ departmentId: null, name: null }}
>
<ProForm.Group>
<ProFormTreeSelect
name={['contract', 'departmentId']}
name={'departmentId'}
placeholder="请选择所属部门"
width="md"
label="所属部门"
@ -70,7 +81,7 @@ const NominateModal = (props) => {
children: 'subordinate'
}}
onSelect={(selectedKeys, { selected, selectedNodes }) => {
console.log('selected', selectedKeys)
//console.log('selected', selectedKeys)
if (selected) {
setDepSelectedKeys(selectedKeys)
@ -92,11 +103,12 @@ const NominateModal = (props) => {
}}
expandedKeys={["title"]}
/>
{depUsers ? <ProFormSelect
{depUsers && depUsers.length ? <ProFormSelect
key={selectKey} // 改变 key 值
ref={selectRef}
value={null} // 设置输入框的值为null
onValuesChange={(values) => { console.log('values1', values) }}
name="name"
//onValuesChange={(values) => { console.log('values1', values) }}
name={'name'}
label="指派人"
request={async () => {
if (depId) {

2
web/client/src/sections/fillion/components/highwaysTable.js

@ -310,7 +310,7 @@ const TransporTationTable = (props) => {
columns={columns[activeKey]}
dataSource={counts || []}
request={async (params) => {
console.log(whichofits)
//console.log(whichofits)
if (whichofits == 'sheshi') {
const query = {
}

10
web/client/src/sections/fillion/components/maintenanceTable.js

@ -158,7 +158,7 @@ const DetailList = (props) => {
align: 'center'
},
{
title: '养护人',
title: '上报人',
width: 100,
key: 'userName',
dataIndex: 'userName',
@ -235,7 +235,7 @@ const PatrolNameList = (props) => {
const [autoExpandParent, setAutoExpandParent] = useState(true);
const [defaultData, setDefaultData] = useState([]);
const [dataList, setDataList] = useState([]);
console.log('record', record)
//console.log('record', record)
useEffect(() => {
let departments = []
const generateData = (data, _preKey, _tns) => {
@ -419,12 +419,12 @@ const PatrolNameList = (props) => {
if (selected) {
if (selectedKeys[0].split("-").length - 1 >= 2) {
let id = selectedKeys[0].split('-')[selectedKeys[0].split('-').length - 1]
console.log('id', id)
//console.log('id', id)
onChange(id);
}
}
console.log('selectedKeys', selectedKeys, selected, selectedNodes, node)
//('selectedKeys', selectedKeys, selected, selectedNodes, node)
};
@ -435,7 +435,7 @@ const PatrolNameList = (props) => {
return (
<div className='spilce' style={{ height: '600px', width: '100%', overflow: 'auto' }} >
<Search
placeholder="请输入养护人名称"
placeholder="请输入养上报人"
value={searchValue}
onChange={(e) => handleSearch(e.target.value)}
/>

2
web/client/src/sections/fillion/components/operationalTable.js

@ -1983,7 +1983,7 @@ const OperaTionalTable = (props) => {
dataSource={counts || []}
request={async (params, sort, filter) => {
console.log(rewkeys)
// console.log(rewkeys)
if (rewkeys == 'keyun') {
const query = {}
setRowSelected([]);

55
web/client/src/sections/fillion/components/patrolTable.js

@ -35,7 +35,7 @@ export const reportTypeText = (text) => {
const DetailForm = (props) => {
const { visible, data, handleClose, loading, isAnomaly, isRoad, isPatrol } = props;
//('record12s', isAnomaly)
const [qndmn] = useState(localStorage.getItem('qndmn'));
const keyList = [
@ -121,6 +121,7 @@ const DetailList = (props) => {
const [noProcessingSelectRecord, setNoProcessingSelectRecord] = useState();
const [vis, setVis] = useState(false)//指派任务的弹窗显示与隐藏
const [recordId, setRecordId] = useState(0)//默认指派任务id
const [btnVis, setBtnVis] = useState(true)//指派按钮和不处理按钮的是否禁用
const checkDetail = (record) => {
dispatch(getReportDetail(record.id))
}
@ -224,7 +225,7 @@ const DetailList = (props) => {
align: 'center'
},
{
title: isRoad ? '上报人' : '巡查人',
title: '上报人',
width: 100,
key: 'userName',
dataIndex: 'userName',
@ -245,26 +246,29 @@ const DetailList = (props) => {
valueType: 'option',
align: 'center',
render: (text, record) => {
//('record12s', record)
return [
<Button
onClick={() => { checkDetail(record); handleOpen(); }}
style={{ marginRight: 10 }}>查看</Button>,
isAnomaly && record.handleState != '已处理' ?
<Button disabled={user?.username !== 'SuperAdmin' && user?.userResources?.filter(i => i.resourceId === 'FEEDBACKMANAGE' || 'FEEDBACKMANAGE')[0].isshow === "true" ? true : ''} onClick={() => { setVis(true); setRecordId(record.id) }}>指派</Button> : null,
isAnomaly && record.handleState != '已处理' ?
<Popover
content={[
<div style={{ width: '100%', height: 30 }}>
<Button onClick={() => setNoProcessingPopVisible(false)} style={{ float: "right" }} ></Button>
<Button type="primary" onClick={() => dispatch(handleReport(record.id, { handleState: '已处理' })).then(res => {
if (res.success) {
setNoProcessingPopVisible(false)
setNoProcessingSelectRecord(null)
handelRefresh()
}
})} style={{ marginRight: 8, float: "right" }} ></Button>
</div>
]}
isAnomaly && record.handleState != '已处理' && record.performerId === null ?
<Button disabled={user?.username !== 'SuperAdmin' && user?.userResources?.filter(i => i.resourceId === 'FEEDBACKMANAGE' || 'FEEDBACKMANAGE')[0].isshow === "true" ? true : ''}
onClick={() => { setVis(true); setRecordId(record.id) }}>指派</Button> : null,
isAnomaly && record.handleState != '已处理' && record.performerId === null ?
< Popover
content={
[
<div style={{ width: '100%', height: 30 }}>
<Button onClick={() => setNoProcessingPopVisible(false)} style={{ float: "right" }} ></Button>
<Button type="primary" onClick={() => dispatch(handleReport(record.id, { handleState: '已处理' })).then(res => {
if (res.success) {
setNoProcessingPopVisible(false)
setNoProcessingSelectRecord(null)
handelRefresh()
}
})} style={{ marginRight: 8, float: "right" }} ></Button>
</div>
]}
visible={noProcessingSelectRecord == record.id && noProcessingPopVisible}
trigger="click"
onClick={() => user?.username !== 'SuperAdmin' && user?.userResources?.filter(i => i.resourceId === 'FEEDBACKMANAGE' || 'FEEDBACKMANAGE')[0].isshow === "true" ? '' : setNoProcessingSelectRecord(record.id)}
@ -272,7 +276,7 @@ const DetailList = (props) => {
onVisibleChange={(newVisible) => setNoProcessingPopVisible(newVisible)}
>
<Button disabled={user?.username !== 'SuperAdmin' && user?.userResources?.filter(i => i.resourceId === 'FEEDBACKMANAGE' || 'FEEDBACKMANAGE')[0].isshow === "true" ? true : ''}>不处理</Button>
</Popover> : null,
</Popover > : null,
<Popover
content={[
<div style={{ width: '100%', height: 30 }}>
@ -307,7 +311,7 @@ const DetailList = (props) => {
toolBarRender={false}
search={false}
/>
<NominateModal recordId={recordId} dispatch={dispatch} visible={vis} onCancel={onCancel} onVisibleChange={setVis}></NominateModal>
<NominateModal queryData={queryData} hanldeChange={setBtnVis} recordId={recordId} dispatch={dispatch} visible={vis} onCancel={onCancel} onVisibleChange={setVis}></NominateModal>
</div>
)
};
@ -500,7 +504,7 @@ const PatrolNameList = (props) => {
}
}
console.log('selectedKeys', selectedKeys, selected, selectedNodes, node)
// console.log('selectedKeys', selectedKeys, selected, selectedNodes, node)
};
@ -528,7 +532,7 @@ const PatrolNameList = (props) => {
<div className='spilce'>
<div className='spilce' style={{ height: '600px', width: '100%', overflow: 'auto' }} >
<Search
placeholder="请输入巡查人名称"
placeholder="请输入上报人员"
value={searchValue}
onChange={(e) => handleSearch(e.target.value)}
/>
@ -612,7 +616,7 @@ const PatrolTable = (props) => {
}, [record, dateRange, selectProjectType])
const queryData = () => {
console.log(record, 'idididid')
//console.log(record, 'idididid')
let userId = null
if (user?.username === 'SuperAdmin' && record === 1) {
userId = undefined
@ -628,7 +632,7 @@ const PatrolTable = (props) => {
userId,
reportType: reportType, projectType: selectProjectType, asc: true
}
console.log(query, 'query1')
//console.log(query, 'query1')
if ((dateRange && dateRange instanceof Array && dateRange[0] != '')) {
query.startTime = moment(dateRange[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss')
query.endTime = moment(dateRange[1]).endOf('day').format('YYYY-MM-DD HH:mm:ss')
@ -708,7 +712,8 @@ const PatrolTable = (props) => {
record={record}
activeTabKey1={activeTabKey1}
userList={userList}
loading={userLoading} />
loading={userLoading}
/>
</Card>
<Card
style={{ flex: 1 }}

2
web/client/src/sections/fillion/components/project/project.js

@ -19,7 +19,7 @@ const data = {
}
const ProjectModal = (props) => {
const { visible, onVisibleChange, typecard, rewkeys, recortd, dispatch, setRecortd, setDelet, getData } = props
console.log('typecard', newlysay)
//console.log('typecard', newlysay)
const [newlys, setNewlys] = useState() //必填数据
const [newlysay, setNewlysay] = useState() //处理hou
const [records, setRecords] = useState()//处理

4
web/client/src/sections/fillion/components/transportationTable.js

@ -44,7 +44,7 @@ const TransporTationTable = (props) => {
})
setDepartment(departmentInfo)
}, [user, depMessage])
console.log('sad', departmentInfo)
//console.log('sad', departmentInfo)
// useEffect(() => {
// console.log('11111', depMessage)
// }, [depMessage])
@ -3809,7 +3809,7 @@ const TransporTationTable = (props) => {
columns={columns[activeKey]}
dataSource={counts || []}
request={async (params) => {
console.log(whichofits)
//console.log(whichofits)
if (whichofits == '县') {
console.log('differentiate', '我我我我吧')

16
web/client/src/sections/fillion/containers/assess.js

@ -26,14 +26,14 @@ export const unitList = [
'银三角管委会',
'黄马乡',
]
function Assess (props) {
function Assess(props) {
const { dispatch, assess } = props;
const [assessModalVisible, setAssessModalVisible] = useState(false);
const [editData, setEditData] = useState(null);
const [query, setQuery] = useState({ page: 1, pageSize: 10 })
const [loading, setLoading] = useState(false);
const [isCheck, setIsCheck] = useState(false)
const [editAble, setEditAble] = useState(user?.username !== 'SuperAdmin' && user?.userResources?.find(i => i.resourceId === 'ASSESSMANAGE')?.isshow === "true" ? true : '')
useEffect(() => {
return () => { };
}, []);
@ -74,9 +74,10 @@ function Assess (props) {
</Form.Item>
</Form>
<Button type="primary" onClick={() => {
setAssessModalVisible(true)
}}>新增</Button>
<Button type="primary" disabled={editAble}
onClick={() => {
setAssessModalVisible(true)
}}>新增</Button>
</div>
<ProTable
columns={[{
@ -110,6 +111,7 @@ function Assess (props) {
<Button type="link" onClick={() => {
setAssessModalVisible(true)
setEditData(record)
disabled = { editAble }
}}>编辑</Button>
<Popconfirm
title="确定删除此条数据吗?"
@ -123,7 +125,7 @@ function Assess (props) {
})
}}
>
<Button type="link" danger>删除</Button>
<Button type="link" danger disabled={editAble}>删除</Button>
</Popconfirm>
</span>
),
@ -157,7 +159,7 @@ function Assess (props) {
</div>
);
}
function mapStateToProps (state) {
function mapStateToProps(state) {
const { auth, assess } = state
return {
user: auth.user,

2
web/client/src/sections/fillion/containers/building.js

@ -12,7 +12,7 @@ const building = (props) => {
setData(props)
}, []);
const exports = (ids, differentiate) => {
console.log('sssss1', ids, differentiate)
//console.log('sssss1', ids, differentiate)
let idas = ids.toString()
if (differentiate == 'bridge') {
window.open(

16
web/client/src/sections/fillion/containers/highways.js

@ -9,16 +9,16 @@ const highways = (props) => {
const [data, setData] = useState()
useEffect(() => {
// dispatch(getDepMessage())
setData(props)
}, []);
const exports = (ids,counts) => {
console.log(counts);
let idas=ids.toString()
window.open(
'/_api/'+`data/export/?ids=${idas||''}&exp=${'overspeed'}&token=${user.token}`)
}
const exports = (ids, counts) => {
//console.log(counts);
let idas = ids.toString()
window.open(
'/_api/' + `data/export/?ids=${idas || ''}&exp=${'overspeed'}&token=${user.token}`)
}
return (
<> <HighwaysTable data={data} exports={exports} />
</>

2
web/client/src/sections/fillion/containers/task.js

@ -38,7 +38,7 @@ const Task = (props) => {
}
//选择安全是否消除
const changeSelect = async (value) => {
console.log('value', value)
//console.log('value', value)
const task1 = await dispatch(getTask({ id: inputVal, isdanger: value === 'all' ? undefined : value === 'y' ? true : false }))
setTaskRes(task1.payload?.data)
setSelectVal(value)

24
web/client/src/sections/fillion/containers/transportation.js

@ -9,23 +9,23 @@ const transportation = (props) => {
const [data, setData] = useState()
useEffect(() => {
// dispatch(getDepMessage())
setData(props)
}, []);
//批量导出
const exports = (ids,grade,differentiate) => {
console.log(differentiate);
let idas=ids.toString()
if(differentiate=='road'){
//批量导出
const exports = (ids, grade, differentiate) => {
//console.log(differentiate);
let idas = ids.toString()
if (differentiate == 'road') {
window.open(
'/_api/'+`data/export/?ids=${idas||''}&exp=${differentiate}&roadLevel=${grade||''}&token=${user.token}`)
}if(differentiate=='project'){
'/_api/' + `data/export/?ids=${idas || ''}&exp=${differentiate}&roadLevel=${grade || ''}&token=${user.token}`)
} if (differentiate == 'project') {
window.open(
'/_api/'+`data/export/?ids=${idas||''}&exp=${differentiate}&token=${user.token}`)
'/_api/' + `data/export/?ids=${idas || ''}&exp=${differentiate}&token=${user.token}`)
}
}
}
return (
<> <TransporTationTable data={data} exports={exports} />
</>

59
web/client/src/sections/fillion/nav-item.js

@ -5,7 +5,7 @@ import { ReadOutlined } from '@ant-design/icons';
const SubMenu = Menu.SubMenu;
export function getNavItem(user, dispatch) {
const isshow = user?.userResources?.
filter(i => i.resourceId === 'OVERLOADMANAGE' ||
some(i => i.resourceId === 'OVERLOADMANAGE' ||
i.resourceId === 'ROADMANAGE' ||
i.resourceId === 'BRIDGEMANAGE' ||
i.resourceId === 'MAINTENANCEMANAGE' ||
@ -16,66 +16,67 @@ export function getNavItem(user, dispatch) {
i.resourceId === 'PUBLICITYVIDEO' ||
i.resourceId === 'FEEDBACKMANAGE' ||
i.resourceId === 'REPORTMANAGE' ||
i.resourceId === 'PATROLMANAGE')?.length !== 0
i.resourceId === 'PATROLMANAGE' ||
i.resourceId === 'ASSESSMANAGE' ||
i.resourceId === 'VIDEOCENTER' ||
i.resourceId === 'BUILDINGPROJECT'
)
return (
user?.username == 'SuperAdmin' || isshow ?
<SubMenu key="fillion" icon={<ReadOutlined />} title={'数据管理'}>
{user?.username == 'SuperAdmin' || user?.userResources?.filter(i => i.resourceId === 'OVERLOADMANAGE')?.length !== 0 ?
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'OVERLOADMANAGE') ?
<Menu.Item key="fillioninfor">
<Link to="/fillion/infor">治超管理</Link>
</Menu.Item> : ''}
{/* <Menu.Item key="filliontask">
<Link to="/fillion/task">任务管理</Link>
</Menu.Item> */}
{user?.username == 'SuperAdmin' || user?.userResources?.filter(i => i.resourceId === 'ROADMANAGE')?.length !== 0 ?
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'ROADMANAGE') ?
<Menu.Item key="filliontransportation">
<Link to="/fillion/transportation">道路管理</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.filter(i => i.resourceId === 'BRIDGEMANAGE')?.length !== 0 ?
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'BRIDGEMANAGE') ?
<Menu.Item key="fillionbridge">
<Link to="/fillion/bridge">桥梁管理</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.filter(i => i.resourceId === 'MAINTENANCEMANAGE')?.length !== 0 ?
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'MAINTENANCEMANAGE') ?
<Menu.Item key="fillionhighways">
<Link to="/fillion/highways">管养管理</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.filter(i => i.resourceId === 'TRANSPORTATIONMANAGE')?.length !== 0 ?
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'TRANSPORTATIONMANAGE') ?
<Menu.Item key="fillionoperational">
<Link to="/fillion/operational">运政管理</Link>
</Menu.Item> : ''}
{/* <Menu.Item key="fillionenforce">
<Link to="/fillion/enforce">执法管理</Link>
</Menu.Item> */}
{user?.username == 'SuperAdmin' || user?.userResources?.filter(i => i.resourceId === 'CONSERVATIONMANAGE')?.length !== 0 ?
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'CONSERVATIONMANAGE') ?
<Menu.Item key="fillionmaintenance">
<Link to="/fillion/maintenance">养护管理</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.filter(i => i.resourceId === 'PATROLMANAGE')?.length !== 0 ?
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'PATROLMANAGE') ?
<Menu.Item key="fillionpatrol">
<Link to="/fillion/patrol">巡查管理</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.filter(i => i.resourceId === 'FEEDBACKMANAGE')?.length !== 0 ?
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'FEEDBACKMANAGE') ?
<Menu.Item key="fillionpatrolanomaly">
<Link to="/fillion/patrol_anomaly">异常反馈</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.filter(i => i.resourceId === 'REPORTMANAGE')?.length !== 0 ?
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'REPORTMANAGE') ?
<Menu.Item key="fillionpatrolroad">
<Link to="/fillion/patrol_road">建设上报</Link>
</Menu.Item> : ''}
{/* {user?.username == 'SuperAdmin' || user?.userResources?.filter(i => i.resourceId === 'FEEDBACKMANAGE')?.length !== 0 ?
: ''} */}
<Menu.Item key="fillionbuilding">
<Link to="/fillion/processsing">在建项目</Link>
</Menu.Item>
{user?.username == 'SuperAdmin' || user?.userResources?.filter(i => i.resourceId === 'PUBLICTRANSPORTMANAGE')?.length !== 0 ?
{user?.username == 'SuperAdmin' || user?.userResources?.filter(i => i.resourceId === 'BUILDINGPROJECT') ?
<Menu.Item key="fillionbuilding">
<Link to="/fillion/processsing">在建项目</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'PUBLICTRANSPORTMANAGE') ?
<Menu.Item key="fillionpublic">
<Link to="/fillion/public">公交管理</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.filter(i => i.resourceId === 'FILEMANAGE')?.length !== 0 ?
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'FILEMANAGE') ?
<Menu.Item key="fileCont">
<Link to="/fillion/file">档案管理</Link>
</Menu.Item> : ''}
@ -85,19 +86,19 @@ export function getNavItem(user, dispatch) {
{/* <Menu.Item key="jiekouguanli">
<Link to="/fillion/jiekouguanli">接口管理</Link>
</Menu.Item> */}
{user?.username == 'SuperAdmin' || user?.userResources?.filter(i => i.resourceId === 'PUBLICITYVIDEO')?.length !== 0 ?
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'PUBLICITYVIDEO') ?
<Menu.Item key="fillionpromotional">
<Link to="/fillion/promotional">宣传视频</Link>
</Menu.Item> : ''}
<Menu.Item key="fillionassess">
<Link to="/fillion/assess">考核评分</Link>
</Menu.Item>
<Menu.Item key="fillionvideoCenter">
<Link to="/fillion/videoCenter">视频中心</Link>
</Menu.Item>
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'ASSESSMANAGE') ?
<Menu.Item key="fillionassess">
<Link to="/fillion/assess">考核评分</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'VIDEOCENTER') ?
<Menu.Item key="fillionvideoCenter">
<Link to="/fillion/videoCenter">视频中心</Link>
</Menu.Item> : ''}
</SubMenu> : null
);
}

5
web/client/src/sections/fillion/routes.js

@ -52,7 +52,7 @@ export default [{
menuSelectKeys: ['fillionprocesssing'],
component: Building,
breadcrumb: '在建项目',
//authCode: 'ROADMANAGE'
authCode: 'BUILDINGPROJECT'
}
, {
@ -163,12 +163,15 @@ export default [{
menuSelectKeys: ['fillionassess'],
component: Assess,
breadcrumb: '考核评分',
authCode: 'ASSESSMANAGE'
}, {
path: '/videoCenter',
key: 'fillionvideoCenter',
menuSelectKeys: ['fillionvideoCenter'],
component: VideoCenter,
breadcrumb: '视频中心',
authCode: 'VIDEOCENTER'
}
]
}

13
web/client/src/sections/organization/containers/authority.js

@ -13,7 +13,8 @@ const Authority = (props) => {
const { dispatch, loading, depMessage, depUser, resource, userResource, clientHeight, user } = props
const r1 = ['USERMANAGE', 'AUTHORIMANAGE', 'OVERLOADMANAGE', 'ROADMANAGE', 'BRIDGEMANAGE', 'MAINTENANCEMANAGE', 'TRANSPORTATIONMANAGE',
'CONSERVATIONMANAGE', 'PATROLMANAGE', 'PUBLICTRANSPORTMANAGE', 'FILEMANAGE', 'PUBLICITYVIDEO', 'FEEDBACKMANAGE', 'REPORTMANAGE',
'WXPATROLREPORT', 'WXMAINTENANCEREPORT', 'WXFEEDBACKMANAGE', 'WXBUILDINGROAD'
'ASSESSMANAGE', 'VIDEOCENTER', 'BUILDINGPROJECT', 'WXPATROLREPORT', 'WXMAINTENANCEREPORT', 'WXFEEDBACKMANAGE', 'WXBUILDINGROAD',
'WXTODOLIST', 'WXDONELIST'
]
const [depUserCopy, setDepUserCopy] = useState([])//用于存放除了自己的管理的数组,即自己不能调整自己是否为管理员
const [depSelectedKeys, setDepSelectedKeys] = useState([])
@ -69,7 +70,7 @@ const Authority = (props) => {
const onshowchange = (e) => {
setisshow(e.target.checked)
}
console.log('depMessagedata', depMessagedata)
//console.log('depMessagedata', depMessagedata)
useEffect(() => {
dispatch(getResource())
@ -87,7 +88,7 @@ const Authority = (props) => {
}, [userResource])
useEffect(async () => {
if (depMessage.length) {
console.log('depMessage', depMessage)
//('depMessage', depMessage)
//超级管理员展示所有部门
if (user?.username === 'SuperAdmin') {
setdepMessagedata(depMessage)
@ -98,7 +99,7 @@ const Authority = (props) => {
//不是超级管理员,展示相应部门的数据
dispatch(getDepUser(user.departmentId))
const res = await dispatch(getDepById({ deptId: parseInt(user.departmentId) }))
console.log('resssss', res)
//console.log('resssss', res)
setdepMessagedata(res.payload.data)
// if (authDep.length > 0) {
// dispatch(getDepUser(authDep[0]?.id))
@ -118,9 +119,7 @@ const Authority = (props) => {
// }
// }, [depMessage])
useEffect(() => {
const copy = depUser.filter((item) => {
return item.id !== user.id//把自己筛选出去
})
const copy = [...new Set(depUser)]
setDepUserCopy(copy)
if (copy.length) {
setUserSelectedKeys([copy[0].id])

29
web/client/src/sections/organization/containers/user.js

@ -29,10 +29,10 @@ const UserManage = (props) => {
const [uid, setuid] = useState()
const [editAble, setEditAble] = useState(user?.username !== 'SuperAdmin' && user?.userResources?.filter(i => i.resourceId === 'USERMANAGE')[0].isshow === "true" ? true : '')//控制操作(新增删除等操作,对应权限的'不可编辑')是否可操作
const [depMessagedata, setdepMessagedata] = useState(depMessage)
console.log('depMessagedata', depMessagedata)
//('depMessagedata', depMessagedata)
useEffect(async () => {
if (depMessage.length) {
console.log('depMessage', depMessage)
//console.log('depMessage', depMessage)
//超级管理员展示所有部门
if (user?.username === 'SuperAdmin') {
setdepMessagedata(depMessage)
@ -42,7 +42,7 @@ const UserManage = (props) => {
//不是超级管理员,展示相应部门的数据
dispatch(getDepUser(user.departmentId))
const res = await dispatch(getDepById({ deptId: parseInt(user.departmentId) }))
console.log('resssss', res)
//('resssss', res)
setdepMessagedata(res.payload.data)
// setDepSelectedKeys([res.payload.data[0].id])
// dispatch(getDepUser(res.payload.data[0].id))
@ -66,12 +66,13 @@ const UserManage = (props) => {
dispatch(getDepMessage())
}, [])
useEffect(() => {
console.log('depuser', depUser, user)
const copy = depUser.filter((item) => {
console.log('item1', item)
return item.id !== user.id//把自己筛选出去
})
console.log('copy', copy)
//console.log('depuser', depUser, user)
// const copy = depUser.filter((item) => {
// //console.log('item1', item)
// return item.id !== user.id//把自己筛选出去
// })
// //console.log('copy', copy)
const copy = [...new Set(depUser)]
setDepUserCopy(copy)
}, [depUser])
useEffect(() => {
@ -161,7 +162,7 @@ const UserManage = (props) => {
//弹窗确认
const onConfirm = (values) => {
console.log('values.contract', values.contract)
//('values.contract', values.contract)
if (modalType == 'edit') {
dispatch(updateUser(modalRecord.id, values.contract)).then(res => {
if (res.success) {
@ -226,8 +227,8 @@ const UserManage = (props) => {
}
//部门新增及编辑
const onDepConfirm = (data) => {
console.log('depModalType:', depModalType);
console.log('data:', data);
//console.log('depModalType:', depModalType);
//console.log('data:', data);
if (depModalType == 'edit') {
dispatch(updateDep(data)).then(res => {
@ -442,7 +443,9 @@ function mapStateToProps(state) {
loading: depMessage.isRequesting,
depMessage: depMessage.data || [],
depUser: depUser.data || [],
user: auth.user
user: auth.user,
actions: global.actions
};
}

6
web/client/src/sections/organization/nav-item.js

@ -17,17 +17,17 @@ export function getNavItem(user, dispatch) {
// dispatch(push('/fillion/infor'));
// return null
// }
const isshow = user?.userResources?.filter(i => i.resourceId === 'USERMANAGE' || i.resourceId === 'AUTHORIMANAGE')?.length !== 0
const isshow = user?.userResources?.some(i => i.resourceId === 'USERMANAGE' || i.resourceId === 'AUTHORIMANAGE')
return (
user?.username == 'SuperAdmin' || isshow ?
<SubMenu key="organization" icon={<SettingOutlined />} title={'授权管理'}>
{user?.username == 'SuperAdmin' || user?.userResources?.filter(i => i.resourceId === 'USERMANAGE')?.length !== 0 ? < Menu.Item key="userManage">
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'USERMANAGE') ? < Menu.Item key="userManage">
<Link to="/organization/user">用户管理</Link>
</Menu.Item> : ''
}
{user?.username == 'SuperAdmin' || user?.userResources?.filter(i => i.resourceId === 'AUTHORIMANAGE')?.length !== 0 ? <Menu.Item key="userAuthority">
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'AUTHORIMANAGE') ? <Menu.Item key="userAuthority">
<Link to="/organization/authority"> 权限管理</Link>
</Menu.Item> : ''}

Loading…
Cancel
Save