|
@@ -6,10 +6,139 @@ if(!Promise){
|
|
|
warnings: true // note, run node with --trace-warnings to see full stack traces for warnings
|
|
|
})
|
|
|
}
|
|
|
+const $ = require("jquery");
|
|
|
require('./../css/reset.css');
|
|
|
require('./../css/cdssHorizontal.less');
|
|
|
require('./../css/popup.css');
|
|
|
require('./../css/staticSearch.css')
|
|
|
require('./../js/staticSearch.js')
|
|
|
require('./../images/empty2.png').replace(/^undefined/g, '')
|
|
|
-require('./../images/loading.gif').replace(/^undefined/g, '')
|
|
|
+require('./../images/loading.gif').replace(/^undefined/g, '')
|
|
|
+const { post,config,getUrlArgObject,openNewWin,titleConfig } = require('./promise.js');
|
|
|
+
|
|
|
+let moduleConfig={
|
|
|
+ auxiliary:"recommendWrap",
|
|
|
+ qc:"qcWrap",
|
|
|
+ medical:"medicalKonwledgeWrap"
|
|
|
+}
|
|
|
+let allInterface = 0
|
|
|
+let hasCompleteTnterface = 0
|
|
|
+let moduleNum = 0
|
|
|
+let mrId = getUrlArgObject('mrId')
|
|
|
+const tipsMode = getUrlArgObject('tipsMode') || 1
|
|
|
+let planCode = getUrlArgObject('planCode') || 'all'
|
|
|
+let hospitalIdUrl = getUrlArgObject('hospitalId') || ''
|
|
|
+let msg;
|
|
|
+
|
|
|
+function getMRInfo() {
|
|
|
+ return post(config.getMr2,{mrId:mrId})
|
|
|
+}
|
|
|
+function getConf() {
|
|
|
+ var msg = window.msg
|
|
|
+ return post(config.getPushSet,{hospitalId:hospitalIdUrl||msg.hospitalId||1,planCode: planCode})
|
|
|
+ }
|
|
|
+
|
|
|
+if(mrId){
|
|
|
+ getMRInfo().then(res =>{
|
|
|
+ if(res.data.code == '0'){
|
|
|
+ msg = res.data.data ||{}
|
|
|
+ window.msg = msg
|
|
|
+
|
|
|
+ }
|
|
|
+ }).catch(function (err) {
|
|
|
+ console.log(err);
|
|
|
+ })
|
|
|
+}
|
|
|
+getConf().then(res =>{
|
|
|
+ if(res.data.code == '0'){
|
|
|
+ // const configArr = res.data.data.pushSetList || []
|
|
|
+ // getPageInfo(configArr)
|
|
|
+ const data = res.data.data&&res.data.data[0]
|
|
|
+ renderPage(data)
|
|
|
+ }
|
|
|
+})
|
|
|
+function renderPage(pageSet){
|
|
|
+ renderTab(pageSet.sysSetInfo)
|
|
|
+ const iframeHei = $(".bodyWrap").height()
|
|
|
+ const tabHei = $(".tabList").height()
|
|
|
+ $(".contentWrapper").css("height",iframeHei-tabHei-10-20-30+'px')
|
|
|
+ const hasAuxiliary = hasTab("辅助信息",pageSet.sysSetInfo)
|
|
|
+ const hasMedical = hasTab("医学知识",pageSet.sysSetInfo)
|
|
|
+
|
|
|
+ // if(hasAuxiliary){
|
|
|
+ // renderModuleWrapper(hasAuxiliary.planDetails)
|
|
|
+ // let needPush = isNeedPush(hasAuxiliary.planDetails)
|
|
|
+ // let needPushWarning = isNeedPushWarning(hasAuxiliary.planDetails)
|
|
|
+ // if(needPush || needPushWarning){
|
|
|
+ // renderPushData()
|
|
|
+ // allInterface++
|
|
|
+ // }
|
|
|
+ // if(needPushWarning){
|
|
|
+ // renderPushWarning()
|
|
|
+ // allInterface++
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ function renderTab(tabList){
|
|
|
+ let tabStr = ''
|
|
|
+ let TabNum = 0
|
|
|
+ for(let i = 0; i < tabList.length; i++){
|
|
|
+ if(tabList[i].status == '1'){
|
|
|
+ TabNum++
|
|
|
+ tabStr += `<span class="tab" data-name="${tabList[i].code}" >${tabList[i].name}<span class="activeLine"></span></span>`
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ $(".tabList").append(tabStr)
|
|
|
+ $(".tabList .tab").eq(0).addClass("activeTab")
|
|
|
+ $(".tabList .tab").css("height", 1/TabNum + '%')
|
|
|
+ let showModuleName = $(".tabList .tab").eq(0).attr("data-name")
|
|
|
+ // getModuleShow(moduleConfig[showModuleName])
|
|
|
+ // bindTabClick()
|
|
|
+}
|
|
|
+function hasTab(tabName,tabList){
|
|
|
+ for(let i = 0; i < tabList.length; i++){
|
|
|
+ if(tabList[i].name == tabName){
|
|
|
+ return tabList[i]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false
|
|
|
+}
|
|
|
+
|
|
|
+function renderModuleWrapper(moduleList){
|
|
|
+ let moduleStr = ''
|
|
|
+ for(let i = 0; i < moduleList.length; i++){
|
|
|
+ if(moduleList[i].status !='0'){
|
|
|
+ if(moduleList[i].code == 'treat'){
|
|
|
+ moduleStr += `<div class="moduleItem medicine" data-num="${moduleList[i].number}" style="display:none"></div>`
|
|
|
+ moduleStr += `<div class="moduleItem operation" data-num="${moduleList[i].number}" style="display:none"></div>`
|
|
|
+ }else if(moduleList[i].code == 'tips'){
|
|
|
+ moduleStr += `<div class="moduleItem warning" data-num="${moduleList[i].number}" style="display:none"></div>`
|
|
|
+ moduleStr += `<div class="moduleItem tips" data-num="${moduleList[i].number}" style="display:none"></div>`
|
|
|
+ }else{
|
|
|
+ moduleStr += `<div class="moduleItem ${moduleList[i].code }" data-num="${moduleList[i].number}" style="display:none"></div>`
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ $(".recommendWrap").append(moduleStr)
|
|
|
+}
|
|
|
+function isNeedPush(list){
|
|
|
+ let pushCode = ["diag","lis","pacs","symptom","vital"]
|
|
|
+ for(let i = 0; i < list.length; i++){
|
|
|
+ if(pushCode.indexOf(list[i].code)>-1){
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ function isNeedPushWarning(list){
|
|
|
+ let pushCode = ["tips"]
|
|
|
+ for(let i = 0; i < list.length; i++){
|
|
|
+ if(pushCode.indexOf(list[i].code)>-1){
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false
|
|
|
+ }
|