ribao.js 64 KB

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