You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
5.0 KiB
1 lines
5.0 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{"387a":function(t,e,n){"use strict";var a=n("a65d"),i=n.n(a);i.a},4850:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={data:function(){return{title:"Hello",identity:0,progressNub:60,chartData:{series:[{data:[{name:"上级指派",value:0},{name:"自主任务",value:0},{name:"申领任务",value:0}]}]},dates:{year:2022,month:8,day:0},today:{month:8},opts:{rotate:!1,rotateLock:!1,color:["#FACE15","#04F1C9","#3990F1"],padding:[5,5,5,5],dataLabel:!1,legend:{show:!1,fontColor:"#fff",position:"right",lineHeight:20},title:{name:"任务总数",fontSize:15,color:"#fff"},subtitle:{name:"0",fontSize:25,color:"#fff"},extra:{ring:{width:50,height:50,ringWidth:10,activeOpacity:.5,activeRadius:10,offsetAngle:0,labelWidth:15,border:!1,customRadius:60,borderWidth:3,borderColor:"#FFFFFF",centerColor:"#57B5FF",linearType:"none"}}},user:[{tasknub:0}],isSupervisor:!1,list:[],month:0,nub:0,months:[1,2,3,4,5,6,7,8,9,10,11,12]}},onLoad:function(){t.getStorageSync("user");var e=new Date;this.dates.month=e.getMonth()+1,this.today.month=e.getMonth()+1,this.month=e.getMonth()+1,this.dates.year=e.getFullYear(),this.dates.day=e.getDate(),this.getOrganizations()},onReady:function(){},methods:{getOrganizations:function(){var e=this,n=(this.dates.year,this.dates.month,t.getStorageSync("user").id),a=t.getStorageSync("user").roles;console.log(t.getStorageSync("user"));var i=a.find((function(t){return-1!=t.name.indexOf("检查")}));this.isSupervisor=!!i;var s={ContainsChildren:!0,pageSize:9999};this.$request.get("/api/Organizations",s,(function(t,a){if(console.log(a),e.isSupervisor)e.getSupervisor();else{e.user=a.items;for(var i=0;i<e.user.length;i++)e.user[i]["tasknub"]=0,e.user[i]["rate"]=0}e.getTaskListOfStation(n)}))},getSupervisor:function(){var e=this;this.$request.get("/api/Users/Inspectors",{},(function(n,a){console.log(t.getStorageSync("user").roles,8800);for(var i=t.getStorageSync("user").name,s=0;s<a.length;s++)if(a[s].name=i){e.user=[a[s]],console.log(e.user,8070);for(var r=0;r<e.user.length;r++)e.user[r]["tasknub"]=0,e.user[r]["rate"]=0}}))},getTaskListOfStation:function(e){var n=this;console.log(e);var a=this,i=t.getStorageSync("user").organizationId,s=this.dates.year+"-"+this.dates.month+"-01",r={Month:s,SupervisorId:this.isSupervisor?e:null,AssitantOrganizationId:this.isSupervisor?null:i,PageNumber:1,approvalStatuses:["待检查","已检查"],PageSize:9999};this.$request.get("/api/PlanTasks",r,(function(t,e){console.log(e),n.list=e.items,n.list["tasknub"]=0;for(var i=0;i<n.user.length;i++)for(var s=0;s<a.list.length;s++){if(a.list[s].checkTime){var r=a.list[s].checkTime.substring(0,10);a.list[s].checkTime=r}"待检查"!=a.list[s].inspectionResult&&(n.user[i].tasknub+=1)}console.log(n.list),n.getServerData()}))},getServerData:function(){this.nub=0,this.chartData={series:[{data:[{name:"上级指派",value:0},{name:"自主任务",value:0},{name:"申领任务",value:0}]}]};for(var t=0;t<this.list.length;t++)for(var e=0;e<this.chartData.series[0].data.length;e++)this.chartData.series[0].data[e].name==this.list[t].creationType&&(this.chartData.series[0].data[e].value+=1,this.nub=this.nub+1,this.opts.subtitle.name=JSON.stringify(this.nub));this.identity=1},dateYear:function(t){console.log(t),this.dates.year=t.detail.value,this.getOrganizations()},dateMonth:function(t){t>this.month||(this.dates.month=t,this.getOrganizations())},start:function(e){t.navigateTo({url:"/pages/task/details?id="+e.company.id})}}};e.default=n}).call(this,n("543d")["default"])},"502f":function(t,e,n){"use strict";n.r(e);var a=n("89f7"),i=n("5f72");for(var s in i)"default"!==s&&function(t){n.d(e,t,(function(){return i[t]}))}(s);n("387a");var r,o=n("f0c5"),u=Object(o["a"])(i["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],r);e["default"]=u.exports},"5f72":function(t,e,n){"use strict";n.r(e);var a=n("4850"),i=n.n(a);for(var s in a)"default"!==s&&function(t){n.d(e,t,(function(){return a[t]}))}(s);e["default"]=i.a},"89f7":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return s})),n.d(e,"a",(function(){return a}));var a={qiunDataCharts:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts")]).then(n.bind(null,"0394"))}},i=function(){var t=this,e=t.$createElement,a=(t._self._c,n("a209")),i=n("87b3"),s=n("8a99"),r=n("6924"),o=t.__map(t.list,(function(e,a){var i=t.__get_orig(e),s=t.__map(e.supervisors,(function(e,a){var i=t.__get_orig(e),s=e.posts&&"主查人员"==e.posts[0]?n("6246"):null,r=e.posts&&"协查人员"==e.posts[0]?n("2657"):null;return{$orig:i,m3:s,m4:r}}));return{$orig:i,l0:s}}));t.$mp.data=Object.assign({},{$root:{m0:a,m1:i,m2:s,m5:r,l1:o}})},s=[]},"8e33":function(t,e,n){"use strict";(function(t){n("899b");a(n("66fd"));var e=a(n("502f"));function a(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=n,t(e.default)}).call(this,n("543d")["createPage"])},a65d:function(t,e,n){}},[["8e33","common/runtime","common/vendor"]]]); |