ribao.js 63 KB

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