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%","50%"],radius:["60%","85%"],data:[{value:e.repairEvent.helderWaitingCount,name:"设备维修"},{value:e.upkeepRecord,name:"设备保养"},{value:e.patrolRecord.helderWaitingCount,name:"设备巡检"}]}]}),s.on("click",function(t){"设备巡检"==t.name?i.$router.push({path:"/inspection/daily",query:{t:Date.now()}}):"设备保养"==t.name?i.$router.push({path:"/upkeep/execution",query:{t:Date.now()}}):"设备维修"==t.name&&i.$router.push({path:"/repair/index",query:{t:Date.now()}})})}})},preview:function(t){this.dialogVisible=!0,this.viewDetail={},this.viewDetail=s()({},this.viewDetail,t)},moreTasks:function(t){var e="/task/index";0===t?e="/task/index":1===t?e="/task/untreated":2===t&&(e="/task/unacceptance"),this.$router.push({path:e,query:{t:Date.now()}})},moreDailys:function(){this.$router.push({path:"/schedule/dailyplan",query:{t:Date.now(),active:"cc"}})},moreWeeklys:function(){this.$router.push({path:"/schedule/weekplan",query:{t:Date.now(),active:"cc"}})},moreReims:function(){this.$router.push({path:"/schedule/reimburse",query:{t:Date.now(),active:"cc"}})},morePays:function(){this.$router.push({path:"/schedule/pay",query:{t:Date.now(),active:"cc"}})},moreOvertimes:function(){this.$router.push({path:"/schedule/overtime",query:{t:Date.now(),active:"cc"}})},moreLeaves:function(){this.$router.push({path:"/schedule/leave",query:{t:Date.now(),active:"cc"}})},moreCarUses:function(){this.$router.push({path:"/schedule/car_use",query:{t:Date.now(),active:"cc"}})},moreSealUses:function(){this.$router.push({path:"/schedule/seal_use",query:{t:Date.now(),active:"cc"}})},morePurchaseApply:function(){this.$router.push({path:"/purchase/purchase_apply_index",query:{t:Date.now(),active:"cc"}})},morePurchaseContract:function(){this.$router.push({path:"/purchase/purchase_contract_index",query:{t:Date.now(),active:"cc"}})},moreSaleApply:function(){this.$router.push({path:"/sales/salesContract",query:{t:Date.now(),active:"cc"}})},moreOutSourceApply:function(){this.$router.push({path:"/outsourcing/outsourcing_contract_index",query:{t:Date.now(),active:"cc"}})},moreNews:function(){this.$router.push({path:"/schedule/news",query:{t:Date.now()}})}})},p={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"index-box"},[a("div",{staticStyle:{width:"39%"}},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("h2",[t._v("\n 企业运营\n ")])]),t._v(" "),a("div",{staticClass:"dmap-box"},[a("div",{staticClass:"eventmap",staticStyle:{"margin-left":"15%"}},[a("el-progress",{attrs:{type:"circle",width:"200","stroke-width":15,percentage:100,format:function(){return t.progressFormat()}}})],1),t._v(" "),a("dl",{staticClass:"data-show"},t._l(t.userInfo,function(e,i){return a("dd",{key:i,staticStyle:{margin:"10px",cursor:"pointer"}},[t._v("\n "+t._s("total"!==i?i:"")+"\n "),a("i",[t._v(t._s("total"!==i?e:""))])])}),0)])]),t._v(" "),a("el-card",{staticClass:"box-card",staticStyle:{width:"100%"}},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("h2",[t._v("\n 设备运营\n ")])]),t._v(" "),a("div",{staticClass:"dmap-box"},[a("div",{staticClass:"eventmap",staticStyle:{"margin-left":"15%"}},[a("el-progress",{attrs:{type:"circle",color:"#f59a23",width:"200","stroke-width":15,percentage:100,format:function(){return t.progressFormat1()}}})],1),t._v(" "),a("dl",{staticClass:"data-show"},t._l(t.deviceList,function(e,i){return a("dd",{key:i,staticStyle:{margin:"10px",cursor:"pointer"}},[t._v("\n "+t._s("total"!==i?i:"")+"\n "),a("i",[t._v(t._s("total"!==i?e:""))])])}),0)])])],1),t._v(" "),a("el-card",{staticClass:"box-card2",staticStyle:{width:"60%"}},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("h2",[t._v("\n 公司信息\n ")])]),t._v(" "),a("div",{staticClass:"schedule"},[a("el-row",{attrs:{gutter:"20"}},[a("el-col",{attrs:{span:12}},[a("img",{staticStyle:{width:"350px",height:"200px"},attrs:{src:t.formData.zp}})]),t._v(" "),a("el-col",{attrs:{span:12}},[a("el-descriptions",{attrs:{column:1,size:"medium"}},[a("el-descriptions-item",{attrs:{label:"公司名称"}},[t._v(t._s(t.formData.name))]),t._v(" "),a("el-descriptions-item",{attrs:{label:"邮编"}},[t._v(t._s(t.formData.zipCode))]),t._v(" "),a("el-descriptions-item",{attrs:{label:"公司邮箱"}},[t._v(t._s(t.formData.email))]),t._v(" "),a("el-descriptions-item",{attrs:{label:"办公电话"}},[t._v(t._s(t.formData.telephone))]),t._v(" "),a("el-descriptions-item",{attrs:{label:"传真"}},[t._v(t._s(t.formData.fax))]),t._v(" "),a("el-descriptions-item",{attrs:{label:"办公地址"}},[t._v(t._s(t.formData.address))])],1)],1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-descriptions",{attrs:{column:1,size:"medium"}},[a("el-descriptions-item",{attrs:{label:"公司介绍"}},[t._v(t._s(t.formData.companyIntroduction))])],1)],1)],1)],1)]),t._v(" "),a("el-dialog",{staticClass:"news-dialog",attrs:{title:t.viewDetail.title,visible:t.dialogVisible,width:"760px"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("div",{staticClass:"news-info"},[a("h5",[a("span",[t._v("发布日期:"+t._s(t.viewDetail.createttime))]),t._v(" "),a("span",[t._v("发布人:"+t._s(t.viewDetail.createbyname))]),t._v(" "),a("span",[t._v("发布对象:全体员工")])]),t._v(" "),a("article",[a("p",{domProps:{innerHTML:t._s(t.viewDetail.text)}})])])])],1)},staticRenderFns:[]};var h=a("VU/8")(l,p,!1,function(t){a("13fz"),a("v2jZ")},"data-v-2ee72d70",null);e.default=h.exports},v2jZ:function(t,e){}}); |