ribao.js 64 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093
  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 singleRoom = "";
  703. var uptownId = $("#uptownId").val();
  704. if (uptownId != xiaoquId && uptownId != ceshixiaoquId) {
  705. if (v.singleRoom != 0)
  706. singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
  707. if (v.singleRoom == 0 && v.medical != 0)
  708. singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
  709. }
  710. var temperature = "体温:" + v.temperature + ";";
  711. var cough = "";
  712. if (v.cough != 0)
  713. cough = "咳嗽现象:" + getCough(v.cough) + ";";
  714. var muscle = "";
  715. if (v.muscle != 0)
  716. muscle = "肌肉酸痛:" + getMuscle(v.muscle) + ";";
  717. var dyspnea = "";
  718. if (v.dyspnea != 0)
  719. dyspnea = "呼吸困难:" + getDyspnea(v.dyspnea) + ";";
  720. var fatigue = "";
  721. if (v.fatigue != 0)
  722. fatigue = "乏力现象:" + getFatigue(v.fatigue) + ";";
  723. var diarrhea = "";
  724. if (v.diarrhea != 0)
  725. diarrhea = "腹泻现象:" + getDiarrhea(v.diarrhea) + ";";
  726. var others = "";
  727. if (v.others != "")
  728. others = "其他描述:" + v.others + ";";
  729. var scoreRezult = "";
  730. if (v.scoreRezult != 0)
  731. scoreRezult = "评估结果:" + getScoreRezult(v.scoreRezult, v.temperatureScore) + ";";
  732. var workLocal = "";
  733. var todayLocal = "";
  734. var isTrip = "";
  735. var tripDet = "";
  736. if (uptownId == xiaoquId || uptownId == ceshixiaoquId) {
  737. if (v.workLocal != 0) {
  738. if (v.workLocal < 4)
  739. workLocal = "工作驻地:" + getLocal(v.workLocal) + ";";
  740. else
  741. workLocal = "工作驻地:其它地点_" + v.workLocalOther + ";";
  742. }
  743. if (v.todayLocal != 0) {
  744. if (v.todayLocal < 4)
  745. todayLocal = "今晚住地:" + getLocal(v.todayLocal) + ";";
  746. else
  747. todayLocal = "今晚住地:其它地点_" + v.todayLocalOther + ";";
  748. }
  749. if (v.isTrip != undefined)
  750. isTrip = "是否跨市出行:" + getIsTrip(v.isTrip) + ";"
  751. if (v.tripDet != undefined)
  752. tripDet = "出行详细:" + v.tripDet + ";"
  753. }
  754. $('#rb_family').append($('<div class="weui-media-box weui-media-box_text" style="height: auto">\n' +
  755. ' <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' +
  756. ' &nbsp;&nbsp;<a style="color: #2a62bc" onclick=\'updateSuspected(' + JSON.stringify(v.suspectedId) + ')\'>修改上报</a></h4>\n' +
  757. ' <div style="height: auto">' + familyStatus + medical + isContact + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + scoreRezult + workLocal + todayLocal + isTrip + tripDet + '</>\n' +
  758. ' </div>\n' +
  759. ' '));
  760. }
  761. function ribao_add() {
  762. $('#btnAdd').on('click', function () {
  763. // 获取定位
  764. getLocation();
  765. if ($('#ribao')[0].style.display == 'none') {
  766. $('#notOpenRibao').toggle();
  767. $('#ribao')[0].style.display = '';
  768. } else {
  769. $('#notOpenRibao')[0].style.display = '';
  770. $('#ribao')[0].style.display = 'none';
  771. }
  772. //基本情况
  773. $("input[name='checkbox1']").removeAttr("checked");
  774. $("input[name='checkbox2']").removeAttr("checked");
  775. $("input[name='checkbox3']").removeAttr("checked");
  776. $("input[name='checkbox4']").removeAttr("checked");
  777. $("input[name='checkbox5']").removeAttr("checked");
  778. $("input[name='checkbox6']").removeAttr("checked");
  779. $("input[name='checkbox7']").removeAttr("checked");
  780. $("#switchQuezhen").val(getMedical(0));
  781. $("#switchQuezhen").attr("data-values", 0);
  782. $("#switchDanjiangeli").val(getSingleRoom(0));
  783. $("#switchDanjiangeli").attr("data-values", 0);
  784. $("#js_input_user_tiwen").val(0);
  785. $("#js_input_user_kesou").val(getCough(0));
  786. $("#js_input_user_kesou").attr("data-values", 0);
  787. $("#js_input_user_jirou").val(getMuscle(0));
  788. $("#js_input_user_jirou").attr("data-values", 0);
  789. $("#js_input_user_huxi").val(getDyspnea(0));
  790. $("#js_input_user_huxi").attr("data-values", 0);
  791. $("#js_input_user_fali").val(getFatigue(0));
  792. $("#js_input_user_fali").attr("data-values", 0);
  793. $("#js_input_user_fuxie").val(getDiarrhea(0));
  794. $("#js_input_user_fuxie").attr("data-values", 0);
  795. $("#js_input_sf").val(getIsTrip(0));
  796. $("#js_input_sf").attr("data-values", 0);
  797. $('#none')[0].style.display = 'none';
  798. $('#tabtr').empty();
  799. // $("#suspectedId").val("");
  800. // $("#js_input_gzzd").val("");
  801. // $("#js_input_jrszd").val("");
  802. // $('#js_input_mddq').attr("disabled","disabled");
  803. // $('#js_input_jrszq').attr("disabled","disabled");
  804. // $('#js_input_qtdd').attr("disabled","disabled");
  805. // $('#js_input_cfdq').attr("disabled","disabled");
  806. // var userId = $("#userId").val();
  807. // //获取用户家人
  808. // $.ajax({
  809. // url: '/home/selectAddSuspected',
  810. // get: "get",
  811. // data: {
  812. // "userCreate": userId
  813. // },
  814. // success: function (data) {
  815. // if (data != null || data != '') {
  816. // //存在
  817. // var suspected = data;
  818. // $("#js_input_user_sex").val(getGreder(suspected.grender));
  819. // $("#js_input_user_sex").attr("data-values", suspected.grender);
  820. // $("#js_input_user_name").val(suspected.userName);
  821. // $("#js_input_user_age").val(suspected.age);
  822. // //基本情况
  823. // if (suspected.familyStatus != "") {
  824. // var familyStatusList = suspected.familyStatus.split(",");
  825. // if (familyStatusList[0] == 1)
  826. // $("input[name='checkbox1']").prop("checked", "checked");
  827. // else
  828. // $("input[name='checkbox1']").removeAttr("checked");
  829. // if (familyStatusList[1] == 1)
  830. // $("input[name='checkbox2']").prop("checked", "checked");
  831. // else
  832. // $("input[name='checkbox2']").removeAttr("checked");
  833. // if (familyStatusList[2] == 1)
  834. // $("input[name='checkbox3']").prop("checked", "checked");
  835. // else
  836. // $("input[name='checkbox3']").removeAttr("checked");
  837. // if (familyStatusList[3] == 1)
  838. // $("input[name='checkbox4']").prop("checked", "checked");
  839. // else
  840. // $("input[name='checkbox4']").removeAttr("checked");
  841. // if (familyStatusList[4] == 1)
  842. // $("input[name='checkbox5']").prop("checked", "checked");
  843. // else
  844. // $("input[name='checkbox5']").removeAttr("checked");
  845. // if (familyStatusList[5] == 1)
  846. // $("input[name='checkbox6']").prop("checked", "checked");
  847. // else
  848. // $("input[name='checkbox6']").removeAttr("checked");
  849. // if (familyStatusList[6] == 1)
  850. // $("input[name='checkbox7']").prop("checked", "checked");
  851. // else
  852. // $("input[name='checkbox7']").removeAttr("checked");
  853. //
  854. // }
  855. //
  856. // $("#switchQuezhen").val(getMedical(suspected.medical));
  857. // $("#switchQuezhen").attr("data-values", suspected.medical);
  858. //
  859. // $("#switchDanjiangeli").val(getSingleRoom(suspected.singleRoom));
  860. // $("#switchDanjiangeli").attr("data-values", suspected.singleRoom);
  861. //
  862. // $("#js_input_user_tiwen").val(suspected.temperature);
  863. //
  864. // $("#js_input_user_kesou").val(getCough(suspected.cough));
  865. // $("#js_input_user_kesou").attr("data-values", suspected.cough);
  866. //
  867. // $("#js_input_user_jirou").val(getMuscle(suspected.muscle));
  868. // $("#js_input_user_jirou").attr("data-values", suspected.muscle);
  869. //
  870. // $("#js_input_user_huxi").val(getDyspnea(suspected.dyspnea));
  871. // $("#js_input_user_huxi").attr("data-values", suspected.dyspnea);
  872. //
  873. // $("#js_input_user_fali").val(getFatigue(suspected.fatigue));
  874. // $("#js_input_user_fali").attr("data-values", suspected.fatigue);
  875. //
  876. // $("#js_input_user_fuxie").val(getDiarrhea(suspected.diarrhea));
  877. // $("#js_input_user_fuxie").attr("data-values", suspected.diarrhea);
  878. //
  879. // $("#shuruqita").val(suspected.others);
  880. // $("#js_input_score_rezult").val(getScoreRezult(suspected.scoreRezult, suspected.temperatureScore));
  881. // $("#js_input_score_rezult_value").val(suspected.scoreRezult);
  882. // $("#js_input_temperature_score").val(suspected.temperatureScore);
  883. // $("#js_input_score_histroy").val(suspected.scoreHistroy);
  884. // $("#js_input_score").val(suspected.score);
  885. //
  886. // $("#js_input_sf").val(getIsTrip(0));
  887. // $("#js_input_sf").attr("data-values", 0);
  888. // $('#none')[0].style.display = 'none';
  889. // }
  890. // else {
  891. // //基本情况
  892. // $("input[name='checkbox1']").removeAttr("checked");
  893. // $("input[name='checkbox2']").removeAttr("checked");
  894. // $("input[name='checkbox3']").removeAttr("checked");
  895. // $("input[name='checkbox4']").removeAttr("checked");
  896. // $("input[name='checkbox5']").removeAttr("checked");
  897. // $("input[name='checkbox6']").removeAttr("checked");
  898. // $("input[name='checkbox7']").removeAttr("checked");
  899. //
  900. // $("#switchQuezhen").val(getMedical(0));
  901. // $("#switchQuezhen").attr("data-values", 0);
  902. //
  903. // $("#switchDanjiangeli").val(getSingleRoom(0));
  904. // $("#switchDanjiangeli").attr("data-values", 0);
  905. //
  906. // $("#js_input_user_tiwen").val(0);
  907. //
  908. // $("#js_input_user_kesou").val(getCough(0));
  909. // $("#js_input_user_kesou").attr("data-values", 0);
  910. //
  911. // $("#js_input_user_jirou").val(getMuscle(0));
  912. // $("#js_input_user_jirou").attr("data-values", 0);
  913. //
  914. // $("#js_input_user_huxi").val(getDyspnea(0));
  915. // $("#js_input_user_huxi").attr("data-values", 0);
  916. //
  917. // $("#js_input_user_fali").val(getFatigue(0));
  918. // $("#js_input_user_fali").attr("data-values", 0);
  919. //
  920. // $("#js_input_user_fuxie").val(getDiarrhea(0));
  921. // $("#js_input_user_fuxie").attr("data-values", 0);
  922. //
  923. //
  924. // // $("#js_input_cxfs").empty();
  925. // // $("#js_input_cfd").empty();
  926. // // $("#js_input_mdd").empty();
  927. // // $('#js_input_cxfsq').val("");
  928. // // $('#js_input_cfdq').val("");
  929. // // $('#js_input_mddq').val("");
  930. // // listcx.splice(0,listcx.length);
  931. // // $('#tabtr').empty();
  932. // // $("#js_input_qtdd").val("");
  933. // // $("#js_input_jrszq").val("");
  934. // // $("#js_input_sf").val("");
  935. // $("#js_input_sf").val(getIsTrip(0));
  936. // $("#js_input_sf").attr("data-values", 0);
  937. // $('#none')[0].style.display = 'none';
  938. // $('#tabtr').empty();
  939. // // $("#suspectedId").val("");
  940. // // $("#js_input_gzzd").val("");
  941. // // $("#js_input_jrszd").val("");
  942. // // $('#js_input_mddq').attr("disabled","disabled");
  943. // // $('#js_input_jrszq').attr("disabled","disabled");
  944. // // $('#js_input_qtdd').attr("disabled","disabled");
  945. // // $('#js_input_cfdq').attr("disabled","disabled");
  946. //
  947. // }
  948. // },
  949. // });
  950. });
  951. }
  952. function tt() {
  953. alert($("input[name='radio']:checked").val())
  954. }
  955. function ribao_cancel() {
  956. $('#cancel').on('click', function () {
  957. listcx.splice(0, listcx.length);
  958. $('#tabtr').empty();
  959. $("#js_input_cfd").val("");
  960. $("#js_input_cfd").attr("data-values", "");
  961. $("#js_input_mdd").val("");
  962. $("#js_input_mdd").attr("data-values", "");
  963. $("#js_input_cxfs").val("");
  964. $("#js_input_cxfs").attr("data-values", "");
  965. $("#js_input_gzzd").val("");
  966. $("#js_input_gzzd").attr("data-values", "");
  967. $("#js_input_jrszd").val("");
  968. $("#js_input_jrszd").attr("data-values", "");
  969. $("#js_input_sf").val("");
  970. $("#js_input_sf").attr("data-values", "");
  971. $("#js_input_qtdd").val("");
  972. $("#js_input_jrszq").val("");
  973. $("#js_input_cfdq").val("");
  974. $("#js_input_mddq").val("");
  975. $("#js_input_cxfsq").val("");
  976. if ($('#ribao')[0].style.display == 'none') {
  977. $('#notOpenRibao').toggle();
  978. $('#ribao')[0].style.display = '';
  979. } else {
  980. $('#notOpenRibao')[0].style.display = '';
  981. $('#ribao')[0].style.display = 'none';
  982. }
  983. clearShow();
  984. });
  985. }
  986. function ribaoCommit() {
  987. if (cantijiao == false) {
  988. return
  989. }
  990. cantijiao = false
  991. // //判断是否获取到定位
  992. // if (autoLocal == '') {
  993. // cantijiao = true;
  994. // $.alert("请先设置微信获取当前位置");
  995. // return;
  996. // }
  997. var sf = $("#js_input_sf").attr("data-values") == undefined ? 3 : $("#js_input_sf").attr("data-values");
  998. if (listcx.length == 0 && sf == 1) {
  999. cantijiao = true;
  1000. $.alert("请添加出行");
  1001. return;
  1002. }
  1003. var suspectedId = $("#suspectedId").val();
  1004. var userId = $("#userId").val();
  1005. var userName = $("#js_input_user_name").val();
  1006. var grender = $("#js_input_user_sex").attr("data-values") == undefined ? 0 : $("#js_input_user_sex").attr("data-values");
  1007. var age = $("#js_input_user_age").val();
  1008. //不能同时选择服用和未服用
  1009. if ($("input[name='checkbox1']:checked").val() == "on" && $("input[name='checkbox2']:checked").val() == "on") {
  1010. cantijiao = true;
  1011. $.alert("心脑血管不能同时选择服用和未服用");
  1012. return;
  1013. }
  1014. //男性不能选择妊娠期
  1015. if ($("#js_input_user_sex").attr("data-values") == 1 && $("input[name='checkbox7']:checked").val() == "on") {
  1016. cantijiao = true;
  1017. $.alert("男性不能选择妊娠期");
  1018. return;
  1019. }
  1020. //家庭状态
  1021. var familyStatus = "";
  1022. if ($("input[name='checkbox1']:checked").val() == "on")
  1023. familyStatus += "1";
  1024. else
  1025. familyStatus += "0";
  1026. if ($("input[name='checkbox2']:checked").val() == "on")
  1027. familyStatus += ",1";
  1028. else
  1029. familyStatus += ",0";
  1030. if ($("input[name='checkbox3']:checked").val() == "on")
  1031. familyStatus += ",1";
  1032. else
  1033. familyStatus += ",0";
  1034. if ($("input[name='checkbox4']:checked").val() == "on")
  1035. familyStatus += ",1";
  1036. else
  1037. familyStatus += ",0";
  1038. if ($("input[name='checkbox5']:checked").val() == "on")
  1039. familyStatus += ",1";
  1040. else
  1041. familyStatus += ",0";
  1042. if ($("input[name='checkbox6']:checked").val() == "on")
  1043. familyStatus += ",1";
  1044. else
  1045. familyStatus += ",0";
  1046. if ($("input[name='checkbox7']:checked").val() == "on")
  1047. familyStatus += ",1";
  1048. else
  1049. familyStatus += ",0";
  1050. var medical = $("input[name='radio']:checked").val();
  1051. if (medical == undefined) {
  1052. cantijiao = true;
  1053. $.alert("请选择新冠肺炎");
  1054. return;
  1055. }
  1056. var isContact = $("input[name='radio1']:checked").val();
  1057. if (isContact == undefined) {
  1058. cantijiao = true;
  1059. $.alert("请选择家庭成员中有新冠肺炎疫情或有过病例接触史人员");
  1060. return;
  1061. }
  1062. //var familyStatus = $("#js_input_user_status").attr("data-values") == undefined ? 0 : $("#js_input_user_status").attr("data-values");
  1063. //var statusDesp = $("#jibenmiaoshu").val() == undefined ? "" : $("#jibenmiaoshu").val();
  1064. var statusDesp = "";
  1065. // var medical = $("#switchQuezhen").attr("data-values") == undefined ? 0 : $("#switchQuezhen").attr("data-values");
  1066. var medicalzz = $("#switchQuezhen_zz").attr("data-values") == undefined ? 0 : $("#switchQuezhen_zz").attr("data-values");
  1067. var singleRoom = $("#switchDanjiangeli").attr("data-values") == undefined ? 0 : $("#switchDanjiangeli").attr("data-values");
  1068. var temperature = $("#js_input_user_tiwen").val() == "" ? 0 : $("#js_input_user_tiwen").val();
  1069. var cough = $("#js_input_user_kesou").attr("data-values") == undefined ? 0 : $("#js_input_user_kesou").attr("data-values");
  1070. var muscle = $("#js_input_user_jirou").attr("data-values") == undefined ? 0 : $("#js_input_user_jirou").attr("data-values");
  1071. var dyspnea = $("#js_input_user_huxi").attr("data-values") == undefined ? 0 : $("#js_input_user_huxi").attr("data-values");
  1072. var fatigue = $("#js_input_user_fali").attr("data-values") == undefined ? 0 : $("#js_input_user_fali").attr("data-values");
  1073. var diarrhea = $("#js_input_user_fuxie").attr("data-values") == undefined ? 0 : $("#js_input_user_fuxie").attr("data-values");
  1074. var others = $("#shuruqita").val() == undefined ? "" : $("#shuruqita").val();
  1075. var scoreRezult = $("#js_input_score_rezult_value").val() == undefined ? "" : $("#js_input_score_rezult_value").val();
  1076. var temperatureScore = $("#js_input_temperature_score").val() == undefined ? "" : $("#js_input_temperature_score").val();
  1077. var scoreHistroy = $("#js_input_score_histroy").val() == undefined ? "" : $("#js_input_score_histroy").val();
  1078. var score = $("#js_input_score").val() == undefined ? "" : $("#js_input_score").val();
  1079. if (userName == undefined || userName == '') {
  1080. cantijiao = true;
  1081. $.alert("请填写姓名");
  1082. return;
  1083. }
  1084. if (grender == 0) {
  1085. cantijiao = true;
  1086. $.alert("请填写性别");
  1087. return;
  1088. }
  1089. if (age == undefined || age == '') {
  1090. cantijiao = true;
  1091. $.alert("请填写年龄");
  1092. return;
  1093. }
  1094. if (age > 150 || age < 0) {
  1095. cantijiao = true;
  1096. $.alert("请填写正确的年龄");
  1097. return;
  1098. }
  1099. if (temperature <= 0) {
  1100. cantijiao = true;
  1101. $.alert("请填写体温");
  1102. return;
  1103. }
  1104. if (temperature > 50 || temperature < 30) {
  1105. cantijiao = true;
  1106. $.alert("请填写正确的体温");
  1107. return;
  1108. }
  1109. //如果是凌云
  1110. var uptownId = $("#uptownId").val();
  1111. if (uptownId == xiaoquId || uptownId == ceshixiaoquId) {
  1112. //lingyun
  1113. var gzzd = $("#js_input_gzzd").attr("data-values") == undefined ? 0 : $("#js_input_gzzd").attr("data-values");
  1114. var qtdd = $("#js_input_qtdd").val();
  1115. var workLocal = "";
  1116. var workLocalOther = "";
  1117. if (gzzd == 0) {
  1118. cantijiao = true;
  1119. $.alert("请选择工作驻地");
  1120. return;
  1121. } else if (gzzd == 4 && qtdd == "") {
  1122. cantijiao = true;
  1123. $.alert("请填写工作驻地");
  1124. return;
  1125. } else if (gzzd != 0 && gzzd != 4) {
  1126. if (gzzd == 1) {
  1127. workLocal = 1;
  1128. } else if (gzzd == 2) {
  1129. workLocal = 2;
  1130. } else if (gzzd == 3) {
  1131. workLocal = 3;
  1132. }
  1133. } else if (gzzd == 4 && qtdd != "") {
  1134. workLocal = 4;
  1135. workLocalOther = qtdd;
  1136. }
  1137. //var listcx = [];
  1138. //var person=new Object();
  1139. var jrszd = $("#js_input_jrszd").attr("data-values") == undefined ? 0 : $("#js_input_jrszd").attr("data-values");
  1140. var jrszq = $("#js_input_jrszq").val();
  1141. var todyLocal = "";
  1142. var todyLocalOther = "";
  1143. if (jrszd == 0) {
  1144. cantijiao = true;
  1145. $.alert("请先设置微信获取当前位置");
  1146. //$.alert("请选择今晚住地");
  1147. return;
  1148. } else if (jrszd == 4 && jrszq == "") {
  1149. cantijiao = true;
  1150. $.alert("请先设置微信获取当前位置");
  1151. //$.alert("请填写今晚住地");
  1152. return;
  1153. } else if (jrszd != 0 && jrszd != 4) {
  1154. if (jrszd == 1) {
  1155. todyLocal = 1;
  1156. } else if (jrszd == 2) {
  1157. todyLocal = 2;
  1158. } else if (jrszd == 3) {
  1159. todyLocal = 3;
  1160. }
  1161. } else if (jrszd == 4 && jrszq != "") {
  1162. todyLocal = 4;
  1163. todyLocalOther = jrszq;
  1164. }
  1165. var sf = $("#js_input_sf").attr("data-values") == undefined ? 3 : $("#js_input_sf").attr("data-values");
  1166. var isTrip = "";
  1167. if (sf == 3) {
  1168. cantijiao = true;
  1169. $.alert("请选择是否出行");
  1170. return;
  1171. } else {
  1172. isTrip = sf;
  1173. }
  1174. } else {
  1175. workLocal = 0;
  1176. workLocalOther = "";
  1177. todyLocal = 0;
  1178. todyLocalOther = "";
  1179. isTrip = 0;
  1180. listcx = [];
  1181. }
  1182. var pdata = {
  1183. "suspectedId": suspectedId,
  1184. "userCreate": userId,
  1185. "userName": userName,
  1186. "grender": grender,
  1187. "age": age,
  1188. "familyStatus": familyStatus,
  1189. "statusDesp": statusDesp,
  1190. "medical": medical,
  1191. "singleRoom": singleRoom,
  1192. "temperature": temperature,
  1193. "cough": cough,
  1194. "muscle": muscle,
  1195. "dyspnea": dyspnea,
  1196. "fatigue": fatigue,
  1197. "diarrhea": diarrhea,
  1198. "others": others,
  1199. "scoreRezult": scoreRezult,
  1200. "temperatureScore": temperatureScore,
  1201. "scoreHistroy": scoreHistroy,
  1202. "score": score,
  1203. "isContact": isContact,
  1204. "workLocal": workLocal,
  1205. "workLocalOther": workLocalOther,
  1206. "todayLocal": todyLocal,
  1207. "todayLocalOther": todyLocalOther,
  1208. "autoLocal": autoLocal,
  1209. "autoAddr": autoAddr,
  1210. "isTrip": isTrip,
  1211. "tripDet": listcx,
  1212. };
  1213. $.ajax({
  1214. url: '/home/addRibaoTrip',
  1215. type: "post",
  1216. contentType: "application/json; charset=utf-8",
  1217. data: JSON.stringify(pdata),
  1218. success: function (data) {
  1219. console.log('data:', data.msgReport);
  1220. if (data == {} || data == '' || data == null || data == undefined) {
  1221. $.toast("数据提交失败,请重新提交!", 'forbidden');
  1222. cantijiao = true;
  1223. return;
  1224. }
  1225. if (data.reportId == null || data.reportId == undefined || data.reportId <= 0) {
  1226. $.toast("数据提交失败,请重新提交!", 'forbidden');
  1227. cantijiao = true;
  1228. return;
  1229. }
  1230. if (data.msgReport == "2") {
  1231. cantijiao = true;
  1232. $.toast("家人姓名不能重复,如果重复,可以带上称呼");
  1233. return;
  1234. }
  1235. if (data.msgReport == "4") {
  1236. cantijiao = true;
  1237. $.toast("是否出行,请如实填写!");
  1238. return;
  1239. }
  1240. if ($('#ribao')[0].style.display == 'none') {
  1241. $('#notOpenRibao').toggle();
  1242. $('#ribao')[0].style.display = '';
  1243. } else {
  1244. $('#notOpenRibao')[0].style.display = '';
  1245. $('#ribao')[0].style.display = 'none';
  1246. }
  1247. cantijiao = true
  1248. $('#ribao_jinrijujian').empty();
  1249. $('#ribao_jinrijujian').append(data.safetyNum);
  1250. //修改
  1251. var uptownId = $("#uptownId").val();
  1252. //是凌云
  1253. if (uptownId == xiaoquId || uptownId == ceshixiaoquId) {
  1254. if (suspectedId > 0) {
  1255. var date = new Date();
  1256. var Y = date.getFullYear() + '-';
  1257. var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
  1258. var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + ' ';
  1259. var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + ':';
  1260. var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + ':';
  1261. var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds());
  1262. var time = Y + M + D + h + m + s;
  1263. canSahngbao = false;
  1264. document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
  1265. document.getElementById("txt_shangbao").style['color'] = "#0bb20c";
  1266. document.getElementById("txt_shangbaotime").style['color'] = "#0bb20c";
  1267. $('#txt_shangbao').empty();
  1268. $('#txt_shangbao').append("今日已上报");
  1269. $('#txt_shangbaotime').empty();
  1270. $('#txt_shangbaotime').append("上报时间:" + time);
  1271. }
  1272. else {
  1273. canSahngbao = true;
  1274. document.getElementById("btn_shangbao").style['background-color'] = "#0bb20c";
  1275. document.getElementById("txt_shangbao").style['color'] = "red";
  1276. $('#txt_shangbao').empty();
  1277. $('#txt_shangbao').append("今日未上报");
  1278. $('#txt_shangbaotime').empty();
  1279. }
  1280. }
  1281. else {
  1282. canSahngbao = true;
  1283. document.getElementById("btn_shangbao").style['background-color'] = "#0bb20c";
  1284. document.getElementById("txt_shangbao").style['color'] = "red";
  1285. $('#txt_shangbao').empty();
  1286. $('#txt_shangbao').append("今日未上报");
  1287. $('#txt_shangbaotime').empty();
  1288. // $.toast("请点击上报");
  1289. }
  1290. ribao_refrash();
  1291. clearShow();
  1292. },
  1293. });
  1294. }
  1295. function deleteSuspected(suspectedId) {
  1296. $.ajax({
  1297. url: '/home/deleteSuspected',
  1298. type: "post",
  1299. data: {
  1300. "suspectedId": suspectedId
  1301. },
  1302. success: function (data) {
  1303. $('#ribao_jinrijujian').empty();
  1304. $('#ribao_jinrijujian').append(data.safetyNum);
  1305. //今日未上报
  1306. canSahngbao = true;
  1307. document.getElementById("btn_shangbao").style['background-color'] = "#0bb20c";
  1308. document.getElementById("txt_shangbao").style['color'] = "red";
  1309. $('#txt_shangbao').empty();
  1310. $('#txt_shangbao').append("今日未上报");
  1311. $('#txt_shangbaotime').empty();
  1312. ribao_refrash();
  1313. $.toast("删除后请重新添加上报");
  1314. },
  1315. });
  1316. }
  1317. function updateSuspected(suspectedId) {
  1318. $("#suspectedId").val("");
  1319. if ($('#ribao')[0].style.display == 'none') {
  1320. $('#notOpenRibao').toggle();
  1321. $('#ribao')[0].style.display = '';
  1322. } else {
  1323. $('#notOpenRibao')[0].style.display = '';
  1324. $('#ribao')[0].style.display = 'none';
  1325. }
  1326. $.ajax({
  1327. url: '/home/selectSuspected',
  1328. get: "get",
  1329. data: {
  1330. "suspectedId": suspectedId
  1331. },
  1332. success: function (data) {
  1333. // console.log(data);
  1334. if (data) {
  1335. // 获取定位
  1336. getLocation();
  1337. var suspected = data;
  1338. $("#suspectedId").val(suspected.suspectedId);
  1339. $("#js_input_user_sex").val(getGreder(suspected.grender));
  1340. $("#js_input_user_sex").attr("data-values", suspected.grender);
  1341. $("#js_input_user_name").val(suspected.userName);
  1342. $("#js_input_user_age").val(suspected.age);
  1343. //基本情况
  1344. if (suspected.familyStatus != "") {
  1345. var familyStatusList = suspected.familyStatus.split(",");
  1346. if (familyStatusList[0] == 1)
  1347. $("input[name='checkbox1']").prop("checked", "checked");
  1348. else
  1349. $("input[name='checkbox1']").removeAttr("checked");
  1350. if (familyStatusList[1] == 1)
  1351. $("input[name='checkbox2']").prop("checked", "checked");
  1352. else
  1353. $("input[name='checkbox2']").removeAttr("checked");
  1354. if (familyStatusList[2] == 1)
  1355. $("input[name='checkbox3']").prop("checked", "checked");
  1356. else
  1357. $("input[name='checkbox3']").removeAttr("checked");
  1358. if (familyStatusList[3] == 1)
  1359. $("input[name='checkbox4']").prop("checked", "checked");
  1360. else
  1361. $("input[name='checkbox4']").removeAttr("checked");
  1362. if (familyStatusList[4] == 1)
  1363. $("input[name='checkbox5']").prop("checked", "checked");
  1364. else
  1365. $("input[name='checkbox5']").removeAttr("checked");
  1366. if (familyStatusList[5] == 1)
  1367. $("input[name='checkbox6']").prop("checked", "checked");
  1368. else
  1369. $("input[name='checkbox6']").removeAttr("checked");
  1370. if (familyStatusList[6] == 1)
  1371. $("input[name='checkbox7']").prop("checked", "checked");
  1372. else
  1373. $("input[name='checkbox7']").removeAttr("checked");
  1374. }
  1375. // $("#js_input_user_status").val(getFamilyStatus(suspected.familyStatus));
  1376. // $("#js_input_user_status").attr("data-values", suspected.familyStatus);
  1377. // $("#jibenmiaoshu").val(suspected.statusDesp);
  1378. if (suspected.medical == 0)
  1379. $("input[id='s18']").prop("checked", "checked");
  1380. if (suspected.medical == 1)
  1381. $("input[id='s19']").prop("checked", "checked");
  1382. if (suspected.medical == 2)
  1383. $("input[id='s20']").prop("checked", "checked");
  1384. if (suspected.medical == 3)
  1385. $("input[id='s21']").prop("checked", "checked");
  1386. if (suspected.medical == 4)
  1387. $("input[id='s22']").prop("checked", "checked");
  1388. if (suspected.isContact == 0)
  1389. $("input[id='s28']").prop("checked", "checked");
  1390. if (suspected.isContact == 1)
  1391. $("input[id='s29']").prop("checked", "checked");
  1392. // $("#switchQuezhen").val(getMedical(suspected.medical));
  1393. // $("#switchQuezhen").attr("data-values", suspected.medical);
  1394. $("#switchDanjiangeli").val(getSingleRoom(suspected.singleRoom));
  1395. $("#switchDanjiangeli").attr("data-values", suspected.singleRoom);
  1396. $("#js_input_user_tiwen").val(suspected.temperature);
  1397. $("#js_input_user_kesou").val(getCough(suspected.cough));
  1398. $("#js_input_user_kesou").attr("data-values", suspected.cough);
  1399. $("#js_input_user_jirou").val(getMuscle(suspected.muscle));
  1400. $("#js_input_user_jirou").attr("data-values", suspected.muscle);
  1401. $("#js_input_user_huxi").val(getDyspnea(suspected.dyspnea));
  1402. $("#js_input_user_huxi").attr("data-values", suspected.dyspnea);
  1403. $("#js_input_user_fali").val(getFatigue(suspected.fatigue));
  1404. $("#js_input_user_fali").attr("data-values", suspected.fatigue);
  1405. $("#js_input_user_fuxie").val(getDiarrhea(suspected.diarrhea));
  1406. $("#js_input_user_fuxie").attr("data-values", suspected.diarrhea);
  1407. $("#shuruqita").val(suspected.others);
  1408. $("#js_input_score_rezult").val(getScoreRezult(suspected.scoreRezult, suspected.temperatureScore));
  1409. $("#js_input_score_rezult_value").val(suspected.scoreRezult);
  1410. $("#js_input_temperature_score").val(suspected.temperatureScore);
  1411. $("#js_input_score_histroy").val(suspected.scoreHistroy);
  1412. $("#js_input_score").val(suspected.score);
  1413. //工作驻地
  1414. $("#js_input_gzzd").val(getLocal(suspected.workLocal));
  1415. $("#js_input_gzzd").attr("data-values", suspected.workLocal);
  1416. if (suspected.workLocal != 4) {
  1417. $('#js_input_qtdd').attr("disabled", "disabled");
  1418. $("#js_input_qtdd").val("");
  1419. } else {
  1420. $('#js_input_qtdd').removeAttr("disabled")
  1421. }
  1422. $("#js_input_qtdd").val(suspected.workLocalOther);
  1423. //今晚驻地
  1424. $("#js_input_jrszd").val(getLocal(suspected.todayLocal));
  1425. $("#js_input_jrszd").attr("data-values", suspected.todayLocal);
  1426. if (suspected.todayLocal != 4) {
  1427. $('#js_input_jrszq').attr("disabled", "disabled");
  1428. $("#js_input_jrszq").val("");
  1429. }
  1430. else {
  1431. $('#js_input_jrszq').removeAttr("disabled")
  1432. }
  1433. $("#js_input_jrszq").val(suspected.todayLocalOther);
  1434. //是否出行
  1435. $("#js_input_sf").val(getIsTrip(suspected.isTrip));
  1436. $("#js_input_sf").attr("data-values", suspected.isTrip);
  1437. if (suspected.isTrip == 0)
  1438. $('#none')[0].style.display = 'none';
  1439. else
  1440. $('#none')[0].style.display = '';
  1441. //详细
  1442. $.ajax({
  1443. url: '/home/selectTripSuspected',
  1444. get: "get",
  1445. data: {
  1446. "suspectedId": suspectedId
  1447. },
  1448. success: function (data) {
  1449. if (data.data.length != 0) {
  1450. }
  1451. listcx.splice(0, listcx.length);
  1452. $('#tabtr').empty();
  1453. var person;
  1454. // var xxIds = [];
  1455. // var xxName = [
  1456. // "序号",
  1457. // "出发地",
  1458. // "目的地",
  1459. // "出行方式",
  1460. // "车次/航班/车牌",
  1461. // "操作"
  1462. // ];
  1463. // for (var i = 0; i < xxName.length; i++) {
  1464. // xxIds.push({
  1465. // name: xxName[i]
  1466. // });
  1467. // }
  1468. // $('#tabtr').empty();
  1469. // var html = "<tr style='background-color: #f8f8f8;'>";
  1470. // for (var i = 0; i < xxIds.length; i++) {
  1471. // html += "<th>" + xxIds[i].name + "</th>";
  1472. // }
  1473. // html += "</tr>"
  1474. data.data.forEach(function (v) {
  1475. {
  1476. person = new Object();
  1477. person.startLocal = v.startLocal;
  1478. person.startLocalOther = v.startLocalOther;
  1479. person.endLocal = v.endLocal;
  1480. person.endLocalOther = v.endLocalOther;
  1481. person.tripType = v.tripType;
  1482. person.startLocalStr = getLocalOther(v.startLocal, v.startLocalOther);
  1483. person.endlocalStr = getLocalOther(v.endLocal, v.endLocalOther);
  1484. person.tripTypeStr = getTripType(v.tripType);
  1485. person.tripTypeDesp = v.tripTypeDesp;
  1486. listcx.push(person);
  1487. // html += "<tr>";
  1488. // html += "<td style='text-align: center;'>" + v.sort + "</td>";
  1489. // html += "<td style='text-align: center;' >" + getLocalOther(v.startLocal, v.startLocalOther) + " </td>";
  1490. // html += "<td style='text-align: center;' >" + getLocalOther(v.endLocal, v.endLocalOther) + " </td>";
  1491. // html += "<td style='text-align: center;' >" + getTripType(v.tripType) + " </td>";
  1492. // html += "<td style='text-align: center;' >" + v.tripTypeDesp + " </td>";
  1493. // 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>";
  1494. // html += "</tr>";
  1495. // $("#tabtr").html(html);
  1496. }
  1497. });
  1498. tab();
  1499. },
  1500. });
  1501. }
  1502. },
  1503. });
  1504. }
  1505. function addReport() {
  1506. if (!canSahngbao) {
  1507. return;
  1508. }
  1509. var userId = $("#userId").val();
  1510. $.ajax({
  1511. url: '/home/addReport',
  1512. type: "post",
  1513. data: {
  1514. "userCreate": userId,
  1515. },
  1516. success: function (data) {
  1517. $.toast(data.msg)
  1518. var date = new Date();
  1519. var Y = date.getFullYear() + '-';
  1520. var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
  1521. var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + ' ';
  1522. var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + ':';
  1523. var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + ':';
  1524. var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds());
  1525. var time = Y + M + D + h + m + s;
  1526. if (data.msg == "操作成功") {
  1527. canSahngbao = false;
  1528. document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
  1529. document.getElementById("txt_shangbao").style['color'] = "#0bb20c";
  1530. document.getElementById("txt_shangbaotime").style['color'] = "#0bb20c";
  1531. $('#txt_shangbao').empty();
  1532. $('#txt_shangbao').append("今日已上报");
  1533. $('#txt_shangbaotime').empty();
  1534. $('#txt_shangbaotime').append("上报时间:" + time);
  1535. }
  1536. },
  1537. });
  1538. }
  1539. $("#my-input-ribao").calendar({
  1540. dateFormat: 'yyyy-mm-dd',
  1541. inputReadOnly: false,
  1542. onChange: function (p, values, displayValues) {
  1543. var reportDate = values.toString();
  1544. var userId = $("#userId").val();
  1545. $.ajax({
  1546. url: '/home/home/queryRibaoReportDate',
  1547. data: {
  1548. "userCreate": userId,
  1549. "reportDate": reportDate,
  1550. },
  1551. type: 'GET',
  1552. success: function (data) {
  1553. if (data.data == undefined || data.data == "") {
  1554. $('#ribao_famliy').empty();
  1555. }
  1556. else {
  1557. if (data.data.length > 0) {
  1558. $('#ribao_famliy').empty();
  1559. data.data.forEach(function (v) {
  1560. helpValue1(v);
  1561. });
  1562. } else {
  1563. }
  1564. }
  1565. },
  1566. error: function () {
  1567. }
  1568. });
  1569. }
  1570. });
  1571. function helpValue1(v) {
  1572. var userName = v.userName + ":";
  1573. var grender = getGreder(v.grender);
  1574. var age = v.age;
  1575. var familyStatus = "";
  1576. if (v.familyStatus != 0)
  1577. familyStatus = "基本状况:" + getFamilyStatus(v.familyStatus) + ";";
  1578. var medical = "";
  1579. if (v.medical != 0)
  1580. medical = "新冠肺炎:" + getMedical(v.medical) + ";";
  1581. var isContact = "";
  1582. if (v.isContact != 0)
  1583. isContact = "家庭成员中有新冠肺炎疫情或有过病例接触史人员:" + getIsContact(v.isContact) + ";";
  1584. var singleRoom = "";
  1585. var uptownId = $("#uptownId").val();
  1586. if (uptownId != xiaoquId && uptownId != ceshixiaoquId) {
  1587. if (v.singleRoom != 0)
  1588. singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
  1589. if (v.singleRoom == 0 && v.medical != 0)
  1590. singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
  1591. }
  1592. var temperature = "体温:" + v.temperature + ";";
  1593. var cough = "";
  1594. if (v.cough != 0)
  1595. cough = "咳嗽现象:" + getCough(v.cough) + ";";
  1596. var muscle = "";
  1597. if (v.muscle != 0)
  1598. muscle = "肌肉酸痛:" + getMuscle(v.muscle) + ";";
  1599. var dyspnea = "";
  1600. if (v.dyspnea != 0)
  1601. dyspnea = "呼吸困难:" + getDyspnea(v.dyspnea) + ";";
  1602. var fatigue = "";
  1603. if (v.fatigue != 0)
  1604. fatigue = "乏力现象:" + getFatigue(v.fatigue) + ";";
  1605. var diarrhea = "";
  1606. if (v.diarrhea != 0)
  1607. diarrhea = "腹泻现象:" + getDiarrhea(v.diarrhea) + ";";
  1608. var others = "";
  1609. if (v.others != "")
  1610. others = "其他描述:" + v.others + ";";
  1611. var scoreRezult = "";
  1612. if (v.scoreRezult != 0)
  1613. scoreRezult = "评估结果:" + getScoreRezult(v.scoreRezult, v.temperatureScore) + ";";
  1614. var workLocal = "";
  1615. var todayLocal = "";
  1616. var isTrip = "";
  1617. var tripDet = "";
  1618. var uptownId = $("#uptownId").val();
  1619. if (uptownId == xiaoquId || uptownId == ceshixiaoquId) {
  1620. if (v.workLocal != 0) {
  1621. if (v.workLocal < 4)
  1622. workLocal = "工作驻地:" + getLocal(v.workLocal) + ";";
  1623. else
  1624. workLocal = "工作驻地:其它地点_" + v.workLocalOther + ";";
  1625. }
  1626. if (v.todayLocal != 0) {
  1627. if (v.todayLocal < 4)
  1628. todayLocal = "今晚住地:" + getLocal(v.todayLocal) + ";";
  1629. else
  1630. todayLocal = "今晚住地:其它地点_" + v.todayLocalOther + ";";
  1631. }
  1632. if (v.isTrip != undefined)
  1633. isTrip = "是否跨市出行:" + getIsTrip(v.isTrip) + ";"
  1634. if (v.tripDet != undefined)
  1635. tripDet = "出行详细:" + v.tripDet + ";"
  1636. }
  1637. $('#ribao_famliy').append($('<div class="weui-media-box weui-media-box_text" style="height: auto">\n' +
  1638. ' <h4 class="weui-media-box__title">' + userName + '&nbsp;&nbsp;&nbsp;' + grender + '&nbsp;&nbsp;&nbsp;' + age + '</h4>\n' +
  1639. ' <div style="height: auto">' + familyStatus + medical + isContact + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + scoreRezult + workLocal + todayLocal + isTrip + tripDet + '</div>\n' +
  1640. ' </div>\n' +
  1641. ' '));
  1642. }
  1643. function getGreder(greder) {
  1644. if (greder == 1)
  1645. return "男";
  1646. else if (greder == 2)
  1647. return "女";
  1648. return "";
  1649. }
  1650. function getFamilyStatus(familyStatus) {
  1651. var familyStatusList = familyStatus.split(",");
  1652. var familyStatusString = "";
  1653. if (familyStatus == '0,0,0,0,0,0,0')
  1654. familyStatusString += "无病史,";
  1655. else {
  1656. if (familyStatusList[0] == 1)
  1657. familyStatusString += "心脑血管疾病(服用ARB),";
  1658. if (familyStatusList[1] == 1)
  1659. familyStatusString += "心脑血管疾病(未服ARB),";
  1660. if (familyStatusList[2] == 1)
  1661. familyStatusString += "呼吸系统病史,";
  1662. if (familyStatusList[3] == 1)
  1663. familyStatusString += "肿瘤病史,";
  1664. if (familyStatusList[4] == 1)
  1665. familyStatusString += "糖尿病史,";
  1666. if (familyStatusList[5] == 1)
  1667. familyStatusString += "服用过激素药物,";
  1668. if (familyStatusList[6] == 1)
  1669. familyStatusString += "妊娠期,";
  1670. }
  1671. return familyStatusString.substring(0, familyStatusString.length - 1);
  1672. }
  1673. function getCough(cough) {
  1674. if (cough == 0)
  1675. return "无咳嗽";
  1676. else if (cough == 1)
  1677. return "偶尔短暂咳嗽";
  1678. else if (cough == 2)
  1679. return "咳嗽轻度影响生活";
  1680. else if (cough == 3)
  1681. return "咳嗽严重影响生活";
  1682. return "";
  1683. }
  1684. function getMuscle(muscle) {
  1685. if (muscle == 0)
  1686. return "无";
  1687. else if (muscle == 1)
  1688. return "按压有";
  1689. else if (muscle == 2)
  1690. return "偶尔";
  1691. else if (muscle == 3)
  1692. return "持续有";
  1693. return "";
  1694. }
  1695. function getDyspnea(dyspnea) {
  1696. if (dyspnea == 0)
  1697. return "无";
  1698. else if (dyspnea == 1)
  1699. return "急走或上坡气短";
  1700. else if (dyspnea == 2)
  1701. return "气短而走路变慢";
  1702. else if (dyspnea == 3)
  1703. return "走路数分钟后气短";
  1704. else if (dyspnea == 4)
  1705. return "气短无法离开房间";
  1706. return "";
  1707. }
  1708. function getFatigue(fatigue) {
  1709. if (fatigue == 0)
  1710. return "无";
  1711. else if (fatigue == 1)
  1712. return "体力劳动后不能恢复";
  1713. else if (fatigue == 2)
  1714. return "轻体力活非常累";
  1715. else if (fatigue == 3)
  1716. return "不能正常生活";
  1717. return "";
  1718. }
  1719. function getMedical(medical) {
  1720. if (medical == 0)
  1721. return "无";
  1722. else if (medical == 1)
  1723. return "确诊";
  1724. else if (medical == 2)
  1725. return "疑似";
  1726. else if (medical == 3)
  1727. return "有接触史";
  1728. else if (medical == 4)
  1729. return "解除隔离";
  1730. return "";
  1731. }
  1732. function getIsContact(isContact) {
  1733. if (isContact == 0)
  1734. return "否";
  1735. else if (isContact == 1)
  1736. return "是";
  1737. return "";
  1738. }
  1739. function getSingleRoom(singleRoom) {
  1740. if (singleRoom == 0)
  1741. return "否";
  1742. else if (singleRoom == 1)
  1743. return "是";
  1744. return "";
  1745. }
  1746. function getIsTrip(isTrip) {
  1747. if (isTrip == 0)
  1748. return "否";
  1749. else if (isTrip == 1)
  1750. return "是";
  1751. return "";
  1752. }
  1753. function getLocal(local) {
  1754. if (local == 0)
  1755. return "";
  1756. else if (local == 1)
  1757. return "武汉市";
  1758. else if (local == 2)
  1759. return "宜昌市";
  1760. else if (local == 3)
  1761. return "当阳市";
  1762. else if (local == 4)
  1763. return "其它地点";
  1764. return "";
  1765. }
  1766. function getLocalOther(local, localOther) {
  1767. if (local == 0)
  1768. return "";
  1769. else if (local == 1)
  1770. return "武汉市";
  1771. else if (local == 2)
  1772. return "宜昌市";
  1773. else if (local == 3)
  1774. return "当阳市";
  1775. else if (local == 4)
  1776. return "其它地点_" + localOther;
  1777. return "";
  1778. }
  1779. function getTripType(tripType) {
  1780. if (tripType == 0)
  1781. return "";
  1782. else if (tripType == 1)
  1783. return "长途汽车";
  1784. else if (tripType == 2)
  1785. return "火车";
  1786. else if (tripType == 3)
  1787. return "飞机";
  1788. else if (tripType == 4)
  1789. return "自驾";
  1790. return "";
  1791. }
  1792. function getDiarrhea(diarrhea) {
  1793. if (diarrhea == 0)
  1794. return "无";
  1795. else if (diarrhea == 1)
  1796. return "轻度腹泻(少于3次)";
  1797. else if (diarrhea == 2)
  1798. return "中度腹泻(4-6次)";
  1799. else if (diarrhea == 3)
  1800. return "重度腹泻(超过6次)";
  1801. return "";
  1802. }
  1803. function clearShow() {
  1804. console.log("qingkong")
  1805. $("#suspectedId").val("");
  1806. $("#switchQuezhen").attr("data-values", "");
  1807. $("#switchQuezhen_zz").val("");
  1808. $("#switchQuezhen_zz").attr("data-values", "");
  1809. $("#switchDanjiangeli").val("");
  1810. $("#switchDanjiangeli").attr("data-values", "");
  1811. $("#js_input_user_tiwen").val("");
  1812. $("#js_input_user_kesou").val("");
  1813. $("#js_input_user_kesou").attr("data-values", "");
  1814. $("#js_input_user_jirou").val("");
  1815. $("#js_input_user_jirou").attr("data-values", "");
  1816. $("#js_input_user_huxi").val("");
  1817. $("#js_input_user_huxi").attr("data-values", "");
  1818. $("#js_input_user_fali").val("");
  1819. $("#js_input_user_fali").attr("data-values", "");
  1820. $("#js_input_user_fuxie").val("");
  1821. $("#js_input_user_fuxie").attr("data-values", "");
  1822. $("#shuruqita").val("");
  1823. $("#js_input_score_rezult").val("");
  1824. $("#js_input_score_rezult_value").val("");
  1825. $("#js_input_temperature_score").val("");
  1826. $("#js_input_score_histroy").val("");
  1827. $("#js_input_score").val("");
  1828. //出行
  1829. $("#js_input_gzzd").val("");
  1830. $("#js_input_gzzd").attr("data-values", "");
  1831. $("#js_input_qtdd").val("");
  1832. $("#js_input_jrszd").val("");
  1833. $("#js_input_jrszd").attr("data-values", "");
  1834. $("#js_input_jrszq").val("");
  1835. $("#js_input_sf").val(getIsTrip(0));
  1836. $("#js_input_sf").attr("data-values", 0);
  1837. $('#none')[0].style.display = 'none';
  1838. $("input[id='s18']").removeAttr("checked");
  1839. $("input[id='s19']").removeAttr("checked");
  1840. $("input[id='s20']").removeAttr("checked");
  1841. $("input[id='s21']").removeAttr("checked");
  1842. $("input[id='s22']").removeAttr("checked");
  1843. $("input[id='s28']").removeAttr("checked");
  1844. $("input[id='s29']").removeAttr("checked");
  1845. }
  1846. //健康评估
  1847. $('#ribao_score').on('click', function () {
  1848. var suspectedId = $("#suspectedId").val();
  1849. var userId = $("#userId").val();
  1850. var userName = $("#js_input_user_name").val();
  1851. var medical = $("input[name='radio']:checked").val() == undefined ? 0 : $("input[name='radio']:checked").val();
  1852. var medicalzz = $("#switchQuezhen_zz").attr("data-values") == undefined ? 0 : $("#switchQuezhen_zz").attr("data-values");
  1853. var temperature = $("#js_input_user_tiwen").val() == "" ? 0 : $("#js_input_user_tiwen").val();
  1854. var cough = $("#js_input_user_kesou").attr("data-values") == undefined ? 0 : $("#js_input_user_kesou").attr("data-values");
  1855. var muscle = $("#js_input_user_jirou").attr("data-values") == undefined ? 0 : $("#js_input_user_jirou").attr("data-values");
  1856. var dyspnea = $("#js_input_user_huxi").attr("data-values") == undefined ? 0 : $("#js_input_user_huxi").attr("data-values");
  1857. var fatigue = $("#js_input_user_fali").attr("data-values") == undefined ? 0 : $("#js_input_user_fali").attr("data-values");
  1858. var diarrhea = $("#js_input_user_fuxie").attr("data-values") == undefined ? 0 : $("#js_input_user_fuxie").attr("data-values");
  1859. if (userName == undefined || userName == '') {
  1860. $.alert("请填写姓名");
  1861. return;
  1862. }
  1863. if (temperature <= 0) {
  1864. $.alert("请填写体温");
  1865. return;
  1866. }
  1867. if (temperature > 50 || temperature < 30) {
  1868. $.alert("请填写正确的体温");
  1869. return;
  1870. }
  1871. $.ajax({
  1872. url: '/home/addScore',
  1873. type: "post",
  1874. data: {
  1875. "userName": userName,
  1876. "suspectedId": suspectedId,
  1877. "userCreate": userId,
  1878. "medical": medical,
  1879. "temperature": temperature,
  1880. "cough": cough,
  1881. "muscle": muscle,
  1882. "dyspnea": dyspnea,
  1883. "fatigue": fatigue,
  1884. "diarrhea": diarrhea,
  1885. },
  1886. success: function (data) {
  1887. if (data == undefined) {
  1888. $('#js_input_score_rezult').empty();
  1889. $('#js_input_score_rezult_value').empty();
  1890. $('#js_input_temperature_score').empty();
  1891. $('#js_input_score_histroy').empty();
  1892. $('#js_input_score').empty();
  1893. }
  1894. else {
  1895. $('#js_input_score_rezult').empty();
  1896. $('#js_input_temperature_score').empty();
  1897. $('#js_input_score_histroy').empty();
  1898. $('#js_input_score').empty();
  1899. var ScoreRezult = getScoreRezult(data.scoreRezult, data.temperatureScore);
  1900. $("#js_input_score_rezult").val(ScoreRezult);
  1901. $("#js_input_score_rezult_value").val(data.scoreRezult);
  1902. $("#js_input_temperature_score").val(data.temperatureScore);
  1903. $("#js_input_score_histroy").val(data.scoreHistory);
  1904. $("#js_input_score").val(data.score);
  1905. }
  1906. },
  1907. });
  1908. });
  1909. function getScoreRezult(scoreRezult, temperatureScore) {
  1910. if (scoreRezult == 0)
  1911. return "未评估";
  1912. else if (scoreRezult == 1) {
  1913. if (temperatureScore > 1)
  1914. return "正常,间隔时间服用退烧药,多休息,多喝水";
  1915. else
  1916. return "正常";
  1917. }
  1918. else if (scoreRezult == 2) {
  1919. if (temperatureScore > 1)
  1920. return "注意观察,间隔时间服用退烧药,多休息,多喝水";
  1921. else
  1922. return "注意观察";
  1923. }
  1924. else if (scoreRezult == 3)
  1925. return "联系社区医生(或者在线问诊)";
  1926. else if (scoreRezult == 4)
  1927. return "尽快就诊";
  1928. return "";
  1929. }