service.js 7.9 KB

12
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/report/service"],{231:function(e,n,t){"use strict";(function(e){t(5);r(t(4));var n=r(t(232));function r(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=t,e(n.default)}).call(this,t(1)["createPage"])},232:function(e,n,t){"use strict";t.r(n);var r=t(233),o=t(235);for(var u in o)"default"!==u&&function(e){t.d(n,e,(function(){return o[e]}))}(u);t(237);var i,c=t(11),a=Object(c["default"])(o["default"],r["render"],r["staticRenderFns"],!1,null,null,null,!1,r["components"],i);a.options.__file="pages/report/service.vue",n["default"]=a.exports},233:function(e,n,t){"use strict";t.r(n);var r=t(234);t.d(n,"render",(function(){return r["render"]})),t.d(n,"staticRenderFns",(function(){return r["staticRenderFns"]})),t.d(n,"recyclableRender",(function(){return r["recyclableRender"]})),t.d(n,"components",(function(){return r["components"]}))},234:function(e,n,t){"use strict";var r;t.r(n),t.d(n,"render",(function(){return o})),t.d(n,"staticRenderFns",(function(){return i})),t.d(n,"recyclableRender",(function(){return u})),t.d(n,"components",(function(){return r}));try{r={uniCard:function(){return t.e("uni_modules/uni-card/components/uni-card/uni-card").then(t.bind(null,276))},uniSection:function(){return t.e("uni_modules/uni-section/components/uni-section/uni-section").then(t.bind(null,269))},uniForms:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uni-forms/components/uni-forms/uni-forms")]).then(t.bind(null,337))},uniFormsItem:function(){return t.e("uni_modules/uni-forms/components/uni-forms-item/uni-forms-item").then(t.bind(null,346))},uniEasyinput:function(){return t.e("uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput").then(t.bind(null,297))},uniDataCheckbox:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox")]).then(t.bind(null,353))},uniDataSelect:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uni-data-select/components/uni-data-select/uni-data-select")]).then(t.bind(null,401))},uniIcons:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(t.bind(null,322))}}}catch(c){if(-1===c.message.indexOf("Cannot find module")||-1===c.message.indexOf(".vue"))throw c;console.error(c.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var o=function(){var e=this,n=e.$createElement;e._self._c},u=!1,i=[];o._withStripped=!0},235:function(e,n,t){"use strict";t.r(n);var r=t(236),o=t.n(r);for(var u in r)"default"!==u&&function(e){t.d(n,e,(function(){return r[e]}))}(u);n["default"]=o.a},236:function(e,n,t){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=i(t(18)),o=i(t(220)),u=t(23);function i(e){return e&&e.__esModule?e:{default:e}}function c(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?c(Object(t),!0).forEach((function(n){s(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l(e,n,t,r,o,u,i){try{var c=e[u](i),a=c.value}catch(s){return void t(s)}c.done?n(a):Promise.resolve(a).then(r,o)}function d(e){return function(){var n=this,t=arguments;return new Promise((function(r,o){var u=e.apply(n,t);function i(e){l(u,r,o,i,c,"next",e)}function c(e){l(u,r,o,i,c,"throw",e)}i(void 0)}))}}var f={data:function(){return{pickerList:[],pickerValue:"",pickerName:"",indicatorStyle:"height: 50px",visible:!1,btnText:"签到",baseUrl:u.BASE_URL.url,filesUrl:u.BASE_URL.fileUrl,formData:{},fileds:[{name:"deptId",title:"报到社区",type:"picker"},{name:"description",title:"报到内容"},{name:"photo",title:"上传照片",type:"upload"}],rules:{photo:{rules:[{required:!0,errorMessage:"请上传照片"}]},description:{rules:[{required:!0,errorMessage:"请填写报到内容"}]},deptId:{rules:[{required:!0,errorMessage:"请选择报到社区"}]}},isdy:1}},mounted:function(){var e=this;return d(r.default.mark((function n(){var t,u,i;return r.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,o.default.getisdy();case 2:if(t=n.sent,e.isdy=t.data,!t||0!=t.data){n.next=6;break}return n.abrupt("return");case 6:return n.next=8,o.default.getCommunity();case 8:return u=n.sent,e.pickerList=u.rows,n.next=12,e.setDict();case 12:return n.next=14,o.default.getqdstatus();case 14:i=n.sent,i.data&&(e.formData=i.data,e.btnText="已签到");case 16:case"end":return n.stop()}}),n)})))()},onShow:function(){},methods:{bindChange:function(e){console.log(e,"社区选择改变")},pickerClick:function(){console.log("选择社区"),this.visible=!0},setDict:function(){var e=this;return d(r.default.mark((function n(){return r.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,Promise.all(e.fileds.map(function(){var n=d(r.default.mark((function n(t){var u,i;return r.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if("deptId"==t.name&&(t.dict=e.pickerList.map((function(e){return a(a({},e),{},{text:e.deptName,value:e.deptId})}))),!t.formatter||!t.formatter.includes("dict")){n.next=7;break}return u=t.formatter.split(":")[1],n.next=5,o.default.getDict(u);case 5:i=n.sent,200==i.code&&(t.dict=i.data.map((function(e){return a(a({},e),{},{value:e.dictValue,text:e.dictLabel})})));case 7:return n.abrupt("return",t);case 8:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()));case 2:e.fileds=n.sent;case 3:case"end":return n.stop()}}),n)})))()},upVideo:function(){var n=this;return d(r.default.mark((function t(){var o,i;return r.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:o=n,i=e.getStorageSync("token"),e.chooseImage({count:1,success:function(){var n=d(r.default.mark((function n(t){var c;return r.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:wx.showLoading({title:"上传中"}),c=t.tempFilePaths,e.uploadFile({url:u.BASE_URL.url+"/activity/photo",name:"file",header:{Authorization:"Bearer ".concat(i)},filePath:c[0],success:function(e){var n=JSON.parse(e.data);o.$set(o.formData,"photo",n.imgUrl)},fail:function(e){console.log(e),wx.showToast({title:"上传失败"})},complete:function(){wx.hideLoading()}});case 3:case"end":return n.stop()}}),n)})));function t(e){return n.apply(this,arguments)}return t}()});case 3:case"end":return t.stop()}}),t)})))()},submitForm:function(){var n=this;this.$refs.baseForm.validate().then(function(){var t=d(r.default.mark((function t(u){var i;return r.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,o.default.clockin(n.formData);case 2:i=t.sent,200==i.code&&(e.showToast({title:"签到成功",icon:"success",duration:2e3}),setTimeout((function(){e.navigateBack()}),1e3));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(e){console.log("表单错误信息:",e)}))}},onReachBottom:function(){}};n.default=f}).call(this,t(1)["default"])},237:function(e,n,t){"use strict";t.r(n);var r=t(238),o=t.n(r);for(var u in r)"default"!==u&&function(e){t.d(n,e,(function(){return r[e]}))}(u);n["default"]=o.a},238:function(e,n,t){}},[[231,"common/runtime","common/vendor"]]]);
  2. //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/report/service.js.map