3 lines
49 KiB
JavaScript
3 lines
49 KiB
JavaScript
|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-epidemic-travel-health"],{"01e2":function(t,e,a){"use strict";(function(t){a("6a54");var n=a("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(a("2634")),i=n(a("2fdc"));a("bd06"),a("aa9c"),a("e966"),a("f7a5");var r=a("5ffc"),c=a("2352"),u={data:function(){return{formatImgUrl:c.formatImgUrl,formatDate:c.formatDate,questions:[{title:"用工类型",formName:"userType",type:"radius",required:!0,requiredText:"请选择用工类型",options:["全民职工","社会用工"]},{title:"目前健康状况",formName:"healthState",type:"radius",required:!0,requiredText:"请选择目前健康状态",options:["正常","核酸阳性(核酸异常)","无症状感染者","确诊"]},{title:"今日出行情况",formName:"cityOut",type:"radius",required:!0,requiredText:"请选择您是否有市外出行",options:["市内","市外省内","省外","涉外归国"]},{title:"目前状态",formName:"dangerRegion",type:"radius",required:!0,requiredText:"请选择目前状态",options:["在岗","居家办公","收到排查短信(居家隔离)","管控(居家隔离)","封闭(居家隔离)","集中隔离"]},{title:"健康码颜色",formName:"healthCode",type:"radius",required:!0,requiredText:"请选择健康码颜色",options:["绿色","灰色","黄色","红色"]}],img:{healthCodeImg:[],tourCodeImg:[]},formData:{userId:(0,c.getStorage)("userInfo").userId,userName:(0,c.getStorage)("userInfo").userName,phone:(0,c.getStorage)("userInfo").telnumber,orgId:(0,c.getStorage)("userInfo").department_id,orgName:(0,c.getStorage)("userInfo").departmentName,userType:"",healthState:"",cityOut:"",dangerRegion:"",healthCode:"",healthCodeImg:"",tourCodeImg:"",nucleic:"",location:""},submitFlag:!0,list:[],cardInfo:0}},onLoad:function(){this.getLocation(),this.healthyClockList()},watch:{formData:{handler:function(t,e){"正常"!=this.formData.healthState||"是"==this.formData.cityOut||"是"==this.formData.dangerRegion||"绿色"!=this.formData.healthCode||"否"==this.formData.nucleic?this.cardInfo=1:this.cardInfo=0},deep:!0}},methods:{getLocation:function(){var e=this;c.wxSdk.invoke("ext_SGMap_Location",{data:{function:"onceLocation",data:{locationWithReGeocode:!0,locationTimeout:5}}},(function(a){var n=JSON.parse(a.data);e.formData.location=n.address,t.log(e.formData.location,"ext_SGMap_Location")}))},submit:function(){var t=this;if(this.submitFlag){if(this.submitFlag=!1,!this.verificationForm())return this.submitFlag=!0,!1;var e={method:r.healthyClockAdd,data:this.formData};(0,c.callbackRequest)(e).then((function(e){e=e.data,1==e.returnCode?(t.submitFlag=!0,(0,c.alertTip)(e.returnMsg),setTimeout((function(e){t.customNavigateBack()}),1500)):(t.submitFlag=!0,(0,c.alertTip)(e.returnMsg))}))}},customNavigateBack:function(){for(var t=getCurrentPages(),e=t.length,a="",n=e-2;n>=0;n--)if("pages/A/A"!==t[n].route){a=t[n].route;break}a&&uni.navigateBack({delta:e-1-t.findIndex((function(t){return t.route===a}))})},verificationForm:function(){for(var t=0;t<this.questions.length;t++){var e=this.questions[t];if(e.required)if("radius"==e.type){if(!this.formData[e.formName])return(0,c.alertTip)(e.requiredText),!1}else if("img"==e.type&&!this.formData[e.imgName])return(0,c.alertTip)(e.requiredText),!1}return!0},healthyClockList:function(){var t=this,e={method:r.healthyClockList,data:{userId:(0,c.getStorage)("userInfo").userId}};(0,c.callbackRequestNoLoading)(e).then((function(e){1==e.data.returnCode&&(t.list=e.data.returnData||[],t.list.length>0&&(t.formData.healthState=t.list[0].HEALTH_STATE,t.formData.cityOut=t.list[0].CITY_OUT,t.formData.dangerRegion=t.list[0].DANGER_REGION,t.formData.healthCode=t.list[0].HEALTH_CODE,t.formData.healthCodeImg=t.list[0].HEALTH_CODE_IMG?t.list[0].HEALTH_CODE_IMG.split("webImageDir/")[1]:"",t.formData.tourCodeImg=t.list[0].TOUR_CODE_IMG?t.list[0].TOUR_CODE_IMG.split("webImageDir/")[1]:"",t.formData.nucleic=t.list[0].NUCLEIC,t.formData.location=t.list[0].LOCATION||"",t.img.healthCodeImg[0]=t.formatImgUrl(t.list[0].HEALTH_CODE_IMG),t.img.
|
||
|
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
||
|
|
e.default=function(){return t};var t={},a=Object.prototype,o=a.hasOwnProperty,i=Object.defineProperty||function(t,e,a){t[e]=a.value},r="function"==typeof Symbol?Symbol:{},c=r.iterator||"@@iterator",u=r.asyncIterator||"@@asyncIterator",f=r.toStringTag||"@@toStringTag";function s(t,e,a){return Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(N){s=function(t,e,a){return t[e]=a}}function d(t,e,a,n){var o=e&&e.prototype instanceof v?e:v,r=Object.create(o.prototype),c=new Q(n||[]);return i(r,"_invoke",{value:k(t,a,c)}),r}function l(t,e,a){try{return{type:"normal",arg:t.call(e,a)}}catch(N){return{type:"throw",arg:N}}}t.wrap=d;var g={};function v(){}function m(){}function h(){}var b={};s(b,c,(function(){return this}));var p=Object.getPrototypeOf,A=p&&p(p(S([])));A&&A!==a&&o.call(A,c)&&(b=A);var y=h.prototype=v.prototype=Object.create(b);function x(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){var a;i(this,"_invoke",{value:function(i,r){function c(){return new e((function(a,c){(function a(i,r,c,u){var f=l(t[i],t,r);if("throw"!==f.type){var s=f.arg,d=s.value;return d&&"object"==(0,n.default)(d)&&o.call(d,"__await")?e.resolve(d.__await).then((function(t){a("next",t,c,u)}),(function(t){a("throw",t,c,u)})):e.resolve(d).then((function(t){s.value=t,c(s)}),(function(t){return a("throw",t,c,u)}))}u(f.arg)})(i,r,a,c)}))}return a=a?a.then(c,c):c()}})}function k(t,e,a){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return B()}for(a.method=o,a.arg=i;;){var r=a.delegate;if(r){var c=I(r,a);if(c){if(c===g)continue;return c}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===n)throw n="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);n="executing";var u=l(t,e,a);if("normal"===u.type){if(n=a.done?"completed":"suspendedYield",u.arg===g)continue;return{value:u.arg,done:a.done}}"throw"===u.type&&(n="completed",a.method="throw",a.arg=u.arg)}}}function I(t,e){var a=e.method,n=t.iterator[a];if(void 0===n)return e.delegate=null,"throw"===a&&t.iterator["return"]&&(e.method="return",e.arg=void 0,I(t,e),"throw"===e.method)||"return"!==a&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+a+"' method")),g;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,g;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,g):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function S(t){if(t){var e=t[c];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,n=function e(){for(;++a<t.length;)if(o.call(t,a))return e.value=t[a],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:B}}function B(){return{value:void 0,done:!0}}return m.prototype=h,i(y,"constructor",{value:h,configurable:!0}),i(h,"constructor",{value:m,configurable:!0}),m.displayName=s(h,f,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,s(t,f,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},x(E.prototype),s(E.prototype,u,(function(){return this})),t.AsyncIterator=E,t.async=function(e,a,n,o,i){void 0===i&&(i=Promise);var r=new E(d(e,a,n,o),i);return t.isGeneratorFunction(a)?r:r.next().then((function(t){return t.do
|