Browse Source

feat:优化指派人(管理员)+只有超管建部门

dev
zhaobing 2 years ago
parent
commit
d55209a5b6
  1. 14
      web/client/src/sections/fillion/components/bridgeTable.js
  2. 20
      web/client/src/sections/fillion/components/buildingTable.js
  3. 19
      web/client/src/sections/fillion/components/feedback/nominateModal.js
  4. 2
      web/client/src/sections/fillion/components/maintenanceTable.js
  5. 4
      web/client/src/sections/fillion/components/patrolTable.js
  6. 7
      web/client/src/sections/fillion/components/project/project.js
  7. 2
      web/client/src/sections/fillion/nav-item.js

14
web/client/src/sections/fillion/components/bridgeTable.js

@ -1767,13 +1767,13 @@ const BrideTable = (props) => {
activeKey, activeKey,
onChange: (key) => setActiveKey(key), onChange: (key) => setActiveKey(key),
items: [ items: [
{ // {
key: 'tab1', // key: 'tab1',
label: <span onClick={() => { // label: <span onClick={() => {
setWhichofits('qiaoliang') // setWhichofits('qiaoliang')
setDifferentiate('bridge') // setDifferentiate('bridge')
}}>桥梁{activeKey === 'tab1'}</span>, // }}>桥梁{activeKey === 'tab1'}</span>,
}, // },
// { // {
// key: 'tab2', // key: 'tab2',
// label: <span onClick={() => { // label: <span onClick={() => {

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

@ -280,15 +280,15 @@ const BuildingTable = (props) => {
activeKey, activeKey,
onChange: (key) => setActiveKey(key), onChange: (key) => setActiveKey(key),
items: [ items: [
{ // {
key: 'tab1', // key: 'tab1',
label: <span onClick={() => { // label: <span onClick={() => {
setWhichofits('在建项目') // setWhichofits('在建项目')
setDifferentiate('project') // setDifferentiate('project')
setGrade('在建项目') // setGrade('在建项目')
}}>在建项目{activeKey === 'tab1'}</span>, // }}>在建项目{activeKey === 'tab1'}</span>,
}, // },
], ],
}, },
}} }}
@ -328,10 +328,10 @@ const BuildingTable = (props) => {
optionRender: (searchConfig, formProps, dom) => [ optionRender: (searchConfig, formProps, dom) => [
...dom.reverse(), ...dom.reverse(),
<Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected, grade, differentiate) }} <Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected, grade, differentiate) }}
disabled={user?.username !== 'SuperAdmin' && user?.userResources?.find(i => i.resourceId === 'BUILDINGPROJECT').isshow === "true" ? true : ''} disabled={user?.username !== 'SuperAdmin' && user?.userResources?.find(i => i.resourceId === 'BUILDINGPROJECT')?.isshow === "true" ? true : ''}
> >
<Button <Button
disabled={user?.username !== 'SuperAdmin' && user?.userResources?.find(i => i.resourceId === 'BUILDINGPROJECT').isshow === "true" ? true : ''} disabled={user?.username !== 'SuperAdmin' && user?.userResources?.find(i => i.resourceId === 'BUILDINGPROJECT')?.isshow === "true" ? true : ''}
> >
导出 导出
</Button> </Button>

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

