Browse Source

performerId 传入的时候不再按照g管理员下全部人员查询

dev
巴林闲侠 2 years ago
parent
commit
b283ca73d4
  1. 1
      api/app/lib/controllers/report/index.js
  2. 14
      weapp/src/packages/patrol/index.jsx

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

@ -13,6 +13,7 @@ async function reportList (ctx) {
userInfo.loginSource == 'wx' userInfo.loginSource == 'wx'
&& userInfo.isAdmin && userInfo.isAdmin
&& userInfo.phone != 'SuperAdmin' && userInfo.phone != 'SuperAdmin'
&& (!performerId || !handleState)
) { ) {
// 是管理员但不是超管 查自己部门及下级部门的所有用户的信息 // 是管理员但不是超管 查自己部门及下级部门的所有用户的信息
const sqlStr = ` const sqlStr = `

14
weapp/src/packages/patrol/index.jsx

@ -228,7 +228,7 @@ const Index = () => {
]) ])
}, [reportType]) }, [reportType])
function report() { function report () {
if (!canReport) { return } if (!canReport) { return }
if ( if (
(isPatrol && (!projectType || !road)) (isPatrol && (!projectType || !road))
@ -304,7 +304,7 @@ const Index = () => {
}) })
} }
function deleteReport() { function deleteReport () {
Taro.showModal({ Taro.showModal({
title: '提示', title: '提示',
content: '确定删除吗?', content: '确定删除吗?',
@ -331,7 +331,7 @@ const Index = () => {
}) })
} }
function handleInput({ detail: { value } }, type) { function handleInput ({ detail: { value } }, type) {
switch (type) { switch (type) {
case 'roadSectionStart': case 'roadSectionStart':
setRoadSectionStart(value) setRoadSectionStart(value)
@ -363,15 +363,15 @@ const Index = () => {
} }
} }
function handleTypeChange(e) { function handleTypeChange (e) {
setReportType(e.detail.value) setReportType(e.detail.value)
} }
function handleImgChange(files, operationType, index, type) { function handleImgChange (files, operationType, index, type) {
if (operationType === 'remove') { if (operationType === 'remove') {
setImg(false) setImg(false)
} }
function setImg(isAdd, url) { function setImg (isAdd, url) {
switch (type) { switch (type) {
case 'scenePic': case 'scenePic':
let nextImg = sceneImg let nextImg = sceneImg
@ -458,7 +458,7 @@ const Index = () => {
} }
} }
function handleImgClick(index, file) { function handleImgClick (index, file) {
Taro.previewImage({ Taro.previewImage({
urls: [file.url] // http urls: [file.url] // http
}) })

Loading…
Cancel
Save