ribao.js 65 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122
  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. $("#js_input_user_status").select({
  172. title: "选择基本状况",
  173. items: [
  174. {
  175. title: "无病史",
  176. value: "0",
  177. }, {
  178. title: "心脑血管疾病(服用ARB)",
  179. value: "1",
  180. },
  181. {
  182. title: "心脑血管疾病(未服ARB)",
  183. value: "2",
  184. },
  185. {
  186. title: "呼吸系统病史",
  187. value: "3",
  188. },
  189. {
  190. title: "肿瘤病史",
  191. value: "4",
  192. },
  193. {
  194. title: "糖尿病史",
  195. value: "5",
  196. },
  197. {
  198. title: "服用过激素药物",
  199. value: "6",
  200. },
  201. {
  202. title: "妊娠期",
  203. value: "7",
  204. }]
  205. });
  206. $("#js_input_user_kesou").select({
  207. title: "选择咳嗽情况",
  208. items: [
  209. {
  210. title: "无咳嗽",
  211. value: "0",
  212. },
  213. {
  214. title: "偶有短暂咳嗽",
  215. value: "1",
  216. },
  217. {
  218. title: "咳嗽轻度影响生活",
  219. value: "2",
  220. },
  221. {
  222. title: "咳嗽严重影响生活",
  223. value: "3",
  224. }]
  225. });
  226. $("#js_input_user_jirou").select({
  227. title: "选择肌肉情况",
  228. items: [
  229. {
  230. title: "无",
  231. value: "0",
  232. },
  233. {
  234. title: "按压有",
  235. value: "1",
  236. },
  237. {
  238. title: "偶尔",
  239. value: "2",
  240. },
  241. {
  242. title: "持续有",
  243. value: "3",
  244. }]
  245. });
  246. $("#js_input_user_huxi").select({
  247. title: "选择呼吸情况",
  248. items: [
  249. {
  250. title: "无",
  251. value: "0",
  252. },
  253. {
  254. title: "急走或上坡气短",
  255. value: "1",
  256. },
  257. {
  258. title: "气短而走路变慢",
  259. value: "2",
  260. },
  261. {
  262. title: "走路数分钟后气短",
  263. value: "3",
  264. },
  265. {
  266. title: "气短无法离开房间",
  267. value: "4",
  268. }]
  269. });
  270. $("#js_input_user_fali").select({
  271. title: "选择乏力情况",
  272. items: [
  273. {
  274. title: "无",
  275. value: "0",
  276. },
  277. {
  278. title: "体力劳动后不能恢复",
  279. value: "1",
  280. },
  281. {
  282. title: "轻体力活非常累",
  283. value: "2",
  284. },
  285. {
  286. title: "不能正常生活",
  287. value: "3",
  288. }]
  289. });
  290. $("#js_input_user_fuxie").select({
  291. title: "选择腹泻情况",
  292. items: [
  293. {
  294. title: "无",
  295. value: "0",
  296. },
  297. {
  298. title: "轻度腹泻(少于3次)",
  299. value: "1",
  300. },
  301. {
  302. title: "中度腹泻(4-6次)",
  303. value: "2",
  304. },
  305. {
  306. title: "重度腹泻(超过6次)",
  307. value: "3",
  308. }]
  309. });
  310. // $("#switchQuezhen").select({
  311. // title: "选择是否确诊",
  312. // items: [
  313. // {
  314. // title: "否",
  315. // value: "0",
  316. // },
  317. // {
  318. // title: "是",
  319. // value: "1",
  320. // }]
  321. // });
  322. $("#switchQuezhen").select({
  323. title: "选择症状",
  324. items: [
  325. {
  326. title: "无",
  327. value: "0",
  328. },
  329. {
  330. title: "新冠确诊",
  331. value: "1",
  332. },
  333. {
  334. title: "新冠疑似",
  335. value: "2",
  336. },
  337. {
  338. title: "密切接触者",
  339. value: "3",
  340. },
  341. {
  342. title: "解除观察",
  343. value: "4",
  344. }]
  345. });
  346. $("#switchDanjiangeli").select({
  347. title: "选择是否单间隔离",
  348. items: [
  349. {
  350. title: "否",
  351. value: "0",
  352. },
  353. {
  354. title: "是",
  355. value: "1",
  356. }]
  357. });
  358. //
  359. // updateSuspected({
  360. // userName : 'www',
  361. // grender : 2,
  362. // age : 34,
  363. // familyStatus : 1,
  364. // statusDesp : "",
  365. // medical:0,
  366. // singleRoom:1,
  367. // temperature:0,
  368. // cough:2,
  369. // muscle:1,
  370. // dyspnea:1,
  371. // fatigue:1,
  372. // diarrhea:2,
  373. // others:""
  374. // })
  375. //
  376. // var grender = $("#js_input_user_sex").attr("data-values") == undefined ? 0 : $("#js_input_user_sex").attr("data-values");
  377. // console.log("grender:" + grender)
  378. }
  379. function selectinput1(obj) {
  380. var grender = $("#js_input_gzzd").attr("data-values") == undefined ? 0 : $("#js_input_gzzd").attr("data-values");
  381. if (grender != 4) {//js_input_qtdd
  382. // $('#js_input_qtdd')[0].disabled == 'disabled'+
  383. +
  384. $("#js_input_qtdd").val("");
  385. } else {
  386. $('#js_input_qtdd').removeAttr("disabled")
  387. }
  388. }
  389. function selectinput2(obj) {
  390. var grender = $("#js_input_jrszd").attr("data-values") == undefined ? 0 : $("#js_input_jrszd").attr("data-values");
  391. if (grender != 4) {//js_input_qtdd
  392. // $('#js_input_qtdd')[0].disabled == 'disabled' js_input_jrszq
  393. $('#js_input_jrszq').attr("disabled", "disabled");
  394. $("#js_input_jrszq").val("");
  395. } else {
  396. $('#js_input_jrszq').removeAttr("disabled")
  397. }
  398. }
  399. function selectinput3(obj) {
  400. var grender = $("#js_input_cfd").attr("data-values") == undefined ? 0 : $("#js_input_cfd").attr("data-values");
  401. if (grender != 4) {
  402. $('#js_input_cfdq').attr("disabled", "disabled");
  403. $("#js_input_cfdq").val("");
  404. } else {
  405. $('#js_input_cfdq').removeAttr("disabled")
  406. }
  407. }
  408. function selectinput4(obj) {
  409. var grender = $("#js_input_mdd").attr("data-values") == undefined ? 0 : $("#js_input_mdd").attr("data-values");
  410. if (grender != 4) {
  411. $('#js_input_mddq').attr("disabled", "disabled");
  412. $("#js_input_mddq").val("");
  413. } else {
  414. $('#js_input_mddq').removeAttr("disabled")
  415. }
  416. }
  417. function selectinput5(obj) {
  418. var grender = $("#js_input_cxfs").attr("data-values") == undefined ? 0 : $("#js_input_cxfs").attr("data-values");
  419. if (grender == 4) {
  420. // $('#js_input_cxfsq').attr("disabled","disabled")
  421. } else {
  422. $('#js_input_cxfsq').removeAttr("disabled")
  423. }
  424. }
  425. var listcx = [];
  426. function selectinput6(obj) {
  427. var grender = $("#js_input_sf").attr("data-values") == undefined ? 3 : $("#js_input_sf").attr("data-values");
  428. if (grender == 0) {
  429. $('#none')[0].style.display = 'none';
  430. $("#js_input_cfd").val("");
  431. $("#js_input_cfd").attr("data-values", "");
  432. $("#js_input_mdd").val("");
  433. $("#js_input_mdd").attr("data-values", "");
  434. $("#js_input_cxfs").val("");
  435. $("#js_input_cxfs").attr("data-values", "");
  436. $('#js_input_cxfsq').val("");
  437. $('#js_input_cfdq').val("");
  438. $('#js_input_mddq').val("");
  439. listcx.splice(0, listcx.length);
  440. $('#tabtr').empty();
  441. } else if (grender == 1) {
  442. $('#none')[0].style.display = '';
  443. }
  444. }
  445. //添加出行详情
  446. function insertlingyun() {
  447. var sf = $("#js_input_sf").attr("data-values") == undefined ? 3 : $("#js_input_sf").attr("data-values");
  448. if (sf == 0 || sf == 3) {
  449. cantijiao = true;
  450. $.alert("请选择是否出行");
  451. return;
  452. }
  453. var person = new Object();
  454. var cxfs = $("#js_input_cxfs").attr("data-values") == undefined ? 0 : $("#js_input_cxfs").attr("data-values");
  455. var jrszd = $("#js_input_jrszd").attr("data-values") == undefined ? 0 : $("#js_input_jrszd").attr("data-values");
  456. var cfd = $("#js_input_cfd").attr("data-values") == undefined ? 0 : $("#js_input_cfd").attr("data-values");
  457. var mdd = $("#js_input_mdd").attr("data-values") == undefined ? 0 : $("#js_input_mdd").attr("data-values");
  458. var jrszq = $('#js_input_jrszq').val();
  459. var mddq = $('#js_input_mddq').val();
  460. var cfdq = $('#js_input_cfdq').val();
  461. // if (mdd != jrszd) {
  462. // cantijiao = true;
  463. // $.alert("目的地与今晚住地不一致");
  464. // return;
  465. // }
  466. // if (jrszq != mddq) {
  467. // cantijiao = true;
  468. // $.alert("目的地与今晚住地不一致");
  469. // return;
  470. // }
  471. if (cfd == 4 && mdd == 4) {
  472. if (mddq == cfdq) {
  473. cantijiao = true;
  474. $.alert("出发地与目的地不能一致");
  475. return;
  476. }
  477. } else if (cfd != 4 || mdd != 4) {
  478. if (cfd == mdd) {
  479. cantijiao = true;
  480. $.alert("出发地与目的地不能一致");
  481. return;
  482. }
  483. }
  484. var cxfsq = $('#js_input_cxfsq').val();
  485. for (var i = 0; i < listcx.length; i++) {
  486. 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) {
  487. cantijiao = true;
  488. $.alert("此行程已添加");
  489. return;
  490. }
  491. }
  492. if (cxfs != 4 && cxfs != 0) {
  493. var val = $('#js_input_cxfsq').val();
  494. if (val == "") {
  495. cantijiao = true;
  496. $.alert("请填写车次/航班/车牌");
  497. return;
  498. }
  499. person.tripTypeDesp = $('#js_input_cxfsq').val();
  500. if (cxfs == 1) {
  501. person.tripType = 1;
  502. person.tripTypeStr = "长途汽车"
  503. } else if (cxfs == 2) {
  504. person.tripType = 2;
  505. person.tripTypeStr = "火车";
  506. } else if (cxfs == 3) {
  507. person.tripType = 3;
  508. person.tripTypeStr = "飞机";
  509. }
  510. } else if (cxfs == 0) {
  511. cantijiao = true;
  512. $.alert("请选择出行方式");
  513. return;
  514. } else if (cxfs == 4) {
  515. var val6 = $('#js_input_cxfsq').val();
  516. if (val6 == "") {
  517. cantijiao = true;
  518. $.alert("请填写车次/航班/车牌");
  519. return;
  520. }
  521. person.tripTypeStr = "自驾";
  522. person.tripType = 4;
  523. person.tripTypeDesp = $('#js_input_cxfsq').val();
  524. }
  525. if (cfd == 4 && cfd != 0) {
  526. var val2 = $('#js_input_cfdq').val();
  527. if (val2 == "") {
  528. cantijiao = true;
  529. $.alert("请填写出发地");
  530. return;
  531. }
  532. person.startLocal = 4;
  533. person.startLocalOther = $('#js_input_cfdq').val();
  534. person.startLocalStr = "其它地点_" + $('#js_input_cfdq').val();
  535. } else if (cfd != 4 && cfd != 0) {
  536. if (cfd == 1) {
  537. person.startLocal = 1;
  538. person.startLocalStr = "武汉市";
  539. person.startLocalOther = $('#js_input_cfdq').val() == undefined ? "" : $('#js_input_cfdq').val();
  540. } else if (cfd == 2) {
  541. person.startLocal = 2;
  542. person.startLocalStr = "宜昌市";
  543. person.startLocalOther = $('#js_input_cfdq').val() == undefined ? "" : $('#js_input_cfdq').val();
  544. } else if (cfd == 3) {
  545. person.startLocal = 3;
  546. person.startLocalStr = "当阳市";
  547. person.startLocalOther = $('#js_input_cfdq').val() == undefined ? "" : $('#js_input_cfdq').val();
  548. }
  549. } else if (cfd == 0) {
  550. cantijiao = true;
  551. $.alert("请选择出发地");
  552. return;
  553. }
  554. if (mdd == 4 && mdd != 0) {
  555. var val3 = $('#js_input_mddq').val();
  556. if (val3 == "") {
  557. cantijiao = true;
  558. $.alert("请填写目的地");
  559. return;
  560. }
  561. person.endLocal = 4;
  562. person.endLocalOther = $('#js_input_mddq').val();
  563. person.endlocalStr = "其它地点_" + $('#js_input_mddq').val();
  564. } else if (mdd != 4 && mdd != 0) {
  565. if (mdd == 1) {
  566. person.endLocal = 1;
  567. person.endlocalStr = "武汉市";
  568. person.endLocalOther = $('#js_input_mddq').val() == undefined ? "" : $('#js_input_mddq').val();
  569. } else if (mdd == 2) {
  570. person.endLocal = 2;
  571. person.endlocalStr = "宜昌市";
  572. person.endLocalOther = $('#js_input_mddq').val() == undefined ? "" : $('#js_input_mddq').val();
  573. } else if (mdd == 3) {
  574. person.endLocal = 3;
  575. person.endlocalStr = "当阳市";
  576. person.endLocalOther = $('#js_input_mddq').val() == undefined ? "" : $('#js_input_mddq').val();
  577. }
  578. } else if (mdd == 0) {
  579. cantijiao = true;
  580. $.alert("请选择目的地");
  581. return;
  582. }
  583. listcx.push(person);
  584. // $.alert("添加成功");
  585. tab()
  586. }
  587. function tab() {
  588. var xxIds = [];
  589. var xxName = [
  590. "序号",
  591. "出发地",
  592. "目的地",
  593. "出行方式",
  594. "车次/航班/车牌",
  595. "操作"
  596. ];
  597. for (var i = 0; i < xxName.length; i++) {
  598. xxIds.push({
  599. name: xxName[i]
  600. });
  601. }
  602. $('#tabtr').empty();
  603. var html = "<tr style='background-color: #f8f8f8;'>";
  604. for (var i = 0; i < xxIds.length; i++) {
  605. // alert(xxIds[i].name);
  606. html += "<th>" + xxIds[i].name + "</th>";
  607. }
  608. html += "</tr>"
  609. for (var i = 0; i < listcx.length; i++) {//后端传过来的集合遍历
  610. if (i % 2 != 0) {
  611. html += "<tr style='background-color: #f8f8f8;'>";
  612. }
  613. else {
  614. html += "<tr>";
  615. }
  616. html += "<td style='text-align: center;'>" + (i + 1) + "</td>";
  617. // var isValue = false; //记录是否赋值
  618. html += "<td style='text-align: center;' >" + listcx[i].startLocalStr + " </td>";
  619. html += "<td style='text-align: center;' >" + listcx[i].endlocalStr + " </td>";
  620. html += "<td style='text-align: center;' >" + listcx[i].tripTypeStr + " </td>";
  621. html += "<td style='text-align: center;' >" + listcx[i].tripTypeDesp + " </td>";
  622. 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>";
  623. html += "</tr>";
  624. $("#tabtr").html(html);
  625. }
  626. }
  627. function splice(obj) {
  628. listcx.splice(obj, 1);
  629. tab()
  630. }
  631. //首次近日报告
  632. function ribaoInitialization(reportId) {
  633. if (reportId == null)
  634. reportId = 0;
  635. var userId = $("#userId").val();
  636. $.ajax({
  637. url: '/home/home/queryRibaoRefresh',
  638. data: {
  639. reportId: reportId,
  640. userCreate: userId
  641. },
  642. type: 'GET',
  643. success: function (data) {
  644. if (data.data == undefined || data.data == "") {
  645. $('#rb_family').empty();
  646. document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
  647. canSahngbao = false;
  648. }
  649. else {
  650. if (data.data.length > 0) {
  651. hasData = true;
  652. data.data.forEach(function (v) {
  653. ribao_cell(v);
  654. });
  655. }
  656. }
  657. },
  658. error: function () {
  659. }
  660. });
  661. }
  662. //刷新今日日报
  663. function ribao_refrash() {
  664. var userId = $("#userId").val();
  665. $.ajax({
  666. url: '/home/home/queryRibao',
  667. data: {
  668. userCreate: userId
  669. },
  670. type: 'GET',
  671. success: function (data) {
  672. if (data.data == undefined || data.data == "") {
  673. $('#rb_family').empty();
  674. document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
  675. }
  676. else {
  677. $('#rb_family').empty();
  678. if (data.data.length > 0) {
  679. hasData = true;
  680. data.data.forEach(function (v) {
  681. ribao_cell(v);
  682. });
  683. } else {
  684. }
  685. }
  686. },
  687. error: function () {
  688. }
  689. });
  690. }
  691. function ribao_cell(v) {
  692. var userName = v.userName + ":";
  693. var grender = getGreder(v.grender);
  694. var age = v.age;
  695. var familyStatus = "";
  696. if (v.familyStatus != 0)
  697. familyStatus = "基本状况:" + getFamilyStatus(v.familyStatus) + ";";
  698. var medical = "";
  699. if (v.medical != 0)
  700. medical = "新冠肺炎:" + getMedical(v.medical) + ";";
  701. var isContact = "";
  702. if (v.isContact != 0)
  703. isContact = "家庭成员中有新冠肺炎疫情或有过病例接触史人员:" + getIsContact(v.isContact) + ";";
  704. var isSuspected = "";
  705. if (v.isSuspected != 0)
  706. isSuspected = "近期接触的家庭成员中有感冒、发热、咳嗽等症状:" + getIsContact(v.isContact) + ";";
  707. var singleRoom = "";
  708. var uptownId = $("#uptownId").val();
  709. if (uptownId != xiaoquId && uptownId != ceshixiaoquId) {
  710. if (v.singleRoom != 0)
  711. singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
  712. if (v.singleRoom == 0 && v.medical != 0)
  713. singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
  714. }
  715. var temperature = "体温:" + v.temperature + ";";
  716. var cough = "";
  717. if (v.cough != 0)
  718. cough = "咳嗽现象:" + getCough(v.cough) + ";";
  719. var muscle = "";
  720. if (v.muscle != 0)
  721. muscle = "肌肉酸痛:" + getMuscle(v.muscle) + ";";
  722. var dyspnea = "";
  723. if (v.dyspnea != 0)
  724. dyspnea = "呼吸困难:" + getDyspnea(v.dyspnea) + ";";
  725. var fatigue = "";
  726. if (v.fatigue != 0)
  727. fatigue = "乏力现象:" + getFatigue(v.fatigue) + ";";
  728. var diarrhea = "";
  729. if (v.diarrhea != 0)
  730. diarrhea = "腹泻现象:" + getDiarrhea(v.diarrhea) + ";";
  731. var others = "";
  732. if (v.others != "")
  733. others = "其他描述:" + v.others + ";";
  734. var scoreRezult = "";
  735. if (v.scoreRezult != 0)
  736. scoreRezult = "评估结果:" + getScoreRezult(v.scoreRezult, v.temperatureScore) + ";";
  737. var workLocal = "";
  738. var todayLocal = "";
  739. var isTrip = "";
  740. var tripDet = "";
  741. if (uptownId == xiaoquId || uptownId == ceshixiaoquId) {
  742. if (v.workLocal != 0) {
  743. if (v.workLocal < 4)
  744. workLocal = "工作驻地:" + getLocal(v.workLocal) + ";";
  745. else
  746. workLocal = "工作驻地:其它地点_" + v.workLocalOther + ";";
  747. }
  748. if (v.todayLocal != 0) {
  749. if (v.todayLocal < 4)
  750. todayLocal = "今晚住地:" + getLocal(v.todayLocal) + ";";
  751. else
  752. todayLocal = "今晚住地:其它地点_" + v.todayLocalOther + ";";
  753. }
  754. if (v.isTrip != undefined)
  755. isTrip = "是否跨市出行:" + getIsTrip(v.isTrip) + ";"
  756. if (v.tripDet != undefined)
  757. tripDet = "出行详细:" + v.tripDet + ";"
  758. }
  759. $('#rb_family').append($('<div class="weui-media-box weui-media-box_text" style="height: auto">\n' +
  760. ' <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' +
  761. ' &nbsp;&nbsp;<a style="color: #2a62bc" onclick=\'updateSuspected(' + JSON.stringify(v.suspectedId) + ')\'>修改上报</a></h4>\n' +
  762. ' <div style="height: auto">' + familyStatus + medical + isContact + isSuspected + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + scoreRezult + workLocal + todayLocal + isTrip + tripDet + '</>\n' +
  763. ' </div>\n' +
  764. ' '));
  765. }
  766. function ribao_add() {
  767. $('#btnAdd').on('click', function () {
  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. $.confirm({
  1312. title: '是否确定删除上报信息?',
  1313. onOK: function () {
  1314. $.ajax({
  1315. url: '/home/deleteSuspected',
  1316. type: "post",
  1317. data: {
  1318. "suspectedId": suspectedId
  1319. },
  1320. success: function (data) {
  1321. $('#ribao_jinrijujian').empty();
  1322. $('#ribao_jinrijujian').append(data.safetyNum);
  1323. //今日未上报
  1324. canSahngbao = true;
  1325. document.getElementById("btn_shangbao").style['background-color'] = "#0bb20c";
  1326. document.getElementById("txt_shangbao").style['color'] = "red";
  1327. $('#txt_shangbao').empty();
  1328. $('#txt_shangbao').append("今日未上报");
  1329. $('#txt_shangbaotime').empty();
  1330. ribao_refrash();
  1331. $.toast("删除后请重新添加上报");
  1332. },
  1333. });
  1334. },
  1335. onCancel: function () {
  1336. }
  1337. });
  1338. }
  1339. function updateSuspected(suspectedId) {
  1340. $("#suspectedId").val("");
  1341. if ($('#ribao')[0].style.display == 'none') {
  1342. $('#notOpenRibao').toggle();
  1343. $('#ribao')[0].style.display = '';
  1344. } else {
  1345. $('#notOpenRibao')[0].style.display = '';
  1346. $('#ribao')[0].style.display = 'none';
  1347. }
  1348. $.ajax({
  1349. url: '/home/selectSuspected',
  1350. get: "get",
  1351. data: {
  1352. "suspectedId": suspectedId
  1353. },
  1354. success: function (data) {
  1355. // console.log(data);
  1356. if (data) {
  1357. // 获取定位
  1358. getLocation();
  1359. var suspected = data;
  1360. $("#suspectedId").val(suspected.suspectedId);
  1361. $("#js_input_user_sex").val(getGreder(suspected.grender));
  1362. $("#js_input_user_sex").attr("data-values", suspected.grender);
  1363. $("#js_input_user_name").val(suspected.userName);
  1364. $("#js_input_user_age").val(suspected.age);
  1365. //基本情况
  1366. if (suspected.familyStatus != "") {
  1367. var familyStatusList = suspected.familyStatus.split(",");
  1368. if (familyStatusList[0] == 1)
  1369. $("input[name='checkbox1']").prop("checked", "checked");
  1370. else
  1371. $("input[name='checkbox1']").removeAttr("checked");
  1372. if (familyStatusList[1] == 1)
  1373. $("input[name='checkbox2']").prop("checked", "checked");
  1374. else
  1375. $("input[name='checkbox2']").removeAttr("checked");
  1376. if (familyStatusList[2] == 1)
  1377. $("input[name='checkbox3']").prop("checked", "checked");
  1378. else
  1379. $("input[name='checkbox3']").removeAttr("checked");
  1380. if (familyStatusList[3] == 1)
  1381. $("input[name='checkbox4']").prop("checked", "checked");
  1382. else
  1383. $("input[name='checkbox4']").removeAttr("checked");
  1384. if (familyStatusList[4] == 1)
  1385. $("input[name='checkbox5']").prop("checked", "checked");
  1386. else
  1387. $("input[name='checkbox5']").removeAttr("checked");
  1388. if (familyStatusList[5] == 1)
  1389. $("input[name='checkbox6']").prop("checked", "checked");
  1390. else
  1391. $("input[name='checkbox6']").removeAttr("checked");
  1392. if (familyStatusList[6] == 1)
  1393. $("input[name='checkbox7']").prop("checked", "checked");
  1394. else
  1395. $("input[name='checkbox7']").removeAttr("checked");
  1396. }
  1397. // $("#js_input_user_status").val(getFamilyStatus(suspected.familyStatus));
  1398. // $("#js_input_user_status").attr("data-values", suspected.familyStatus);
  1399. // $("#jibenmiaoshu").val(suspected.statusDesp);
  1400. if (suspected.medical == 0)
  1401. $("input[id='s18']").prop("checked", "checked");
  1402. if (suspected.medical == 1)
  1403. $("input[id='s19']").prop("checked", "checked");
  1404. if (suspected.medical == 2)
  1405. $("input[id='s20']").prop("checked", "checked");
  1406. if (suspected.medical == 3)
  1407. $("input[id='s21']").prop("checked", "checked");
  1408. if (suspected.medical == 4)
  1409. $("input[id='s22']").prop("checked", "checked");
  1410. if (suspected.isContact == 0)
  1411. $("input[id='s28']").prop("checked", "checked");
  1412. if (suspected.isContact == 1)
  1413. $("input[id='s29']").prop("checked", "checked");
  1414. if (suspected.isSuspected == 0)
  1415. $("input[id='s38']").prop("checked", "checked");
  1416. if (suspected.isSuspected == 1)
  1417. $("input[id='s39']").prop("checked", "checked");
  1418. // $("#switchQuezhen").val(getMedical(suspected.medical));
  1419. // $("#switchQuezhen").attr("data-values", suspected.medical);
  1420. $("#switchDanjiangeli").val(getSingleRoom(suspected.singleRoom));
  1421. $("#switchDanjiangeli").attr("data-values", suspected.singleRoom);
  1422. $("#js_input_user_tiwen").val(suspected.temperature);
  1423. $("#js_input_user_kesou").val(getCough(suspected.cough));
  1424. $("#js_input_user_kesou").attr("data-values", suspected.cough);
  1425. $("#js_input_user_jirou").val(getMuscle(suspected.muscle));
  1426. $("#js_input_user_jirou").attr("data-values", suspected.muscle);
  1427. $("#js_input_user_huxi").val(getDyspnea(suspected.dyspnea));
  1428. $("#js_input_user_huxi").attr("data-values", suspected.dyspnea);
  1429. $("#js_input_user_fali").val(getFatigue(suspected.fatigue));
  1430. $("#js_input_user_fali").attr("data-values", suspected.fatigue);
  1431. $("#js_input_user_fuxie").val(getDiarrhea(suspected.diarrhea));
  1432. $("#js_input_user_fuxie").attr("data-values", suspected.diarrhea);
  1433. $("#shuruqita").val(suspected.others);
  1434. $("#js_input_score_rezult").val(getScoreRezult(suspected.scoreRezult, suspected.temperatureScore));
  1435. $("#js_input_score_rezult_value").val(suspected.scoreRezult);
  1436. $("#js_input_temperature_score").val(suspected.temperatureScore);
  1437. $("#js_input_score_histroy").val(suspected.scoreHistroy);
  1438. $("#js_input_score").val(suspected.score);
  1439. //工作驻地
  1440. $("#js_input_gzzd").val(getLocal(suspected.workLocal));
  1441. $("#js_input_gzzd").attr("data-values", suspected.workLocal);
  1442. if (suspected.workLocal != 4) {
  1443. $('#js_input_qtdd').attr("disabled", "disabled");
  1444. $("#js_input_qtdd").val("");
  1445. } else {
  1446. $('#js_input_qtdd').removeAttr("disabled")
  1447. }
  1448. $("#js_input_qtdd").val(suspected.workLocalOther);
  1449. //今晚驻地
  1450. $("#js_input_jrszd").val(getLocal(suspected.todayLocal));
  1451. $("#js_input_jrszd").attr("data-values", suspected.todayLocal);
  1452. if (suspected.todayLocal != 4) {
  1453. $('#js_input_jrszq').attr("disabled", "disabled");
  1454. $("#js_input_jrszq").val("");
  1455. }
  1456. else {
  1457. $('#js_input_jrszq').removeAttr("disabled")
  1458. }
  1459. $("#js_input_jrszq").val(suspected.todayLocalOther);
  1460. //是否出行
  1461. $("#js_input_sf").val(getIsTrip(suspected.isTrip));
  1462. $("#js_input_sf").attr("data-values", suspected.isTrip);
  1463. if (suspected.isTrip == 0)
  1464. $('#none')[0].style.display = 'none';
  1465. else
  1466. $('#none')[0].style.display = '';
  1467. //详细
  1468. $.ajax({
  1469. url: '/home/selectTripSuspected',
  1470. get: "get",
  1471. data: {
  1472. "suspectedId": suspectedId
  1473. },
  1474. success: function (data) {
  1475. if (data.data.length != 0) {
  1476. }
  1477. listcx.splice(0, listcx.length);
  1478. $('#tabtr').empty();
  1479. var person;
  1480. // var xxIds = [];
  1481. // var xxName = [
  1482. // "序号",
  1483. // "出发地",
  1484. // "目的地",
  1485. // "出行方式",
  1486. // "车次/航班/车牌",
  1487. // "操作"
  1488. // ];
  1489. // for (var i = 0; i < xxName.length; i++) {
  1490. // xxIds.push({
  1491. // name: xxName[i]
  1492. // });
  1493. // }
  1494. // $('#tabtr').empty();
  1495. // var html = "<tr style='background-color: #f8f8f8;'>";
  1496. // for (var i = 0; i < xxIds.length; i++) {
  1497. // html += "<th>" + xxIds[i].name + "</th>";
  1498. // }
  1499. // html += "</tr>"
  1500. data.data.forEach(function (v) {
  1501. {
  1502. person = new Object();
  1503. person.startLocal = v.startLocal;
  1504. person.startLocalOther = v.startLocalOther;
  1505. person.endLocal = v.endLocal;
  1506. person.endLocalOther = v.endLocalOther;
  1507. person.tripType = v.tripType;
  1508. person.startLocalStr = getLocalOther(v.startLocal, v.startLocalOther);
  1509. person.endlocalStr = getLocalOther(v.endLocal, v.endLocalOther);
  1510. person.tripTypeStr = getTripType(v.tripType);
  1511. person.tripTypeDesp = v.tripTypeDesp;
  1512. listcx.push(person);
  1513. // html += "<tr>";
  1514. // html += "<td style='text-align: center;'>" + v.sort + "</td>";
  1515. // html += "<td style='text-align: center;' >" + getLocalOther(v.startLocal, v.startLocalOther) + " </td>";
  1516. // html += "<td style='text-align: center;' >" + getLocalOther(v.endLocal, v.endLocalOther) + " </td>";
  1517. // html += "<td style='text-align: center;' >" + getTripType(v.tripType) + " </td>";
  1518. // html += "<td style='text-align: center;' >" + v.tripTypeDesp + " </td>";
  1519. // 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>";
  1520. // html += "</tr>";
  1521. // $("#tabtr").html(html);
  1522. }
  1523. });
  1524. tab();
  1525. },
  1526. });
  1527. }
  1528. },
  1529. });
  1530. }
  1531. function addReport() {
  1532. if (!canSahngbao) {
  1533. return;
  1534. }
  1535. var userId = $("#userId").val();
  1536. $.ajax({
  1537. url: '/home/addReport',
  1538. type: "post",
  1539. data: {
  1540. "userCreate": userId,
  1541. },
  1542. success: function (data) {
  1543. $.toast(data.msg)
  1544. var date = new Date();
  1545. var Y = date.getFullYear() + '-';
  1546. var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
  1547. var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + ' ';
  1548. var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + ':';
  1549. var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + ':';
  1550. var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds());
  1551. var time = Y + M + D + h + m + s;
  1552. if (data.msg == "操作成功") {
  1553. canSahngbao = false;
  1554. document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
  1555. document.getElementById("txt_shangbao").style['color'] = "#0bb20c";
  1556. document.getElementById("txt_shangbaotime").style['color'] = "#0bb20c";
  1557. $('#txt_shangbao').empty();
  1558. $('#txt_shangbao').append("今日已上报");
  1559. $('#txt_shangbaotime').empty();
  1560. $('#txt_shangbaotime').append("上报时间:" + time);
  1561. }
  1562. },
  1563. });
  1564. }
  1565. $("#my-input-ribao").calendar({
  1566. dateFormat: 'yyyy-mm-dd',
  1567. inputReadOnly: false,
  1568. onChange: function (p, values, displayValues) {
  1569. var reportDate = values.toString();
  1570. var userId = $("#userId").val();
  1571. $.ajax({
  1572. url: '/home/home/queryRibaoReportDate',
  1573. data: {
  1574. "userCreate": userId,
  1575. "reportDate": reportDate,
  1576. },
  1577. type: 'GET',
  1578. success: function (data) {
  1579. if (data.data == undefined || data.data == "") {
  1580. $('#ribao_famliy').empty();
  1581. }
  1582. else {
  1583. if (data.data.length > 0) {
  1584. $('#ribao_famliy').empty();
  1585. data.data.forEach(function (v) {
  1586. helpValue1(v);
  1587. });
  1588. } else {
  1589. }
  1590. }
  1591. },
  1592. error: function () {
  1593. }
  1594. });
  1595. }
  1596. });
  1597. function helpValue1(v) {
  1598. var userName = v.userName + ":";
  1599. var grender = getGreder(v.grender);
  1600. var age = v.age;
  1601. var familyStatus = "";
  1602. if (v.familyStatus != 0)
  1603. familyStatus = "基本状况:" + getFamilyStatus(v.familyStatus) + ";";
  1604. var medical = "";
  1605. if (v.medical != 0)
  1606. medical = "新冠肺炎:" + getMedical(v.medical) + ";";
  1607. var isContact = "";
  1608. if (v.isContact != 0)
  1609. isContact = "家庭成员中有新冠肺炎疫情或有过病例接触史人员:" + getIsContact(v.isContact) + ";";
  1610. var isSuspected = "";
  1611. if (v.isSuspected != 0)
  1612. isSuspected = "近期接触的家庭成员中有感冒、发热、咳嗽等症状:" + getIsContact(v.isContact) + ";";
  1613. var singleRoom = "";
  1614. var uptownId = $("#uptownId").val();
  1615. if (uptownId != xiaoquId && uptownId != ceshixiaoquId) {
  1616. if (v.singleRoom != 0)
  1617. singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
  1618. if (v.singleRoom == 0 && v.medical != 0)
  1619. singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
  1620. }
  1621. var temperature = "体温:" + v.temperature + ";";
  1622. var cough = "";
  1623. if (v.cough != 0)
  1624. cough = "咳嗽现象:" + getCough(v.cough) + ";";
  1625. var muscle = "";
  1626. if (v.muscle != 0)
  1627. muscle = "肌肉酸痛:" + getMuscle(v.muscle) + ";";
  1628. var dyspnea = "";
  1629. if (v.dyspnea != 0)
  1630. dyspnea = "呼吸困难:" + getDyspnea(v.dyspnea) + ";";
  1631. var fatigue = "";
  1632. if (v.fatigue != 0)
  1633. fatigue = "乏力现象:" + getFatigue(v.fatigue) + ";";
  1634. var diarrhea = "";
  1635. if (v.diarrhea != 0)
  1636. diarrhea = "腹泻现象:" + getDiarrhea(v.diarrhea) + ";";
  1637. var others = "";
  1638. if (v.others != "")
  1639. others = "其他描述:" + v.others + ";";
  1640. var scoreRezult = "";
  1641. if (v.scoreRezult != 0)
  1642. scoreRezult = "评估结果:" + getScoreRezult(v.scoreRezult, v.temperatureScore) + ";";
  1643. var workLocal = "";
  1644. var todayLocal = "";
  1645. var isTrip = "";
  1646. var tripDet = "";
  1647. var uptownId = $("#uptownId").val();
  1648. if (uptownId == xiaoquId || uptownId == ceshixiaoquId) {
  1649. if (v.workLocal != 0) {
  1650. if (v.workLocal < 4)
  1651. workLocal = "工作驻地:" + getLocal(v.workLocal) + ";";
  1652. else
  1653. workLocal = "工作驻地:其它地点_" + v.workLocalOther + ";";
  1654. }
  1655. if (v.todayLocal != 0) {
  1656. if (v.todayLocal < 4)
  1657. todayLocal = "今晚住地:" + getLocal(v.todayLocal) + ";";
  1658. else
  1659. todayLocal = "今晚住地:其它地点_" + v.todayLocalOther + ";";
  1660. }
  1661. if (v.isTrip != undefined)
  1662. isTrip = "是否跨市出行:" + getIsTrip(v.isTrip) + ";"
  1663. if (v.tripDet != undefined)
  1664. tripDet = "出行详细:" + v.tripDet + ";"
  1665. }
  1666. $('#ribao_famliy').append($('<div class="weui-media-box weui-media-box_text" style="height: auto">\n' +
  1667. ' <h4 class="weui-media-box__title">' + userName + '&nbsp;&nbsp;&nbsp;' + grender + '&nbsp;&nbsp;&nbsp;' + age + '</h4>\n' +
  1668. ' <div style="height: auto">' + familyStatus + medical + isContact + isSuspected + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + scoreRezult + workLocal + todayLocal + isTrip + tripDet + '</div>\n' +
  1669. ' </div>\n' +
  1670. ' '));
  1671. }
  1672. function getGreder(greder) {
  1673. if (greder == 1)
  1674. return "男";
  1675. else if (greder == 2)
  1676. return "女";
  1677. return "";
  1678. }
  1679. function getFamilyStatus(familyStatus) {
  1680. var familyStatusList = familyStatus.split(",");
  1681. var familyStatusString = "";
  1682. if (familyStatus == '0,0,0,0,0,0,0')
  1683. familyStatusString += "无病史,";
  1684. else {
  1685. if (familyStatusList[0] == 1)
  1686. familyStatusString += "心脑血管疾病(服用ARB),";
  1687. if (familyStatusList[1] == 1)
  1688. familyStatusString += "心脑血管疾病(未服ARB),";
  1689. if (familyStatusList[2] == 1)
  1690. familyStatusString += "呼吸系统病史,";
  1691. if (familyStatusList[3] == 1)
  1692. familyStatusString += "肿瘤病史,";
  1693. if (familyStatusList[4] == 1)
  1694. familyStatusString += "糖尿病史,";
  1695. if (familyStatusList[5] == 1)
  1696. familyStatusString += "服用过激素药物,";
  1697. if (familyStatusList[6] == 1)
  1698. familyStatusString += "妊娠期,";
  1699. }
  1700. return familyStatusString.substring(0, familyStatusString.length - 1);
  1701. }
  1702. function getCough(cough) {
  1703. if (cough == 0)
  1704. return "无咳嗽";
  1705. else if (cough == 1)
  1706. return "偶尔短暂咳嗽";
  1707. else if (cough == 2)
  1708. return "咳嗽轻度影响生活";
  1709. else if (cough == 3)
  1710. return "咳嗽严重影响生活";
  1711. return "";
  1712. }
  1713. function getMuscle(muscle) {
  1714. if (muscle == 0)
  1715. return "无";
  1716. else if (muscle == 1)
  1717. return "按压有";
  1718. else if (muscle == 2)
  1719. return "偶尔";
  1720. else if (muscle == 3)
  1721. return "持续有";
  1722. return "";
  1723. }
  1724. function getDyspnea(dyspnea) {
  1725. if (dyspnea == 0)
  1726. return "无";
  1727. else if (dyspnea == 1)
  1728. return "急走或上坡气短";
  1729. else if (dyspnea == 2)
  1730. return "气短而走路变慢";
  1731. else if (dyspnea == 3)
  1732. return "走路数分钟后气短";
  1733. else if (dyspnea == 4)
  1734. return "气短无法离开房间";
  1735. return "";
  1736. }
  1737. function getFatigue(fatigue) {
  1738. if (fatigue == 0)
  1739. return "无";
  1740. else if (fatigue == 1)
  1741. return "体力劳动后不能恢复";
  1742. else if (fatigue == 2)
  1743. return "轻体力活非常累";
  1744. else if (fatigue == 3)
  1745. return "不能正常生活";
  1746. return "";
  1747. }
  1748. function getMedical(medical) {
  1749. if (medical == 0)
  1750. return "无";
  1751. else if (medical == 1)
  1752. return "确诊";
  1753. else if (medical == 2)
  1754. return "疑似";
  1755. else if (medical == 3)
  1756. return "有接触史";
  1757. else if (medical == 4)
  1758. return "解除隔离";
  1759. return "";
  1760. }
  1761. function getIsContact(isContact) {
  1762. if (isContact == 0)
  1763. return "否";
  1764. else if (isContact == 1)
  1765. return "是";
  1766. return "";
  1767. }
  1768. function getSingleRoom(singleRoom) {
  1769. if (singleRoom == 0)
  1770. return "否";
  1771. else if (singleRoom == 1)
  1772. return "是";
  1773. return "";
  1774. }
  1775. function getIsTrip(isTrip) {
  1776. if (isTrip == 0)
  1777. return "否";
  1778. else if (isTrip == 1)
  1779. return "是";
  1780. return "";
  1781. }
  1782. function getLocal(local) {
  1783. if (local == 0)
  1784. return "";
  1785. else if (local == 1)
  1786. return "武汉市";
  1787. else if (local == 2)
  1788. return "宜昌市";
  1789. else if (local == 3)
  1790. return "当阳市";
  1791. else if (local == 4)
  1792. return "其它地点";
  1793. return "";
  1794. }
  1795. function getLocalOther(local, localOther) {
  1796. if (local == 0)
  1797. return "";
  1798. else if (local == 1)
  1799. return "武汉市";
  1800. else if (local == 2)
  1801. return "宜昌市";
  1802. else if (local == 3)
  1803. return "当阳市";
  1804. else if (local == 4)
  1805. return "其它地点_" + localOther;
  1806. return "";
  1807. }
  1808. function getTripType(tripType) {
  1809. if (tripType == 0)
  1810. return "";
  1811. else if (tripType == 1)
  1812. return "长途汽车";
  1813. else if (tripType == 2)
  1814. return "火车";
  1815. else if (tripType == 3)
  1816. return "飞机";
  1817. else if (tripType == 4)
  1818. return "自驾";
  1819. return "";
  1820. }
  1821. function getDiarrhea(diarrhea) {
  1822. if (diarrhea == 0)
  1823. return "无";
  1824. else if (diarrhea == 1)
  1825. return "轻度腹泻(少于3次)";
  1826. else if (diarrhea == 2)
  1827. return "中度腹泻(4-6次)";
  1828. else if (diarrhea == 3)
  1829. return "重度腹泻(超过6次)";
  1830. return "";
  1831. }
  1832. function clearShow() {
  1833. console.log("qingkong")
  1834. $("#suspectedId").val("");
  1835. $("#switchQuezhen").attr("data-values", "");
  1836. $("#switchQuezhen_zz").val("");
  1837. $("#switchQuezhen_zz").attr("data-values", "");
  1838. $("#switchDanjiangeli").val("");
  1839. $("#switchDanjiangeli").attr("data-values", "");
  1840. $("#js_input_user_tiwen").val("");
  1841. $("#js_input_user_kesou").val("");
  1842. $("#js_input_user_kesou").attr("data-values", "");
  1843. $("#js_input_user_jirou").val("");
  1844. $("#js_input_user_jirou").attr("data-values", "");
  1845. $("#js_input_user_huxi").val("");
  1846. $("#js_input_user_huxi").attr("data-values", "");
  1847. $("#js_input_user_fali").val("");
  1848. $("#js_input_user_fali").attr("data-values", "");
  1849. $("#js_input_user_fuxie").val("");
  1850. $("#js_input_user_fuxie").attr("data-values", "");
  1851. $("#shuruqita").val("");
  1852. $("#js_input_score_rezult").val("");
  1853. $("#js_input_score_rezult_value").val("");
  1854. $("#js_input_temperature_score").val("");
  1855. $("#js_input_score_histroy").val("");
  1856. $("#js_input_score").val("");
  1857. //出行
  1858. $("#js_input_gzzd").val("");
  1859. $("#js_input_gzzd").attr("data-values", "");
  1860. $("#js_input_qtdd").val("");
  1861. $("#js_input_jrszd").val("");
  1862. $("#js_input_jrszd").attr("data-values", "");
  1863. $("#js_input_jrszq").val("");
  1864. $("#js_input_sf").val(getIsTrip(0));
  1865. $("#js_input_sf").attr("data-values", 0);
  1866. $('#none')[0].style.display = 'none';
  1867. $("input[id='s18']").removeAttr("checked");
  1868. $("input[id='s19']").removeAttr("checked");
  1869. $("input[id='s20']").removeAttr("checked");
  1870. $("input[id='s21']").removeAttr("checked");
  1871. $("input[id='s22']").removeAttr("checked");
  1872. $("input[id='s28']").removeAttr("checked");
  1873. $("input[id='s29']").removeAttr("checked");
  1874. }
  1875. //健康评估
  1876. $('#ribao_score').on('click', function () {
  1877. var suspectedId = $("#suspectedId").val();
  1878. var userId = $("#userId").val();
  1879. var userName = $("#js_input_user_name").val();
  1880. var medical = $("input[name='radio']:checked").val() == undefined ? 0 : $("input[name='radio']:checked").val();
  1881. var medicalzz = $("#switchQuezhen_zz").attr("data-values") == undefined ? 0 : $("#switchQuezhen_zz").attr("data-values");
  1882. var temperature = $("#js_input_user_tiwen").val() == "" ? 0 : $("#js_input_user_tiwen").val();
  1883. var cough = $("#js_input_user_kesou").attr("data-values") == undefined ? 0 : $("#js_input_user_kesou").attr("data-values");
  1884. var muscle = $("#js_input_user_jirou").attr("data-values") == undefined ? 0 : $("#js_input_user_jirou").attr("data-values");
  1885. var dyspnea = $("#js_input_user_huxi").attr("data-values") == undefined ? 0 : $("#js_input_user_huxi").attr("data-values");
  1886. var fatigue = $("#js_input_user_fali").attr("data-values") == undefined ? 0 : $("#js_input_user_fali").attr("data-values");
  1887. var diarrhea = $("#js_input_user_fuxie").attr("data-values") == undefined ? 0 : $("#js_input_user_fuxie").attr("data-values");
  1888. if (userName == undefined || userName == '') {
  1889. $.alert("请填写姓名");
  1890. return;
  1891. }
  1892. if (temperature <= 0) {
  1893. $.alert("请填写体温");
  1894. return;
  1895. }
  1896. if (temperature > 50 || temperature < 30) {
  1897. $.alert("请填写正确的体温");
  1898. return;
  1899. }
  1900. $.ajax({
  1901. url: '/home/addScore',
  1902. type: "post",
  1903. data: {
  1904. "userName": userName,
  1905. "suspectedId": suspectedId,
  1906. "userCreate": userId,
  1907. "medical": medical,
  1908. "temperature": temperature,
  1909. "cough": cough,
  1910. "muscle": muscle,
  1911. "dyspnea": dyspnea,
  1912. "fatigue": fatigue,
  1913. "diarrhea": diarrhea,
  1914. },
  1915. success: function (data) {
  1916. if (data == undefined) {
  1917. $('#js_input_score_rezult').empty();
  1918. $('#js_input_score_rezult_value').empty();
  1919. $('#js_input_temperature_score').empty();
  1920. $('#js_input_score_histroy').empty();
  1921. $('#js_input_score').empty();
  1922. }
  1923. else {
  1924. $('#js_input_score_rezult').empty();
  1925. $('#js_input_temperature_score').empty();
  1926. $('#js_input_score_histroy').empty();
  1927. $('#js_input_score').empty();
  1928. var ScoreRezult = getScoreRezult(data.scoreRezult, data.temperatureScore);
  1929. $("#js_input_score_rezult").val(ScoreRezult);
  1930. $("#js_input_score_rezult_value").val(data.scoreRezult);
  1931. $("#js_input_temperature_score").val(data.temperatureScore);
  1932. $("#js_input_score_histroy").val(data.scoreHistory);
  1933. $("#js_input_score").val(data.score);
  1934. }
  1935. },
  1936. });
  1937. });
  1938. function getScoreRezult(scoreRezult, temperatureScore) {
  1939. if (scoreRezult == 0)
  1940. return "未评估";
  1941. else if (scoreRezult == 1) {
  1942. if (temperatureScore > 1)
  1943. return "正常,间隔时间服用退烧药,多休息,多喝水";
  1944. else
  1945. return "正常";
  1946. }
  1947. else if (scoreRezult == 2) {
  1948. if (temperatureScore > 1)
  1949. return "注意观察,间隔时间服用退烧药,多休息,多喝水";
  1950. else
  1951. return "注意观察";
  1952. }
  1953. else if (scoreRezult == 3)
  1954. return "联系社区医生(或者在线问诊)";
  1955. else if (scoreRezult == 4)
  1956. return "尽快就诊";
  1957. return "";
  1958. }