ribao.js 63 KB

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