ribao.js 57 KB

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