修复综合看板
This commit is contained in:
@@ -90,10 +90,10 @@ export default {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
/** 容器高度,综合看板等场景可传 100% 以撑满父级 */
|
||||
/** 容器高度 */
|
||||
height: {
|
||||
type: String,
|
||||
default: '800px'
|
||||
default: '4800px'
|
||||
},
|
||||
/** 综合看板:紧凑、防重叠、三色状态、小圆点 */
|
||||
dashboardMode: {
|
||||
@@ -106,7 +106,7 @@ export default {
|
||||
return {
|
||||
width: '100%',
|
||||
height: this.height,
|
||||
minHeight: this.dashboardMode ? '300px' : '240px'
|
||||
minHeight: this.dashboardMode ? '1200px' : '240px'
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -332,24 +332,24 @@ export default {
|
||||
type: 'tree',
|
||||
data: [treeData],
|
||||
/* 与折线图区域一致:留白、白底在容器上 */
|
||||
...(dm ? { left: '1%', right: '5%', top: '2%', bottom: '2%' } : {}),
|
||||
...(dm ? { left: '3%', right: '8%', top: '4%', bottom: '4%' } : {}),
|
||||
symbol: 'circle',
|
||||
...(dm ? {} : { symbolSize: 6 }),
|
||||
edgeShape: dm ? 'polyline' : 'curve',
|
||||
edgeForkPosition: dm ? '74%' : '50%',
|
||||
edgeForkPosition: dm ? '68%' : '50%',
|
||||
orient: 'LR',
|
||||
initialTreeDepth: 4,
|
||||
initialTreeDepth: 3,
|
||||
roam: true,
|
||||
scaleLimit: dm ? { min: 0.22, max: 5 } : undefined,
|
||||
expandAndCollapse: false,
|
||||
scaleLimit: dm ? { min: 0.3, max: 4 } : undefined,
|
||||
label: {
|
||||
show: true,
|
||||
fontSize: dm ? 11 : 12,
|
||||
fontWeight: 400,
|
||||
position: 'left',
|
||||
position: 'top',
|
||||
verticalAlign: 'middle',
|
||||
...(dm ? { align: 'right' } : {}),
|
||||
distance: 8,
|
||||
overflow: 'none',
|
||||
distance: 6,
|
||||
overflow: 'break',
|
||||
lineHeight: dm ? 15 : 14,
|
||||
color: dm ? '#606266' : undefined
|
||||
},
|
||||
@@ -358,46 +358,59 @@ export default {
|
||||
*/
|
||||
levels: dm
|
||||
? [
|
||||
{
|
||||
symbolSize: 18,
|
||||
itemStyle: { borderWidth: 2, borderColor: '#fff' },
|
||||
label: {
|
||||
position: 'top',
|
||||
distance: 8,
|
||||
fontSize: 13,
|
||||
fontWeight: 600,
|
||||
width: 140,
|
||||
overflow: 'break',
|
||||
lineHeight: 16,
|
||||
padding: [4, 8, 4, 8]
|
||||
}
|
||||
},
|
||||
{
|
||||
symbolSize: 14,
|
||||
itemStyle: { borderWidth: 1.5, borderColor: '#fff' },
|
||||
label: {
|
||||
position: 'top',
|
||||
distance: 6,
|
||||
fontSize: 12,
|
||||
width: 180,
|
||||
overflow: 'break',
|
||||
lineHeight: 15,
|
||||
padding: [3, 6, 3, 6]
|
||||
}
|
||||
},
|
||||
{
|
||||
symbolSize: 10,
|
||||
itemStyle: { borderWidth: 1, borderColor: '#fff', shadowBlur: 2, shadowColor: 'rgba(0,0,0,0.1)' },
|
||||
label: {
|
||||
position: 'top',
|
||||
verticalAlign: 'bottom',
|
||||
distance: 6,
|
||||
fontSize: 11,
|
||||
width: 180,
|
||||
overflow: 'break',
|
||||
lineHeight: 14,
|
||||
padding: [3, 6, 3, 6]
|
||||
}
|
||||
},
|
||||
{
|
||||
symbolSize: 6,
|
||||
itemStyle: { borderWidth: 1, borderColor: '#fff' },
|
||||
label: {
|
||||
position: 'left',
|
||||
distance: 8,
|
||||
fontSize: 11,
|
||||
width: 118,
|
||||
position: 'bottom',
|
||||
verticalAlign: 'top',
|
||||
distance: 4,
|
||||
fontSize: 10,
|
||||
width: 140,
|
||||
overflow: 'break',
|
||||
lineHeight: 14,
|
||||
padding: [2, 6, 2, 6]
|
||||
}
|
||||
},
|
||||
{
|
||||
symbolSize: 5,
|
||||
itemStyle: { borderWidth: 1, borderColor: '#fff' },
|
||||
label: {
|
||||
position: 'left',
|
||||
distance: 10,
|
||||
fontSize: 11,
|
||||
width: 160,
|
||||
overflow: 'break',
|
||||
lineHeight: 14,
|
||||
padding: [2, 8, 2, 6]
|
||||
}
|
||||
},
|
||||
{
|
||||
symbolSize: 4,
|
||||
itemStyle: { borderWidth: 1, borderColor: '#fff', shadowBlur: 2, shadowColor: 'rgba(0,0,0,0.1)' },
|
||||
label: {
|
||||
position: 'right',
|
||||
verticalAlign: 'middle',
|
||||
align: 'left',
|
||||
distance: 12,
|
||||
fontSize: 11,
|
||||
width: 232,
|
||||
overflow: 'break',
|
||||
lineHeight: 15,
|
||||
padding: [2, 8, 2, 8],
|
||||
formatter: (p) => this.wrapLabelText(p.name, 17)
|
||||
lineHeight: 13,
|
||||
padding: [2, 4, 2, 4]
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -408,17 +421,17 @@ export default {
|
||||
{ symbolSize: 3 }
|
||||
],
|
||||
lineStyle: {
|
||||
width: dm ? 1 : 1.2,
|
||||
curveness: dm ? 0.1 : 0.3,
|
||||
color: dm ? '#e4e7ed' : '#ccc'
|
||||
width: 1,
|
||||
curveness: 0.5,
|
||||
color: '#c0c4cc'
|
||||
},
|
||||
emphasis: {
|
||||
focus: 'descendant',
|
||||
lineStyle: { width: 2, color: '#409eff' },
|
||||
itemStyle: dm ? { shadowBlur: 6, shadowColor: 'rgba(64,158,255,0.45)' } : undefined
|
||||
itemStyle: { shadowBlur: 10, shadowColor: 'rgba(64,158,255,0.5)' }
|
||||
},
|
||||
expandAndCollapse: true,
|
||||
animationDuration: 280
|
||||
|
||||
animationDuration: 300
|
||||
}
|
||||
]
|
||||
};
|
||||
@@ -509,4 +522,4 @@ export default {
|
||||
:deep(.dialog-footer) {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -209,7 +209,20 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 关闭细节窗口
|
||||
tryOpenDetail (trackId) {
|
||||
if (!trackId) return;
|
||||
const found = this.scheduleList.find(item => item.scheduleId === trackId || item.projectId === trackId);
|
||||
if (found) {
|
||||
this.getScheduleDetail(found);
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
const found = this.scheduleList.find(item => item.scheduleId === trackId || item.projectId === trackId);
|
||||
if (found) {
|
||||
this.getScheduleDetail(found);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
closeDetailShow (done) {
|
||||
this.getList();
|
||||
done()
|
||||
@@ -245,14 +258,13 @@ export default {
|
||||
},
|
||||
getList () {
|
||||
this.loading = true
|
||||
|
||||
console.log(this.queryParams, this.searchTime)
|
||||
/* 日期搜索条件 */
|
||||
if (this.searchTime && this.searchTime.length) {
|
||||
this.queryParams.startTime = this.getDateStr(this.searchTime[0])
|
||||
this.queryParams.endTime = this.getDateStr(this.searchTime[1])
|
||||
}
|
||||
|
||||
this.queryParams.projectId = this.$route.query.projectId?this.$route.query.projectId:null
|
||||
this.queryParams.trackId = this.$route.query.trackId?this.$route.query.trackId:null
|
||||
listProjectSchedule(this.queryParams).then(res => {
|
||||
this.scheduleList = res.rows
|
||||
this.total = res.total
|
||||
|
||||
Reference in New Issue
Block a user