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
4.8 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/dadui/jiuyuan/jiuyuan"],{"1ffc":function(t,e,a){"use strict";var n=a("2bdf"),i=a.n(n);i.a},"2b06":function(t,e,a){"use strict";a.d(e,"b",(function(){return i})),a.d(e,"c",(function(){return s})),a.d(e,"a",(function(){return n}));var n={qiunDataCharts:function(){return Promise.all([a.e("common/vendor"),a.e("uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts")]).then(a.bind(null,"0394"))}},i=function(){var t=this,e=t.$createElement,n=(t._self._c,a("a209")),i=a("87b3"),s=a("8a99");t.$mp.data=Object.assign({},{$root:{m0:n,m1:i,m2:s}})},s=[]},"2bdf":function(t,e,a){},"51e6":function(t,e,a){"use strict";(function(t){a("899b");n(a("66fd"));var e=n(a("a34c"));function n(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=a,t(e.default)}).call(this,a("543d")["createPage"])},"8d2b":function(t,e,a){"use strict";a.r(e);var n=a("9ee3"),i=a.n(n);for(var s in n)"default"!==s&&function(t){a.d(e,t,(function(){return n[t]}))}(s);e["default"]=i.a},"9ee3":function(t,e,a){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a={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]}},created: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,a=(this.dates.year,this.dates.month,t.getStorageSync("user").id),n=t.getStorageSync("user").roles;console.log(t.getStorageSync("user"));var i=n.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,n){if(console.log(n),e.isSupervisor)e.getSupervisor();else{e.user=n.items;for(var i=0;i<e.user.length;i++)e.user[i]["tasknub"]=0,e.user[i]["rate"]=0}e.getTaskListOfStation(a)}))},getSupervisor:function(){var e=this;this.$request.get("/api/Users/Inspectors",{},(function(a,n){console.log(t.getStorageSync("user").roles,8800);for(var i=t.getStorageSync("user").name,s=0;s<n.length;s++)if(n[s].name=i){e.user=[n[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 a=this;console.log(e);var n=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),a.list=e.items,a.list["tasknub"]=0;for(var i=0;i<a.user.length;i++)for(var s=0;s<n.list.length;s++){if(n.list[s].checkTime){var r=n.list[s].checkTime.substring(0,10);n.list[s].checkTime=r}"待检查"!=n.list[s].inspectionResult&&(a.user[i].tasknub+=1)}console.log(a.list),a.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){console.log(e),t.navigateTo({url:"/pages/task/details?id="+e.company.id+"&uid="+e.id})}}};e.default=a}).call(this,a("543d")["default"])},a34c:function(t,e,a){"use strict";a.r(e);var n=a("2b06"),i=a("8d2b");for(var s in i)"default"!==s&&function(t){a.d(e,t,(function(){return i[t]}))}(s);a("1ffc");var r,o=a("f0c5"),u=Object(o["a"])(i["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],r);e["default"]=u.exports}},[["51e6","common/runtime","common/vendor"]]]);