Index: ssts-web/src/main/webapp/homepage/portalPage.js =================================================================== diff -u -r18054 -r18320 --- ssts-web/src/main/webapp/homepage/portalPage.js (.../portalPage.js) (revision 18054) +++ ssts-web/src/main/webapp/homepage/portalPage.js (.../portalPage.js) (revision 18320) @@ -693,6 +693,104 @@ //添加tabs双击关闭事件 //addTabsDoubleClickEventToClose(); } +/** + * 判断此桌面图标是否不在config.js配置的白名单之内(不在则返回true,否则返回false) + * @param itemId 桌面图标的id + */ +function notInWhiteList2(itemId) { + var flag = false; + if (itemId == 'recyclingApplication' + || itemId == 'recyclingApplicationVersion2' + || itemId == 'recyclingApplicationVersion3' + || itemId == 'recyclingApplicationQuery') { + if (notInWhiteList(sstsConfig, 'tousseApplication') + && notInWhiteList(sstsConfig, 'disinfectionGoodsApplication') + && notInWhiteList(sstsConfig, 'disposableGoodsApplication') + && notInWhiteList(sstsConfig, 'customTousseApplication')) { + flag = true; + } + } else if (itemId == 'borrowRecord') { + if (notInWhiteList(sstsConfig, 'clinicalDepartmentBorrow')) { + flag = true; + } + } else if (itemId == 'borrowManager') { + if (notInWhiteList(sstsConfig, 'borrowManage')) { + flag = true; + } + } else if (itemId == 'foreignTousseApplication') { + if (notInWhiteList(sstsConfig, 'foreignTousseManage')) { + flag = true; + } + } else if (itemId == 'recyclingRecordTouchScreen') { + if (notInWhiteList(sstsConfig, 'recycle')) { + flag = true; + } + } else if (itemId == 'washAndDisinfect') { + if (notInWhiteList(sstsConfig, 'washAndDisinfection')) { + flag = true; + } + } else if (itemId == 'packing') { + if (notInWhiteList(sstsConfig, 'packageManage')) { + flag = true; + } + } else if (itemId == 'reviewPacking') { + if (notInWhiteList(sstsConfig, 'reviewManage')) { + flag = true; + } + } else if (itemId == 'sterilizationLoading') { + if (notInWhiteList(sstsConfig, 'sterilizationLoading')) { + flag = true; + } + } else if (itemId == 'sterilizationRecord') { + if (notInWhiteList(sstsConfig, 'sterilizationManage')) { + flag = true; + } + } else if (itemId == 'invoicePlan' + || itemId == 'sterilizerDelivery' + || itemId == 'invoice') { + if (notInWhiteList(sstsConfig, 'deliveryManage')) { + flag = true; + } + } else if (itemId == 'goodsReceipt') { + if (notInWhiteList(sstsConfig, 'deliveryGoodsSignFor')) { + flag = true; + } + } else if (itemId == 'useRecord') { + if (notInWhiteList(sstsConfig, 'useRecord')) { + flag = true; + } + } else if (itemId == 'recallRecord') { + if (notInWhiteList(sstsConfig, 'recallManage')) { + flag = true; + } + } else if (itemId == 'routineMonitoring' + || itemId == 'qualityMonitoring') { + if (notInWhiteList(sstsConfig, 'qualityMonitoringManage')) { + flag = true; + } + } else if (itemId == 'tousseInstance') { + if (notInWhiteList(sstsConfig, 'tranceabilityManage')) { + flag = true; + } + } else if (itemId == 'systemWarning') { + if (notInWhiteList(sstsConfig, 'systemWarningFunction')) { + flag = true; + } + } else if (itemId == 'satisfactionSurveyTable') { + if (notInWhiteList(sstsConfig, 'satisfactionSurvey')) { + flag = true; + } + } else if (itemId == 'problemReport') { + if (notInWhiteList(sstsConfig, 'departmentProblemFeedback')) { + flag = true; + } + } else if (itemId == 'training') { + if (notInWhiteList(sstsConfig, 'trainManage')) { + flag = true; + } + } + return flag; +} function parsePortItem(portalPage,item){ var returnContent = ""; if(portalPage && item){ @@ -702,70 +800,65 @@ url = url.replace('.png','.jpg'); } itemUrl = WWWROOT + url; - if(item['itemId'] != 'packing' && item['itemId'] != 'reviewPacking' && item['itemId'] !='sterilizationRecord'){ + var itemId = item['itemId']; + if (notInWhiteList2(itemId)) { + return returnContent; + } + + if(itemId != 'packing' && itemId != 'reviewPacking' && itemId !='sterilizationRecord'){ //region 只有临床用户且配了版本2或者3才能看到科室申领版本2或者3的图标还有申请单图标 //如果当前图标是科室申领的时候,如果该用户是临床科室且配了版本2或者3,隐藏该图标 - if (item['itemId'] == 'recyclingApplication' && globalIsSupplyRoomUser == 'false' && (sstsConfig.recyclingApplicationVersion == 2 || sstsConfig.recyclingApplicationVersion == 3)){ + if (itemId == 'recyclingApplication' && globalIsSupplyRoomUser == 'false' && (sstsConfig.recyclingApplicationVersion == 2 || sstsConfig.recyclingApplicationVersion == 3)){ return returnContent; } - // if (item['itemId'] == 'recyclingApplication' && globalIsSupplyRoomUser == 'false' && sstsConfig.recyclingApplicationVersion == 2){ - // return returnContent; - // } - - //如果图标是科室申领版本2或者查看申请单的时候,该用户不是临床科室或者没有配版本2,隐藏该图标 - // if ((item['itemId'] == 'recyclingApplicationVersion2' || item['itemId'] == 'recyclingApplicationQuery') - // && (globalIsSupplyRoomUser == 'true' || sstsConfig.recyclingApplicationVersion != 2)){ - // return returnContent; - // } // 如果图标是科室申领版本2,该用户不是临床科室或者没有配版本2,隐藏该图标 - if (item['itemId'] == 'recyclingApplicationVersion2' && (globalIsSupplyRoomUser == 'true' || sstsConfig.recyclingApplicationVersion != 2)){ + if (itemId == 'recyclingApplicationVersion2' && (globalIsSupplyRoomUser == 'true' || sstsConfig.recyclingApplicationVersion != 2)){ return returnContent; } // 如果图标是科室申领版本3,该用户不是临床科室或者没有配版本3,隐藏该图标 - if (item['itemId'] == 'recyclingApplicationVersion3' && (globalIsSupplyRoomUser == 'true' || sstsConfig.recyclingApplicationVersion != 3)){ + if (itemId == 'recyclingApplicationVersion3' && (globalIsSupplyRoomUser == 'true' || sstsConfig.recyclingApplicationVersion != 3)){ return returnContent; } // 如果图标是查看申请单的时候,该用户不是临床科室或者没有配版本2或者3,隐藏该图标 - if (item['itemId'] == 'recyclingApplicationQuery' && (globalIsSupplyRoomUser == 'true' || sstsConfig.recyclingApplicationVersion != 2 && sstsConfig.recyclingApplicationVersion != 3 )){ + if (itemId == 'recyclingApplicationQuery' && (globalIsSupplyRoomUser == 'true' || sstsConfig.recyclingApplicationVersion != 2 && sstsConfig.recyclingApplicationVersion != 3 )){ return returnContent; } //如果不是使用版本2或者3,则隐藏申请外来器械图标 - if (item['itemId'] == 'foreignTousseApplication' && sstsConfig.recyclingApplicationVersion != 2 && sstsConfig.recyclingApplicationVersion != 3){ - // if (item['itemId'] == 'foreignTousseApplication' && sstsConfig.recyclingApplicationVersion != 2){ + if (itemId == 'foreignTousseApplication' && sstsConfig.recyclingApplicationVersion != 2 && sstsConfig.recyclingApplicationVersion != 3){ return returnContent; } //endregion //如果hideTrainingManage不是false,则隐藏培训管理图标 - if (item['itemId'] == 'training' && false !== sstsConfig.hideTrainingManage){ + if (itemId == 'training' && false !== sstsConfig.hideTrainingManage){ return returnContent; } //灭菌员发货图标 - if (item['itemId'] == 'sterilizerDelivery' && true !== sstsConfig.showSterilizerDelivery){ + if (itemId == 'sterilizerDelivery' && true !== sstsConfig.showSterilizerDelivery){ return returnContent; } var supplyRoomRecall = false; - if(item['itemId'] == "recallRecord"){ + if(itemId == "recallRecord"){ if(SSTS_RecallRecord_Menu == false){ supplyRoomRecall = true; } } if(supplyRoomRecall){//供应室召回管理界面 - returnContent += '
  • '; + returnContent += '
  • '; returnContent += '

    '; returnContent += ''+item['title']+'
  • '; }else{//临床科室查看召回记录界面 - returnContent += '
  • '; + returnContent += '
  • '; returnContent += '

    '; returnContent += ''+item['title']+'
  • '; } }else{ - returnContent += '
  • '; - returnContent += '

    '; + returnContent += '
  • '; + returnContent += '

    '; returnContent += ''+item['title']+'
  • '; } }