diff --git a/yanzhu-bigscreen/src/views/schedule/planSchedule.vue b/yanzhu-bigscreen/src/views/schedule/planSchedule.vue index f396ceed..0a8c0949 100644 --- a/yanzhu-bigscreen/src/views/schedule/planSchedule.vue +++ b/yanzhu-bigscreen/src/views/schedule/planSchedule.vue @@ -50,7 +50,7 @@
{{ it.scheduleNode }} %
- {{ it.taskName }} + {{ it.fullPath }}
计划周期: @@ -474,12 +474,31 @@ export default { value: ((_yzhjhs.length / res.data.length) * 100).toFixed(2), }) this.overviewTask = _tasks - this.overviewJxzjh = _jxzjhs + this.overviewJxzjh =this.makePlanTree(res.data, _jxzjhs) this.overviewYwcjh = _ywcjhs this.overviewYzhjh = _yzhjhs this.overviewMonthjh = _nowMonth }) }, + makePlanTree(all, data) { + let getFullPath = (id, name) => { + let _parents = all.filter(d=>d.taskId==id); + if(_parents.length>0){ + name.push(_parents[0].taskName); + return getFullPath(_parents[0].parentId,name); + }else{ + return name; + } + }; + let _data = []; + data.forEach(it=>{ + if(all.filter(d=>d.parentId==it.taskId).length==0){ + it.fullPath=getFullPath(it.parentId,[it.taskName]).reverse().join("/"); + _data.push(it); + } + }); + return _data; + }, initScheduleNodes() { this.$api.planSchedule.findAllSchedule({ projectId: this.selProject.id }).then((res) => { let _data1 = [] @@ -628,6 +647,7 @@ export default { display: flex; width: 80px; height: 80px; + min-width: 80px; align-items: center; justify-content: center; @@ -839,6 +859,7 @@ export default { line-height: 80px; height: 80px; width: 80px; + min-width: 80px; } .sp-task-name { span { @@ -921,6 +942,7 @@ export default { .czz-number-img { width: 90px; height: 90px; + min-width: 90px; line-height: 110px; svg { width: 36px; @@ -948,6 +970,7 @@ export default { .czz-number-img { width: 120px; height: 120px; + min-width: 120px; line-height: 120px; } .sp-task-name { @@ -985,6 +1008,7 @@ export default { .czz-number-img { width: 120px; height: 120px; + min-width: 120px; line-height: 140px; } .equipment-list-data_div_top { @@ -1050,6 +1074,7 @@ export default { .czz-number-img { width: 120px; height: 120px; + min-width: 120px; line-height: 140px; svg { width: 56px; @@ -1077,6 +1102,7 @@ export default { .czz-number-img { width: 160px; height: 160px; + min-width: 160px; line-height: 160px; } .sp-task-name { @@ -1114,6 +1140,7 @@ export default { .czz-number-img { width: 160px; height: 160px; + min-width: 160px; line-height: 160px; } .equipment-list-data_div_top {