|
@@ -2,7 +2,7 @@ const $ = require('jquery');
|
|
|
require("../css/qcList.less");
|
|
|
require('./modal.js');
|
|
|
const {api} = require('./api.js')
|
|
|
-const {post} = require('./utils.js')
|
|
|
+const {post,getCookie} = require('./utils.js')
|
|
|
require('./../resource/jquery-ui/jquery-ui.min.js');
|
|
|
require('./../resource/jquery-ui/jquery-ui.min.css');
|
|
|
const iconCheck= require("./../images/icon_check.png")
|
|
@@ -31,6 +31,16 @@ $('.iconCalen').on("mouseleave", function(e){
|
|
|
$('.iconCalen').on("click", function(e){
|
|
|
$(this).parent().find("input").focus()
|
|
|
})
|
|
|
+$('.recordScoreBtn').css("opacity",hasData('FUNC000017')?'1':'0.5')
|
|
|
+
|
|
|
+//判断有无某一权限
|
|
|
+function hasData(data){
|
|
|
+ let lis = JSON.parse(getCookie("codeLis"))
|
|
|
+ if(lis.indexOf(data)>-1){//有权限
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
function getTabData(activePage){
|
|
|
const param = {
|
|
|
current:activePage,
|
|
@@ -103,7 +113,7 @@ function renderTab(data,hisId){
|
|
|
str += `
|
|
|
<tr data-index=${i}>
|
|
|
<td class="scoreOperaItem textCenter">${item.hasSelect ? `<img class="iconCheck" src=${iconCheck} />`:`<img class="iconCheck" src=${iconUnCheck} />`}</td>
|
|
|
- <td class="recordScoreOperaBtn textCenter">评分</td>
|
|
|
+ <td class="recordScoreOperaBtn textCenter" style="opacity:${hasData('FUNC000017')?'1':'0.5'}">评分</td>
|
|
|
<td >${item.behospitalCode || "-"}</td>
|
|
|
<td>${item.fileCode || "-"}</td>
|
|
|
<td class="textCenter"><span data-index=${i} class="patientNameSpan">${item.name || "-"}<span></td>
|
|
@@ -196,6 +206,9 @@ function bindScoreOperaItem(){
|
|
|
}
|
|
|
function bindRecordScoreOper(){
|
|
|
$(".recordScoreOperaBtn").on("click", function(e){
|
|
|
+ if(!hasData('FUNC000017')){
|
|
|
+ return
|
|
|
+ }
|
|
|
const index = $(this).parent().attr("data-index")
|
|
|
const behospitalCode = tabList[index].behospitalCode
|
|
|
loading()
|
|
@@ -220,6 +233,9 @@ function bindOperaAll(){
|
|
|
}
|
|
|
|
|
|
$('.selectDept').on("click", function(e){
|
|
|
+ if($(this).prev().html() == '科室:'&&!hasData("FUNC000030")){
|
|
|
+ return
|
|
|
+ }
|
|
|
e.stopPropagation()
|
|
|
$(".levelList ").css("display","none")
|
|
|
$(".selectLevel .arrow").attr("src",iconDown)
|
|
@@ -234,7 +250,11 @@ $('.selectDept').on("click", function(e){
|
|
|
})
|
|
|
|
|
|
//获取科室列表
|
|
|
-getDeptList()
|
|
|
+if(hasData("FUNC000030")){
|
|
|
+ getDeptList()
|
|
|
+}else{
|
|
|
+ $(".deptListWrap").css("opacity","0.5")
|
|
|
+}
|
|
|
function getDeptList(){
|
|
|
post(api.getDeptList,{inputStr:""}).then(res =>{
|
|
|
if(res.data.code == '0'){
|
|
@@ -285,6 +305,9 @@ function hideLoading(){
|
|
|
$("#mainBox .loadingBox", parent.document).remove()
|
|
|
}
|
|
|
$('.recordScoreBtn').on("click",function(e){
|
|
|
+ if(!hasData('FUNC000017')){
|
|
|
+ return
|
|
|
+ }
|
|
|
let scoreList = []
|
|
|
for(let i = 0; i <tabList.length; i++){
|
|
|
if(tabList[i].hasSelect){
|