ribao.js 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758
  1. function ribao_init() {
  2. // $("#js_input_user_sex").val(getGreder(2)); //设置初始值
  3. $('#btnRB').on('click', function () {
  4. window.location.href = "/yeweihui/home.html";
  5. });
  6. $("#js_input_user_sex").select({
  7. title: "选择性别",
  8. items: [
  9. {
  10. title: "男",
  11. value: "1",
  12. },
  13. {
  14. title: "女",
  15. value: "2",
  16. }]
  17. });
  18. $("#js_input_user_status").select({
  19. title: "选择基本状况",
  20. items: [
  21. {
  22. title: "无病史",
  23. value: "0",
  24. }, {
  25. title: "心脑血管疾病(服用ARB)",
  26. value: "1",
  27. },
  28. {
  29. title: "心脑血管疾病(未服ARB)",
  30. value: "2",
  31. },
  32. {
  33. title: "呼吸系统病史",
  34. value: "3",
  35. },
  36. {
  37. title: "肿瘤病史",
  38. value: "4",
  39. },
  40. {
  41. title: "糖尿病史",
  42. value: "5",
  43. },
  44. {
  45. title: "服用过激素药物",
  46. value: "6",
  47. },
  48. {
  49. title: "妊娠期",
  50. value: "7",
  51. }, {
  52. title: "其他",
  53. value: "8",
  54. }]
  55. });
  56. $("#js_input_user_kesou").select({
  57. title: "选择咳嗽情况",
  58. items: [
  59. {
  60. title: "无咳嗽",
  61. value: "0",
  62. },
  63. {
  64. title: "偶有短暂咳嗽",
  65. value: "1",
  66. },
  67. {
  68. title: "咳嗽轻度影响生活",
  69. value: "2",
  70. },
  71. {
  72. title: "咳嗽严重影响生活",
  73. value: "3",
  74. }]
  75. });
  76. $("#js_input_user_jirou").select({
  77. title: "选择肌肉情况",
  78. items: [
  79. {
  80. title: "无",
  81. value: "0",
  82. },
  83. {
  84. title: "按压有",
  85. value: "1",
  86. },
  87. {
  88. title: "偶尔",
  89. value: "2",
  90. },
  91. {
  92. title: "持续有",
  93. value: "3",
  94. }]
  95. });
  96. $("#js_input_user_huxi").select({
  97. title: "选择呼吸情况",
  98. items: [
  99. {
  100. title: "无",
  101. value: "0",
  102. },
  103. {
  104. title: "急走或上坡气短",
  105. value: "1",
  106. },
  107. {
  108. title: "气短而走路变慢",
  109. value: "2",
  110. },
  111. {
  112. title: "走路数分钟后气短",
  113. value: "3",
  114. },
  115. {
  116. title: "气短无法离开房间",
  117. value: "4",
  118. }]
  119. });
  120. $("#js_input_user_fali").select({
  121. title: "选择乏力情况",
  122. items: [
  123. {
  124. title: "无",
  125. value: "0",
  126. },
  127. {
  128. title: "可体力劳动但觉得累",
  129. value: "1",
  130. },
  131. {
  132. title: "轻体力劳动后长时间不能恢复",
  133. value: "2",
  134. },
  135. {
  136. title: "不能正常生活",
  137. value: "3",
  138. }]
  139. });
  140. $("#js_input_user_fuxie").select({
  141. title: "选择腹泻情况",
  142. items: [
  143. {
  144. title: "无",
  145. value: "0",
  146. },
  147. {
  148. title: "轻度腹泻(少于3次)",
  149. value: "1",
  150. },
  151. {
  152. title: "中度腹泻(4-6次)",
  153. value: "2",
  154. },
  155. {
  156. title: "重度腹泻(超过6次)",
  157. value: "3",
  158. }]
  159. });
  160. $("#switchQuezhen").select({
  161. title: "选择是否确诊",
  162. items: [
  163. {
  164. title: "否",
  165. value: "0",
  166. },
  167. {
  168. title: "是",
  169. value: "1",
  170. }]
  171. });
  172. $("#switchDanjiangeli").select({
  173. title: "选择是否单间隔离",
  174. items: [
  175. {
  176. title: "否",
  177. value: "0",
  178. },
  179. {
  180. title: "是",
  181. value: "1",
  182. }]
  183. });
  184. //
  185. // updateSuspected({
  186. // userName : 'www',
  187. // grender : 2,
  188. // age : 34,
  189. // familyStatus : 1,
  190. // statusDesp : "",
  191. // medical:0,
  192. // singleRoom:1,
  193. // temperature:0,
  194. // cough:2,
  195. // muscle:1,
  196. // dyspnea:1,
  197. // fatigue:1,
  198. // diarrhea:2,
  199. // others:""
  200. // })
  201. //
  202. // var grender = $("#js_input_user_sex").attr("data-values") == undefined ? 0 : $("#js_input_user_sex").attr("data-values");
  203. // console.log("grender:" + grender)
  204. }
  205. //近日报告
  206. function ribaoInitialization(reportId) {
  207. if (reportId == null)
  208. return;
  209. $.ajax({
  210. url: '/home/home/queryRibaoRefresh',
  211. data: {
  212. reportId: reportId
  213. },
  214. type: 'GET',
  215. success: function (data) {
  216. console.log(data);
  217. if (data.data.length > 0) {
  218. $('#btn_shangbao').text('上报');
  219. hasData = true;
  220. data.data.forEach(function (v) {
  221. ribao_cell(v);
  222. });
  223. } else {
  224. $('#btn_shangbao').text('上报');
  225. }
  226. },
  227. error: function () {
  228. }
  229. });
  230. }
  231. //刷新今日日报
  232. function ribao_refrash() {
  233. var userId = $("#userId").val();
  234. $.ajax({
  235. url: '/home/home/queryRibao',
  236. data: {
  237. userCreate: userId
  238. },
  239. type: 'GET',
  240. success: function (data) {
  241. console.log(data);
  242. if (data.data == undefined) {
  243. $('#rb_family').empty();
  244. }
  245. else {
  246. $('#rb_family').empty();
  247. if (data.data.length > 0) {
  248. hasData = true;
  249. data.data.forEach(function (v) {
  250. ribao_cell(v);
  251. });
  252. } else {
  253. }
  254. }
  255. },
  256. error: function () {
  257. }
  258. });
  259. }
  260. function ribao_cell(v) {
  261. var userName = v.userName + ":";
  262. var grender = getGreder(v.grender);
  263. var age = v.age;
  264. var familyStatus = "";
  265. if (v.familyStatus != 0)
  266. familyStatus = "基本状况:" + getFamilyStatus(v.familyStatus) + ";";
  267. var medical = "";
  268. if (v.medical != 0)
  269. medical = "是否确诊:" + getMedical(v.medical) + ";";
  270. var singleRoom = "";
  271. if (v.singleRoom != 0)
  272. singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
  273. var temperature = "体温:" + v.temperature + ";";
  274. var cough = "";
  275. if (v.cough != 0)
  276. cough = "咳嗽:" + getCough(v.cough) + ";";
  277. var muscle = "";
  278. if (v.muscle != 0)
  279. muscle = "肌肉酸痛:" + getMuscle(v.muscle) + ";";
  280. var dyspnea = "";
  281. if (v.dyspnea != 0)
  282. dyspnea = "呼吸困难:" + getDyspnea(v.dyspnea) + ";";
  283. var fatigue = "";
  284. if (v.fatigue != 0)
  285. fatigue = "乏力:" + getFatigue(v.fatigue) + ";";
  286. var diarrhea = "";
  287. if (v.diarrhea != 0)
  288. diarrhea = "腹泻:" + getDiarrhea(v.diarrhea) + ";";
  289. var others = "";
  290. if (v.others != "")
  291. others = "其他:" + v.others;
  292. $('#rb_family').append($('<div class="weui-media-box weui-media-box_text" style="height: 12vh">\n' +
  293. ' <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' +
  294. ' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a style="color: #2a62bc" onclick=\'updateSuspected(' + JSON.stringify(v.suspectedId) + ')\'>修改</a></h4>\n' +
  295. ' <p class="weui-media-box__desc" style="height: 80%">' + familyStatus + medical + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + '</p>\n' +
  296. ' </div>\n' +
  297. ' '));
  298. }
  299. function ribao_add() {
  300. $('#btnAdd').on('click', function () {
  301. $("#suspectedId").val("");
  302. if ($('#ribao')[0].style.display == 'none') {
  303. $('#notOpenRibao').toggle();
  304. $('#ribao')[0].style.display = '';
  305. } else {
  306. $('#notOpenRibao')[0].style.display = '';
  307. $('#ribao')[0].style.display = 'none';
  308. }
  309. });
  310. }
  311. function ribao_cancel() {
  312. $('#cancel').on('click', function () {
  313. if ($('#ribao')[0].style.display == 'none') {
  314. $('#notOpenRibao').toggle();
  315. $('#ribao')[0].style.display = '';
  316. } else {
  317. $('#notOpenRibao')[0].style.display = '';
  318. $('#ribao')[0].style.display = 'none';
  319. }
  320. clearShow();
  321. });
  322. }
  323. function ribaoCommit() {
  324. // console.log("sss");
  325. // console.log(
  326. // "姓名", $("#js_input_user_name").val(),
  327. // "性别", $("#js_input_user_sex").val(), "实际值", $("#js_input_user_sex").attr("data-values"),
  328. // "年龄", $("#js_input_user_age").val(),
  329. // "基本状况", $("#js_input_user_status").val(),
  330. // "状况描述", $("#jibenmiaoshu").val(),
  331. // "是否确诊", $("#switchQuezhen").val(),
  332. // "体温", $("#js_input_user_tiwen").val(),
  333. // "咳嗽", $("#js_input_user_kesou").val(),
  334. // "肌肉酸痛", $("#js_input_user_jirou").val(),
  335. // "呼吸困难", $("#js_input_user_huxi").val(),
  336. // "胸闷", $("#js_input_user_xiongmen").val(),
  337. // "乏力", $("#js_input_user_fali").val(),
  338. // "腹泻", $("#js_input_user_fuxie").val(),
  339. // "次数", $("#js_input_user_cishu").val(),
  340. // "其他", $("#shuruqita").val()
  341. // );
  342. // return;
  343. var suspectedId = $("#suspectedId").val();
  344. var userId = $("#userId").val();
  345. var userName = $("#js_input_user_name").val();
  346. var grender = $("#js_input_user_sex").attr("data-values") == undefined ? 0 : $("#js_input_user_sex").attr("data-values");
  347. var age = $("#js_input_user_age").val();
  348. var familyStatus = $("#js_input_user_status").attr("data-values") == undefined ? 0 : $("#js_input_user_status").attr("data-values");
  349. var statusDesp = $("#jibenmiaoshu").val() == undefined ? "" : $("#jibenmiaoshu").val();
  350. var medical = $("#switchQuezhen").attr("data-values") == undefined ? 0 : $("#switchQuezhen").attr("data-values");
  351. var singleRoom = $("#switchDanjiangeli").attr("data-values") == undefined ? 0 : $("#switchDanjiangeli").attr("data-values");
  352. var temperature = $("#js_input_user_tiwen").val() == "" ? 0 : $("#js_input_user_tiwen").val();
  353. var cough = $("#js_input_user_kesou").attr("data-values") == undefined ? 0 : $("#js_input_user_kesou").attr("data-values");
  354. var muscle = $("#js_input_user_jirou").attr("data-values") == undefined ? 0 : $("#js_input_user_jirou").attr("data-values");
  355. var dyspnea = $("#js_input_user_huxi").attr("data-values") == undefined ? 0 : $("#js_input_user_huxi").attr("data-values");
  356. var fatigue = $("#js_input_user_fali").attr("data-values") == undefined ? 0 : $("#js_input_user_fali").attr("data-values");
  357. var diarrhea = $("#js_input_user_fuxie").attr("data-values") == undefined ? 0 : $("#js_input_user_fuxie").attr("data-values");
  358. var others = $("#shuruqita").val() == undefined ? "" : $("#shuruqita").val();
  359. if (userName == undefined || userName == '') {
  360. alert("请填写姓名");
  361. return;
  362. }
  363. if (age == undefined || age == '') {
  364. alert("请填写年龄");
  365. return;
  366. }
  367. if (age.length > 3) {
  368. alert("请填写正确的年龄");
  369. return;
  370. }
  371. if (grender == 0) {
  372. alert("请填写性别");
  373. return;
  374. }
  375. if (temperature <= 0) {
  376. alert("请填写体温");
  377. return;
  378. }
  379. if (temperature.length > 4) {
  380. alert("请填写正确的体温");
  381. return;
  382. }
  383. $.ajax({
  384. url: '/home/addRibao',
  385. type: "post",
  386. data: {
  387. "suspectedId": suspectedId,
  388. "userCreate": userId,
  389. "userName": userName,
  390. "grender": grender,
  391. "age": age,
  392. "familyStatus": familyStatus,
  393. "statusDesp": statusDesp,
  394. "medical": medical,
  395. "singleRoom": singleRoom,
  396. "temperature": temperature,
  397. "cough": cough,
  398. "muscle": muscle,
  399. "dyspnea": dyspnea,
  400. "fatigue": fatigue,
  401. "diarrhea": diarrhea,
  402. "others": others,
  403. },
  404. success: function (data) {
  405. if ($('#ribao')[0].style.display == 'none') {
  406. $('#notOpenRibao').toggle();
  407. $('#ribao')[0].style.display = '';
  408. } else {
  409. $('#notOpenRibao')[0].style.display = '';
  410. $('#ribao')[0].style.display = 'none';
  411. }
  412. $('#ribao_jinrijujian').empty();
  413. $('#ribao_jinrijujian').append(data.safetyNum);
  414. ribao_refrash();
  415. clearShow();
  416. },
  417. });
  418. }
  419. function deleteSuspected(suspectedId) {
  420. $.ajax({
  421. url: '/home/deleteSuspected',
  422. type: "post",
  423. data: {
  424. "suspectedId": suspectedId
  425. },
  426. success: function (data) {
  427. $('#ribao_jinrijujian').empty();
  428. $('#ribao_jinrijujian').append(data.safetyNum);
  429. ribao_refrash();
  430. },
  431. });
  432. }
  433. function updateSuspected(suspectedId) {
  434. $("#suspectedId").val("");
  435. if ($('#ribao')[0].style.display == 'none') {
  436. $('#notOpenRibao').toggle();
  437. $('#ribao')[0].style.display = '';
  438. } else {
  439. $('#notOpenRibao')[0].style.display = '';
  440. $('#ribao')[0].style.display = 'none';
  441. }
  442. $.ajax({
  443. url: '/home/selectSuspected',
  444. get: "get",
  445. data: {
  446. "suspectedId": suspectedId
  447. },
  448. success: function (data) {
  449. // console.log(data);
  450. if (data) {
  451. var suspected = data;
  452. $("#suspectedId").val(suspected.suspectedId);
  453. $("#js_input_user_sex").val(getGreder(suspected.grender));
  454. $("#js_input_user_sex").attr("data-values", suspected.grender);
  455. $("#js_input_user_name").val(suspected.userName);
  456. $("#js_input_user_age").val(suspected.age);
  457. $("#js_input_user_status").val(getFamilyStatus(suspected.familyStatus));
  458. $("#js_input_user_status").attr("data-values", suspected.familyStatus);
  459. $("#jibenmiaoshu").val(suspected.statusDesp);
  460. $("#switchQuezhen").val(getMedical(suspected.medical));
  461. $("#switchQuezhen").attr("data-values", suspected.familyStatus);
  462. $("#switchDanjiangeli").val(getSingleRoom(suspected.singleRoom));
  463. $("#switchDanjiangeli").attr("data-values", suspected.familyStatus);
  464. $("#js_input_user_tiwen").val(suspected.temperature);
  465. $("#js_input_user_kesou").val(getCough(suspected.cough));
  466. $("#js_input_user_kesou").attr("data-values", suspected.cough);
  467. $("#js_input_user_jirou").val(getMuscle(suspected.muscle));
  468. $("#js_input_user_jirou").attr("data-values", suspected.muscle);
  469. $("#js_input_user_huxi").val(getDyspnea(suspected.dyspnea));
  470. $("#js_input_user_huxi").attr("data-values", suspected.dyspnea);
  471. $("#js_input_user_fali").val(getFatigue(suspected.fatigue));
  472. $("#js_input_user_fali").attr("data-values", suspected.fatigue);
  473. $("#js_input_user_fuxie").val(getDiarrhea(suspected.diarrhea));
  474. $("#js_input_user_fuxie").attr("data-values", suspected.diarrhea);
  475. $("#shuruqita").val(suspected.others);
  476. }
  477. },
  478. });
  479. }
  480. function addReport() {
  481. var userId = $("#userId").val();
  482. $.ajax({
  483. url: '/home/addReport',
  484. type: "post",
  485. data: {
  486. "userCreate": userId,
  487. },
  488. success: function (data) {
  489. $.toast(data.msg);
  490. },
  491. });
  492. }
  493. $("#my-input-ribao").calendar({
  494. dateFormat: 'yyyy-mm-dd',
  495. inputReadOnly: false,
  496. onChange: function (p, values, displayValues) {
  497. var reportDate = values.toString();
  498. var userId = $("#userId").val();
  499. $.ajax({
  500. url: '/home/home/queryRibaoReportDate',
  501. data: {
  502. "userCreate": userId,
  503. "reportDate": reportDate,
  504. },
  505. type: 'GET',
  506. success: function (data) {
  507. if (data.data == undefined) {
  508. $('#ribao_famliy').empty();
  509. }
  510. else {
  511. if (data.data.length > 0) {
  512. $('#ribao_famliy').empty();
  513. data.data.forEach(function (v) {
  514. helpValue1(v);
  515. });
  516. } else {
  517. }
  518. }
  519. },
  520. error: function () {
  521. }
  522. });
  523. }
  524. });
  525. function helpValue1(v) {
  526. var userName = v.userName + ":";
  527. var grender = getGreder(v.grender);
  528. var age = v.age;
  529. var familyStatus = "";
  530. if (v.familyStatus != 0)
  531. familyStatus = "基本状况:" + getFamilyStatus(v.familyStatus) + ";";
  532. var medical = "";
  533. if (v.medical != 0)
  534. medical = "是否确诊:" + getMedical(v.medical) + ";";
  535. var singleRoom = "";
  536. if (v.singleRoom != 0)
  537. singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
  538. var temperature = "体温:" + v.temperature + ";";
  539. var cough = "";
  540. if (v.cough != 0)
  541. cough = "咳嗽:" + getCough(v.cough) + ";";
  542. var muscle = "";
  543. if (v.muscle != 0)
  544. muscle = "肌肉酸痛:" + getMuscle(v.muscle) + ";";
  545. var dyspnea = "";
  546. if (v.dyspnea != 0)
  547. dyspnea = "呼吸困难:" + getDyspnea(v.dyspnea) + ";";
  548. var fatigue = "";
  549. if (v.fatigue != 0)
  550. fatigue = "乏力:" + getFatigue(v.fatigue) + ";";
  551. var diarrhea = "";
  552. if (v.diarrhea != 0)
  553. diarrhea = "腹泻:" + getDiarrhea(v.diarrhea) + ";";
  554. var others = "";
  555. if (v.others != "")
  556. others = "其他:" + v.others;
  557. $('#ribao_famliy').append($('<div class="weui-media-box weui-media-box_text" style="height: 12vh">\n' +
  558. ' <h4 class="weui-media-box__title">' + userName + '&nbsp;&nbsp;&nbsp;' + grender + '&nbsp;&nbsp;&nbsp;' + age + '</h4>\n' +
  559. ' <p class="weui-media-box__desc" style="height: 80%">' + familyStatus + medical + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + '</p>\n' +
  560. ' </div>\n' +
  561. ' '));
  562. }
  563. function getGreder(greder) {
  564. if (greder == 1)
  565. return "男";
  566. else if (greder == 2)
  567. return "女";
  568. return "";
  569. }
  570. function getFamilyStatus(familyStatus) {
  571. if (familyStatus == 0)
  572. return "无病史";
  573. if (familyStatus == 1)
  574. return "心脑血管疾病(服用ARB)";
  575. else if (familyStatus == 2)
  576. return "心脑血管疾病(未服ARB)";
  577. else if (familyStatus == 3)
  578. return "呼吸系统病史";
  579. else if (familyStatus == 4)
  580. return "肿瘤病史";
  581. else if (familyStatus == 5)
  582. return "糖尿病史";
  583. else if (familyStatus == 6)
  584. return "服用过激素药物";
  585. else if (familyStatus == 7)
  586. return "妊娠期";
  587. else if (familyStatus == 8)
  588. return "其他";
  589. return "";
  590. }
  591. function getCough(cough) {
  592. if (cough == 0)
  593. return "无咳嗽";
  594. else if (cough == 1)
  595. return "偶尔短暂咳嗽";
  596. else if (cough == 2)
  597. return "咳嗽轻度影响生活";
  598. else if (cough == 3)
  599. return "咳嗽严重影响生活";
  600. return "";
  601. }
  602. function getMuscle(muscle) {
  603. if (muscle == 0)
  604. return "无";
  605. else if (muscle == 1)
  606. return "按压有";
  607. else if (muscle == 2)
  608. return "偶尔";
  609. else if (muscle == 3)
  610. return "持续有";
  611. return "";
  612. }
  613. function getDyspnea(dyspnea) {
  614. if (dyspnea == 0)
  615. return "无";
  616. else if (dyspnea == 1)
  617. return "急走或上坡气短";
  618. else if (dyspnea == 2)
  619. return "气短而走路变慢";
  620. else if (dyspnea == 3)
  621. return "走路数分钟后气短";
  622. else if (dyspnea == 4)
  623. return "气短无法离开房间";
  624. return "";
  625. }
  626. function getFatigue(fatigue) {
  627. if (fatigue == 0)
  628. return "无";
  629. else if (fatigue == 1)
  630. return "可体力劳动但觉得累";
  631. else if (fatigue == 2)
  632. return "轻体力劳动后长时间不能恢复";
  633. else if (fatigue == 3)
  634. return "不能正常生活";
  635. return "";
  636. }
  637. function getMedical(medical) {
  638. if (medical == 0)
  639. return "否";
  640. else if (medical == 1)
  641. return "是";
  642. return "";
  643. }
  644. function getSingleRoom(singleRoom) {
  645. if (singleRoom == 0)
  646. return "否";
  647. else if (singleRoom == 1)
  648. return "是";
  649. return "";
  650. }
  651. function getDiarrhea(diarrhea) {
  652. if (diarrhea == 0)
  653. return "无";
  654. else if (diarrhea == 1)
  655. return "轻度腹泻(少于3次)";
  656. else if (diarrhea == 2)
  657. return "中度腹泻(4-6次)";
  658. else if (diarrhea == 3)
  659. return "重度腹泻(超过6次)";
  660. return "";
  661. }
  662. function clearShow() {
  663. console.log("qingkong")
  664. $("#suspectedId").val("");
  665. $("#js_input_user_sex").val("");
  666. $("#js_input_user_sex").attr("data-values", "");
  667. $("#js_input_user_name").val("");
  668. $("#js_input_user_age").val("");
  669. $("#js_input_user_status").val("");
  670. $("#js_input_user_status").attr("data-values", "");
  671. $("#jibenmiaoshu").val("");
  672. $("#switchQuezhen").val("");
  673. $("#switchQuezhen").attr("data-values", "");
  674. $("#switchDanjiangeli").val("");
  675. $("#switchDanjiangeli").attr("data-values", "");
  676. $("#js_input_user_tiwen").val("");
  677. $("#js_input_user_kesou").val("");
  678. $("#js_input_user_kesou").attr("data-values", "");
  679. $("#js_input_user_jirou").val("");
  680. $("#js_input_user_jirou").attr("data-values", "");
  681. $("#js_input_user_huxi").val("");
  682. $("#js_input_user_huxi").attr("data-values", "");
  683. $("#js_input_user_fali").val("");
  684. $("#js_input_user_fali").attr("data-values", "");
  685. $("#js_input_user_fuxie").val("");
  686. $("#js_input_user_fuxie").attr("data-values", "");
  687. $("#shuruqita").val("");
  688. }