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.
2 lines
29 KiB
2 lines
29 KiB
6 years ago
|
webpackJsonp([20],{1037:function(t,e,n){"use strict";e.__esModule=!0;var i=n(123),a=d(n(1143)),s=d(n(646)),r=d(n(663)),o=n(225),l=d(n(670)),c=d(n(654)),u=d(n(650));function d(t){return t&&t.__esModule?t:{default:t}}e.default={name:"instance-gantt-index",data:function(){return{tasksState:o.tasksState,isLoading:!0,ganttData:{taskNames:[]},isNodata:!1}},props:{},methods:Object.assign({},(0,i.mapActions)("dag",["getViewGantt"]),{_getViewGantt:function(){var t=this;this.isLoading=!0,this.getViewGantt({processInstanceId:this.$route.params.id}).then(function(e){if(t.ganttData=e,!e.taskNames.length||!e)return t.isLoading=!1,void(t.isNodata=!0);a.default.init({el:".gantt",tasks:e.tasks}),setTimeout(function(){t.isLoading=!1},200)}).catch(function(e){t.isLoading=!1})}}),watch:{},created:function(){},mounted:function(){this._getViewGantt()},updated:function(){},beforeDestroy:function(){},destroyed:function(){},computed:{},components:{mConditions:l.default,mSecondaryMenu:c.default,mListConstruction:u.default,mSpin:s.default,mNoData:r.default}}},1140:function(t,e,n){var i=n(1141);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);n(35)("d76bddca",i,!0,{})},1141:function(t,e,n){var i=n(124);(t.exports=n(34)(!1)).push([t.i,".d3-toottip{text-align:left}.d3-toottip ul li{overflow:hidden}.d3-toottip ul li span.sp1{width:70px;text-align:right;display:inline-block;padding-right:6px}.gantt-model{background:url("+i(n(1142))+");height:calc(100vh - 148px)}.gantt-model .gantt-state{background:#fff;height:48px;line-height:48px;padding-left:20px}.gantt-model .gantt{height:calc(100vh - 220px);overflow-y:scroll}.gantt-model rect{cursor:pointer}.gantt-model path.link{fill:none;stroke:#666;stroke-width:2px}.gantt-model g.tick line{shape-rendering:crispEdges}.gantt-model .axis line,.gantt-model .axis path{fill:none;stroke:#000;shape-rendering:crispEdges}.gantt-model .axis text{font:11px sans-serif}.gantt-model circle{stroke:#666;fill:#0097e0;stroke-width:1.5px}.gantt-model g.axis path{shape-rendering:crispEdges}",""])},1142:function(t,e,n){t.exports=n.p+"images/dag_bg.png?6a0c3839385c7d50f21acf06989addf4"},1143:function(t,e,n){"use strict";e.__esModule=!0;var i=l(n(28)),a=l(n(71)),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(597)),r=n(661),o=n(225);function l(t){return t&&t.__esModule?t:{default:t}}var c=function(){this.el="",this.tasks=[],this.width=null,this.height=null,this.tasksName=[],this.tickFormat="%H:%M:%S",this.margin={top:10,right:40,bottom:10,left:300},this.startTimeXAxis=s.time.day.offset(new Date,-3),this.endTimeXAxis=s.time.hour.offset(new Date,3)};c.prototype.init=function(t){var e=t.el,n=t.tasks;this.el=e,this.tasks=n,this.tasksName=i.default.map(i.default.cloneDeep(n),function(t){return t.taskName}),this.height=parseInt(30*this.tasksName.length),this.width=(0,a.default)(this.el).width()-this.margin.right-this.margin.left-5,this.x=s.time.scale().domain([this.startTimeXAxis,this.endTimeXAxis]).range([0,this.width]).clamp(!0),this.y=s.scale.ordinal().domain(this.tasksName).rangeRoundBands([0,this.height-this.margin.top-this.margin.bottom],.1),this.xAxis=s.svg.axis().scale(this.x).orient("bottom").tickFormat(s.time.format(this.tickFormat)).tickSubdivide(!0).tickSize(8).tickPadding(8),this.yAxis=s.svg.axis().scale(this.x).orient("left").tickSize(0),this.compXAxisTimes(),this.initializeXAxis(),this.drawChart()},c.prototype.compXAxisTimes=function(){if(void 0===this.tasks||this.tasks.length<1)return this.startTimeXAxis=s.time.day.offset(new Date,-3),void(this.endTimeXAxis=s.time.hour.offset(new Date,3));this.tasks.sort(function(t,e){return t.endDate-e.endDate}),this.endTimeXAxis=this.tasks[this.tasks.length-1].endDate,this.tasks.sort(function(t,e){return t.startDate-e.startDate}),this.startTimeXAxis=this.tasks[0].startDate},c.prototype.initializeXAxis=function(){this.x=s.time.scale().domain([this.startTimeXAxis,this.endTimeXAxis]).range([0,this.width]).clamp(!0),this.y=s.scale.ordinal().domain(this.tasksName).range
|
||
|
//# sourceMappingURL=20.65383c2.js.map
|