ribao.js 64 KB

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