yusheng vor 1 Jahr
Ursprung
Commit
acdbb9f6f7

+ 1 - 0
src/views/BOMmanage/ProjectDetailDialog.vue

@@ -330,6 +330,7 @@
                     >
                       <div style="padding: 0 10px">
                         <planManageList
+                        :tableHeight="'300px'"
                           :projectType="currentNodeData.type"
                           :ids="currentNodeData.id"
                           @handlePlanTableNodeClick="handlePlanTableNodeClick"

+ 5 - 2
src/views/project-manage/planManage/index.vue

@@ -9,7 +9,7 @@
         row-key="id"
         :columns="columns"
         :datasource="datasource"
-        height="calc(100vh - 340px)"
+        :height="tableHeight?tableHeight:'calc(100vh - 340px)'"
         full-height="calc(100vh - 116px)"
         cache-key="project-initiationTable"
         :selection.sync="selection"
@@ -313,6 +313,9 @@
       ids: {
         type: String,
         default: ''
+      },
+      tableHeight:{
+        default:''
       }
     },
     watch: {
@@ -525,7 +528,7 @@
       async datasource({ page, limit, where, parent }) {
         await this.getDictList('pro_projects_status');
         await this.getDictList('pro_projects_type');
-        const api=this.$route.path=='/planManage'?projectsPlanPageAPI:myProjectsPlanPageAPI
+        const api=this.$route.path=='/planManage/myPlanList'?myProjectsPlanPageAPI:projectsPlanPageAPI
         let paramAttr = '';
         switch (this.projectType) {
           case 1:

+ 26 - 29
src/views/project-manage/project-initiation/components/project-gantt.vue

@@ -114,7 +114,7 @@
         };
         // 条形图里的文字
         gantt.templates.task_text = function (start, end, task) {
-          return `<div style='text-align:left;'>&nbsp;&nbsp;&nbsp;名称:${task.executor}</div>`;
+          return `<div style='text-align:left;'>&nbsp;&nbsp;&nbsp;${task.title}名称:${task.executor}</div>`;
         };
         // 条形图自定义class
         gantt.templates.task_class = function (start, end, task) {
@@ -139,16 +139,16 @@
         });
         // 自定义tooltip内容
         gantt.templates.tooltip_text = function (start, end, task) {
-    //       <p style="margin: 4px 0;">当前进度:${
-    //   task.level == 5
-    //     ? proStatusEnum[task.status]?.label
-    //     : task.progress * 100 + '%'
-    // }</p>
-		// <p style="margin: 4px 0;">标准工时:${task.standardTime}</p>
-		// <p style="margin: 4px 0;">实际工时:${task.actualTime}</p>
+          //       <p style="margin: 4px 0;">当前进度:${
+          //   task.level == 5
+          //     ? proStatusEnum[task.status]?.label
+          //     : task.progress * 100 + '%'
+          // }</p>
+          // <p style="margin: 4px 0;">标准工时:${task.standardTime}</p>
+          // <p style="margin: 4px 0;">实际工时:${task.actualTime}</p>
           const t = gantt;
           return `<div style="font-size:14px;padding: 0 10px;width:250px;line-height:20px;white-space:normal;">
-		<p style="font-weight:bold;margin: 8px 0;">名称:${task.text}</p>
+		<p style="font-weight:bold;margin: 8px 0;">${task.title}名称:${task.text}</p>
 
 		<p style="margin: 4px 0;">状态:${proStatusEnum[task.status]?.label}</p>
 	</div>`;
@@ -206,29 +206,26 @@
       initData() {
         this.ganttData = this.ganttTasks.map((current, ind, arry) => {
           let newObj = {};
-          if (current.level) {
-            //存在type字段 说明非一级菜单,判断阶段的具体类型 设置不同颜色
-            if (current.level == 1) {
-              //项目
-              newObj = Object.assign({}, current, { color: '#fcca02' });
-            } else if (current.level == 2) {
-              //项目阶段
-              newObj = Object.assign({}, current, { color: '#fec0dc' });
-            } else if (current.level == 3) {
-              //计划
-              newObj = Object.assign({}, current, { color: '#62ddd4' });
-            } else if (current.level == 4) {
-              //计划节点
-              newObj = Object.assign({}, current, { color: '#d1a6ff' });
-            } else if (current.level == 5) {
-              //任务
-              newObj = Object.assign({}, current, { color: '#0e85fa' });
-            }
+
+          if (current.type == 0) {
+            //项目
+            newObj = Object.assign({}, current, { color: '#fcca02',title:'项目' });
+          } else if (current.type == 2) {
+            //项目阶段
+            newObj = Object.assign({}, current, { color: '#fec0dc',title:'阶段' });
+          } else if (current.type == 3) {
+            //计划
+            newObj = Object.assign({}, current, { color: '#62ddd4',title:'计划' });
+          } else if (current.type == 4) {
+            //计划节点
+            newObj = Object.assign({}, current, { color: '#d1a6ff',title:'计划节点' });
+          } else if (current.type == 5) {
+            //任务
+            newObj = Object.assign({}, current, { color: '#0e85fa',title:'任务' });
           } else {
             //默认色
-            newObj = Object.assign({}, current, { color: '#5b0b83' });
+            newObj = Object.assign({}, current, { color: '#5b0b83',title:'项目BOM'  });
           }
-
           return newObj;
         });
         console.log(this.ganttData);

+ 3 - 3
src/views/project-manage/project-initiation/index.vue

@@ -585,9 +585,9 @@
         await this.getDictList('pro_projects_budget_unit');
         // /project-manage/myProject
         const api =
-          this.$route.path == '/project-manage'
-            ? projectsPageAPI
-            : getMyProjectsPage;
+          this.$route.path == '/project-manage/myProject'
+            ? getMyProjectsPage
+            : projectsPageAPI;
         return api({
           pageNum: page,
           size: limit,