ribao.js 20 KB

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