ribao.js 57 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880
  1. function ribao_init() {
  2. //lingyun
  3. $('#btnRB').on('click', function () {
  4. window.location.href = "/yeweihui/home.html";
  5. });
  6. $("#js_input_gzzd").select({
  7. title: "选择工作驻地",
  8. items: [
  9. {
  10. title: "武汉市",
  11. value: "1",
  12. },
  13. {
  14. title: "宜昌市",
  15. value: "2",
  16. },
  17. {
  18. title: "当阳市",
  19. value: "3",
  20. },
  21. {
  22. title: "其它地点",
  23. value: "4",
  24. }]
  25. });
  26. $("#js_input_jrszd").select({
  27. title: "选择今晚住地",
  28. items: [
  29. {
  30. title: "武汉市",
  31. value: "1",
  32. }, {
  33. title: "宜昌市",
  34. value: "2",
  35. },
  36. {
  37. title: "当阳市",
  38. value: "3",
  39. },
  40. {
  41. title: "其它地点",
  42. value: "4",
  43. }]
  44. });
  45. $("#js_input_sf").select({
  46. title: "",
  47. items: [
  48. {
  49. title: "否",
  50. value: "0",
  51. },
  52. {
  53. title: "是",
  54. value: "1",
  55. }]
  56. });
  57. $("#js_input_cfd").select({
  58. title: "选择出发地",
  59. items: [
  60. {
  61. title: "武汉市",
  62. value: "1",
  63. }, {
  64. title: "宜昌市",
  65. value: "2",
  66. },
  67. {
  68. title: "当阳市",
  69. value: "3",
  70. },
  71. {
  72. title: "其它地点",
  73. value: "4",
  74. }]
  75. });
  76. $("#js_input_mdd").select({
  77. title: "选择目的地",
  78. items: [
  79. {
  80. title: "武汉市",
  81. value: "1",
  82. }, {
  83. title: "宜昌市",
  84. value: "2",
  85. },
  86. {
  87. title: "当阳市",
  88. value: "3",
  89. },
  90. {
  91. title: "其它地点",
  92. value: "4",
  93. }]
  94. });
  95. $("#js_input_cxfs").select({
  96. title: "选择出行方式",
  97. items: [
  98. {
  99. title: "长途汽车",
  100. value: "1",
  101. },
  102. {
  103. title: "火车",
  104. value: "2",
  105. },
  106. {
  107. title: "飞机",
  108. value: "3",
  109. },
  110. {
  111. title: "自驾",
  112. value: "4",
  113. }]
  114. });
  115. // $("#js_input_user_sex").val(getGreder(2)); //设置初始值
  116. $('#btnRB').on('click', function () {
  117. window.location.href = "/yeweihui/home.html";
  118. });
  119. $("#js_input_user_sex").select({
  120. title: "选择性别",
  121. items: [
  122. {
  123. title: "男",
  124. value: "1",
  125. },
  126. {
  127. title: "女",
  128. value: "2",
  129. }]
  130. });
  131. $("#js_input_user_status").select({
  132. title: "选择基本状况",
  133. items: [
  134. {
  135. title: "无病史",
  136. value: "0",
  137. }, {
  138. title: "心脑血管疾病(服用ARB)",
  139. value: "1",
  140. },
  141. {
  142. title: "心脑血管疾病(未服ARB)",
  143. value: "2",
  144. },
  145. {
  146. title: "呼吸系统病史",
  147. value: "3",
  148. },
  149. {
  150. title: "肿瘤病史",
  151. value: "4",
  152. },
  153. {
  154. title: "糖尿病史",
  155. value: "5",
  156. },
  157. {
  158. title: "服用过激素药物",
  159. value: "6",
  160. },
  161. {
  162. title: "妊娠期",
  163. value: "7",
  164. }]
  165. });
  166. $("#js_input_user_kesou").select({
  167. title: "选择咳嗽情况",
  168. items: [
  169. {
  170. title: "无咳嗽",
  171. value: "0",
  172. },
  173. {
  174. title: "偶有短暂咳嗽",
  175. value: "1",
  176. },
  177. {
  178. title: "咳嗽轻度影响生活",
  179. value: "2",
  180. },
  181. {
  182. title: "咳嗽严重影响生活",
  183. value: "3",
  184. }]
  185. });
  186. $("#js_input_user_jirou").select({
  187. title: "选择肌肉情况",
  188. items: [
  189. {
  190. title: "无",
  191. value: "0",
  192. },
  193. {
  194. title: "按压有",
  195. value: "1",
  196. },
  197. {
  198. title: "偶尔",
  199. value: "2",
  200. },
  201. {
  202. title: "持续有",
  203. value: "3",
  204. }]
  205. });
  206. $("#js_input_user_huxi").select({
  207. title: "选择呼吸情况",
  208. items: [
  209. {
  210. title: "无",
  211. value: "0",
  212. },
  213. {
  214. title: "急走或上坡气短",
  215. value: "1",
  216. },
  217. {
  218. title: "气短而走路变慢",
  219. value: "2",
  220. },
  221. {
  222. title: "走路数分钟后气短",
  223. value: "3",
  224. },
  225. {
  226. title: "气短无法离开房间",
  227. value: "4",
  228. }]
  229. });
  230. $("#js_input_user_fali").select({
  231. title: "选择乏力情况",
  232. items: [
  233. {
  234. title: "无",
  235. value: "0",
  236. },
  237. {
  238. title: "体力劳动后不能恢复",
  239. value: "1",
  240. },
  241. {
  242. title: "轻体力活非常累",
  243. value: "2",
  244. },
  245. {
  246. title: "不能正常生活",
  247. value: "3",
  248. }]
  249. });
  250. $("#js_input_user_fuxie").select({
  251. title: "选择腹泻情况",
  252. items: [
  253. {
  254. title: "无",
  255. value: "0",
  256. },
  257. {
  258. title: "轻度腹泻(少于3次)",
  259. value: "1",
  260. },
  261. {
  262. title: "中度腹泻(4-6次)",
  263. value: "2",
  264. },
  265. {
  266. title: "重度腹泻(超过6次)",
  267. value: "3",
  268. }]
  269. });
  270. // $("#switchQuezhen").select({
  271. // title: "选择是否确诊",
  272. // items: [
  273. // {
  274. // title: "否",
  275. // value: "0",
  276. // },
  277. // {
  278. // title: "是",
  279. // value: "1",
  280. // }]
  281. // });
  282. $("#switchQuezhen").select({
  283. title: "选择症状",
  284. items: [
  285. {
  286. title: "无",
  287. value: "0",
  288. },
  289. {
  290. title: "新冠确诊",
  291. value: "1",
  292. },
  293. {
  294. title: "新冠疑似",
  295. value: "2",
  296. },
  297. {
  298. title: "密切接触者",
  299. value: "3",
  300. },
  301. {
  302. title: "解除观察",
  303. value: "4",
  304. }]
  305. });
  306. $("#switchDanjiangeli").select({
  307. title: "选择是否单间隔离",
  308. items: [
  309. {
  310. title: "否",
  311. value: "0",
  312. },
  313. {
  314. title: "是",
  315. value: "1",
  316. }]
  317. });
  318. //
  319. // updateSuspected({
  320. // userName : 'www',
  321. // grender : 2,
  322. // age : 34,
  323. // familyStatus : 1,
  324. // statusDesp : "",
  325. // medical:0,
  326. // singleRoom:1,
  327. // temperature:0,
  328. // cough:2,
  329. // muscle:1,
  330. // dyspnea:1,
  331. // fatigue:1,
  332. // diarrhea:2,
  333. // others:""
  334. // })
  335. //
  336. // var grender = $("#js_input_user_sex").attr("data-values") == undefined ? 0 : $("#js_input_user_sex").attr("data-values");
  337. // console.log("grender:" + grender)
  338. }
  339. function selectinput1(obj) {
  340. var grender = $("#js_input_gzzd").attr("data-values") == undefined ? 0 : $("#js_input_gzzd").attr("data-values");
  341. if (grender != 4) {//js_input_qtdd
  342. // $('#js_input_qtdd')[0].disabled == 'disabled'
  343. $('#js_input_qtdd').attr("disabled", "disabled");
  344. $("#js_input_qtdd").val("");
  345. } else {
  346. $('#js_input_qtdd').removeAttr("disabled")
  347. }
  348. }
  349. function selectinput2(obj) {
  350. var grender = $("#js_input_jrszd").attr("data-values") == undefined ? 0 : $("#js_input_jrszd").attr("data-values");
  351. if (grender != 4) {//js_input_qtdd
  352. // $('#js_input_qtdd')[0].disabled == 'disabled' js_input_jrszq
  353. $('#js_input_jrszq').attr("disabled", "disabled");
  354. $("#js_input_jrszq").val("");
  355. } else {
  356. $('#js_input_jrszq').removeAttr("disabled")
  357. }
  358. }
  359. function selectinput3(obj) {
  360. var grender = $("#js_input_cfd").attr("data-values") == undefined ? 0 : $("#js_input_cfd").attr("data-values");
  361. if (grender != 4) {
  362. $('#js_input_cfdq').attr("disabled", "disabled");
  363. $("#js_input_cfdq").val("");
  364. } else {
  365. $('#js_input_cfdq').removeAttr("disabled")
  366. }
  367. }
  368. function selectinput4(obj) {
  369. var grender = $("#js_input_mdd").attr("data-values") == undefined ? 0 : $("#js_input_mdd").attr("data-values");
  370. if (grender != 4) {
  371. $('#js_input_mddq').attr("disabled", "disabled");
  372. $("#js_input_mddq").val("");
  373. } else {
  374. $('#js_input_mddq').removeAttr("disabled")
  375. }
  376. }
  377. function selectinput5(obj) {
  378. var grender = $("#js_input_cxfs").attr("data-values") == undefined ? 0 : $("#js_input_cxfs").attr("data-values");
  379. if (grender == 4) {
  380. // $('#js_input_cxfsq').attr("disabled","disabled")
  381. } else {
  382. $('#js_input_cxfsq').removeAttr("disabled")
  383. }
  384. }
  385. var listcx = [];
  386. function selectinput6(obj) {
  387. var grender = $("#js_input_sf").attr("data-values") == undefined ? 3 : $("#js_input_sf").attr("data-values");
  388. if (grender == 0) {
  389. $('#none')[0].style.display = 'none';
  390. $("#js_input_cfd").val("");
  391. $("#js_input_cfd").attr("data-values", "");
  392. $("#js_input_mdd").val("");
  393. $("#js_input_mdd").attr("data-values", "");
  394. $("#js_input_cxfs").val("");
  395. $("#js_input_cxfs").attr("data-values", "");
  396. $('#js_input_cxfsq').val("");
  397. $('#js_input_cfdq').val("");
  398. $('#js_input_mddq').val("");
  399. listcx.splice(0, listcx.length);
  400. $('#tabtr').empty();
  401. } else if (grender == 1) {
  402. $('#none')[0].style.display = '';
  403. }
  404. }
  405. //添加出行详情
  406. function insertlingyun() {
  407. var sf = $("#js_input_sf").attr("data-values") == undefined ? 3 : $("#js_input_sf").attr("data-values");
  408. if (sf == 0 || sf == 3) {
  409. $.alert("请选择是否出行");
  410. return;
  411. }
  412. var person = new Object();
  413. var cxfs = $("#js_input_cxfs").attr("data-values") == undefined ? 0 : $("#js_input_cxfs").attr("data-values");
  414. var jrszd = $("#js_input_jrszd").attr("data-values") == undefined ? 0 : $("#js_input_jrszd").attr("data-values");
  415. var cfd = $("#js_input_cfd").attr("data-values") == undefined ? 0 : $("#js_input_cfd").attr("data-values");
  416. var mdd = $("#js_input_mdd").attr("data-values") == undefined ? 0 : $("#js_input_mdd").attr("data-values");
  417. var jrszq = $('#js_input_jrszq').val();
  418. var mddq = $('#js_input_mddq').val();
  419. if (mdd != jrszd) {
  420. $.alert("目的地与今晚住地不一致");
  421. return;
  422. }
  423. if (jrszq != mddq) {
  424. $.alert("目的地与今晚住地不一致");
  425. return;
  426. }
  427. var cxfsq = $('#js_input_cxfsq').val();
  428. var cfdq = $('#js_input_cfdq').val();
  429. for (var i = 0; i < listcx.length; i++) {
  430. if (listcx[i].tripTypeDesp == cxfsq && listcx[i].tripType == cxfs && listcx[i].startLocal == cfd && listcx[i].startLocalOther == cfdq && listcx[i].endLocal == mdd && listcx[i].endLocalOther == mddq) {
  431. $.alert("此行程已添加");
  432. return;
  433. }
  434. }
  435. if (cxfs != 4 && cxfs != 0) {
  436. var val = $('#js_input_cxfsq').val();
  437. if (val == "") {
  438. $.alert("请填写车次/航班/车牌");
  439. return;
  440. }
  441. person.tripTypeDesp = $('#js_input_cxfsq').val();
  442. if (cxfs == 1) {
  443. person.tripType = 1;
  444. person.tripTypeStr = "长途汽车"
  445. } else if (cxfs == 2) {
  446. person.tripType = 2;
  447. person.tripTypeStr = "火车";
  448. } else if (cxfs == 3) {
  449. person.tripType = 3;
  450. person.tripTypeStr = "飞机";
  451. }
  452. } else if (cxfs == 0) {
  453. $.alert("请选择出行方式");
  454. return;
  455. } else if (cxfs == 4) {
  456. var val6 = $('#js_input_cxfsq').val();
  457. if (val6 == "") {
  458. $.alert("请填写车次/航班/车牌");
  459. return;
  460. }
  461. person.tripTypeStr = "自驾";
  462. person.tripType = 4;
  463. person.tripTypeDesp = $('#js_input_cxfsq').val();
  464. }
  465. if (cfd == 4 && cfd != 0) {
  466. var val2 = $('#js_input_cfdq').val();
  467. if (val2 == "") {
  468. $.alert("请填写出发地");
  469. return;
  470. }
  471. person.startLocal = 4;
  472. person.startLocalOther = $('#js_input_cfdq').val();
  473. person.startLocalStr = $('#js_input_cfdq').val();
  474. } else if (cfd != 4 && cfd != 0) {
  475. if (cfd == 1) {
  476. person.startLocal = 1;
  477. person.startLocalStr = "武汉市";
  478. person.startLocalOther = $('#js_input_cfdq').val() == undefined ? "" : $('#js_input_cfdq').val();
  479. } else if (cfd == 2) {
  480. person.startLocal = 2;
  481. person.startLocalStr = "宜昌市";
  482. person.startLocalOther = $('#js_input_cfdq').val() == undefined ? "" : $('#js_input_cfdq').val();
  483. } else if (cfd == 3) {
  484. person.startLocal = 3;
  485. person.startLocalStr = "当阳市";
  486. person.startLocalOther = $('#js_input_cfdq').val() == undefined ? "" : $('#js_input_cfdq').val();
  487. }
  488. } else if (cfd == 0) {
  489. $.alert("请选择出发地");
  490. return;
  491. }
  492. if (mdd == 4 && mdd != 0) {
  493. var val3 = $('#js_input_mddq').val();
  494. if (val3 == "") {
  495. $.alert("请填写目的地");
  496. return;
  497. }
  498. person.endLocal = 4;
  499. person.endLocalOther = $('#js_input_mddq').val();
  500. person.endlocalStr = $('#js_input_mddq').val();
  501. } else if (mdd != 4 && mdd != 0) {
  502. if (mdd == 1) {
  503. person.endLocal = 1;
  504. person.endlocalStr = "武汉市";
  505. person.endLocalOther = $('#js_input_mddq').val() == undefined ? "" : $('#js_input_mddq').val();
  506. } else if (mdd == 2) {
  507. person.endLocal = 2;
  508. person.endlocalStr = "宜昌市";
  509. person.endLocalOther = $('#js_input_mddq').val() == undefined ? "" : $('#js_input_mddq').val();
  510. } else if (mdd == 3) {
  511. person.endLocal = 3;
  512. person.endlocalStr = "当阳市";
  513. person.endLocalOther = $('#js_input_mddq').val() == undefined ? "" : $('#js_input_mddq').val();
  514. }
  515. } else if (mdd == 0) {
  516. $.alert("请选择目的地");
  517. return;
  518. }
  519. listcx.push(person);
  520. // $.alert("添加成功");
  521. tab()
  522. }
  523. function tab() {
  524. var xxIds = [];
  525. var xxName = [
  526. "序号",
  527. "出发地",
  528. "目的地",
  529. "出行方式",
  530. "车次/航班/车牌",
  531. "操作"
  532. ];
  533. for (var i = 0; i < xxName.length; i++) {
  534. xxIds.push({
  535. name: xxName[i]
  536. });
  537. }
  538. $('#tabtr').empty();
  539. var html = "<tr style='background-color: #f8f8f8;'>";
  540. for (var i = 0; i < xxIds.length; i++) {
  541. // alert(xxIds[i].name);
  542. html += "<th>" + xxIds[i].name + "</th>";
  543. }
  544. html += "</tr>"
  545. for (var i = 0; i < listcx.length; i++) {//后端传过来的集合遍历
  546. if (i % 2 != 0) {
  547. html += "<tr style='background-color: #f8f8f8;'>";
  548. }
  549. else {
  550. html += "<tr>";
  551. }
  552. html += "<td style='text-align: center;'>" + (i + 1) + "</td>";
  553. // var isValue = false; //记录是否赋值
  554. html += "<td style='text-align: center;' >" + listcx[i].startLocalStr + " </td>";
  555. html += "<td style='text-align: center;' >" + listcx[i].endlocalStr + " </td>";
  556. html += "<td style='text-align: center;' >" + listcx[i].tripTypeStr + " </td>";
  557. html += "<td style='text-align: center;' >" + listcx[i].tripTypeDesp + " </td>";
  558. html += "<td style='text-align: center;' ><button value=" + i + " style='height:5vh;background-color: red;text-align: center; with:60%' class='weui-btn weui-btn_mini weui-btn_primary' onclick='splice(this.value)'>" + "删除" + " </button></td>";
  559. html += "</tr>";
  560. $("#tabtr").html(html);
  561. }
  562. }
  563. function splice(obj) {
  564. listcx.splice(obj, 1);
  565. tab()
  566. }
  567. //首次近日报告
  568. function ribaoInitialization(reportId) {
  569. if (reportId == null)
  570. reportId = 0;
  571. var userId = $("#userId").val();
  572. $.ajax({
  573. url: '/home/home/queryRibaoRefresh',
  574. data: {
  575. reportId: reportId,
  576. userCreate: userId
  577. },
  578. type: 'GET',
  579. success: function (data) {
  580. if (data.data == undefined || data.data=="") {
  581. $('#rb_family').empty();
  582. document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
  583. canSahngbao = false;
  584. }
  585. else {
  586. if (data.data.length > 0) {
  587. hasData = true;
  588. data.data.forEach(function (v) {
  589. ribao_cell(v);
  590. });
  591. }
  592. }
  593. },
  594. error: function () {
  595. }
  596. });
  597. }
  598. //刷新今日日报
  599. function ribao_refrash() {
  600. var userId = $("#userId").val();
  601. $.ajax({
  602. url: '/home/home/queryRibao',
  603. data: {
  604. userCreate: userId
  605. },
  606. type: 'GET',
  607. success: function (data) {
  608. if (data.data == undefined || data.data=="") {
  609. $('#rb_family').empty();
  610. document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
  611. canSahngbao = false;
  612. }
  613. else {
  614. $('#rb_family').empty();
  615. if (data.data.length > 0) {
  616. hasData = true;
  617. data.data.forEach(function (v) {
  618. ribao_cell(v);
  619. });
  620. } else {
  621. }
  622. }
  623. },
  624. error: function () {
  625. }
  626. });
  627. }
  628. function ribao_cell(v) {
  629. var userName = v.userName + ":";
  630. var grender = getGreder(v.grender);
  631. var age = v.age;
  632. var familyStatus = "";
  633. if (v.familyStatus != 0)
  634. familyStatus = "基本状况:" + getFamilyStatus(v.familyStatus) + ";";
  635. var medical = "";
  636. if (v.medical != 0)
  637. medical = "新冠肺炎:" + getMedical(v.medical) + ";";
  638. var singleRoom = "";
  639. var uptownId = $("#uptownId").val();
  640. if (uptownId != xiaoquId && uptownId != ceshixiaoquId) {
  641. if (v.singleRoom != 0)
  642. singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
  643. if (v.singleRoom == 0 && v.medical != 0)
  644. singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
  645. }
  646. var temperature = "体温:" + v.temperature + ";";
  647. var cough = "";
  648. if (v.cough != 0)
  649. cough = "咳嗽现象:" + getCough(v.cough) + ";";
  650. var muscle = "";
  651. if (v.muscle != 0)
  652. muscle = "肌肉酸痛:" + getMuscle(v.muscle) + ";";
  653. var dyspnea = "";
  654. if (v.dyspnea != 0)
  655. dyspnea = "呼吸困难:" + getDyspnea(v.dyspnea) + ";";
  656. var fatigue = "";
  657. if (v.fatigue != 0)
  658. fatigue = "乏力现象:" + getFatigue(v.fatigue) + ";";
  659. var diarrhea = "";
  660. if (v.diarrhea != 0)
  661. diarrhea = "腹泻现象:" + getDiarrhea(v.diarrhea) + ";";
  662. var others = "";
  663. if (v.others != "")
  664. others = "其他描述:" + v.others + ";";
  665. var scoreRezult = "";
  666. if (v.scoreRezult != 0)
  667. scoreRezult = "评估结果:" + getScoreRezult(v.scoreRezult, v.temperatureScore) + ";";
  668. var workLocal = "";
  669. var todayLocal = "";
  670. var isTrip = "";
  671. var tripDet = "";
  672. if (uptownId == xiaoquId || uptownId == ceshixiaoquId) {
  673. if (v.workLocal != 0) {
  674. if (v.workLocal < 4)
  675. workLocal = "工作驻地:" + getLocal(v.workLocal) + ";";
  676. else
  677. workLocal = "工作驻地:" + v.workLocalOther + ";";
  678. }
  679. if (v.todayLocal != 0) {
  680. if (v.todayLocal < 4)
  681. todayLocal = "今晚住地:" + getLocal(v.todayLocal) + ";";
  682. else
  683. todayLocal = "今晚住地:" + v.todayLocalOther + ";";
  684. }
  685. if (v.isTrip != undefined)
  686. isTrip = "是否出行:" + getIsTrip(v.isTrip) + ";"
  687. if (v.tripDet != undefined)
  688. tripDet = "出行详细:" + v.tripDet + ";"
  689. }
  690. $('#rb_family').append($('<div class="weui-media-box weui-media-box_text" style="height: auto">\n' +
  691. ' <h4 class="weui-media-box__title">' + userName + '&nbsp;&nbsp;&nbsp;' + grender + '&nbsp;&nbsp;&nbsp;' + age + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a style="color: #bc4246" onclick=\'deleteSuspected(' + JSON.stringify(v.suspectedId) + ')\'>删除</a>\n' +
  692. ' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a style="color: #2a62bc" onclick=\'updateSuspected(' + JSON.stringify(v.suspectedId) + ')\'>修改</a></h4>\n' +
  693. ' <div style="height: auto">' + familyStatus + medical + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + scoreRezult + workLocal + todayLocal + isTrip + tripDet + '</>\n' +
  694. ' </div>\n' +
  695. ' '));
  696. }
  697. function ribao_add() {
  698. $('#btnAdd').on('click', function () {
  699. if ($('#ribao')[0].style.display == 'none') {
  700. $('#notOpenRibao').toggle();
  701. $('#ribao')[0].style.display = '';
  702. } else {
  703. $('#notOpenRibao')[0].style.display = '';
  704. $('#ribao')[0].style.display = 'none';
  705. }
  706. //基本情况
  707. $("input[name='checkbox1']").removeAttr("checked");
  708. $("input[name='checkbox2']").removeAttr("checked");
  709. $("input[name='checkbox3']").removeAttr("checked");
  710. $("input[name='checkbox4']").removeAttr("checked");
  711. $("input[name='checkbox5']").removeAttr("checked");
  712. $("input[name='checkbox6']").removeAttr("checked");
  713. $("input[name='checkbox7']").removeAttr("checked");
  714. $("#switchQuezhen").val(getMedical(0));
  715. $("#switchQuezhen").attr("data-values", 0);
  716. $("#switchDanjiangeli").val(getSingleRoom(0));
  717. $("#switchDanjiangeli").attr("data-values", 0);
  718. $("#js_input_user_tiwen").val(0);
  719. $("#js_input_user_kesou").val(getCough(0));
  720. $("#js_input_user_kesou").attr("data-values", 0);
  721. $("#js_input_user_jirou").val(getMuscle(0));
  722. $("#js_input_user_jirou").attr("data-values", 0);
  723. $("#js_input_user_huxi").val(getDyspnea(0));
  724. $("#js_input_user_huxi").attr("data-values", 0);
  725. $("#js_input_user_fali").val(getFatigue(0));
  726. $("#js_input_user_fali").attr("data-values", 0);
  727. $("#js_input_user_fuxie").val(getDiarrhea(0));
  728. $("#js_input_user_fuxie").attr("data-values", 0);
  729. $("#js_input_sf").val(getIsTrip(0));
  730. $("#js_input_sf").attr("data-values", 0);
  731. $('#none')[0].style.display = 'none';
  732. $('#tabtr').empty();
  733. // $("#suspectedId").val("");
  734. // $("#js_input_gzzd").val("");
  735. // $("#js_input_jrszd").val("");
  736. // $('#js_input_mddq').attr("disabled","disabled");
  737. // $('#js_input_jrszq').attr("disabled","disabled");
  738. // $('#js_input_qtdd').attr("disabled","disabled");
  739. // $('#js_input_cfdq').attr("disabled","disabled");
  740. // var userId = $("#userId").val();
  741. // //获取用户家人
  742. // $.ajax({
  743. // url: '/home/selectAddSuspected',
  744. // get: "get",
  745. // data: {
  746. // "userCreate": userId
  747. // },
  748. // success: function (data) {
  749. // if (data != null || data != '') {
  750. // //存在
  751. // var suspected = data;
  752. // $("#js_input_user_sex").val(getGreder(suspected.grender));
  753. // $("#js_input_user_sex").attr("data-values", suspected.grender);
  754. // $("#js_input_user_name").val(suspected.userName);
  755. // $("#js_input_user_age").val(suspected.age);
  756. // //基本情况
  757. // if (suspected.familyStatus != "") {
  758. // var familyStatusList = suspected.familyStatus.split(",");
  759. // if (familyStatusList[0] == 1)
  760. // $("input[name='checkbox1']").prop("checked", "checked");
  761. // else
  762. // $("input[name='checkbox1']").removeAttr("checked");
  763. // if (familyStatusList[1] == 1)
  764. // $("input[name='checkbox2']").prop("checked", "checked");
  765. // else
  766. // $("input[name='checkbox2']").removeAttr("checked");
  767. // if (familyStatusList[2] == 1)
  768. // $("input[name='checkbox3']").prop("checked", "checked");
  769. // else
  770. // $("input[name='checkbox3']").removeAttr("checked");
  771. // if (familyStatusList[3] == 1)
  772. // $("input[name='checkbox4']").prop("checked", "checked");
  773. // else
  774. // $("input[name='checkbox4']").removeAttr("checked");
  775. // if (familyStatusList[4] == 1)
  776. // $("input[name='checkbox5']").prop("checked", "checked");
  777. // else
  778. // $("input[name='checkbox5']").removeAttr("checked");
  779. // if (familyStatusList[5] == 1)
  780. // $("input[name='checkbox6']").prop("checked", "checked");
  781. // else
  782. // $("input[name='checkbox6']").removeAttr("checked");
  783. // if (familyStatusList[6] == 1)
  784. // $("input[name='checkbox7']").prop("checked", "checked");
  785. // else
  786. // $("input[name='checkbox7']").removeAttr("checked");
  787. //
  788. // }
  789. //
  790. // $("#switchQuezhen").val(getMedical(suspected.medical));
  791. // $("#switchQuezhen").attr("data-values", suspected.medical);
  792. //
  793. // $("#switchDanjiangeli").val(getSingleRoom(suspected.singleRoom));
  794. // $("#switchDanjiangeli").attr("data-values", suspected.singleRoom);
  795. //
  796. // $("#js_input_user_tiwen").val(suspected.temperature);
  797. //
  798. // $("#js_input_user_kesou").val(getCough(suspected.cough));
  799. // $("#js_input_user_kesou").attr("data-values", suspected.cough);
  800. //
  801. // $("#js_input_user_jirou").val(getMuscle(suspected.muscle));
  802. // $("#js_input_user_jirou").attr("data-values", suspected.muscle);
  803. //
  804. // $("#js_input_user_huxi").val(getDyspnea(suspected.dyspnea));
  805. // $("#js_input_user_huxi").attr("data-values", suspected.dyspnea);
  806. //
  807. // $("#js_input_user_fali").val(getFatigue(suspected.fatigue));
  808. // $("#js_input_user_fali").attr("data-values", suspected.fatigue);
  809. //
  810. // $("#js_input_user_fuxie").val(getDiarrhea(suspected.diarrhea));
  811. // $("#js_input_user_fuxie").attr("data-values", suspected.diarrhea);
  812. //
  813. // $("#shuruqita").val(suspected.others);
  814. // $("#js_input_score_rezult").val(getScoreRezult(suspected.scoreRezult, suspected.temperatureScore));
  815. // $("#js_input_score_rezult_value").val(suspected.scoreRezult);
  816. // $("#js_input_temperature_score").val(suspected.temperatureScore);
  817. // $("#js_input_score_histroy").val(suspected.scoreHistroy);
  818. // $("#js_input_score").val(suspected.score);
  819. //
  820. // $("#js_input_sf").val(getIsTrip(0));
  821. // $("#js_input_sf").attr("data-values", 0);
  822. // $('#none')[0].style.display = 'none';
  823. // }
  824. // else {
  825. // //基本情况
  826. // $("input[name='checkbox1']").removeAttr("checked");
  827. // $("input[name='checkbox2']").removeAttr("checked");
  828. // $("input[name='checkbox3']").removeAttr("checked");
  829. // $("input[name='checkbox4']").removeAttr("checked");
  830. // $("input[name='checkbox5']").removeAttr("checked");
  831. // $("input[name='checkbox6']").removeAttr("checked");
  832. // $("input[name='checkbox7']").removeAttr("checked");
  833. //
  834. // $("#switchQuezhen").val(getMedical(0));
  835. // $("#switchQuezhen").attr("data-values", 0);
  836. //
  837. // $("#switchDanjiangeli").val(getSingleRoom(0));
  838. // $("#switchDanjiangeli").attr("data-values", 0);
  839. //
  840. // $("#js_input_user_tiwen").val(0);
  841. //
  842. // $("#js_input_user_kesou").val(getCough(0));
  843. // $("#js_input_user_kesou").attr("data-values", 0);
  844. //
  845. // $("#js_input_user_jirou").val(getMuscle(0));
  846. // $("#js_input_user_jirou").attr("data-values", 0);
  847. //
  848. // $("#js_input_user_huxi").val(getDyspnea(0));
  849. // $("#js_input_user_huxi").attr("data-values", 0);
  850. //
  851. // $("#js_input_user_fali").val(getFatigue(0));
  852. // $("#js_input_user_fali").attr("data-values", 0);
  853. //
  854. // $("#js_input_user_fuxie").val(getDiarrhea(0));
  855. // $("#js_input_user_fuxie").attr("data-values", 0);
  856. //
  857. //
  858. // // $("#js_input_cxfs").empty();
  859. // // $("#js_input_cfd").empty();
  860. // // $("#js_input_mdd").empty();
  861. // // $('#js_input_cxfsq').val("");
  862. // // $('#js_input_cfdq').val("");
  863. // // $('#js_input_mddq').val("");
  864. // // listcx.splice(0,listcx.length);
  865. // // $('#tabtr').empty();
  866. // // $("#js_input_qtdd").val("");
  867. // // $("#js_input_jrszq").val("");
  868. // // $("#js_input_sf").val("");
  869. // $("#js_input_sf").val(getIsTrip(0));
  870. // $("#js_input_sf").attr("data-values", 0);
  871. // $('#none')[0].style.display = 'none';
  872. // $('#tabtr').empty();
  873. // // $("#suspectedId").val("");
  874. // // $("#js_input_gzzd").val("");
  875. // // $("#js_input_jrszd").val("");
  876. // // $('#js_input_mddq').attr("disabled","disabled");
  877. // // $('#js_input_jrszq').attr("disabled","disabled");
  878. // // $('#js_input_qtdd').attr("disabled","disabled");
  879. // // $('#js_input_cfdq').attr("disabled","disabled");
  880. //
  881. // }
  882. // },
  883. // });
  884. });
  885. }
  886. function tt() {
  887. alert($("input[name='radio']:checked").val())
  888. }
  889. function ribao_cancel() {
  890. $('#cancel').on('click', function () {
  891. listcx.splice(0, listcx.length);
  892. $('#tabtr').empty();
  893. $("#js_input_cfd").val("");
  894. $("#js_input_cfd").attr("data-values", "");
  895. $("#js_input_mdd").val("");
  896. $("#js_input_mdd").attr("data-values", "");
  897. $("#js_input_cxfs").val("");
  898. $("#js_input_cxfs").attr("data-values", "");
  899. $("#js_input_gzzd").val("");
  900. $("#js_input_gzzd").attr("data-values", "");
  901. $("#js_input_jrszd").val("");
  902. $("#js_input_jrszd").attr("data-values", "");
  903. $("#js_input_sf").val("");
  904. $("#js_input_sf").attr("data-values", "");
  905. $("#js_input_qtdd").val("");
  906. $("#js_input_jrszq").val("");
  907. $("#js_input_cfdq").val("");
  908. $("#js_input_mddq").val("");
  909. $("#js_input_cxfsq").val("");
  910. if ($('#ribao')[0].style.display == 'none') {
  911. $('#notOpenRibao').toggle();
  912. $('#ribao')[0].style.display = '';
  913. } else {
  914. $('#notOpenRibao')[0].style.display = '';
  915. $('#ribao')[0].style.display = 'none';
  916. }
  917. clearShow();
  918. });
  919. }
  920. function ribaoCommit() {
  921. var sf = $("#js_input_sf").attr("data-values") == undefined ? 3 : $("#js_input_sf").attr("data-values");
  922. if (listcx.length == 0 && sf == 1) {
  923. $.alert("请添加出行");
  924. return;
  925. }
  926. var suspectedId = $("#suspectedId").val();
  927. var userId = $("#userId").val();
  928. var userName = $("#js_input_user_name").val();
  929. var grender = $("#js_input_user_sex").attr("data-values") == undefined ? 0 : $("#js_input_user_sex").attr("data-values");
  930. var age = $("#js_input_user_age").val();
  931. //不能同时选择服用和未服用
  932. if ($("input[name='checkbox1']:checked").val() == "on" && $("input[name='checkbox2']:checked").val() == "on") {
  933. $.alert("心脑血管不能同时选择服用和未服用");
  934. return;
  935. }
  936. //男性不能选择妊娠期
  937. if ($("#js_input_user_sex").attr("data-values") == 1 && $("input[name='checkbox7']:checked").val() == "on") {
  938. $.alert("男性不能选择妊娠期");
  939. return;
  940. }
  941. //家庭状态
  942. var familyStatus = "";
  943. if ($("input[name='checkbox1']:checked").val() == "on")
  944. familyStatus += "1";
  945. else
  946. familyStatus += "0";
  947. if ($("input[name='checkbox2']:checked").val() == "on")
  948. familyStatus += ",1";
  949. else
  950. familyStatus += ",0";
  951. if ($("input[name='checkbox3']:checked").val() == "on")
  952. familyStatus += ",1";
  953. else
  954. familyStatus += ",0";
  955. if ($("input[name='checkbox4']:checked").val() == "on")
  956. familyStatus += ",1";
  957. else
  958. familyStatus += ",0";
  959. if ($("input[name='checkbox5']:checked").val() == "on")
  960. familyStatus += ",1";
  961. else
  962. familyStatus += ",0";
  963. if ($("input[name='checkbox6']:checked").val() == "on")
  964. familyStatus += ",1";
  965. else
  966. familyStatus += ",0";
  967. if ($("input[name='checkbox7']:checked").val() == "on")
  968. familyStatus += ",1";
  969. else
  970. familyStatus += ",0";
  971. var medical = $("input[name='radio']:checked").val();
  972. console.log(medical)
  973. if (medical == undefined) {
  974. $.alert("请选择新冠肺炎");
  975. return;
  976. }
  977. //var familyStatus = $("#js_input_user_status").attr("data-values") == undefined ? 0 : $("#js_input_user_status").attr("data-values");
  978. //var statusDesp = $("#jibenmiaoshu").val() == undefined ? "" : $("#jibenmiaoshu").val();
  979. var statusDesp = "";
  980. // var medical = $("#switchQuezhen").attr("data-values") == undefined ? 0 : $("#switchQuezhen").attr("data-values");
  981. var medicalzz = $("#switchQuezhen_zz").attr("data-values") == undefined ? 0 : $("#switchQuezhen_zz").attr("data-values");
  982. var singleRoom = $("#switchDanjiangeli").attr("data-values") == undefined ? 0 : $("#switchDanjiangeli").attr("data-values");
  983. var temperature = $("#js_input_user_tiwen").val() == "" ? 0 : $("#js_input_user_tiwen").val();
  984. var cough = $("#js_input_user_kesou").attr("data-values") == undefined ? 0 : $("#js_input_user_kesou").attr("data-values");
  985. var muscle = $("#js_input_user_jirou").attr("data-values") == undefined ? 0 : $("#js_input_user_jirou").attr("data-values");
  986. var dyspnea = $("#js_input_user_huxi").attr("data-values") == undefined ? 0 : $("#js_input_user_huxi").attr("data-values");
  987. var fatigue = $("#js_input_user_fali").attr("data-values") == undefined ? 0 : $("#js_input_user_fali").attr("data-values");
  988. var diarrhea = $("#js_input_user_fuxie").attr("data-values") == undefined ? 0 : $("#js_input_user_fuxie").attr("data-values");
  989. var others = $("#shuruqita").val() == undefined ? "" : $("#shuruqita").val();
  990. var scoreRezult = $("#js_input_score_rezult_value").val() == undefined ? "" : $("#js_input_score_rezult_value").val();
  991. var temperatureScore = $("#js_input_temperature_score").val() == undefined ? "" : $("#js_input_temperature_score").val();
  992. var scoreHistroy = $("#js_input_score_histroy").val() == undefined ? "" : $("#js_input_score_histroy").val();
  993. var score = $("#js_input_score").val() == undefined ? "" : $("#js_input_score").val();
  994. if (userName == undefined || userName == '') {
  995. $.alert("请填写姓名");
  996. return;
  997. }
  998. if (grender == 0) {
  999. $.alert("请填写性别");
  1000. return;
  1001. }
  1002. if (age == undefined || age == '') {
  1003. $.alert("请填写年龄");
  1004. return;
  1005. }
  1006. if (age > 150 || age < 0) {
  1007. $.alert("请填写正确的年龄");
  1008. return;
  1009. }
  1010. if (temperature <= 0) {
  1011. $.alert("请填写体温");
  1012. return;
  1013. }
  1014. if (temperature > 50 || temperature < 30) {
  1015. $.alert("请填写正确的体温");
  1016. return;
  1017. }
  1018. //如果是凌云
  1019. var uptownId = $("#uptownId").val();
  1020. if (uptownId == xiaoquId || uptownId == ceshixiaoquId) {
  1021. //lingyun
  1022. var gzzd = $("#js_input_gzzd").attr("data-values") == undefined ? 0 : $("#js_input_gzzd").attr("data-values");
  1023. var qtdd = $("#js_input_qtdd").val();
  1024. var workLocal = "";
  1025. var workLocalOther = "";
  1026. if (gzzd == 0) {
  1027. $.alert("请选择工作驻地");
  1028. return;
  1029. } else if (gzzd == 4 && qtdd == "") {
  1030. $.alert("请填写工作驻地");
  1031. return;
  1032. } else if (gzzd != 0 && gzzd != 4) {
  1033. if (gzzd == 1) {
  1034. workLocal = 1;
  1035. } else if (gzzd == 2) {
  1036. workLocal = 2;
  1037. } else if (gzzd == 3) {
  1038. workLocal = 3;
  1039. }
  1040. } else if (gzzd == 4 && qtdd != "") {
  1041. workLocal = 4;
  1042. workLocalOther = qtdd;
  1043. }
  1044. //var listcx = [];
  1045. //var person=new Object();
  1046. var jrszd = $("#js_input_jrszd").attr("data-values") == undefined ? 0 : $("#js_input_jrszd").attr("data-values");
  1047. var jrszq = $("#js_input_jrszq").val();
  1048. var todyLocal = "";
  1049. var todyLocalOther = "";
  1050. if (jrszd == 0) {
  1051. $.alert("请选择今晚住地");
  1052. return;
  1053. } else if (jrszd == 4 && jrszq == "") {
  1054. $.alert("请填写今晚住地");
  1055. return;
  1056. } else if (jrszd != 0 && jrszd != 4) {
  1057. if (jrszd == 1) {
  1058. todyLocal = 1;
  1059. } else if (jrszd == 2) {
  1060. todyLocal = 2;
  1061. } else if (jrszd == 3) {
  1062. todyLocal = 3;
  1063. }
  1064. } else if (jrszd == 4 && jrszq != "") {
  1065. todyLocal = 4;
  1066. todyLocalOther = jrszq;
  1067. }
  1068. var sf = $("#js_input_sf").attr("data-values") == undefined ? 3 : $("#js_input_sf").attr("data-values");
  1069. var isTrip = "";
  1070. if (sf == 3) {
  1071. $.alert("请选择是否出行");
  1072. return;
  1073. } else {
  1074. isTrip = sf;
  1075. }
  1076. } else {
  1077. workLocal = 0;
  1078. workLocalOther = "";
  1079. todyLocal = 0;
  1080. todyLocalOther = "";
  1081. isTrip = 0;
  1082. listcx = [];
  1083. }
  1084. var data = {
  1085. "suspectedId": suspectedId,
  1086. "userCreate": userId,
  1087. "userName": userName,
  1088. "grender": grender,
  1089. "age": age,
  1090. "familyStatus": familyStatus,
  1091. "statusDesp": statusDesp,
  1092. "medical": medical,
  1093. "singleRoom": singleRoom,
  1094. "temperature": temperature,
  1095. "cough": cough,
  1096. "muscle": muscle,
  1097. "dyspnea": dyspnea,
  1098. "fatigue": fatigue,
  1099. "diarrhea": diarrhea,
  1100. "others": others,
  1101. "scoreRezult": scoreRezult,
  1102. "temperatureScore": temperatureScore,
  1103. "scoreHistroy": scoreHistroy,
  1104. "score": score,
  1105. "workLocal": workLocal,
  1106. "workLocalOther": workLocalOther,
  1107. "todayLocal": todyLocal,
  1108. "todayLocalOther": todyLocalOther,
  1109. "isTrip": isTrip,
  1110. "tripDet": listcx,
  1111. };
  1112. $.ajax({
  1113. url: '/home/addRibaoTrip',
  1114. type: "post",
  1115. contentType: "application/json; charset=utf-8",
  1116. data: JSON.stringify(data),
  1117. success: function (data) {
  1118. if (data.msgReport == "2") {
  1119. $.toast("家人姓名不能重复,如果重复,可以带上称呼");
  1120. return;
  1121. }
  1122. if ($('#ribao')[0].style.display == 'none') {
  1123. $('#notOpenRibao').toggle();
  1124. $('#ribao')[0].style.display = '';
  1125. } else {
  1126. $('#notOpenRibao')[0].style.display = '';
  1127. $('#ribao')[0].style.display = 'none';
  1128. }
  1129. $('#ribao_jinrijujian').empty();
  1130. $('#ribao_jinrijujian').append(data.safetyNum);
  1131. ribao_refrash();
  1132. clearShow();
  1133. canSahngbao = true;
  1134. document.getElementById("btn_shangbao").style['background-color'] = "#0bb20c";
  1135. },
  1136. });
  1137. }
  1138. function deleteSuspected(suspectedId) {
  1139. $.ajax({
  1140. url: '/home/deleteSuspected',
  1141. type: "post",
  1142. data: {
  1143. "suspectedId": suspectedId
  1144. },
  1145. success: function (data) {
  1146. $('#ribao_jinrijujian').empty();
  1147. $('#ribao_jinrijujian').append(data.safetyNum);
  1148. ribao_refrash();
  1149. },
  1150. });
  1151. }
  1152. function updateSuspected(suspectedId) {
  1153. $("#suspectedId").val("");
  1154. if ($('#ribao')[0].style.display == 'none') {
  1155. $('#notOpenRibao').toggle();
  1156. $('#ribao')[0].style.display = '';
  1157. } else {
  1158. $('#notOpenRibao')[0].style.display = '';
  1159. $('#ribao')[0].style.display = 'none';
  1160. }
  1161. $.ajax({
  1162. url: '/home/selectSuspected',
  1163. get: "get",
  1164. data: {
  1165. "suspectedId": suspectedId
  1166. },
  1167. success: function (data) {
  1168. // console.log(data);
  1169. if (data) {
  1170. var suspected = data;
  1171. $("#suspectedId").val(suspected.suspectedId);
  1172. $("#js_input_user_sex").val(getGreder(suspected.grender));
  1173. $("#js_input_user_sex").attr("data-values", suspected.grender);
  1174. $("#js_input_user_name").val(suspected.userName);
  1175. $("#js_input_user_age").val(suspected.age);
  1176. //基本情况
  1177. if (suspected.familyStatus != "") {
  1178. var familyStatusList = suspected.familyStatus.split(",");
  1179. if (familyStatusList[0] == 1)
  1180. $("input[name='checkbox1']").prop("checked", "checked");
  1181. else
  1182. $("input[name='checkbox1']").removeAttr("checked");
  1183. if (familyStatusList[1] == 1)
  1184. $("input[name='checkbox2']").prop("checked", "checked");
  1185. else
  1186. $("input[name='checkbox2']").removeAttr("checked");
  1187. if (familyStatusList[2] == 1)
  1188. $("input[name='checkbox3']").prop("checked", "checked");
  1189. else
  1190. $("input[name='checkbox3']").removeAttr("checked");
  1191. if (familyStatusList[3] == 1)
  1192. $("input[name='checkbox4']").prop("checked", "checked");
  1193. else
  1194. $("input[name='checkbox4']").removeAttr("checked");
  1195. if (familyStatusList[4] == 1)
  1196. $("input[name='checkbox5']").prop("checked", "checked");
  1197. else
  1198. $("input[name='checkbox5']").removeAttr("checked");
  1199. if (familyStatusList[5] == 1)
  1200. $("input[name='checkbox6']").prop("checked", "checked");
  1201. else
  1202. $("input[name='checkbox6']").removeAttr("checked");
  1203. if (familyStatusList[6] == 1)
  1204. $("input[name='checkbox7']").prop("checked", "checked");
  1205. else
  1206. $("input[name='checkbox7']").removeAttr("checked");
  1207. }
  1208. // $("#js_input_user_status").val(getFamilyStatus(suspected.familyStatus));
  1209. // $("#js_input_user_status").attr("data-values", suspected.familyStatus);
  1210. // $("#jibenmiaoshu").val(suspected.statusDesp);
  1211. $("#switchQuezhen").val(getMedical(suspected.medical));
  1212. $("#switchQuezhen").attr("data-values", suspected.medical);
  1213. $("#switchDanjiangeli").val(getSingleRoom(suspected.singleRoom));
  1214. $("#switchDanjiangeli").attr("data-values", suspected.singleRoom);
  1215. $("#js_input_user_tiwen").val(suspected.temperature);
  1216. $("#js_input_user_kesou").val(getCough(suspected.cough));
  1217. $("#js_input_user_kesou").attr("data-values", suspected.cough);
  1218. $("#js_input_user_jirou").val(getMuscle(suspected.muscle));
  1219. $("#js_input_user_jirou").attr("data-values", suspected.muscle);
  1220. $("#js_input_user_huxi").val(getDyspnea(suspected.dyspnea));
  1221. $("#js_input_user_huxi").attr("data-values", suspected.dyspnea);
  1222. $("#js_input_user_fali").val(getFatigue(suspected.fatigue));
  1223. $("#js_input_user_fali").attr("data-values", suspected.fatigue);
  1224. $("#js_input_user_fuxie").val(getDiarrhea(suspected.diarrhea));
  1225. $("#js_input_user_fuxie").attr("data-values", suspected.diarrhea);
  1226. $("#shuruqita").val(suspected.others);
  1227. $("#js_input_score_rezult").val(getScoreRezult(suspected.scoreRezult, suspected.temperatureScore));
  1228. $("#js_input_score_rezult_value").val(suspected.scoreRezult);
  1229. $("#js_input_temperature_score").val(suspected.temperatureScore);
  1230. $("#js_input_score_histroy").val(suspected.scoreHistroy);
  1231. $("#js_input_score").val(suspected.score);
  1232. //行程
  1233. $("#js_input_gzzd").val(getLocal(suspected.workLocal));
  1234. $("#js_input_gzzd").attr("data-values", suspected.workLocal);
  1235. if (suspected.workLocal != 4) {
  1236. $('#js_input_qtdd').attr("disabled", "disabled");
  1237. $("#js_input_qtdd").val("");
  1238. } else {
  1239. $('#js_input_qtdd').removeAttr("disabled")
  1240. }
  1241. $("#js_input_qtdd").val(suspected.workLocalOther);
  1242. $("#js_input_jrszd").val(getLocal(suspected.todayLocal));
  1243. $("#js_input_jrszd").attr("data-values", suspected.todayLocal);
  1244. if (suspected.todayLocal != 4) {
  1245. $('#js_input_jrszq').attr("disabled", "disabled");
  1246. $("#js_input_jrszq").val("");
  1247. } else {
  1248. $('#js_input_jrszq').removeAttr("disabled")
  1249. }
  1250. $("#js_input_jrszq").val(suspected.todayLocalOther);
  1251. $("#js_input_sf").val(getIsTrip(suspected.isTrip));
  1252. $("#js_input_sf").attr("data-values", suspected.isTrip);
  1253. if (suspected.isTrip == 0)
  1254. $('#none')[0].style.display = 'none';
  1255. else
  1256. $('#none')[0].style.display = '';
  1257. //详细
  1258. $.ajax({
  1259. url: '/home/selectTripSuspected',
  1260. get: "get",
  1261. data: {
  1262. "suspectedId": suspectedId
  1263. },
  1264. success: function (data) {
  1265. if (data.data.length != 0) {
  1266. }
  1267. listcx.splice(0, listcx.length);
  1268. $('#tabtr').empty();
  1269. var person = new Object();
  1270. // var xxIds = [];
  1271. // var xxName = [
  1272. // "序号",
  1273. // "出发地",
  1274. // "目的地",
  1275. // "出行方式",
  1276. // "车次/航班/车牌",
  1277. // "操作"
  1278. // ];
  1279. // for (var i = 0; i < xxName.length; i++) {
  1280. // xxIds.push({
  1281. // name: xxName[i]
  1282. // });
  1283. // }
  1284. // $('#tabtr').empty();
  1285. // var html = "<tr style='background-color: #f8f8f8;'>";
  1286. // for (var i = 0; i < xxIds.length; i++) {
  1287. // html += "<th>" + xxIds[i].name + "</th>";
  1288. // }
  1289. // html += "</tr>"
  1290. data.data.forEach(function (v) {
  1291. {
  1292. person.startLocal = v.startLocal;
  1293. person.startLocalOther = v.startLocalOther;
  1294. person.endlocal = v.endLocal;
  1295. person.endLocalOther = v.endLocalOther;
  1296. person.tripType = v.tripType;
  1297. person.startLocalStr = getLocalOther(v.startLocal, v.startLocalOther);
  1298. person.endlocalStr = getLocalOther(v.endLocal, v.endLocalOther);
  1299. person.tripTypeStr = getTripType(v.tripType);
  1300. person.tripTypeDesp = v.tripTypeDesp;
  1301. listcx.push(person);
  1302. // html += "<tr>";
  1303. // html += "<td style='text-align: center;'>" + v.sort + "</td>";
  1304. // html += "<td style='text-align: center;' >" + getLocalOther(v.startLocal, v.startLocalOther) + " </td>";
  1305. // html += "<td style='text-align: center;' >" + getLocalOther(v.endLocal, v.endLocalOther) + " </td>";
  1306. // html += "<td style='text-align: center;' >" + getTripType(v.tripType) + " </td>";
  1307. // html += "<td style='text-align: center;' >" + v.tripTypeDesp + " </td>";
  1308. // html += "<td style='text-align: center;' ><button value=" + i + " style='height:5vh;background-color: red;text-align: center; with:60%' class='weui-btn weui-btn_mini weui-btn_primary' onclick='splice(this.value)'>" + "删除" + " </button></td>";
  1309. // html += "</tr>";
  1310. // $("#tabtr").html(html);
  1311. }
  1312. });
  1313. tab();
  1314. },
  1315. });
  1316. }
  1317. },
  1318. });
  1319. }
  1320. function addReport() {
  1321. if (!canSahngbao) {
  1322. return;
  1323. }
  1324. var userId = $("#userId").val();
  1325. $.ajax({
  1326. url: '/home/addReport',
  1327. type: "post",
  1328. data: {
  1329. "userCreate": userId,
  1330. },
  1331. success: function (data) {
  1332. $.toast(data.msg);
  1333. if (data.msg == "操作成功") {
  1334. canSahngbao = false;
  1335. document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
  1336. }
  1337. },
  1338. });
  1339. }
  1340. $("#my-input-ribao").calendar({
  1341. dateFormat: 'yyyy-mm-dd',
  1342. inputReadOnly: false,
  1343. onChange: function (p, values, displayValues) {
  1344. var reportDate = values.toString();
  1345. var userId = $("#userId").val();
  1346. $.ajax({
  1347. url: '/home/home/queryRibaoReportDate',
  1348. data: {
  1349. "userCreate": userId,
  1350. "reportDate": reportDate,
  1351. },
  1352. type: 'GET',
  1353. success: function (data) {
  1354. if (data.data == undefined || data.data=="") {
  1355. $('#ribao_famliy').empty();
  1356. }
  1357. else {
  1358. if (data.data.length > 0) {
  1359. $('#ribao_famliy').empty();
  1360. data.data.forEach(function (v) {
  1361. helpValue1(v);
  1362. });
  1363. } else {
  1364. }
  1365. }
  1366. },
  1367. error: function () {
  1368. }
  1369. });
  1370. }
  1371. });
  1372. function helpValue1(v) {
  1373. var userName = v.userName + ":";
  1374. var grender = getGreder(v.grender);
  1375. var age = v.age;
  1376. var familyStatus = "";
  1377. if (v.familyStatus != 0)
  1378. familyStatus = "基本状况:" + getFamilyStatus(v.familyStatus) + ";";
  1379. var medical = "";
  1380. if (v.medical != 0)
  1381. medical = "新冠肺炎:" + getMedical(v.medical) + ";";
  1382. var singleRoom = "";
  1383. var uptownId = $("#uptownId").val();
  1384. if (uptownId != xiaoquId && uptownId != ceshixiaoquId) {
  1385. if (v.singleRoom != 0)
  1386. singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
  1387. if (v.singleRoom == 0 && v.medical != 0)
  1388. singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
  1389. }
  1390. var temperature = "体温:" + v.temperature + ";";
  1391. var cough = "";
  1392. if (v.cough != 0)
  1393. cough = "咳嗽现象:" + getCough(v.cough) + ";";
  1394. var muscle = "";
  1395. if (v.muscle != 0)
  1396. muscle = "肌肉酸痛:" + getMuscle(v.muscle) + ";";
  1397. var dyspnea = "";
  1398. if (v.dyspnea != 0)
  1399. dyspnea = "呼吸困难:" + getDyspnea(v.dyspnea) + ";";
  1400. var fatigue = "";
  1401. if (v.fatigue != 0)
  1402. fatigue = "乏力现象:" + getFatigue(v.fatigue) + ";";
  1403. var diarrhea = "";
  1404. if (v.diarrhea != 0)
  1405. diarrhea = "腹泻现象:" + getDiarrhea(v.diarrhea) + ";";
  1406. var others = "";
  1407. if (v.others != "")
  1408. others = "其他描述:" + v.others + ";";
  1409. var scoreRezult = "";
  1410. if (v.scoreRezult != 0)
  1411. scoreRezult = "评估结果:" + getScoreRezult(v.scoreRezult, v.temperatureScore) + ";";
  1412. var workLocal = "";
  1413. var todayLocal = "";
  1414. var isTrip = "";
  1415. var tripDet = "";
  1416. var uptownId = $("#uptownId").val();
  1417. if (uptownId == xiaoquId || uptownId == ceshixiaoquId) {
  1418. if (v.workLocal != 0) {
  1419. if (v.workLocal < 4)
  1420. workLocal = "工作驻地:" + getLocal(v.workLocal) + ";";
  1421. else
  1422. workLocal = "工作驻地:" + v.workLocalOther + ";";
  1423. }
  1424. if (v.todayLocal != 0) {
  1425. if (v.todayLocal < 4)
  1426. todayLocal = "今晚住地:" + getLocal(v.todayLocal) + ";";
  1427. else
  1428. todayLocal = "今晚住地:" + v.todayLocalOther + ";";
  1429. }
  1430. if (v.isTrip != undefined)
  1431. isTrip = "是否出行:" + getIsTrip(v.isTrip) + ";"
  1432. if (v.tripDet != undefined)
  1433. tripDet = "出行详细:" + v.tripDet + ";"
  1434. }
  1435. $('#ribao_famliy').append($('<div class="weui-media-box weui-media-box_text" style="height: auto">\n' +
  1436. ' <h4 class="weui-media-box__title">' + userName + '&nbsp;&nbsp;&nbsp;' + grender + '&nbsp;&nbsp;&nbsp;' + age + '</h4>\n' +
  1437. ' <div style="height: auto">' + familyStatus + medical + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + scoreRezult + workLocal + todayLocal + isTrip + tripDet + '</div>\n' +
  1438. ' </div>\n' +
  1439. ' '));
  1440. }
  1441. function getGreder(greder) {
  1442. if (greder == 1)
  1443. return "男";
  1444. else if (greder == 2)
  1445. return "女";
  1446. return "";
  1447. }
  1448. function getFamilyStatus(familyStatus) {
  1449. var familyStatusList = familyStatus.split(",");
  1450. var familyStatusString = "";
  1451. if (familyStatus == '0,0,0,0,0,0,0')
  1452. familyStatusString += "无病史,";
  1453. else {
  1454. if (familyStatusList[0] == 1)
  1455. familyStatusString += "心脑血管疾病(服用ARB),";
  1456. if (familyStatusList[1] == 1)
  1457. familyStatusString += "心脑血管疾病(未服ARB),";
  1458. if (familyStatusList[2] == 1)
  1459. familyStatusString += "呼吸系统病史,";
  1460. if (familyStatusList[3] == 1)
  1461. familyStatusString += "肿瘤病史,";
  1462. if (familyStatusList[4] == 1)
  1463. familyStatusString += "糖尿病史,";
  1464. if (familyStatusList[5] == 1)
  1465. familyStatusString += "服用过激素药物,";
  1466. if (familyStatusList[6] == 1)
  1467. familyStatusString += "妊娠期,";
  1468. }
  1469. return familyStatusString.substring(0, familyStatusString.length - 1);
  1470. }
  1471. function getCough(cough) {
  1472. if (cough == 0)
  1473. return "无咳嗽";
  1474. else if (cough == 1)
  1475. return "偶尔短暂咳嗽";
  1476. else if (cough == 2)
  1477. return "咳嗽轻度影响生活";
  1478. else if (cough == 3)
  1479. return "咳嗽严重影响生活";
  1480. return "";
  1481. }
  1482. function getMuscle(muscle) {
  1483. if (muscle == 0)
  1484. return "无";
  1485. else if (muscle == 1)
  1486. return "按压有";
  1487. else if (muscle == 2)
  1488. return "偶尔";
  1489. else if (muscle == 3)
  1490. return "持续有";
  1491. return "";
  1492. }
  1493. function getDyspnea(dyspnea) {
  1494. if (dyspnea == 0)
  1495. return "无";
  1496. else if (dyspnea == 1)
  1497. return "急走或上坡气短";
  1498. else if (dyspnea == 2)
  1499. return "气短而走路变慢";
  1500. else if (dyspnea == 3)
  1501. return "走路数分钟后气短";
  1502. else if (dyspnea == 4)
  1503. return "气短无法离开房间";
  1504. return "";
  1505. }
  1506. function getFatigue(fatigue) {
  1507. if (fatigue == 0)
  1508. return "无";
  1509. else if (fatigue == 1)
  1510. return "体力劳动后不能恢复";
  1511. else if (fatigue == 2)
  1512. return "轻体力活非常累";
  1513. else if (fatigue == 3)
  1514. return "不能正常生活";
  1515. return "";
  1516. }
  1517. function getMedical(medical) {
  1518. if (medical == 0)
  1519. return "无";
  1520. else if (medical == 1)
  1521. return "确诊";
  1522. else if (medical == 2)
  1523. return "疑似";
  1524. else if (medical == 3)
  1525. return "有接触史";
  1526. else if (medical == 4)
  1527. return "解除隔离";
  1528. return "";
  1529. }
  1530. function getSingleRoom(singleRoom) {
  1531. if (singleRoom == 0)
  1532. return "否";
  1533. else if (singleRoom == 1)
  1534. return "是";
  1535. return "";
  1536. }
  1537. function getIsTrip(isTrip) {
  1538. if (isTrip == 0)
  1539. return "否";
  1540. else if (isTrip == 1)
  1541. return "是";
  1542. return "";
  1543. }
  1544. function getLocal(local) {
  1545. if (local == 0)
  1546. return "";
  1547. else if (local == 1)
  1548. return "武汉市";
  1549. else if (local == 2)
  1550. return "宜昌市";
  1551. else if (local == 3)
  1552. return "当阳市";
  1553. else if (local == 4)
  1554. return "其它地点";
  1555. return "";
  1556. }
  1557. function getLocalOther(local, localOther) {
  1558. if (local == 0)
  1559. return "";
  1560. else if (local == 1)
  1561. return "武汉市";
  1562. else if (local == 2)
  1563. return "宜昌市";
  1564. else if (local == 3)
  1565. return "当阳市";
  1566. else if (local == 4)
  1567. return localOther;
  1568. return "";
  1569. }
  1570. function getTripType(tripType) {
  1571. if (tripType == 0)
  1572. return "";
  1573. else if (tripType == 1)
  1574. return "长途汽车";
  1575. else if (tripType == 2)
  1576. return "火车";
  1577. else if (tripType == 3)
  1578. return "飞机";
  1579. else if (tripType == 4)
  1580. return "自驾";
  1581. return "";
  1582. }
  1583. function getDiarrhea(diarrhea) {
  1584. if (diarrhea == 0)
  1585. return "无";
  1586. else if (diarrhea == 1)
  1587. return "轻度腹泻(少于3次)";
  1588. else if (diarrhea == 2)
  1589. return "中度腹泻(4-6次)";
  1590. else if (diarrhea == 3)
  1591. return "重度腹泻(超过6次)";
  1592. return "";
  1593. }
  1594. function clearShow() {
  1595. console.log("qingkong")
  1596. $("#suspectedId").val("");
  1597. $("#js_input_user_sex").val("");
  1598. $("#js_input_user_sex").attr("data-values", "");
  1599. $("#js_input_user_name").val("");
  1600. $("#js_input_user_age").val("");
  1601. $("#js_input_user_status").val("");
  1602. $("#js_input_user_status").attr("data-values", "");
  1603. $("#jibenmiaoshu").val("");
  1604. $("#switchQuezhen").val("");
  1605. $("#switchQuezhen").attr("data-values", "");
  1606. $("#switchQuezhen_zz").val("");
  1607. $("#switchQuezhen_zz").attr("data-values", "");
  1608. $("#switchDanjiangeli").val("");
  1609. $("#switchDanjiangeli").attr("data-values", "");
  1610. $("#js_input_user_tiwen").val("");
  1611. $("#js_input_user_kesou").val("");
  1612. $("#js_input_user_kesou").attr("data-values", "");
  1613. $("#js_input_user_jirou").val("");
  1614. $("#js_input_user_jirou").attr("data-values", "");
  1615. $("#js_input_user_huxi").val("");
  1616. $("#js_input_user_huxi").attr("data-values", "");
  1617. $("#js_input_user_fali").val("");
  1618. $("#js_input_user_fali").attr("data-values", "");
  1619. $("#js_input_user_fuxie").val("");
  1620. $("#js_input_user_fuxie").attr("data-values", "");
  1621. $("#shuruqita").val("");
  1622. $("#js_input_score_rezult").val("");
  1623. $("#js_input_score_rezult_value").val("");
  1624. $("#js_input_temperature_score").val("");
  1625. $("#js_input_score_histroy").val("");
  1626. $("#js_input_score").val("");
  1627. //出行
  1628. $("#js_input_gzzd").val("");
  1629. $("#js_input_gzzd").attr("data-values", "");
  1630. $("#js_input_qtdd").val("");
  1631. $("#js_input_jrszd").val("");
  1632. $("#js_input_jrszd").attr("data-values", "");
  1633. $("#js_input_jrszq").val("");
  1634. $("#js_input_sf").val(getIsTrip(0));
  1635. $("#js_input_sf").attr("data-values", 0);
  1636. $('#none')[0].style.display = 'none';
  1637. }
  1638. //健康评估
  1639. $('#ribao_score').on('click', function () {
  1640. var suspectedId = $("#suspectedId").val();
  1641. var userId = $("#userId").val();
  1642. var userName = $("#js_input_user_name").val();
  1643. var medical = $("input[name='radio']:checked").val() == undefined ? 0 : $("input[name='radio']:checked").val();
  1644. var medicalzz = $("#switchQuezhen_zz").attr("data-values") == undefined ? 0 : $("#switchQuezhen_zz").attr("data-values");
  1645. var temperature = $("#js_input_user_tiwen").val() == "" ? 0 : $("#js_input_user_tiwen").val();
  1646. var cough = $("#js_input_user_kesou").attr("data-values") == undefined ? 0 : $("#js_input_user_kesou").attr("data-values");
  1647. var muscle = $("#js_input_user_jirou").attr("data-values") == undefined ? 0 : $("#js_input_user_jirou").attr("data-values");
  1648. var dyspnea = $("#js_input_user_huxi").attr("data-values") == undefined ? 0 : $("#js_input_user_huxi").attr("data-values");
  1649. var fatigue = $("#js_input_user_fali").attr("data-values") == undefined ? 0 : $("#js_input_user_fali").attr("data-values");
  1650. var diarrhea = $("#js_input_user_fuxie").attr("data-values") == undefined ? 0 : $("#js_input_user_fuxie").attr("data-values");
  1651. if (userName == undefined || userName == '') {
  1652. $.alert("请填写姓名");
  1653. return;
  1654. }
  1655. if (temperature <= 0) {
  1656. $.alert("请填写体温");
  1657. return;
  1658. }
  1659. if (temperature > 50 || temperature < 30) {
  1660. $.alert("请填写正确的体温");
  1661. return;
  1662. }
  1663. $.ajax({
  1664. url: '/home/addScore',
  1665. type: "post",
  1666. data: {
  1667. "userName": userName,
  1668. "suspectedId": suspectedId,
  1669. "userCreate": userId,
  1670. "medical": medical,
  1671. "temperature": temperature,
  1672. "cough": cough,
  1673. "muscle": muscle,
  1674. "dyspnea": dyspnea,
  1675. "fatigue": fatigue,
  1676. "diarrhea": diarrhea,
  1677. },
  1678. success: function (data) {
  1679. if (data == undefined) {
  1680. $('#js_input_score_rezult').empty();
  1681. $('#js_input_score_rezult_value').empty();
  1682. $('#js_input_temperature_score').empty();
  1683. $('#js_input_score_histroy').empty();
  1684. $('#js_input_score').empty();
  1685. }
  1686. else {
  1687. $('#js_input_score_rezult').empty();
  1688. $('#js_input_temperature_score').empty();
  1689. $('#js_input_score_histroy').empty();
  1690. $('#js_input_score').empty();
  1691. var ScoreRezult = getScoreRezult(data.scoreRezult, data.temperatureScore);
  1692. $("#js_input_score_rezult").val(ScoreRezult);
  1693. $("#js_input_score_rezult_value").val(data.scoreRezult);
  1694. $("#js_input_temperature_score").val(data.temperatureScore);
  1695. $("#js_input_score_histroy").val(data.scoreHistory);
  1696. $("#js_input_score").val(data.score);
  1697. }
  1698. },
  1699. });
  1700. });
  1701. function getScoreRezult(scoreRezult, temperatureScore) {
  1702. if (scoreRezult == 0)
  1703. return "未评估";
  1704. else if (scoreRezult == 1) {
  1705. if (temperatureScore > 1)
  1706. return "正常,间隔时间服用退烧药,多休息,多喝水";
  1707. else
  1708. return "正常";
  1709. }
  1710. else if (scoreRezult == 2) {
  1711. if (temperatureScore > 1)
  1712. return "注意观察,间隔时间服用退烧药,多休息,多喝水";
  1713. else
  1714. return "注意观察";
  1715. }
  1716. else if (scoreRezult == 3)
  1717. return "联系社区医生(或者在线问诊)";
  1718. else if (scoreRezult == 4)
  1719. return "尽快就诊";
  1720. return "";
  1721. }