فهرست منبع

甘特图弹窗标题取值修改

fujunwen 4 سال پیش
والد
کامیت
a687f7df7d
1فایلهای تغییر یافته به همراه6 افزوده شده و 4 حذف شده
  1. 6 4
      src/views/analysis/GanttChart.vue

+ 6 - 4
src/views/analysis/GanttChart.vue

@@ -37,7 +37,7 @@
       <div class="chart-container" id="chartContainer" ref="chartContainer">
         <div id="ganttContainer"></div>
       </div>
-      <el-dialog :title="detailTitle" :visible.sync="showDetail" width="840px">
+      <el-dialog :title="ganttDetail.name" :visible.sync="showDetail" width="840px">
         <div class="dialog-container">
           <div class="row task-status">
             <div>
@@ -188,7 +188,7 @@ export default {
 
       // 弹窗相关
       showDetail: false, // 弹框显示状态
-      detailTitle: "", // 弹窗标题
+      // detailTitle: "", // 弹窗标题
       pictures: [
         // {
         //   id: 1,
@@ -434,7 +434,7 @@ export default {
      */
     showDialog(task) {
       this.showDetail = true;
-      this.detailTitle = task._pdata.description;
+      // this.detailTitle = task._pdata.description;
       this.curTask = task;
       this.getGanttDetailData();
       this.getPictureOrReportData(0);
@@ -460,7 +460,8 @@ export default {
             planEndDate,
             realStartDate,
             realEndDate,
-            statusType
+            statusType,
+            name
           } = data;
           let color;
           switch (statusType) {
@@ -483,6 +484,7 @@ export default {
           let newData = {
             status,
             color: color,
+            name: name,
             planTime: this.dealDetailTime(planStartDate, planEndDate),
             realTime: this.dealDetailTime(realStartDate, realEndDate)
           };