ribao.js 63 KB

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