ribao.js 65 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116
  1. function ribao_init() {
  2. $.ajax({
  3. url: '/wx/jsApiConfig',
  4. type: "get",
  5. data: {
  6. "url": location.href.split('#')[0]
  7. },
  8. success: function (data) {
  9. wx.config({
  10. debug: false,
  11. appId: data.data.appId,
  12. timestamp: data.data.timestamp,
  13. nonceStr: data.data.nonceStr,
  14. signature: data.data.signature,
  15. jsApiList: [
  16. // 所有要调用的 API 都要加到这个列表中
  17. 'getLocation'
  18. ]
  19. });
  20. wx.ready(function () {
  21. wx.checkJsApi({
  22. jsApiList: [
  23. 'getLocation'
  24. ],
  25. success: function (res) {
  26. // alert(JSON.stringify(res));
  27. // alert(JSON.stringify(res.checkResult.getLocation));
  28. if (res.checkResult.getLocation == false) {
  29. alert('你的微信版本太低,不支持微信JS接口,请升级到最新的微信版本!');
  30. return;
  31. }
  32. }
  33. });
  34. wx.error(function (res) {
  35. alert("接口调取失败")
  36. });
  37. });
  38. },
  39. });
  40. //lingyun
  41. $('#btnRB').on('click', function () {
  42. window.location.href = "/yeweihui/home.html";
  43. });
  44. $("#js_input_gzzd").select({
  45. title: "选择工作驻地",
  46. items: [
  47. {
  48. title: "武汉市",
  49. value: "1",
  50. },
  51. {
  52. title: "宜昌市",
  53. value: "2",
  54. },
  55. {
  56. title: "当阳市",
  57. value: "3",
  58. },
  59. {
  60. title: "其它地点",
  61. value: "4",
  62. }]
  63. });
  64. $("#js_input_jrszd").select({
  65. title: "选择今晚住地",
  66. items: [
  67. {
  68. title: "武汉市",
  69. value: "1",
  70. }, {
  71. title: "宜昌市",
  72. value: "2",
  73. },
  74. {
  75. title: "当阳市",
  76. value: "3",
  77. },
  78. {
  79. title: "其它地点",
  80. value: "4",
  81. }]
  82. });
  83. $("#js_input_sf").select({
  84. title: "",
  85. items: [
  86. {
  87. title: "否",
  88. value: "0",
  89. },
  90. {
  91. title: "是",
  92. value: "1",
  93. }]
  94. });
  95. $("#js_input_cfd").select({
  96. title: "选择出发地",
  97. items: [
  98. {
  99. title: "武汉市",
  100. value: "1",
  101. }, {
  102. title: "宜昌市",
  103. value: "2",
  104. },
  105. {
  106. title: "当阳市",
  107. value: "3",
  108. },
  109. {
  110. title: "其它地点",
  111. value: "4",
  112. }]
  113. });
  114. $("#js_input_mdd").select({
  115. title: "选择目的地",
  116. items: [
  117. {
  118. title: "武汉市",
  119. value: "1",
  120. }, {
  121. title: "宜昌市",
  122. value: "2",
  123. },
  124. {
  125. title: "当阳市",
  126. value: "3",
  127. },
  128. {
  129. title: "其它地点",
  130. value: "4",
  131. }]
  132. });
  133. $("#js_input_cxfs").select({
  134. title: "选择出行方式",
  135. items: [
  136. {
  137. title: "长途汽车",
  138. value: "1",
  139. },
  140. {
  141. title: "火车",
  142. value: "2",
  143. },
  144. {
  145. title: "飞机",
  146. value: "3",
  147. },
  148. {
  149. title: "自驾",
  150. value: "4",
  151. }]
  152. });
  153. // $("#js_input_user_sex").val(getGreder(2)); //设置初始值
  154. $('#btnRB').on('click', function () {
  155. window.location.href = "/yeweihui/home.html";
  156. });
  157. $("#js_input_user_sex").select({
  158. title: "选择性别",
  159. items: [
  160. {
  161. title: "男",
  162. value: "1",
  163. },
  164. {
  165. title: "女",
  166. value: "2",
  167. }]
  168. });
  169. $("#js_input_user_status").select({
  170. title: "选择基本状况",
  171. items: [
  172. {
  173. title: "无病史",
  174. value: "0",
  175. }, {
  176. title: "心脑血管疾病(服用ARB)",
  177. value: "1",
  178. },
  179. {
  180. title: "心脑血管疾病(未服ARB)",
  181. value: "2",
  182. },
  183. {
  184. title: "呼吸系统病史",
  185. value: "3",
  186. },
  187. {
  188. title: "肿瘤病史",
  189. value: "4",
  190. },
  191. {
  192. title: "糖尿病史",
  193. value: "5",
  194. },
  195. {
  196. title: "服用过激素药物",
  197. value: "6",
  198. },
  199. {
  200. title: "妊娠期",
  201. value: "7",
  202. }]
  203. });
  204. $("#js_input_user_kesou").select({
  205. title: "选择咳嗽情况",
  206. items: [
  207. {
  208. title: "无咳嗽",
  209. value: "0",
  210. },
  211. {
  212. title: "偶有短暂咳嗽",
  213. value: "1",
  214. },
  215. {
  216. title: "咳嗽轻度影响生活",
  217. value: "2",
  218. },
  219. {
  220. title: "咳嗽严重影响生活",
  221. value: "3",
  222. }]
  223. });
  224. $("#js_input_user_jirou").select({
  225. title: "选择肌肉情况",
  226. items: [
  227. {
  228. title: "无",
  229. value: "0",
  230. },
  231. {
  232. title: "按压有",
  233. value: "1",
  234. },
  235. {
  236. title: "偶尔",
  237. value: "2",
  238. },
  239. {
  240. title: "持续有",
  241. value: "3",
  242. }]
  243. });
  244. $("#js_input_user_huxi").select({
  245. title: "选择呼吸情况",
  246. items: [
  247. {
  248. title: "无",
  249. value: "0",
  250. },
  251. {
  252. title: "急走或上坡气短",
  253. value: "1",
  254. },
  255. {
  256. title: "气短而走路变慢",
  257. value: "2",
  258. },
  259. {
  260. title: "走路数分钟后气短",
  261. value: "3",
  262. },
  263. {
  264. title: "气短无法离开房间",
  265. value: "4",
  266. }]
  267. });
  268. $("#js_input_user_fali").select({
  269. title: "选择乏力情况",
  270. items: [
  271. {
  272. title: "无",
  273. value: "0",
  274. },
  275. {
  276. title: "体力劳动后不能恢复",
  277. value: "1",
  278. },
  279. {
  280. title: "轻体力活非常累",
  281. value: "2",
  282. },
  283. {
  284. title: "不能正常生活",
  285. value: "3",
  286. }]
  287. });
  288. $("#js_input_user_fuxie").select({
  289. title: "选择腹泻情况",
  290. items: [
  291. {
  292. title: "无",
  293. value: "0",
  294. },
  295. {
  296. title: "轻度腹泻(少于3次)",
  297. value: "1",
  298. },
  299. {
  300. title: "中度腹泻(4-6次)",
  301. value: "2",
  302. },
  303. {
  304. title: "重度腹泻(超过6次)",
  305. value: "3",
  306. }]
  307. });
  308. // $("#switchQuezhen").select({
  309. // title: "选择是否确诊",
  310. // items: [
  311. // {
  312. // title: "否",
  313. // value: "0",
  314. // },
  315. // {
  316. // title: "是",
  317. // value: "1",
  318. // }]
  319. // });
  320. $("#switchQuezhen").select({
  321. title: "选择症状",
  322. items: [
  323. {
  324. title: "无",
  325. value: "0",
  326. },
  327. {
  328. title: "新冠确诊",
  329. value: "1",
  330. },
  331. {
  332. title: "新冠疑似",
  333. value: "2",
  334. },
  335. {
  336. title: "密切接触者",
  337. value: "3",
  338. },
  339. {
  340. title: "解除观察",
  341. value: "4",
  342. }]
  343. });
  344. $("#switchDanjiangeli").select({
  345. title: "选择是否单间隔离",
  346. items: [
  347. {
  348. title: "否",
  349. value: "0",
  350. },
  351. {
  352. title: "是",
  353. value: "1",
  354. }]
  355. });
  356. //
  357. // updateSuspected({
  358. // userName : 'www',
  359. // grender : 2,
  360. // age : 34,
  361. // familyStatus : 1,
  362. // statusDesp : "",
  363. // medical:0,
  364. // singleRoom:1,
  365. // temperature:0,
  366. // cough:2,
  367. // muscle:1,
  368. // dyspnea:1,
  369. // fatigue:1,
  370. // diarrhea:2,
  371. // others:""
  372. // })
  373. //
  374. // var grender = $("#js_input_user_sex").attr("data-values") == undefined ? 0 : $("#js_input_user_sex").attr("data-values");
  375. // console.log("grender:" + grender)
  376. }
  377. function selectinput1(obj) {
  378. var grender = $("#js_input_gzzd").attr("data-values") == undefined ? 0 : $("#js_input_gzzd").attr("data-values");
  379. if (grender != 4) {//js_input_qtdd
  380. // $('#js_input_qtdd')[0].disabled == 'disabled'+
  381. +
  382. $("#js_input_qtdd").val("");
  383. } else {
  384. $('#js_input_qtdd').removeAttr("disabled")
  385. }
  386. }
  387. function selectinput2(obj) {
  388. var grender = $("#js_input_jrszd").attr("data-values") == undefined ? 0 : $("#js_input_jrszd").attr("data-values");
  389. if (grender != 4) {//js_input_qtdd
  390. // $('#js_input_qtdd')[0].disabled == 'disabled' js_input_jrszq
  391. $('#js_input_jrszq').attr("disabled", "disabled");
  392. $("#js_input_jrszq").val("");
  393. } else {
  394. $('#js_input_jrszq').removeAttr("disabled")
  395. }
  396. }
  397. function selectinput3(obj) {
  398. var grender = $("#js_input_cfd").attr("data-values") == undefined ? 0 : $("#js_input_cfd").attr("data-values");
  399. if (grender != 4) {
  400. $('#js_input_cfdq').attr("disabled", "disabled");
  401. $("#js_input_cfdq").val("");
  402. } else {
  403. $('#js_input_cfdq').removeAttr("disabled")
  404. }
  405. }
  406. function selectinput4(obj) {
  407. var grender = $("#js_input_mdd").attr("data-values") == undefined ? 0 : $("#js_input_mdd").attr("data-values");
  408. if (grender != 4) {
  409. $('#js_input_mddq').attr("disabled", "disabled");
  410. $("#js_input_mddq").val("");
  411. } else {
  412. $('#js_input_mddq').removeAttr("disabled")
  413. }
  414. }
  415. function selectinput5(obj) {
  416. var grender = $("#js_input_cxfs").attr("data-values") == undefined ? 0 : $("#js_input_cxfs").attr("data-values");
  417. if (grender == 4) {
  418. // $('#js_input_cxfsq').attr("disabled","disabled")
  419. } else {
  420. $('#js_input_cxfsq').removeAttr("disabled")
  421. }
  422. }
  423. var listcx = [];
  424. function selectinput6(obj) {
  425. var grender = $("#js_input_sf").attr("data-values") == undefined ? 3 : $("#js_input_sf").attr("data-values");
  426. if (grender == 0) {
  427. $('#none')[0].style.display = 'none';
  428. $("#js_input_cfd").val("");
  429. $("#js_input_cfd").attr("data-values", "");
  430. $("#js_input_mdd").val("");
  431. $("#js_input_mdd").attr("data-values", "");
  432. $("#js_input_cxfs").val("");
  433. $("#js_input_cxfs").attr("data-values", "");
  434. $('#js_input_cxfsq').val("");
  435. $('#js_input_cfdq').val("");
  436. $('#js_input_mddq').val("");
  437. listcx.splice(0, listcx.length);
  438. $('#tabtr').empty();
  439. } else if (grender == 1) {
  440. $('#none')[0].style.display = '';
  441. }
  442. }
  443. //添加出行详情
  444. function insertlingyun() {
  445. var sf = $("#js_input_sf").attr("data-values") == undefined ? 3 : $("#js_input_sf").attr("data-values");
  446. if (sf == 0 || sf == 3) {
  447. cantijiao = true;
  448. $.alert("请选择是否出行");
  449. return;
  450. }
  451. var person = new Object();
  452. var cxfs = $("#js_input_cxfs").attr("data-values") == undefined ? 0 : $("#js_input_cxfs").attr("data-values");
  453. var jrszd = $("#js_input_jrszd").attr("data-values") == undefined ? 0 : $("#js_input_jrszd").attr("data-values");
  454. var cfd = $("#js_input_cfd").attr("data-values") == undefined ? 0 : $("#js_input_cfd").attr("data-values");
  455. var mdd = $("#js_input_mdd").attr("data-values") == undefined ? 0 : $("#js_input_mdd").attr("data-values");
  456. var jrszq = $('#js_input_jrszq').val();
  457. var mddq = $('#js_input_mddq').val();
  458. var cfdq = $('#js_input_cfdq').val();
  459. // if (mdd != jrszd) {
  460. // cantijiao = true;
  461. // $.alert("目的地与今晚住地不一致");
  462. // return;
  463. // }
  464. // if (jrszq != mddq) {
  465. // cantijiao = true;
  466. // $.alert("目的地与今晚住地不一致");
  467. // return;
  468. // }
  469. if (cfd == 4 && mdd == 4) {
  470. if (mddq == cfdq) {
  471. cantijiao = true;
  472. $.alert("出发地与目的地不能一致");
  473. return;
  474. }
  475. } else if (cfd != 4 || mdd != 4) {
  476. if (cfd == mdd) {
  477. cantijiao = true;
  478. $.alert("出发地与目的地不能一致");
  479. return;
  480. }
  481. }
  482. var cxfsq = $('#js_input_cxfsq').val();
  483. for (var i = 0; i < listcx.length; i++) {
  484. if (listcx[i].tripTypeDesp == cxfsq && listcx[i].tripType == cxfs && listcx[i].startLocal == cfd && listcx[i].startLocalOther == cfdq && listcx[i].endLocal == mdd && listcx[i].endLocalOther == mddq) {
  485. cantijiao = true;
  486. $.alert("此行程已添加");
  487. return;
  488. }
  489. }
  490. if (cxfs != 4 && cxfs != 0) {
  491. var val = $('#js_input_cxfsq').val();
  492. if (val == "") {
  493. cantijiao = true;
  494. $.alert("请填写车次/航班/车牌");
  495. return;
  496. }
  497. person.tripTypeDesp = $('#js_input_cxfsq').val();
  498. if (cxfs == 1) {
  499. person.tripType = 1;
  500. person.tripTypeStr = "长途汽车"
  501. } else if (cxfs == 2) {
  502. person.tripType = 2;
  503. person.tripTypeStr = "火车";
  504. } else if (cxfs == 3) {
  505. person.tripType = 3;
  506. person.tripTypeStr = "飞机";
  507. }
  508. } else if (cxfs == 0) {
  509. cantijiao = true;
  510. $.alert("请选择出行方式");
  511. return;
  512. } else if (cxfs == 4) {
  513. var val6 = $('#js_input_cxfsq').val();
  514. if (val6 == "") {
  515. cantijiao = true;
  516. $.alert("请填写车次/航班/车牌");
  517. return;
  518. }
  519. person.tripTypeStr = "自驾";
  520. person.tripType = 4;
  521. person.tripTypeDesp = $('#js_input_cxfsq').val();
  522. }
  523. if (cfd == 4 && cfd != 0) {
  524. var val2 = $('#js_input_cfdq').val();
  525. if (val2 == "") {
  526. cantijiao = true;
  527. $.alert("请填写出发地");
  528. return;
  529. }
  530. person.startLocal = 4;
  531. person.startLocalOther = $('#js_input_cfdq').val();
  532. person.startLocalStr = "其它地点_" + $('#js_input_cfdq').val();
  533. } else if (cfd != 4 && cfd != 0) {
  534. if (cfd == 1) {
  535. person.startLocal = 1;
  536. person.startLocalStr = "武汉市";
  537. person.startLocalOther = $('#js_input_cfdq').val() == undefined ? "" : $('#js_input_cfdq').val();
  538. } else if (cfd == 2) {
  539. person.startLocal = 2;
  540. person.startLocalStr = "宜昌市";
  541. person.startLocalOther = $('#js_input_cfdq').val() == undefined ? "" : $('#js_input_cfdq').val();
  542. } else if (cfd == 3) {
  543. person.startLocal = 3;
  544. person.startLocalStr = "当阳市";
  545. person.startLocalOther = $('#js_input_cfdq').val() == undefined ? "" : $('#js_input_cfdq').val();
  546. }
  547. } else if (cfd == 0) {
  548. cantijiao = true;
  549. $.alert("请选择出发地");
  550. return;
  551. }
  552. if (mdd == 4 && mdd != 0) {
  553. var val3 = $('#js_input_mddq').val();
  554. if (val3 == "") {
  555. cantijiao = true;
  556. $.alert("请填写目的地");
  557. return;
  558. }
  559. person.endLocal = 4;
  560. person.endLocalOther = $('#js_input_mddq').val();
  561. person.endlocalStr = "其它地点_" + $('#js_input_mddq').val();
  562. } else if (mdd != 4 && mdd != 0) {
  563. if (mdd == 1) {
  564. person.endLocal = 1;
  565. person.endlocalStr = "武汉市";
  566. person.endLocalOther = $('#js_input_mddq').val() == undefined ? "" : $('#js_input_mddq').val();
  567. } else if (mdd == 2) {
  568. person.endLocal = 2;
  569. person.endlocalStr = "宜昌市";
  570. person.endLocalOther = $('#js_input_mddq').val() == undefined ? "" : $('#js_input_mddq').val();
  571. } else if (mdd == 3) {
  572. person.endLocal = 3;
  573. person.endlocalStr = "当阳市";
  574. person.endLocalOther = $('#js_input_mddq').val() == undefined ? "" : $('#js_input_mddq').val();
  575. }
  576. } else if (mdd == 0) {
  577. cantijiao = true;
  578. $.alert("请选择目的地");
  579. return;
  580. }
  581. listcx.push(person);
  582. // $.alert("添加成功");
  583. tab()
  584. }
  585. function tab() {
  586. var xxIds = [];
  587. var xxName = [
  588. "序号",
  589. "出发地",
  590. "目的地",
  591. "出行方式",
  592. "车次/航班/车牌",
  593. "操作"
  594. ];
  595. for (var i = 0; i < xxName.length; i++) {
  596. xxIds.push({
  597. name: xxName[i]
  598. });
  599. }
  600. $('#tabtr').empty();
  601. var html = "<tr style='background-color: #f8f8f8;'>";
  602. for (var i = 0; i < xxIds.length; i++) {
  603. // alert(xxIds[i].name);
  604. html += "<th>" + xxIds[i].name + "</th>";
  605. }
  606. html += "</tr>"
  607. for (var i = 0; i < listcx.length; i++) {//后端传过来的集合遍历
  608. if (i % 2 != 0) {
  609. html += "<tr style='background-color: #f8f8f8;'>";
  610. }
  611. else {
  612. html += "<tr>";
  613. }
  614. html += "<td style='text-align: center;'>" + (i + 1) + "</td>";
  615. // var isValue = false; //记录是否赋值
  616. html += "<td style='text-align: center;' >" + listcx[i].startLocalStr + " </td>";
  617. html += "<td style='text-align: center;' >" + listcx[i].endlocalStr + " </td>";
  618. html += "<td style='text-align: center;' >" + listcx[i].tripTypeStr + " </td>";
  619. html += "<td style='text-align: center;' >" + listcx[i].tripTypeDesp + " </td>";
  620. 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>";
  621. html += "</tr>";
  622. $("#tabtr").html(html);
  623. }
  624. }
  625. function splice(obj) {
  626. listcx.splice(obj, 1);
  627. tab()
  628. }
  629. //首次近日报告
  630. function ribaoInitialization(reportId) {
  631. if (reportId == null)
  632. reportId = 0;
  633. var userId = $("#userId").val();
  634. $.ajax({
  635. url: '/home/home/queryRibaoRefresh',
  636. data: {
  637. reportId: reportId,
  638. userCreate: userId
  639. },
  640. type: 'GET',
  641. success: function (data) {
  642. if (data.data == undefined || data.data == "") {
  643. $('#rb_family').empty();
  644. document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
  645. canSahngbao = false;
  646. }
  647. else {
  648. if (data.data.length > 0) {
  649. hasData = true;
  650. data.data.forEach(function (v) {
  651. ribao_cell(v);
  652. });
  653. }
  654. }
  655. },
  656. error: function () {
  657. }
  658. });
  659. }
  660. //刷新今日日报
  661. function ribao_refrash() {
  662. var userId = $("#userId").val();
  663. $.ajax({
  664. url: '/home/home/queryRibao',
  665. data: {
  666. userCreate: userId
  667. },
  668. type: 'GET',
  669. success: function (data) {
  670. if (data.data == undefined || data.data == "") {
  671. $('#rb_family').empty();
  672. document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
  673. }
  674. else {
  675. $('#rb_family').empty();
  676. if (data.data.length > 0) {
  677. hasData = true;
  678. data.data.forEach(function (v) {
  679. ribao_cell(v);
  680. });
  681. } else {
  682. }
  683. }
  684. },
  685. error: function () {
  686. }
  687. });
  688. }
  689. function ribao_cell(v) {
  690. var userName = v.userName + ":";
  691. var grender = getGreder(v.grender);
  692. var age = v.age;
  693. var familyStatus = "";
  694. if (v.familyStatus != 0)
  695. familyStatus = "基本状况:" + getFamilyStatus(v.familyStatus) + ";";
  696. var medical = "";
  697. if (v.medical != 0)
  698. medical = "新冠肺炎:" + getMedical(v.medical) + ";";
  699. var isContact = "";
  700. if (v.isContact != 0)
  701. isContact = "家庭成员中有新冠肺炎疫情或有过病例接触史人员:" + getIsContact(v.isContact) + ";";
  702. var isSuspected = "";
  703. if (v.isSuspected != 0)
  704. isSuspected = "近期接触的家庭成员中有感冒、发热、咳嗽等症状:" + getIsContact(v.isContact) + ";";
  705. var singleRoom = "";
  706. var uptownId = $("#uptownId").val();
  707. if (uptownId != xiaoquId && uptownId != ceshixiaoquId) {
  708. if (v.singleRoom != 0)
  709. singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
  710. if (v.singleRoom == 0 && v.medical != 0)
  711. singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
  712. }
  713. var temperature = "体温:" + v.temperature + ";";
  714. var cough = "";
  715. if (v.cough != 0)
  716. cough = "咳嗽现象:" + getCough(v.cough) + ";";
  717. var muscle = "";
  718. if (v.muscle != 0)
  719. muscle = "肌肉酸痛:" + getMuscle(v.muscle) + ";";
  720. var dyspnea = "";
  721. if (v.dyspnea != 0)
  722. dyspnea = "呼吸困难:" + getDyspnea(v.dyspnea) + ";";
  723. var fatigue = "";
  724. if (v.fatigue != 0)
  725. fatigue = "乏力现象:" + getFatigue(v.fatigue) + ";";
  726. var diarrhea = "";
  727. if (v.diarrhea != 0)
  728. diarrhea = "腹泻现象:" + getDiarrhea(v.diarrhea) + ";";
  729. var others = "";
  730. if (v.others != "")
  731. others = "其他描述:" + v.others + ";";
  732. var scoreRezult = "";
  733. if (v.scoreRezult != 0)
  734. scoreRezult = "评估结果:" + getScoreRezult(v.scoreRezult, v.temperatureScore) + ";";
  735. var workLocal = "";
  736. var todayLocal = "";
  737. var isTrip = "";
  738. var tripDet = "";
  739. if (uptownId == xiaoquId || uptownId == ceshixiaoquId) {
  740. if (v.workLocal != 0) {
  741. if (v.workLocal < 4)
  742. workLocal = "工作驻地:" + getLocal(v.workLocal) + ";";
  743. else
  744. workLocal = "工作驻地:其它地点_" + v.workLocalOther + ";";
  745. }
  746. if (v.todayLocal != 0) {
  747. if (v.todayLocal < 4)
  748. todayLocal = "今晚住地:" + getLocal(v.todayLocal) + ";";
  749. else
  750. todayLocal = "今晚住地:其它地点_" + v.todayLocalOther + ";";
  751. }
  752. if (v.isTrip != undefined)
  753. isTrip = "是否跨市出行:" + getIsTrip(v.isTrip) + ";"
  754. if (v.tripDet != undefined)
  755. tripDet = "出行详细:" + v.tripDet + ";"
  756. }
  757. $('#rb_family').append($('<div class="weui-media-box weui-media-box_text" style="height: auto">\n' +
  758. ' <h4 class="weui-media-box__title">' + userName + '&nbsp;&nbsp;' + grender + '&nbsp;&nbsp;&nbsp;' + age + '&nbsp;&nbsp;<a style="color: #bc4246" onclick=\'deleteSuspected(' + JSON.stringify(v.suspectedId) + ')\'>删除</a>\n' +
  759. ' &nbsp;&nbsp;<a style="color: #2a62bc" onclick=\'updateSuspected(' + JSON.stringify(v.suspectedId) + ')\'>修改上报</a></h4>\n' +
  760. ' <div style="height: auto">' + familyStatus + medical + isContact + isSuspected + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + scoreRezult + workLocal + todayLocal + isTrip + tripDet + '</>\n' +
  761. ' </div>\n' +
  762. ' '));
  763. }
  764. function ribao_add() {
  765. $('#btnAdd').on('click', function () {
  766. // 获取定位
  767. getLocation();
  768. if ($('#ribao')[0].style.display == 'none') {
  769. $('#notOpenRibao').toggle();
  770. $('#ribao')[0].style.display = '';
  771. } else {
  772. $('#notOpenRibao')[0].style.display = '';
  773. $('#ribao')[0].style.display = 'none';
  774. }
  775. //基本情况
  776. $("input[name='checkbox1']").removeAttr("checked");
  777. $("input[name='checkbox2']").removeAttr("checked");
  778. $("input[name='checkbox3']").removeAttr("checked");
  779. $("input[name='checkbox4']").removeAttr("checked");
  780. $("input[name='checkbox5']").removeAttr("checked");
  781. $("input[name='checkbox6']").removeAttr("checked");
  782. $("input[name='checkbox7']").removeAttr("checked");
  783. $("#switchQuezhen").val(getMedical(0));
  784. $("#switchQuezhen").attr("data-values", 0);
  785. $("#switchDanjiangeli").val(getSingleRoom(0));
  786. $("#switchDanjiangeli").attr("data-values", 0);
  787. $("#js_input_user_tiwen").val(0);
  788. $("#js_input_user_kesou").val(getCough(0));
  789. $("#js_input_user_kesou").attr("data-values", 0);
  790. $("#js_input_user_jirou").val(getMuscle(0));
  791. $("#js_input_user_jirou").attr("data-values", 0);
  792. $("#js_input_user_huxi").val(getDyspnea(0));
  793. $("#js_input_user_huxi").attr("data-values", 0);
  794. $("#js_input_user_fali").val(getFatigue(0));
  795. $("#js_input_user_fali").attr("data-values", 0);
  796. $("#js_input_user_fuxie").val(getDiarrhea(0));
  797. $("#js_input_user_fuxie").attr("data-values", 0);
  798. $("#js_input_sf").val(getIsTrip(0));
  799. $("#js_input_sf").attr("data-values", 0);
  800. $('#none')[0].style.display = 'none';
  801. $('#tabtr').empty();
  802. // $("#suspectedId").val("");
  803. // $("#js_input_gzzd").val("");
  804. // $("#js_input_jrszd").val("");
  805. // $('#js_input_mddq').attr("disabled","disabled");
  806. // $('#js_input_jrszq').attr("disabled","disabled");
  807. // $('#js_input_qtdd').attr("disabled","disabled");
  808. // $('#js_input_cfdq').attr("disabled","disabled");
  809. // var userId = $("#userId").val();
  810. // //获取用户家人
  811. // $.ajax({
  812. // url: '/home/selectAddSuspected',
  813. // get: "get",
  814. // data: {
  815. // "userCreate": userId
  816. // },
  817. // success: function (data) {
  818. // if (data != null || data != '') {
  819. // //存在
  820. // var suspected = data;
  821. // $("#js_input_user_sex").val(getGreder(suspected.grender));
  822. // $("#js_input_user_sex").attr("data-values", suspected.grender);
  823. // $("#js_input_user_name").val(suspected.userName);
  824. // $("#js_input_user_age").val(suspected.age);
  825. // //基本情况
  826. // if (suspected.familyStatus != "") {
  827. // var familyStatusList = suspected.familyStatus.split(",");
  828. // if (familyStatusList[0] == 1)
  829. // $("input[name='checkbox1']").prop("checked", "checked");
  830. // else
  831. // $("input[name='checkbox1']").removeAttr("checked");
  832. // if (familyStatusList[1] == 1)
  833. // $("input[name='checkbox2']").prop("checked", "checked");
  834. // else
  835. // $("input[name='checkbox2']").removeAttr("checked");
  836. // if (familyStatusList[2] == 1)
  837. // $("input[name='checkbox3']").prop("checked", "checked");
  838. // else
  839. // $("input[name='checkbox3']").removeAttr("checked");
  840. // if (familyStatusList[3] == 1)
  841. // $("input[name='checkbox4']").prop("checked", "checked");
  842. // else
  843. // $("input[name='checkbox4']").removeAttr("checked");
  844. // if (familyStatusList[4] == 1)
  845. // $("input[name='checkbox5']").prop("checked", "checked");
  846. // else
  847. // $("input[name='checkbox5']").removeAttr("checked");
  848. // if (familyStatusList[5] == 1)
  849. // $("input[name='checkbox6']").prop("checked", "checked");
  850. // else
  851. // $("input[name='checkbox6']").removeAttr("checked");
  852. // if (familyStatusList[6] == 1)
  853. // $("input[name='checkbox7']").prop("checked", "checked");
  854. // else
  855. // $("input[name='checkbox7']").removeAttr("checked");
  856. //
  857. // }
  858. //
  859. // $("#switchQuezhen").val(getMedical(suspected.medical));
  860. // $("#switchQuezhen").attr("data-values", suspected.medical);
  861. //
  862. // $("#switchDanjiangeli").val(getSingleRoom(suspected.singleRoom));
  863. // $("#switchDanjiangeli").attr("data-values", suspected.singleRoom);
  864. //
  865. // $("#js_input_user_tiwen").val(suspected.temperature);
  866. //
  867. // $("#js_input_user_kesou").val(getCough(suspected.cough));
  868. // $("#js_input_user_kesou").attr("data-values", suspected.cough);
  869. //
  870. // $("#js_input_user_jirou").val(getMuscle(suspected.muscle));
  871. // $("#js_input_user_jirou").attr("data-values", suspected.muscle);
  872. //
  873. // $("#js_input_user_huxi").val(getDyspnea(suspected.dyspnea));
  874. // $("#js_input_user_huxi").attr("data-values", suspected.dyspnea);
  875. //
  876. // $("#js_input_user_fali").val(getFatigue(suspected.fatigue));
  877. // $("#js_input_user_fali").attr("data-values", suspected.fatigue);
  878. //
  879. // $("#js_input_user_fuxie").val(getDiarrhea(suspected.diarrhea));
  880. // $("#js_input_user_fuxie").attr("data-values", suspected.diarrhea);
  881. //
  882. // $("#shuruqita").val(suspected.others);
  883. // $("#js_input_score_rezult").val(getScoreRezult(suspected.scoreRezult, suspected.temperatureScore));
  884. // $("#js_input_score_rezult_value").val(suspected.scoreRezult);
  885. // $("#js_input_temperature_score").val(suspected.temperatureScore);
  886. // $("#js_input_score_histroy").val(suspected.scoreHistroy);
  887. // $("#js_input_score").val(suspected.score);
  888. //
  889. // $("#js_input_sf").val(getIsTrip(0));
  890. // $("#js_input_sf").attr("data-values", 0);
  891. // $('#none')[0].style.display = 'none';
  892. // }
  893. // else {
  894. // //基本情况
  895. // $("input[name='checkbox1']").removeAttr("checked");
  896. // $("input[name='checkbox2']").removeAttr("checked");
  897. // $("input[name='checkbox3']").removeAttr("checked");
  898. // $("input[name='checkbox4']").removeAttr("checked");
  899. // $("input[name='checkbox5']").removeAttr("checked");
  900. // $("input[name='checkbox6']").removeAttr("checked");
  901. // $("input[name='checkbox7']").removeAttr("checked");
  902. //
  903. // $("#switchQuezhen").val(getMedical(0));
  904. // $("#switchQuezhen").attr("data-values", 0);
  905. //
  906. // $("#switchDanjiangeli").val(getSingleRoom(0));
  907. // $("#switchDanjiangeli").attr("data-values", 0);
  908. //
  909. // $("#js_input_user_tiwen").val(0);
  910. //
  911. // $("#js_input_user_kesou").val(getCough(0));
  912. // $("#js_input_user_kesou").attr("data-values", 0);
  913. //
  914. // $("#js_input_user_jirou").val(getMuscle(0));
  915. // $("#js_input_user_jirou").attr("data-values", 0);
  916. //
  917. // $("#js_input_user_huxi").val(getDyspnea(0));
  918. // $("#js_input_user_huxi").attr("data-values", 0);
  919. //
  920. // $("#js_input_user_fali").val(getFatigue(0));
  921. // $("#js_input_user_fali").attr("data-values", 0);
  922. //
  923. // $("#js_input_user_fuxie").val(getDiarrhea(0));
  924. // $("#js_input_user_fuxie").attr("data-values", 0);
  925. //
  926. //
  927. // // $("#js_input_cxfs").empty();
  928. // // $("#js_input_cfd").empty();
  929. // // $("#js_input_mdd").empty();
  930. // // $('#js_input_cxfsq').val("");
  931. // // $('#js_input_cfdq').val("");
  932. // // $('#js_input_mddq').val("");
  933. // // listcx.splice(0,listcx.length);
  934. // // $('#tabtr').empty();
  935. // // $("#js_input_qtdd").val("");
  936. // // $("#js_input_jrszq").val("");
  937. // // $("#js_input_sf").val("");
  938. // $("#js_input_sf").val(getIsTrip(0));
  939. // $("#js_input_sf").attr("data-values", 0);
  940. // $('#none')[0].style.display = 'none';
  941. // $('#tabtr').empty();
  942. // // $("#suspectedId").val("");
  943. // // $("#js_input_gzzd").val("");
  944. // // $("#js_input_jrszd").val("");
  945. // // $('#js_input_mddq').attr("disabled","disabled");
  946. // // $('#js_input_jrszq').attr("disabled","disabled");
  947. // // $('#js_input_qtdd').attr("disabled","disabled");
  948. // // $('#js_input_cfdq').attr("disabled","disabled");
  949. //
  950. // }
  951. // },
  952. // });
  953. });
  954. }
  955. function tt() {
  956. alert($("input[name='radio']:checked").val())
  957. }
  958. function ribao_cancel() {
  959. $('#cancel').on('click', function () {
  960. listcx.splice(0, listcx.length);
  961. $('#tabtr').empty();
  962. $("#js_input_cfd").val("");
  963. $("#js_input_cfd").attr("data-values", "");
  964. $("#js_input_mdd").val("");
  965. $("#js_input_mdd").attr("data-values", "");
  966. $("#js_input_cxfs").val("");
  967. $("#js_input_cxfs").attr("data-values", "");
  968. $("#js_input_gzzd").val("");
  969. $("#js_input_gzzd").attr("data-values", "");
  970. $("#js_input_jrszd").val("");
  971. $("#js_input_jrszd").attr("data-values", "");
  972. $("#js_input_sf").val("");
  973. $("#js_input_sf").attr("data-values", "");
  974. $("#js_input_qtdd").val("");
  975. $("#js_input_jrszq").val("");
  976. $("#js_input_cfdq").val("");
  977. $("#js_input_mddq").val("");
  978. $("#js_input_cxfsq").val("");
  979. if ($('#ribao')[0].style.display == 'none') {
  980. $('#notOpenRibao').toggle();
  981. $('#ribao')[0].style.display = '';
  982. } else {
  983. $('#notOpenRibao')[0].style.display = '';
  984. $('#ribao')[0].style.display = 'none';
  985. }
  986. clearShow();
  987. });
  988. }
  989. function ribaoCommit() {
  990. if (cantijiao == false) {
  991. return
  992. }
  993. cantijiao = false
  994. // //判断是否获取到定位
  995. if (longitude == '' && latitude =='') {
  996. cantijiao = true;
  997. $.alert("请先设置微信获取当前位置");
  998. return;
  999. }
  1000. // if (autoLocal == '') {
  1001. // cantijiao = true;
  1002. // $.alert("请先设置微信获取当前位置");
  1003. // return;
  1004. // }
  1005. var sf = $("#js_input_sf").attr("data-values") == undefined ? 3 : $("#js_input_sf").attr("data-values");
  1006. if (listcx.length == 0 && sf == 1) {
  1007. cantijiao = true;
  1008. $.alert("请添加出行");
  1009. return;
  1010. }
  1011. var suspectedId = $("#suspectedId").val();
  1012. var userId = $("#userId").val();
  1013. var userName = $("#js_input_user_name").val();
  1014. var grender = $("#js_input_user_sex").attr("data-values") == undefined ? 0 : $("#js_input_user_sex").attr("data-values");
  1015. var age = $("#js_input_user_age").val();
  1016. //不能同时选择服用和未服用
  1017. if ($("input[name='checkbox1']:checked").val() == "on" && $("input[name='checkbox2']:checked").val() == "on") {
  1018. cantijiao = true;
  1019. $.alert("心脑血管不能同时选择服用和未服用");
  1020. return;
  1021. }
  1022. //男性不能选择妊娠期
  1023. if ($("#js_input_user_sex").attr("data-values") == 1 && $("input[name='checkbox7']:checked").val() == "on") {
  1024. cantijiao = true;
  1025. $.alert("男性不能选择妊娠期");
  1026. return;
  1027. }
  1028. //家庭状态
  1029. var familyStatus = "";
  1030. if ($("input[name='checkbox1']:checked").val() == "on")
  1031. familyStatus += "1";
  1032. else
  1033. familyStatus += "0";
  1034. if ($("input[name='checkbox2']:checked").val() == "on")
  1035. familyStatus += ",1";
  1036. else
  1037. familyStatus += ",0";
  1038. if ($("input[name='checkbox3']:checked").val() == "on")
  1039. familyStatus += ",1";
  1040. else
  1041. familyStatus += ",0";
  1042. if ($("input[name='checkbox4']:checked").val() == "on")
  1043. familyStatus += ",1";
  1044. else
  1045. familyStatus += ",0";
  1046. if ($("input[name='checkbox5']:checked").val() == "on")
  1047. familyStatus += ",1";
  1048. else
  1049. familyStatus += ",0";
  1050. if ($("input[name='checkbox6']:checked").val() == "on")
  1051. familyStatus += ",1";
  1052. else
  1053. familyStatus += ",0";
  1054. if ($("input[name='checkbox7']:checked").val() == "on")
  1055. familyStatus += ",1";
  1056. else
  1057. familyStatus += ",0";
  1058. var medical = $("input[name='radio']:checked").val();
  1059. if (medical == undefined) {
  1060. cantijiao = true;
  1061. $.alert("请选择新冠肺炎");
  1062. return;
  1063. }
  1064. var isContact = $("input[name='radio1']:checked").val();
  1065. if (isContact == undefined) {
  1066. cantijiao = true;
  1067. $.alert("请选择家庭成员中有新冠肺炎疫情或有过病例接触史人员");
  1068. return;
  1069. }
  1070. var isSuspected = $("input[name='radio2']:checked").val();
  1071. if (isSuspected == undefined) {
  1072. isSuspected = true;
  1073. $.alert("请选择近期接触的家庭成员中有感冒、发热、咳嗽等症状");
  1074. return;
  1075. }
  1076. //var familyStatus = $("#js_input_user_status").attr("data-values") == undefined ? 0 : $("#js_input_user_status").attr("data-values");
  1077. //var statusDesp = $("#jibenmiaoshu").val() == undefined ? "" : $("#jibenmiaoshu").val();
  1078. var statusDesp = "";
  1079. // var medical = $("#switchQuezhen").attr("data-values") == undefined ? 0 : $("#switchQuezhen").attr("data-values");
  1080. var medicalzz = $("#switchQuezhen_zz").attr("data-values") == undefined ? 0 : $("#switchQuezhen_zz").attr("data-values");
  1081. var singleRoom = $("#switchDanjiangeli").attr("data-values") == undefined ? 0 : $("#switchDanjiangeli").attr("data-values");
  1082. var temperature = $("#js_input_user_tiwen").val() == "" ? 0 : $("#js_input_user_tiwen").val();
  1083. var cough = $("#js_input_user_kesou").attr("data-values") == undefined ? 0 : $("#js_input_user_kesou").attr("data-values");
  1084. var muscle = $("#js_input_user_jirou").attr("data-values") == undefined ? 0 : $("#js_input_user_jirou").attr("data-values");
  1085. var dyspnea = $("#js_input_user_huxi").attr("data-values") == undefined ? 0 : $("#js_input_user_huxi").attr("data-values");
  1086. var fatigue = $("#js_input_user_fali").attr("data-values") == undefined ? 0 : $("#js_input_user_fali").attr("data-values");
  1087. var diarrhea = $("#js_input_user_fuxie").attr("data-values") == undefined ? 0 : $("#js_input_user_fuxie").attr("data-values");
  1088. var others = $("#shuruqita").val() == undefined ? "" : $("#shuruqita").val();
  1089. var scoreRezult = $("#js_input_score_rezult_value").val() == undefined ? "" : $("#js_input_score_rezult_value").val();
  1090. var temperatureScore = $("#js_input_temperature_score").val() == undefined ? "" : $("#js_input_temperature_score").val();
  1091. var scoreHistroy = $("#js_input_score_histroy").val() == undefined ? "" : $("#js_input_score_histroy").val();
  1092. var score = $("#js_input_score").val() == undefined ? "" : $("#js_input_score").val();
  1093. if (userName == undefined || userName == '') {
  1094. cantijiao = true;
  1095. $.alert("请填写姓名");
  1096. return;
  1097. }
  1098. if (grender == 0) {
  1099. cantijiao = true;
  1100. $.alert("请填写性别");
  1101. return;
  1102. }
  1103. if (age == undefined || age == '') {
  1104. cantijiao = true;
  1105. $.alert("请填写年龄");
  1106. return;
  1107. }
  1108. if (age > 150 || age < 0) {
  1109. cantijiao = true;
  1110. $.alert("请填写正确的年龄");
  1111. return;
  1112. }
  1113. if (temperature <= 0) {
  1114. cantijiao = true;
  1115. $.alert("请填写体温");
  1116. return;
  1117. }
  1118. if (temperature > 50 || temperature < 30) {
  1119. cantijiao = true;
  1120. $.alert("请填写正确的体温");
  1121. return;
  1122. }
  1123. //如果是凌云
  1124. var uptownId = $("#uptownId").val();
  1125. if (uptownId == xiaoquId || uptownId == ceshixiaoquId) {
  1126. //lingyun
  1127. var gzzd = $("#js_input_gzzd").attr("data-values") == undefined ? 0 : $("#js_input_gzzd").attr("data-values");
  1128. var qtdd = $("#js_input_qtdd").val();
  1129. var workLocal = "";
  1130. var workLocalOther = "";
  1131. if (gzzd == 0) {
  1132. cantijiao = true;
  1133. $.alert("请选择工作驻地");
  1134. return;
  1135. } else if (gzzd == 4 && qtdd == "") {
  1136. cantijiao = true;
  1137. $.alert("请填写工作驻地");
  1138. return;
  1139. } else if (gzzd != 0 && gzzd != 4) {
  1140. if (gzzd == 1) {
  1141. workLocal = 1;
  1142. } else if (gzzd == 2) {
  1143. workLocal = 2;
  1144. } else if (gzzd == 3) {
  1145. workLocal = 3;
  1146. }
  1147. } else if (gzzd == 4 && qtdd != "") {
  1148. workLocal = 4;
  1149. workLocalOther = qtdd;
  1150. }
  1151. //var listcx = [];
  1152. //var person=new Object();
  1153. var jrszd = $("#js_input_jrszd").attr("data-values") == undefined ? 0 : $("#js_input_jrszd").attr("data-values");
  1154. var jrszq = $("#js_input_jrszq").val();
  1155. var todyLocal = "";
  1156. var todyLocalOther = "";
  1157. if (jrszd == 0) {
  1158. cantijiao = true;
  1159. $.alert("请先设置微信获取当前位置");
  1160. //$.alert("请选择今晚住地");
  1161. return;
  1162. } else if (jrszd == 4 && jrszq == "") {
  1163. cantijiao = true;
  1164. $.alert("请先设置微信获取当前位置");
  1165. //$.alert("请填写今晚住地");
  1166. return;
  1167. } else if (jrszd != 0 && jrszd != 4) {
  1168. if (jrszd == 1) {
  1169. todyLocal = 1;
  1170. } else if (jrszd == 2) {
  1171. todyLocal = 2;
  1172. } else if (jrszd == 3) {
  1173. todyLocal = 3;
  1174. }
  1175. } else if (jrszd == 4 && jrszq != "") {
  1176. todyLocal = 4;
  1177. todyLocalOther = jrszq;
  1178. }
  1179. var sf = $("#js_input_sf").attr("data-values") == undefined ? 3 : $("#js_input_sf").attr("data-values");
  1180. var isTrip = "";
  1181. if (sf == 3) {
  1182. cantijiao = true;
  1183. $.alert("请选择是否出行");
  1184. return;
  1185. } else {
  1186. isTrip = sf;
  1187. }
  1188. } else {
  1189. workLocal = 0;
  1190. workLocalOther = "";
  1191. todyLocal = 0;
  1192. todyLocalOther = "";
  1193. isTrip = 0;
  1194. listcx = [];
  1195. }
  1196. var pdata = {
  1197. "suspectedId": suspectedId,
  1198. "userCreate": userId,
  1199. "userName": userName,
  1200. "grender": grender,
  1201. "age": age,
  1202. "familyStatus": familyStatus,
  1203. "statusDesp": statusDesp,
  1204. "medical": medical,
  1205. "singleRoom": singleRoom,
  1206. "temperature": temperature,
  1207. "cough": cough,
  1208. "muscle": muscle,
  1209. "dyspnea": dyspnea,
  1210. "fatigue": fatigue,
  1211. "diarrhea": diarrhea,
  1212. "others": others,
  1213. "scoreRezult": scoreRezult,
  1214. "temperatureScore": temperatureScore,
  1215. "scoreHistroy": scoreHistroy,
  1216. "score": score,
  1217. "isContact": isContact,
  1218. "isSuspected": isSuspected,
  1219. "workLocal": workLocal,
  1220. "workLocalOther": workLocalOther,
  1221. "todayLocal": todyLocal,
  1222. "todayLocalOther": todyLocalOther,
  1223. "autoLocal": autoLocal,
  1224. "autoAddr": autoAddr,
  1225. "isTrip": isTrip,
  1226. "tripDet": listcx,
  1227. };
  1228. $.ajax({
  1229. url: '/home/addRibaoTrip',
  1230. type: "post",
  1231. contentType: "application/json; charset=utf-8",
  1232. data: JSON.stringify(pdata),
  1233. success: function (data) {
  1234. console.log('data:', data.msgReport);
  1235. if (data == {} || data == '' || data == null || data == undefined) {
  1236. $.toast("数据提交失败,请重新提交!", 'forbidden');
  1237. cantijiao = true;
  1238. return;
  1239. }
  1240. if (data.reportId == null || data.reportId == undefined || data.reportId <= 0) {
  1241. $.toast("数据提交失败,请重新提交!", 'forbidden');
  1242. cantijiao = true;
  1243. return;
  1244. }
  1245. if (data.msgReport == "2") {
  1246. cantijiao = true;
  1247. $.toast("家人姓名不能重复,如果重复,可以带上称呼");
  1248. return;
  1249. }
  1250. if (data.msgReport == "4") {
  1251. cantijiao = true;
  1252. $.toast("是否出行,请如实填写!");
  1253. return;
  1254. }
  1255. if ($('#ribao')[0].style.display == 'none') {
  1256. $('#notOpenRibao').toggle();
  1257. $('#ribao')[0].style.display = '';
  1258. } else {
  1259. $('#notOpenRibao')[0].style.display = '';
  1260. $('#ribao')[0].style.display = 'none';
  1261. }
  1262. cantijiao = true
  1263. $('#ribao_jinrijujian').empty();
  1264. $('#ribao_jinrijujian').append(data.safetyNum);
  1265. //修改
  1266. var uptownId = $("#uptownId").val();
  1267. //是凌云
  1268. if (uptownId == xiaoquId || uptownId == ceshixiaoquId) {
  1269. if (suspectedId > 0) {
  1270. var date = new Date();
  1271. var Y = date.getFullYear() + '-';
  1272. var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
  1273. var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + ' ';
  1274. var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + ':';
  1275. var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + ':';
  1276. var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds());
  1277. var time = Y + M + D + h + m + s;
  1278. canSahngbao = false;
  1279. document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
  1280. document.getElementById("txt_shangbao").style['color'] = "#0bb20c";
  1281. document.getElementById("txt_shangbaotime").style['color'] = "#0bb20c";
  1282. $('#txt_shangbao').empty();
  1283. $('#txt_shangbao').append("今日已上报");
  1284. $('#txt_shangbaotime').empty();
  1285. $('#txt_shangbaotime').append("上报时间:" + time);
  1286. }
  1287. else {
  1288. canSahngbao = true;
  1289. document.getElementById("btn_shangbao").style['background-color'] = "#0bb20c";
  1290. document.getElementById("txt_shangbao").style['color'] = "red";
  1291. $('#txt_shangbao').empty();
  1292. $('#txt_shangbao').append("今日未上报");
  1293. $('#txt_shangbaotime').empty();
  1294. }
  1295. }
  1296. else {
  1297. canSahngbao = true;
  1298. document.getElementById("btn_shangbao").style['background-color'] = "#0bb20c";
  1299. document.getElementById("txt_shangbao").style['color'] = "red";
  1300. $('#txt_shangbao').empty();
  1301. $('#txt_shangbao').append("今日未上报");
  1302. $('#txt_shangbaotime').empty();
  1303. // $.toast("请点击上报");
  1304. }
  1305. ribao_refrash();
  1306. clearShow();
  1307. },
  1308. });
  1309. }
  1310. function deleteSuspected(suspectedId) {
  1311. $.ajax({
  1312. url: '/home/deleteSuspected',
  1313. type: "post",
  1314. data: {
  1315. "suspectedId": suspectedId
  1316. },
  1317. success: function (data) {
  1318. $('#ribao_jinrijujian').empty();
  1319. $('#ribao_jinrijujian').append(data.safetyNum);
  1320. //今日未上报
  1321. canSahngbao = true;
  1322. document.getElementById("btn_shangbao").style['background-color'] = "#0bb20c";
  1323. document.getElementById("txt_shangbao").style['color'] = "red";
  1324. $('#txt_shangbao').empty();
  1325. $('#txt_shangbao').append("今日未上报");
  1326. $('#txt_shangbaotime').empty();
  1327. ribao_refrash();
  1328. $.toast("删除后请重新添加上报");
  1329. },
  1330. });
  1331. }
  1332. function updateSuspected(suspectedId) {
  1333. $("#suspectedId").val("");
  1334. if ($('#ribao')[0].style.display == 'none') {
  1335. $('#notOpenRibao').toggle();
  1336. $('#ribao')[0].style.display = '';
  1337. } else {
  1338. $('#notOpenRibao')[0].style.display = '';
  1339. $('#ribao')[0].style.display = 'none';
  1340. }
  1341. $.ajax({
  1342. url: '/home/selectSuspected',
  1343. get: "get",
  1344. data: {
  1345. "suspectedId": suspectedId
  1346. },
  1347. success: function (data) {
  1348. // console.log(data);
  1349. if (data) {
  1350. // 获取定位
  1351. getLocation();
  1352. var suspected = data;
  1353. $("#suspectedId").val(suspected.suspectedId);
  1354. $("#js_input_user_sex").val(getGreder(suspected.grender));
  1355. $("#js_input_user_sex").attr("data-values", suspected.grender);
  1356. $("#js_input_user_name").val(suspected.userName);
  1357. $("#js_input_user_age").val(suspected.age);
  1358. //基本情况
  1359. if (suspected.familyStatus != "") {
  1360. var familyStatusList = suspected.familyStatus.split(",");
  1361. if (familyStatusList[0] == 1)
  1362. $("input[name='checkbox1']").prop("checked", "checked");
  1363. else
  1364. $("input[name='checkbox1']").removeAttr("checked");
  1365. if (familyStatusList[1] == 1)
  1366. $("input[name='checkbox2']").prop("checked", "checked");
  1367. else
  1368. $("input[name='checkbox2']").removeAttr("checked");
  1369. if (familyStatusList[2] == 1)
  1370. $("input[name='checkbox3']").prop("checked", "checked");
  1371. else
  1372. $("input[name='checkbox3']").removeAttr("checked");
  1373. if (familyStatusList[3] == 1)
  1374. $("input[name='checkbox4']").prop("checked", "checked");
  1375. else
  1376. $("input[name='checkbox4']").removeAttr("checked");
  1377. if (familyStatusList[4] == 1)
  1378. $("input[name='checkbox5']").prop("checked", "checked");
  1379. else
  1380. $("input[name='checkbox5']").removeAttr("checked");
  1381. if (familyStatusList[5] == 1)
  1382. $("input[name='checkbox6']").prop("checked", "checked");
  1383. else
  1384. $("input[name='checkbox6']").removeAttr("checked");
  1385. if (familyStatusList[6] == 1)
  1386. $("input[name='checkbox7']").prop("checked", "checked");
  1387. else
  1388. $("input[name='checkbox7']").removeAttr("checked");
  1389. }
  1390. // $("#js_input_user_status").val(getFamilyStatus(suspected.familyStatus));
  1391. // $("#js_input_user_status").attr("data-values", suspected.familyStatus);
  1392. // $("#jibenmiaoshu").val(suspected.statusDesp);
  1393. if (suspected.medical == 0)
  1394. $("input[id='s18']").prop("checked", "checked");
  1395. if (suspected.medical == 1)
  1396. $("input[id='s19']").prop("checked", "checked");
  1397. if (suspected.medical == 2)
  1398. $("input[id='s20']").prop("checked", "checked");
  1399. if (suspected.medical == 3)
  1400. $("input[id='s21']").prop("checked", "checked");
  1401. if (suspected.medical == 4)
  1402. $("input[id='s22']").prop("checked", "checked");
  1403. if (suspected.isContact == 0)
  1404. $("input[id='s28']").prop("checked", "checked");
  1405. if (suspected.isContact == 1)
  1406. $("input[id='s29']").prop("checked", "checked");
  1407. if (suspected.isSuspected == 0)
  1408. $("input[id='s38']").prop("checked", "checked");
  1409. if (suspected.isSuspected == 1)
  1410. $("input[id='s39']").prop("checked", "checked");
  1411. // $("#switchQuezhen").val(getMedical(suspected.medical));
  1412. // $("#switchQuezhen").attr("data-values", suspected.medical);
  1413. $("#switchDanjiangeli").val(getSingleRoom(suspected.singleRoom));
  1414. $("#switchDanjiangeli").attr("data-values", suspected.singleRoom);
  1415. $("#js_input_user_tiwen").val(suspected.temperature);
  1416. $("#js_input_user_kesou").val(getCough(suspected.cough));
  1417. $("#js_input_user_kesou").attr("data-values", suspected.cough);
  1418. $("#js_input_user_jirou").val(getMuscle(suspected.muscle));
  1419. $("#js_input_user_jirou").attr("data-values", suspected.muscle);
  1420. $("#js_input_user_huxi").val(getDyspnea(suspected.dyspnea));
  1421. $("#js_input_user_huxi").attr("data-values", suspected.dyspnea);
  1422. $("#js_input_user_fali").val(getFatigue(suspected.fatigue));
  1423. $("#js_input_user_fali").attr("data-values", suspected.fatigue);
  1424. $("#js_input_user_fuxie").val(getDiarrhea(suspected.diarrhea));
  1425. $("#js_input_user_fuxie").attr("data-values", suspected.diarrhea);
  1426. $("#shuruqita").val(suspected.others);
  1427. $("#js_input_score_rezult").val(getScoreRezult(suspected.scoreRezult, suspected.temperatureScore));
  1428. $("#js_input_score_rezult_value").val(suspected.scoreRezult);
  1429. $("#js_input_temperature_score").val(suspected.temperatureScore);
  1430. $("#js_input_score_histroy").val(suspected.scoreHistroy);
  1431. $("#js_input_score").val(suspected.score);
  1432. //工作驻地
  1433. $("#js_input_gzzd").val(getLocal(suspected.workLocal));
  1434. $("#js_input_gzzd").attr("data-values", suspected.workLocal);
  1435. if (suspected.workLocal != 4) {
  1436. $('#js_input_qtdd').attr("disabled", "disabled");
  1437. $("#js_input_qtdd").val("");
  1438. } else {
  1439. $('#js_input_qtdd').removeAttr("disabled")
  1440. }
  1441. $("#js_input_qtdd").val(suspected.workLocalOther);
  1442. //今晚驻地
  1443. $("#js_input_jrszd").val(getLocal(suspected.todayLocal));
  1444. $("#js_input_jrszd").attr("data-values", suspected.todayLocal);
  1445. if (suspected.todayLocal != 4) {
  1446. $('#js_input_jrszq').attr("disabled", "disabled");
  1447. $("#js_input_jrszq").val("");
  1448. }
  1449. else {
  1450. $('#js_input_jrszq').removeAttr("disabled")
  1451. }
  1452. $("#js_input_jrszq").val(suspected.todayLocalOther);
  1453. //是否出行
  1454. $("#js_input_sf").val(getIsTrip(suspected.isTrip));
  1455. $("#js_input_sf").attr("data-values", suspected.isTrip);
  1456. if (suspected.isTrip == 0)
  1457. $('#none')[0].style.display = 'none';
  1458. else
  1459. $('#none')[0].style.display = '';
  1460. //详细
  1461. $.ajax({
  1462. url: '/home/selectTripSuspected',
  1463. get: "get",
  1464. data: {
  1465. "suspectedId": suspectedId
  1466. },
  1467. success: function (data) {
  1468. if (data.data.length != 0) {
  1469. }
  1470. listcx.splice(0, listcx.length);
  1471. $('#tabtr').empty();
  1472. var person;
  1473. // var xxIds = [];
  1474. // var xxName = [
  1475. // "序号",
  1476. // "出发地",
  1477. // "目的地",
  1478. // "出行方式",
  1479. // "车次/航班/车牌",
  1480. // "操作"
  1481. // ];
  1482. // for (var i = 0; i < xxName.length; i++) {
  1483. // xxIds.push({
  1484. // name: xxName[i]
  1485. // });
  1486. // }
  1487. // $('#tabtr').empty();
  1488. // var html = "<tr style='background-color: #f8f8f8;'>";
  1489. // for (var i = 0; i < xxIds.length; i++) {
  1490. // html += "<th>" + xxIds[i].name + "</th>";
  1491. // }
  1492. // html += "</tr>"
  1493. data.data.forEach(function (v) {
  1494. {
  1495. person = new Object();
  1496. person.startLocal = v.startLocal;
  1497. person.startLocalOther = v.startLocalOther;
  1498. person.endLocal = v.endLocal;
  1499. person.endLocalOther = v.endLocalOther;
  1500. person.tripType = v.tripType;
  1501. person.startLocalStr = getLocalOther(v.startLocal, v.startLocalOther);
  1502. person.endlocalStr = getLocalOther(v.endLocal, v.endLocalOther);
  1503. person.tripTypeStr = getTripType(v.tripType);
  1504. person.tripTypeDesp = v.tripTypeDesp;
  1505. listcx.push(person);
  1506. // html += "<tr>";
  1507. // html += "<td style='text-align: center;'>" + v.sort + "</td>";
  1508. // html += "<td style='text-align: center;' >" + getLocalOther(v.startLocal, v.startLocalOther) + " </td>";
  1509. // html += "<td style='text-align: center;' >" + getLocalOther(v.endLocal, v.endLocalOther) + " </td>";
  1510. // html += "<td style='text-align: center;' >" + getTripType(v.tripType) + " </td>";
  1511. // html += "<td style='text-align: center;' >" + v.tripTypeDesp + " </td>";
  1512. // 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>";
  1513. // html += "</tr>";
  1514. // $("#tabtr").html(html);
  1515. }
  1516. });
  1517. tab();
  1518. },
  1519. });
  1520. }
  1521. },
  1522. });
  1523. }
  1524. function addReport() {
  1525. if (!canSahngbao) {
  1526. return;
  1527. }
  1528. var userId = $("#userId").val();
  1529. $.ajax({
  1530. url: '/home/addReport',
  1531. type: "post",
  1532. data: {
  1533. "userCreate": userId,
  1534. },
  1535. success: function (data) {
  1536. $.toast(data.msg)
  1537. var date = new Date();
  1538. var Y = date.getFullYear() + '-';
  1539. var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
  1540. var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + ' ';
  1541. var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + ':';
  1542. var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + ':';
  1543. var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds());
  1544. var time = Y + M + D + h + m + s;
  1545. if (data.msg == "操作成功") {
  1546. canSahngbao = false;
  1547. document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
  1548. document.getElementById("txt_shangbao").style['color'] = "#0bb20c";
  1549. document.getElementById("txt_shangbaotime").style['color'] = "#0bb20c";
  1550. $('#txt_shangbao').empty();
  1551. $('#txt_shangbao').append("今日已上报");
  1552. $('#txt_shangbaotime').empty();
  1553. $('#txt_shangbaotime').append("上报时间:" + time);
  1554. }
  1555. },
  1556. });
  1557. }
  1558. $("#my-input-ribao").calendar({
  1559. dateFormat: 'yyyy-mm-dd',
  1560. inputReadOnly: false,
  1561. onChange: function (p, values, displayValues) {
  1562. var reportDate = values.toString();
  1563. var userId = $("#userId").val();
  1564. $.ajax({
  1565. url: '/home/home/queryRibaoReportDate',
  1566. data: {
  1567. "userCreate": userId,
  1568. "reportDate": reportDate,
  1569. },
  1570. type: 'GET',
  1571. success: function (data) {
  1572. if (data.data == undefined || data.data == "") {
  1573. $('#ribao_famliy').empty();
  1574. }
  1575. else {
  1576. if (data.data.length > 0) {
  1577. $('#ribao_famliy').empty();
  1578. data.data.forEach(function (v) {
  1579. helpValue1(v);
  1580. });
  1581. } else {
  1582. }
  1583. }
  1584. },
  1585. error: function () {
  1586. }
  1587. });
  1588. }
  1589. });
  1590. function helpValue1(v) {
  1591. var userName = v.userName + ":";
  1592. var grender = getGreder(v.grender);
  1593. var age = v.age;
  1594. var familyStatus = "";
  1595. if (v.familyStatus != 0)
  1596. familyStatus = "基本状况:" + getFamilyStatus(v.familyStatus) + ";";
  1597. var medical = "";
  1598. if (v.medical != 0)
  1599. medical = "新冠肺炎:" + getMedical(v.medical) + ";";
  1600. var isContact = "";
  1601. if (v.isContact != 0)
  1602. isContact = "家庭成员中有新冠肺炎疫情或有过病例接触史人员:" + getIsContact(v.isContact) + ";";
  1603. var isSuspected = "";
  1604. if (v.isSuspected != 0)
  1605. isSuspected = "近期接触的家庭成员中有感冒、发热、咳嗽等症状:" + getIsContact(v.isContact) + ";";
  1606. var singleRoom = "";
  1607. var uptownId = $("#uptownId").val();
  1608. if (uptownId != xiaoquId && uptownId != ceshixiaoquId) {
  1609. if (v.singleRoom != 0)
  1610. singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
  1611. if (v.singleRoom == 0 && v.medical != 0)
  1612. singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
  1613. }
  1614. var temperature = "体温:" + v.temperature + ";";
  1615. var cough = "";
  1616. if (v.cough != 0)
  1617. cough = "咳嗽现象:" + getCough(v.cough) + ";";
  1618. var muscle = "";
  1619. if (v.muscle != 0)
  1620. muscle = "肌肉酸痛:" + getMuscle(v.muscle) + ";";
  1621. var dyspnea = "";
  1622. if (v.dyspnea != 0)
  1623. dyspnea = "呼吸困难:" + getDyspnea(v.dyspnea) + ";";
  1624. var fatigue = "";
  1625. if (v.fatigue != 0)
  1626. fatigue = "乏力现象:" + getFatigue(v.fatigue) + ";";
  1627. var diarrhea = "";
  1628. if (v.diarrhea != 0)
  1629. diarrhea = "腹泻现象:" + getDiarrhea(v.diarrhea) + ";";
  1630. var others = "";
  1631. if (v.others != "")
  1632. others = "其他描述:" + v.others + ";";
  1633. var scoreRezult = "";
  1634. if (v.scoreRezult != 0)
  1635. scoreRezult = "评估结果:" + getScoreRezult(v.scoreRezult, v.temperatureScore) + ";";
  1636. var workLocal = "";
  1637. var todayLocal = "";
  1638. var isTrip = "";
  1639. var tripDet = "";
  1640. var uptownId = $("#uptownId").val();
  1641. if (uptownId == xiaoquId || uptownId == ceshixiaoquId) {
  1642. if (v.workLocal != 0) {
  1643. if (v.workLocal < 4)
  1644. workLocal = "工作驻地:" + getLocal(v.workLocal) + ";";
  1645. else
  1646. workLocal = "工作驻地:其它地点_" + v.workLocalOther + ";";
  1647. }
  1648. if (v.todayLocal != 0) {
  1649. if (v.todayLocal < 4)
  1650. todayLocal = "今晚住地:" + getLocal(v.todayLocal) + ";";
  1651. else
  1652. todayLocal = "今晚住地:其它地点_" + v.todayLocalOther + ";";
  1653. }
  1654. if (v.isTrip != undefined)
  1655. isTrip = "是否跨市出行:" + getIsTrip(v.isTrip) + ";"
  1656. if (v.tripDet != undefined)
  1657. tripDet = "出行详细:" + v.tripDet + ";"
  1658. }
  1659. $('#ribao_famliy').append($('<div class="weui-media-box weui-media-box_text" style="height: auto">\n' +
  1660. ' <h4 class="weui-media-box__title">' + userName + '&nbsp;&nbsp;&nbsp;' + grender + '&nbsp;&nbsp;&nbsp;' + age + '</h4>\n' +
  1661. ' <div style="height: auto">' + familyStatus + medical + isContact + isSuspected + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + scoreRezult + workLocal + todayLocal + isTrip + tripDet + '</div>\n' +
  1662. ' </div>\n' +
  1663. ' '));
  1664. }
  1665. function getGreder(greder) {
  1666. if (greder == 1)
  1667. return "男";
  1668. else if (greder == 2)
  1669. return "女";
  1670. return "";
  1671. }
  1672. function getFamilyStatus(familyStatus) {
  1673. var familyStatusList = familyStatus.split(",");
  1674. var familyStatusString = "";
  1675. if (familyStatus == '0,0,0,0,0,0,0')
  1676. familyStatusString += "无病史,";
  1677. else {
  1678. if (familyStatusList[0] == 1)
  1679. familyStatusString += "心脑血管疾病(服用ARB),";
  1680. if (familyStatusList[1] == 1)
  1681. familyStatusString += "心脑血管疾病(未服ARB),";
  1682. if (familyStatusList[2] == 1)
  1683. familyStatusString += "呼吸系统病史,";
  1684. if (familyStatusList[3] == 1)
  1685. familyStatusString += "肿瘤病史,";
  1686. if (familyStatusList[4] == 1)
  1687. familyStatusString += "糖尿病史,";
  1688. if (familyStatusList[5] == 1)
  1689. familyStatusString += "服用过激素药物,";
  1690. if (familyStatusList[6] == 1)
  1691. familyStatusString += "妊娠期,";
  1692. }
  1693. return familyStatusString.substring(0, familyStatusString.length - 1);
  1694. }
  1695. function getCough(cough) {
  1696. if (cough == 0)
  1697. return "无咳嗽";
  1698. else if (cough == 1)
  1699. return "偶尔短暂咳嗽";
  1700. else if (cough == 2)
  1701. return "咳嗽轻度影响生活";
  1702. else if (cough == 3)
  1703. return "咳嗽严重影响生活";
  1704. return "";
  1705. }
  1706. function getMuscle(muscle) {
  1707. if (muscle == 0)
  1708. return "无";
  1709. else if (muscle == 1)
  1710. return "按压有";
  1711. else if (muscle == 2)
  1712. return "偶尔";
  1713. else if (muscle == 3)
  1714. return "持续有";
  1715. return "";
  1716. }
  1717. function getDyspnea(dyspnea) {
  1718. if (dyspnea == 0)
  1719. return "无";
  1720. else if (dyspnea == 1)
  1721. return "急走或上坡气短";
  1722. else if (dyspnea == 2)
  1723. return "气短而走路变慢";
  1724. else if (dyspnea == 3)
  1725. return "走路数分钟后气短";
  1726. else if (dyspnea == 4)
  1727. return "气短无法离开房间";
  1728. return "";
  1729. }
  1730. function getFatigue(fatigue) {
  1731. if (fatigue == 0)
  1732. return "无";
  1733. else if (fatigue == 1)
  1734. return "体力劳动后不能恢复";
  1735. else if (fatigue == 2)
  1736. return "轻体力活非常累";
  1737. else if (fatigue == 3)
  1738. return "不能正常生活";
  1739. return "";
  1740. }
  1741. function getMedical(medical) {
  1742. if (medical == 0)
  1743. return "无";
  1744. else if (medical == 1)
  1745. return "确诊";
  1746. else if (medical == 2)
  1747. return "疑似";
  1748. else if (medical == 3)
  1749. return "有接触史";
  1750. else if (medical == 4)
  1751. return "解除隔离";
  1752. return "";
  1753. }
  1754. function getIsContact(isContact) {
  1755. if (isContact == 0)
  1756. return "否";
  1757. else if (isContact == 1)
  1758. return "是";
  1759. return "";
  1760. }
  1761. function getSingleRoom(singleRoom) {
  1762. if (singleRoom == 0)
  1763. return "否";
  1764. else if (singleRoom == 1)
  1765. return "是";
  1766. return "";
  1767. }
  1768. function getIsTrip(isTrip) {
  1769. if (isTrip == 0)
  1770. return "否";
  1771. else if (isTrip == 1)
  1772. return "是";
  1773. return "";
  1774. }
  1775. function getLocal(local) {
  1776. if (local == 0)
  1777. return "";
  1778. else if (local == 1)
  1779. return "武汉市";
  1780. else if (local == 2)
  1781. return "宜昌市";
  1782. else if (local == 3)
  1783. return "当阳市";
  1784. else if (local == 4)
  1785. return "其它地点";
  1786. return "";
  1787. }
  1788. function getLocalOther(local, localOther) {
  1789. if (local == 0)
  1790. return "";
  1791. else if (local == 1)
  1792. return "武汉市";
  1793. else if (local == 2)
  1794. return "宜昌市";
  1795. else if (local == 3)
  1796. return "当阳市";
  1797. else if (local == 4)
  1798. return "其它地点_" + localOther;
  1799. return "";
  1800. }
  1801. function getTripType(tripType) {
  1802. if (tripType == 0)
  1803. return "";
  1804. else if (tripType == 1)
  1805. return "长途汽车";
  1806. else if (tripType == 2)
  1807. return "火车";
  1808. else if (tripType == 3)
  1809. return "飞机";
  1810. else if (tripType == 4)
  1811. return "自驾";
  1812. return "";
  1813. }
  1814. function getDiarrhea(diarrhea) {
  1815. if (diarrhea == 0)
  1816. return "无";
  1817. else if (diarrhea == 1)
  1818. return "轻度腹泻(少于3次)";
  1819. else if (diarrhea == 2)
  1820. return "中度腹泻(4-6次)";
  1821. else if (diarrhea == 3)
  1822. return "重度腹泻(超过6次)";
  1823. return "";
  1824. }
  1825. function clearShow() {
  1826. console.log("qingkong")
  1827. $("#suspectedId").val("");
  1828. $("#switchQuezhen").attr("data-values", "");
  1829. $("#switchQuezhen_zz").val("");
  1830. $("#switchQuezhen_zz").attr("data-values", "");
  1831. $("#switchDanjiangeli").val("");
  1832. $("#switchDanjiangeli").attr("data-values", "");
  1833. $("#js_input_user_tiwen").val("");
  1834. $("#js_input_user_kesou").val("");
  1835. $("#js_input_user_kesou").attr("data-values", "");
  1836. $("#js_input_user_jirou").val("");
  1837. $("#js_input_user_jirou").attr("data-values", "");
  1838. $("#js_input_user_huxi").val("");
  1839. $("#js_input_user_huxi").attr("data-values", "");
  1840. $("#js_input_user_fali").val("");
  1841. $("#js_input_user_fali").attr("data-values", "");
  1842. $("#js_input_user_fuxie").val("");
  1843. $("#js_input_user_fuxie").attr("data-values", "");
  1844. $("#shuruqita").val("");
  1845. $("#js_input_score_rezult").val("");
  1846. $("#js_input_score_rezult_value").val("");
  1847. $("#js_input_temperature_score").val("");
  1848. $("#js_input_score_histroy").val("");
  1849. $("#js_input_score").val("");
  1850. //出行
  1851. $("#js_input_gzzd").val("");
  1852. $("#js_input_gzzd").attr("data-values", "");
  1853. $("#js_input_qtdd").val("");
  1854. $("#js_input_jrszd").val("");
  1855. $("#js_input_jrszd").attr("data-values", "");
  1856. $("#js_input_jrszq").val("");
  1857. $("#js_input_sf").val(getIsTrip(0));
  1858. $("#js_input_sf").attr("data-values", 0);
  1859. $('#none')[0].style.display = 'none';
  1860. $("input[id='s18']").removeAttr("checked");
  1861. $("input[id='s19']").removeAttr("checked");
  1862. $("input[id='s20']").removeAttr("checked");
  1863. $("input[id='s21']").removeAttr("checked");
  1864. $("input[id='s22']").removeAttr("checked");
  1865. $("input[id='s28']").removeAttr("checked");
  1866. $("input[id='s29']").removeAttr("checked");
  1867. }
  1868. //健康评估
  1869. $('#ribao_score').on('click', function () {
  1870. var suspectedId = $("#suspectedId").val();
  1871. var userId = $("#userId").val();
  1872. var userName = $("#js_input_user_name").val();
  1873. var medical = $("input[name='radio']:checked").val() == undefined ? 0 : $("input[name='radio']:checked").val();
  1874. var medicalzz = $("#switchQuezhen_zz").attr("data-values") == undefined ? 0 : $("#switchQuezhen_zz").attr("data-values");
  1875. var temperature = $("#js_input_user_tiwen").val() == "" ? 0 : $("#js_input_user_tiwen").val();
  1876. var cough = $("#js_input_user_kesou").attr("data-values") == undefined ? 0 : $("#js_input_user_kesou").attr("data-values");
  1877. var muscle = $("#js_input_user_jirou").attr("data-values") == undefined ? 0 : $("#js_input_user_jirou").attr("data-values");
  1878. var dyspnea = $("#js_input_user_huxi").attr("data-values") == undefined ? 0 : $("#js_input_user_huxi").attr("data-values");
  1879. var fatigue = $("#js_input_user_fali").attr("data-values") == undefined ? 0 : $("#js_input_user_fali").attr("data-values");
  1880. var diarrhea = $("#js_input_user_fuxie").attr("data-values") == undefined ? 0 : $("#js_input_user_fuxie").attr("data-values");
  1881. if (userName == undefined || userName == '') {
  1882. $.alert("请填写姓名");
  1883. return;
  1884. }
  1885. if (temperature <= 0) {
  1886. $.alert("请填写体温");
  1887. return;
  1888. }
  1889. if (temperature > 50 || temperature < 30) {
  1890. $.alert("请填写正确的体温");
  1891. return;
  1892. }
  1893. $.ajax({
  1894. url: '/home/addScore',
  1895. type: "post",
  1896. data: {
  1897. "userName": userName,
  1898. "suspectedId": suspectedId,
  1899. "userCreate": userId,
  1900. "medical": medical,
  1901. "temperature": temperature,
  1902. "cough": cough,
  1903. "muscle": muscle,
  1904. "dyspnea": dyspnea,
  1905. "fatigue": fatigue,
  1906. "diarrhea": diarrhea,
  1907. },
  1908. success: function (data) {
  1909. if (data == undefined) {
  1910. $('#js_input_score_rezult').empty();
  1911. $('#js_input_score_rezult_value').empty();
  1912. $('#js_input_temperature_score').empty();
  1913. $('#js_input_score_histroy').empty();
  1914. $('#js_input_score').empty();
  1915. }
  1916. else {
  1917. $('#js_input_score_rezult').empty();
  1918. $('#js_input_temperature_score').empty();
  1919. $('#js_input_score_histroy').empty();
  1920. $('#js_input_score').empty();
  1921. var ScoreRezult = getScoreRezult(data.scoreRezult, data.temperatureScore);
  1922. $("#js_input_score_rezult").val(ScoreRezult);
  1923. $("#js_input_score_rezult_value").val(data.scoreRezult);
  1924. $("#js_input_temperature_score").val(data.temperatureScore);
  1925. $("#js_input_score_histroy").val(data.scoreHistory);
  1926. $("#js_input_score").val(data.score);
  1927. }
  1928. },
  1929. });
  1930. });
  1931. function getScoreRezult(scoreRezult, temperatureScore) {
  1932. if (scoreRezult == 0)
  1933. return "未评估";
  1934. else if (scoreRezult == 1) {
  1935. if (temperatureScore > 1)
  1936. return "正常,间隔时间服用退烧药,多休息,多喝水";
  1937. else
  1938. return "正常";
  1939. }
  1940. else if (scoreRezult == 2) {
  1941. if (temperatureScore > 1)
  1942. return "注意观察,间隔时间服用退烧药,多休息,多喝水";
  1943. else
  1944. return "注意观察";
  1945. }
  1946. else if (scoreRezult == 3)
  1947. return "联系社区医生(或者在线问诊)";
  1948. else if (scoreRezult == 4)
  1949. return "尽快就诊";
  1950. return "";
  1951. }