Browse Source

feat:小程序权限的修改

dev
zhaobing 2 years ago
parent
commit
879ecc8cb3
  1. 1
      api/app/lib/controllers/data/index.js
  2. 5
      api/app/lib/controllers/overview/building.js
  3. 2
      api/app/lib/controllers/report/index.js
  4. 1
      scripts/1.2.3/schema/6.update_resource.sql
  5. 6
      web/client/src/sections/fillion/components/buildingTable.js
  6. 2
      web/client/src/sections/fillion/components/patrolTable.js
  7. 2
      web/client/src/sections/fillion/containers/assess.js
  8. 2
      web/client/src/sections/organization/containers/authority.js
  9. 2
      web/client/src/sections/organization/containers/user.js
  10. 8
      web/client/src/sections/quanju/containers/footer/build/index.js

1
api/app/lib/controllers/data/index.js

@ -10,7 +10,6 @@ async function dataExport (ctx) {
const { userId } = ctx.fs.api
const { exp, ids, roadLevel, municipalType,
patrolType } = ctx.query;
if (!exp) {
throw '参数错误';
}

5
api/app/lib/controllers/overview/building.js

@ -36,7 +36,6 @@ async function roadState (ctx) {
const projectRoadRes = await models.Project.findAll({
type: 'road',
})
const bridgeRes = await models.Bridge.findAll({})
let constructionYear = []
@ -46,6 +45,8 @@ async function roadState (ctx) {
constructionYear.reverse()
const roadState = {
//总数
projectAll: projectRoadRes.length,
// 在建数量
buildingRoad: 0,
// 已建数量
@ -191,7 +192,7 @@ async function roadState (ctx) {
}
}
if (p.buildUnit) {
if (p.buildUnit && p.done) {
let townName = p.buildUnit.replace('人民政府', '').replace('南昌县', '').replace('管委会', '')
if (roadState.townProject[townName]) {
roadState.townProject[townName] += 1

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

@ -43,7 +43,7 @@ async function reportList (ctx) {
where: {
},
attributes: ['id', 'road', 'time', 'projectType', 'roadSectionStart', 'performerId', 'roadSectionEnd', 'reportType', 'content', 'longitude', 'latitude', 'projectName', 'handleState'],
attributes: ['id', 'road', 'time', 'projectType', 'roadSectionStart', 'performerId', 'roadSectionEnd', 'reportType', 'content', 'longitude', 'latitude', 'projectName', 'handleState', 'codeRoad'],
include: [{
model: models.User,
attributes: ['name']

1
scripts/1.2.3/schema/6.update_resource.sql

@ -0,0 +1 @@
UPDATE resource SET code = 'WXTODOANDONE', name = '小程序待办处理' WHERE code LIKE 'WXTODOLIST' ESCAPE '#'

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

@ -26,7 +26,7 @@ const BuildingTable = (props) => {
const [grade, setGrade] = useState('project')
const [departmentInfo, setDepartment] = useState('')
const [editAble, setEditAble] = useState(user?.username !== 'SuperAdmin' && user?.userResources?.find(i => i.resourceId === 'BUILDINGPROJECT')?.isshow === "true" ? true : '')
console.log('user111', user)
//console.log('user111', user)
const ref = useRef()
const [activeKey, setActiveKey] = useState('tab1');
//打开弹窗
@ -328,10 +328,10 @@ const BuildingTable = (props) => {
optionRender: (searchConfig, formProps, dom) => [
...dom.reverse(),
<Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected, grade, differentiate) }}
disabled={user?.username !== 'SuperAdmin' && user?.userResources?.filter(i => i.resourceId === 'ROADMANAGE')[0].isshow === "true" ? true : ''}
disabled={user?.username !== 'SuperAdmin' && user?.userResources?.find(i => i.resourceId === 'BUILDINGPROJECT').isshow === "true" ? true : ''}
>
<Button
disabled={user?.username !== 'SuperAdmin' && user?.userResources?.filter(i => i.resourceId === 'ROADMANAGE')[0].isshow === "true" ? true : ''}
disabled={user?.username !== 'SuperAdmin' && user?.userResources?.find(i => i.resourceId === 'BUILDINGPROJECT').isshow === "true" ? true : ''}
>
导出
</Button>

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

@ -46,7 +46,9 @@ const DetailForm = (props) => {
{ key: '所在路段', name: 'road', skip: isRoad },
{ key: '具体位置', name: 'address' },
{ key: '巡查内容', name: 'content' },
{ key: '路线代码', name: 'codeRoad' },
{ key: '现场照片', name: 'scenePic' },
];
const renderContent = (data) => {

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

@ -27,7 +27,7 @@ export const unitList = [
'黄马乡',
]
function Assess(props) {
const { dispatch, assess } = props;
const { dispatch, assess, user } = props;
const [assessModalVisible, setAssessModalVisible] = useState(false);
const [editData, setEditData] = useState(null);
const [query, setQuery] = useState({ page: 1, pageSize: 10 })

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

@ -14,7 +14,7 @@ const Authority = (props) => {
const r1 = ['USERMANAGE', 'AUTHORIMANAGE', 'OVERLOADMANAGE', 'ROADMANAGE', 'BRIDGEMANAGE', 'MAINTENANCEMANAGE', 'TRANSPORTATIONMANAGE',
'CONSERVATIONMANAGE', 'PATROLMANAGE', 'PUBLICTRANSPORTMANAGE', 'FILEMANAGE', 'PUBLICITYVIDEO', 'FEEDBACKMANAGE', 'REPORTMANAGE',
'ASSESSMANAGE', 'VIDEOCENTER', 'BUILDINGPROJECT', 'WXPATROLREPORT', 'WXMAINTENANCEREPORT', 'WXFEEDBACKMANAGE', 'WXBUILDINGROAD',
'WXTODOLIST', 'WXDONELIST'
'WXTODOANDONE'
]
const [depUserCopy, setDepUserCopy] = useState([])//用于存放除了自己的管理的数组,即自己不能调整自己是否为管理员
const [depSelectedKeys, setDepSelectedKeys] = useState([])

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

@ -320,7 +320,7 @@ const UserManage = (props) => {
key="primary"
style={{ marginLeft: 10 }}
onClick={() => openDepModal('create')}
disabled={editAble}
disabled={user?.username !== 'SuperAdmin'}
>
新建部门</Button>

8
web/client/src/sections/quanju/containers/footer/build/index.js

@ -46,7 +46,7 @@ const Build = (props) => {
// console.log(alltype,'打他啊')
setdata(alltype.filter(item => item.name === '县' || item.name === "乡" || item.name === '村'))
setbuildingnumber(res.payload.data)
// console.log(res.payload.data,'哈哈哈')
console.log(res.payload.data, '哈哈哈')
}
@ -95,7 +95,11 @@ const Build = (props) => {
onlineproject = onlineproject.sort((a, b) => {
return b.total - a.total
})
//console.log('onlineproject', onlineproject)
let sunonlineproject = onlineproject?.reduce((x, y) => x + y.total, 0)
let projectAll = buildingnumber?.projectAll
//console.log('projectAll', projectAll)
//let projectAll=
let safetyData = alldengji?.filter(item => item.name === '一级公路' || item.name === '二级公路' || item.name === '三级公路' || item.name === '四级公路' || item.name === '等外公路')
let sundata = data?.reduce((x, y) => x + y.value, 0)
let sunsafetyData = safetyData?.reduce((x, y) => x + y.value, 0)
@ -160,7 +164,7 @@ const Build = (props) => {
</div> */}
<img src='/assets/images/quanju/yuanhuan.webp' className='build-left-top-center' />
<div className='build-left-top-item'>
<div>{sunonlineproject || 0}</div>
<div>{projectAll || 0}</div>
<div>
{/* <i>&#9658;</i> */}
{/* <span /> */}

Loading…
Cancel
Save