ribao.js 58 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921
  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. var cfdq = $('#js_input_cfdq').val();
  420. if (mdd != jrszd) {
  421. $.alert("目的地与今晚住地不一致");
  422. return;
  423. }
  424. if (jrszq != mddq) {
  425. $.alert("目的地与今晚住地不一致");
  426. return;
  427. }
  428. if (cfd == 4 && mdd == 4) {
  429. if (mddq == cfdq) {
  430. $.alert("出发地与目的地不能一致");
  431. return;
  432. }
  433. } else if (cfd != 4 || mdd != 4) {
  434. if (cfd == mdd) {
  435. $.alert("出发地与目的地不能一致");
  436. return;
  437. }
  438. }
  439. var cxfsq = $('#js_input_cxfsq').val();
  440. for (var i = 0; i < listcx.length; i++) {
  441. 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) {
  442. $.alert("此行程已添加");
  443. return;
  444. }
  445. }
  446. if (cxfs != 4 && cxfs != 0) {
  447. var val = $('#js_input_cxfsq').val();
  448. if (val == "") {
  449. $.alert("请填写车次/航班/车牌");
  450. return;
  451. }
  452. person.tripTypeDesp = $('#js_input_cxfsq').val();
  453. if (cxfs == 1) {
  454. person.tripType = 1;
  455. person.tripTypeStr = "长途汽车"
  456. } else if (cxfs == 2) {
  457. person.tripType = 2;
  458. person.tripTypeStr = "火车";
  459. } else if (cxfs == 3) {
  460. person.tripType = 3;
  461. person.tripTypeStr = "飞机";
  462. }
  463. } else if (cxfs == 0) {
  464. $.alert("请选择出行方式");
  465. return;
  466. } else if (cxfs == 4) {
  467. var val6 = $('#js_input_cxfsq').val();
  468. if (val6 == "") {
  469. $.alert("请填写车次/航班/车牌");
  470. return;
  471. }
  472. person.tripTypeStr = "自驾";
  473. person.tripType = 4;
  474. person.tripTypeDesp = $('#js_input_cxfsq').val();
  475. }
  476. if (cfd == 4 && cfd != 0) {
  477. var val2 = $('#js_input_cfdq').val();
  478. if (val2 == "") {
  479. $.alert("请填写出发地");
  480. return;
  481. }
  482. person.startLocal = 4;
  483. person.startLocalOther = $('#js_input_cfdq').val();
  484. person.startLocalStr = $('#js_input_cfdq').val();
  485. } else if (cfd != 4 && cfd != 0) {
  486. if (cfd == 1) {
  487. person.startLocal = 1;
  488. person.startLocalStr = "武汉市";
  489. person.startLocalOther = $('#js_input_cfdq').val() == undefined ? "" : $('#js_input_cfdq').val();
  490. } else if (cfd == 2) {
  491. person.startLocal = 2;
  492. person.startLocalStr = "宜昌市";
  493. person.startLocalOther = $('#js_input_cfdq').val() == undefined ? "" : $('#js_input_cfdq').val();
  494. } else if (cfd == 3) {
  495. person.startLocal = 3;
  496. person.startLocalStr = "当阳市";
  497. person.startLocalOther = $('#js_input_cfdq').val() == undefined ? "" : $('#js_input_cfdq').val();
  498. }
  499. } else if (cfd == 0) {
  500. $.alert("请选择出发地");
  501. return;
  502. }
  503. if (mdd == 4 && mdd != 0) {
  504. var val3 = $('#js_input_mddq').val();
  505. if (val3 == "") {
  506. $.alert("请填写目的地");
  507. return;
  508. }
  509. person.endLocal = 4;
  510. person.endLocalOther = $('#js_input_mddq').val();
  511. person.endlocalStr = $('#js_input_mddq').val();
  512. } else if (mdd != 4 && mdd != 0) {
  513. if (mdd == 1) {
  514. person.endLocal = 1;
  515. person.endlocalStr = "武汉市";
  516. person.endLocalOther = $('#js_input_mddq').val() == undefined ? "" : $('#js_input_mddq').val();
  517. } else if (mdd == 2) {
  518. person.endLocal = 2;
  519. person.endlocalStr = "宜昌市";
  520. person.endLocalOther = $('#js_input_mddq').val() == undefined ? "" : $('#js_input_mddq').val();
  521. } else if (mdd == 3) {
  522. person.endLocal = 3;
  523. person.endlocalStr = "当阳市";
  524. person.endLocalOther = $('#js_input_mddq').val() == undefined ? "" : $('#js_input_mddq').val();
  525. }
  526. } else if (mdd == 0) {
  527. $.alert("请选择目的地");
  528. return;
  529. }
  530. listcx.push(person);
  531. // $.alert("添加成功");
  532. tab()
  533. }
  534. function tab() {
  535. var xxIds = [];
  536. var xxName = [
  537. "序号",
  538. "出发地",
  539. "目的地",
  540. "出行方式",
  541. "车次/航班/车牌",
  542. "操作"
  543. ];
  544. for (var i = 0; i < xxName.length; i++) {
  545. xxIds.push({
  546. name: xxName[i]
  547. });
  548. }
  549. $('#tabtr').empty();
  550. var html = "<tr style='background-color: #f8f8f8;'>";
  551. for (var i = 0; i < xxIds.length; i++) {
  552. // alert(xxIds[i].name);
  553. html += "<th>" + xxIds[i].name + "</th>";
  554. }
  555. html += "</tr>"
  556. for (var i = 0; i < listcx.length; i++) {//后端传过来的集合遍历
  557. if (i % 2 != 0) {
  558. html += "<tr style='background-color: #f8f8f8;'>";
  559. }
  560. else {
  561. html += "<tr>";
  562. }
  563. html += "<td style='text-align: center;'>" + (i + 1) + "</td>";
  564. // var isValue = false; //记录是否赋值
  565. html += "<td style='text-align: center;' >" + listcx[i].startLocalStr + " </td>";
  566. html += "<td style='text-align: center;' >" + listcx[i].endlocalStr + " </td>";
  567. html += "<td style='text-align: center;' >" + listcx[i].tripTypeStr + " </td>";
  568. html += "<td style='text-align: center;' >" + listcx[i].tripTypeDesp + " </td>";
  569. 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>";
  570. html += "</tr>";
  571. $("#tabtr").html(html);
  572. }
  573. }
  574. function splice(obj) {
  575. listcx.splice(obj, 1);
  576. tab()
  577. }
  578. //首次近日报告
  579. function ribaoInitialization(reportId) {
  580. if (reportId == null)
  581. reportId = 0;
  582. var userId = $("#userId").val();
  583. $.ajax({
  584. url: '/home/home/queryRibaoRefresh',
  585. data: {
  586. reportId: reportId,
  587. userCreate: userId
  588. },
  589. type: 'GET',
  590. success: function (data) {
  591. if (data.data == undefined || data.data == "") {
  592. $('#rb_family').empty();
  593. document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
  594. canSahngbao = false;
  595. }
  596. else {
  597. if (data.data.length > 0) {
  598. hasData = true;
  599. data.data.forEach(function (v) {
  600. ribao_cell(v);
  601. });
  602. }
  603. }
  604. },
  605. error: function () {
  606. }
  607. });
  608. }
  609. //刷新今日日报
  610. function ribao_refrash() {
  611. var userId = $("#userId").val();
  612. $.ajax({
  613. url: '/home/home/queryRibao',
  614. data: {
  615. userCreate: userId
  616. },
  617. type: 'GET',
  618. success: function (data) {
  619. if (data.data == undefined || data.data == "") {
  620. $('#rb_family').empty();
  621. document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
  622. }
  623. else {
  624. $('#rb_family').empty();
  625. if (data.data.length > 0) {
  626. hasData = true;
  627. data.data.forEach(function (v) {
  628. ribao_cell(v);
  629. });
  630. } else {
  631. }
  632. }
  633. },
  634. error: function () {
  635. }
  636. });
  637. }
  638. function ribao_cell(v) {
  639. var userName = v.userName + ":";
  640. var grender = getGreder(v.grender);
  641. var age = v.age;
  642. var familyStatus = "";
  643. if (v.familyStatus != 0)
  644. familyStatus = "基本状况:" + getFamilyStatus(v.familyStatus) + ";";
  645. var medical = "";
  646. if (v.medical != 0)
  647. medical = "新冠肺炎:" + getMedical(v.medical) + ";";
  648. var singleRoom = "";
  649. var uptownId = $("#uptownId").val();
  650. if (uptownId != xiaoquId && uptownId != ceshixiaoquId) {
  651. if (v.singleRoom != 0)
  652. singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
  653. if (v.singleRoom == 0 && v.medical != 0)
  654. singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
  655. }
  656. var temperature = "体温:" + v.temperature + ";";
  657. var cough = "";
  658. if (v.cough != 0)
  659. cough = "咳嗽现象:" + getCough(v.cough) + ";";
  660. var muscle = "";
  661. if (v.muscle != 0)
  662. muscle = "肌肉酸痛:" + getMuscle(v.muscle) + ";";
  663. var dyspnea = "";
  664. if (v.dyspnea != 0)
  665. dyspnea = "呼吸困难:" + getDyspnea(v.dyspnea) + ";";
  666. var fatigue = "";
  667. if (v.fatigue != 0)
  668. fatigue = "乏力现象:" + getFatigue(v.fatigue) + ";";
  669. var diarrhea = "";
  670. if (v.diarrhea != 0)
  671. diarrhea = "腹泻现象:" + getDiarrhea(v.diarrhea) + ";";
  672. var others = "";
  673. if (v.others != "")
  674. others = "其他描述:" + v.others + ";";
  675. var scoreRezult = "";
  676. if (v.scoreRezult != 0)
  677. scoreRezult = "评估结果:" + getScoreRezult(v.scoreRezult, v.temperatureScore) + ";";
  678. var workLocal = "";
  679. var todayLocal = "";
  680. var isTrip = "";
  681. var tripDet = "";
  682. if (uptownId == xiaoquId || uptownId == ceshixiaoquId) {
  683. if (v.workLocal != 0) {
  684. if (v.workLocal < 4)
  685. workLocal = "工作驻地:" + getLocal(v.workLocal) + ";";
  686. else
  687. workLocal = "工作驻地:" + v.workLocalOther + ";";
  688. }
  689. if (v.todayLocal != 0) {
  690. if (v.todayLocal < 4)
  691. todayLocal = "今晚住地:" + getLocal(v.todayLocal) + ";";
  692. else
  693. todayLocal = "今晚住地:" + v.todayLocalOther + ";";
  694. }
  695. if (v.isTrip != undefined)
  696. isTrip = "是否出行:" + getIsTrip(v.isTrip) + ";"
  697. if (v.tripDet != undefined)
  698. tripDet = "出行详细:" + v.tripDet + ";"
  699. }
  700. $('#rb_family').append($('<div class="weui-media-box weui-media-box_text" style="height: auto">\n' +
  701. ' <h4 class="weui-media-box__title">' + userName + '&nbsp;&nbsp;' + grender + '&nbsp;&nbsp;&nbsp;' + age + '&nbsp;&nbsp;<a style="color: #bc4246" onclick=\'deleteSuspected(' + JSON.stringify(v.suspectedId) + ')\'>删除</a>\n' +
  702. ' &nbsp;&nbsp;<a style="color: #2a62bc" onclick=\'updateSuspected(' + JSON.stringify(v.suspectedId) + ')\'>修改</a></h4>\n' +
  703. ' <div style="height: auto">' + familyStatus + medical + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + scoreRezult + workLocal + todayLocal + isTrip + tripDet + '</>\n' +
  704. ' </div>\n' +
  705. ' '));
  706. }
  707. function ribao_add() {
  708. $('#btnAdd').on('click', function () {
  709. if ($('#ribao')[0].style.display == 'none') {
  710. $('#notOpenRibao').toggle();
  711. $('#ribao')[0].style.display = '';
  712. } else {
  713. $('#notOpenRibao')[0].style.display = '';
  714. $('#ribao')[0].style.display = 'none';
  715. }
  716. //基本情况
  717. $("input[name='checkbox1']").removeAttr("checked");
  718. $("input[name='checkbox2']").removeAttr("checked");
  719. $("input[name='checkbox3']").removeAttr("checked");
  720. $("input[name='checkbox4']").removeAttr("checked");
  721. $("input[name='checkbox5']").removeAttr("checked");
  722. $("input[name='checkbox6']").removeAttr("checked");
  723. $("input[name='checkbox7']").removeAttr("checked");
  724. $("#switchQuezhen").val(getMedical(0));
  725. $("#switchQuezhen").attr("data-values", 0);
  726. $("#switchDanjiangeli").val(getSingleRoom(0));
  727. $("#switchDanjiangeli").attr("data-values", 0);
  728. $("#js_input_user_tiwen").val(0);
  729. $("#js_input_user_kesou").val(getCough(0));
  730. $("#js_input_user_kesou").attr("data-values", 0);
  731. $("#js_input_user_jirou").val(getMuscle(0));
  732. $("#js_input_user_jirou").attr("data-values", 0);
  733. $("#js_input_user_huxi").val(getDyspnea(0));
  734. $("#js_input_user_huxi").attr("data-values", 0);
  735. $("#js_input_user_fali").val(getFatigue(0));
  736. $("#js_input_user_fali").attr("data-values", 0);
  737. $("#js_input_user_fuxie").val(getDiarrhea(0));
  738. $("#js_input_user_fuxie").attr("data-values", 0);
  739. $("#js_input_sf").val(getIsTrip(0));
  740. $("#js_input_sf").attr("data-values", 0);
  741. $('#none')[0].style.display = 'none';
  742. $('#tabtr').empty();
  743. // $("#suspectedId").val("");
  744. // $("#js_input_gzzd").val("");
  745. // $("#js_input_jrszd").val("");
  746. // $('#js_input_mddq').attr("disabled","disabled");
  747. // $('#js_input_jrszq').attr("disabled","disabled");
  748. // $('#js_input_qtdd').attr("disabled","disabled");
  749. // $('#js_input_cfdq').attr("disabled","disabled");
  750. // var userId = $("#userId").val();
  751. // //获取用户家人
  752. // $.ajax({
  753. // url: '/home/selectAddSuspected',
  754. // get: "get",
  755. // data: {
  756. // "userCreate": userId
  757. // },
  758. // success: function (data) {
  759. // if (data != null || data != '') {
  760. // //存在
  761. // var suspected = data;
  762. // $("#js_input_user_sex").val(getGreder(suspected.grender));
  763. // $("#js_input_user_sex").attr("data-values", suspected.grender);
  764. // $("#js_input_user_name").val(suspected.userName);
  765. // $("#js_input_user_age").val(suspected.age);
  766. // //基本情况
  767. // if (suspected.familyStatus != "") {
  768. // var familyStatusList = suspected.familyStatus.split(",");
  769. // if (familyStatusList[0] == 1)
  770. // $("input[name='checkbox1']").prop("checked", "checked");
  771. // else
  772. // $("input[name='checkbox1']").removeAttr("checked");
  773. // if (familyStatusList[1] == 1)
  774. // $("input[name='checkbox2']").prop("checked", "checked");
  775. // else
  776. // $("input[name='checkbox2']").removeAttr("checked");
  777. // if (familyStatusList[2] == 1)
  778. // $("input[name='checkbox3']").prop("checked", "checked");
  779. // else
  780. // $("input[name='checkbox3']").removeAttr("checked");
  781. // if (familyStatusList[3] == 1)
  782. // $("input[name='checkbox4']").prop("checked", "checked");
  783. // else
  784. // $("input[name='checkbox4']").removeAttr("checked");
  785. // if (familyStatusList[4] == 1)
  786. // $("input[name='checkbox5']").prop("checked", "checked");
  787. // else
  788. // $("input[name='checkbox5']").removeAttr("checked");
  789. // if (familyStatusList[5] == 1)
  790. // $("input[name='checkbox6']").prop("checked", "checked");
  791. // else
  792. // $("input[name='checkbox6']").removeAttr("checked");
  793. // if (familyStatusList[6] == 1)
  794. // $("input[name='checkbox7']").prop("checked", "checked");
  795. // else
  796. // $("input[name='checkbox7']").removeAttr("checked");
  797. //
  798. // }
  799. //
  800. // $("#switchQuezhen").val(getMedical(suspected.medical));
  801. // $("#switchQuezhen").attr("data-values", suspected.medical);
  802. //
  803. // $("#switchDanjiangeli").val(getSingleRoom(suspected.singleRoom));
  804. // $("#switchDanjiangeli").attr("data-values", suspected.singleRoom);
  805. //
  806. // $("#js_input_user_tiwen").val(suspected.temperature);
  807. //
  808. // $("#js_input_user_kesou").val(getCough(suspected.cough));
  809. // $("#js_input_user_kesou").attr("data-values", suspected.cough);
  810. //
  811. // $("#js_input_user_jirou").val(getMuscle(suspected.muscle));
  812. // $("#js_input_user_jirou").attr("data-values", suspected.muscle);
  813. //
  814. // $("#js_input_user_huxi").val(getDyspnea(suspected.dyspnea));
  815. // $("#js_input_user_huxi").attr("data-values", suspected.dyspnea);
  816. //
  817. // $("#js_input_user_fali").val(getFatigue(suspected.fatigue));
  818. // $("#js_input_user_fali").attr("data-values", suspected.fatigue);
  819. //
  820. // $("#js_input_user_fuxie").val(getDiarrhea(suspected.diarrhea));
  821. // $("#js_input_user_fuxie").attr("data-values", suspected.diarrhea);
  822. //
  823. // $("#shuruqita").val(suspected.others);
  824. // $("#js_input_score_rezult").val(getScoreRezult(suspected.scoreRezult, suspected.temperatureScore));
  825. // $("#js_input_score_rezult_value").val(suspected.scoreRezult);
  826. // $("#js_input_temperature_score").val(suspected.temperatureScore);
  827. // $("#js_input_score_histroy").val(suspected.scoreHistroy);
  828. // $("#js_input_score").val(suspected.score);
  829. //
  830. // $("#js_input_sf").val(getIsTrip(0));
  831. // $("#js_input_sf").attr("data-values", 0);
  832. // $('#none')[0].style.display = 'none';
  833. // }
  834. // else {
  835. // //基本情况
  836. // $("input[name='checkbox1']").removeAttr("checked");
  837. // $("input[name='checkbox2']").removeAttr("checked");
  838. // $("input[name='checkbox3']").removeAttr("checked");
  839. // $("input[name='checkbox4']").removeAttr("checked");
  840. // $("input[name='checkbox5']").removeAttr("checked");
  841. // $("input[name='checkbox6']").removeAttr("checked");
  842. // $("input[name='checkbox7']").removeAttr("checked");
  843. //
  844. // $("#switchQuezhen").val(getMedical(0));
  845. // $("#switchQuezhen").attr("data-values", 0);
  846. //
  847. // $("#switchDanjiangeli").val(getSingleRoom(0));
  848. // $("#switchDanjiangeli").attr("data-values", 0);
  849. //
  850. // $("#js_input_user_tiwen").val(0);
  851. //
  852. // $("#js_input_user_kesou").val(getCough(0));
  853. // $("#js_input_user_kesou").attr("data-values", 0);
  854. //
  855. // $("#js_input_user_jirou").val(getMuscle(0));
  856. // $("#js_input_user_jirou").attr("data-values", 0);
  857. //
  858. // $("#js_input_user_huxi").val(getDyspnea(0));
  859. // $("#js_input_user_huxi").attr("data-values", 0);
  860. //
  861. // $("#js_input_user_fali").val(getFatigue(0));
  862. // $("#js_input_user_fali").attr("data-values", 0);
  863. //
  864. // $("#js_input_user_fuxie").val(getDiarrhea(0));
  865. // $("#js_input_user_fuxie").attr("data-values", 0);
  866. //
  867. //
  868. // // $("#js_input_cxfs").empty();
  869. // // $("#js_input_cfd").empty();
  870. // // $("#js_input_mdd").empty();
  871. // // $('#js_input_cxfsq').val("");
  872. // // $('#js_input_cfdq').val("");
  873. // // $('#js_input_mddq').val("");
  874. // // listcx.splice(0,listcx.length);
  875. // // $('#tabtr').empty();
  876. // // $("#js_input_qtdd").val("");
  877. // // $("#js_input_jrszq").val("");
  878. // // $("#js_input_sf").val("");
  879. // $("#js_input_sf").val(getIsTrip(0));
  880. // $("#js_input_sf").attr("data-values", 0);
  881. // $('#none')[0].style.display = 'none';
  882. // $('#tabtr').empty();
  883. // // $("#suspectedId").val("");
  884. // // $("#js_input_gzzd").val("");
  885. // // $("#js_input_jrszd").val("");
  886. // // $('#js_input_mddq').attr("disabled","disabled");
  887. // // $('#js_input_jrszq').attr("disabled","disabled");
  888. // // $('#js_input_qtdd').attr("disabled","disabled");
  889. // // $('#js_input_cfdq').attr("disabled","disabled");
  890. //
  891. // }
  892. // },
  893. // });
  894. });
  895. }
  896. function tt() {
  897. alert($("input[name='radio']:checked").val())
  898. }
  899. function ribao_cancel() {
  900. $('#cancel').on('click', function () {
  901. listcx.splice(0, listcx.length);
  902. $('#tabtr').empty();
  903. $("#js_input_cfd").val("");
  904. $("#js_input_cfd").attr("data-values", "");
  905. $("#js_input_mdd").val("");
  906. $("#js_input_mdd").attr("data-values", "");
  907. $("#js_input_cxfs").val("");
  908. $("#js_input_cxfs").attr("data-values", "");
  909. $("#js_input_gzzd").val("");
  910. $("#js_input_gzzd").attr("data-values", "");
  911. $("#js_input_jrszd").val("");
  912. $("#js_input_jrszd").attr("data-values", "");
  913. $("#js_input_sf").val("");
  914. $("#js_input_sf").attr("data-values", "");
  915. $("#js_input_qtdd").val("");
  916. $("#js_input_jrszq").val("");
  917. $("#js_input_cfdq").val("");
  918. $("#js_input_mddq").val("");
  919. $("#js_input_cxfsq").val("");
  920. if ($('#ribao')[0].style.display == 'none') {
  921. $('#notOpenRibao').toggle();
  922. $('#ribao')[0].style.display = '';
  923. } else {
  924. $('#notOpenRibao')[0].style.display = '';
  925. $('#ribao')[0].style.display = 'none';
  926. }
  927. clearShow();
  928. });
  929. }
  930. function ribaoCommit() {
  931. if (cantijiao == false) {
  932. return
  933. }
  934. cantijiao == false
  935. var sf = $("#js_input_sf").attr("data-values") == undefined ? 3 : $("#js_input_sf").attr("data-values");
  936. if (listcx.length == 0 && sf == 1) {
  937. $.alert("请添加出行");
  938. return;
  939. }
  940. var suspectedId = $("#suspectedId").val();
  941. var userId = $("#userId").val();
  942. var userName = $("#js_input_user_name").val();
  943. var grender = $("#js_input_user_sex").attr("data-values") == undefined ? 0 : $("#js_input_user_sex").attr("data-values");
  944. var age = $("#js_input_user_age").val();
  945. //不能同时选择服用和未服用
  946. if ($("input[name='checkbox1']:checked").val() == "on" && $("input[name='checkbox2']:checked").val() == "on") {
  947. $.alert("心脑血管不能同时选择服用和未服用");
  948. return;
  949. }
  950. //男性不能选择妊娠期
  951. if ($("#js_input_user_sex").attr("data-values") == 1 && $("input[name='checkbox7']:checked").val() == "on") {
  952. $.alert("男性不能选择妊娠期");
  953. return;
  954. }
  955. //家庭状态
  956. var familyStatus = "";
  957. if ($("input[name='checkbox1']:checked").val() == "on")
  958. familyStatus += "1";
  959. else
  960. familyStatus += "0";
  961. if ($("input[name='checkbox2']:checked").val() == "on")
  962. familyStatus += ",1";
  963. else
  964. familyStatus += ",0";
  965. if ($("input[name='checkbox3']:checked").val() == "on")
  966. familyStatus += ",1";
  967. else
  968. familyStatus += ",0";
  969. if ($("input[name='checkbox4']:checked").val() == "on")
  970. familyStatus += ",1";
  971. else
  972. familyStatus += ",0";
  973. if ($("input[name='checkbox5']:checked").val() == "on")
  974. familyStatus += ",1";
  975. else
  976. familyStatus += ",0";
  977. if ($("input[name='checkbox6']:checked").val() == "on")
  978. familyStatus += ",1";
  979. else
  980. familyStatus += ",0";
  981. if ($("input[name='checkbox7']:checked").val() == "on")
  982. familyStatus += ",1";
  983. else
  984. familyStatus += ",0";
  985. var medical = $("input[name='radio']:checked").val();
  986. console.log(medical)
  987. if (medical == undefined) {
  988. $.alert("请选择新冠肺炎");
  989. return;
  990. }
  991. //var familyStatus = $("#js_input_user_status").attr("data-values") == undefined ? 0 : $("#js_input_user_status").attr("data-values");
  992. //var statusDesp = $("#jibenmiaoshu").val() == undefined ? "" : $("#jibenmiaoshu").val();
  993. var statusDesp = "";
  994. // var medical = $("#switchQuezhen").attr("data-values") == undefined ? 0 : $("#switchQuezhen").attr("data-values");
  995. var medicalzz = $("#switchQuezhen_zz").attr("data-values") == undefined ? 0 : $("#switchQuezhen_zz").attr("data-values");
  996. var singleRoom = $("#switchDanjiangeli").attr("data-values") == undefined ? 0 : $("#switchDanjiangeli").attr("data-values");
  997. var temperature = $("#js_input_user_tiwen").val() == "" ? 0 : $("#js_input_user_tiwen").val();
  998. var cough = $("#js_input_user_kesou").attr("data-values") == undefined ? 0 : $("#js_input_user_kesou").attr("data-values");
  999. var muscle = $("#js_input_user_jirou").attr("data-values") == undefined ? 0 : $("#js_input_user_jirou").attr("data-values");
  1000. var dyspnea = $("#js_input_user_huxi").attr("data-values") == undefined ? 0 : $("#js_input_user_huxi").attr("data-values");
  1001. var fatigue = $("#js_input_user_fali").attr("data-values") == undefined ? 0 : $("#js_input_user_fali").attr("data-values");
  1002. var diarrhea = $("#js_input_user_fuxie").attr("data-values") == undefined ? 0 : $("#js_input_user_fuxie").attr("data-values");
  1003. var others = $("#shuruqita").val() == undefined ? "" : $("#shuruqita").val();
  1004. var scoreRezult = $("#js_input_score_rezult_value").val() == undefined ? "" : $("#js_input_score_rezult_value").val();
  1005. var temperatureScore = $("#js_input_temperature_score").val() == undefined ? "" : $("#js_input_temperature_score").val();
  1006. var scoreHistroy = $("#js_input_score_histroy").val() == undefined ? "" : $("#js_input_score_histroy").val();
  1007. var score = $("#js_input_score").val() == undefined ? "" : $("#js_input_score").val();
  1008. if (userName == undefined || userName == '') {
  1009. $.alert("请填写姓名");
  1010. return;
  1011. }
  1012. if (grender == 0) {
  1013. $.alert("请填写性别");
  1014. return;
  1015. }
  1016. if (age == undefined || age == '') {
  1017. $.alert("请填写年龄");
  1018. return;
  1019. }
  1020. if (age > 150 || age < 0) {
  1021. $.alert("请填写正确的年龄");
  1022. return;
  1023. }
  1024. if (temperature <= 0) {
  1025. $.alert("请填写体温");
  1026. return;
  1027. }
  1028. if (temperature > 50 || temperature < 30) {
  1029. $.alert("请填写正确的体温");
  1030. return;
  1031. }
  1032. //如果是凌云
  1033. var uptownId = $("#uptownId").val();
  1034. if (uptownId == xiaoquId || uptownId == ceshixiaoquId) {
  1035. //lingyun
  1036. var gzzd = $("#js_input_gzzd").attr("data-values") == undefined ? 0 : $("#js_input_gzzd").attr("data-values");
  1037. var qtdd = $("#js_input_qtdd").val();
  1038. var workLocal = "";
  1039. var workLocalOther = "";
  1040. if (gzzd == 0) {
  1041. $.alert("请选择工作驻地");
  1042. return;
  1043. } else if (gzzd == 4 && qtdd == "") {
  1044. $.alert("请填写工作驻地");
  1045. return;
  1046. } else if (gzzd != 0 && gzzd != 4) {
  1047. if (gzzd == 1) {
  1048. workLocal = 1;
  1049. } else if (gzzd == 2) {
  1050. workLocal = 2;
  1051. } else if (gzzd == 3) {
  1052. workLocal = 3;
  1053. }
  1054. } else if (gzzd == 4 && qtdd != "") {
  1055. workLocal = 4;
  1056. workLocalOther = qtdd;
  1057. }
  1058. //var listcx = [];
  1059. //var person=new Object();
  1060. var jrszd = $("#js_input_jrszd").attr("data-values") == undefined ? 0 : $("#js_input_jrszd").attr("data-values");
  1061. var jrszq = $("#js_input_jrszq").val();
  1062. var todyLocal = "";
  1063. var todyLocalOther = "";
  1064. if (jrszd == 0) {
  1065. $.alert("请选择今晚住地");
  1066. return;
  1067. } else if (jrszd == 4 && jrszq == "") {
  1068. $.alert("请填写今晚住地");
  1069. return;
  1070. } else if (jrszd != 0 && jrszd != 4) {
  1071. if (jrszd == 1) {
  1072. todyLocal = 1;
  1073. } else if (jrszd == 2) {
  1074. todyLocal = 2;
  1075. } else if (jrszd == 3) {
  1076. todyLocal = 3;
  1077. }
  1078. } else if (jrszd == 4 && jrszq != "") {
  1079. todyLocal = 4;
  1080. todyLocalOther = jrszq;
  1081. }
  1082. var sf = $("#js_input_sf").attr("data-values") == undefined ? 3 : $("#js_input_sf").attr("data-values");
  1083. var isTrip = "";
  1084. if (sf == 3) {
  1085. $.alert("请选择是否出行");
  1086. return;
  1087. } else {
  1088. isTrip = sf;
  1089. }
  1090. } else {
  1091. workLocal = 0;
  1092. workLocalOther = "";
  1093. todyLocal = 0;
  1094. todyLocalOther = "";
  1095. isTrip = 0;
  1096. listcx = [];
  1097. }
  1098. var data = {
  1099. "suspectedId": suspectedId,
  1100. "userCreate": userId,
  1101. "userName": userName,
  1102. "grender": grender,
  1103. "age": age,
  1104. "familyStatus": familyStatus,
  1105. "statusDesp": statusDesp,
  1106. "medical": medical,
  1107. "singleRoom": singleRoom,
  1108. "temperature": temperature,
  1109. "cough": cough,
  1110. "muscle": muscle,
  1111. "dyspnea": dyspnea,
  1112. "fatigue": fatigue,
  1113. "diarrhea": diarrhea,
  1114. "others": others,
  1115. "scoreRezult": scoreRezult,
  1116. "temperatureScore": temperatureScore,
  1117. "scoreHistroy": scoreHistroy,
  1118. "score": score,
  1119. "workLocal": workLocal,
  1120. "workLocalOther": workLocalOther,
  1121. "todayLocal": todyLocal,
  1122. "todayLocalOther": todyLocalOther,
  1123. "isTrip": isTrip,
  1124. "tripDet": listcx,
  1125. };
  1126. $.ajax({
  1127. url: '/home/addRibaoTrip',
  1128. type: "post",
  1129. contentType: "application/json; charset=utf-8",
  1130. data: JSON.stringify(data),
  1131. success: function (data) {
  1132. if (data.msgReport == "2") {
  1133. $.toast("家人姓名不能重复,如果重复,可以带上称呼");
  1134. cantijiao == false
  1135. return;
  1136. }
  1137. if ($('#ribao')[0].style.display == 'none') {
  1138. $('#notOpenRibao').toggle();
  1139. $('#ribao')[0].style.display = '';
  1140. } else {
  1141. $('#notOpenRibao')[0].style.display = '';
  1142. $('#ribao')[0].style.display = 'none';
  1143. }
  1144. $('#ribao_jinrijujian').empty();
  1145. $('#ribao_jinrijujian').append(data.safetyNum);
  1146. ribao_refrash();
  1147. clearShow();
  1148. canSahngbao = true;
  1149. document.getElementById("btn_shangbao").style['background-color'] = "#0bb20c";
  1150. document.getElementById("txt_shangbao").style['color'] = "red";
  1151. $('#txt_shangbao').empty();
  1152. $('#txt_shangbao').append("今日未上报");
  1153. $('#txt_shangbaotime').empty();
  1154. },
  1155. });
  1156. }
  1157. function deleteSuspected(suspectedId) {
  1158. $.ajax({
  1159. url: '/home/deleteSuspected',
  1160. type: "post",
  1161. data: {
  1162. "suspectedId": suspectedId
  1163. },
  1164. success: function (data) {
  1165. $('#ribao_jinrijujian').empty();
  1166. $('#ribao_jinrijujian').append(data.safetyNum);
  1167. //今日未上报
  1168. canSahngbao = true;
  1169. document.getElementById("btn_shangbao").style['background-color'] = "#0bb20c";
  1170. document.getElementById("txt_shangbao").style['color'] = "red";
  1171. $('#txt_shangbao').empty();
  1172. $('#txt_shangbao').append("今日未上报");
  1173. $('#txt_shangbaotime').empty();
  1174. ribao_refrash();
  1175. },
  1176. });
  1177. }
  1178. function updateSuspected(suspectedId) {
  1179. $("#suspectedId").val("");
  1180. if ($('#ribao')[0].style.display == 'none') {
  1181. $('#notOpenRibao').toggle();
  1182. $('#ribao')[0].style.display = '';
  1183. } else {
  1184. $('#notOpenRibao')[0].style.display = '';
  1185. $('#ribao')[0].style.display = 'none';
  1186. }
  1187. $.ajax({
  1188. url: '/home/selectSuspected',
  1189. get: "get",
  1190. data: {
  1191. "suspectedId": suspectedId
  1192. },
  1193. success: function (data) {
  1194. // console.log(data);
  1195. if (data) {
  1196. var suspected = data;
  1197. $("#suspectedId").val(suspected.suspectedId);
  1198. $("#js_input_user_sex").val(getGreder(suspected.grender));
  1199. $("#js_input_user_sex").attr("data-values", suspected.grender);
  1200. $("#js_input_user_name").val(suspected.userName);
  1201. $("#js_input_user_age").val(suspected.age);
  1202. //基本情况
  1203. if (suspected.familyStatus != "") {
  1204. var familyStatusList = suspected.familyStatus.split(",");
  1205. if (familyStatusList[0] == 1)
  1206. $("input[name='checkbox1']").prop("checked", "checked");
  1207. else
  1208. $("input[name='checkbox1']").removeAttr("checked");
  1209. if (familyStatusList[1] == 1)
  1210. $("input[name='checkbox2']").prop("checked", "checked");
  1211. else
  1212. $("input[name='checkbox2']").removeAttr("checked");
  1213. if (familyStatusList[2] == 1)
  1214. $("input[name='checkbox3']").prop("checked", "checked");
  1215. else
  1216. $("input[name='checkbox3']").removeAttr("checked");
  1217. if (familyStatusList[3] == 1)
  1218. $("input[name='checkbox4']").prop("checked", "checked");
  1219. else
  1220. $("input[name='checkbox4']").removeAttr("checked");
  1221. if (familyStatusList[4] == 1)
  1222. $("input[name='checkbox5']").prop("checked", "checked");
  1223. else
  1224. $("input[name='checkbox5']").removeAttr("checked");
  1225. if (familyStatusList[5] == 1)
  1226. $("input[name='checkbox6']").prop("checked", "checked");
  1227. else
  1228. $("input[name='checkbox6']").removeAttr("checked");
  1229. if (familyStatusList[6] == 1)
  1230. $("input[name='checkbox7']").prop("checked", "checked");
  1231. else
  1232. $("input[name='checkbox7']").removeAttr("checked");
  1233. }
  1234. // $("#js_input_user_status").val(getFamilyStatus(suspected.familyStatus));
  1235. // $("#js_input_user_status").attr("data-values", suspected.familyStatus);
  1236. // $("#jibenmiaoshu").val(suspected.statusDesp);
  1237. $("#switchQuezhen").val(getMedical(suspected.medical));
  1238. $("#switchQuezhen").attr("data-values", suspected.medical);
  1239. $("#switchDanjiangeli").val(getSingleRoom(suspected.singleRoom));
  1240. $("#switchDanjiangeli").attr("data-values", suspected.singleRoom);
  1241. $("#js_input_user_tiwen").val(suspected.temperature);
  1242. $("#js_input_user_kesou").val(getCough(suspected.cough));
  1243. $("#js_input_user_kesou").attr("data-values", suspected.cough);
  1244. $("#js_input_user_jirou").val(getMuscle(suspected.muscle));
  1245. $("#js_input_user_jirou").attr("data-values", suspected.muscle);
  1246. $("#js_input_user_huxi").val(getDyspnea(suspected.dyspnea));
  1247. $("#js_input_user_huxi").attr("data-values", suspected.dyspnea);
  1248. $("#js_input_user_fali").val(getFatigue(suspected.fatigue));
  1249. $("#js_input_user_fali").attr("data-values", suspected.fatigue);
  1250. $("#js_input_user_fuxie").val(getDiarrhea(suspected.diarrhea));
  1251. $("#js_input_user_fuxie").attr("data-values", suspected.diarrhea);
  1252. $("#shuruqita").val(suspected.others);
  1253. $("#js_input_score_rezult").val(getScoreRezult(suspected.scoreRezult, suspected.temperatureScore));
  1254. $("#js_input_score_rezult_value").val(suspected.scoreRezult);
  1255. $("#js_input_temperature_score").val(suspected.temperatureScore);
  1256. $("#js_input_score_histroy").val(suspected.scoreHistroy);
  1257. $("#js_input_score").val(suspected.score);
  1258. //行程
  1259. $("#js_input_gzzd").val(getLocal(suspected.workLocal));
  1260. $("#js_input_gzzd").attr("data-values", suspected.workLocal);
  1261. if (suspected.workLocal != 4) {
  1262. $('#js_input_qtdd').attr("disabled", "disabled");
  1263. $("#js_input_qtdd").val("");
  1264. } else {
  1265. $('#js_input_qtdd').removeAttr("disabled")
  1266. }
  1267. $("#js_input_qtdd").val(suspected.workLocalOther);
  1268. $("#js_input_jrszd").val(getLocal(suspected.todayLocal));
  1269. $("#js_input_jrszd").attr("data-values", suspected.todayLocal);
  1270. if (suspected.todayLocal != 4) {
  1271. $('#js_input_jrszq').attr("disabled", "disabled");
  1272. $("#js_input_jrszq").val("");
  1273. } else {
  1274. $('#js_input_jrszq').removeAttr("disabled")
  1275. }
  1276. $("#js_input_jrszq").val(suspected.todayLocalOther);
  1277. $("#js_input_sf").val(getIsTrip(suspected.isTrip));
  1278. $("#js_input_sf").attr("data-values", suspected.isTrip);
  1279. if (suspected.isTrip == 0)
  1280. $('#none')[0].style.display = 'none';
  1281. else
  1282. $('#none')[0].style.display = '';
  1283. //详细
  1284. $.ajax({
  1285. url: '/home/selectTripSuspected',
  1286. get: "get",
  1287. data: {
  1288. "suspectedId": suspectedId
  1289. },
  1290. success: function (data) {
  1291. if (data.data.length != 0) {
  1292. }
  1293. listcx.splice(0, listcx.length);
  1294. $('#tabtr').empty();
  1295. var person = new Object();
  1296. // var xxIds = [];
  1297. // var xxName = [
  1298. // "序号",
  1299. // "出发地",
  1300. // "目的地",
  1301. // "出行方式",
  1302. // "车次/航班/车牌",
  1303. // "操作"
  1304. // ];
  1305. // for (var i = 0; i < xxName.length; i++) {
  1306. // xxIds.push({
  1307. // name: xxName[i]
  1308. // });
  1309. // }
  1310. // $('#tabtr').empty();
  1311. // var html = "<tr style='background-color: #f8f8f8;'>";
  1312. // for (var i = 0; i < xxIds.length; i++) {
  1313. // html += "<th>" + xxIds[i].name + "</th>";
  1314. // }
  1315. // html += "</tr>"
  1316. data.data.forEach(function (v) {
  1317. {
  1318. person.startLocal = v.startLocal;
  1319. person.startLocalOther = v.startLocalOther;
  1320. person.endlocal = v.endLocal;
  1321. person.endLocalOther = v.endLocalOther;
  1322. person.tripType = v.tripType;
  1323. person.startLocalStr = getLocalOther(v.startLocal, v.startLocalOther);
  1324. person.endlocalStr = getLocalOther(v.endLocal, v.endLocalOther);
  1325. person.tripTypeStr = getTripType(v.tripType);
  1326. person.tripTypeDesp = v.tripTypeDesp;
  1327. listcx.push(person);
  1328. // html += "<tr>";
  1329. // html += "<td style='text-align: center;'>" + v.sort + "</td>";
  1330. // html += "<td style='text-align: center;' >" + getLocalOther(v.startLocal, v.startLocalOther) + " </td>";
  1331. // html += "<td style='text-align: center;' >" + getLocalOther(v.endLocal, v.endLocalOther) + " </td>";
  1332. // html += "<td style='text-align: center;' >" + getTripType(v.tripType) + " </td>";
  1333. // html += "<td style='text-align: center;' >" + v.tripTypeDesp + " </td>";
  1334. // 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>";
  1335. // html += "</tr>";
  1336. // $("#tabtr").html(html);
  1337. }
  1338. });
  1339. tab();
  1340. },
  1341. });
  1342. }
  1343. },
  1344. });
  1345. }
  1346. function addReport() {
  1347. if (!canSahngbao) {
  1348. return;
  1349. }
  1350. var userId = $("#userId").val();
  1351. $.ajax({
  1352. url: '/home/addReport',
  1353. type: "post",
  1354. data: {
  1355. "userCreate": userId,
  1356. },
  1357. success: function (data) {
  1358. $.toast(data.msg)
  1359. var date = new Date();
  1360. var year = date.getFullYear();
  1361. var month = date.getMonth() + 1;
  1362. var day = date.getDate();
  1363. var hour = date.getHours();
  1364. var minute = date.getMinutes();
  1365. var second = date.getSeconds();
  1366. var time = year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second
  1367. if (data.msg == "操作成功") {
  1368. canSahngbao = false;
  1369. document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
  1370. document.getElementById("txt_shangbao").style['color'] = "#0bb20c";
  1371. document.getElementById("txt_shangbaotime").style['color'] = "#0bb20c";
  1372. $('#txt_shangbao').empty();
  1373. $('#txt_shangbao').append("今日已上报");
  1374. $('#txt_shangbaotime').empty();
  1375. $('#txt_shangbaotime').append("上报时间:" + time);
  1376. }
  1377. },
  1378. });
  1379. }
  1380. $("#my-input-ribao").calendar({
  1381. dateFormat: 'yyyy-mm-dd',
  1382. inputReadOnly: false,
  1383. onChange: function (p, values, displayValues) {
  1384. var reportDate = values.toString();
  1385. var userId = $("#userId").val();
  1386. $.ajax({
  1387. url: '/home/home/queryRibaoReportDate',
  1388. data: {
  1389. "userCreate": userId,
  1390. "reportDate": reportDate,
  1391. },
  1392. type: 'GET',
  1393. success: function (data) {
  1394. if (data.data == undefined || data.data == "") {
  1395. $('#ribao_famliy').empty();
  1396. }
  1397. else {
  1398. if (data.data.length > 0) {
  1399. $('#ribao_famliy').empty();
  1400. data.data.forEach(function (v) {
  1401. helpValue1(v);
  1402. });
  1403. } else {
  1404. }
  1405. }
  1406. },
  1407. error: function () {
  1408. }
  1409. });
  1410. }
  1411. });
  1412. function helpValue1(v) {
  1413. var userName = v.userName + ":";
  1414. var grender = getGreder(v.grender);
  1415. var age = v.age;
  1416. var familyStatus = "";
  1417. if (v.familyStatus != 0)
  1418. familyStatus = "基本状况:" + getFamilyStatus(v.familyStatus) + ";";
  1419. var medical = "";
  1420. if (v.medical != 0)
  1421. medical = "新冠肺炎:" + getMedical(v.medical) + ";";
  1422. var singleRoom = "";
  1423. var uptownId = $("#uptownId").val();
  1424. if (uptownId != xiaoquId && uptownId != ceshixiaoquId) {
  1425. if (v.singleRoom != 0)
  1426. singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
  1427. if (v.singleRoom == 0 && v.medical != 0)
  1428. singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
  1429. }
  1430. var temperature = "体温:" + v.temperature + ";";
  1431. var cough = "";
  1432. if (v.cough != 0)
  1433. cough = "咳嗽现象:" + getCough(v.cough) + ";";
  1434. var muscle = "";
  1435. if (v.muscle != 0)
  1436. muscle = "肌肉酸痛:" + getMuscle(v.muscle) + ";";
  1437. var dyspnea = "";
  1438. if (v.dyspnea != 0)
  1439. dyspnea = "呼吸困难:" + getDyspnea(v.dyspnea) + ";";
  1440. var fatigue = "";
  1441. if (v.fatigue != 0)
  1442. fatigue = "乏力现象:" + getFatigue(v.fatigue) + ";";
  1443. var diarrhea = "";
  1444. if (v.diarrhea != 0)
  1445. diarrhea = "腹泻现象:" + getDiarrhea(v.diarrhea) + ";";
  1446. var others = "";
  1447. if (v.others != "")
  1448. others = "其他描述:" + v.others + ";";
  1449. var scoreRezult = "";
  1450. if (v.scoreRezult != 0)
  1451. scoreRezult = "评估结果:" + getScoreRezult(v.scoreRezult, v.temperatureScore) + ";";
  1452. var workLocal = "";
  1453. var todayLocal = "";
  1454. var isTrip = "";
  1455. var tripDet = "";
  1456. var uptownId = $("#uptownId").val();
  1457. if (uptownId == xiaoquId || uptownId == ceshixiaoquId) {
  1458. if (v.workLocal != 0) {
  1459. if (v.workLocal < 4)
  1460. workLocal = "工作驻地:" + getLocal(v.workLocal) + ";";
  1461. else
  1462. workLocal = "工作驻地:" + v.workLocalOther + ";";
  1463. }
  1464. if (v.todayLocal != 0) {
  1465. if (v.todayLocal < 4)
  1466. todayLocal = "今晚住地:" + getLocal(v.todayLocal) + ";";
  1467. else
  1468. todayLocal = "今晚住地:" + v.todayLocalOther + ";";
  1469. }
  1470. if (v.isTrip != undefined)
  1471. isTrip = "是否出行:" + getIsTrip(v.isTrip) + ";"
  1472. if (v.tripDet != undefined)
  1473. tripDet = "出行详细:" + v.tripDet + ";"
  1474. }
  1475. $('#ribao_famliy').append($('<div class="weui-media-box weui-media-box_text" style="height: auto">\n' +
  1476. ' <h4 class="weui-media-box__title">' + userName + '&nbsp;&nbsp;&nbsp;' + grender + '&nbsp;&nbsp;&nbsp;' + age + '</h4>\n' +
  1477. ' <div style="height: auto">' + familyStatus + medical + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + scoreRezult + workLocal + todayLocal + isTrip + tripDet + '</div>\n' +
  1478. ' </div>\n' +
  1479. ' '));
  1480. }
  1481. function getGreder(greder) {
  1482. if (greder == 1)
  1483. return "男";
  1484. else if (greder == 2)
  1485. return "女";
  1486. return "";
  1487. }
  1488. function getFamilyStatus(familyStatus) {
  1489. var familyStatusList = familyStatus.split(",");
  1490. var familyStatusString = "";
  1491. if (familyStatus == '0,0,0,0,0,0,0')
  1492. familyStatusString += "无病史,";
  1493. else {
  1494. if (familyStatusList[0] == 1)
  1495. familyStatusString += "心脑血管疾病(服用ARB),";
  1496. if (familyStatusList[1] == 1)
  1497. familyStatusString += "心脑血管疾病(未服ARB),";
  1498. if (familyStatusList[2] == 1)
  1499. familyStatusString += "呼吸系统病史,";
  1500. if (familyStatusList[3] == 1)
  1501. familyStatusString += "肿瘤病史,";
  1502. if (familyStatusList[4] == 1)
  1503. familyStatusString += "糖尿病史,";
  1504. if (familyStatusList[5] == 1)
  1505. familyStatusString += "服用过激素药物,";
  1506. if (familyStatusList[6] == 1)
  1507. familyStatusString += "妊娠期,";
  1508. }
  1509. return familyStatusString.substring(0, familyStatusString.length - 1);
  1510. }
  1511. function getCough(cough) {
  1512. if (cough == 0)
  1513. return "无咳嗽";
  1514. else if (cough == 1)
  1515. return "偶尔短暂咳嗽";
  1516. else if (cough == 2)
  1517. return "咳嗽轻度影响生活";
  1518. else if (cough == 3)
  1519. return "咳嗽严重影响生活";
  1520. return "";
  1521. }
  1522. function getMuscle(muscle) {
  1523. if (muscle == 0)
  1524. return "无";
  1525. else if (muscle == 1)
  1526. return "按压有";
  1527. else if (muscle == 2)
  1528. return "偶尔";
  1529. else if (muscle == 3)
  1530. return "持续有";
  1531. return "";
  1532. }
  1533. function getDyspnea(dyspnea) {
  1534. if (dyspnea == 0)
  1535. return "无";
  1536. else if (dyspnea == 1)
  1537. return "急走或上坡气短";
  1538. else if (dyspnea == 2)
  1539. return "气短而走路变慢";
  1540. else if (dyspnea == 3)
  1541. return "走路数分钟后气短";
  1542. else if (dyspnea == 4)
  1543. return "气短无法离开房间";
  1544. return "";
  1545. }
  1546. function getFatigue(fatigue) {
  1547. if (fatigue == 0)
  1548. return "无";
  1549. else if (fatigue == 1)
  1550. return "体力劳动后不能恢复";
  1551. else if (fatigue == 2)
  1552. return "轻体力活非常累";
  1553. else if (fatigue == 3)
  1554. return "不能正常生活";
  1555. return "";
  1556. }
  1557. function getMedical(medical) {
  1558. if (medical == 0)
  1559. return "无";
  1560. else if (medical == 1)
  1561. return "确诊";
  1562. else if (medical == 2)
  1563. return "疑似";
  1564. else if (medical == 3)
  1565. return "有接触史";
  1566. else if (medical == 4)
  1567. return "解除隔离";
  1568. return "";
  1569. }
  1570. function getSingleRoom(singleRoom) {
  1571. if (singleRoom == 0)
  1572. return "否";
  1573. else if (singleRoom == 1)
  1574. return "是";
  1575. return "";
  1576. }
  1577. function getIsTrip(isTrip) {
  1578. if (isTrip == 0)
  1579. return "否";
  1580. else if (isTrip == 1)
  1581. return "是";
  1582. return "";
  1583. }
  1584. function getLocal(local) {
  1585. if (local == 0)
  1586. return "";
  1587. else if (local == 1)
  1588. return "武汉市";
  1589. else if (local == 2)
  1590. return "宜昌市";
  1591. else if (local == 3)
  1592. return "当阳市";
  1593. else if (local == 4)
  1594. return "其它地点";
  1595. return "";
  1596. }
  1597. function getLocalOther(local, localOther) {
  1598. if (local == 0)
  1599. return "";
  1600. else if (local == 1)
  1601. return "武汉市";
  1602. else if (local == 2)
  1603. return "宜昌市";
  1604. else if (local == 3)
  1605. return "当阳市";
  1606. else if (local == 4)
  1607. return localOther;
  1608. return "";
  1609. }
  1610. function getTripType(tripType) {
  1611. if (tripType == 0)
  1612. return "";
  1613. else if (tripType == 1)
  1614. return "长途汽车";
  1615. else if (tripType == 2)
  1616. return "火车";
  1617. else if (tripType == 3)
  1618. return "飞机";
  1619. else if (tripType == 4)
  1620. return "自驾";
  1621. return "";
  1622. }
  1623. function getDiarrhea(diarrhea) {
  1624. if (diarrhea == 0)
  1625. return "无";
  1626. else if (diarrhea == 1)
  1627. return "轻度腹泻(少于3次)";
  1628. else if (diarrhea == 2)
  1629. return "中度腹泻(4-6次)";
  1630. else if (diarrhea == 3)
  1631. return "重度腹泻(超过6次)";
  1632. return "";
  1633. }
  1634. function clearShow() {
  1635. console.log("qingkong")
  1636. $("#suspectedId").val("");
  1637. $("#js_input_user_sex").val("");
  1638. $("#js_input_user_sex").attr("data-values", "");
  1639. $("#js_input_user_name").val("");
  1640. $("#js_input_user_age").val("");
  1641. $("#js_input_user_status").val("");
  1642. $("#js_input_user_status").attr("data-values", "");
  1643. $("#jibenmiaoshu").val("");
  1644. $("#switchQuezhen").val("");
  1645. $("#switchQuezhen").attr("data-values", "");
  1646. $("#switchQuezhen_zz").val("");
  1647. $("#switchQuezhen_zz").attr("data-values", "");
  1648. $("#switchDanjiangeli").val("");
  1649. $("#switchDanjiangeli").attr("data-values", "");
  1650. $("#js_input_user_tiwen").val("");
  1651. $("#js_input_user_kesou").val("");
  1652. $("#js_input_user_kesou").attr("data-values", "");
  1653. $("#js_input_user_jirou").val("");
  1654. $("#js_input_user_jirou").attr("data-values", "");
  1655. $("#js_input_user_huxi").val("");
  1656. $("#js_input_user_huxi").attr("data-values", "");
  1657. $("#js_input_user_fali").val("");
  1658. $("#js_input_user_fali").attr("data-values", "");
  1659. $("#js_input_user_fuxie").val("");
  1660. $("#js_input_user_fuxie").attr("data-values", "");
  1661. $("#shuruqita").val("");
  1662. $("#js_input_score_rezult").val("");
  1663. $("#js_input_score_rezult_value").val("");
  1664. $("#js_input_temperature_score").val("");
  1665. $("#js_input_score_histroy").val("");
  1666. $("#js_input_score").val("");
  1667. //出行
  1668. $("#js_input_gzzd").val("");
  1669. $("#js_input_gzzd").attr("data-values", "");
  1670. $("#js_input_qtdd").val("");
  1671. $("#js_input_jrszd").val("");
  1672. $("#js_input_jrszd").attr("data-values", "");
  1673. $("#js_input_jrszq").val("");
  1674. $("#js_input_sf").val(getIsTrip(0));
  1675. $("#js_input_sf").attr("data-values", 0);
  1676. $('#none')[0].style.display = 'none';
  1677. }
  1678. //健康评估
  1679. $('#ribao_score').on('click', function () {
  1680. var suspectedId = $("#suspectedId").val();
  1681. var userId = $("#userId").val();
  1682. var userName = $("#js_input_user_name").val();
  1683. var medical = $("input[name='radio']:checked").val() == undefined ? 0 : $("input[name='radio']:checked").val();
  1684. var medicalzz = $("#switchQuezhen_zz").attr("data-values") == undefined ? 0 : $("#switchQuezhen_zz").attr("data-values");
  1685. var temperature = $("#js_input_user_tiwen").val() == "" ? 0 : $("#js_input_user_tiwen").val();
  1686. var cough = $("#js_input_user_kesou").attr("data-values") == undefined ? 0 : $("#js_input_user_kesou").attr("data-values");
  1687. var muscle = $("#js_input_user_jirou").attr("data-values") == undefined ? 0 : $("#js_input_user_jirou").attr("data-values");
  1688. var dyspnea = $("#js_input_user_huxi").attr("data-values") == undefined ? 0 : $("#js_input_user_huxi").attr("data-values");
  1689. var fatigue = $("#js_input_user_fali").attr("data-values") == undefined ? 0 : $("#js_input_user_fali").attr("data-values");
  1690. var diarrhea = $("#js_input_user_fuxie").attr("data-values") == undefined ? 0 : $("#js_input_user_fuxie").attr("data-values");
  1691. if (userName == undefined || userName == '') {
  1692. $.alert("请填写姓名");
  1693. return;
  1694. }
  1695. if (temperature <= 0) {
  1696. $.alert("请填写体温");
  1697. return;
  1698. }
  1699. if (temperature > 50 || temperature < 30) {
  1700. $.alert("请填写正确的体温");
  1701. return;
  1702. }
  1703. $.ajax({
  1704. url: '/home/addScore',
  1705. type: "post",
  1706. data: {
  1707. "userName": userName,
  1708. "suspectedId": suspectedId,
  1709. "userCreate": userId,
  1710. "medical": medical,
  1711. "temperature": temperature,
  1712. "cough": cough,
  1713. "muscle": muscle,
  1714. "dyspnea": dyspnea,
  1715. "fatigue": fatigue,
  1716. "diarrhea": diarrhea,
  1717. },
  1718. success: function (data) {
  1719. if (data == undefined) {
  1720. $('#js_input_score_rezult').empty();
  1721. $('#js_input_score_rezult_value').empty();
  1722. $('#js_input_temperature_score').empty();
  1723. $('#js_input_score_histroy').empty();
  1724. $('#js_input_score').empty();
  1725. }
  1726. else {
  1727. $('#js_input_score_rezult').empty();
  1728. $('#js_input_temperature_score').empty();
  1729. $('#js_input_score_histroy').empty();
  1730. $('#js_input_score').empty();
  1731. var ScoreRezult = getScoreRezult(data.scoreRezult, data.temperatureScore);
  1732. $("#js_input_score_rezult").val(ScoreRezult);
  1733. $("#js_input_score_rezult_value").val(data.scoreRezult);
  1734. $("#js_input_temperature_score").val(data.temperatureScore);
  1735. $("#js_input_score_histroy").val(data.scoreHistory);
  1736. $("#js_input_score").val(data.score);
  1737. }
  1738. },
  1739. });
  1740. });
  1741. function getScoreRezult(scoreRezult, temperatureScore) {
  1742. if (scoreRezult == 0)
  1743. return "未评估";
  1744. else if (scoreRezult == 1) {
  1745. if (temperatureScore > 1)
  1746. return "正常,间隔时间服用退烧药,多休息,多喝水";
  1747. else
  1748. return "正常";
  1749. }
  1750. else if (scoreRezult == 2) {
  1751. if (temperatureScore > 1)
  1752. return "注意观察,间隔时间服用退烧药,多休息,多喝水";
  1753. else
  1754. return "注意观察";
  1755. }
  1756. else if (scoreRezult == 3)
  1757. return "联系社区医生(或者在线问诊)";
  1758. else if (scoreRezult == 4)
  1759. return "尽快就诊";
  1760. return "";
  1761. }