ribao.js 60 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958
  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. if (medical == undefined) {
  987. $.alert("请选择新冠肺炎");
  988. return;
  989. }
  990. //var familyStatus = $("#js_input_user_status").attr("data-values") == undefined ? 0 : $("#js_input_user_status").attr("data-values");
  991. //var statusDesp = $("#jibenmiaoshu").val() == undefined ? "" : $("#jibenmiaoshu").val();
  992. var statusDesp = "";
  993. // var medical = $("#switchQuezhen").attr("data-values") == undefined ? 0 : $("#switchQuezhen").attr("data-values");
  994. var medicalzz = $("#switchQuezhen_zz").attr("data-values") == undefined ? 0 : $("#switchQuezhen_zz").attr("data-values");
  995. var singleRoom = $("#switchDanjiangeli").attr("data-values") == undefined ? 0 : $("#switchDanjiangeli").attr("data-values");
  996. var temperature = $("#js_input_user_tiwen").val() == "" ? 0 : $("#js_input_user_tiwen").val();
  997. var cough = $("#js_input_user_kesou").attr("data-values") == undefined ? 0 : $("#js_input_user_kesou").attr("data-values");
  998. var muscle = $("#js_input_user_jirou").attr("data-values") == undefined ? 0 : $("#js_input_user_jirou").attr("data-values");
  999. var dyspnea = $("#js_input_user_huxi").attr("data-values") == undefined ? 0 : $("#js_input_user_huxi").attr("data-values");
  1000. var fatigue = $("#js_input_user_fali").attr("data-values") == undefined ? 0 : $("#js_input_user_fali").attr("data-values");
  1001. var diarrhea = $("#js_input_user_fuxie").attr("data-values") == undefined ? 0 : $("#js_input_user_fuxie").attr("data-values");
  1002. var others = $("#shuruqita").val() == undefined ? "" : $("#shuruqita").val();
  1003. var scoreRezult = $("#js_input_score_rezult_value").val() == undefined ? "" : $("#js_input_score_rezult_value").val();
  1004. var temperatureScore = $("#js_input_temperature_score").val() == undefined ? "" : $("#js_input_temperature_score").val();
  1005. var scoreHistroy = $("#js_input_score_histroy").val() == undefined ? "" : $("#js_input_score_histroy").val();
  1006. var score = $("#js_input_score").val() == undefined ? "" : $("#js_input_score").val();
  1007. if (userName == undefined || userName == '') {
  1008. $.alert("请填写姓名");
  1009. return;
  1010. }
  1011. if (grender == 0) {
  1012. $.alert("请填写性别");
  1013. return;
  1014. }
  1015. if (age == undefined || age == '') {
  1016. $.alert("请填写年龄");
  1017. return;
  1018. }
  1019. if (age > 150 || age < 0) {
  1020. $.alert("请填写正确的年龄");
  1021. return;
  1022. }
  1023. if (temperature <= 0) {
  1024. $.alert("请填写体温");
  1025. return;
  1026. }
  1027. if (temperature > 50 || temperature < 30) {
  1028. $.alert("请填写正确的体温");
  1029. return;
  1030. }
  1031. //如果是凌云
  1032. var uptownId = $("#uptownId").val();
  1033. if (uptownId == xiaoquId || uptownId == ceshixiaoquId) {
  1034. //lingyun
  1035. var gzzd = $("#js_input_gzzd").attr("data-values") == undefined ? 0 : $("#js_input_gzzd").attr("data-values");
  1036. var qtdd = $("#js_input_qtdd").val();
  1037. var workLocal = "";
  1038. var workLocalOther = "";
  1039. if (gzzd == 0) {
  1040. $.alert("请选择工作驻地");
  1041. return;
  1042. } else if (gzzd == 4 && qtdd == "") {
  1043. $.alert("请填写工作驻地");
  1044. return;
  1045. } else if (gzzd != 0 && gzzd != 4) {
  1046. if (gzzd == 1) {
  1047. workLocal = 1;
  1048. } else if (gzzd == 2) {
  1049. workLocal = 2;
  1050. } else if (gzzd == 3) {
  1051. workLocal = 3;
  1052. }
  1053. } else if (gzzd == 4 && qtdd != "") {
  1054. workLocal = 4;
  1055. workLocalOther = qtdd;
  1056. }
  1057. //var listcx = [];
  1058. //var person=new Object();
  1059. var jrszd = $("#js_input_jrszd").attr("data-values") == undefined ? 0 : $("#js_input_jrszd").attr("data-values");
  1060. var jrszq = $("#js_input_jrszq").val();
  1061. var todyLocal = "";
  1062. var todyLocalOther = "";
  1063. if (jrszd == 0) {
  1064. $.alert("请选择今晚住地");
  1065. return;
  1066. } else if (jrszd == 4 && jrszq == "") {
  1067. $.alert("请填写今晚住地");
  1068. return;
  1069. } else if (jrszd != 0 && jrszd != 4) {
  1070. if (jrszd == 1) {
  1071. todyLocal = 1;
  1072. } else if (jrszd == 2) {
  1073. todyLocal = 2;
  1074. } else if (jrszd == 3) {
  1075. todyLocal = 3;
  1076. }
  1077. } else if (jrszd == 4 && jrszq != "") {
  1078. todyLocal = 4;
  1079. todyLocalOther = jrszq;
  1080. }
  1081. var sf = $("#js_input_sf").attr("data-values") == undefined ? 3 : $("#js_input_sf").attr("data-values");
  1082. var isTrip = "";
  1083. if (sf == 3) {
  1084. $.alert("请选择是否出行");
  1085. return;
  1086. } else {
  1087. isTrip = sf;
  1088. }
  1089. } else {
  1090. workLocal = 0;
  1091. workLocalOther = "";
  1092. todyLocal = 0;
  1093. todyLocalOther = "";
  1094. isTrip = 0;
  1095. listcx = [];
  1096. }
  1097. var data = {
  1098. "suspectedId": suspectedId,
  1099. "userCreate": userId,
  1100. "userName": userName,
  1101. "grender": grender,
  1102. "age": age,
  1103. "familyStatus": familyStatus,
  1104. "statusDesp": statusDesp,
  1105. "medical": medical,
  1106. "singleRoom": singleRoom,
  1107. "temperature": temperature,
  1108. "cough": cough,
  1109. "muscle": muscle,
  1110. "dyspnea": dyspnea,
  1111. "fatigue": fatigue,
  1112. "diarrhea": diarrhea,
  1113. "others": others,
  1114. "scoreRezult": scoreRezult,
  1115. "temperatureScore": temperatureScore,
  1116. "scoreHistroy": scoreHistroy,
  1117. "score": score,
  1118. "workLocal": workLocal,
  1119. "workLocalOther": workLocalOther,
  1120. "todayLocal": todyLocal,
  1121. "todayLocalOther": todyLocalOther,
  1122. "isTrip": isTrip,
  1123. "tripDet": listcx,
  1124. };
  1125. $.ajax({
  1126. url: '/home/addRibaoTrip',
  1127. type: "post",
  1128. contentType: "application/json; charset=utf-8",
  1129. data: JSON.stringify(data),
  1130. success: function (data) {
  1131. if (data.msgReport == "2") {
  1132. $.toast("家人姓名不能重复,如果重复,可以带上称呼");
  1133. return;
  1134. }
  1135. if ($('#ribao')[0].style.display == 'none') {
  1136. $('#notOpenRibao').toggle();
  1137. $('#ribao')[0].style.display = '';
  1138. } else {
  1139. $('#notOpenRibao')[0].style.display = '';
  1140. $('#ribao')[0].style.display = 'none';
  1141. }
  1142. cantijiao = true
  1143. $('#ribao_jinrijujian').empty();
  1144. $('#ribao_jinrijujian').append(data.safetyNum);
  1145. ribao_refrash();
  1146. clearShow();
  1147. //修改
  1148. if(suspectedId>0){
  1149. var date = new Date();
  1150. var year = date.getFullYear();
  1151. var month = date.getMonth() + 1;
  1152. var day = date.getDate();
  1153. var hour = date.getHours();
  1154. var minute = date.getMinutes();
  1155. var second = date.getSeconds();
  1156. var time = year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second
  1157. canSahngbao = false;
  1158. document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
  1159. document.getElementById("txt_shangbao").style['color'] = "#0bb20c";
  1160. document.getElementById("txt_shangbaotime").style['color'] = "#0bb20c";
  1161. $('#txt_shangbao').empty();
  1162. $('#txt_shangbao').append("今日已上报");
  1163. $('#txt_shangbaotime').empty();
  1164. $('#txt_shangbaotime').append("上报时间:" + time);
  1165. }
  1166. else {
  1167. canSahngbao = true;
  1168. document.getElementById("btn_shangbao").style['background-color'] = "#0bb20c";
  1169. document.getElementById("txt_shangbao").style['color'] = "red";
  1170. $('#txt_shangbao').empty();
  1171. $('#txt_shangbao').append("今日未上报");
  1172. $('#txt_shangbaotime').empty();
  1173. }
  1174. },
  1175. });
  1176. }
  1177. function deleteSuspected(suspectedId) {
  1178. $.ajax({
  1179. url: '/home/deleteSuspected',
  1180. type: "post",
  1181. data: {
  1182. "suspectedId": suspectedId
  1183. },
  1184. success: function (data) {
  1185. $('#ribao_jinrijujian').empty();
  1186. $('#ribao_jinrijujian').append(data.safetyNum);
  1187. //今日未上报
  1188. canSahngbao = true;
  1189. document.getElementById("btn_shangbao").style['background-color'] = "#0bb20c";
  1190. document.getElementById("txt_shangbao").style['color'] = "red";
  1191. $('#txt_shangbao').empty();
  1192. $('#txt_shangbao').append("今日未上报");
  1193. $('#txt_shangbaotime').empty();
  1194. ribao_refrash();
  1195. $.toast("删除后请重新点击上报");
  1196. },
  1197. });
  1198. }
  1199. function updateSuspected(suspectedId) {
  1200. $("#suspectedId").val("");
  1201. if ($('#ribao')[0].style.display == 'none') {
  1202. $('#notOpenRibao').toggle();
  1203. $('#ribao')[0].style.display = '';
  1204. } else {
  1205. $('#notOpenRibao')[0].style.display = '';
  1206. $('#ribao')[0].style.display = 'none';
  1207. }
  1208. $.ajax({
  1209. url: '/home/selectSuspected',
  1210. get: "get",
  1211. data: {
  1212. "suspectedId": suspectedId
  1213. },
  1214. success: function (data) {
  1215. // console.log(data);
  1216. if (data) {
  1217. var suspected = data;
  1218. $("#suspectedId").val(suspected.suspectedId);
  1219. $("#js_input_user_sex").val(getGreder(suspected.grender));
  1220. $("#js_input_user_sex").attr("data-values", suspected.grender);
  1221. $("#js_input_user_name").val(suspected.userName);
  1222. $("#js_input_user_age").val(suspected.age);
  1223. //基本情况
  1224. if (suspected.familyStatus != "") {
  1225. var familyStatusList = suspected.familyStatus.split(",");
  1226. if (familyStatusList[0] == 1)
  1227. $("input[name='checkbox1']").prop("checked", "checked");
  1228. else
  1229. $("input[name='checkbox1']").removeAttr("checked");
  1230. if (familyStatusList[1] == 1)
  1231. $("input[name='checkbox2']").prop("checked", "checked");
  1232. else
  1233. $("input[name='checkbox2']").removeAttr("checked");
  1234. if (familyStatusList[2] == 1)
  1235. $("input[name='checkbox3']").prop("checked", "checked");
  1236. else
  1237. $("input[name='checkbox3']").removeAttr("checked");
  1238. if (familyStatusList[3] == 1)
  1239. $("input[name='checkbox4']").prop("checked", "checked");
  1240. else
  1241. $("input[name='checkbox4']").removeAttr("checked");
  1242. if (familyStatusList[4] == 1)
  1243. $("input[name='checkbox5']").prop("checked", "checked");
  1244. else
  1245. $("input[name='checkbox5']").removeAttr("checked");
  1246. if (familyStatusList[5] == 1)
  1247. $("input[name='checkbox6']").prop("checked", "checked");
  1248. else
  1249. $("input[name='checkbox6']").removeAttr("checked");
  1250. if (familyStatusList[6] == 1)
  1251. $("input[name='checkbox7']").prop("checked", "checked");
  1252. else
  1253. $("input[name='checkbox7']").removeAttr("checked");
  1254. }
  1255. // $("#js_input_user_status").val(getFamilyStatus(suspected.familyStatus));
  1256. // $("#js_input_user_status").attr("data-values", suspected.familyStatus);
  1257. // $("#jibenmiaoshu").val(suspected.statusDesp);
  1258. if (suspected.medical == 0)
  1259. $("input[id='s18']").prop("checked", "checked");
  1260. if (suspected.medical == 1)
  1261. $("input[id='s19']").prop("checked", "checked");
  1262. if (suspected.medical == 2)
  1263. $("input[id='s20']").prop("checked", "checked");
  1264. if (suspected.medical == 3)
  1265. $("input[id='s21']").prop("checked", "checked");
  1266. if (suspected.medical == 4)
  1267. $("input[id='s22']").prop("checked", "checked");
  1268. // $("#switchQuezhen").val(getMedical(suspected.medical));
  1269. // $("#switchQuezhen").attr("data-values", suspected.medical);
  1270. $("#switchDanjiangeli").val(getSingleRoom(suspected.singleRoom));
  1271. $("#switchDanjiangeli").attr("data-values", suspected.singleRoom);
  1272. $("#js_input_user_tiwen").val(suspected.temperature);
  1273. $("#js_input_user_kesou").val(getCough(suspected.cough));
  1274. $("#js_input_user_kesou").attr("data-values", suspected.cough);
  1275. $("#js_input_user_jirou").val(getMuscle(suspected.muscle));
  1276. $("#js_input_user_jirou").attr("data-values", suspected.muscle);
  1277. $("#js_input_user_huxi").val(getDyspnea(suspected.dyspnea));
  1278. $("#js_input_user_huxi").attr("data-values", suspected.dyspnea);
  1279. $("#js_input_user_fali").val(getFatigue(suspected.fatigue));
  1280. $("#js_input_user_fali").attr("data-values", suspected.fatigue);
  1281. $("#js_input_user_fuxie").val(getDiarrhea(suspected.diarrhea));
  1282. $("#js_input_user_fuxie").attr("data-values", suspected.diarrhea);
  1283. $("#shuruqita").val(suspected.others);
  1284. $("#js_input_score_rezult").val(getScoreRezult(suspected.scoreRezult, suspected.temperatureScore));
  1285. $("#js_input_score_rezult_value").val(suspected.scoreRezult);
  1286. $("#js_input_temperature_score").val(suspected.temperatureScore);
  1287. $("#js_input_score_histroy").val(suspected.scoreHistroy);
  1288. $("#js_input_score").val(suspected.score);
  1289. //行程
  1290. $("#js_input_gzzd").val(getLocal(suspected.workLocal));
  1291. $("#js_input_gzzd").attr("data-values", suspected.workLocal);
  1292. if (suspected.workLocal != 4) {
  1293. $('#js_input_qtdd').attr("disabled", "disabled");
  1294. $("#js_input_qtdd").val("");
  1295. } else {
  1296. $('#js_input_qtdd').removeAttr("disabled")
  1297. }
  1298. $("#js_input_qtdd").val(suspected.workLocalOther);
  1299. $("#js_input_jrszd").val(getLocal(suspected.todayLocal));
  1300. $("#js_input_jrszd").attr("data-values", suspected.todayLocal);
  1301. if (suspected.todayLocal != 4) {
  1302. $('#js_input_jrszq').attr("disabled", "disabled");
  1303. $("#js_input_jrszq").val("");
  1304. } else {
  1305. $('#js_input_jrszq').removeAttr("disabled")
  1306. }
  1307. $("#js_input_jrszq").val(suspected.todayLocalOther);
  1308. $("#js_input_sf").val(getIsTrip(suspected.isTrip));
  1309. $("#js_input_sf").attr("data-values", suspected.isTrip);
  1310. if (suspected.isTrip == 0)
  1311. $('#none')[0].style.display = 'none';
  1312. else
  1313. $('#none')[0].style.display = '';
  1314. //详细
  1315. $.ajax({
  1316. url: '/home/selectTripSuspected',
  1317. get: "get",
  1318. data: {
  1319. "suspectedId": suspectedId
  1320. },
  1321. success: function (data) {
  1322. if (data.data.length != 0) {
  1323. }
  1324. listcx.splice(0, listcx.length);
  1325. $('#tabtr').empty();
  1326. var person = new Object();
  1327. // var xxIds = [];
  1328. // var xxName = [
  1329. // "序号",
  1330. // "出发地",
  1331. // "目的地",
  1332. // "出行方式",
  1333. // "车次/航班/车牌",
  1334. // "操作"
  1335. // ];
  1336. // for (var i = 0; i < xxName.length; i++) {
  1337. // xxIds.push({
  1338. // name: xxName[i]
  1339. // });
  1340. // }
  1341. // $('#tabtr').empty();
  1342. // var html = "<tr style='background-color: #f8f8f8;'>";
  1343. // for (var i = 0; i < xxIds.length; i++) {
  1344. // html += "<th>" + xxIds[i].name + "</th>";
  1345. // }
  1346. // html += "</tr>"
  1347. data.data.forEach(function (v) {
  1348. {
  1349. person.startLocal = v.startLocal;
  1350. person.startLocalOther = v.startLocalOther;
  1351. person.endlocal = v.endLocal;
  1352. person.endLocalOther = v.endLocalOther;
  1353. person.tripType = v.tripType;
  1354. person.startLocalStr = getLocalOther(v.startLocal, v.startLocalOther);
  1355. person.endlocalStr = getLocalOther(v.endLocal, v.endLocalOther);
  1356. person.tripTypeStr = getTripType(v.tripType);
  1357. person.tripTypeDesp = v.tripTypeDesp;
  1358. listcx.push(person);
  1359. // html += "<tr>";
  1360. // html += "<td style='text-align: center;'>" + v.sort + "</td>";
  1361. // html += "<td style='text-align: center;' >" + getLocalOther(v.startLocal, v.startLocalOther) + " </td>";
  1362. // html += "<td style='text-align: center;' >" + getLocalOther(v.endLocal, v.endLocalOther) + " </td>";
  1363. // html += "<td style='text-align: center;' >" + getTripType(v.tripType) + " </td>";
  1364. // html += "<td style='text-align: center;' >" + v.tripTypeDesp + " </td>";
  1365. // 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>";
  1366. // html += "</tr>";
  1367. // $("#tabtr").html(html);
  1368. }
  1369. });
  1370. tab();
  1371. },
  1372. });
  1373. }
  1374. },
  1375. });
  1376. }
  1377. function addReport() {
  1378. if (!canSahngbao) {
  1379. return;
  1380. }
  1381. var userId = $("#userId").val();
  1382. $.ajax({
  1383. url: '/home/addReport',
  1384. type: "post",
  1385. data: {
  1386. "userCreate": userId,
  1387. },
  1388. success: function (data) {
  1389. $.toast(data.msg)
  1390. var date = new Date();
  1391. var year = date.getFullYear();
  1392. var month = date.getMonth() + 1;
  1393. var day = date.getDate();
  1394. var hour = date.getHours();
  1395. var minute = date.getMinutes();
  1396. var second = date.getSeconds();
  1397. var time = year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second
  1398. if (data.msg == "操作成功") {
  1399. canSahngbao = false;
  1400. document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
  1401. document.getElementById("txt_shangbao").style['color'] = "#0bb20c";
  1402. document.getElementById("txt_shangbaotime").style['color'] = "#0bb20c";
  1403. $('#txt_shangbao').empty();
  1404. $('#txt_shangbao').append("今日已上报");
  1405. $('#txt_shangbaotime').empty();
  1406. $('#txt_shangbaotime').append("上报时间:" + time);
  1407. }
  1408. },
  1409. });
  1410. }
  1411. $("#my-input-ribao").calendar({
  1412. dateFormat: 'yyyy-mm-dd',
  1413. inputReadOnly: false,
  1414. onChange: function (p, values, displayValues) {
  1415. var reportDate = values.toString();
  1416. var userId = $("#userId").val();
  1417. $.ajax({
  1418. url: '/home/home/queryRibaoReportDate',
  1419. data: {
  1420. "userCreate": userId,
  1421. "reportDate": reportDate,
  1422. },
  1423. type: 'GET',
  1424. success: function (data) {
  1425. if (data.data == undefined || data.data == "") {
  1426. $('#ribao_famliy').empty();
  1427. }
  1428. else {
  1429. if (data.data.length > 0) {
  1430. $('#ribao_famliy').empty();
  1431. data.data.forEach(function (v) {
  1432. helpValue1(v);
  1433. });
  1434. } else {
  1435. }
  1436. }
  1437. },
  1438. error: function () {
  1439. }
  1440. });
  1441. }
  1442. });
  1443. function helpValue1(v) {
  1444. var userName = v.userName + ":";
  1445. var grender = getGreder(v.grender);
  1446. var age = v.age;
  1447. var familyStatus = "";
  1448. if (v.familyStatus != 0)
  1449. familyStatus = "基本状况:" + getFamilyStatus(v.familyStatus) + ";";
  1450. var medical = "";
  1451. if (v.medical != 0)
  1452. medical = "新冠肺炎:" + getMedical(v.medical) + ";";
  1453. var singleRoom = "";
  1454. var uptownId = $("#uptownId").val();
  1455. if (uptownId != xiaoquId && uptownId != ceshixiaoquId) {
  1456. if (v.singleRoom != 0)
  1457. singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
  1458. if (v.singleRoom == 0 && v.medical != 0)
  1459. singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
  1460. }
  1461. var temperature = "体温:" + v.temperature + ";";
  1462. var cough = "";
  1463. if (v.cough != 0)
  1464. cough = "咳嗽现象:" + getCough(v.cough) + ";";
  1465. var muscle = "";
  1466. if (v.muscle != 0)
  1467. muscle = "肌肉酸痛:" + getMuscle(v.muscle) + ";";
  1468. var dyspnea = "";
  1469. if (v.dyspnea != 0)
  1470. dyspnea = "呼吸困难:" + getDyspnea(v.dyspnea) + ";";
  1471. var fatigue = "";
  1472. if (v.fatigue != 0)
  1473. fatigue = "乏力现象:" + getFatigue(v.fatigue) + ";";
  1474. var diarrhea = "";
  1475. if (v.diarrhea != 0)
  1476. diarrhea = "腹泻现象:" + getDiarrhea(v.diarrhea) + ";";
  1477. var others = "";
  1478. if (v.others != "")
  1479. others = "其他描述:" + v.others + ";";
  1480. var scoreRezult = "";
  1481. if (v.scoreRezult != 0)
  1482. scoreRezult = "评估结果:" + getScoreRezult(v.scoreRezult, v.temperatureScore) + ";";
  1483. var workLocal = "";
  1484. var todayLocal = "";
  1485. var isTrip = "";
  1486. var tripDet = "";
  1487. var uptownId = $("#uptownId").val();
  1488. if (uptownId == xiaoquId || uptownId == ceshixiaoquId) {
  1489. if (v.workLocal != 0) {
  1490. if (v.workLocal < 4)
  1491. workLocal = "工作驻地:" + getLocal(v.workLocal) + ";";
  1492. else
  1493. workLocal = "工作驻地:" + v.workLocalOther + ";";
  1494. }
  1495. if (v.todayLocal != 0) {
  1496. if (v.todayLocal < 4)
  1497. todayLocal = "今晚住地:" + getLocal(v.todayLocal) + ";";
  1498. else
  1499. todayLocal = "今晚住地:" + v.todayLocalOther + ";";
  1500. }
  1501. if (v.isTrip != undefined)
  1502. isTrip = "是否出行:" + getIsTrip(v.isTrip) + ";"
  1503. if (v.tripDet != undefined)
  1504. tripDet = "出行详细:" + v.tripDet + ";"
  1505. }
  1506. $('#ribao_famliy').append($('<div class="weui-media-box weui-media-box_text" style="height: auto">\n' +
  1507. ' <h4 class="weui-media-box__title">' + userName + '&nbsp;&nbsp;&nbsp;' + grender + '&nbsp;&nbsp;&nbsp;' + age + '</h4>\n' +
  1508. ' <div style="height: auto">' + familyStatus + medical + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + scoreRezult + workLocal + todayLocal + isTrip + tripDet + '</div>\n' +
  1509. ' </div>\n' +
  1510. ' '));
  1511. }
  1512. function getGreder(greder) {
  1513. if (greder == 1)
  1514. return "男";
  1515. else if (greder == 2)
  1516. return "女";
  1517. return "";
  1518. }
  1519. function getFamilyStatus(familyStatus) {
  1520. var familyStatusList = familyStatus.split(",");
  1521. var familyStatusString = "";
  1522. if (familyStatus == '0,0,0,0,0,0,0')
  1523. familyStatusString += "无病史,";
  1524. else {
  1525. if (familyStatusList[0] == 1)
  1526. familyStatusString += "心脑血管疾病(服用ARB),";
  1527. if (familyStatusList[1] == 1)
  1528. familyStatusString += "心脑血管疾病(未服ARB),";
  1529. if (familyStatusList[2] == 1)
  1530. familyStatusString += "呼吸系统病史,";
  1531. if (familyStatusList[3] == 1)
  1532. familyStatusString += "肿瘤病史,";
  1533. if (familyStatusList[4] == 1)
  1534. familyStatusString += "糖尿病史,";
  1535. if (familyStatusList[5] == 1)
  1536. familyStatusString += "服用过激素药物,";
  1537. if (familyStatusList[6] == 1)
  1538. familyStatusString += "妊娠期,";
  1539. }
  1540. return familyStatusString.substring(0, familyStatusString.length - 1);
  1541. }
  1542. function getCough(cough) {
  1543. if (cough == 0)
  1544. return "无咳嗽";
  1545. else if (cough == 1)
  1546. return "偶尔短暂咳嗽";
  1547. else if (cough == 2)
  1548. return "咳嗽轻度影响生活";
  1549. else if (cough == 3)
  1550. return "咳嗽严重影响生活";
  1551. return "";
  1552. }
  1553. function getMuscle(muscle) {
  1554. if (muscle == 0)
  1555. return "无";
  1556. else if (muscle == 1)
  1557. return "按压有";
  1558. else if (muscle == 2)
  1559. return "偶尔";
  1560. else if (muscle == 3)
  1561. return "持续有";
  1562. return "";
  1563. }
  1564. function getDyspnea(dyspnea) {
  1565. if (dyspnea == 0)
  1566. return "无";
  1567. else if (dyspnea == 1)
  1568. return "急走或上坡气短";
  1569. else if (dyspnea == 2)
  1570. return "气短而走路变慢";
  1571. else if (dyspnea == 3)
  1572. return "走路数分钟后气短";
  1573. else if (dyspnea == 4)
  1574. return "气短无法离开房间";
  1575. return "";
  1576. }
  1577. function getFatigue(fatigue) {
  1578. if (fatigue == 0)
  1579. return "无";
  1580. else if (fatigue == 1)
  1581. return "体力劳动后不能恢复";
  1582. else if (fatigue == 2)
  1583. return "轻体力活非常累";
  1584. else if (fatigue == 3)
  1585. return "不能正常生活";
  1586. return "";
  1587. }
  1588. function getMedical(medical) {
  1589. if (medical == 0)
  1590. return "无";
  1591. else if (medical == 1)
  1592. return "确诊";
  1593. else if (medical == 2)
  1594. return "疑似";
  1595. else if (medical == 3)
  1596. return "有接触史";
  1597. else if (medical == 4)
  1598. return "解除隔离";
  1599. return "";
  1600. }
  1601. function getSingleRoom(singleRoom) {
  1602. if (singleRoom == 0)
  1603. return "否";
  1604. else if (singleRoom == 1)
  1605. return "是";
  1606. return "";
  1607. }
  1608. function getIsTrip(isTrip) {
  1609. if (isTrip == 0)
  1610. return "否";
  1611. else if (isTrip == 1)
  1612. return "是";
  1613. return "";
  1614. }
  1615. function getLocal(local) {
  1616. if (local == 0)
  1617. return "";
  1618. else if (local == 1)
  1619. return "武汉市";
  1620. else if (local == 2)
  1621. return "宜昌市";
  1622. else if (local == 3)
  1623. return "当阳市";
  1624. else if (local == 4)
  1625. return "其它地点";
  1626. return "";
  1627. }
  1628. function getLocalOther(local, localOther) {
  1629. if (local == 0)
  1630. return "";
  1631. else if (local == 1)
  1632. return "武汉市";
  1633. else if (local == 2)
  1634. return "宜昌市";
  1635. else if (local == 3)
  1636. return "当阳市";
  1637. else if (local == 4)
  1638. return localOther;
  1639. return "";
  1640. }
  1641. function getTripType(tripType) {
  1642. if (tripType == 0)
  1643. return "";
  1644. else if (tripType == 1)
  1645. return "长途汽车";
  1646. else if (tripType == 2)
  1647. return "火车";
  1648. else if (tripType == 3)
  1649. return "飞机";
  1650. else if (tripType == 4)
  1651. return "自驾";
  1652. return "";
  1653. }
  1654. function getDiarrhea(diarrhea) {
  1655. if (diarrhea == 0)
  1656. return "无";
  1657. else if (diarrhea == 1)
  1658. return "轻度腹泻(少于3次)";
  1659. else if (diarrhea == 2)
  1660. return "中度腹泻(4-6次)";
  1661. else if (diarrhea == 3)
  1662. return "重度腹泻(超过6次)";
  1663. return "";
  1664. }
  1665. function clearShow() {
  1666. console.log("qingkong")
  1667. $("#suspectedId").val("");
  1668. $("#js_input_user_sex").val("");
  1669. $("#js_input_user_sex").attr("data-values", "");
  1670. $("#js_input_user_name").val("");
  1671. $("#js_input_user_age").val("");
  1672. $("#js_input_user_status").val("");
  1673. $("#js_input_user_status").attr("data-values", "");
  1674. $("#jibenmiaoshu").val("");
  1675. $("#switchQuezhen").val("");
  1676. $("#switchQuezhen").attr("data-values", "");
  1677. $("#switchQuezhen_zz").val("");
  1678. $("#switchQuezhen_zz").attr("data-values", "");
  1679. $("#switchDanjiangeli").val("");
  1680. $("#switchDanjiangeli").attr("data-values", "");
  1681. $("#js_input_user_tiwen").val("");
  1682. $("#js_input_user_kesou").val("");
  1683. $("#js_input_user_kesou").attr("data-values", "");
  1684. $("#js_input_user_jirou").val("");
  1685. $("#js_input_user_jirou").attr("data-values", "");
  1686. $("#js_input_user_huxi").val("");
  1687. $("#js_input_user_huxi").attr("data-values", "");
  1688. $("#js_input_user_fali").val("");
  1689. $("#js_input_user_fali").attr("data-values", "");
  1690. $("#js_input_user_fuxie").val("");
  1691. $("#js_input_user_fuxie").attr("data-values", "");
  1692. $("#shuruqita").val("");
  1693. $("#js_input_score_rezult").val("");
  1694. $("#js_input_score_rezult_value").val("");
  1695. $("#js_input_temperature_score").val("");
  1696. $("#js_input_score_histroy").val("");
  1697. $("#js_input_score").val("");
  1698. //出行
  1699. $("#js_input_gzzd").val("");
  1700. $("#js_input_gzzd").attr("data-values", "");
  1701. $("#js_input_qtdd").val("");
  1702. $("#js_input_jrszd").val("");
  1703. $("#js_input_jrszd").attr("data-values", "");
  1704. $("#js_input_jrszq").val("");
  1705. $("#js_input_sf").val(getIsTrip(0));
  1706. $("#js_input_sf").attr("data-values", 0);
  1707. $('#none')[0].style.display = 'none';
  1708. $("input[id='s18']").removeAttr("checked");
  1709. $("input[id='s19']").removeAttr("checked");
  1710. $("input[id='s20']").removeAttr("checked");
  1711. $("input[id='s21']").removeAttr("checked");
  1712. $("input[id='s22']").removeAttr("checked");
  1713. }
  1714. //健康评估
  1715. $('#ribao_score').on('click', function () {
  1716. var suspectedId = $("#suspectedId").val();
  1717. var userId = $("#userId").val();
  1718. var userName = $("#js_input_user_name").val();
  1719. var medical = $("input[name='radio']:checked").val() == undefined ? 0 : $("input[name='radio']:checked").val();
  1720. var medicalzz = $("#switchQuezhen_zz").attr("data-values") == undefined ? 0 : $("#switchQuezhen_zz").attr("data-values");
  1721. var temperature = $("#js_input_user_tiwen").val() == "" ? 0 : $("#js_input_user_tiwen").val();
  1722. var cough = $("#js_input_user_kesou").attr("data-values") == undefined ? 0 : $("#js_input_user_kesou").attr("data-values");
  1723. var muscle = $("#js_input_user_jirou").attr("data-values") == undefined ? 0 : $("#js_input_user_jirou").attr("data-values");
  1724. var dyspnea = $("#js_input_user_huxi").attr("data-values") == undefined ? 0 : $("#js_input_user_huxi").attr("data-values");
  1725. var fatigue = $("#js_input_user_fali").attr("data-values") == undefined ? 0 : $("#js_input_user_fali").attr("data-values");
  1726. var diarrhea = $("#js_input_user_fuxie").attr("data-values") == undefined ? 0 : $("#js_input_user_fuxie").attr("data-values");
  1727. if (userName == undefined || userName == '') {
  1728. $.alert("请填写姓名");
  1729. return;
  1730. }
  1731. if (temperature <= 0) {
  1732. $.alert("请填写体温");
  1733. return;
  1734. }
  1735. if (temperature > 50 || temperature < 30) {
  1736. $.alert("请填写正确的体温");
  1737. return;
  1738. }
  1739. $.ajax({
  1740. url: '/home/addScore',
  1741. type: "post",
  1742. data: {
  1743. "userName": userName,
  1744. "suspectedId": suspectedId,
  1745. "userCreate": userId,
  1746. "medical": medical,
  1747. "temperature": temperature,
  1748. "cough": cough,
  1749. "muscle": muscle,
  1750. "dyspnea": dyspnea,
  1751. "fatigue": fatigue,
  1752. "diarrhea": diarrhea,
  1753. },
  1754. success: function (data) {
  1755. if (data == undefined) {
  1756. $('#js_input_score_rezult').empty();
  1757. $('#js_input_score_rezult_value').empty();
  1758. $('#js_input_temperature_score').empty();
  1759. $('#js_input_score_histroy').empty();
  1760. $('#js_input_score').empty();
  1761. }
  1762. else {
  1763. $('#js_input_score_rezult').empty();
  1764. $('#js_input_temperature_score').empty();
  1765. $('#js_input_score_histroy').empty();
  1766. $('#js_input_score').empty();
  1767. var ScoreRezult = getScoreRezult(data.scoreRezult, data.temperatureScore);
  1768. $("#js_input_score_rezult").val(ScoreRezult);
  1769. $("#js_input_score_rezult_value").val(data.scoreRezult);
  1770. $("#js_input_temperature_score").val(data.temperatureScore);
  1771. $("#js_input_score_histroy").val(data.scoreHistory);
  1772. $("#js_input_score").val(data.score);
  1773. }
  1774. },
  1775. });
  1776. });
  1777. function getScoreRezult(scoreRezult, temperatureScore) {
  1778. if (scoreRezult == 0)
  1779. return "未评估";
  1780. else if (scoreRezult == 1) {
  1781. if (temperatureScore > 1)
  1782. return "正常,间隔时间服用退烧药,多休息,多喝水";
  1783. else
  1784. return "正常";
  1785. }
  1786. else if (scoreRezult == 2) {
  1787. if (temperatureScore > 1)
  1788. return "注意观察,间隔时间服用退烧药,多休息,多喝水";
  1789. else
  1790. return "注意观察";
  1791. }
  1792. else if (scoreRezult == 3)
  1793. return "联系社区医生(或者在线问诊)";
  1794. else if (scoreRezult == 4)
  1795. return "尽快就诊";
  1796. return "";
  1797. }