cdssHorizontal.js 58 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446
  1. if (!Promise) {
  2. var Promise = require("bluebird");
  3. // Configure
  4. Promise.config({
  5. longStackTraces: true,
  6. warnings: true // note, run node with --trace-warnings to see full stack traces for warnings
  7. })
  8. }
  9. const $ = require("jquery");
  10. require('./util.js');
  11. require('./../css/reset.css');
  12. require('./../css/cdssHorizontal.less');
  13. require('./../css/popup.css');
  14. require('../css/staticSearch.less')
  15. require('./../js/staticSearch.js');//静态知识搜索
  16. require('./../images/empty2.png').replace(/^undefined/g, '')
  17. require('./../images/dn.png').replace(/^undefined/g, '')
  18. require('./../images/loading.gif').replace(/^undefined/g, '')
  19. let emptyImg = require('./../images/empty3.png').replace(/^undefined/g, '')
  20. require('./../images/new2.png').replace(/^undefined/g, '')
  21. const { post, config, getUrlArgObject, openNewWin, titleConfigH, throttle, } = require('./promise.js');
  22. let infoImg = require('./../images/icon_info.png').replace(/^undefined/g, '')
  23. let infoImgOn = require('./../images/icon_info_on.png').replace(/^undefined/g, '')
  24. let iconArrowUp = require('./../images/icon_arrow_up.png').replace(/^undefined/g, '')
  25. let iconArrowDown = require('./../images/icon_arrow_down.png').replace(/^undefined/g, '')
  26. let showImg = require('./../images/show2.png').replace(/^undefined/g, '')
  27. let collapseImg = require('./../images/collapse2.png').replace(/^undefined/g, '')
  28. let treatDisName, treatUniqueName
  29. let maydiagnoseList = [], hasdiagnoseList = []
  30. let maydiagnoseType = false, hasdiagnoseType = false;
  31. let generalTreatInfo
  32. const { renderFollowUp } = require('./followUp.js');
  33. const { getTcmMr } = require('./tcmiss.js');
  34. let moduleConfig = {
  35. auxiliary: "recommendWrap",
  36. qc: "qcWrap",
  37. medical: "medicalKonwledgeWrap",
  38. followup: 'followUpWrap',
  39. tcmiss: 'tcmWarp',
  40. }
  41. let allInterface = 0
  42. let hasCompleteTnterface = 0
  43. let moduleNum = 0
  44. let mrId = getUrlArgObject('mrId')
  45. let pushMrId = getUrlArgObject('pushMrId')
  46. const tipsMode = getUrlArgObject('tipsMode') || 1
  47. let planCode = getUrlArgObject('planCode') || 'all'
  48. let hospitalIdUrl = getUrlArgObject('hospitalId') || ''
  49. let msg;
  50. let tipsMsg;
  51. let caseWriteStandradList;
  52. function getMRInfo() {
  53. return post(config.getMr2, { mrId: mrId })
  54. }
  55. function getConf() {
  56. var msg = window.msg
  57. return post(config.getPushSet, { hospitalId: hospitalIdUrl || msg.hospitalId || 1, planCode: planCode })
  58. }
  59. function getPushInfo() {
  60. return post(config.pushInner, Object.assign({}, msg, {
  61. featureType: '1,4,5,6,7,8,9,10,12,13',
  62. hospitalId: hospitalIdUrl || msg.hospitalId,
  63. ruleType: config.ruleTypeMap['22']
  64. }))
  65. }
  66. function pushByDisease(name, i) {
  67. return post(config.pushInner, Object.assign({}, msg, {
  68. featureType: '1,4,5,6,7,8,9,10,12,13',
  69. hospitalId: hospitalIdUrl || msg.hospitalId,
  70. ruleType: config.ruleTypeMap['22'],
  71. diseaseName: {
  72. name: name,
  73. uniqueName: name
  74. }
  75. }))
  76. }
  77. function getPusgWarning() {
  78. const indPush = pushMrId ? config.indicationPushCache : config.indicationPush;
  79. return post(indPush, Object.assign({}, msg, { ruleType: '1,2,3,4', mrId: pushMrId || mrId }))
  80. }
  81. function getWriteStandardPush() {
  82. return post(config.caseWritingPrompt, Object.assign({}, msg, { hospitalId: 2 || msg.hospitalId }))
  83. }
  84. if (mrId) {
  85. Promise.all([getConf(), getMRInfo()]).then(([res1, res2]) => {
  86. const data = res1.data.data && res1.data.data[0]
  87. msg = res2.data.data || {}
  88. if (!(msg && msg.diseaseName && msg.diseaseName.name)) {
  89. msg.diseaseName = null
  90. }
  91. window.msg = msg
  92. renderPage(data)
  93. })
  94. } else {
  95. getConf().then(res => {
  96. if (res.data.code == '0') {
  97. // const configArr = res.data.data.pushSetList || []
  98. // getPageInfo(configArr)
  99. const data = res.data.data && res.data.data[0]
  100. renderPage(data)
  101. }
  102. })
  103. }
  104. function renderPage(pageSet) {
  105. if (!pageSet || !pageSet.sysSetInfo) {
  106. return
  107. }
  108. renderTab(pageSet.sysSetInfo)
  109. const iframeHei = $(".bodyWrap").height()
  110. const tabHei = $(".tabList").height()
  111. $(".contentWrapper").css("height", iframeHei - tabHei - 10 - 20 - 30 + 'px')
  112. const hasAuxiliary = hasTab("辅助信息", pageSet.sysSetInfo)
  113. const hasMedical = hasTab("医学知识", pageSet.sysSetInfo)
  114. const hasFollowUp = hasTab("随访计划", pageSet.sysSetInfo)
  115. const hasTcm = hasTab("中医辅助", pageSet.sysSetInfo)
  116. //所有模块都未开启配置,显示功能未开启(无tab)
  117. if (hasAuxiliary.status === 0 && hasMedical.status === 0 && hasFollowUp.status === 0 && hasTcm.status === 0) {
  118. const nullTxt = `<div class="empty-box" style="left: -20px;display: block;">
  119. <img class="emptyImg" src="../images/icon_admin.png" alt="空">
  120. <p class="emptyTxt">功能未开启</p>
  121. </div>`
  122. $(".recommendWrap").html(nullTxt).show();
  123. return;
  124. }
  125. if (hasTcm) {
  126. getTcmMr(mrId, hasTcm);
  127. }
  128. if (hasFollowUp) {
  129. renderFollowUp(msg, 1)
  130. }
  131. const planDetail = hasAuxiliary.planDetails;
  132. const configs = planDetail.filter((it) => it.status !== 0) || [];
  133. if (!configs[0]) { //没有开启辅助信息各项配置
  134. $('.empty-box,.leftWrapper').hide();
  135. $('.recommendWrap .empty-right').show();
  136. return;
  137. }
  138. //有数据再设置宽度
  139. //setWidth()
  140. if (hasAuxiliary) {
  141. renderModuleWrapper(hasAuxiliary.planDetails)
  142. let needPush = isNeedPush(hasAuxiliary.planDetails)
  143. let needPushWarning = isNeedPushWarning(hasAuxiliary.planDetails)
  144. let needWriteStandardPush = isNeedwriteStandardPush(hasAuxiliary.planDetails)
  145. if (needPush || needPushWarning) {
  146. renderPushData()
  147. allInterface++
  148. }
  149. if (needPushWarning) {
  150. renderPushWarning()
  151. allInterface++
  152. }
  153. if (needWriteStandardPush) {
  154. renderCaseWrite()
  155. allInterface++
  156. }
  157. }
  158. }
  159. function renderTab(tabList) {
  160. if (!tabList) {
  161. return
  162. }
  163. let tabStr = ''
  164. let TabNum = 0
  165. for (let i = 0; i < tabList.length; i++) {
  166. if (tabList[i].status == '1') {
  167. TabNum++
  168. tabStr += `<div class="tab" data-name="${tabList[i].code}" ><span class="tabName">${tabList[i].name}</span></div>`
  169. }
  170. if (tabList[i].code == 'maydiagnose') {
  171. maydiagnoseList = moduleList[i].planDetails
  172. } else if (tabList[i].code == 'hasdiagnose') {
  173. hasdiagnoseList = tabList[i].planDetails
  174. }
  175. }
  176. $(".tabList").append(tabStr)
  177. $(".tabList .tab").eq(0).addClass("activeTab")
  178. $(".tabList .tab").eq(0).addClass("activeTab")
  179. // $(".tabList .tab").css("height", 1 / TabNum * 100 + '%')
  180. let showModuleName = $(".tabList .tab").eq(0).attr("data-name")
  181. getModuleShow(moduleConfig[showModuleName])
  182. bindTabClick()
  183. //setTabNameTop()
  184. }
  185. function hasTab(tabName, tabList) {
  186. for (let i = 0; i < tabList.length; i++) {
  187. if (tabList[i].name == tabName) {
  188. return tabList[i]
  189. }
  190. }
  191. return false
  192. }
  193. function renderModuleWrapper(moduleList) {
  194. if (!moduleList) {
  195. return
  196. }
  197. let moduleStr = '', treatStr = ""
  198. for (let i = 0; i < moduleList.length; i++) {
  199. if (moduleList[i].status != '0') {
  200. if (moduleList[i].code == 'general' || moduleList[i].code == 'medicine' || moduleList[i].code == 'operation') {
  201. treatStr += `<div class="moduleItem ${moduleList[i].code}" data-num="${moduleList[i].number}" style="display:none"><span class="moduleItemTitBox"></span></div>`
  202. } else if (moduleList[i].code == 'nurse') {
  203. moduleStr += `<div class="moduleItem ${moduleList[i].code}" data-num="${moduleList[i].number}" style="display:none"><span class="moduleItemTitBox"></span></div>`
  204. } else if (moduleList[i].code == 'critical') {
  205. moduleStr += `<div class="moduleItem warning" data-num="${moduleList[i].number}" style="display:none"><span class="moduleItemTitBox"></span></div>`
  206. // moduleStr += `<div class="moduleItem tips" data-num="${moduleList[i].number}" style="display:none"><span class="moduleItemTitBox"></span></div>`
  207. } else if (moduleList[i].code == 'maydiagnose') {
  208. maydiagnoseList = moduleList[i].planDetails
  209. moduleStr += `<div class="moduleItem ${moduleList[i].code}" data-num="${moduleList[i].number}" style="display:none"><span class="moduleItemTitBox"></span></div>`
  210. let arr = []
  211. for (let j = 0; j < moduleList[i].planDetails.length; j++) {
  212. let item = moduleList[i].planDetails[j]
  213. arr.push(item.status)
  214. }
  215. if (arr.indexOf(1) == -1) {
  216. maydiagnoseType = true
  217. }
  218. } else if (moduleList[i].code == 'hasdiagnose') {
  219. hasdiagnoseList = moduleList[i].planDetails
  220. moduleStr += `<div class="moduleItem ${moduleList[i].code}" data-num="${moduleList[i].number}" style="display:none"><span class="moduleItemTitBox"></span></div>`
  221. let arr = []
  222. for (let j = 0; j < moduleList[i].planDetails.length; j++) {
  223. let item = moduleList[i].planDetails[j]
  224. arr.push(item.status)
  225. }
  226. if (arr.indexOf(1) == -1) {
  227. hasdiagnoseType = true
  228. }
  229. } else {
  230. moduleStr += `<div class="moduleItem ${moduleList[i].code}" data-num="${moduleList[i].number}" style="display:none"><span class="moduleItemTitBox"></span></div>`
  231. }
  232. }
  233. }
  234. $(".recommendWrap .leftBox").append(moduleStr)
  235. $(".recommendWrap .rightBox").append(treatStr)
  236. /*if($(".moduleItem:visible").length===0){
  237. $(".empty-null").show();
  238. }*/
  239. }
  240. function isNeedPush(list) {
  241. let pushCode = ['critical', "diag", "lis", "pacs", "symptom", "vital", "treat", "medicines", 'evaluation', 'general', 'medicine', 'operation', 'nurse']
  242. for (let i = 0; i < list.length; i++) {
  243. if (pushCode.indexOf(list[i].code) > -1) {
  244. if (list[i].status == "1") {
  245. return true
  246. }
  247. }
  248. }
  249. return false
  250. }
  251. function isNeedPushWarning(list) {
  252. let pushCode = ["crivalue", "rationali", "highrisk", "otherremind"]
  253. for (let i = 0; i < list.length; i++) {
  254. if (pushCode.indexOf(list[i].code.trim()) > -1) {
  255. if (list[i].status == "1") {
  256. return true
  257. }
  258. }
  259. }
  260. return false
  261. }
  262. function isNeedwriteStandardPush(list) {
  263. let pushCode = ["casewriting"]
  264. for (let i = 0; i < list.length; i++) {
  265. if (pushCode.indexOf(list[i].code) > -1) {
  266. if (list[i].status == "1") {
  267. return true
  268. }
  269. }
  270. }
  271. return false
  272. }
  273. function bindTabClick() {
  274. $(".tabList .tab").on("click", function () {
  275. $(".activeTab").removeClass("activeTab")
  276. $(this).addClass("activeTab")
  277. const moduleName = $(this).attr("data-name")
  278. getModuleShow(moduleConfig[moduleName])
  279. })
  280. }
  281. function getModuleShow(moduleClassName) {
  282. if ($(`.${moduleClassName}`).css("display") == "none") {
  283. $(".moduleWrapper").css("display", "none")
  284. $(`.${moduleClassName}`).css("display", "block")
  285. //empty();
  286. }
  287. }
  288. function setTabNameTop() {
  289. const tabNameList = $(".tabList .tab .tabName")
  290. for (let i = 0; i < tabNameList.length; i++) {
  291. let tabNameHei = $(".tabList .tab .tabName").eq(i).height()
  292. // $(".tabList .tab .tabName").eq(i).css("marginTop", -tabNameHei / 2 + "px")
  293. }
  294. }
  295. function renderCaseWrite() {
  296. getWriteStandardPush().then(res => {
  297. hasCompleteTnterface++
  298. if (res.data.code == '0') {
  299. const caseWriteList = res.data.data || {}
  300. let caseWritePush = Object.keys(caseWriteList) || []
  301. renderwriteStandardPage(caseWritePush)
  302. if ($(".moduleItem.casewriting")) {
  303. let casewritingHei = $(".moduleItem.casewriting")[0].scrollHeight
  304. if (casewritingHei > 63) {
  305. $(".casewriting").append(`<span class="showMoreCaseWrite">更多</span>`)
  306. caseWriteStandradList = caseWritePush
  307. showMoreCaseWrite()
  308. }
  309. }
  310. }
  311. }).catch(() => {
  312. $(".loading").hide()
  313. })
  314. }
  315. function renderPushData() {
  316. $(".loading").show()
  317. return getPushInfo().then(res => {
  318. hasCompleteTnterface++
  319. if (res.data.code == "0") {
  320. const result = res.data.data
  321. let diagPush = result.dis || {}
  322. let lisPush = result.lis || []
  323. let scalePush = result.scale || []
  324. let pacsPush = result.pacs || []
  325. let symptomPush = result.symptom || []
  326. let checkupPush = result.vital || []
  327. let medicinesPush = result.medicines || []
  328. let operationsPush = result.operations || []
  329. let nursePush = result.nurse || []
  330. let treatPush = result.treat && result.treat[0] || {}
  331. treatDisName = treatPush && treatPush["name"]
  332. treatUniqueName = treatPush && treatPush["uniqueName"]
  333. let generaTreatPush = treatPush && treatPush["generaTreat"]
  334. generalTreatInfo = generaTreatPush
  335. // let lisPush =[{name:"血常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null}]
  336. // let pacsPush = [{name:"胸部x射线",hisNameList:null},{name:"心电图",hisNameList:null}]
  337. // let checkupPush = [{name:"神志表情",hisNameList:null},{name:"面部表情",hisNameList:null}]
  338. let lisNum = $(".moduleItem.lis").attr("data-num") || 5
  339. let scaleNum = $(".moduleItem.evaluation").attr("data-num") || 5
  340. let pacsNum = $(".moduleItem.pacs").attr("data-num") || 5
  341. let checkupNum = $(".moduleItem.vital").attr("data-num") || 5
  342. let symptomNum = $(".moduleItem.symptom").attr("data-num") || 5
  343. let medicinesNum = $(".moduleItem.medicine").attr("data-num") || 5
  344. let operationsNum = $(".moduleItem.operation").attr("data-num") || 5
  345. let nurseNum = $(".moduleItem.nurse").attr("data-num") || 5
  346. let diagList = result.clickPosDis || [] //可能诊断
  347. let AffList = result.clickAffDis || [] //已诊断疾病
  348. renderLis(lisPush, lisNum)
  349. renderScale(scalePush, scaleNum)
  350. renderPacs(pacsPush, pacsNum)
  351. renderCheckup(checkupPush, checkupNum)
  352. renderSymptomPush(symptomPush, symptomNum)
  353. renderDiag(diagPush)
  354. renderDiagList(diagList)
  355. renderAffListList(AffList)
  356. if (medicinesPush.length > 0 || operationsPush.length > 0 || generaTreatPush || nursePush.length > 0) {
  357. let str = `<img class="treatIcon" src = ${titleConfigH["treat"].icon} /><span>${titleConfigH["treat"].name}</span>`
  358. $(".rightBoxTitle").append(str)
  359. renderDisName()
  360. $(".empty-box").hide();
  361. $(".rightWrapper").css("display", "block")
  362. if ($(".leftBox .moduleItem:visible").length === 0) { //左侧没有数据,右侧有数据时,右侧往左移
  363. $(".leftWrapper").css({ "width": '0', 'padding': '0' });
  364. $(".rightWrapper").css("width", '100%');
  365. }
  366. } else if ($(".leftWrapper .moduleItem:visible").length !== 0) {
  367. console.log(2)
  368. $(".empty-box").hide();
  369. $(".leftWrapper").css({
  370. borderRight: "0px",
  371. width: "100%"
  372. })
  373. }
  374. if ($(".moduleItem.general,.moduleItem.medicine,.moduleItem.operation,.moduleItem.nurse").length === 0 && $(".leftWrapper .moduleItem:visible").length !== 0) {
  375. console.log(3)
  376. $(".rightWrapper").css("display", "none")
  377. $(".empty-box").hide();
  378. $(".leftWrapper").css({
  379. borderRight: "0px",
  380. width: "100%"
  381. })
  382. }
  383. rendergeneraTreatPush(generaTreatPush)
  384. renderMedicinesPush(medicinesPush, medicinesNum)
  385. renderOperationPush(operationsPush, operationsNum)
  386. // renderNurse(nursePush, nurseNum)
  387. bindOpenInfo()
  388. bindSlide()
  389. moreInfo()
  390. empty()
  391. }
  392. }).catch(() => {
  393. $(".loading").hide()
  394. })
  395. }
  396. function renderpushByMayDisease(name, i, inx) {
  397. return pushByDisease(name, i).then(res => {
  398. $(".loading").hide();
  399. hasCompleteTnterface++
  400. if (res.data.code == "0") {
  401. const result = res.data.data
  402. let symptomPush = result.symptom || []
  403. let vitalPush = result.vital || []
  404. let lisPush = result.lis || []
  405. let pacsPush = result.pacs || []
  406. let scalePush = result.scale || []
  407. let disPush = result.dis['大数据推送诊断'] || {}
  408. let treatPush = result.treat || {}
  409. let medicinesPush = result.medicines || {}
  410. let operationsPush = result.operations || {}
  411. let nursePush = result.nurse || {}
  412. if (symptomPush.length == 0 && vitalPush.length == 0 && lisPush.length == 0 && pacsPush.length == 0 && scalePush.length == 0 && disPush.length == 0 && treatPush.length == 0 && medicinesPush.length == 0 && operationsPush.length == 0 && nursePush.length == 0) {
  413. $.toast('toast3', '', 3000, '.maydiagnose', i);
  414. $(".maydiagnose .item").css("display", "none")
  415. } else if (maydiagnoseType) {
  416. $.toast('toast4', '', 3000, '.maydiagnose', i);
  417. $(".maydiagnose .item").css("display", "none")
  418. } else {
  419. renderMaySymptomPush(symptomPush, inx)
  420. renderMayVitalPush(vitalPush, inx)
  421. renderMayLisPush(lisPush, inx)
  422. renderMayPacsPush(pacsPush, inx)
  423. renderMayScalePush(scalePush, inx)
  424. renderMayDisPush(disPush, inx)
  425. renderMayPush(treatPush, medicinesPush, operationsPush, nursePush, inx)
  426. bindOpenInfo()
  427. moreInfo()
  428. bindSlide();
  429. }
  430. }
  431. empty(); //判断是否显示空状态
  432. })
  433. }
  434. function renderpushByHasDisease(name, i, inx) {
  435. return pushByDisease(name, i).then(res => {
  436. $(".loading").hide();
  437. hasCompleteTnterface++
  438. if (res.data.code == "0") {
  439. const result = res.data.data
  440. let symptomPush = result.symptom || []
  441. let vitalPush = result.vital || []
  442. let lisPush = result.lis || []
  443. let pacsPush = result.pacs || []
  444. let scalePush = result.scale || []
  445. let disPush = result.dis['鉴别诊断'] || {}
  446. let treatPush = result.treat || {}
  447. let medicinesPush = result.medicines || {}
  448. let operationsPush = result.operations || {}
  449. let nursePush = result.nurse || {}
  450. if (symptomPush.length == 0 && vitalPush.length == 0 && lisPush.length == 0 && pacsPush.length == 0 && scalePush.length == 0 && disPush.length == 0 && treatPush.length == 0 && medicinesPush.length == 0 && operationsPush.length == 0 && nursePush.length == 0) {
  451. $.toast('toast3', '', 3000, '.hasdiagnose', i);
  452. $(".hasdiagnose .item").css("display", "none")
  453. } else if (hasdiagnoseType) {
  454. $.toast('toast4', '', 3000, '.hasdiagnose', i);
  455. $(".hasdiagnose .item").css("display", "none")
  456. } else {
  457. renderHasSymptomPush(symptomPush, inx)
  458. renderHasVitalPush(vitalPush, inx)
  459. renderHasLisPush(lisPush, inx)
  460. renderHasPacsPush(pacsPush, inx)
  461. renderHasScalePush(scalePush, inx)
  462. renderHasDisPush(disPush, inx)
  463. renderHasPush(treatPush, medicinesPush, operationsPush, nursePush, inx)
  464. bindOpenInfo()
  465. moreInfo()
  466. bindSlide();
  467. }
  468. }
  469. empty(); //判断是否显示空状态
  470. })
  471. }
  472. function empty() { //显示空状态
  473. setTimeout(function () {
  474. if ((!$(".rightWrapper .rightBoxTitle").html()) && $(".leftWrapper .moduleItem:visible").length !== 0) {
  475. console.log(4)
  476. $(".leftWrapper").css({
  477. borderRight: "0px",
  478. width: "100%"
  479. })
  480. }
  481. if ($(".tabList .tab:first-child").is(".activeTab") && $(".empty-right:visible").length === 0 && $(".moduleItem:visible").length === 0) {
  482. $(".empty-box,.leftWrapper").hide();
  483. $(".empty-null").show();
  484. }
  485. }, 300);
  486. }
  487. function renderDiagList(list, showNum) {
  488. if (list.length === 0) {
  489. return
  490. }
  491. $('.moduleItem.maydiagnose .moduleItemTitBox').append(titleStr("maydiagnosePush"))
  492. let str = ``
  493. let { shortStr, longStr } = renderItemWrapper(list, 10, '', 1)
  494. let boxStr = `<div class="moduleBox">
  495. ${str}
  496. ${shortStr}
  497. </div>`
  498. $(".moduleItem.maydiagnose").append(boxStr)
  499. $(".moduleItem.maydiagnose").append("<div class='item' data-index='1'></div>")
  500. $(".moduleItem.maydiagnose.moduleItemTitBox").append(renderLongStr(name, longStr, "left"))
  501. $('.moduleItem.maydiagnose').css("display", "block")
  502. $('.maydiagnose .pushItemBox').on("click", function (e) {
  503. e.preventDefault()
  504. const name = $(this).attr('data-name');
  505. const i = $(this).attr('data-index');
  506. if ($(this).hasClass('active')) {
  507. $(this).removeClass('active');
  508. } else {
  509. $(this).addClass('active').siblings().removeClass('active');
  510. }
  511. const index = $(this).parent().parent().next().attr('data-i')
  512. const showList = $(".maydiagnose .item").css("display")
  513. console.log(showList);
  514. if (showList == "none" || index != i) {
  515. $(".loading").show();
  516. $(".maydiagnose .item").html('')
  517. $(".maydiagnose .item").css("display", "none")
  518. $(this).parent().parent().next().css("display", "block")
  519. $(this).parent().parent().next().attr('data-i', i)
  520. renderpushByMayDisease(name, i, 1)
  521. } else {
  522. $(".maydiagnose .item").css("display", "none")
  523. }
  524. });
  525. }
  526. function renderAffListList(list, showNum) {
  527. if (list.length === 0) {
  528. return
  529. }
  530. $('.moduleItem.hasdiagnose .moduleItemTitBox').append(titleStr("hasdiagnosePush"))
  531. let str = ``
  532. let { shortStr, longStr } = renderItemWrapper(list, 10, '', 1)
  533. let boxStr = `<div class="moduleBox">
  534. ${str}
  535. ${shortStr}
  536. </div>`
  537. $(".moduleItem.hasdiagnose").append(boxStr)
  538. $(".moduleItem.hasdiagnose").append("<div class='item' data-index='2'></div>")
  539. $(".moduleItem.hasdiagnose.moduleItemTitBox").append(renderLongStr(name, longStr, "left"))
  540. $('.moduleItem.hasdiagnose').css("display", "block")
  541. $('.hasdiagnose .pushItemBox').on("click", function (e) {
  542. e.preventDefault()
  543. const name = $(this).attr('data-name');
  544. const i = $(this).attr('data-index');
  545. if ($(this).hasClass('active')) {
  546. $(this).removeClass('active');
  547. } else {
  548. $(this).addClass('active').siblings().removeClass('active');
  549. }
  550. const index = $(this).parent().parent().next().attr('data-i')
  551. const showList = $(".hasdiagnose .item").css("display")
  552. if (showList == "none" || index != i) {
  553. $(".loading").show();
  554. $(".hasdiagnose .item").html('')
  555. $(".hasdiagnose .item").css("display", "none")
  556. $(this).parent().parent().next().css("display", "block")
  557. $(this).parent().parent().next().attr('data-i', i)
  558. renderpushByHasDisease(name, i, 2)
  559. } else {
  560. $(this).find(".item").css("display", "none")
  561. }
  562. });
  563. }
  564. function renderMayVitalPush(list, inx) {
  565. let num, state
  566. for (let i = 0; i < maydiagnoseList.length; i++) {
  567. const item = maydiagnoseList[i];
  568. if (item.code == 'mayvital') {
  569. num = item.number
  570. state = item.status
  571. }
  572. }
  573. if (list.length > 0 && state != 0) {
  574. moduleNum++
  575. let { shortStr, longStr } = renderItemWrapper(list, num, '体征')
  576. $(".moduleItem .item[data-index=" + inx + "]").append("<div class='mayvital'></div>")
  577. $(".moduleItem .item[data-index=" + inx + "] .mayvital").append(shortStr)
  578. $(".moduleItem .item[data-index=" + inx + "] .mayvital").append(renderLongStr(titleConfigH["symptomPush"].name, longStr, titleConfigH["symptomPush"].location))
  579. $(".moduleItem .item[data-index=" + inx + "] .mayvital").css("display", "block")
  580. }
  581. }
  582. function renderHasVitalPush(list, inx) {
  583. let num, state
  584. for (let i = 0; i < hasdiagnoseList.length; i++) {
  585. const item = hasdiagnoseList[i];
  586. if (item.code == 'hasvital') {
  587. num = item.number
  588. state = item.status
  589. }
  590. }
  591. if (list.length > 0 && state != 0) {
  592. moduleNum++
  593. let { shortStr, longStr } = renderItemWrapper(list, num, '体征')
  594. $(".moduleItem .item[data-index=" + inx + "]").append("<div class='hasvital'></div>")
  595. $(".moduleItem .item[data-index=" + inx + "] .hasvital").append(shortStr)
  596. $(".moduleItem .item[data-index=" + inx + "] .hasvital").append(renderLongStr(titleConfigH["symptomPush"].name, longStr, titleConfigH["symptomPush"].location))
  597. $(".moduleItem .item[data-index=" + inx + "] .hasvital").css("display", "block")
  598. }
  599. }
  600. function renderMaySymptomPush(list, inx) {
  601. let num, state
  602. for (let i = 0; i < maydiagnoseList.length; i++) {
  603. const item = maydiagnoseList[i];
  604. if (item.code == 'maysymptom') {
  605. num = item.number
  606. state = item.status
  607. }
  608. }
  609. if (list.length > 0 && state != 0) {
  610. console.log(778);
  611. let { shortStr, longStr } = renderItemWrapper(list, num, '症状')
  612. $(".moduleItem .item[data-index=" + inx + "]").append("<div class='maysymptom'></div>")
  613. $(".moduleItem .item[data-index=" + inx + "] .maysymptom").append(shortStr)
  614. $(".moduleItem .item[data-index=" + inx + "] .maysymptom").append(renderLongStr(titleConfigH["symptomPush"].name, longStr, titleConfigH["symptomPush"].location))
  615. $(".moduleItem .item[data-index=" + inx + "] .maysymptom").css("display", "block")
  616. }
  617. }
  618. function renderHasSymptomPush(list, inx) {
  619. let num, state
  620. for (let i = 0; i < hasdiagnoseList.length; i++) {
  621. const item = hasdiagnoseList[i];
  622. if (item.code == 'hassymptom') {
  623. num = item.number
  624. state = item.status
  625. }
  626. }
  627. if (list.length > 0 && state != 0) {
  628. moduleNum++
  629. let { shortStr, longStr } = renderItemWrapper(list, num, '症状')
  630. $(".moduleItem .item[data-index=" + inx + "]").append("<div class='hassymptom'></div>")
  631. $(".moduleItem .item[data-index=" + inx + "] .hassymptom").append(shortStr)
  632. $(".moduleItem .item[data-index=" + inx + "] .hassymptom").append(renderLongStr(titleConfigH["symptomPush"].name, longStr, titleConfigH["symptomPush"].location))
  633. $(".moduleItem .item[data-index=" + inx + "] .hassymptom").css("display", "block")
  634. }
  635. }
  636. function renderMayLisPush(list, inx) {
  637. let num, state
  638. for (let i = 0; i < maydiagnoseList.length; i++) {
  639. const item = maydiagnoseList[i];
  640. if (item.code == 'maylis') {
  641. num = item.number
  642. state = item.status
  643. }
  644. }
  645. if (list.length > 0 && state != 0) {
  646. moduleNum++
  647. let { shortStr, longStr } = renderItemWrapper(list, num, '推荐检验')
  648. $(".moduleItem .item[data-index=" + inx + "]").append("<div class='maylis'></div>")
  649. $(".moduleItem .item[data-index=" + inx + "] .maylis").append(shortStr)
  650. $(".moduleItem .item[data-index=" + inx + "] .maylis").append(renderLongStr(titleConfigH["lisPush"].name, longStr, titleConfigH["lisPush"].location))
  651. $(".moduleItem .item[data-index=" + inx + "] .maylis").css("display", "block")
  652. }
  653. }
  654. function renderHasLisPush(list, inx) {
  655. let num, state
  656. for (let i = 0; i < hasdiagnoseList.length; i++) {
  657. const item = hasdiagnoseList[i];
  658. if (item.code == 'maylis') {
  659. num = item.number
  660. state = item.status
  661. }
  662. }
  663. if (list.length > 0 && state != 0) {
  664. moduleNum++
  665. let { shortStr, longStr } = renderItemWrapper(list, num, '推荐检验')
  666. $(".moduleItem .item[data-index=" + inx + "]").append("<div class='haslis'></div>")
  667. $(".moduleItem .item[data-index=" + inx + "] .haslis").append(shortStr)
  668. $(".moduleItem .item[data-index=" + inx + "] .haslis").append(renderLongStr(titleConfigH["lisPush"].name, longStr, titleConfigH["lisPush"].location))
  669. $(".moduleItem .item[data-index=" + inx + "] .haslis").css("display", "block")
  670. }
  671. }
  672. function renderMayPacsPush(list, inx) {
  673. let num, state
  674. for (let i = 0; i < maydiagnoseList.length; i++) {
  675. const item = maydiagnoseList[i];
  676. if (item.code == 'maypacs') {
  677. num = item.number
  678. state = item.status
  679. }
  680. }
  681. if (list.length > 0 && state != 0) {
  682. moduleNum++
  683. let { shortStr, longStr } = renderItemWrapper(list, num, '推荐检查')
  684. $(".moduleItem .item[data-index=" + inx + "]").append("<div class='maypacs'></div>")
  685. $(".moduleItem .item[data-index=" + inx + "] .maypacs").append(shortStr)
  686. $(".moduleItem .item[data-index=" + inx + "] .maypacs").append(renderLongStr(titleConfigH["pacsPush"].name, longStr, titleConfigH["pacsPush"].location))
  687. $(".moduleItem .item[data-index=" + inx + "] .maypacs").css("display", "block")
  688. }
  689. }
  690. function renderHasPacsPush(list, inx) {
  691. let num, state
  692. for (let i = 0; i < hasdiagnoseList.length; i++) {
  693. const item = hasdiagnoseList[i];
  694. if (item.code == 'haspacs') {
  695. num = item.number
  696. state = item.status
  697. }
  698. }
  699. if (list.length > 0 && state != 0) {
  700. moduleNum++
  701. let { shortStr, longStr } = renderItemWrapper(list, num, '推荐检查')
  702. $(".moduleItem .item[data-index=" + inx + "]").append("<div class='haspacs'></div>")
  703. $(".moduleItem .item[data-index=" + inx + "] .haspacs").append(shortStr)
  704. $(".moduleItem .item[data-index=" + inx + "] .haspacs").append(renderLongStr(titleConfigH["pacsPush"].name, longStr, titleConfigH["pacsPush"].location))
  705. $(".moduleItem .item[data-index=" + inx + "] .haspacs").css("display", "block")
  706. }
  707. }
  708. function renderMayScalePush(list, inx) {
  709. let num, state
  710. for (let i = 0; i < maydiagnoseList.length; i++) {
  711. const item = maydiagnoseList[i];
  712. if (item.code == 'mayevaluation') {
  713. num = item.number
  714. state = item.status
  715. }
  716. }
  717. if (list.length > 0 && state != 0) {
  718. moduleNum++
  719. let { shortStr, longStr } = renderItemWrapper(list, num, '推荐量表')
  720. $(".moduleItem .item[data-index=" + inx + "]").append("<div class='mayevaluation'></div>")
  721. $(".moduleItem .item[data-index=" + inx + "] .mayevaluation").append(shortStr)
  722. $(".moduleItem .item[data-index=" + inx + "] .mayevaluation").append(renderLongStr(titleConfigH["scalePush"].name, longStr, titleConfigH["scalePush"].location))
  723. $(".moduleItem .item[data-index=" + inx + "] .mayevaluation").css("display", "block")
  724. }
  725. }
  726. function renderHasScalePush(list, inx) {
  727. let num, state
  728. for (let i = 0; i < hasdiagnoseList.length; i++) {
  729. const item = hasdiagnoseList[i];
  730. if (item.code == 'hasevaluation') {
  731. num = item.number
  732. state = item.status
  733. }
  734. }
  735. if (list.length > 0 && state != 0) {
  736. moduleNum++
  737. let { shortStr, longStr } = renderItemWrapper(list, num, '推荐量表')
  738. $(".moduleItem .item[data-index=" + inx + "]").append("<div class='hasevaluation'></div>")
  739. $(".moduleItem .item[data-index=" + inx + "] .hasevaluation").append(shortStr)
  740. $(".moduleItem .item[data-index=" + inx + "] .hasevaluation").append(renderLongStr(titleConfigH["scalePush"].name, longStr, titleConfigH["scalePush"].location))
  741. $(".moduleItem .item[data-index=" + inx + "] .hasevaluation").css("display", "block")
  742. }
  743. }
  744. function renderMayDisPush(list, inx) {
  745. let num, state
  746. for (let i = 0; i < maydiagnoseList.length; i++) {
  747. const item = maydiagnoseList[i];
  748. if (item.code == 'mayantidias') {
  749. num = item.number
  750. state = item.status
  751. }
  752. }
  753. if (list.length > 0 && state != 0) {
  754. moduleNum++
  755. let { shortStr, longStr } = renderItemWrapper(list, num, '鉴别诊断')
  756. $(".moduleItem .item[data-index=" + inx + "]").append("<div class='mayantidias'></div>")
  757. $(".moduleItem .item[data-index=" + inx + "] .mayantidias").append(shortStr)
  758. $(".moduleItem .item[data-index=" + inx + "] .mayantidias").append(renderLongStr(titleConfigH["scalePush"].name, longStr, titleConfigH["scalePush"].location))
  759. $(".moduleItem .item[data-index=" + inx + "] .mayantidias").css("display", "block")
  760. }
  761. }
  762. function renderHasDisPush(list, inx) {
  763. let num, state
  764. for (let i = 0; i < hasdiagnoseList.length; i++) {
  765. const item = hasdiagnoseList[i];
  766. if (item.code == 'hasantidias') {
  767. num = item.number
  768. state = item.status
  769. }
  770. }
  771. if (list.length > 0 && state != 0) {
  772. moduleNum++
  773. let { shortStr, longStr } = renderItemWrapper(list, num, '鉴别诊断')
  774. $(".moduleItem .item[data-index=" + inx + "]").append("<div class='hasantidias'></div>")
  775. $(".moduleItem .item[data-index=" + inx + "] .hasantidias").append(shortStr)
  776. $(".moduleItem .item[data-index=" + inx + "] .hasantidias").append(renderLongStr(titleConfigH["scalePush"].name, longStr, titleConfigH["scalePush"].location))
  777. $(".moduleItem .item[data-index=" + inx + "] .hasantidias").css("display", "block")
  778. }
  779. }
  780. function renderMayPush(treatPush, medicinesPush, operationsPush, nursePush, inx) {
  781. let generalstate, medicinestate, operationstate, nursestate
  782. for (let i = 0; i < maydiagnoseList.length; i++) {
  783. const item = maydiagnoseList[i];
  784. if (item.code == 'maygeneral') {
  785. generalstate = item.status
  786. } else if (item.code == 'maymedicine') {
  787. medicinestate = item.status
  788. } else if (item.code == 'mayoperation') {
  789. operationstate = item.status
  790. } else if (item.code == 'maynurse') {
  791. nursestate = item.status
  792. }
  793. }
  794. $(".maydiagnose .item[data-index=" + inx + "]").append("<div class='centerBox'></div>")
  795. let str = `<ul>
  796. ${treatPush.length > 0 && generalstate != 0 ? `<li class="general" data-index="0">一般治疗</li>` : ''}
  797. ${medicinesPush.length > 0 && medicinestate != 0 ? `<li class="medicine" data-index="1">推荐用药</li>` : ''}
  798. ${operationsPush.length > 0 && operationstate != 0 ? `<li class="operation" data-index="2">推荐手术/操作</li>` : ''}
  799. ${nursePush.length > 0 && nursestate != 0 ? `<li class="nurse" data-index="3">推荐护理</li>` : ''}
  800. </ul>
  801. <div class="centerBoxItem">
  802. ${treatPush.length > 0 && generalstate != 0 ? `<div class="checkBox generalItem maygeneral" data-index="0"></div>` : ''}
  803. ${medicinesPush.length > 0 && medicinestate != 0 ? `<div class="checkBox medicineItem maymedicine" data-index="1"></div>` : ''}
  804. ${operationsPush.length > 0 && operationstate != 0 ? `<div class="checkBox operationItem mayoperation" data-index="2"></div>` : ''}
  805. ${nursePush.length > 0 && nursestate != 0 ? `<div class="checkBox nurseItem maynurse" data-index="3"></div>` : ''}
  806. </div>`
  807. $(".maydiagnose .item[data-index=" + inx + "] .centerBox").append(str)
  808. renderMayTreatPush(treatPush, inx)
  809. renderMayMedicinesPush(medicinesPush, inx)
  810. renderMayOperationsPush(operationsPush, inx)
  811. renderMayNursePush(nursePush, inx)
  812. $(".maydiagnose .item[data-index=" + inx + "] .centerBox ul li").click(function () {
  813. var i = $(this).index();
  814. if ($(this).hasClass('actives')) {
  815. $(this).removeClass('actives');
  816. $(".maydiagnose .item[data-index=" + inx + "] .checkBox[data-index=" + i + "]").removeClass('onshow');
  817. } else {
  818. $(this).addClass('actives').siblings().removeClass('actives');
  819. $(".maydiagnose .item[data-index=" + inx + "] .checkBox[data-index=" + i + "]").addClass('onshow').siblings().removeClass('onshow');
  820. }
  821. });
  822. }
  823. function renderHasPush(treatPush, medicinesPush, operationsPush, nursePush, inx) {
  824. let generalstate, medicinestate, operationstate, nursestate
  825. for (let i = 0; i < maydiagnoseList.length; i++) {
  826. const item = maydiagnoseList[i];
  827. if (item.code == 'maygeneral') {
  828. generalstate = item.status
  829. } else if (item.code == 'maymedicine') {
  830. medicinestate = item.status
  831. } else if (item.code == 'mayoperation') {
  832. operationstate = item.status
  833. } else if (item.code == 'maynurse') {
  834. nursestate = item.status
  835. }
  836. }
  837. $(".hasdiagnose .item[data-index=" + inx + "]").append("<div class='centerBox'></div>")
  838. let str = `<ul>
  839. ${treatPush.length > 0 && generalstate != 0 ? `<li class="general" data-index="0">一般治疗</li>` : ''}
  840. ${medicinesPush.length > 0 && medicinestate != 0 ? `<li class="medicine" data-index="1">推荐用药</li>` : ''}
  841. ${operationsPush.length > 0 && operationstate != 0 ? `<li class="operation" data-index="2">推荐手术/操作</li>` : ''}
  842. ${nursePush.length > 0 && nursestate != 0 ? `<li class="nurse" data-index="3">推荐护理</li>` : ''}
  843. </ul>
  844. <div class="centerBoxItem">
  845. ${treatPush.length > 0 && generalstate != 0 ? `<div class="checkBox generalItem hasgeneral" data-index="0"></div>` : ''}
  846. ${medicinesPush.length > 0 && medicinestate != 0 ? `<div class="checkBox medicineItem hasmedicine" data-index="1"></div>` : ''}
  847. ${operationsPush.length > 0 && operationstate != 0 ? `<div class="checkBox operationItem hasoperation" data-index="2"></div>` : ''}
  848. ${nursePush.length > 0 && nursestate != 0 ? `<div class="checkBox nurseItem hasnurse" data-index="3"></div>` : ''}
  849. </div>`
  850. $(".hasdiagnose .item[data-index=" + inx + "] .centerBox").append(str)
  851. renderHasTreatPush(treatPush, inx)
  852. renderHasMedicinesPush(medicinesPush, inx)
  853. renderHasOperationsPush(operationsPush, inx)
  854. renderHasNursePush(nursePush, inx)
  855. $(".hasdiagnose .item[data-index=" + inx + "] .centerBox ul li").click(function () {
  856. var i = $(this).attr('data-index');
  857. if ($(this).hasClass('actives')) {
  858. $(this).removeClass('actives');
  859. $(".hasdiagnose .item[data-index=" + inx + "] .checkBox[data-index=" + i + "]").removeClass('onshow');
  860. } else {
  861. $(this).addClass('actives').siblings().removeClass('actives');
  862. $(".hasdiagnose .item[data-index=" + inx + "] .checkBox[data-index=" + i + "]").addClass('onshow').siblings().removeClass('onshow');
  863. console.log(i);
  864. }
  865. });
  866. }
  867. function renderMayTreatPush(list, inx) {
  868. let num, state
  869. for (let i = 0; i < maydiagnoseList.length; i++) {
  870. const item = maydiagnoseList[i];
  871. if (item.code == 'maygeneral') {
  872. num = item.number
  873. state = item.status
  874. }
  875. }
  876. if (list.length > 0 && state != 0) {
  877. let str = ''
  878. for (let i = 0; i < list.length; i++) {
  879. const item = list[i];
  880. str = `${item.generaTreat || ''}`
  881. }
  882. $(".moduleItem .item[data-index=" + inx + "] .maygeneral").append(str)
  883. }
  884. }
  885. function renderHasTreatPush(list, inx) {
  886. let num, state
  887. for (let i = 0; i < hasdiagnoseList.length; i++) {
  888. const item = hasdiagnoseList[i];
  889. if (item.code == 'hasgeneral') {
  890. num = item.number
  891. state = item.status
  892. }
  893. }
  894. let str = ''
  895. if (list.length > 0 && state != 0) {
  896. for (let i = 0; i < list.length; i++) {
  897. const item = list[i];
  898. str = `${item.generaTreat || ''}`
  899. }
  900. $(".moduleItem .item[data-index=" + inx + "] .hasgeneral").append(str)
  901. }
  902. }
  903. function renderMayMedicinesPush(list, inx) {
  904. if (list.length > 0) {
  905. moduleNum++
  906. let { shortStr, longStr } = renderItemWrapper(list, 10)
  907. console.log($(".moduleItem .item[data-index=" + inx + "] .maymedicine"));
  908. $(".moduleItem .item[data-index=" + inx + "] .maymedicine").append(shortStr)
  909. $(".moduleItem .item[data-index=" + inx + "] .maymedicine").append(renderLongStr(titleConfigH["drugPush"].name, longStr, titleConfigH["drugPush"].location))
  910. }
  911. }
  912. function renderHasMedicinesPush(list, inx) {
  913. if (list.length > 0) {
  914. moduleNum++
  915. let { shortStr, longStr } = renderItemWrapper(list, 10)
  916. $(".moduleItem .item[data-index=" + inx + "] .hasmedicine").append(shortStr)
  917. $(".moduleItem .item[data-index=" + inx + "] .hasmedicine").append(renderLongStr(titleConfigH["drugPush"].name, longStr, titleConfigH["drugPush"].location))
  918. }
  919. }
  920. function renderMayOperationsPush(list, inx) {
  921. if (list.length > 0) {
  922. moduleNum++
  923. let { shortStr, longStr } = renderItemWrapper(list, 10)
  924. $(".moduleItem .item[data-index=" + inx + "] .mayoperation").append(shortStr)
  925. $(".moduleItem .item[data-index=" + inx + "] .mayoperation").append(renderLongStr(titleConfigH["operationPush"].name, longStr, titleConfigH["operationPush"].location))
  926. }
  927. }
  928. function renderHasOperationsPush(list, inx) {
  929. if (list.length > 0) {
  930. moduleNum++
  931. let { shortStr, longStr } = renderItemWrapper(list, 10)
  932. $(".moduleItem .item[data-index=" + inx + "] .hasoperation").append(shortStr)
  933. $(".moduleItem .item[data-index=" + inx + "] .hasoperation").append(renderLongStr(titleConfigH["operationPush"].name, longStr, titleConfigH["operationPush"].location))
  934. }
  935. }
  936. function renderMayNursePush(list, inx) {
  937. if (list.length > 0) {
  938. moduleNum++
  939. let { shortStr, longStr } = renderItemWrapper(list, 10)
  940. $(".moduleItem .item[data-index=" + inx + "] .maynurse").append(shortStr)
  941. $(".moduleItem .item[data-index=" + inx + "] .maynurse").append(renderLongStr(titleConfigH["nursePush"].name, longStr, titleConfigH["nursePush"].location))
  942. }
  943. }
  944. function renderHasNursePush(list, inx) {
  945. if (list.length > 0) {
  946. moduleNum++
  947. let { shortStr, longStr } = renderItemWrapper(list, 10)
  948. $(".moduleItem .item[data-index=" + inx + "] .hasnurse").append(shortStr)
  949. $(".moduleItem .item[data-index=" + inx + "] .hasnurse").append(renderLongStr(titleConfigH["nursePush"].name, longStr, titleConfigH["nursePush"].location))
  950. }
  951. }
  952. function renderLis(list, showNum) {
  953. if (list.length > 0 && $(".moduleItem.lis").length > 0) {
  954. moduleNum++
  955. $('.moduleItem.lis .moduleItemTitBox').append(titleStr("lisPush"))
  956. let { shortStr, longStr } = renderItemWrapper(list, showNum)
  957. $('.moduleItem.lis').append(shortStr)
  958. $('.moduleItem.lis').append(renderLongStr(titleConfigH["lisPush"].name, longStr, titleConfigH["lisPush"].location))
  959. $('.moduleItem.lis').css("display", "block")
  960. }
  961. }
  962. function renderScale(list, showNum) {
  963. if (list.length > 0 && $(".moduleItem.evaluation").length > 0) {
  964. moduleNum++
  965. $('.moduleItem.evaluation .moduleItemTitBox').append(titleStr("scalePush"))
  966. let { shortStr, longStr } = renderItemWrapper(list, showNum)
  967. $('.moduleItem.evaluation').append(shortStr)
  968. $('.moduleItem.evaluation').append(renderLongStr(titleConfigH["scalePush"].name, longStr, titleConfigH["scalePush"].location))
  969. $('.moduleItem.evaluation').css("display", "block")
  970. // $('.moduleItem.evaluation').children(".shortBox").children(".pushItemBox").children(".pushItemName").addClass("evaluationtitle")
  971. // $('.moduleItem.evaluation').children(".longStrBox").children(".longBox").children(".pushItemBox").children(".pushItemName").addClass("evaluationtitle")
  972. }
  973. }
  974. function renderNurse(list, showNum) {
  975. if (list.length > 0 && $(".moduleItem.nurse").length > 0) {
  976. moduleNum++
  977. $('.moduleItem.nurse .moduleItemTitBox').append(titleStr("nursePush"))
  978. let { shortStr, longStr } = renderItemWrapper(list, showNum)
  979. $(".moduleItem.nurse").append(shortStr)
  980. $(".moduleItem.nurse").append(renderLongStr(titleConfigH["nursePush"].name, longStr, titleConfigH["nursePush"].location))
  981. $(".moduleItem.nurse").css("display", "block")
  982. }
  983. }
  984. function renderPacs(list, showNum) {
  985. if (list.length > 0 && $(".moduleItem.pacs").length > 0) {
  986. moduleNum++
  987. $('.moduleItem.pacs .moduleItemTitBox').append(titleStr("pacsPush"))
  988. let { shortStr, longStr } = renderItemWrapper(list, showNum)
  989. $(".moduleItem.pacs").append(shortStr)
  990. $(".moduleItem.pacs").append(renderLongStr(titleConfigH["pacsPush"].name, longStr, titleConfigH["pacsPush"].location))
  991. $('.moduleItem.pacs').css("display", "block")
  992. }
  993. }
  994. function renderSymptomPush(list, showNum) {
  995. if (list.length > 0 && $(".moduleItem.symptom").length > 0) {
  996. moduleNum++
  997. $('.moduleItem.symptom .moduleItemTitBox').append(titleStr("symptomPush"))
  998. let { shortStr, longStr } = renderItemWrapper(list, showNum)
  999. $(".moduleItem.symptom").append(shortStr)
  1000. $(".moduleItem.symptom").append(renderLongStr(titleConfigH["symptomPush"].name, longStr, titleConfigH["symptomPush"].location))
  1001. $('.moduleItem.symptom').css("display", "block")
  1002. }
  1003. }
  1004. function renderMedicinesPush(list, showNum) {
  1005. if (list.length > 0 && $(".moduleItem.medicine").length > 0) {
  1006. moduleNum++
  1007. $('.moduleItem.medicine .moduleItemTitBox').append(titleStr("drugPush"))
  1008. let { shortStr, longStr } = renderItemWrapper(list, showNum)
  1009. $(".moduleItem.medicine").append(shortStr)
  1010. $(".moduleItem.medicine").append(renderLongStr(titleConfigH["drugPush"].name, longStr, titleConfigH["drugPush"].location))
  1011. $(".moduleItem.medicine").css("display", "block")
  1012. }
  1013. }
  1014. function renderOperationPush(list, showNum) {
  1015. if (list.length > 0 && $(".moduleItem.operation").length > 0) {
  1016. moduleNum++
  1017. $('.moduleItem.operation .moduleItemTitBox').append(titleStr("operationPush"))
  1018. let { shortStr, longStr } = renderItemWrapper(list, showNum)
  1019. $(".moduleItem.operation").append(shortStr)
  1020. $(".moduleItem.operation").append(renderLongStr(titleConfigH["operationPush"].name, longStr, titleConfigH["operationPush"].location))
  1021. $(".moduleItem.operation").css("display", "block")
  1022. }
  1023. }
  1024. function renderDisName() {
  1025. $(".disName").append(`${treatDisName || ''}`)
  1026. }
  1027. function rendergeneraTreatPush(list) {
  1028. if (list && list.length > 0 && $(".moduleItem.general").length > 0) {
  1029. moduleNum++
  1030. $('.moduleItem.general .moduleItemTitBox').append(titleStr("generaTreatPush"))
  1031. let str = `<div class="generalTreatInfo clearfix isOverFlow">${list}</div>`
  1032. $(".moduleItem.general").append(str)
  1033. setTimeout(function () {
  1034. let generaTreatHei = $(".moduleItem .generalTreatInfo")[0].scrollHeight
  1035. if (generaTreatHei > 60) {
  1036. $(".moduleItem .generalTreatInfo").append(`<span class="showMoreGeneralTreat">更多</span>`)
  1037. bindGeneralSlide()
  1038. }
  1039. })
  1040. console.log($(".generalTreatInfo").text())
  1041. $(".moduleItem.general").css("display", "block")
  1042. }
  1043. }
  1044. function renderCheckup(list, showNum) {
  1045. if (list.length > 0 && $(".moduleItem.vital").length > 0) {
  1046. moduleNum++
  1047. $(".moduleItem.vital .moduleItemTitBox").append(titleStr("checkupPush"))
  1048. let { shortStr, longStr } = renderItemWrapper(list, showNum)
  1049. $(".moduleItem.vital").append(shortStr)
  1050. $(".moduleItem.vital").append(renderLongStr(titleConfigH["checkupPush"].name, longStr, titleConfigH["checkupPush"].location))
  1051. $('.moduleItem.vital').css("display", "block")
  1052. }
  1053. }
  1054. function renderDiag(diagPush) {
  1055. let possibleDiagPush = diagPush["可能诊断"] || []
  1056. let firstDiagPush = diagPush["既往诊断"] || []
  1057. let identifyDiagPush = diagPush["鉴别诊断"] || []
  1058. let warningDiagPush = diagPush["警惕"] || []
  1059. let number = $('.moduleItem.diag').attr("data-num") || 5
  1060. let warnNumber = $('.moduleItem.warning').attr("data-num") || 5
  1061. $('.moduleItem.diag .moduleItemTitBox').append(titleStr("diagPush"))
  1062. renderDiagItem(possibleDiagPush, "可能诊断", number)
  1063. renderDiagItem(firstDiagPush, "既往诊断", number)
  1064. renderDiagItem(identifyDiagPush, "鉴别诊断", number)
  1065. renderWarningDiag(warningDiagPush, "警惕", 1000)
  1066. moreInfo()
  1067. }
  1068. function renderDiagItem(list, name, number) {
  1069. if (list.length === 0) {
  1070. return
  1071. }
  1072. let titleStr = `<span class="moduleBoxName">${name}</span>`
  1073. let { shortStr, longStr } = renderItemWrapper(list, number)
  1074. let boxStr = `<div class="moduleBox">
  1075. ${titleStr}
  1076. ${shortStr}
  1077. </div>`
  1078. $(".diag").append(boxStr)
  1079. $(".diag").append(renderLongStr(name, longStr, "left"))
  1080. $('.moduleItem.diag').css("display", "block")
  1081. }
  1082. function renderWarningDiag(list, name, showNum) {
  1083. if (list.length > 0 && $(".moduleItem.warning").length > 0) {
  1084. moduleNum++
  1085. $('.moduleItem.warning .moduleItemTitBox').append(titleStr("vigilancePush"))
  1086. let { shortStr, longStr } = renderItemWrapper(list, showNum)
  1087. $('.moduleItem.warning').append(shortStr)
  1088. $('.moduleItem.warning').css("display", "block")
  1089. }
  1090. }
  1091. function renderwriteStandardPage(list) {
  1092. if (list.length > 0 && $(".moduleItem.casewriting").length > 0) {
  1093. moduleNum++
  1094. $(".moduleItem.casewriting .moduleItemTitBox").append(titleStr("casewritingPush"))
  1095. let str = ``
  1096. for (let i = 0; i < list.length; i++) {
  1097. str += `<p>${list[i]}</p>`
  1098. }
  1099. $(".moduleItem.casewriting").append(str)
  1100. $('.moduleItem.casewriting').css("display", "block")
  1101. }
  1102. empty()
  1103. }
  1104. function renderPushWarning() {
  1105. return getPusgWarning().then(res => {
  1106. hasCompleteTnterface++
  1107. if (res.data.code == '0') {
  1108. const result = res.data.data;
  1109. let billMsgList = result.billMsgList || [] //开单合理性提醒
  1110. let highRiskList = result.highRiskList || [] //高危药品、手术
  1111. let criticalValList = result.criticalValList || [] //危急值提醒
  1112. let noteList = result.noteList || [] //检查内容注意事项
  1113. let dubugStr = result.dubugStr || [] //注意调试信息
  1114. let otherList = result.otherList || [] //其他提醒
  1115. // let nurseList = result.nurseList || [] //推荐护理
  1116. let nurseList = [{
  1117. content: null,
  1118. msg: "自己填写的建议-高血压",
  1119. orderDetailName: null,
  1120. orderName: "高血压",
  1121. orderStandName: "高血压",
  1122. staticList: ["新生儿口腔护理", "婴幼儿口服给药"],
  1123. type: null,
  1124. },{
  1125. content: null,
  1126. msg: "自己填写的建议-高血压",
  1127. orderDetailName: null,
  1128. orderName: "高血压",
  1129. orderStandName: "高血压",
  1130. staticList: ["新生儿口腔护理", "婴幼儿口服给药"],
  1131. type: null,
  1132. },{
  1133. content: null,
  1134. msg: "自己填写的建议-高血压",
  1135. orderDetailName: null,
  1136. orderName: "高血压",
  1137. orderStandName: "高血压",
  1138. staticList: ["新生儿口腔护理", "婴幼儿口服给药"],
  1139. type: null,
  1140. },{
  1141. content: null,
  1142. msg: "自己填写的建议-高血压",
  1143. orderDetailName: null,
  1144. orderName: "高血压",
  1145. orderStandName: "高血压",
  1146. staticList: ["新生儿口腔护理", "婴幼儿口服给药"],
  1147. type: null,
  1148. }]
  1149. renderBillingPush(billMsgList, '开单合理性', 'rationali')
  1150. renderBillingPush(highRiskList, '高风险提示', 'highrisk')
  1151. renderBillingPush(criticalValList, '危急值提醒', 'crivalue')
  1152. renderBillingPush(noteList, '检查注意事项')
  1153. renderBillingPush(otherList, '其他提醒', 'otherremind')
  1154. renderBillingNursePush(nurseList, '推荐护理', 'nurse')
  1155. const codes = ($(".rationali.tips").length ? 'rationali,' : "") + ($(".highrisk.tips").length ? 'highrisk,' : "") + ($(".crivalue.tips").length ? 'crivalue,' : "") + ($(".otherremind.tips").length ? 'otherremind' : "");
  1156. $(".moduleItem.tips").wrapAll("<div class='tips-cont' codes=" + codes + "></div>");
  1157. $('.tips-cont').append(titleStr('warning'))
  1158. moreInfo()
  1159. const hasTipsNum = $(".moduleItem.tips").length;
  1160. console.log(hasTipsNum,112);
  1161. if (hasTipsNum) {
  1162. let tipNum = $(".tips-cont .billingPushItem").length;
  1163. if (tipNum > 3) {
  1164. $(".tips-cont").append(`<span class="showMoreNewPage">更多</span>`)
  1165. tipsMsg = result
  1166. showMoreNewPage()
  1167. }
  1168. }
  1169. // renderBillingPush(dubugStr,'注意调试信息')
  1170. }
  1171. if (hasCompleteTnterface === allInterface) {
  1172. $('.loading').css("display", "none")
  1173. /*if (moduleNum === 0) {//console.log(999)
  1174. empty()
  1175. }*/
  1176. }
  1177. empty()
  1178. }).catch(() => {
  1179. $(".loading").hide()
  1180. })
  1181. }
  1182. function renderBillingPush(list, name, code) {
  1183. if (list.length === 0) {
  1184. return
  1185. }
  1186. let str = ``
  1187. for (let i = 0; i < list.length; i++) {
  1188. str += `<div class="billingPushItem">${list[i].msg}</div>`
  1189. }
  1190. let titleStr = `<span class="moduleBoxName">${name}</span>`
  1191. let boxStr = `<div class="moduleBox">
  1192. ${titleStr}
  1193. ${str}
  1194. </div>`
  1195. $("." + code).append(boxStr)
  1196. $('.moduleItem.' + code).addClass("tips").attr("code", code).css("display", "block")
  1197. }
  1198. function renderBillingNursePush(list) {
  1199. if (list.length > 0 && $(".moduleItem.nurse").length > 0) {
  1200. moduleNum++
  1201. $('.moduleItem.nurse .moduleItemTitBox').append(titleStr("nursePush"))
  1202. let str = ``
  1203. for (let i = 0; i < list.length; i++) {
  1204. str += `<div class="billingPushItem">${list[i].msg}</div>`
  1205. }
  1206. let titStr = `<span class="moduleBoxName">${name}</span>`
  1207. let boxStr = `<div class="moduleBox">
  1208. ${titStr}
  1209. ${str}
  1210. </div>`
  1211. $(".moduleItem.nurse").append(boxStr)
  1212. $(".moduleItem.nurse").css("display", "block")
  1213. let tipNum = $(".nurse .billingPushItem").length;
  1214. if (tipNum > 3) {
  1215. $(".nurse").append(`<span class="showMoreNewPage">更多</span>`)
  1216. showMoreNewPage()
  1217. }
  1218. }
  1219. }
  1220. function renderLongStr(name, longStr, location) {
  1221. if (!longStr) {
  1222. return
  1223. }
  1224. let str = `
  1225. <div class="longStrBox" data-location="${location}">
  1226. <span class="longStrBoxTitle">${name}:</span>
  1227. ${longStr}
  1228. </div>
  1229. `
  1230. return str
  1231. }
  1232. function renderItemWrapper(list, showNum, name, type) {
  1233. let showNum1 = showNum || 5
  1234. let shortStr = '', longStr = ''
  1235. for (let i = 0; i < list.length; i++) {
  1236. if (i <= showNum1 - 1) {
  1237. shortStr += type == 1 || type == 2 ? renderPushItem2(list[i], i) : renderPushItem(list[i], i)
  1238. }
  1239. longStr += type || type == 2 ? renderPushItem2(list[i], i) : renderPushItem(list[i], i)
  1240. }
  1241. if (showNum1 >= list.length) {
  1242. return {
  1243. shortStr: `<div class="shortBox"><span>${name ? name + ':' : ''}</span>${shortStr}</div>`,
  1244. longStr: ''
  1245. }
  1246. } else {
  1247. shortStr += `<span class="showMore"> <img class="iconArrowImg" src="${showImg}"></span>`
  1248. longStr += `<span class="showLess"><img class="iconArrowImg" src="${collapseImg}"></span>`
  1249. return {
  1250. shortStr: `<div class="shortBox clearfix"><span>${name ? name + ':' : ''}</span>${shortStr}</div>`,
  1251. longStr: `<div class="longBox clearfix"<span>${name ? name + ':' : ''}</span>${longStr}</div>`
  1252. }
  1253. }
  1254. }
  1255. function renderPushItem(item, i) {
  1256. str = `<span class="pushItemBox" data-name="${item.name}" data-type="${item.type}" data-index="${i}">`
  1257. str += `${item.hasScale == "0" ? `<span class="pushItemName">${item.type == 8 ? ('【' + item.name + '】') : item.name}</span>` : item.hasScale == "1" ? `<span class="pushItemName evaluationtitle">${item.type == 8 ? ('【' + item.name + '】') : item.name}</span>` : `<span class="pushItemName">${item.type == 8 ? ('【' + item.name + '】') : item.name}</span>`}`
  1258. str += `${item.hasInfo == "1" ? `<img class="infoImg" src="${infoImg}">` : ""}`
  1259. str += '</span >'
  1260. return str
  1261. }
  1262. function renderPushItem2(item, i) {
  1263. str = `<span class="pushItemBox" data-name="${item.name}" data-type="${item.type}" data-index="${i}">`
  1264. str += `${item.hasScale == "0" ? `<span class="pushItemName" title="${item.name}">${item.type == 8 ? ('【' + item.name + '】') : item.name}</span>` : item.hasScale == "1" ? `<span class="pushItemName evaluationtitle" title="${item.name}">${item.type == 8 ? ('【' + item.name + '】') : item.name}</span>` : `<span class="pushItemName" title="${item.name}">${item.type == 8 ? ('【' + item.name + '】') : item.name}</span>`}`
  1265. str += `${item.hasInfo == "1" ? `<img class="infoImg" src="${infoImg}">` : ""}`
  1266. str += '</span >'
  1267. return str
  1268. }
  1269. function bindOpenInfo() {
  1270. $(".infoImg").on("mouseenter", function () {
  1271. $(this).attr("src", infoImgOn)
  1272. }).on("mouseleave", function () {
  1273. $(this).attr("src", infoImg)
  1274. })
  1275. }
  1276. function titleStr(type) {
  1277. console.log(type);
  1278. let titleStr = ''
  1279. console.log(titleConfigH[type].icon);
  1280. titleStr += `<div class="moduleTitle"><img class="titleIcon" src=${titleConfigH[type].icon}>${titleConfigH[type].name}:</div>`
  1281. return titleStr
  1282. }
  1283. function bindSlide() {
  1284. $(".showMore").off("click").on("click", function () {
  1285. const longBox = $(this).parent().next().length ? $(this).parent().next() : $(this).parent().parent().next();
  1286. console.log(longBox);
  1287. $(".longStrBox").css("display", "none")
  1288. longBox.css("display", "block")
  1289. let location = longBox.attr("data-location")
  1290. let scrollTop = getLongTop(location)
  1291. const n = Number(scrollTop) - 2 > -1 ? Number(scrollTop) - 2 : 0;
  1292. longBox.css("top", n + "px")
  1293. })
  1294. $(".showLess").off("click").on("click", function () {
  1295. $(this).parent().parent().css("display", "none")
  1296. })
  1297. addScrollEvent()
  1298. }
  1299. function showMoreNewPage() {
  1300. const codes = $(".tips-cont").attr("codes");
  1301. $(".showMoreNewPage").on("click", function () {
  1302. // openNewWin(`smartAlert.html?billMsgList=${encodeURIComponent(billMsgList)}&highRiskList=${encodeURIComponent(highRiskList)}&criticalValList=${encodeURIComponent(criticalValList)}&noteList=${encodeURIComponent(noteList)}`)
  1303. openNewWin(`smartAlert.html?mrId=${mrId}&hospitalId=${hospitalIdUrl}&codes=` + codes);
  1304. })
  1305. }
  1306. function showMoreCaseWrite() {
  1307. $(".showMoreCaseWrite").on("click", function () {
  1308. // openNewWin(`smartAlert.html?billMsgList=${encodeURIComponent(billMsgList)}&highRiskList=${encodeURIComponent(highRiskList)}&criticalValList=${encodeURIComponent(criticalValList)}&noteList=${encodeURIComponent(noteList)}`)
  1309. openNewWin(`caseWriteStandard.html?caseWriteStandradList=${encodeURIComponent(JSON.stringify(caseWriteStandradList))}`)
  1310. })
  1311. }
  1312. function bindGeneralSlide() {
  1313. $(".showMoreGeneralTreat").on("click", function () {
  1314. openNewWin(`generalTreat.html?disName=${treatDisName}&name=${treatUniqueName}`)
  1315. })
  1316. }
  1317. /*function setWidth() {
  1318. let winWidth = $(".bodyWrap").css("width")
  1319. $(".contentBox").css("width", winWidth)
  1320. }*/
  1321. //医学知识搜索
  1322. searchMedical()
  1323. function searchMedical() {
  1324. $(".medicalKonwledgeWrap .search").on("click", function () {
  1325. openNewWin(`homeStatic.html?mrId=${mrId}&hospitalId=${hospitalIdUrl}&planCode=${planCode}`)
  1326. })
  1327. }
  1328. function moreInfo() {
  1329. $('.infoImg').off("click").click(function () {
  1330. const name = $(this).parent().attr('data-name')
  1331. const type = $(this).parent().attr('data-type')
  1332. openNewWin(`staticInfo.html?type=${encodeURIComponent(type)}&position=0&name=${encodeURIComponent(name)}`)
  1333. })
  1334. $('.evaluationtitle').off("click").click(function () {
  1335. const name = $(this).parent().attr('data-name')
  1336. const type = $(this).parent().attr('data-type')
  1337. openNewWin(`staticInfo.html?type=${encodeURIComponent(type)}&position=0&name=${encodeURIComponent(name)}&page=1&gauge=gauge`)
  1338. })
  1339. }
  1340. function pushItemName() {
  1341. $('.pushItemName').off("click").click(function () {
  1342. console.log(11)
  1343. const name = $(this).parent().attr('data-name')
  1344. const type = $(this).parent().attr('data-type')
  1345. console.log(name)
  1346. openNewWin(`staticInfo.html?type=${encodeURIComponent(type)}&position=0&name=${encodeURIComponent(name)}`)
  1347. })
  1348. }
  1349. function getVersion() {
  1350. return post(config.getVersion, 'confArr').then((res) => {
  1351. const data = res.data.data;
  1352. const ver = localStorage.getItem('versionTime');
  1353. const time = data.refreshTime;
  1354. if (!ver || (ver !== time + "=new")) { //判断版本是否更新
  1355. $(".versionWrapper").append('<span class="versionNew"></span>');
  1356. localStorage.setItem('versionTime', time + "=new"); //保存版本更新时间
  1357. } else {
  1358. $(".versionNew").remove();
  1359. }
  1360. })
  1361. }
  1362. function getLongTop(type) {
  1363. let scrollTop = 0
  1364. if (type === "left") {
  1365. scrollTop = $(".leftWrapper").scrollTop() || 0
  1366. } else if (type === "right") {
  1367. scrollTop = $(".rightWrapper").scrollTop() || 0
  1368. }
  1369. return scrollTop
  1370. }
  1371. function addScrollEvent() {
  1372. $(`.leftWrapper`).off("scroll").scroll(throttle(function () {
  1373. if ($(".leftWrapper .longStrBox:visible").length) {
  1374. const n = Number(getLongTop("left")) - 10 > -1 ? (Number(getLongTop("left")) - 10) : 0;
  1375. $(".leftWrapper .longStrBox:visible").css("top", Number(getLongTop("left")) - 2 + "px")
  1376. }
  1377. }, 100));
  1378. $(`.rightWrapper`).off("scroll").scroll(throttle(function () {
  1379. if ($(".rightWrapper .longStrBox:visible").css("display") === "block") {
  1380. const n = Number(getLongTop("right")) > -1 ? (Number(getLongTop("right"))) : 0;
  1381. $(".rightWrapper .longStrBox:visible").css("top", n + "px")
  1382. }
  1383. }, 100));
  1384. }
  1385. $(function () {//隐藏logo
  1386. if (getUrlArgObject("hideLg")) {
  1387. $(".versionTop .logoTxt").hide();
  1388. }
  1389. getVersion()
  1390. $(".versionTop").on("click", function () {
  1391. openNewWin("disclaimer.html")
  1392. });
  1393. $(".versionBottom").on("click", function () {
  1394. const ver = localStorage.getItem('versionTime');
  1395. $(".versionBottom").removeClass('new-icon');
  1396. localStorage.setItem('versionTime', ver.replace("=new", ""));
  1397. openNewWin("version.html");
  1398. });
  1399. })
  1400. // function empty(){
  1401. // $(".responsibility").css("display","none")
  1402. // $('.recommendWrap .empty').css("display","block")
  1403. // }