mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-11 01:10:29 +08:00
0c56a3e599
Made-with: Cursor Former-commit-id: 571c9a99ee26d90505e550c287eb8ad8d743ff8d
1 line
19 KiB
JavaScript
Executable File
1 line
19 KiB
JavaScript
Executable File
(window["webpackJsonp_heat-analysis-portal"]=window["webpackJsonp_heat-analysis-portal"]||[]).push([["chunk-a716ef02"],{"1c22":function(e,t,a){"use strict";var r=a("70e9"),n=a.n(r);n.a},"275f":function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-select",{attrs:{value:e.valueTitle,clearable:e.clearable,placeholder:"请选择机构","popper-class":"select-tree-popper"},on:{clear:e.clearHandle}},[a("el-input",{staticClass:"selectInput",attrs:{maxlength:32,placeholder:"输入关键字搜索"},model:{value:e.filterText,callback:function(t){e.filterText=t},expression:"filterText"}}),a("el-option",{attrs:{value:e.valueTitle,label:e.valueTitle}},[a("el-tree",{ref:"selectTreeRef",attrs:{id:"tree-option",data:e.treeOptions,props:e.treeProps,"default-expand-all":!0,"expand-on-click-node":!1,"highlight-current":!0,"node-key":e.treeProps.value,"default-expanded-keys":e.defaultExpandedKey,"filter-node-method":e.filterNode},on:{"node-click":e.handleNodeClick}})],1)],1)},n=[],i=(a("4de4"),a("4160"),a("c975"),a("b0c0"),a("159b"),a("d4ec")),s=a("bee2"),o=a("99de"),c=a("7e84"),l=a("262e"),u=a("9ab4"),h=a("60a3"),d=function(e){function t(){var e;return Object(i["a"])(this,t),e=Object(o["a"])(this,Object(c["a"])(t).apply(this,arguments)),e.clearable=!0,e.filterText="",e.valueId=e.treeValue,e.valueTitle="",e.defaultExpandedKey=[],e}return Object(l["a"])(t,e),Object(s["a"])(t,[{key:"valueChange",value:function(){this.valueId=this.treeValue,this.valueId||(this.valueTitle=""),this.initHandle()}},{key:"filterTextChange",value:function(e){this.selectTreeRef.filter(e)}},{key:"created",value:function(){}},{key:"mounted",value:function(){this.initHandle()}},{key:"initHandle",value:function(){this.selectTreeRef&&this.valueId&&this.selectTreeRef.getNode(this.valueId)&&this.selectTreeRef.getNode(this.valueId).data&&(this.valueTitle=this.selectTreeRef.getNode(this.valueId).data[this.treeProps.label],this.selectTreeRef.setCurrentKey(this.valueId),this.defaultExpandedKey=[this.valueId])}},{key:"handleNodeClick",value:function(e){e&&(this.valueTitle=e[this.treeProps.label],this.valueId=e[this.treeProps.value],this.$emit("getValue",this.valueId),this.defaultExpandedKey=[])}},{key:"clearHandle",value:function(){this.valueTitle="",this.valueId="",this.defaultExpandedKey=[],this.clearSelected(),this.$emit("getValue",null)}},{key:"clearSelected",value:function(){var e=document.querySelectorAll("#tree-option .el-tree-node");e.forEach((function(e){return e.classList.remove("is-current")}))}},{key:"filterNode",value:function(e,t){return!e||-1!==t.name.indexOf(e)}},{key:"treeOptions",get:function(){return this.options}}]),t}(h["e"]);u["a"]([Object(h["c"])({type:Object,default:function(){}})],d.prototype,"treeProps",void 0),u["a"]([Object(h["c"])({type:Array,default:function(){return[]}})],d.prototype,"options",void 0),u["a"]([Object(h["c"])({type:String,default:""})],d.prototype,"treeValue",void 0),u["a"]([Object(h["c"])({type:Boolean,default:!0})],d.prototype,"clearable",void 0),u["a"]([Object(h["d"])()],d.prototype,"selectTreeRef",void 0),u["a"]([Object(h["f"])("treeValue",{immediate:!0})],d.prototype,"valueChange",null),u["a"]([Object(h["f"])("filterText")],d.prototype,"filterTextChange",null),d=u["a"]([Object(h["a"])({name:"SelectTree",components:{}})],d);var p=d,y=p,f=(a("c0b4"),a("2877")),b=Object(f["a"])(y,r,n,!1,null,"b2145ce4",null);t["a"]=b.exports},"313b":function(e,t,a){"use strict";a("d3b7"),a("96cf");var r=a("1da1"),n=a("d4ec"),i=a("bee2"),s=a("99de"),o=a("7e84"),c=a("262e"),l=a("9ab4"),u=a("60a3"),h=a("9dba"),d=a("6fc5"),p=function(e){function t(){var e;return Object(n["a"])(this,t),e=Object(s["a"])(this,Object(o["a"])(t).apply(this,arguments)),e.orgTreeData=[],e.orgId="",e}return Object(c["a"])(t,e),Object(i["a"])(t,[{key:"fetchOrganizationTree",value:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(){var t,a,r,n,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(e.prev=0,t=[],!this.userInfo.orgId){e.next=7;break}return e.next=5,this.service.organizationDetail(this.userInfo.orgId);case 5:a=e.sent,a&&a.data&&t.push(a.data);case 7:return r={parentId:this.userInfo.orgId,businessId:this.userInfo.businessId},e.next=10,this.service.organizationTree(r);case 10:return n=e.sent,i=n.data,i&&i.length>0&&(t&&t.length>0?(t[0].children=[],t[0].children=i):t=i),t&&t.length>0&&(this.orgId=t[0].id),this.orgTreeData=t,e.abrupt("return",Promise.resolve());case 18:return e.prev=18,e.t0=e["catch"](0),e.abrupt("return",Promise.resolve());case 21:case"end":return e.stop()}}),e,this,[[0,18]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"userInfo",get:function(){return Object(d["e"])(h["a"],this.$store).userInfo}}]),t}(u["e"]);p=l["a"]([Object(u["a"])({name:"OrgTreeMixins",components:{}})],p),t["a"]=p},"4d39":function(e,t,a){},"4f31":function(e,t,a){},"70e9":function(e,t,a){e.exports={elInputWidth:"200px",elInputNumberWidth:"200px",elTextareaWidth:"300px",elSelectWidth:"200px",appHeaderBg:"#014051",appIconBg:"#31b89a",appIconColor:"#fff",appIconSize:"30px",appNameColor:"#fff",appNameSize:"30px"}},"71c8":function(e,t,a){"use strict";a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return n}));var r=[{value:12,label:"60分钟"},{value:6,label:"30分钟"},{value:2,label:"10分钟"},{value:1,label:"5分钟"}],n=[{value:"date",label:"日"},{value:"week",label:"周"},{value:"month",label:"月"},{value:"year",label:"年"}]},8738:function(e,t,a){"use strict";var r=a("a5b6"),n=a.n(r);n.a},"8d99":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"compare-wrp"},[a("div",{staticClass:"search-bar flex-middle"},[a("select-tree",{staticClass:"item",attrs:{options:e.orgTreeData,treeValue:e.searchForm.orgId,treeProps:{value:"id",label:"name",children:"children"},height:"200"},on:{getValue:function(t){return e.selectTreeChange(t)}}}),a("el-radio-group",{staticClass:"item",on:{change:e.changeDateCycle},model:{value:e.searchForm.dateCycle,callback:function(t){e.$set(e.searchForm,"dateCycle",t)},expression:"searchForm.dateCycle"}},e._l(e.timeTypeOptions,(function(t){return a("el-radio-button",{key:t.key,attrs:{label:t.value}},[e._v(e._s(t.label))])})),1),a("el-date-picker",{staticClass:"item",attrs:{type:e.searchForm.dateCycle,format:e.dateFormatObj[e.searchForm.dateCycle],"value-format":"yyyyMMdd",placeholder:"请选择日期范围"},on:{change:e.onDateChange},model:{value:e.searchForm.queryBeginDay,callback:function(t){e.$set(e.searchForm,"queryBeginDay",t)},expression:"searchForm.queryBeginDay"}}),a("el-select",{staticClass:"item",attrs:{placeholder:"选择业务区域",clearable:"",filterable:"",multiple:"","collapse-tags":""},model:{value:e.searchForm.areaIds,callback:function(t){e.$set(e.searchForm,"areaIds",t)},expression:"searchForm.areaIds"}},e._l(e.areaList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1),a("el-button",{attrs:{type:"primary"},on:{click:e.onSearch}},[e._v("查询")]),a("el-button",{staticStyle:{"margin-left":"15px"},on:{click:e.onReset}},[e._v("重置")])],1),a("div",{staticClass:"flex-between-middle operate-group"},[a("el-button",{attrs:{type:"primary",disabled:!e.listData||0===e.listData.length||!e.searchForm.queryBeginDay||!e.searchForm.queryEndDay},on:{click:e.onExport}},[e._v("导出")]),a("el-radio-group",{on:{change:e.setEcharts},model:{value:e.showType,callback:function(t){e.showType=t},expression:"showType"}},[a("el-radio-button",{attrs:{label:"chart"}},[e._v("图表")]),a("el-radio-button",{attrs:{label:"table"}},[e._v("表格")])],1)],1),a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"app-main"},[a("div",{staticClass:"compare-echarts-box"},[a("echarts-box",{directives:[{name:"show",rawName:"v-show",value:"chart"===e.showType,expression:"'chart' === showType"}],ref:"echartsBoxRef",staticClass:"echarts-box"}),a("table-box",{directives:[{name:"show",rawName:"v-show",value:"table"===e.showType,expression:"'table' === showType"}],attrs:{listData:e.listData}})],1)])])},n=[],i=(a("a4d3"),a("4de4"),a("4160"),a("fb6a"),a("a9e3"),a("e439"),a("dbb4"),a("b64b"),a("159b"),a("ade3")),s=(a("96cf"),a("1da1")),o=a("d4ec"),c=a("bee2"),l=a("99de"),u=a("7e84"),h=a("262e"),d=a("9ab4"),p=a("60a3"),y=a("71c8"),f=a("275f"),b=a("313b"),v=a("e33d"),m=a("5a0c"),g=a.n(m),O=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("EchartBar",{ref:"eHeatCompareAreaLine",attrs:{selShow:!1}})],1)},x=[],j=(a("e01a"),a("d28b"),a("b0c0"),a("d3b7"),a("e25e"),a("3ca3"),a("ddb0"),a("313e")),w=a.n(j),D=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"echarts-item-box"},[a("div",{ref:"echartsAreaLineRef",staticClass:"echarts-item"})])},k=[],T=function(e){function t(){return Object(o["a"])(this,t),Object(l["a"])(this,Object(u["a"])(t).apply(this,arguments))}return Object(h["a"])(t,e),Object(c["a"])(t,[{key:"clear",value:function(){var e=w.a.init(this.echartsAreaLineRef);e.clear()}},{key:"setEcharts",value:function(e,t,a){var r=w.a.init(this.echartsAreaLineRef);r.resize(),r.clear();var n=t.length>=this.showDataZoomLength,i={backgroundColor:this.bgcolor,title:{text:this.titleShow,top:25,left:52,textStyle:{fontSize:18},show:!this.showTip},grid:{left:"52px",top:"120px",right:"45px",bottom:n?"68px":"48px"},legend:{itemWidth:11,itemHeight:11,top:55,x:"right",icon:"circle",data:a},tooltip:{trigger:"axis",axisPointer:{type:"none",lineStyle:{color:"ccc"}},borderColor:"#FFF",borderWidth:1,backgroundColor:"rgba(255, 255, 255, 1)",textStyle:{color:"#000"},padding:[8,13],extraCssText:"box-shadow:0px 5px 10px 0px rgba(204,204,204,0.5)"},dataZoom:[{show:n,start:n?50:0,end:100,textStyle:{color:"#8cb1cc"},left:"50px"}],xAxis:{type:"category",data:t,axisTick:{show:!1},axisLine:{show:!1,lineStyle:{color:"#bfd5e3"}},splitLine:{show:!0,lineStyle:{color:"#f5f9fc"}},axisLabel:{color:"#c8c8c8"}},yAxis:{minInterval:1,axisTick:{show:!1},axisLabel:{color:"#c8c8c8"},splitLine:{lineStyle:{color:"#EAEAEA",type:"dashed"}},axisLine:{show:!1,lineStyle:{color:"#bfd5e3"}}},series:e};r.setOption(i),window.addEventListener("resize",(function(){r.resize()}))}},{key:"titleShow",get:function(){return this.title||"业务区平均人数"}}]),t}(p["e"]);d["a"]([Object(p["c"])({type:String,default:"#fff"})],T.prototype,"bgcolor",void 0),d["a"]([Object(p["c"])({type:Boolean,default:!1})],T.prototype,"showTip",void 0),d["a"]([Object(p["c"])({type:Number,default:30})],T.prototype,"showDataZoomLength",void 0),d["a"]([Object(p["c"])(String)],T.prototype,"title",void 0),d["a"]([Object(p["c"])(String)],T.prototype,"tip",void 0),d["a"]([Object(p["d"])()],T.prototype,"echartsAreaLineRef",void 0),T=d["a"]([Object(p["a"])({components:{}})],T);var C=T,F=C,I=(a("ff93"),a("2877")),E=Object(I["a"])(F,D,k,!1,null,"039f6633",null),S=E.exports,L=function(e){function t(){var e;return Object(o["a"])(this,t),e=Object(l["a"])(this,Object(u["a"])(t).apply(this,arguments)),e.color=["254,128,55","139,212,110","7,101,148","36,143,247","248,195,248"],e.colorLinear=["255,240,192","9,188,183","114,231,255","104,81,241","84,83,84"],e}return Object(h["a"])(t,e),Object(c["a"])(t,[{key:"initEcharts",value:function(e){var t=this,a=[],r=[],n=[],i={},s=e.length>0?e[0].list:[];for(var o in s.forEach((function(e,a){i[e.areaId]={name:e.name,color:t.color[a],colorLinear:t.colorLinear[a],data:[]}})),e.forEach((function(e){a.push(e.hour>=10?"".concat(e.hour,":00"):"0".concat(e.hour,":00")),e.list.forEach((function(e){i[e.areaId].data.push(e.headCount||0)}))})),i)if(i.hasOwnProperty(o)){var c=i[o];n.push({name:c.name,type:"line",itemStyle:{normal:{color:new w.a.graphic.LinearGradient(0,0,1,0,[{offset:0,color:"rgba("+c.color+")"},{offset:1,color:"rgba("+c.colorLinear+")"}])}},data:c.data})}this.uniqueArrayAddName(n,"name"),n.forEach((function(e){r.push(e.name)})),this.setEcharts(n,a,r)}},{key:"setEcharts",value:function(e,t,a){var r=this;this.$nextTick((function(){r.eHeatCompareAreaLine.setEcharts(e,t,a)}))}},{key:"uniqueArrayAddName",value:function(e,t){for(var a=[e[0]],r=1;r<e.length;r++){var n=e[r],i=!0,s=!1,o=void 0;try{for(var c,l=a[Symbol.iterator]();!(i=(c=l.next()).done);i=!0){var u=c.value;if(n[t]===u[t]){var h=/^\([0-9]\)$/;if(h.test(n[t].slice(-3))){var d=parseInt(n[t].slice(-2,-1),10);n[t]=n[t].slice(0,-3)+"(".concat(++d,")")}else n[t]+="(1)"}}}catch(p){s=!0,o=p}finally{try{i||null==l.return||l.return()}finally{if(s)throw o}}a.push(n)}return a}},{key:"clear",value:function(){this.eHeatCompareAreaLine.clear()}}]),t}(p["e"]);d["a"]([Object(p["d"])()],L.prototype,"eHeatCompareAreaLine",void 0),L=d["a"]([Object(p["a"])({components:{EchartBar:S}})],L);var M=L,_=M,B=Object(I["a"])(_,O,x,!1,null,null,null),q=B.exports,R=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-table",{staticClass:"table-box",attrs:{data:e.listData,stripe:"",height:"100%"}},[a("el-table-column",{attrs:{prop:"hour",label:"时间",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("span",[e._v(e._s(r.hourStr))])]}}])}),e._l(e.listDataFirstlist,(function(t,r){return a("el-table-column",{key:r,attrs:{label:t.name,align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[a("span",[e._v(e._s(n.list[r].headCount||0))]),0===n.list[r].top?a("span",{staticClass:"top"}):e._e()]}}],null,!0)})}))],2)},A=[],P=function(e){function t(){return Object(o["a"])(this,t),Object(l["a"])(this,Object(u["a"])(t).apply(this,arguments))}return Object(h["a"])(t,e),Object(c["a"])(t,[{key:"listDataFirstlist",get:function(){return this.listData.length>0?this.listData[0].list:[]}}]),t}(p["e"]);d["a"]([Object(p["c"])({type:Array,default:function(){return[]}})],P.prototype,"listData",void 0),P=d["a"]([Object(p["a"])({components:{}})],P);var N=P,Y=N,$=(a("8738"),Object(I["a"])(Y,R,A,!1,null,"390866bb",null)),z=$.exports,H=a("17b0");function V(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function W(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?V(Object(a),!0).forEach((function(t){Object(i["a"])(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):V(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var K=864e5,Z=function(e){function t(){var e;return Object(o["a"])(this,t),e=Object(l["a"])(this,Object(u["a"])(t).apply(this,arguments)),e.searchForm={orgId:"",queryBeginDay:"",queryEndDay:"",areaIds:[],dateCycle:"date"},e.timeTypeOptions=y["b"],e.showType="chart",e.orgTreeData=[],e.areaList=[],e.listData=[],e.dateFormatObj={date:"yyyy-MM-dd",week:"yyyy 第 WW 周",month:"yyyy-MM",year:"yyyy"},e.loading=!1,e}return Object(h["a"])(t,e),Object(c["a"])(t,[{key:"created",value:function(){this.searchForm.orgId="",this.searchForm.queryBeginDay=Object(v["parseDate"])(new Date,"yyyyMMdd"),this.searchForm.queryEndDay=Object(v["parseDate"])(new Date,"yyyyMMdd"),this.fetchOrganizationTree()}},{key:"fetchBusinessAreas",value:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){var t,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.service.businessAreas(this.searchForm.orgId);case 3:t=e.sent,a=t.data,this.areaList=a,e.next=10;break;case 8:e.prev=8,e.t0=e["catch"](0);case 10:case"end":return e.stop()}}),e,this,[[0,8]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"fetchList",value:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){var t,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.service.compareList(W({},this.searchForm));case 3:t=e.sent,a=t.data,this.listData=a,this.setEcharts(),e.next=11;break;case 9:e.prev=9,e.t0=e["catch"](0);case 11:case"end":return e.stop()}}),e,this,[[0,9]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"setEcharts",value:function(){var e=this;"chart"===this.showType&&this.$nextTick((function(){var t=e.listData.slice(0,e.listData.length-1);e.echartsBoxRef.initEcharts(t)}))}},{key:"selectTreeChange",value:function(e){this.searchForm.orgId=e,this.searchForm.areaIds=[],this.fetchBusinessAreas()}},{key:"onSearch",value:function(){this.searchForm.areaIds&&0!==this.searchForm.areaIds.length?("date"===this.searchForm.dateCycle&&(this.searchForm.queryEndDay=this.searchForm.queryBeginDay),this.fetchList()):this.$message.warning("请选择业务区域")}},{key:"onReset",value:function(){this.searchForm.orgId="",this.searchForm.queryBeginDay=Object(v["parseDate"])(new Date,"yyyyMMdd"),this.searchForm.queryEndDay=Object(v["parseDate"])(new Date,"yyyyMMdd"),this.searchForm.areaIds=[],this.searchForm.dateCycle="date",this.areaList=[],this.echartsBoxRef.clear()}},{key:"onDateChange",value:function(e){e&&this.dateChange(new Date(e.slice(0,4),Number(e.slice(4,6))-1,e.slice(-2)))}},{key:"changeDateCycle",value:function(){this.searchForm.queryBeginDay=new Date,this.dateChange(this.searchForm.queryBeginDay)}},{key:"dateChange",value:function(e){switch(this.searchForm.dateCycle){case"date":this.searchForm.queryBeginDay=Object(v["parseDate"])(e,"yyyyMMdd"),this.searchForm.queryEndDay=Object(v["parseDate"])(e,"yyyyMMdd");break;case"week":var t=new Date(e).getDay();this.searchForm.queryBeginDay=Object(v["parseDate"])(new Date(e.getTime()-t*K),"yyyyMMdd"),this.searchForm.queryEndDay=Object(v["parseDate"])(new Date(e.getTime()+(7-t-1)*K),"yyyyMMdd");break;case"month":this.searchForm.queryBeginDay=g()(e).set("date",1).format("YYYYMMDD"),this.searchForm.queryEndDay=g()(e).endOf("month").format("YYYYMMDD");break;case"year":this.searchForm.queryBeginDay=g()(e).set("month",0).set("date",1).format("YYYYMMDD"),this.searchForm.queryEndDay=g()(e).set("month",11).set("date",31).format("YYYYMMDD");break;default:break}}},{key:"onExport",value:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:try{Object(H["cwQzDownload"])({needTip:!1,animationOps:{x:80,y:160},confirmFn:function(){return t.service.exportCompareList(W({},t.searchForm))}})}catch(a){}case 1:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}()}]),t}(b["a"]);d["a"]([Object(p["d"])()],Z.prototype,"echartsBoxRef",void 0),Z=d["a"]([Object(p["a"])({name:"AnalysisIndex",components:{TableBox:z,EchartsBox:q,SelectTree:f["a"]}})],Z);var J=Z,G=J,Q=(a("1c22"),Object(I["a"])(G,r,n,!1,null,null,null));t["default"]=Q.exports},a5b6:function(e,t,a){},c0b4:function(e,t,a){"use strict";var r=a("4d39"),n=a.n(r);n.a},ff93:function(e,t,a){"use strict";var r=a("4f31"),n=a.n(r);n.a}}]); |