ribao.js 66 KB

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