|
@@ -25,6 +25,11 @@ require('./../images/t2.png')
|
|
|
require('./../images/t3.png')
|
|
|
require('./../images/go.png')
|
|
|
require('./../images/g1.png')
|
|
|
+require('./../images/xhg1.png')
|
|
|
+require('./../images/xhg2.png')
|
|
|
+require('./../images/xhg3.png')
|
|
|
+require('./../images/xhg4.png')
|
|
|
+require('./../images/xhg5.png')
|
|
|
// require('./popupEdit.js');
|
|
|
|
|
|
let infoImg = require('./../images/icon_info.png')
|
|
@@ -34,7 +39,11 @@ let iconArrowDown = require('./../images/icon_arrow_down.png')
|
|
|
let iconMark = require('./../images/icon_mark.png')
|
|
|
let warnImg = require('./../images/icon_warning.png')
|
|
|
let warnImgWhite = require('./../images/icon_waring_white.png')
|
|
|
-
|
|
|
+let xhg1img = require('./../images/xhg1.png')
|
|
|
+let xhg2img = require('./../images/xhg2.png')
|
|
|
+let xhg3img = require('./../images/xhg3.png')
|
|
|
+let xhg4img = require('./../images/xhg4.png')
|
|
|
+let xhg5img = require('./../images/xhg5.png')
|
|
|
|
|
|
const $ = require("jquery");
|
|
|
const { post, config, getUrlArgObject, openNewWin, titleConfig } = require('./promise.js');
|
|
@@ -314,8 +323,6 @@ function renderPushData() {
|
|
|
let medicinesNum = $(".moduleItem.medicine").attr("data-num") || 5
|
|
|
let operationsNum = $(".moduleItem.operation").attr("data-num") || 5
|
|
|
let nurseNum = $(".moduleItem.nurse").attr("data-num") || 5
|
|
|
-
|
|
|
-
|
|
|
renderLis(lisPush, lisNum)
|
|
|
renderScale(scalePush, scaleNum)
|
|
|
renderPacs(pacsPush, pacsNum)
|
|
@@ -338,6 +345,7 @@ function adjustHei() {
|
|
|
$(".contentWrapper").css("height", iframeHei - 20 - 30 - 60 + 3 + 19 + 'px')
|
|
|
$(".tabList").css("height", iframeHei + 'px')
|
|
|
}
|
|
|
+//这段代码通过遍历给定的 list 数组,并根据预定义的 pushCode 数组以及项目的 status 属性,判断是否存在需要推送的项目。它返回一个布尔值,用于表示是否需要执行推送操作
|
|
|
function isNeedPush(list) {
|
|
|
let pass = false;
|
|
|
let pushCode = ['critical', "diag", "lis", "pacs", "symptom", "vital", "treat", "medicines", 'evaluation', 'general', 'medicine', 'operation', 'nurse']
|
|
@@ -499,7 +507,7 @@ function renderDiagItem(list, name, number) {
|
|
|
}
|
|
|
moduleNum++
|
|
|
let titleStr = titleStr2(name)
|
|
|
- let { shortStr, longStr } = renderItemWrapper(list, number)
|
|
|
+ let { shortStr, longStr } = renderItemWrapper(list, number,name)
|
|
|
let boxStr = `<div class="moduleBox">
|
|
|
${titleStr}
|
|
|
${shortStr}
|
|
@@ -508,7 +516,7 @@ function renderDiagItem(list, name, number) {
|
|
|
$(".diag").append(boxStr)
|
|
|
$('.moduleItem.diag').css("display", "block")
|
|
|
}
|
|
|
-function renderWarningDiag(list, name, number) {
|
|
|
+function renderWarningDiag(list, name,number) {
|
|
|
if (list.length > 0 && $(".moduleItem.warning").length > 0) {
|
|
|
moduleNum++
|
|
|
$('.moduleItem.warning').append()
|
|
@@ -603,6 +611,7 @@ function renderMedicinesPush(list, showNum) {
|
|
|
let { shortStr, longStr } = renderItemWrapper(list, showNum)
|
|
|
$(".moduleItem.medicine").append(shortStr).append(longStr)
|
|
|
$(".moduleItem.medicine").css("display", "block")
|
|
|
+ console.log(shortStr);
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -619,14 +628,14 @@ function renderOperationPush(list, showNum) {
|
|
|
}
|
|
|
|
|
|
|
|
|
-function renderItemWrapper(list, showNum) {
|
|
|
+function renderItemWrapper(list, showNum,name) {
|
|
|
let showNum1 = showNum || 5
|
|
|
let shortStr = '', longStr = ''
|
|
|
for (let i = 0; i < list.length; i++) {
|
|
|
if (i <= showNum1 - 1) {
|
|
|
- shortStr += renderPushItem(list[i])
|
|
|
+ shortStr += renderPushItem(list[i],name,i,list.length)
|
|
|
}
|
|
|
- longStr += renderPushItem(list[i])
|
|
|
+ longStr += renderPushItem(list[i],name,i,list.length)
|
|
|
}
|
|
|
if (showNum1 >= list.length) {
|
|
|
return {
|
|
@@ -643,14 +652,31 @@ function renderItemWrapper(list, showNum) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-function renderPushItem(item) {
|
|
|
+function renderPushItem(item, name,index,totalItems) {
|
|
|
const infoIcon = `${item.hasInfo == "1" ? `<img class="infoImg" src="${infoImg}">` : ""}`;
|
|
|
- str = `<span class="pushItemBox" data-name="${item.name}" data-type="${item.type}">`
|
|
|
- str += `<span class="pushItemName ${item.hasScale == "1" ? 'evaluationtitle' : ''} ${item.hasInfo == "1" ? '' : 'noInfo'}">${item.type == 8 ? ('【' + item.name + '】') : item.name} ${infoIcon}<i class="hidden-i"></i></span>`
|
|
|
+ let signalStr = '';
|
|
|
+ const percentage = (index / totalItems) * 100;
|
|
|
+ // 根据百分比添加不同的信号格图片
|
|
|
+ if (name === "可能诊断") {
|
|
|
+ console.log(totalItems);
|
|
|
+ if (percentage <= 20) {
|
|
|
+ signalStr = `<span class="signal"><img class="xhg5img" src="${xhg5img}"></span>`;
|
|
|
+ } else if (percentage <= 40) {
|
|
|
+ signalStr = `<span class="signal"><img class="xhg4img" src="${xhg4img}"></span>`;
|
|
|
+ } else if (percentage <= 60) {
|
|
|
+ signalStr = `<span class="signal"><img class="xhg3img" src="${xhg3img}"></span>`;
|
|
|
+ } else if (percentage <= 80) {
|
|
|
+ signalStr = `<span class="signal"><img class="xhg2img" src="${xhg2img}"></span>`;
|
|
|
+ } else {
|
|
|
+ signalStr = `<span class="signal"><img class="xhg1img" src="${xhg1img}"></span>`;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let str = `<span class="pushItemBox" data-name="${item.name}" data-type="${item.type}">`;
|
|
|
+ str += `<span class="pushItemName ${item.hasScale == "1" ? 'evaluationtitle' : ''} ${item.hasInfo == "1" ? '' : 'noInfo'}">${item.type == 8 ? ('【' + item.name + '】') : item.name} ${infoIcon}<i class="hidden-i"></i></span>`;
|
|
|
+ str += signalStr;
|
|
|
str += `</span>`;
|
|
|
- return str
|
|
|
+ return str;
|
|
|
}
|
|
|
-
|
|
|
function bindOpenInfo() {
|
|
|
$(".infoImg").on("mouseenter", function () {
|
|
|
$(this).attr("src", infoImgOn)
|