1 line
9.5 KiB
JavaScript
1 line
9.5 KiB
JavaScript
|
webpackJsonp([229],{"13fz":function(t,e){},Qt9A:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a("woOf"),s=a.n(i),n=a("Dd8w"),r=a.n(n),o=a("XLwt"),u=a.n(o),c=(a("lbHh"),a("NYxO")),l={name:"home_index",data:function(){return{formData:{},uploadAttachment:[],viewDetail:{title:"",createttime:"",createbyname:"",text:""},dialogVisible:!1,dailyCount:0,weeklyCount:0,payCount:0,reimCount:0,overTimeCount:0,leaveCount:0,carUseApplyCount:0,sealUseApplyCount:0,purchaseApplyCount:0,purchaseContractApplyCount:0,saleApplyCount:0,outsourceApplyCount:0,deviceAllCount:0,tableData:[],createTaskCount:0,waitingStatusCount:0,allPendingCount:0,repairPendingCount:0,upPendingCount:0,inspecPendingCount:0,userInfo:{},deviceList:{}}},mounted:function(){this.$route.query.isFirst&&1==this.$route.query.isFirst&&this.$message({message:"请修改默认密码",type:"warning"}),this.initmap(),this.initData(),this.getDetail(),this.fetchUser(),this.fetchDevice()},methods:r()({},Object(c.b)({getLogoUrl:"common/getLogoUrl"}),{fetchUser:function(){var t=this;this.$api.yxkAPI.yxkGet("/apis/index/user",{}).then(function(e){t.userInfo=e.data})},fetchDevice:function(){var t=this;this.$api.yxkAPI.yxkGet("/apis/index/device",{}).then(function(e){t.deviceList=e.data})},getDetail:function(){var t=this;this.$api.companyAPI.detail().then(function(e){if(0==e.code){t.formData=s()({},t.formData,e.result),t.formData.province=e.result.provinceId,t.$set(t.formData,"zipCode",e.result.zipCode?e.result.zipCode:""),t.changeProvince(e.result.provinceId),t.formData.city=e.result.cityId,t.changeCity(e.result.cityId),t.formData.district=e.result.districtId,t.formData.companyIntroduction=e.result.companyIntroduction,t.formData.logoUrl=e.result.logoUrl;var a={fileName:"logo",filePath:t.formData.logoUrl};t.uploadAttachment.push(a)}})},progressFormat:function(){var t=this.userInfo?this.userInfo.total:0;return console.log(t,"-----"),"用户数("+t+")"},progressFormat1:function(){return"设备数("+(this.deviceList?this.deviceList.total:0)+")"},linkto:function(t){0==t?this.$router.push({path:"/task/index",query:{t:Date.now()}}):1==t?this.$router.push({path:"/task/untreated",query:{t:Date.now()}}):2==t?this.$router.push({path:"/task/unacceptance",query:{t:Date.now()}}):3==t?this.$router.push({path:"/repair/index",query:{t:Date.now()}}):4==t?this.$router.push({path:"/upkeep/execution",query:{t:Date.now()}}):5==t&&this.$router.push({path:"/inspection/daily",query:{t:Date.now()}})},initmap:function(){},initData:function(){var t=this;this.$api.taskMainAPI.getInfo({pageno:1,pagesize:5}).then(function(e){if(0==e.code){t.tableData=e.news&&e.news.datas?e.news.datas:[],t.dailyCount=1,t.weeklyCount=2,t.reimCount=3,t.payCount=4,t.overTimeCount=5,t.leaveCount=6,t.sealUseApplyCount=7,t.carUseApplyCount=8,t.purchaseApplyCount=9,t.purchaseContractApplyCount=1,t.saleApplyCount=2,t.outsourceApplyCount=3,t.createTaskCount=e.taskMain.waitingDealCount,t.waitingStatusCount=e.taskMain.waitingCheckCount;var a=u.a.init(t.$refs.eventmap);e.waitingDealWeekListCount,e.waitingCheckWeekListCount;a.setOption({color:["#cd63fe","#66cccc"],tooltip:{trigger:"item",formatter:"{a} <br/>{b}: {c} ({d}%)"},series:[{name:"任务事件",type:"pie",label:{normal:{show:!1,position:"center"}},center:["50%","50%"],radius:["60%","85%"],data:[{value:t.waitingStatusCount,name:"待验收"},{value:t.createTaskCount,name:"待处理"}]}]});var i=t;a.on("click",function(t){"待处理"==t.name?i.$router.push({path:"/task/untreated",query:{t:Date.now()}}):"待验收"==t.name&&i.$router.push({path:"/task/unacceptance",query:{t:Date.now()}})}),t.allPendingCount=e.repairEvent.helderWaitingCount+e.upkeepRecord+e.patrolRecord.helderWaitingCount,t.repairPendingCount=e.repairEvent.helderWaitingCount,t.upPendingCount=e.upkeepRecord,t.inspecPendingCount=e.patrolRecord.helderWaitingCount;var s=u.a.init(t.$refs.dmap);s.setOption({color:["#66cccc","#cd63fe","#979aff"],tooltip:{trigger:"item",formatter:"{a} <br/>{b}: {c} ({d}%)"},series:[{name:"数量",type:"pie",label:{normal:{show:!1,position:"center"}},center:["50%","
|