12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789 |
- function ribao_init() {
- $.ajax({
- url: '/wx/jsApiConfig',
- type: "get",
- data: {
- "url": location.href.split('#')[0]
- },
- success: function (data) {
- wx.config({
- debug: false,
- appId: data.data.appId,
- timestamp: data.data.timestamp,
- nonceStr: data.data.nonceStr,
- signature: data.data.signature,
- jsApiList: [
- // 所有要调用的 API 都要加到这个列表中
- 'getLocation'
- ]
- });
- wx.ready(function () {
- wx.checkJsApi({
- jsApiList: [
- 'getLocation'
- ],
- success: function (res) {
- // alert(JSON.stringify(res));
- // alert(JSON.stringify(res.checkResult.getLocation));
- if (res.checkResult.getLocation == false) {
- alert('你的微信版本太低,不支持微信JS接口,请升级到最新的微信版本!');
- return;
- }
- // 获取定位
- getLocation();
- }
- });
- wx.error(function (res) {
- alert("接口调取失败")
- });
- });
- },
- });
- //lingyun
- $('#btnRB').on('click', function () {
- window.location.href = "/yeweihui/home.html";
- });
- $("#js_input_gzzd").select({
- title: "选择工作驻地",
- items: [
- {
- title: "武汉市",
- value: "1",
- },
- {
- title: "宜昌市",
- value: "2",
- },
- {
- title: "当阳市",
- value: "3",
- },
- {
- title: "其它地点",
- value: "4",
- }]
- });
- $("#js_input_jrszd").select({
- title: "选择今晚住地",
- items: [
- {
- title: "武汉市",
- value: "1",
- }, {
- title: "宜昌市",
- value: "2",
- },
- {
- title: "当阳市",
- value: "3",
- },
- {
- title: "其它地点",
- value: "4",
- }]
- });
- $("#js_input_sf").select({
- title: "",
- items: [
- {
- title: "否",
- value: "0",
- },
- {
- title: "是",
- value: "1",
- }]
- });
- $("#js_input_cfd").select({
- title: "选择出发地",
- items: [
- {
- title: "武汉市",
- value: "1",
- }, {
- title: "宜昌市",
- value: "2",
- },
- {
- title: "当阳市",
- value: "3",
- },
- {
- title: "其它地点",
- value: "4",
- }]
- });
- $("#js_input_mdd").select({
- title: "选择目的地",
- items: [
- {
- title: "武汉市",
- value: "1",
- }, {
- title: "宜昌市",
- value: "2",
- },
- {
- title: "当阳市",
- value: "3",
- },
- {
- title: "其它地点",
- value: "4",
- }]
- });
- $("#js_input_cxfs").select({
- title: "选择出行方式",
- items: [
- {
- title: "长途汽车",
- value: "1",
- },
- {
- title: "火车",
- value: "2",
- },
- {
- title: "飞机",
- value: "3",
- },
- {
- title: "自驾",
- value: "4",
- }]
- });
- // $("#js_input_user_sex").val(getGreder(2)); //设置初始值
- $('#btnRB').on('click', function () {
- window.location.href = "/yeweihui/home.html";
- });
- $("#js_input_user_sex").select({
- title: "选择性别",
- items: [
- {
- title: "男",
- value: "1",
- },
- {
- title: "女",
- value: "2",
- }]
- });
- var userStatus = [
- {
- title: "无病史",
- value: 0,
- },
- {
- title: "心脑血管疾病(服用ARB)",
- value: 1,
- },
- {
- title: "心脑血管疾病(未服ARB)",
- value: 2,
- },
- {
- title: "呼吸系统病史",
- value: 3,
- },
- {
- title: "肿瘤病史",
- value: 4,
- },
- {
- title: "糖尿病史",
- value: 5,
- },
- {
- title: "服用过激素药物",
- value: 6,
- },
- {
- title: "妊娠期",
- value: 7,
- }
- ];
- // $("#js_input_user_status").select({
- // title: "选择基本状况",
- // multi: true,
- // items: userStatus,
- // // onOpen:function (e) {
- // // var target = $("#js_input_user_status");
- // // console.log(target.data().values,userFamilyStatusStr,userFamilyStatus)
- // // target.val(userFamilyStatusStr);
- // // target.data('values',userFamilyStatus);
- // // console.log(target.data().values,userFamilyStatusStr,userFamilyStatus)
- // // }
- // // onChange:function(e){
- // // var selectStr = e.values
- // // if(!selectStr){
- // // $("#js_input_user_status").select('update',{
- // // multi: true,
- // // })
- // // }else {
- // // if(selectStr.indexOf('0')>-1){
- // // $("#js_input_user_status").select('update',{
- // // multi: false,
- // // })
- // // }else {
- // // $("#js_input_user_status").select('update',{
- // // multi: true,
- // // })
- // // }
- // // }
- // // // var target = $("#js_input_user_status");
- // // // console.log(target.data().values,userFamilyStatusStr,userFamilyStatus)
- // // console.log(e)
- // // },
- // beforeClose:function (e) {
- // if(e){
- // if(e.indexOf('0')>-1 && e.length>1){
- // $.toast("无病史不能与其他项同时被选中", "text");
- // return false
- // }else {
- // return true
- // }
- // }
- // }
- //
- // });
- // $("#js_input_user_crov19").select({
- // title: "选择基本状况",
- // items: [
- // {
- // title: "无",
- // value: "0",
- // },
- // {
- // title: "确诊",
- // value: "1",
- // },
- // {
- // title: "疑似",
- // value: "2",
- // },
- // {
- // title: "有接触史",
- // value: "3",
- // },
- // {
- // title: "解除隔离",
- // value: "4",
- // },
- // ],
- // });
- $("#js_input_user_xinguan").select({
- title: "选择新冠情况",
- items: [
- {
- title: "无",
- value: "0",
- },
- {
- title: "确诊",
- value: "1",
- },
- {
- title: "疑似",
- value: "2",
- },
- {
- title: "解除隔离",
- value: "3",
- }]
- });
- $("#js_input_user_kesou").select({
- title: "选择咳嗽情况",
- items: [
- {
- title: "无",
- value: "0",
- },
- {
- title: "偶有短暂咳嗽",
- value: "1",
- },
- {
- title: "咳嗽轻度影响生活",
- value: "2",
- },
- {
- title: "咳嗽严重影响生活",
- value: "3",
- }]
- });
- $("#js_input_user_jirou").select({
- title: "选择肌肉情况",
- items: [
- {
- title: "无",
- value: "0",
- },
- {
- title: "按压有",
- value: "1",
- },
- {
- title: "偶尔",
- value: "2",
- },
- {
- title: "持续有",
- value: "3",
- }]
- });
- $("#js_input_user_huxi").select({
- title: "选择呼吸情况",
- items: [
- {
- title: "无",
- value: "0",
- },
- {
- title: "急走或上坡气短",
- value: "1",
- },
- {
- title: "气短而走路变慢",
- value: "2",
- },
- {
- title: "走路数分钟后气短",
- value: "3",
- },
- {
- title: "气短无法离开房间",
- value: "4",
- }]
- });
- $("#js_input_user_fali").select({
- title: "选择乏力情况",
- items: [
- {
- title: "无",
- value: "0",
- },
- {
- title: "体力劳动后不能恢复",
- value: "1",
- },
- {
- title: "轻体力活非常累",
- value: "2",
- },
- {
- title: "不能正常生活",
- value: "3",
- }]
- });
- $("#js_input_user_fuxie").select({
- title: "选择腹泻情况",
- items: [
- {
- title: "无",
- value: "0",
- },
- {
- title: "轻度腹泻(少于3次)",
- value: "1",
- },
- {
- title: "中度腹泻(4-6次)",
- value: "2",
- },
- {
- title: "重度腹泻(超过6次)",
- value: "3",
- }]
- });
- // $("#switchQuezhen").select({
- // title: "选择是否确诊",
- // items: [
- // {
- // title: "否",
- // value: "0",
- // },
- // {
- // title: "是",
- // value: "1",
- // }]
- // });
- $("#switchQuezhen").select({
- title: "选择症状",
- items: [
- {
- title: "无",
- value: "0",
- },
- {
- title: "新冠确诊",
- value: "1",
- },
- {
- title: "新冠疑似",
- value: "2",
- },
- {
- title: "密切接触者",
- value: "3",
- },
- {
- title: "解除观察",
- value: "4",
- }]
- });
- $("#switchDanjiangeli").select({
- title: "选择是否单间隔离",
- items: [
- {
- title: "否",
- value: "0",
- },
- {
- title: "是",
- value: "1",
- }]
- });
- //
- // updateSuspected({
- // userName : 'www',
- // grender : 2,
- // age : 34,
- // familyStatus : 1,
- // statusDesp : "",
- // medical:0,
- // singleRoom:1,
- // temperature:0,
- // cough:2,
- // muscle:1,
- // dyspnea:1,
- // fatigue:1,
- // diarrhea:2,
- // others:""
- // })
- //
- // var grender = $("#js_input_user_sex").attr("data-values") == undefined ? 0 : $("#js_input_user_sex").attr("data-values");
- // console.log("grender:" + grender)
- initRadioEvent()
- }
- function selectinput1(obj) {
- var grender = $("#js_input_gzzd").attr("data-values") == undefined ? 0 : $("#js_input_gzzd").attr("data-values");
- if (grender != 4) {//js_input_qtdd
- // $('#js_input_qtdd')[0].disabled == 'disabled'+
- +
- $("#js_input_qtdd").val("");
- } else {
- $('#js_input_qtdd').removeAttr("disabled")
- }
- }
- function selectinput2(obj) {
- var grender = $("#js_input_jrszd").attr("data-values") == undefined ? 0 : $("#js_input_jrszd").attr("data-values");
- if (grender != 4) {//js_input_qtdd
- // $('#js_input_qtdd')[0].disabled == 'disabled' js_input_jrszq
- $('#js_input_jrszq').attr("disabled", "disabled");
- $("#js_input_jrszq").val("");
- } else {
- $('#js_input_jrszq').removeAttr("disabled")
- }
- }
- function selectinput3(obj) {
- var grender = $("#js_input_cfd").attr("data-values") == undefined ? 0 : $("#js_input_cfd").attr("data-values");
- if (grender != 4) {
- $('#js_input_cfdq').attr("disabled", "disabled");
- $("#js_input_cfdq").val("");
- } else {
- $('#js_input_cfdq').removeAttr("disabled")
- }
- }
- function selectinput4(obj) {
- var grender = $("#js_input_mdd").attr("data-values") == undefined ? 0 : $("#js_input_mdd").attr("data-values");
- if (grender != 4) {
- $('#js_input_mddq').attr("disabled", "disabled");
- $("#js_input_mddq").val("");
- } else {
- $('#js_input_mddq').removeAttr("disabled")
- }
- }
- function selectinput5(obj) {
- var grender = $("#js_input_cxfs").attr("data-values") == undefined ? 0 : $("#js_input_cxfs").attr("data-values");
- if (grender == 4) {
- // $('#js_input_cxfsq').attr("disabled","disabled")
- } else {
- $('#js_input_cxfsq').removeAttr("disabled")
- }
- }
- var listcx = [];
- function selectinput6(obj) {
- var grender = $("#js_input_sf").attr("data-values") == undefined ? 3 : $("#js_input_sf").attr("data-values");
- if (grender == 0) {
- $('#none')[0].style.display = 'none';
- $("#js_input_cfd").val("");
- $("#js_input_cfd").attr("data-values", "");
- $("#js_input_mdd").val("");
- $("#js_input_mdd").attr("data-values", "");
- $("#js_input_cxfs").val("");
- $("#js_input_cxfs").attr("data-values", "");
- $('#js_input_cxfsq').val("");
- $('#js_input_cfdq').val("");
- $('#js_input_mddq').val("");
- listcx.splice(0, listcx.length);
- $('#tabtr').empty();
- } else if (grender == 1) {
- $('#none')[0].style.display = '';
- }
- }
- function resetTravelState(bool) {
- if (bool) {
- $('#none').hide('fast');
- $("#js_input_cfd").val("");
- $("#js_input_cfd").attr("data-values", "");
- $("#js_input_mdd").val("");
- $("#js_input_mdd").attr("data-values", "");
- $("#js_input_cxfs").val("");
- $("#js_input_cxfs").attr("data-values", "");
- $('#js_input_cxfsq').val("");
- $('#js_input_cfdq').val("");
- $('#js_input_mddq').val("");
- listcx.splice(0, listcx.length);
- $('#tabtr').empty();
- } else {
- $('#none').show('fast');
- }
- }
- //添加出行详情
- function insertlingyun() {
- // var sf = $("#js_input_sf").attr("data-values") == undefined ? 3 : $("#js_input_sf").attr("data-values");
- // if (sf == 0 || sf == 3) {
- // cantijiao = true;
- // $.alert("请选择是否出行");
- // return;
- // }
- if($("#js_input_cfd").attr("data-values") == undefined){
- cantijiao = true;
- $.alert("请选择出发地");
- return;
- }
- if($("#js_input_mdd").attr("data-values") == undefined){
- cantijiao = true;
- $.alert("请选择目的地");
- return;
- }
- if($("#js_input_cxfs").attr("data-values") == undefined){
- cantijiao = true;
- $.alert("请选择出行方式");
- return;
- }
- var person = new Object();
- var cxfs = $("#js_input_cxfs").attr("data-values") == undefined ? 0 : $("#js_input_cxfs").attr("data-values");
- var jrszd = $("#js_input_jrszd").attr("data-values") == undefined ? 0 : $("#js_input_jrszd").attr("data-values");
- var cfd = $("#js_input_cfd").attr("data-values") == undefined ? 0 : $("#js_input_cfd").attr("data-values");
- var mdd = $("#js_input_mdd").attr("data-values") == undefined ? 0 : $("#js_input_mdd").attr("data-values");
- var jrszq = $('#js_input_jrszq').val();
- var mddq = $('#js_input_mddq').val();
- var cfdq = $('#js_input_cfdq').val();
- // if (mdd != jrszd) {
- // cantijiao = true;
- // $.alert("目的地与今晚住地不一致");
- // return;
- // }
- // if (jrszq != mddq) {
- // cantijiao = true;
- // $.alert("目的地与今晚住地不一致");
- // return;
- // }
- if (cfd == 4 && mdd == 4) {
- if (mddq == cfdq) {
- cantijiao = true;
- $.alert("出发地与目的地不能一致");
- return;
- }
- } else if (cfd != 4 || mdd != 4) {
- if (cfd == mdd) {
- cantijiao = true;
- $.alert("出发地与目的地不能一致");
- return;
- }
- }
- var cxfsq = $('#js_input_cxfsq').val();
- for (var i = 0; i < listcx.length; i++) {
- 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) {
- cantijiao = true;
- $.alert("此行程已添加");
- return;
- }
- }
- if (cxfs != 4 && cxfs != 0) {
- var val = $('#js_input_cxfsq').val();
- if (val == "") {
- cantijiao = true;
- $.alert("请填写车次/航班/车牌");
- return;
- }
- person.tripTypeDesp = $('#js_input_cxfsq').val();
- if (cxfs == 1) {
- person.tripType = 1;
- person.tripTypeStr = "长途汽车"
- } else if (cxfs == 2) {
- person.tripType = 2;
- person.tripTypeStr = "火车";
- } else if (cxfs == 3) {
- person.tripType = 3;
- person.tripTypeStr = "飞机";
- }
- } else if (cxfs == 0) {
- cantijiao = true;
- $.alert("请选择出行方式");
- return;
- } else if (cxfs == 4) {
- var val6 = $('#js_input_cxfsq').val();
- if (val6 == "") {
- cantijiao = true;
- $.alert("请填写车次/航班/车牌");
- return;
- }
- person.tripTypeStr = "自驾";
- person.tripType = 4;
- person.tripTypeDesp = $('#js_input_cxfsq').val();
- }
- if (cfd == 4 && cfd != 0) {
- var val2 = $('#js_input_cfdq').val();
- if (val2 == "") {
- cantijiao = true;
- $.alert("请填写出发地");
- return;
- }
- person.startLocal = 4;
- person.startLocalOther = $('#js_input_cfdq').val();
- person.startLocalStr = "其它地点_" + $('#js_input_cfdq').val();
- } else if (cfd != 4 && cfd != 0) {
- if (cfd == 1) {
- person.startLocal = 1;
- person.startLocalStr = "武汉市";
- person.startLocalOther = $('#js_input_cfdq').val() == undefined ? "" : $('#js_input_cfdq').val();
- } else if (cfd == 2) {
- person.startLocal = 2;
- person.startLocalStr = "宜昌市";
- person.startLocalOther = $('#js_input_cfdq').val() == undefined ? "" : $('#js_input_cfdq').val();
- } else if (cfd == 3) {
- person.startLocal = 3;
- person.startLocalStr = "当阳市";
- person.startLocalOther = $('#js_input_cfdq').val() == undefined ? "" : $('#js_input_cfdq').val();
- }
- } else if (cfd == 0) {
- cantijiao = true;
- $.alert("请选择出发地");
- return;
- }
- if (mdd == 4 && mdd != 0) {
- var val3 = $('#js_input_mddq').val();
- if (val3 == "") {
- cantijiao = true;
- $.alert("请填写目的地");
- return;
- }
- person.endLocal = 4;
- person.endLocalOther = $('#js_input_mddq').val();
- person.endlocalStr = "其它地点_" + $('#js_input_mddq').val();
- } else if (mdd != 4 && mdd != 0) {
- if (mdd == 1) {
- person.endLocal = 1;
- person.endlocalStr = "武汉市";
- person.endLocalOther = $('#js_input_mddq').val() == undefined ? "" : $('#js_input_mddq').val();
- } else if (mdd == 2) {
- person.endLocal = 2;
- person.endlocalStr = "宜昌市";
- person.endLocalOther = $('#js_input_mddq').val() == undefined ? "" : $('#js_input_mddq').val();
- } else if (mdd == 3) {
- person.endLocal = 3;
- person.endlocalStr = "当阳市";
- person.endLocalOther = $('#js_input_mddq').val() == undefined ? "" : $('#js_input_mddq').val();
- }
- } else if (mdd == 0) {
- cantijiao = true;
- $.alert("请选择目的地");
- return;
- }
- listcx.push(person);
- // $.alert("添加成功");
- tab()
- }
- function tab() {
- var xxIds = [];
- var xxName = [
- "序号",
- "出发地",
- "目的地",
- "出行方式",
- "车次/航班/车牌",
- "操作"
- ];
- for (var i = 0; i < xxName.length; i++) {
- xxIds.push({
- name: xxName[i]
- });
- }
- $('#tabtr').empty();
- var html = "<tr style='background-color: #f8f8f8;'>";
- for (var i = 0; i < xxIds.length; i++) {
- // alert(xxIds[i].name);
- html += "<th>" + xxIds[i].name + "</th>";
- }
- html += "</tr>"
- for (var i = 0; i < listcx.length; i++) {//后端传过来的集合遍历
- if (i % 2 != 0) {
- html += "<tr style='background-color: #f8f8f8;'>";
- }
- else {
- html += "<tr>";
- }
- html += "<td style='text-align: center;'>" + (i + 1) + "</td>";
- // var isValue = false; //记录是否赋值
- html += "<td style='text-align: center;' >" + listcx[i].startLocalStr + " </td>";
- html += "<td style='text-align: center;' >" + listcx[i].endlocalStr + " </td>";
- html += "<td style='text-align: center;' >" + listcx[i].tripTypeStr + " </td>";
- html += "<td style='text-align: center;' >" + listcx[i].tripTypeDesp + " </td>";
- html += "<td style='text-align: center;' ><button value=" + i + " style='height:30px;padding:0 10px;background-color: red;text-align: center;' class='weui-btn weui-btn_mini weui-btn_primary' onclick='splice(this.value)'>" + "删除" + " </button></td>";
- html += "</tr>";
- $("#tabtr").html(html);
- }
- }
- function splice(obj) {
- listcx.splice(obj, 1);
- tab()
- }
- function changeReportBtnState(list) {
- console.log(list)
- if(!list){
- $('#btn_shangbao').css({
- display: 'none'
- })
- $('#btnAdd').css({
- display: 'block'
- })
- }else {
- if(list.length){
- $('#btn_shangbao').css({
- display: 'block'
- })
- $('#btnAdd').css({
- display: 'none'
- })
- }else {
- $('#btn_shangbao').css({
- display: 'none'
- })
- $('#btnAdd').css({
- display: 'block'
- })
- }
- }
- }
- //首次近日报告
- function ribaoInitialization(reportId) {
- if (reportId == null)
- reportId = 0;
- var userId = $("#userId").val();
- $.ajax({
- url: '/home/home/queryRibaoRefresh',
- data: {
- reportId: reportId,
- userCreate: userId
- },
- type: 'GET',
- success: function (data) {
- if (data.data == undefined || data.data == "") {
- $('#rb_family').empty();
- document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
- canSahngbao = false;
- changeReportBtnState(data.data)
- }
- else {
- if (data.data.length > 0) {
- hasData = true;
- changeReportBtnState(data.data)
- // data.data.forEach(function (v) {
- // ribao_cell(v);
- // });
- $.each(data.data,function (i,v) {
- ribao_cell(v);
- })
- }else {
- changeReportBtnState(data.data)
- }
- }
- },
- error: function () {
- }
- });
- }
- //刷新今日日报
- function ribao_refrash() {
- var userId = $("#userId").val();
- $.ajax({
- url: '/home/home/queryRibao',
- data: {
- userCreate: userId
- },
- type: 'GET',
- success: function (data) {
- if (data.data == undefined || data.data == "") {
- $('#rb_family').empty();
- document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
- changeReportBtnState(data.data)
- }
- else {
- $('#rb_family').empty();
- if (data.data.length > 0) {
- changeReportBtnState(data.data)
- hasData = true;
- // data.data.forEach(function (v) {
- // ribao_cell(v);
- // });
- $.each(data.data,function (i,v) {
- ribao_cell(v);
- })
- } else {
- changeReportBtnState(data.data)
- }
- }
- },
- error: function () {
- }
- });
- }
- function ribao_cell(v) {
- //console.log(v,'vvvvvvvvvvvvv')
- var userName = v.userName;
- var grender = getGreder(v.grender);
- var age = v.age;
- var familyStatus = "";
- // if (v.familyStatus != 0)
- // familyStatus = getFamilyStatus(v.familyStatus) + ";";
- var medical = "本人身体情况:" + getMedical(v.medical) + ";<br/>";
- var isContact = "";
- if (v.isContact != 0)
- isContact = "密切接触人员(含家庭成员)有新冠肺炎或有1月25日以来中高风险地区旅居史:" + getIsContact(v.isContact) + ";<br/>";
- var isSuspected = "";
- if (v.isSuspected != 0)
- isSuspected = "近期接触的家庭成员中有感冒、发热、咳嗽等症状:" + getIsContact(v.isContact) + ";<br/>";
- var isContactHistory = '';
- if(!isContact && !isSuspected){
- isContactHistory = "家庭成员情况:正常;<br/>";
- }
- var singleRoom = "";
- var uptownId = $("#uptownId").val();
- if (uptownId != xiaoquId && uptownId != ceshixiaoquId) {
- if (v.singleRoom != 0)
- singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";<br/>";
- if (v.singleRoom == 0 && v.medical != 0)
- singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";<br/>";
- }
- var tempTemperature = v.temperature>37.2?'异常,'+v.temperature+'度':'正常,37.2度以下';
- var temperature = "体温:" + tempTemperature + ";<br/>";
- var cough = "";
- if (v.cough != 0)
- cough = "咳嗽现象:" + getCough(v.cough) + ";<br/>";
- var muscle = "";
- if (v.muscle != 0)
- muscle = "肌肉酸痛:" + getMuscle(v.muscle) + ";<br/>";
- var dyspnea = "";
- if (v.dyspnea != 0)
- dyspnea = "呼吸困难:" + getDyspnea(v.dyspnea) + ";<br/>";
- var fatigue = "";
- if (v.fatigue != 0)
- fatigue = "乏力现象:" + getFatigue(v.fatigue) + ";<br/>";
- var diarrhea = "";
- if (v.diarrhea != 0)
- diarrhea = "腹泻现象:" + getDiarrhea(v.diarrhea) + ";<br/>";
- var others = "";
- if (v.others != "")
- others = "其他描述:" + v.others + ";<br/>";
- var scoreRezult = "";
- if (v.scoreRezult != 0)
- scoreRezult = "评估结果:" + getScoreRezult(v.scoreRezult, v.temperatureScore) + ";<br/>";
- var workLocal = "";
- var todayLocal = "";
- var isTrip = "";
- var tripDet = "";
- if (uptownId == xiaoquId || uptownId == ceshixiaoquId) {
- // if (v.workLocal != 0) {
- // if (v.workLocal < 4)
- // workLocal = "工作驻地:" + getLocal(v.workLocal) + ";";
- // else
- // workLocal = "工作驻地:其它地点_" + v.workLocalOther + ";";
- // }
- //
- // if (v.todayLocal != 0) {
- // if (v.todayLocal < 4)
- // todayLocal = "今晚住地:" + getLocal(v.todayLocal) + ";";
- // else
- // todayLocal = "今晚住地:其它地点_" + v.todayLocalOther + ";";
- // }
- if (v.isTrip != undefined)
- isTrip = "有无离开工作驻地:" + getIsTrip(v.isTrip) + ";<br/>"
- if (v.tripDet != undefined)
- tripDet = "出行详细:" + v.tripDet + ";<br/>"
- }
- // $('#rb_family').append($('<div class="weui-media-box weui-media-box_text" style="height: auto">\n' +
- // ' <h4 class="weui-media-box__title">' + userName + ' ' + grender + ' ' + age + ' <a style="color: #bc4246" onclick=\'deleteSuspected(' + JSON.stringify(v.suspectedId) + ')\'>删除</a>\n' +
- // ' <a style="color: #2a62bc" onclick=\'updateSuspected(' + JSON.stringify(v.suspectedId) + ')\'>修改上报</a></h4>\n' +
- // ' <div style="height: auto">' + familyStatus + medical + isContact + isSuspected + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + scoreRezult + workLocal + todayLocal + isTrip + tripDet + '</>\n' +
- // ' </div>\n' +
- // ' '));
- $('#rb_family').append($('<div class="weui-form-preview">\n' +
- ' <div class="weui-form-preview__hd">\n' +
- ' <label class="weui-form-preview__label">员工</label>\n' +
- ' <em class="weui-form-preview__value">'+userName + ' ' + grender + ' ' + age + ' ' +
- ' </em>\n' +
- ' </div>\n' +
- ' <div class="weui-form-preview__bd">\n' +
- ' <div class="weui-form-preview__item">\n' +
- ' <label class="weui-form-preview__label">基本情况</label>\n' +
- ' <span class="weui-form-preview__value" style="text-align: left;">'+ temperature + familyStatus + medical + singleRoom + cough + muscle + dyspnea + fatigue + diarrhea + others + isContactHistory + isContact + isSuspected + scoreRezult + workLocal + todayLocal + isTrip + tripDet+'</span>\n' +
- ' </div>\n' +
- ' </div>\n' +
- ' <div class="weui-form-preview__ft">\n' +
- ' <a class="weui-form-preview__btn weui-form-preview__btn_default" style="color: #bc4246" href="javascript:" onclick=\'deleteSuspected(' + JSON.stringify(v.suspectedId) + ')\'>删除</a>\n' +
- ' <button class="weui-form-preview__btn weui-form-preview__btn_primary" style="color:#2a62bc" href="javascript:" onclick=\'updateSuspected(' + JSON.stringify(v.suspectedId) + ')\'>修改上报</button>\n' +
- ' </div>\n' +
- '</div>'));
- }
- function ribao_add() {
- $('#btnAdd').on('click', function () {
- // userFamilyStatus = '';
- // userFamilyStatusStr = '';
- if ($('#ribao')[0].style.display == 'none') {
- $('#notOpenRibao').toggle();
- $('#ribao')[0].style.display = '';
- } else {
- $('#notOpenRibao')[0].style.display = '';
- $('#ribao')[0].style.display = 'none';
- }
- //基本情况
- // $("input[name='checkbox1']").removeAttr("checked");
- // $("input[name='checkbox2']").removeAttr("checked");
- // $("input[name='checkbox3']").removeAttr("checked");
- // $("input[name='checkbox4']").removeAttr("checked");
- // $("input[name='checkbox5']").removeAttr("checked");
- // $("input[name='checkbox6']").removeAttr("checked");
- // $("input[name='checkbox7']").removeAttr("checked");
- $("#js_input_user_sex").val('男');
- $("#js_input_user_sex").attr("data-values", 1);
- // $("#js_input_user_status").val('');
- // $("#js_input_user_status").attr("data-values", '');
- // $("#js_input_user_crov19").val('无');
- // $("#js_input_user_crov19").attr("data-values", 0);
- $("input[id='s18']").prop("checked", "checked");
- $("input[id='s28']").prop("checked", "checked");
- $("input[id='s38']").prop("checked", "checked");
- $("input[id='s40']").prop("checked", "checked");
- $("input[id='s50']").prop("checked", "checked");
- $("input[id='s60']").prop("checked", "checked");
- $("#switchQuezhen").val(getMedical(0));
- $("#switchQuezhen").attr("data-values", 0);
- $("#switchDanjiangeli").val(getSingleRoom(0));
- $("#switchDanjiangeli").attr("data-values", 0);
- $("#js_input_user_tiwen").val(36.5);
- $("#js_input_user_xinguan").val(getXinguan(0));
- $("#js_input_user_xinguan").attr("data-values", 0);
- $("#js_input_user_kesou").val(getCough(0));
- $("#js_input_user_kesou").attr("data-values", 0);
- $("#js_input_user_jirou").val(getMuscle(0));
- $("#js_input_user_jirou").attr("data-values", 0);
- $("#js_input_user_huxi").val(getDyspnea(0));
- $("#js_input_user_huxi").attr("data-values", 0);
- $("#js_input_user_fali").val(getFatigue(0));
- $("#js_input_user_fali").attr("data-values", 0);
- $("#js_input_user_fuxie").val(getDiarrhea(0));
- $("#js_input_user_fuxie").attr("data-values", 0);
- $("#shuruqita").val('');
- $("#js_input_sf").val(getIsTrip(0));
- $("#js_input_sf").attr("data-values", 0);
- $('#none')[0].style.display = 'none';
- $('#tabtr').empty();
- // $("#suspectedId").val("");
- // $("#js_input_gzzd").val("");
- // $("#js_input_jrszd").val("");
- // $('#js_input_mddq').attr("disabled","disabled");
- // $('#js_input_jrszq').attr("disabled","disabled");
- // $('#js_input_qtdd').attr("disabled","disabled");
- // $('#js_input_cfdq').attr("disabled","disabled");
- // var userId = $("#userId").val();
- // //获取用户家人
- // $.ajax({
- // url: '/home/selectAddSuspected',
- // get: "get",
- // data: {
- // "userCreate": userId
- // },
- // success: function (data) {
- // if (data != null || data != '') {
- // //存在
- // var suspected = data;
- // $("#js_input_user_sex").val(getGreder(suspected.grender));
- // $("#js_input_user_sex").attr("data-values", suspected.grender);
- // $("#js_input_user_name").val(suspected.userName);
- // $("#js_input_user_age").val(suspected.age);
- // //基本情况
- // if (suspected.familyStatus != "") {
- // var familyStatusList = suspected.familyStatus.split(",");
- // if (familyStatusList[0] == 1)
- // $("input[name='checkbox1']").prop("checked", "checked");
- // else
- // $("input[name='checkbox1']").removeAttr("checked");
- // if (familyStatusList[1] == 1)
- // $("input[name='checkbox2']").prop("checked", "checked");
- // else
- // $("input[name='checkbox2']").removeAttr("checked");
- // if (familyStatusList[2] == 1)
- // $("input[name='checkbox3']").prop("checked", "checked");
- // else
- // $("input[name='checkbox3']").removeAttr("checked");
- // if (familyStatusList[3] == 1)
- // $("input[name='checkbox4']").prop("checked", "checked");
- // else
- // $("input[name='checkbox4']").removeAttr("checked");
- // if (familyStatusList[4] == 1)
- // $("input[name='checkbox5']").prop("checked", "checked");
- // else
- // $("input[name='checkbox5']").removeAttr("checked");
- // if (familyStatusList[5] == 1)
- // $("input[name='checkbox6']").prop("checked", "checked");
- // else
- // $("input[name='checkbox6']").removeAttr("checked");
- // if (familyStatusList[6] == 1)
- // $("input[name='checkbox7']").prop("checked", "checked");
- // else
- // $("input[name='checkbox7']").removeAttr("checked");
- //
- // }
- //
- // $("#switchQuezhen").val(getMedical(suspected.medical));
- // $("#switchQuezhen").attr("data-values", suspected.medical);
- //
- // $("#switchDanjiangeli").val(getSingleRoom(suspected.singleRoom));
- // $("#switchDanjiangeli").attr("data-values", suspected.singleRoom);
- //
- // $("#js_input_user_tiwen").val(suspected.temperature);
- //
- // $("#js_input_user_kesou").val(getCough(suspected.cough));
- // $("#js_input_user_kesou").attr("data-values", suspected.cough);
- //
- // $("#js_input_user_jirou").val(getMuscle(suspected.muscle));
- // $("#js_input_user_jirou").attr("data-values", suspected.muscle);
- //
- // $("#js_input_user_huxi").val(getDyspnea(suspected.dyspnea));
- // $("#js_input_user_huxi").attr("data-values", suspected.dyspnea);
- //
- // $("#js_input_user_fali").val(getFatigue(suspected.fatigue));
- // $("#js_input_user_fali").attr("data-values", suspected.fatigue);
- //
- // $("#js_input_user_fuxie").val(getDiarrhea(suspected.diarrhea));
- // $("#js_input_user_fuxie").attr("data-values", suspected.diarrhea);
- //
- // $("#shuruqita").val(suspected.others);
- // $("#js_input_score_rezult").val(getScoreRezult(suspected.scoreRezult, suspected.temperatureScore));
- // $("#js_input_score_rezult_value").val(suspected.scoreRezult);
- // $("#js_input_temperature_score").val(suspected.temperatureScore);
- // $("#js_input_score_histroy").val(suspected.scoreHistroy);
- // $("#js_input_score").val(suspected.score);
- //
- // $("#js_input_sf").val(getIsTrip(0));
- // $("#js_input_sf").attr("data-values", 0);
- // $('#none')[0].style.display = 'none';
- // }
- // else {
- // //基本情况
- // $("input[name='checkbox1']").removeAttr("checked");
- // $("input[name='checkbox2']").removeAttr("checked");
- // $("input[name='checkbox3']").removeAttr("checked");
- // $("input[name='checkbox4']").removeAttr("checked");
- // $("input[name='checkbox5']").removeAttr("checked");
- // $("input[name='checkbox6']").removeAttr("checked");
- // $("input[name='checkbox7']").removeAttr("checked");
- //
- // $("#switchQuezhen").val(getMedical(0));
- // $("#switchQuezhen").attr("data-values", 0);
- //
- // $("#switchDanjiangeli").val(getSingleRoom(0));
- // $("#switchDanjiangeli").attr("data-values", 0);
- //
- // $("#js_input_user_tiwen").val(0);
- //
- // $("#js_input_user_kesou").val(getCough(0));
- // $("#js_input_user_kesou").attr("data-values", 0);
- //
- // $("#js_input_user_jirou").val(getMuscle(0));
- // $("#js_input_user_jirou").attr("data-values", 0);
- //
- // $("#js_input_user_huxi").val(getDyspnea(0));
- // $("#js_input_user_huxi").attr("data-values", 0);
- //
- // $("#js_input_user_fali").val(getFatigue(0));
- // $("#js_input_user_fali").attr("data-values", 0);
- //
- // $("#js_input_user_fuxie").val(getDiarrhea(0));
- // $("#js_input_user_fuxie").attr("data-values", 0);
- //
- //
- // // $("#js_input_cxfs").empty();
- // // $("#js_input_cfd").empty();
- // // $("#js_input_mdd").empty();
- // // $('#js_input_cxfsq').val("");
- // // $('#js_input_cfdq').val("");
- // // $('#js_input_mddq').val("");
- // // listcx.splice(0,listcx.length);
- // // $('#tabtr').empty();
- // // $("#js_input_qtdd").val("");
- // // $("#js_input_jrszq").val("");
- // // $("#js_input_sf").val("");
- // $("#js_input_sf").val(getIsTrip(0));
- // $("#js_input_sf").attr("data-values", 0);
- // $('#none')[0].style.display = 'none';
- // $('#tabtr').empty();
- // // $("#suspectedId").val("");
- // // $("#js_input_gzzd").val("");
- // // $("#js_input_jrszd").val("");
- // // $('#js_input_mddq').attr("disabled","disabled");
- // // $('#js_input_jrszq').attr("disabled","disabled");
- // // $('#js_input_qtdd').attr("disabled","disabled");
- // // $('#js_input_cfdq').attr("disabled","disabled");
- //
- // }
- // },
- // });
- getLocation()
- });
- }
- function tt() {
- alert($("input[name='radio']:checked").val())
- }
- function ribao_cancel() {
- $('#cancel').on('click', function () {
- listcx.splice(0, listcx.length);
- $('#tabtr').empty();
- $("#js_input_cfd").val("");
- $("#js_input_cfd").attr("data-values", "");
- $("#js_input_mdd").val("");
- $("#js_input_mdd").attr("data-values", "");
- $("#js_input_cxfs").val("");
- $("#js_input_cxfs").attr("data-values", "");
- $("#js_input_gzzd").val("");
- $("#js_input_gzzd").attr("data-values", "");
- $("#js_input_jrszd").val("");
- $("#js_input_jrszd").attr("data-values", "");
- $("#js_input_sf").val("");
- $("#js_input_sf").attr("data-values", "");
- $("#js_input_qtdd").val("");
- $("#js_input_jrszq").val("");
- $("#js_input_cfdq").val("");
- $("#js_input_mddq").val("");
- $("#js_input_cxfsq").val("");
- if ($('#ribao')[0].style.display == 'none') {
- $('#notOpenRibao').toggle();
- $('#ribao')[0].style.display = '';
- } else {
- $('#notOpenRibao')[0].style.display = '';
- $('#ribao')[0].style.display = 'none';
- }
- clearShow();
- });
- }
- function filterUserStatus(values) {
- if(!values) return []
- return values.split(',')
- }
- function ribaoCommit() {
- if (cantijiao == false) {
- return
- }
- cantijiao = false
- // //判断是否获取到定位
- var hrefs = location.href
- if(!/http:\/\/127\.0\.0\.1/.test(hrefs)){
- if (longitude == '' && latitude =='') {
- cantijiao = true;
- $.alert("请检查是否开启手机定位和微信定位");
- return;
- }
- }
- if (listcx.length > 0 && autoLocal == "") {
- autoLocal = listcx[0].endlocalStr
- }
- // if (autoLocal == '') {
- // cantijiao = true;
- // $.alert("请先设置微信获取当前位置");
- // return;
- // }
- //var sf = $("#js_input_sf").attr("data-values") == undefined ? 3 : $("#js_input_sf").attr("data-values");
- var sf = $("input[name=radio4]:checked").val()
- if (listcx.length == 0 && sf == 1) {
- cantijiao = true;
- $.alert("请添加出行信息");
- return;
- }
- if (oldAutoLocal != "" && autoLocal != "" && oldAutoLocal != autoLocal && sf == 0) {
- $.alert("请先确定是否出行");
- return;
- }
- var suspectedId = $("#suspectedId").val();
- var userId = $("#userId").val();
- var userName = $("#js_input_user_name").val();
- var grender = $("#js_input_user_sex").attr("data-values") == undefined ? 0 : $("#js_input_user_sex").attr("data-values");
- var age = $("#js_input_user_age").val();
- // var userStatus = filterUserStatus($("#js_input_user_status").data().values)
- var userStatus = []
- // //不能同时选择服用和未服用
- // if (userStatus.indexOf('1')>-1 && userStatus.indexOf('2')>-1) {
- // cantijiao = true;
- // $.alert("心脑血管不能同时选择服用和未服用");
- // return;
- // }
- // //男性不能选择妊娠期
- // if ($("#js_input_user_sex").attr("data-values") == 1 && userStatus.indexOf('7')>-1) {
- // cantijiao = true;
- // $.alert("男性不能选择妊娠期");
- // return;
- // }
- //家庭状态
- var familyStatus = "";
- if(!userStatus.length){
- familyStatus += '0,0,0,0,0,0,0'
- }else {
- if (userStatus.indexOf('1')>-1)
- familyStatus += "1";
- else
- familyStatus += "0";
- if (userStatus.indexOf('2')>-1)
- familyStatus += ",1";
- else
- familyStatus += ",0";
- if (userStatus.indexOf('3')>-1)
- familyStatus += ",1";
- else
- familyStatus += ",0";
- if (userStatus.indexOf('4')>-1)
- familyStatus += ",1";
- else
- familyStatus += ",0";
- if (userStatus.indexOf('5')>-1)
- familyStatus += ",1";
- else
- familyStatus += ",0";
- if (userStatus.indexOf('6')>-1)
- familyStatus += ",1";
- else
- familyStatus += ",0";
- if (userStatus.indexOf('7')>-1)
- familyStatus += ",1";
- else
- familyStatus += ",0";
- }
- // var medical = $("#js_input_user_crov19").data().values;
- var medical = $("input[name='radio']:checked").val();
- if (medical == undefined) {
- cantijiao = true;
- $.alert("请选择本人身体情况");
- return;
- }
- var medicalState = $("#js_input_user_xinguan").data().values;
- if(medical == 1){
- if(medicalState == undefined){
- cantijiao = true;
- $.alert("请选择本人身体情况");
- return;
- }
- }
- var isContact = $("input[name='radio1']:checked").val();
- if (isContact == undefined) {
- cantijiao = true;
- $.alert("密切接触人员(含家庭成员)有新冠肺炎或有1月25日以来中高风险地区旅居史");
- return;
- }
- var isSuspected = $("input[name='radio2']:checked").val();
- if (isSuspected == undefined) {
- isSuspected = true;
- $.alert("请选择近期接触的家庭成员中有感冒、发热、咳嗽等症状");
- return;
- }
- //var familyStatus = $("#js_input_user_status").attr("data-values") == undefined ? 0 : $("#js_input_user_status").attr("data-values");
- //var statusDesp = $("#jibenmiaoshu").val() == undefined ? "" : $("#jibenmiaoshu").val();
- var statusDesp = "";
- // var medical = $("#switchQuezhen").attr("data-values") == undefined ? 0 : $("#switchQuezhen").attr("data-values");
- var medicalzz = $("#switchQuezhen_zz").attr("data-values") == undefined ? 0 : $("#switchQuezhen_zz").attr("data-values");
- var singleRoom = $("#switchDanjiangeli").attr("data-values") == undefined ? 0 : $("#switchDanjiangeli").attr("data-values");
- var temperature = $("#js_input_user_tiwen").val() == "" ? 0 : $("#js_input_user_tiwen").val();
- var cough = $("#js_input_user_kesou").attr("data-values") == undefined ? 0 : $("#js_input_user_kesou").attr("data-values");
- var muscle = $("#js_input_user_jirou").attr("data-values") == undefined ? 0 : $("#js_input_user_jirou").attr("data-values");
- var dyspnea = $("#js_input_user_huxi").attr("data-values") == undefined ? 0 : $("#js_input_user_huxi").attr("data-values");
- var fatigue = $("#js_input_user_fali").attr("data-values") == undefined ? 0 : $("#js_input_user_fali").attr("data-values");
- var diarrhea = $("#js_input_user_fuxie").attr("data-values") == undefined ? 0 : $("#js_input_user_fuxie").attr("data-values");
- var others = $("#shuruqita").val() == undefined ? "" : $("#shuruqita").val();
- var scoreRezult = $("#js_input_score_rezult_value").val() == undefined ? "" : $("#js_input_score_rezult_value").val();
- var temperatureScore = $("#js_input_temperature_score").val() == undefined ? "" : $("#js_input_temperature_score").val();
- var scoreHistroy = $("#js_input_score_histroy").val() == undefined ? "" : $("#js_input_score_histroy").val();
- var score = $("#js_input_score").val() == undefined ? "" : $("#js_input_score").val();
- if (userName == undefined || userName == '') {
- cantijiao = true;
- $.alert("请填写姓名");
- return;
- }
- if (grender == 0) {
- cantijiao = true;
- $.alert("请填写性别");
- return;
- }
- if (age == undefined || age == '') {
- cantijiao = true;
- $.alert("请填写年龄");
- return;
- }
- if (age > 150 || age < 0) {
- cantijiao = true;
- $.alert("请填写正确的年龄");
- return;
- }
- if (temperature <= 0) {
- cantijiao = true;
- $.alert("请填写体温");
- return;
- }
- if (temperature > 50 || temperature < 30) {
- cantijiao = true;
- $.alert("请填写正确的体温");
- return;
- }
- if (temperature > 30 && temperature < 37.3) {
- $("#js_input_user_tiwen").hide();
- $("input[radio='s61']").removeAttr("checked");
- $("input[radio='s60']").prop("checked", "checked");
- }
- if(medical == 1 && medicalState == 0 && cough ==0 && muscle == 0 && dyspnea == 0 && fatigue == 0 && diarrhea == 0 && !others){
- $("input[id='s18']").prop("checked", "checked");
- $("input[id='s19']").removeAttr('checked');
- var ids = ['js_input_user_xinguan_view','js_input_user_kesou_view','js_input_user_jirou_view','js_input_user_huxi_view','js_input_user_fali_view','js_input_user_fuxie_view','shuruqita_view']
- // ids.forEach(iv=>{
- // $('#'+iv).hide()
- // })
- $.each(ids,function (i,v) {
- $('#'+v).hide()
- })
- medical = $("input[name='radio']:checked").val()
- }
- //如果是凌云
- var uptownId = $("#uptownId").val();
- if (uptownId == xiaoquId || uptownId == ceshixiaoquId) {
- //lingyun
- var gzzd = $("#js_input_gzzd").attr("data-values") == undefined ? 0 : $("#js_input_gzzd").attr("data-values");
- var qtdd = $("#js_input_qtdd").val();
- var workLocal = 0;
- var workLocalOther = "";
- // if (gzzd == 0) {
- // cantijiao = true;
- // $.alert("请选择工作驻地");
- // return;
- // } else if (gzzd == 4 && qtdd == "") {
- // cantijiao = true;
- // $.alert("请填写工作驻地");
- // return;
- // } else if (gzzd != 0 && gzzd != 4) {
- // if (gzzd == 1) {
- // workLocal = 1;
- // } else if (gzzd == 2) {
- // workLocal = 2;
- // } else if (gzzd == 3) {
- // workLocal = 3;
- // }
- // } else if (gzzd == 4 && qtdd != "") {
- // workLocal = 4;
- // workLocalOther = qtdd;
- // }
- //var listcx = [];
- //var person=new Object();
- var jrszd = $("#js_input_jrszd").attr("data-values") == undefined ? 0 : $("#js_input_jrszd").attr("data-values");
- var jrszq = $("#js_input_jrszq").val();
- var todyLocal = 0;
- var todyLocalOther = "";
- // if (jrszd == 0) {
- // cantijiao = true;
- // $.alert("请检查是否开启手机定位和微信定位");
- // //$.alert("请选择今晚住地");
- // return;
- // } else if (jrszd == 4 && jrszq == "") {
- // cantijiao = true;
- // $.alert("请检查是否开启手机定位和微信定位");
- // //$.alert("请填写今晚住地");
- // return;
- // } else if (jrszd != 0 && jrszd != 4) {
- // if (jrszd == 1) {
- // todyLocal = 1;
- // } else if (jrszd == 2) {
- // todyLocal = 2;
- // } else if (jrszd == 3) {
- // todyLocal = 3;
- // }
- // } else if (jrszd == 4 && jrszq != "") {
- // todyLocal = 4;
- // todyLocalOther = jrszq;
- // }
- //var sf = $("#js_input_sf").attr("data-values") == undefined ? 3 : $("#js_input_sf").attr("data-values");
- //var sf = $("input[name=radio4]:checked").val()
- var isTrip = $("input[name=radio4]:checked").val();
- // if (sf == 1) {
- // cantijiao = true;
- // $.alert("请选择是否出行");
- // return;
- // } else {
- // isTrip = sf;
- // }
- } else {
- workLocal = 0;
- workLocalOther = "";
- todyLocal = 0;
- todyLocalOther = "";
- isTrip = 0;
- listcx = [];
- }
- var pdata = {
- "suspectedId": suspectedId,
- "userCreate": userId,
- "userName": userName,
- "grender": grender,
- "age": age,
- "familyStatus": familyStatus,
- "statusDesp": statusDesp,
- "medical": medical,
- "medicalState": medicalState,
- "singleRoom": singleRoom,
- "temperature": temperature,
- "cough": cough,
- "muscle": muscle,
- "dyspnea": dyspnea,
- "fatigue": fatigue,
- "diarrhea": diarrhea,
- "others": others,
- "scoreRezult": scoreRezult,
- "temperatureScore": temperatureScore,
- "scoreHistroy": scoreHistroy,
- "score": score,
- "isContact": isContact,
- "isSuspected": isSuspected,
- "workLocal": workLocal,
- "workLocalOther": workLocalOther,
- "todayLocal": todyLocal,
- "todayLocalOther": todyLocalOther,
- "autoLocal": autoLocal,
- "autoAddr": autoAddr,
- "isTrip": isTrip,
- "tripDet": listcx,
- "longitude": longitude,
- "latitude": longitude,
- };
- //loading
- var tempTimes = $.toast.prototype.defaults.duration
- $.toast.prototype.defaults.duration = 0
- $.toast("处理中...", 'loading');
- $.ajax({
- url: '/home/addRibaoTrip',
- type: "post",
- contentType: "application/json; charset=utf-8",
- data: JSON.stringify(pdata),
- success: function (data) {
- $.toast.prototype.defaults.duration = tempTimes
- console.log('data:', data.msgReport);
- if (data == {} || data == '' || data == null || data == undefined) {
- $.toast("数据提交失败,请重新提交!", 'forbidden');
- cantijiao = true;
- return;
- }
- if (data.reportId == null || data.reportId == undefined || data.reportId <= 0) {
- $.toast("数据提交失败,请重新提交!", 'forbidden');
- cantijiao = true;
- return;
- }
- if (data.msgReport == "2") {
- cantijiao = true;
- $.toast("家人姓名不能重复,如果重复,可以带上称呼");
- return;
- }
- if (data.msgReport == "4") {
- cantijiao = true;
- $.toast("是否出行,请如实填写!");
- return;
- }
- if ($('#ribao')[0].style.display == 'none') {
- $('#notOpenRibao').toggle();
- $('#ribao')[0].style.display = '';
- } else {
- $('#notOpenRibao')[0].style.display = '';
- $('#ribao')[0].style.display = 'none';
- }
- cantijiao = true
- $('#ribao_jinrijujian').empty();
- $('#ribao_jinrijujian').append(data.safetyNum);
- //修改
- var uptownId = $("#uptownId").val();
- //是凌云
- if (uptownId == xiaoquId || uptownId == ceshixiaoquId) {
- if (suspectedId > 0) {
- var date = new Date();
- var Y = date.getFullYear() + '-';
- var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
- var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + ' ';
- var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + ':';
- var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + ':';
- var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds());
- var time = Y + M + D + h + m + s;
- canSahngbao = false;
- document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
- document.getElementById("txt_shangbao").style['color'] = "#0bb20c";
- document.getElementById("txt_shangbaotime").style['color'] = "#0bb20c";
- $('#txt_shangbao').empty();
- $('#txt_shangbao').append("今日已上报");
- $('#txt_shangbaotime').empty();
- $('#txt_shangbaotime').append("上报时间:" + time);
- }
- else {
- canSahngbao = true;
- document.getElementById("btn_shangbao").style['background-color'] = "#0bb20c";
- document.getElementById("txt_shangbao").style['color'] = "red";
- $('#txt_shangbao').empty();
- $('#txt_shangbao').append("今日未上报");
- $('#txt_shangbaotime').empty();
- }
- }
- else {
- canSahngbao = true;
- document.getElementById("btn_shangbao").style['background-color'] = "#0bb20c";
- document.getElementById("txt_shangbao").style['color'] = "red";
- $('#txt_shangbao').empty();
- $('#txt_shangbao').append("今日未上报");
- $('#txt_shangbaotime').empty();
- // $.toast("请点击上报");
- }
- if(!$("#suspectedId").val()) {
- suspectedId = "1";
- }
- $.toast("操作成功");
- ribao_refrash();
- clearShow();
- },
- });
- }
- function deleteSuspected(suspectedId) {
- $.confirm({
- title: '是否确定删除上报信息?',
- onOK: function () {
- $.ajax({
- url: '/home/deleteSuspected',
- type: "post",
- data: {
- "suspectedId": suspectedId
- },
- success: function (data) {
- $('#ribao_jinrijujian').empty();
- $('#ribao_jinrijujian').append(data.safetyNum);
- //今日未上报
- canSahngbao = true;
- document.getElementById("btn_shangbao").style['background-color'] = "#0bb20c";
- document.getElementById("txt_shangbao").style['color'] = "red";
- $('#txt_shangbao').empty();
- $('#txt_shangbao').append("今日未上报");
- $('#txt_shangbaotime').empty();
- $('#ribao_famliy').empty();
- ribao_refrash();
- clearShow();
- $.toast("删除后请重新添加上报");
- },
- });
- },
- onCancel: function () {
- }
- });
- }
- //重新填报
- function goReport() {
- $("#suspectedId").val("");
- if ($('#ribao')[0].style.display == 'none') {
- $('#notOpenRibao').toggle();
- $('#ribao')[0].style.display = '';
- } else {
- $('#notOpenRibao')[0].style.display = '';
- $('#ribao')[0].style.display = 'none';
- }
- }
- //修改上报
- function updateSuspected(suspectedId) {
- userFamilyStatus = ''
- userFamilyStatusStr = ''
- //病情
- var ids = ['js_input_user_tiwen','js_input_user_xinguan_view','js_input_user_kesou_view','js_input_user_jirou_view','js_input_user_huxi_view','js_input_user_fali_view','js_input_user_fuxie_view','shuruqita_view'];
- //接触史
- var ids2 = ['isContactView','isSuspectedView'];
- $("#suspectedId").val("");
- if ($('#ribao')[0].style.display == 'none') {
- $('#notOpenRibao').toggle();
- $('#ribao')[0].style.display = '';
- } else {
- $('#notOpenRibao')[0].style.display = '';
- $('#ribao')[0].style.display = 'none';
- }
- $.ajax({
- url: '/home/selectSuspected',
- get: "get",
- data: {
- "suspectedId": suspectedId
- },
- success: function (data) {
- // console.log(data);
- if (data) {
- // 获取定位
- getLocation();
- var suspected = data;
- oldAutoLocal = data.autoLocal
- $("#suspectedId").val(suspected.suspectedId);
- $("#js_input_user_sex").val(getGreder(suspected.grender));
- $("#js_input_user_sex").attr("data-values", suspected.grender);
- $("#js_input_user_name").val(suspected.userName);
- $("#js_input_user_age").val(suspected.age);
- //基本情况
- // if (suspected.familyStatus != "") {
- // var familyStatusList = suspected.familyStatus.split(",");
- // if (familyStatusList[0] == 1)
- // $("input[name='checkbox1']").prop("checked", "checked");
- // else
- // $("input[name='checkbox1']").removeAttr("checked");
- // if (familyStatusList[1] == 1)
- // $("input[name='checkbox2']").prop("checked", "checked");
- // else
- // $("input[name='checkbox2']").removeAttr("checked");
- // if (familyStatusList[2] == 1)
- // $("input[name='checkbox3']").prop("checked", "checked");
- // else
- // $("input[name='checkbox3']").removeAttr("checked");
- // if (familyStatusList[3] == 1)
- // $("input[name='checkbox4']").prop("checked", "checked");
- // else
- // $("input[name='checkbox4']").removeAttr("checked");
- // if (familyStatusList[4] == 1)
- // $("input[name='checkbox5']").prop("checked", "checked");
- // else
- // $("input[name='checkbox5']").removeAttr("checked");
- // if (familyStatusList[5] == 1)
- // $("input[name='checkbox6']").prop("checked", "checked");
- // else
- // $("input[name='checkbox6']").removeAttr("checked");
- // if (familyStatusList[6] == 1)
- // $("input[name='checkbox7']").prop("checked", "checked");
- // else
- // $("input[name='checkbox7']").removeAttr("checked");
- //
- // }
- // userFamilyStatus = formatUserStatus(suspected.familyStatus)
- // userFamilyStatusStr = getFamilyStatus(suspected.familyStatus)
- // $("#js_input_user_status").val(userFamilyStatusStr);
- // $("#js_input_user_status").attr("data-values", formatUserStatus(suspected.familyStatus));
- // $("#js_input_user_status").data("values", userFamilyStatus);
- // $("#jibenmiaoshu").val(suspected.statusDesp);
- if (suspected.medical == 0)
- $("input[id='s18']").prop("checked", "checked");
- if (suspected.medical == 1){
- $("input[id='s19']").prop("checked", "checked");
- // ids.forEach(v=>{
- // $('#'+v).show('fast')
- // });
- $.each(ids,function (i,v) {
- $('#'+v).show('fast')
- })
- }
- // if (suspected.medical == 2)
- // $("input[id='s20']").prop("checked", "checked");
- // if (suspected.medical == 3)
- // $("input[id='s21']").prop("checked", "checked");
- // if (suspected.medical == 4)
- // $("input[id='s22']").prop("checked", "checked");
- // $("#js_input_user_crov19").val(crov19States[suspected.medical].title);
- // $("#js_input_user_crov19").attr("data-values", suspected.medical);
- if (suspected.isContact == 0)
- $("input[id='s28']").prop("checked", "checked");
- if (suspected.isContact == 1)
- $("input[id='s29']").prop("checked", "checked");
- if (suspected.isSuspected == 0)
- $("input[id='s38']").prop("checked", "checked");
- if (suspected.isSuspected == 1)
- $("input[id='s39']").prop("checked", "checked");
- if (suspected.isContact == 0 && suspected.isSuspected == 0)
- $("input[id='s40']").prop("checked", "checked");
- if (suspected.isContact == 1 || suspected.isSuspected == 1){
- $("input[id='s41']").prop("checked", "checked");
- // ids2.forEach(v=>{
- // $('#'+v).show('fast')
- // })
- $.each(ids2,function (i,v) {
- $('#'+v).show('fast')
- })
- }
- if(suspected.isTrip == 0){
- $("input[id='s50']").prop("checked", "checked");
- }else {
- $("input[id='s51']").prop("checked", "checked");
- }
- if(suspected.temperature > 37.2){
- $("input[id='s61']").prop("checked", "checked");
- $("#js_input_user_tiwen").show();
- }else {
- $("input[id='s60']").prop("checked", "checked");
- $("#js_input_user_tiwen").hide();
- }
- // $("#switchQuezhen").val(getMedical(suspected.medical));
- // $("#switchQuezhen").attr("data-values", suspected.medical);
- $("#switchDanjiangeli").val(getSingleRoom(suspected.singleRoom));
- $("#switchDanjiangeli").attr("data-values", suspected.singleRoom);
- $("#js_input_user_tiwen").val(suspected.temperature||36.5);
- $("#js_input_user_xinguan").val(getXinguan(suspected.medicalState||0));
- $("#js_input_user_xinguan").attr("data-values", suspected.medicalState||0);
- $("#js_input_user_kesou").val(getCough(suspected.cough));
- $("#js_input_user_kesou").attr("data-values", suspected.cough);
- $("#js_input_user_jirou").val(getMuscle(suspected.muscle));
- $("#js_input_user_jirou").attr("data-values", suspected.muscle);
- $("#js_input_user_huxi").val(getDyspnea(suspected.dyspnea));
- $("#js_input_user_huxi").attr("data-values", suspected.dyspnea);
- $("#js_input_user_fali").val(getFatigue(suspected.fatigue));
- $("#js_input_user_fali").attr("data-values", suspected.fatigue);
- $("#js_input_user_fuxie").val(getDiarrhea(suspected.diarrhea));
- $("#js_input_user_fuxie").attr("data-values", suspected.diarrhea);
- $("#shuruqita").val(suspected.others);
- $("#js_input_score_rezult").val(getScoreRezult(suspected.scoreRezult, suspected.temperatureScore));
- $("#js_input_score_rezult_value").val(suspected.scoreRezult);
- $("#js_input_temperature_score").val(suspected.temperatureScore);
- $("#js_input_score_histroy").val(suspected.scoreHistroy);
- $("#js_input_score").val(suspected.score);
- //工作驻地
- $("#js_input_gzzd").val(getLocal(suspected.workLocal));
- $("#js_input_gzzd").attr("data-values", suspected.workLocal);
- if (suspected.workLocal != 4) {
- $('#js_input_qtdd').attr("disabled", "disabled");
- $("#js_input_qtdd").val("");
- } else {
- $('#js_input_qtdd').removeAttr("disabled")
- }
- $("#js_input_qtdd").val(suspected.workLocalOther);
- //今晚驻地
- $("#js_input_jrszd").val(getLocal(suspected.todayLocal));
- $("#js_input_jrszd").attr("data-values", suspected.todayLocal);
- if (suspected.todayLocal != 4) {
- $('#js_input_jrszq').attr("disabled", "disabled");
- $("#js_input_jrszq").val("");
- }
- else {
- $('#js_input_jrszq').removeAttr("disabled")
- }
- $("#js_input_jrszq").val(suspected.todayLocalOther);
- //是否出行
- // $("#js_input_sf").val(getIsTrip(suspected.isTrip));
- // $("#js_input_sf").attr("data-values", suspected.isTrip);
- if (suspected.isTrip == 0){
- $('#none').hide('fast')
- }else {
- $('#none').show('fast')
- }
- //详细
- $.ajax({
- url: '/home/selectTripSuspected',
- get: "get",
- data: {
- "suspectedId": suspectedId
- },
- success: function (data) {
- if (data.data.length != 0) {
- }
- listcx.splice(0, listcx.length);
- $('#tabtr').empty();
- var person = {};
- // var xxIds = [];
- // var xxName = [
- // "序号",
- // "出发地",
- // "目的地",
- // "出行方式",
- // "车次/航班/车牌",
- // "操作"
- // ];
- // for (var i = 0; i < xxName.length; i++) {
- // xxIds.push({
- // name: xxName[i]
- // });
- // }
- // $('#tabtr').empty();
- // var html = "<tr style='background-color: #f8f8f8;'>";
- // for (var i = 0; i < xxIds.length; i++) {
- // html += "<th>" + xxIds[i].name + "</th>";
- // }
- // html += "</tr>"
- // data.data.forEach(function (v) {
- // {
- // person = new Object();
- // person.startLocal = v.startLocal;
- // person.startLocalOther = v.startLocalOther;
- // person.endLocal = v.endLocal;
- // person.endLocalOther = v.endLocalOther;
- // person.tripType = v.tripType;
- // person.startLocalStr = getLocalOther(v.startLocal, v.startLocalOther);
- // person.endlocalStr = getLocalOther(v.endLocal, v.endLocalOther);
- // person.tripTypeStr = getTripType(v.tripType);
- // person.tripTypeDesp = v.tripTypeDesp;
- // listcx.push(person);
- // console.log(listcx,'listcx')
- // // html += "<tr>";
- // // html += "<td style='text-align: center;'>" + v.sort + "</td>";
- // // html += "<td style='text-align: center;' >" + getLocalOther(v.startLocal, v.startLocalOther) + " </td>";
- // // html += "<td style='text-align: center;' >" + getLocalOther(v.endLocal, v.endLocalOther) + " </td>";
- // // html += "<td style='text-align: center;' >" + getTripType(v.tripType) + " </td>";
- // // html += "<td style='text-align: center;' >" + v.tripTypeDesp + " </td>";
- // // 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>";
- // // html += "</tr>";
- // // $("#tabtr").html(html);
- // }
- // });
- $.each(data.data,function (i,v) {
- person = {};
- person.startLocal = v.startLocal;
- person.startLocalOther = v.startLocalOther;
- person.endLocal = v.endLocal;
- person.endLocalOther = v.endLocalOther;
- person.tripType = v.tripType;
- person.startLocalStr = getLocalOther(v.startLocal, v.startLocalOther);
- person.endlocalStr = getLocalOther(v.endLocal, v.endLocalOther);
- person.tripTypeStr = getTripType(v.tripType);
- person.tripTypeDesp = v.tripTypeDesp;
- listcx.push(person);
- })
- tab();
- },
- });
- }
- },
- });
- }
- function addReport() {
- if (!canSahngbao) {
- return;
- }
- var userId = $("#userId").val();
- $.ajax({
- url: '/home/addReport',
- type: "post",
- data: {
- "userCreate": userId,
- },
- success: function (data) {
- $.toast(data.msg)
- var date = new Date();
- var Y = date.getFullYear() + '-';
- var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
- var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + ' ';
- var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + ':';
- var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + ':';
- var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds());
- var time = Y + M + D + h + m + s;
- if (data.msg == "操作成功") {
- canSahngbao = false;
- document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
- document.getElementById("txt_shangbao").style['color'] = "#0bb20c";
- document.getElementById("txt_shangbaotime").style['color'] = "#0bb20c";
- $('#txt_shangbao').empty();
- $('#txt_shangbao').append("今日已上报");
- $('#txt_shangbaotime').empty();
- $('#txt_shangbaotime').append("上报时间:" + time);
- }
- },
- });
- }
- $("#my-input-ribao").calendar({
- dateFormat: 'yyyy-mm-dd',
- inputReadOnly: false,
- onChange: function (p, values, displayValues) {
- var reportDate = values+'';
- var userId = $("#userId").val();
- $.ajax({
- url: '/home/home/queryRibaoReportDate',
- data: {
- "userCreate": userId,
- "reportDate": reportDate,
- },
- type: 'GET',
- success: function (data) {
- if (data.data == undefined || data.data == "") {
- $('#ribao_famliy').empty();
- }
- else {
- if (data.data.length > 0) {
- $('#ribao_famliy').empty();
- // data.data.forEach(function (v) {
- // helpValue1(v);
- // });
- $.each(data.data,function (i,v) {
- helpValue1(v);
- })
- } else {
- }
- }
- },
- error: function () {
- }
- });
- }
- });
- function helpValue1(v) {
- var userName = v.userName + ":";
- var grender = getGreder(v.grender);
- var age = v.age;
- var familyStatus = "";
- // if (v.familyStatus != 0)
- // familyStatus = "基本状况:" + getFamilyStatus(v.familyStatus) + ";";
- var medical = "本人身体情况:" + getMedical(v.medical) + ";<br/>";
- var isContact = "";
- if (v.isContact != 0)
- isContact = "密切接触人员(含家庭成员)有新冠肺炎或有1月25日以来中高风险地区旅居史:" + getIsContact(v.isContact) + ";<br/>";
- var isSuspected = "";
- if (v.isSuspected != 0)
- isSuspected = "近期接触的家庭成员中有感冒、发热、咳嗽等症状:" + getIsContact(v.isContact) + ";<br/>";
- var isContactHistory = '';
- if(!isContact && !isSuspected){
- isContactHistory = "家庭成员情况:正常;<br/>";
- }
- var singleRoom = "";
- var uptownId = $("#uptownId").val();
- if (uptownId != xiaoquId && uptownId != ceshixiaoquId) {
- if (v.singleRoom != 0)
- singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";<br/>";
- if (v.singleRoom == 0 && v.medical != 0)
- singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";<br/>";
- }
- var tempTemperature = v.temperature>37.2?'异常,'+v.temperature+'度':'正常,37.2度以下';
- var temperature = "体温:" + tempTemperature + ";<br/>";
- var cough = "";
- if (v.cough != 0)
- cough = "咳嗽现象:" + getCough(v.cough) + ";<br/>";
- var muscle = "";
- if (v.muscle != 0)
- muscle = "肌肉酸痛:" + getMuscle(v.muscle) + ";<br/>";
- var dyspnea = "";
- if (v.dyspnea != 0)
- dyspnea = "呼吸困难:" + getDyspnea(v.dyspnea) + ";<br/>";
- var fatigue = "";
- if (v.fatigue != 0)
- fatigue = "乏力现象:" + getFatigue(v.fatigue) + ";<br/>";
- var diarrhea = "";
- if (v.diarrhea != 0)
- diarrhea = "腹泻现象:" + getDiarrhea(v.diarrhea) + ";<br/>";
- var others = "";
- if (v.others != "")
- others = "其他描述:" + v.others + ";<br/>";
- var scoreRezult = "";
- if (v.scoreRezult != 0)
- scoreRezult = "评估结果:" + getScoreRezult(v.scoreRezult, v.temperatureScore) + ";<br/>";
- var workLocal = "";
- var todayLocal = "";
- var isTrip = "";
- var tripDet = "";
- var uptownId = $("#uptownId").val();
- if (uptownId == xiaoquId || uptownId == ceshixiaoquId) {
- // if (v.workLocal != 0) {
- // if (v.workLocal < 4)
- // workLocal = "工作驻地:" + getLocal(v.workLocal) + ";";
- // else
- // workLocal = "工作驻地:其它地点_" + v.workLocalOther + ";";
- // }
- //
- // if (v.todayLocal != 0) {
- // if (v.todayLocal < 4)
- // todayLocal = "今晚住地:" + getLocal(v.todayLocal) + ";";
- // else
- // todayLocal = "今晚住地:其它地点_" + v.todayLocalOther + ";";
- // }
- if (v.isTrip != undefined)
- isTrip = "有无离开工作驻地:" + getIsTrip(v.isTrip) + ";<br/>"
- if (v.tripDet != undefined)
- tripDet = "出行详细:" + v.tripDet + ";<br/>"
- }
- $('#ribao_famliy').append($('<div class="weui-media-box weui-media-box_text" style="height: auto">\n' +
- ' <h4 class="weui-media-box__title">' + userName + ' ' + grender + ' ' + age + '</h4>\n' +
- ' <div style="height: auto">' + temperature + familyStatus + medical + singleRoom + cough + muscle + dyspnea + fatigue + diarrhea + others + isContactHistory +isContact + isSuspected + scoreRezult + workLocal + todayLocal + isTrip + tripDet + '</div>\n' +
- ' </div>\n' +
- ' '));
- }
- function getGreder(greder) {
- if (greder == 1)
- return "男";
- else if (greder == 2)
- return "女";
- return "";
- }
- function getFamilyStatus(familyStatus) {
- var familyStatusList = familyStatus.split(",");
- console.log(familyStatusList)
- var familyStatusString = "";
- if (familyStatus == '0,0,0,0,0,0,0'){
- familyStatusString += "无病史";
- return familyStatusString
- } else {
- if (familyStatusList[0] == 1)
- familyStatusString += "心脑血管疾病(服用ARB),";
- if (familyStatusList[1] == 1)
- familyStatusString += "心脑血管疾病(未服ARB),";
- if (familyStatusList[2] == 1)
- familyStatusString += "呼吸系统病史,";
- if (familyStatusList[3] == 1)
- familyStatusString += "肿瘤病史,";
- if (familyStatusList[4] == 1)
- familyStatusString += "糖尿病史,";
- if (familyStatusList[5] == 1)
- familyStatusString += "服用过激素药物,";
- if (familyStatusList[6] == 1)
- familyStatusString += "妊娠期,";
- }
- return familyStatusString.substring(0, familyStatusString.length - 1);
- }
- function formatUserStatus(str) {
- var statusList = str.split(',');
- console.log(statusList)
- var resultStr = '';
- for(var i = 0;i<statusList.length;i++){
- if(statusList[i] == 1){
- resultStr += i+','
- }
- }
- if(resultStr){
- var tempArr = resultStr.split(',')
- tempArr.pop()
- resultStr = tempArr.join(',')
- }else {
- resultStr = '0'
- }
- console.log(resultStr)
- return resultStr
- }
- function getXinguan(cough) {
- if (cough == 0)
- return "无";
- else if (cough == 1)
- return "确诊";
- else if (cough == 2)
- return "疑似";
- else if (cough == 3)
- return "解除隔离";
- return "";
- }
- function getCough(cough) {
- if (cough == 0)
- return "无";
- else if (cough == 1)
- return "偶尔短暂咳嗽";
- else if (cough == 2)
- return "咳嗽轻度影响生活";
- else if (cough == 3)
- return "咳嗽严重影响生活";
- return "";
- }
- function getMuscle(muscle) {
- if (muscle == 0)
- return "无";
- else if (muscle == 1)
- return "按压有";
- else if (muscle == 2)
- return "偶尔";
- else if (muscle == 3)
- return "持续有";
- return "";
- }
- function getDyspnea(dyspnea) {
- if (dyspnea == 0)
- return "无";
- else if (dyspnea == 1)
- return "急走或上坡气短";
- else if (dyspnea == 2)
- return "气短而走路变慢";
- else if (dyspnea == 3)
- return "走路数分钟后气短";
- else if (dyspnea == 4)
- return "气短无法离开房间";
- return "";
- }
- function getFatigue(fatigue) {
- if (fatigue == 0)
- return "无";
- else if (fatigue == 1)
- return "体力劳动后不能恢复";
- else if (fatigue == 2)
- return "轻体力活非常累";
- else if (fatigue == 3)
- return "不能正常生活";
- return "";
- }
- function getMedical(medical) {
- if (medical == 0)
- return "正常";
- else if (medical == 1)
- return "异常";
- else if (medical == 2)
- return "疑似";
- else if (medical == 3)
- return "有接触史";
- else if (medical == 4)
- return "解除隔离";
- return "";
- }
- function getIsContact(isContact) {
- if (isContact == 0)
- return "正常";
- else if (isContact == 1)
- return "异常";
- return "";
- }
- function getSingleRoom(singleRoom) {
- if (singleRoom == 0)
- return "否";
- else if (singleRoom == 1)
- return "是";
- return "";
- }
- function getIsTrip(isTrip) {
- if (isTrip == 0)
- return "无";
- else if (isTrip == 1)
- return "有";
- return "";
- }
- function getLocal(local) {
- if (local == 0)
- return "";
- else if (local == 1)
- return "武汉市";
- else if (local == 2)
- return "宜昌市";
- else if (local == 3)
- return "当阳市";
- else if (local == 4)
- return "其它地点";
- return "";
- }
- function getLocalOther(local, localOther) {
- if (local == 0)
- return "";
- else if (local == 1)
- return "武汉市";
- else if (local == 2)
- return "宜昌市";
- else if (local == 3)
- return "当阳市";
- else if (local == 4)
- return "其它地点_" + localOther;
- return "";
- }
- function getTripType(tripType) {
- if (tripType == 0)
- return "";
- else if (tripType == 1)
- return "长途汽车";
- else if (tripType == 2)
- return "火车";
- else if (tripType == 3)
- return "飞机";
- else if (tripType == 4)
- return "自驾";
- return "";
- }
- function getDiarrhea(diarrhea) {
- if (diarrhea == 0)
- return "无";
- else if (diarrhea == 1)
- return "轻度腹泻(少于3次)";
- else if (diarrhea == 2)
- return "中度腹泻(4-6次)";
- else if (diarrhea == 3)
- return "重度腹泻(超过6次)";
- return "";
- }
- function clearShow() {
- console.log("qingkong")
- //病情
- var ids = ['js_input_user_tiwen','js_input_user_xinguan_view','js_input_user_kesou_view','js_input_user_jirou_view','js_input_user_huxi_view','js_input_user_fali_view','js_input_user_fuxie_view','shuruqita_view'];
- // ids.forEach(iv=>{
- // $('#'+iv).hide()
- // })
- $.each(ids,function (i,iv) {
- $('#'+iv).hide()
- })
- //接触史
- var ids2 = ['isContactView','isSuspectedView'];
- // ids2.forEach(iv=>{
- // $('#'+iv).hide()
- // })
- $.each(ids2,function (i,iv) {
- $('#'+iv).hide()
- })
- $("#suspectedId").val("");
- $("#js_input_user_name").val("");
- $("#js_input_user_age").val("");
- $("#js_input_user_sex").val('男');
- $("#js_input_user_sex").attr("data-values", 1);
- $("#switchQuezhen").attr("data-values", "");
- $("#switchQuezhen_zz").val("");
- $("#switchQuezhen_zz").attr("data-values", "");
- $("#switchDanjiangeli").val("");
- $("#switchDanjiangeli").attr("data-values", "");
- $("#js_input_user_tiwen").val("");
- $("#js_input_user_xinguan").val("");
- $("#js_input_user_xinguan").attr("data-values", "");
- $("#js_input_user_kesou").val("");
- $("#js_input_user_kesou").attr("data-values", "");
- $("#js_input_user_jirou").val("");
- $("#js_input_user_jirou").attr("data-values", "");
- $("#js_input_user_huxi").val("");
- $("#js_input_user_huxi").attr("data-values", "");
- $("#js_input_user_fali").val("");
- $("#js_input_user_fali").attr("data-values", "");
- $("#js_input_user_fuxie").val("");
- $("#js_input_user_fuxie").attr("data-values", "");
- $("#shuruqita").val("");
- $("#js_input_score_rezult").val("");
- $("#js_input_score_rezult_value").val("");
- $("#js_input_temperature_score").val("");
- $("#js_input_score_histroy").val("");
- $("#js_input_score").val("");
- //出行
- $("#js_input_gzzd").val("");
- $("#js_input_gzzd").attr("data-values", "");
- $("#js_input_qtdd").val("");
- $("#js_input_jrszd").val("");
- $("#js_input_jrszd").attr("data-values", "");
- $("#js_input_jrszq").val("");
- $("#js_input_sf").val(getIsTrip(0));
- $("#js_input_sf").attr("data-values", 0);
- $('#none').hide();
- $("input[id='s18']").removeAttr("checked");
- $("input[id='s19']").removeAttr("checked");
- // $("input[id='s20']").removeAttr("checked");
- // $("input[id='s21']").removeAttr("checked");
- // $("input[id='s22']").removeAttr("checked");
- // $("#js_input_user_status").val('');
- // $("#js_input_user_status").attr("data-values", '');
- // $("#js_input_user_crov19").val('无');
- // $("#js_input_user_crov19").attr("data-values", '0');
- $("input[id='s28']").removeAttr("checked");
- $("input[id='s29']").removeAttr("checked");
- $("input[id='s38']").removeAttr("checked");
- $("input[id='s39']").removeAttr("checked");
- $("input[id='s40']").removeAttr("checked");
- $("input[id='s41']").removeAttr("checked");
- $("input[id='s50']").removeAttr("checked");
- $("input[id='s51']").removeAttr("checked");
- $("input[id='s60']").removeAttr("checked");
- $("input[id='s61']").removeAttr("checked");
- resetTravelState(true)
- }
- //健康评估
- $('#ribao_score').on('click', function () {
- var suspectedId = $("#suspectedId").val();
- var userId = $("#userId").val();
- var userName = $("#js_input_user_name").val();
- var medical = $("input[name='radio']:checked").val() == undefined ? 0 : $("input[name='radio']:checked").val();
- var medicalzz = $("#switchQuezhen_zz").attr("data-values") == undefined ? 0 : $("#switchQuezhen_zz").attr("data-values");
- var temperature = $("#js_input_user_tiwen").val() == "" ? 0 : $("#js_input_user_tiwen").val();
- var cough = $("#js_input_user_kesou").attr("data-values") == undefined ? 0 : $("#js_input_user_kesou").attr("data-values");
- var muscle = $("#js_input_user_jirou").attr("data-values") == undefined ? 0 : $("#js_input_user_jirou").attr("data-values");
- var dyspnea = $("#js_input_user_huxi").attr("data-values") == undefined ? 0 : $("#js_input_user_huxi").attr("data-values");
- var fatigue = $("#js_input_user_fali").attr("data-values") == undefined ? 0 : $("#js_input_user_fali").attr("data-values");
- var diarrhea = $("#js_input_user_fuxie").attr("data-values") == undefined ? 0 : $("#js_input_user_fuxie").attr("data-values");
- if (userName == undefined || userName == '') {
- $.alert("请填写姓名");
- return;
- }
- if (temperature <= 0) {
- $.alert("请填写体温");
- return;
- }
- if (temperature > 50 || temperature < 30) {
- $.alert("请填写正确的体温");
- return;
- }
- $.ajax({
- url: '/home/addScore',
- type: "post",
- data: {
- "userName": userName,
- "suspectedId": suspectedId,
- "userCreate": userId,
- "medical": medical,
- "temperature": temperature,
- "cough": cough,
- "muscle": muscle,
- "dyspnea": dyspnea,
- "fatigue": fatigue,
- "diarrhea": diarrhea,
- },
- success: function (data) {
- if (data == undefined) {
- $('#js_input_score_rezult').empty();
- $('#js_input_score_rezult_value').empty();
- $('#js_input_temperature_score').empty();
- $('#js_input_score_histroy').empty();
- $('#js_input_score').empty();
- }
- else {
- $('#js_input_score_rezult').empty();
- $('#js_input_temperature_score').empty();
- $('#js_input_score_histroy').empty();
- $('#js_input_score').empty();
- var ScoreRezult = getScoreRezult(data.scoreRezult, data.temperatureScore);
- $("#js_input_score_rezult").val(ScoreRezult);
- $("#js_input_score_rezult_value").val(data.scoreRezult);
- $("#js_input_temperature_score").val(data.temperatureScore);
- $("#js_input_score_histroy").val(data.scoreHistory);
- $("#js_input_score").val(data.score);
- }
- },
- });
- });
- function getScoreRezult(scoreRezult, temperatureScore) {
- if (scoreRezult == 0)
- return "未评估";
- else if (scoreRezult == 1) {
- if (temperatureScore > 1)
- return "正常,间隔时间服用退烧药,多休息,多喝水";
- else
- return "正常";
- }
- else if (scoreRezult == 2) {
- if (temperatureScore > 1)
- return "注意观察,间隔时间服用退烧药,多休息,多喝水";
- else
- return "注意观察";
- }
- else if (scoreRezult == 3)
- return "联系社区医生(或者在线问诊)";
- else if (scoreRezult == 4)
- return "尽快就诊";
- return "";
- }
- //2020-06-16
- function initRadioEvent() {
- //各选择器
- var selects = [
- 'js_input_gzzd',
- 'js_input_jrszd',
- 'js_input_sf',
- 'js_input_cfd',
- 'js_input_mdd',
- 'js_input_cxfs',
- 'js_input_user_sex',
- 'js_input_user_xinguan',
- 'js_input_user_jirou',
- 'js_input_user_kesou',
- 'js_input_user_huxi',
- 'js_input_user_fali',
- 'js_input_user_fuxie'
- ];
- //病情
- var ids = ['js_input_user_xinguan_view','js_input_user_kesou_view','js_input_user_jirou_view','js_input_user_huxi_view','js_input_user_fali_view','js_input_user_fuxie_view','shuruqita_view']
- // ids.forEach(iv=>{
- // $('#'+iv).hide()
- // })
- $.each(ids,function (i,iv) {
- $('#'+iv).hide()
- })
- $('input[name="radio"]').on('change',function () {
- // selects.forEach(v=>{
- // $('#'+v).select("close")
- // })
- $.each(selects,function (i,v) {
- $('#'+v).select("close")
- })
- var state = this.value
- // ids.forEach(v=>{
- // if(state == 1){
- // $('#'+v).show('fast')
- // }else {
- // //reset
- // $("#switchQuezhen").val(getMedical(0));
- // $("#switchQuezhen").attr("data-values", 0);
- //
- // $("#switchDanjiangeli").val(getSingleRoom(0));
- // $("#switchDanjiangeli").attr("data-values", 0);
- //
- // $("#js_input_user_xinguan").val(getXinguan(0));
- // $("#js_input_user_xinguan").attr("data-values", 0);
- //
- // $("#js_input_user_kesou").val(getCough(0));
- // $("#js_input_user_kesou").attr("data-values", 0);
- //
- // $("#js_input_user_jirou").val(getMuscle(0));
- // $("#js_input_user_jirou").attr("data-values", 0);
- //
- // $("#js_input_user_huxi").val(getDyspnea(0));
- // $("#js_input_user_huxi").attr("data-values", 0);
- //
- // $("#js_input_user_fali").val(getFatigue(0));
- // $("#js_input_user_fali").attr("data-values", 0);
- //
- // $("#js_input_user_fuxie").val(getDiarrhea(0));
- // $("#js_input_user_fuxie").attr("data-values", 0);
- //
- // $("#shuruqita").val('');
- //
- // $('#'+v).hide('fast')
- // }
- //
- // })
- $.each(ids,function (i,v) {
- if(state == 1){
- $('#'+v).show('fast')
- }else {
- //reset
- $("#switchQuezhen").val(getMedical(0));
- $("#switchQuezhen").attr("data-values", 0);
- $("#switchDanjiangeli").val(getSingleRoom(0));
- $("#switchDanjiangeli").attr("data-values", 0);
- $("#js_input_user_xinguan").val(getXinguan(0));
- $("#js_input_user_xinguan").attr("data-values", 0);
- $("#js_input_user_kesou").val(getCough(0));
- $("#js_input_user_kesou").attr("data-values", 0);
- $("#js_input_user_jirou").val(getMuscle(0));
- $("#js_input_user_jirou").attr("data-values", 0);
- $("#js_input_user_huxi").val(getDyspnea(0));
- $("#js_input_user_huxi").attr("data-values", 0);
- $("#js_input_user_fali").val(getFatigue(0));
- $("#js_input_user_fali").attr("data-values", 0);
- $("#js_input_user_fuxie").val(getDiarrhea(0));
- $("#js_input_user_fuxie").attr("data-values", 0);
- $("#shuruqita").val('');
- $('#'+v).hide('fast')
- }
- })
- })
- //接触史
- var ids2 = ['isContactView','isSuspectedView'];
- // ids2.forEach(iv=>{
- // $('#'+iv).hide()
- // })
- $.each(ids2,function (i,iv) {
- $('#'+iv).hide()
- })
- $('input[name="radio3"]').on('change',function () {
- // selects.forEach(v=>{
- // $('#'+v).select("close")
- // })
- $.each(selects,function (i,v) {
- $('#'+v).select("close")
- })
- var state = this.value
- // ids2.forEach(v=>{
- // if(state == 1){
- // $("input[id='s28']").removeAttr("checked");
- // $("input[id='s38']").removeAttr("checked");
- // $("input[id='s29']").prop("checked", "checked");
- // $("input[id='s39']").prop("checked", "checked");
- // $('#'+v).show('fast')
- // }else {
- // $("input[id='s28']").prop("checked", "checked");
- // $("input[id='s29']").removeAttr("checked");
- // $("input[id='s38']").prop("checked", "checked");
- // $("input[id='s39']").removeAttr("checked");
- // $('#'+v).hide('fast')
- // }
- // })
- $.each(ids2,function (i,v) {
- if(state == 1){
- $("input[id='s28']").removeAttr("checked");
- $("input[id='s38']").removeAttr("checked");
- $("input[id='s29']").prop("checked", "checked");
- $("input[id='s39']").prop("checked", "checked");
- $('#'+v).show('fast')
- }else {
- $("input[id='s28']").prop("checked", "checked");
- $("input[id='s29']").removeAttr("checked");
- $("input[id='s38']").prop("checked", "checked");
- $("input[id='s39']").removeAttr("checked");
- $('#'+v).hide('fast')
- }
- })
- })
- $('input[name="radio1"]').on('click',function () {
- var state = this.value
- if(state == 0 && $('input[name="radio2"]:checked').val() == 0){
- $("input[id='s41']").removeAttr("checked");
- $("input[id='s40']").prop("checked", "checked");
- // ids2.forEach(iv=>{
- // $('#'+iv).hide('fast')
- // })
- $.each(ids2,function (i,iv) {
- $('#'+iv).hide('fast')
- })
- }
- })
- $('input[name="radio2"]').on('click',function () {
- var state = this.value
- if(state == 0 && $('input[name="radio1"]:checked').val() == 0){
- $("input[id='s41']").removeAttr("checked");
- $("input[id='s40']").prop("checked", "checked");
- // ids2.forEach(iv=>{
- // $('#'+iv).hide('fast')
- // })
- $.each(ids2,function (i,iv) {
- $('#'+iv).hide('fast')
- })
- }
- })
- //出行
- $('input[name="radio4"]').on('change',function () {
- var state = this.value
- resetTravelState(state == 0)
- })
- //体温
- $('input[name="radio5"]').on('change',function () {
- var state = this.value
- resetTiwen(state == 0)
- })
- }
- function resetTiwen(bool) {
- if(bool){
- $("#js_input_user_tiwen").hide('fast');
- $("#js_input_user_tiwen").val(36.5);
- }else {
- $("#js_input_user_tiwen").show('fast');
- $("#js_input_user_tiwen").val('');
- }
- }
|