ribao.js 65 KB

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