ribao.js 62 KB

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