ribao.js 65 KB

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