@ -65,7 +65,7 @@ const NominateModal = (props) => {
visible={visible} visible={visible}
onVisibleChange={onVisibleChange} onVisibleChange={onVisibleChange}
onFinish={handleFinish} onFinish={handleFinish}
destroyOnClose={true} destroyOnClose
initialValues={{ departmentId: null, name: null }} initialValues={{ departmentId: null, name: null }}
> >
<ProForm.Group> <ProForm.Group>
@ -113,10 +113,23 @@ const NominateModal = (props) => {
request={async () => { request={async () => {
if (depId) { if (depId) {
const res = await dispatch(getDepUser(depId)); const res = await dispatch(getDepUser(depId));
const processedUsers = res?.payload.data.map((user) => ({ const copy = res?.payload.data.filter((user) => {
if (user.isAdmin) {
return {
label: user.name, // 使用用户的名字作为选项的显示文本 label: user.name, // 使用用户的名字作为选项的显示文本
value: user.id, // 使用用户的id作为选项的值 value: user.id, // 使用用户的id作为选项的值
})); }
}
}
)
let processedUsers = copy.map((item) => {
return {
label: item.name, // 使用用户的名字作为选项的显示文本
value: item.id, // 使用用户的id作为选项的值
}
})
console.log('processedUsers', copy)
console.log('processedUsers', processedUsers)
return Promise.resolve(processedUsers) return Promise.resolve(processedUsers)
} }

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

@ -435,7 +435,7 @@ const PatrolNameList = (props) => {
return ( return (
<div className='spilce' style={{ height: '600px', width: '100%', overflow: 'auto' }} > <div className='spilce' style={{ height: '600px', width: '100%', overflow: 'auto' }} >
<Search <Search
placeholder="请输入上报人" placeholder="请输入上报人"
value={searchValue} value={searchValue}
onChange={(e) => handleSearch(e.target.value)} onChange={(e) => handleSearch(e.target.value)}
/> />

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

@ -253,10 +253,10 @@ const DetailList = (props) => {
<Button <Button
onClick={() => { checkDetail(record); handleOpen(); }} onClick={() => { checkDetail(record); handleOpen(); }}
style={{ marginRight: 10 }}>查看</Button>, style={{ marginRight: 10 }}>查看</Button>,
isAnomaly && record.handleState != '已处理' && record.performerId === null ? isAnomaly && record.handleState != '已处理' && record.performerId === null && user?.username === 'SuperAdmin' ?
<Button disabled={user?.username !== 'SuperAdmin' && user?.userResources?.filter(i => i.resourceId === 'FEEDBACKMANAGE' || 'FEEDBACKMANAGE')[0].isshow === "true" ? true : ''} <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, onClick={() => { setVis(true); setRecordId(record.id) }}>指派</Button> : null,
isAnomaly && record.handleState != '已处理' && record.performerId === null ? isAnomaly && record.handleState != '已处理' && record.performerId === null && user?.username === 'SuperAdmin' ?
< Popover < Popover
content={ content={
[ [

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

@ -21,6 +21,7 @@ const ProjectModal = (props) => {
const { visible, onVisibleChange, typecard, rewkeys, recortd, dispatch, setRecortd, setDelet, getData } = 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 [newlys, setNewlys] = useState() //必填数据
const [newlysay, setNewlysay] = useState() //处理hou const [newlysay, setNewlysay] = useState() //处理hou
const [records, setRecords] = useState()//处理 const [records, setRecords] = useState()//处理
const [recordsay, setRecordsay] = useState()//必填数据 const [recordsay, setRecordsay] = useState()//必填数据
@ -202,10 +203,10 @@ const ProjectModal = (props) => {
/> />
})} })}
<ProFormDatePicker width="md" name='startTime' label='开工时间' key={10}></ProFormDatePicker>
<ProFormTextArea width="md" name='remark' label='备注' key={11}></ProFormTextArea>
</ProForm.Group>}
</ProForm.Group>}
<ProFormDatePicker width="md" name='startTime' label='开工时间' ></ProFormDatePicker>
<ProFormTextArea width="md" name='remark' label='备注' ></ProFormTextArea>
</DrawerForm> </DrawerForm>
{/* : '' {/* : ''
} */} } */}

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

@ -68,7 +68,7 @@ export function getNavItem(user, dispatch) {
<Menu.Item key="fillionpatrolroad"> <Menu.Item key="fillionpatrolroad">
<Link to="/fillion/patrol_road">建设上报</Link> <Link to="/fillion/patrol_road">建设上报</Link>
</Menu.Item> : ''} </Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.filter(i => i.resourceId === 'BUILDINGPROJECT') ? {user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'BUILDINGPROJECT') ?
<Menu.Item key="fillionbuilding"> <Menu.Item key="fillionbuilding">
<Link to="/fillion/processsing">在建项目</Link> <Link to="/fillion/processsing">在建项目</Link>
</Menu.Item> : ''} </Menu.Item> : ''}

Loading…
Cancel
Save