ribao.js 64 KB

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