ribao.js 55 KB

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