|
@@ -374,7 +374,7 @@ export default {
|
|
|
name: name[index],
|
|
|
open: true,
|
|
|
// children: name[index] === '专维'?[] : this.disGanttData(dsfList)
|
|
|
- children: this.disGanttData(data[index]),
|
|
|
+ children: this.disGanttData(data[index], name[index]),
|
|
|
});
|
|
|
});
|
|
|
this.treeData = newData;
|
|
@@ -437,7 +437,7 @@ export default {
|
|
|
/**
|
|
|
* 处理甘特图数据
|
|
|
*/
|
|
|
- disGanttData(arr) {
|
|
|
+ disGanttData(arr, typeName) {//"维保", "专维", "第三方检测"
|
|
|
let data = [];
|
|
|
_.forEach(arr, (item) => {
|
|
|
data.push({
|
|
@@ -454,6 +454,15 @@ export default {
|
|
|
.unix(_item.endDate / 1000)
|
|
|
.format("YYYY-MM-DD HH:mm:ss");
|
|
|
_item.description = _item.parentname;
|
|
|
+ let type;
|
|
|
+ if (typeName === '维保') {
|
|
|
+ type = 1;
|
|
|
+ } else if (typeName === '专维') {
|
|
|
+ type = 0;
|
|
|
+ } else {
|
|
|
+ type = 2;
|
|
|
+ }
|
|
|
+ _item.type = type;
|
|
|
return _item;
|
|
|
}),
|
|
|
});
|
|
@@ -472,6 +481,7 @@ export default {
|
|
|
*/
|
|
|
showDialog(task) {
|
|
|
this.showDetail = true;
|
|
|
+ console.log('task', task)
|
|
|
// this.detailTitle = task._pdata.description;
|
|
|
this.curTask = task;
|
|
|
this.getGanttDetailData();
|
|
@@ -482,10 +492,10 @@ export default {
|
|
|
* 获取甘特图详情
|
|
|
*/
|
|
|
getGanttDetailData() {
|
|
|
- const { id, statusType } = this.curTask._pdata;
|
|
|
+ const { id, type } = this.curTask._pdata;
|
|
|
let param = {
|
|
|
plazaId: this.plazaId,
|
|
|
- type: statusType,
|
|
|
+ type: type,
|
|
|
id: id,
|
|
|
};
|
|
|
queryGanttDetail("/data/base/queryGanttChartDetails", param).then(
|