Jelajahi Sumber

项目管理-项目编码查看项目信息

huang_an 1 tahun lalu
induk
melakukan
43ce052b16

+ 99 - 24
src/views/BOMmanage/ProjectDetailDialog.vue

@@ -168,6 +168,10 @@
                   @stageRemove="() => stageRemove(node, data)"
                   @addBOM="() => addOrEditBOM('add', node, data)"
                   @editBOM="() => addOrEditBOM('edit', node, data)"
+                  @addChildProject="
+                    () => handleUpdateProject(node, data, 'add')
+                  "
+                  @addStage="() => handleAddStage(node, data, 'add')"
                   @addPlan="() => handleAddPlan('add', node, data)"
                   @addTask="() => handleAddTask('add', node, data)"
                   @handleTermination="
@@ -323,6 +327,20 @@
                     ></project-form>
                   </div>
                 </el-tab-pane>
+                <el-tab-pane
+                  v-if="[0, 2].includes(currentNodeData.type)"
+                  label="项目阶段"
+                  name="项目阶段"
+                  class="el-tab-pane-tree"
+                >
+                  <project-info-table
+                    ref="projectInfoTable"
+                    :dialog-type="dialogType"
+                    :dialogForm="dialogForm"
+                    :deptList="deptList"
+                    :deptTreeList="deptTreeList"
+                  ></project-info-table>
+                </el-tab-pane>
                 <el-tab-pane
                   label="计划"
                   name="计划"
@@ -745,6 +763,13 @@
       :addOrEditDialogFlag.sync="addOrEditProjectDialogFlag"
       ref="addOrEditProjectDialogRef"
     ></addOrEditProjectDialog>
+    <!-- 阶段弹窗 -->
+    <addOrEditStageDialog
+      v-if="addOrEditDialogStageFlag"
+      @reload="reload"
+      :addOrEditDialogStageFlag.sync="addOrEditDialogStageFlag"
+      ref="addOrEditStageDialogRef"
+    ></addOrEditStageDialog>
   </el-drawer>
 </template>
 <script>
@@ -820,10 +845,11 @@
   import projectCalendar from '@/views/project-manage/project-calendar/index.vue';
   import planManageList from '@/views/project-manage/planManage/index.vue';
 
+  import addOrEditStageDialog from '@/views/project-manage/project-initiation/components/addOrEditStageDialog.vue';
+  import projectInfoTable from '@/views/project-manage/project-initiation/components/projectInfoTable.vue';
   export default {
     props: {},
     components: {
-      planManageList,
       p_search,
       bpmDetail,
       addOrEditProjectDialog,
@@ -843,12 +869,16 @@
       BOMBaseForm,
       Attribute,
       addBOMDialog,
-      projectCalendar
+
+      planManageList,
+      projectCalendar,
+      projectInfoTable,
+      addOrEditStageDialog
     },
     data() {
       return {
         visible: false,
-        title: '项目详情',
+        title: '项目信息',
         projectsFinishAPI,
         projectsPauseAPI,
         projectsStartupAPI,
@@ -903,6 +933,7 @@
         dictList: {},
         currentTableNodeData: {},
         treeList: [],
+        addOrEditDialogStageFlag: false,
         bpmDetailFlag: false,
         isShow: false,
         treeLoading: false,
@@ -1257,13 +1288,19 @@
           return Promise.reject(false);
         });
       },
-
+      addChildProject() {},
       addOrEditBOM(type, node, data) {
         this.addBOMDialogFlag = true;
         this.$nextTick(() => {
           this.$refs.addBOMDialogRef.init(data, type);
         });
       },
+      handleAddStage(node, data, type) {
+        this.addOrEditDialogStageFlag = true;
+        this.$nextTick(() => {
+          this.$refs.addOrEditStageDialogRef.init(data, type);
+        });
+      },
       handleAddPlan(type, node, data, sourceName = 'project') {
         this.addPlanDialogFLag = true;
         let params = {};
@@ -1481,11 +1518,29 @@
           switch (data.type) {
             case 0:
               this.contextMenuData.menulists = [
+                {
+                  fnHandler: 'addChildProject',
+                  icoName: 'fa el-icon-plus',
+                  btnName: '新建子项目',
+                  disabled:
+                    this.disableToAddBOM(data) &&
+                    this.$hasPermission('pro:projects:save')
+                },
+                {
+                  fnHandler: 'addStage',
+                  icoName: 'fa el-icon-plus',
+                  btnName: '新建阶段',
+                  disabled:
+                    this.disableToAddBOM(data) &&
+                    this.$hasPermission('pro:projects:save')
+                },
                 {
                   fnHandler: 'addBOM',
                   icoName: 'fa el-icon-plus',
                   btnName: '新建BOM',
-                  disabled: this.disableToAddBOM(data)
+                  disabled:
+                    this.disableToAddBOM(data) &&
+                    this.$hasPermission('pro:projects:save')
                 },
                 {
                   fnHandler: 'addPlan',
@@ -1499,47 +1554,53 @@
                   btnName: '新建任务',
                   disabled: this.disableToAddTask(data)
                 },
-                {
-                  fnHandler: 'addPlan',
-                  icoName: 'fa el-icon-plus',
-                  btnName: '新建子计划',
-                  disabled: this.disableToAddPlan(data)
-                },
                 {
                   fnHandler: 'updateProject',
                   icoName: 'fa el-icon-edit',
                   btnName: '修改',
-                  disabled: [1, 2].includes(data.processStatus)
+                  disabled:
+                    [1, 2].includes(data.processStatus) &&
+                    this.$hasPermission('pro:projects:update')
                 },
                 {
                   fnHandler: 'onRemove',
                   icoName: 'fa el-icon-delete',
                   btnName: '删除',
-                  disabled: [1, 2].includes(data.processStatus)
+                  disabled:
+                    [1, 2].includes(data.processStatus) &&
+                    this.$hasPermission('pro:projects:delete')
                 },
                 {
                   fnHandler: 'handleFinish',
                   icoName: 'fa el-icon-success',
                   btnName: '完成',
-                  disabled: this.disableToFinish(data)
+                  disabled:
+                    this.disableToFinish(data) &&
+                    this.$hasPermission('pro:projects:update')
                 },
                 {
                   fnHandler: 'handlePause',
                   icoName: 'fa el-icon-video-pause',
                   btnName: '暂停',
-                  disabled: this.disableToPause(data)
+                  disabled:
+                    this.disableToPause(data) &&
+                    this.$hasPermission('pro:projects:update')
                 },
                 {
                   fnHandler: 'handleStartup',
                   icoName: 'fa el-icon-video-play',
                   btnName: '启动',
-                  disabled: this.disableToStartup(data)
+                  disabled:
+                    this.disableToStartup(data) &&
+                    this.$hasPermission('pro:projects:update')
                 },
                 {
                   fnHandler: 'handleTermination',
                   icoName: 'fa el-icon-error',
                   btnName: '终止',
-                  disabled: this.disableToTermination(data)
+                  disabled:
+                    this.disableToTermination(data) &&
+                    this.$hasPermission('pro:projects:update')
                 }
               ];
               break;
@@ -1549,7 +1610,9 @@
                   fnHandler: 'addBOM',
                   icoName: 'fa el-icon-plus',
                   btnName: '新建BOM',
-                  disabled: this.disableToAddBOM(data)
+                  disabled:
+                    this.disableToAddBOM(data) &&
+                    this.$hasPermission('pro:projects:save')
                 },
                 {
                   fnHandler: 'addPlan',
@@ -1567,37 +1630,49 @@
                   fnHandler: 'editBOM',
                   icoName: 'fa el-icon-edit',
                   btnName: '修改',
-                  disabled: ![0].includes(data.status)
+                  disabled:
+                    ![0].includes(data.status) &&
+                    this.$hasPermission('pro:projects:update')
                 },
                 {
                   fnHandler: 'removeBom',
                   icoName: 'fa el-icon-delete',
                   btnName: '删除',
-                  disabled: ![0].includes(data.status)
+                  disabled:
+                    ![0].includes(data.status) &&
+                    this.$hasPermission('pro:projects:delete')
                 },
                 {
                   fnHandler: 'handleBomFinish',
                   icoName: 'fa el-icon-success',
                   btnName: '完成',
-                  disabled: this.disableToFinish(data)
+                  disabled:
+                    this.disableToFinish(data) &&
+                    this.$hasPermission('pro:projects:update')
                 },
                 {
                   fnHandler: 'handleBomPause',
                   icoName: 'fa el-icon-video-pause',
                   btnName: '暂停',
-                  disabled: this.disableToPause(data)
+                  disabled:
+                    this.disableToPause(data) &&
+                    this.$hasPermission('pro:projects:update')
                 },
                 {
                   fnHandler: 'handleBomStartup',
                   icoName: 'fa el-icon-video-play',
                   btnName: '启动',
-                  disabled: this.disableToStartup(data)
+                  disabled:
+                    this.disableToStartup(data) &&
+                    this.$hasPermission('pro:projects:update')
                 },
                 {
                   fnHandler: 'handleBomTermination',
                   icoName: 'fa el-icon-error',
                   btnName: '终止',
-                  disabled: this.disableToTermination(data)
+                  disabled:
+                    this.disableToTermination(data) &&
+                    this.$hasPermission('pro:projects:update')
                 }
               ];
               break;

+ 534 - 413
src/views/project-manage/planManage/index.vue

@@ -1,9 +1,8 @@
 <template>
   <div class="ele-body">
-
     <el-card shadow="never">
       <!-- 搜索表单 -->
-      <index-search @search="reload"/>
+      <index-search @search="reload" />
       <!-- 数据表格 -->
       <ele-pro-table
         ref="table"
@@ -14,7 +13,8 @@
         full-height="calc(100vh - 116px)"
         cache-key="project-initiationTable"
         :selection.sync="selection"
-        :tree-props="{children: 'children'}"
+        :tree-props="{ children: 'children' }"
+        @row-click="handlePlanTableNodeClick"
       >
         <!-- 表头工具栏 -->
         <template v-slot:toolbar>
@@ -23,7 +23,8 @@
             type="primary"
             icon="el-icon-plus"
             class="ele-btn-icon"
-            @click="openEdit2('','add')">
+            @click="openEdit2('', 'add')"
+          >
             新建2
           </el-button>
           <el-button
@@ -31,7 +32,8 @@
             type="primary"
             icon="el-icon-plus"
             class="ele-btn-icon"
-            @click="openEdit('','add')">
+            @click="openEdit('', 'add')"
+          >
             新建
           </el-button>
           <el-button
@@ -43,51 +45,58 @@
           >
             删除
           </el-button>
-<!--          <el-button-->
-<!--            size="small"-->
-<!--            type="danger"-->
-<!--            icon="el-icon-remove-outline"-->
-<!--            class="ele-btn-icon"-->
-<!--            @click="handleStatus('4')"-->
-<!--          >-->
-<!--            终止-->
-<!--          </el-button>-->
-<!--          <el-button-->
-<!--            size="small"-->
-<!--            type="warning"-->
-<!--            icon="el-icon-video-play"-->
-<!--            class="ele-btn-icon"-->
-<!--            @click="handleStatus('2')"-->
-<!--          >-->
-<!--            暂停-->
-<!--          </el-button>-->
-<!--          <el-button-->
-<!--            size="small"-->
-<!--            type="primary"-->
-<!--            icon="el-icon-video-pause"-->
-<!--            class="ele-btn-icon"-->
-<!--            @click="handleStatus('1')"-->
-<!--          >-->
-<!--            启动-->
-<!--          </el-button>-->
+          <!--          <el-button-->
+          <!--            size="small"-->
+          <!--            type="danger"-->
+          <!--            icon="el-icon-remove-outline"-->
+          <!--            class="ele-btn-icon"-->
+          <!--            @click="handleStatus('4')"-->
+          <!--          >-->
+          <!--            终止-->
+          <!--          </el-button>-->
+          <!--          <el-button-->
+          <!--            size="small"-->
+          <!--            type="warning"-->
+          <!--            icon="el-icon-video-play"-->
+          <!--            class="ele-btn-icon"-->
+          <!--            @click="handleStatus('2')"-->
+          <!--          >-->
+          <!--            暂停-->
+          <!--          </el-button>-->
+          <!--          <el-button-->
+          <!--            size="small"-->
+          <!--            type="primary"-->
+          <!--            icon="el-icon-video-pause"-->
+          <!--            class="ele-btn-icon"-->
+          <!--            @click="handleStatus('1')"-->
+          <!--          >-->
+          <!--            启动-->
+          <!--          </el-button>-->
           <!--          <el-button class="el-icon-sort" size="small" @click="expandAll">-->
           <!--            展开/折叠-->
           <!--          </el-button>-->
           <!-- <div class="el-button--primary">122222</div> -->
         </template>
         <template v-slot:code="{ row }">
-          <el-button type="text" @click="openDetail(row)">{{ row.code }}</el-button>
+          <el-button type="text" @click="openDetail(row)">{{
+            row.code
+          }}</el-button>
         </template>
         <template v-slot:isOverTime="{ row }">
-          <el-tag v-if="row.isOverTime==0" type="success">正常</el-tag>
+          <el-tag v-if="row.isOverTime == 0" type="success">正常</el-tag>
           <el-tag v-else type="danger">超时</el-tag>
         </template>
         <template v-slot:speedPercent="{ row }">
-          <el-progress :stroke-width="20" text-color="#606266"  :text-inside="true" :percentage="row.speedPercent||0" :color="customColorMethod"></el-progress>
+          <el-progress
+            :stroke-width="20"
+            text-color="#606266"
+            :text-inside="true"
+            :percentage="row.speedPercent || 0"
+            :color="customColorMethod"
+          ></el-progress>
         </template>
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
-
           <el-link
             type="primary"
             :underline="false"
@@ -102,7 +111,7 @@
             :underline="false"
             icon="el-icon-edit"
             v-if="[0, 3].includes(row.processStatus)"
-            @click="openEdit(row,'edit')"
+            @click="openEdit(row, 'edit')"
           >
             修改
           </el-link>
@@ -110,7 +119,8 @@
             class="ele-action"
             title="确定要删除吗?"
             v-if="[0, 3].includes(row.processStatus)"
-            @confirm="remove([row.id])">
+            @confirm="remove([row.id])"
+          >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete">
                 删除
@@ -122,41 +132,98 @@
               操作菜单<i class="el-icon-arrow-down el-icon--right"></i>
             </span>
             <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item v-if="[2].includes(row.processStatus)&&[1].includes(row.status)">
-                <el-link icon="el-icon-success" type="success" :underline="false" @click="handleStatus(planFinishAPI,'完成',row)">完成
+              <el-dropdown-item
+                v-if="
+                  [2].includes(row.processStatus) && [1].includes(row.status)
+                "
+              >
+                <el-link
+                  icon="el-icon-success"
+                  type="success"
+                  :underline="false"
+                  @click="handleStatus(planFinishAPI, '完成', row)"
+                  >完成
                 </el-link>
               </el-dropdown-item>
-              <el-dropdown-item v-if="[2].includes(row.processStatus)&&[0,1].includes(row.status)">
-                <el-link icon="el-icon-video-pause" type="warning" :underline="false" @click="handleStatus(planPauseAPI,'暂停',row)">暂停
+              <el-dropdown-item
+                v-if="
+                  [2].includes(row.processStatus) && [0, 1].includes(row.status)
+                "
+              >
+                <el-link
+                  icon="el-icon-video-pause"
+                  type="warning"
+                  :underline="false"
+                  @click="handleStatus(planPauseAPI, '暂停', row)"
+                  >暂停
                 </el-link>
               </el-dropdown-item>
-              <el-dropdown-item v-if="[2].includes(row.processStatus)&&[2].includes(row.status)">
-                <el-link icon="el-icon-video-play" type="success" :underline="false" @click="handleStatus(planStartupAPI,'启动',row)">启动
+              <el-dropdown-item
+                v-if="
+                  [2].includes(row.processStatus) && [2].includes(row.status)
+                "
+              >
+                <el-link
+                  icon="el-icon-video-play"
+                  type="success"
+                  :underline="false"
+                  @click="handleStatus(planStartupAPI, '启动', row)"
+                  >启动
                 </el-link>
               </el-dropdown-item>
-              <el-dropdown-item v-if="[2].includes(row.processStatus)&&[0,1,2].includes(row.status)">
-                <el-link icon="el-icon-error" type="danger" :underline="false" @click="handleStatus(planTerminationAPI,'终止',row)">终止</el-link>
+              <el-dropdown-item
+                v-if="
+                  [2].includes(row.processStatus) &&
+                  [0, 1, 2].includes(row.status)
+                "
+              >
+                <el-link
+                  icon="el-icon-error"
+                  type="danger"
+                  :underline="false"
+                  @click="handleStatus(planTerminationAPI, '终止', row)"
+                  >终止</el-link
+                >
               </el-dropdown-item>
               <el-dropdown-item>
-                <el-link icon="el-icon-info" type="primary" :underline="false" @click="handelBOMConstructDetail(row)">
+                <el-link
+                  icon="el-icon-info"
+                  type="primary"
+                  :underline="false"
+                  @click="handelBOMConstructDetail(row)"
+                >
                   计划信息
                 </el-link>
               </el-dropdown-item>
-              <el-dropdown-item divided v-if="[0,1,2,3].includes(row.processStatus)&&[0,1].includes(row.status)">
+              <el-dropdown-item
+                divided
+                v-if="
+                  [0, 1, 2, 3].includes(row.processStatus) &&
+                  [0, 1].includes(row.status)
+                "
+              >
                 <el-link
                   type="primary"
                   :underline="false"
                   icon="el-icon-plus"
-                  @click="openEdit({...row,parentPlanId:row.id},'add')">
+                  @click="openEdit({ ...row, parentPlanId: row.id }, 'add')"
+                >
                   新增子计划
                 </el-link>
               </el-dropdown-item>
-              <el-dropdown-item divided v-if="[0,1,2,3].includes(row.processStatus)&&[0,1].includes(row.status)">
+              <el-dropdown-item
+                divided
+                v-if="
+                  [0, 1, 2, 3].includes(row.processStatus) &&
+                  [0, 1].includes(row.status)
+                "
+              >
                 <el-link
                   type="primary"
                   :underline="false"
                   icon="el-icon-plus"
-                  @click="handleAddTask(row)">
+                  @click="handleAddTask(row)"
+                >
                   新增任务
                 </el-link>
               </el-dropdown-item>
@@ -166,392 +233,446 @@
       </ele-pro-table>
     </el-card>
     <!-- 编辑弹窗 -->
-    <add-or-edit-dialog v-if="addOrEditDialogFlag" @reload="reload" :addOrEditDialogFlag.sync="addOrEditDialogFlag"
-                        ref="addOrEditDialogRef"></add-or-edit-dialog>
-    <add-dialog v-if="addDialogFlag" @reload="reload" :addDialogFlag.sync="addDialogFlag"
-                        ref="addDialogRef"></add-dialog>
+    <add-or-edit-dialog
+      v-if="addOrEditDialogFlag"
+      @reload="reload"
+      :addOrEditDialogFlag.sync="addOrEditDialogFlag"
+      ref="addOrEditDialogRef"
+    ></add-or-edit-dialog>
+    <add-dialog
+      v-if="addDialogFlag"
+      @reload="reload"
+      :addDialogFlag.sync="addDialogFlag"
+      ref="addDialogRef"
+    ></add-dialog>
 
-    <detail-dialog v-if="detailDialogFlag" :detailDialogFlag.sync="detailDialogFlag"
-                   ref="detailDialogRef"></detail-dialog>
+    <detail-dialog
+      v-if="detailDialogFlag"
+      :detailDialogFlag.sync="detailDialogFlag"
+      ref="detailDialogRef"
+    ></detail-dialog>
     <!-- 新增任务 -->
-    <add-task-dialog v-if="addTaskDialogFlag" @reload="reload" :addOrEditDialogFlag.sync="addTaskDialogFlag"
-                        ref="addTaskDialogRef"></add-task-dialog>
+    <add-task-dialog
+      v-if="addTaskDialogFlag"
+      @reload="reload"
+      :addOrEditDialogFlag.sync="addTaskDialogFlag"
+      ref="addTaskDialogRef"
+    ></add-task-dialog>
     <!-- 多选删除弹窗 -->
     <pop-modal
       :visible.sync="delVisible"
       content="是否确定删除?"
       @done="commitBtn"
     />
-    <process-submit-dialog :processSubmitDialogFlag.sync="processSubmitDialogFlag" v-if="processSubmitDialogFlag" ref="processSubmitDialogRef" @reload="reload"></process-submit-dialog>
+    <process-submit-dialog
+      :processSubmitDialogFlag.sync="processSubmitDialogFlag"
+      v-if="processSubmitDialogFlag"
+      ref="processSubmitDialogRef"
+      @reload="reload"
+    ></process-submit-dialog>
   </div>
 </template>
 
 <script>
+  import indexSearch from './components/index-search.vue';
+  import addOrEditDialog from './components/addOrEditDialog.vue';
+  import detailDialog from './components/detailDialog.vue';
+  import addDialog from '@/views/project-manage/planManage/components/addDialog.vue';
+  import {
+    projectsPlanDeleteAPI,
+    projectsPlanPageAPI,
+    submit,
+    planFinishAPI,
+    planPauseAPI,
+    planStartupAPI,
+    planTerminationAPI
+  } from '@/api/project-manage/plan';
+  import { proStatusEnum, reviewStatusEnum } from '@/enum/dict';
+  import { mapGetters } from 'vuex';
+  import { getByCode } from '@/api/system/dictionary-data';
+  import popModal from '@/components/pop-modal/index.vue';
+  import addTaskDialog from '../task-manage/components/addOrEditDialog.vue';
+  import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
+  export default {
+    name: 'index',
+    components: {
+      processSubmitDialog,
+      popModal,
+      addOrEditDialog,
+      detailDialog,
+      indexSearch,
+      addDialog,
+      addTaskDialog
+    },
+    props: {
+      projectType: {
+        type: Number,
+        default: 0
+      },
+      ids: {
+        type: String,
+        default: ''
+      }
+    },
+    computed: {
+      ...mapGetters(['getDictValue']),
 
-import indexSearch from "./components/index-search.vue";
-import addOrEditDialog from "./components/addOrEditDialog.vue";
-import detailDialog from "./components/detailDialog.vue";
-import addDialog from "@/views/project-manage/planManage/components/addDialog.vue";
-import {
-  projectsPlanDeleteAPI,
-  projectsPlanPageAPI,
-  submit,
-  planFinishAPI,
-  planPauseAPI,
-  planStartupAPI,
-  planTerminationAPI,
-} from "@/api/project-manage/plan";
-import {proStatusEnum, reviewStatusEnum} from '@/enum/dict';
-import {mapGetters} from "vuex";
-import {getByCode} from "@/api/system/dictionary-data";
-import popModal from "@/components/pop-modal/index.vue";
-import addTaskDialog from '../task-manage/components/addOrEditDialog.vue'
-import processSubmitDialog from "@/BIZComponents/processSubmitDialog/processSubmitDialog.vue";
-export default {
-  name: 'index',
-  components: {
-    processSubmitDialog,
-    popModal,
-    addOrEditDialog,
-    detailDialog,
-    indexSearch,
-    addDialog,
-    addTaskDialog
-  },
-  computed: {
-    ...mapGetters(['getDictValue']),
-
-    columns() {
-      return [
-        {
-          width: 45,
-          type: 'selection',
-          columnKey: 'selection',
-          align: 'center'
-        },
-        {
-          columnKey: 'index',
-          label: '序号',
-          type: 'index',
-          width: 55,
-          align: 'center',
-          showOverflowTooltip: true,
-        },
-        {
-          prop: 'code',
-          label: '计划编码',
-          align: 'center',
-          showOverflowTooltip: true,
-          slot: 'code',
-          minWidth: 200
-        },
-        {
-          prop: 'name',
-          label: '计划名称',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 120
-        },
+      columns() {
+        return [
+          {
+            width: 45,
+            type: 'selection',
+            columnKey: 'selection',
+            align: 'center'
+          },
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'code',
+            label: '计划编码',
+            align: 'center',
+            showOverflowTooltip: true,
+            slot: 'code',
+            minWidth: 200
+          },
+          {
+            prop: 'name',
+            label: '计划名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
 
-        {
-          prop: 'projectName',
-          label: '关联项目',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 120
-        },
-        {
-          prop: 'projectStageName',
-          label: '关联项目阶段',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 120
-        },
-        // {
-        //   prop: 'responsibleDeptName',
-        //   label: '负责部门',
-        //   align: 'center',
-        //   showOverflowTooltip: true,
-        //   minWidth: 100
-        // },
-        {
-          prop: 'responsibleUserName',
-          label: '负责人',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 120,
-          formatter: (_row, _column, cellValue) => {
-            return !_row.responsibleUserList.length ?  '' : _row.responsibleUserList.map(i => i.userName).join(',');
-          }
-        },
+          {
+            prop: 'projectName',
+            label: '关联项目',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
+          {
+            prop: 'projectStageName',
+            label: '关联项目阶段',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
+          // {
+          //   prop: 'responsibleDeptName',
+          //   label: '负责部门',
+          //   align: 'center',
+          //   showOverflowTooltip: true,
+          //   minWidth: 100
+          // },
+          {
+            prop: 'responsibleUserName',
+            label: '负责人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120,
+            formatter: (_row, _column, cellValue) => {
+              return !_row.responsibleUserList.length
+                ? ''
+                : _row.responsibleUserList.map((i) => i.userName).join(',');
+            }
+          },
 
-        {
-          prop: 'planStartDate',
-          label: '计划开始日期',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 140
-        },
-        {
-          prop: 'planEndDate',
-          label: '计划完成日期',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 140
-        },
-        {
-          prop: 'realStartTime',
-          label: '实际开始日期',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 140
-        },
-        {
-          prop: 'realEndTime',
-          label: '实际完成日期',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 140
-        },
-        {
-          prop: 'cost',
-          label: '费用(元)',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 140
-        },
-        {
-          prop: 'status',
-          label: '计划状态',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 100,
-          formatter: (_row, _column, cellValue) => {
-            return proStatusEnum[_row.status].label;
+          {
+            prop: 'planStartDate',
+            label: '计划开始日期',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
+            prop: 'planEndDate',
+            label: '计划完成日期',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
+            prop: 'realStartTime',
+            label: '实际开始日期',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
+            prop: 'realEndTime',
+            label: '实际完成日期',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
+            prop: 'cost',
+            label: '费用(元)',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
+            prop: 'status',
+            label: '计划状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100,
+            formatter: (_row, _column, cellValue) => {
+              return proStatusEnum[_row.status].label;
+            }
+          },
+          {
+            prop: 'processStatus',
+            label: '审核状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100,
+            formatter: (_row, _column, cellValue) => {
+              return reviewStatusEnum[_row.processStatus].label;
+            }
+          },
+          {
+            prop: 'isOverTime',
+            label: '是否超时',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100,
+            slot: 'isOverTime'
+          },
+          {
+            prop: 'speedPercent',
+            label: '计划进度',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150,
+            slot: 'speedPercent'
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 290,
+            align: 'center',
+            resizable: false,
+            slot: 'action',
+            showOverflowTooltip: true
           }
-        },
-        {
-          prop: 'processStatus',
-          label: '审核状态',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 100,
-          formatter: (_row, _column, cellValue) => {
-            return reviewStatusEnum[_row.processStatus].label;
-          }
-        },
-        {
-          prop: 'isOverTime',
-          label: '是否超时',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 100,
-          slot: 'isOverTime'
-        },
-        {
-          prop: 'speedPercent',
-          label: '计划进度',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 150,
-          slot: 'speedPercent'
-        },
-        {
-          columnKey: 'action',
-          label: '操作',
-          width: 290,
-          align: 'center',
-          resizable: false,
-          slot: 'action',
-          showOverflowTooltip: true,
-        },
-
-      ]
-    },
-  },
-  data() {
-    return {
-      planFinishAPI:planFinishAPI,
-      planPauseAPI:planPauseAPI,
-      planStartupAPI:planStartupAPI,
-      planTerminationAPI:planTerminationAPI,
-      selection: [],
-      dictList: [],
-      // 表格列配置
-
-      // 是否显示编辑弹窗
-      addOrEditDialogFlag: false,
-      addDialogFlag: false,
-      detailDialogFlag: false,
-      delVisible: false,
-      addTaskDialogFlag: false,
-      processSubmitDialogFlag: false,
-      // 展开折叠
-      expandAllFlag: false
-    };
-  },
-  async created() {
-  },
-  methods: {
-    getDictV(code, val) {
-      if (!this.dictList[code]) return '';
-      return this.dictList[code].find(item => item.value == val)?.label
-    },
-    async getDictList(code) {
-      let {data: res} = await getByCode(code)
-      this.dictList[code] = res.map(item => {
-        let values = Object.keys(item)
-        return {
-          value: values[0],
-          label: item[values[0]]
-        }
-      })
-    },
-    customColorMethod(percentage) {
-      if (percentage < 30) {
-        return '#909399';
-      } else if (percentage < 70) {
-        return '#e6a23c';
-      } else {
-        return '#67c23a';
+        ];
       }
     },
-    /* 表格数据源 */
-    async datasource({page, limit, where, parent}) {
-      await this.getDictList('pro_projects_status')
-      await this.getDictList('pro_projects_type')
-      return projectsPlanPageAPI({
-        pageNum: page,
-        size: limit,
-        ...where
-      });
-    },
-    /* 刷新表格 */
-    reload(where) {
-      this.$refs.table.reload({where, size: 1, pageNum: 10});
-    },
-    /* 显示编辑 */
-    openEdit2(row = {}, type) {
-      this.addDialogFlag = true;
-      this.$nextTick(() => {
-        this.$refs.addDialogRef.init(row, type)
-      })
-    },
-    /* 显示编辑 */
-    openEdit(row = {}, type) {
-      this.addOrEditDialogFlag = true;
-      this.$nextTick(() => {
-        this.$refs.addOrEditDialogRef.init(row, type)
-      })
-    },
-    openDetail(row = {}) {
-      this.detailDialogFlag = true;
-      this.$nextTick(() => {
-        this.$refs.detailDialogRef.init(row)
-      })
-    },
-    handleAddTask(row){
-      this.addTaskDialogFlag = true;
-      this.$nextTick(() => {
-        row.targetPlanId = row.id
-        this.$refs.addTaskDialogRef.init(row,'add')
-      })
+    data() {
+      return {
+        planFinishAPI: planFinishAPI,
+        planPauseAPI: planPauseAPI,
+        planStartupAPI: planStartupAPI,
+        planTerminationAPI: planTerminationAPI,
+        selection: [],
+        dictList: [],
+        // 表格列配置
+
+        // 是否显示编辑弹窗
+        addOrEditDialogFlag: false,
+        addDialogFlag: false,
+        detailDialogFlag: false,
+        delVisible: false,
+        addTaskDialogFlag: false,
+        processSubmitDialogFlag: false,
+        // 展开折叠
+        expandAllFlag: false
+      };
     },
-    handelBOMConstructDetail(row) {
-      this.$router.push({
-        path: '/project-manage/planManage/components/details',
-        query: {
-          row: JSON.stringify(row),
+    async created() {},
+    methods: {
+      handlePlanTableNodeClick(row) {
+        this.$emit('handlePlanTableNodeClick', row);
+      },
+      getDictV(code, val) {
+        if (!this.dictList[code]) return '';
+        return this.dictList[code].find((item) => item.value == val)?.label;
+      },
+      async getDictList(code) {
+        let { data: res } = await getByCode(code);
+        this.dictList[code] = res.map((item) => {
+          let values = Object.keys(item);
+          return {
+            value: values[0],
+            label: item[values[0]]
+          };
+        });
+      },
+      customColorMethod(percentage) {
+        if (percentage < 30) {
+          return '#909399';
+        } else if (percentage < 70) {
+          return '#e6a23c';
+        } else {
+          return '#67c23a';
         }
-      });
-    },
-    //流程提交
-    processSubmit(row) {
-      this.processSubmitDialogFlag = true
-      this.$nextTick(()=>{
-        let params = {
-          businessId:row.id,
-          businessKey : 'pro_plan_approve_basic',
-          callBackMethodType : '1',
-          callBackMethod : 'proTargetPlanApproveApiImpl.updatePlanApprovalStatus',
-          pcHandle : '/bpm/handleTask/components/project-manage/plan-manage/submit.vue',
-          pcView : '/bpm/handleTask/components/project-manage/plan-manage/detailDialog.vue',
-          miniHandle : '',
-          miniView : '',
-          formCreateUserId: row.createUserId,
+      },
+      /* 表格数据源 */
+      async datasource({ page, limit, where, parent }) {
+        await this.getDictList('pro_projects_status');
+        await this.getDictList('pro_projects_type');
+        let paramAttr = '';
+        switch (this.projectType) {
+          case 1:
+            paramAttr = 'projectBomId';
+            break;
+          case 2:
+            paramAttr = 'projectStageId';
+            break;
+          default:
+            paramAttr = 'projectId';
         }
+        return projectsPlanPageAPI({
+          pageNum: page,
+          size: limit,
+          ...where,
+          [paramAttr]: this.ids
+        });
+      },
+      /* 刷新表格 */
+      reload(where) {
+        this.$refs.table.reload({ where, size: 1, pageNum: 10 });
+      },
+      /* 显示编辑 */
+      openEdit2(row = {}, type) {
+        this.addDialogFlag = true;
+        this.$nextTick(() => {
+          this.$refs.addDialogRef.init(row, type);
+        });
+      },
+      /* 显示编辑 */
+      openEdit(row = {}, type) {
+        this.addOrEditDialogFlag = true;
+        this.$nextTick(() => {
+          this.$refs.addOrEditDialogRef.init(row, type);
+        });
+      },
+      openDetail(row = {}) {
+        this.detailDialogFlag = true;
+        this.$nextTick(() => {
+          this.$refs.detailDialogRef.init(row);
+        });
+      },
+      handleAddTask(row) {
+        this.addTaskDialogFlag = true;
+        this.$nextTick(() => {
+          row.targetPlanId = row.id;
+          this.$refs.addTaskDialogRef.init(row, 'add');
+        });
+      },
+      handelBOMConstructDetail(row) {
+        this.$router.push({
+          path: '/project-manage/planManage/components/details',
+          query: {
+            row: JSON.stringify(row)
+          }
+        });
+      },
+      //流程提交
+      processSubmit(row) {
+        this.processSubmitDialogFlag = true;
+        this.$nextTick(() => {
+          let params = {
+            businessId: row.id,
+            businessKey: 'pro_plan_approve_basic',
+            callBackMethodType: '1',
+            callBackMethod:
+              'proTargetPlanApproveApiImpl.updatePlanApprovalStatus',
+            pcHandle:
+              '/bpm/handleTask/components/project-manage/plan-manage/submit.vue',
+            pcView:
+              '/bpm/handleTask/components/project-manage/plan-manage/detailDialog.vue',
+            miniHandle: '',
+            miniView: '',
+            formCreateUserId: row.createUserId
+          };
 
-
-        this.$refs.processSubmitDialogRef.init(params)
-      })
-      // submit({
-      //   planId: row.id
-      // }).then((res) => {
-      //   this.$message.success('提交成功');
-      //   this.reload();
-      // });
-    },
-    //批量删除
-    allDelBtn() {
-      if (this.selection.length === 0) return;
-      let flag =  this.selection.some(item=>[1,2].includes(item.processStatus))
-      if(flag) return this.$message.warning('抱歉已审核、审核中的数据不能删除,请检查')
-      this.delVisible = true;
-    },
-    //删除弹框确定
-    commitBtn() {
-      const dataId = this.selection.map((v) => v.id);
-      this.remove(dataId);
-    },
-    /* 删除 */
-    remove(ids) {
-      const loading = this.$loading({lock: true});
-      projectsPlanDeleteAPI(ids)
-        .then((res) => {
-          loading.close();
-          this.$message.success('删除成功');
-          this.reload();
-        })
-        .catch((e) => {
-          loading.close();
-          // this.$message.error(e.message);
+          this.$refs.processSubmitDialogRef.init(params);
         });
-    },
-    async handleStatus(API, msg, row) {
-      let message = '确定' + msg + '该计划吗';
-      this.$confirm(message, '提示', {
-        type: 'warning'
-      }).then(async () => {
-        await API(row.id)
-        this.$message.success('操作成功');
-        this.reload();
-      }).catch(() => {
-      });
-    },
-    /* 展开/折叠全部 */
-    expandAll() {
-      this.expandAllFlag = !this.expandAllFlag;
-      this.$refs.table.toggleRowExpansionAll(this.expandAllFlag);
-    },
-  }
-};
+        // submit({
+        //   planId: row.id
+        // }).then((res) => {
+        //   this.$message.success('提交成功');
+        //   this.reload();
+        // });
+      },
+      //批量删除
+      allDelBtn() {
+        if (this.selection.length === 0) return;
+        let flag = this.selection.some((item) =>
+          [1, 2].includes(item.processStatus)
+        );
+        if (flag)
+          return this.$message.warning(
+            '抱歉已审核、审核中的数据不能删除,请检查'
+          );
+        this.delVisible = true;
+      },
+      //删除弹框确定
+      commitBtn() {
+        const dataId = this.selection.map((v) => v.id);
+        this.remove(dataId);
+      },
+      /* 删除 */
+      remove(ids) {
+        const loading = this.$loading({ lock: true });
+        projectsPlanDeleteAPI(ids)
+          .then((res) => {
+            loading.close();
+            this.$message.success('删除成功');
+            this.reload();
+          })
+          .catch((e) => {
+            loading.close();
+            // this.$message.error(e.message);
+          });
+      },
+      async handleStatus(API, msg, row) {
+        let message = '确定' + msg + '该计划吗';
+        this.$confirm(message, '提示', {
+          type: 'warning'
+        })
+          .then(async () => {
+            await API(row.id);
+            this.$message.success('操作成功');
+            this.reload();
+          })
+          .catch(() => {});
+      },
+      /* 展开/折叠全部 */
+      expandAll() {
+        this.expandAllFlag = !this.expandAllFlag;
+        this.$refs.table.toggleRowExpansionAll(this.expandAllFlag);
+      }
+    }
+  };
 </script>
 <style lang="scss" scoped>
-.el-dropdown-link {
-  cursor: pointer;
-  color: #188ffd;
-}
-::v-deep .el-dropdown-link {
-  cursor: pointer;
-  color: #188ffd;
-
-}
-::v-deep .el-dropdown-menu__item{
-  .el-link{
-    width: 100%;
-    display: flex;
-    flex: 1;
-    justify-content: flex-start;
+  .el-dropdown-link {
+    cursor: pointer;
+    color: #188ffd;
+  }
+  ::v-deep .el-dropdown-link {
+    cursor: pointer;
+    color: #188ffd;
+  }
+  ::v-deep .el-dropdown-menu__item {
+    .el-link {
+      width: 100%;
+      display: flex;
+      flex: 1;
+      justify-content: flex-start;
+    }
+  }
+  ::v-deep .ele-table-tool-default {
+    display: flex !important;
   }
-}
 </style>

+ 306 - 295
src/views/project-manage/project-initiation/index.vue

@@ -1,305 +1,314 @@
 <template>
-  <el-card shadow="never">
-    <ele-split-layout
-      width="180px"
-      allow-collapse
-      :right-style="{ overflow: 'hidden' }"
-    >
-      <div>
-        <div
-          class="ele-border-lighter sys-organization-list"
-          style="margin-left: 10px"
-        >
-          <AssetTree
-            @handleNodeClick="handleNodeClick"
-            :defaultExpandAll="true"
-            code="XM1"
-            :isFirstRefreshTable="false"
-            ref="treeList"
-          />
-        </div>
-      </div>
-      <template v-slot:content>
-        <el-card shadow="never">
-          <index-search @search="reload" />
-          <!-- 数据表格 -->
-          <ele-pro-table
-            ref="table"
-            row-key="id"
-            :columns="columns"
-            :datasource="datasource"
-            height="calc(100vh - 400px)"
-            full-height="calc(100vh - 116px)"
-            :default-expand-all="true"
-            cache-key="project-initiationTable"
-            :selection.sync="selection"
-            :tree-props="{ children: 'projectList' }"
-            @done="onDone"
-            :indent="15"
+  <div class="ele-body">
+    <el-card shadow="never">
+      <ele-split-layout
+        width="180px"
+        allow-collapse
+        :right-style="{ overflow: 'hidden' }"
+      >
+        <div>
+          <div
+            class="ele-border-lighter sys-organization-list"
+            style="margin-left: 10px"
           >
-            <!--        :lazy="true"-->
-            <!-- 表头工具栏 -->
-            <template v-slot:toolbar>
-              <el-button
-                size="small"
-                type="primary"
-                icon="el-icon-plus"
-                class="ele-btn-icon"
-                v-if="$hasPermission('pro:projects:save')"
-                @click="openEdit('', 'add')"
-              >
-                新建
-              </el-button>
-              <el-button
-                size="small"
-                type="danger"
-                icon="el-icon-delete"
-                class="ele-btn-icon"
-                v-if="$hasPermission('pro:projects:delete')"
-                @click="allDelBtn"
-              >
-                删除
-              </el-button>
-              <!--          <el-button-->
-              <!--            size="small"-->
-              <!--            type="danger"-->
-              <!--            icon="el-icon-remove-outline"-->
-              <!--            class="ele-btn-icon"-->
-              <!--            @click="handleStatus('4')"-->
-              <!--          >-->
-              <!--            终止-->
-              <!--          </el-button>-->
-              <!--          <el-button-->
-              <!--            size="small"-->
-              <!--            type="warning"-->
-              <!--            icon="el-icon-video-play"-->
-              <!--            class="ele-btn-icon"-->
-              <!--            @click="handleStatus('2')"-->
-              <!--          >-->
-              <!--            暂停-->
-              <!--          </el-button>-->
-              <!--          <el-button-->
-              <!--            size="small"-->
-              <!--            type="primary"-->
-              <!--            icon="el-icon-video-pause"-->
-              <!--            class="ele-btn-icon"-->
-              <!--            @click="handleStatus('1')"-->
-              <!--          >-->
-              <!--            启动-->
-              <!--          </el-button>-->
-              <!--          <el-button class="el-icon-sort" size="small" @click="expandAll">-->
-              <!--            展开/折叠-->
-              <!--          </el-button>-->
-              <!-- <div class="el-button--primary">122222</div> -->
-            </template>
-            <template v-slot:code="{ row }">
-              <el-button
-                type="text"
-                @click="handelBOMConstructDetail(row, 'view')"
-                >{{ row.code }}</el-button
-              >
-            </template>
-            <template v-slot:status="{ row }">
-              {{ getDictV('pro_projects_status', row.status) }}
-            </template>
-            <!-- <template v-slot:type="{ row }">
+            <AssetTree
+              @handleNodeClick="handleNodeClick"
+              :defaultExpandAll="true"
+              code="XM1"
+              :isFirstRefreshTable="false"
+              ref="treeList"
+            />
+          </div>
+        </div>
+        <template v-slot:content>
+          <el-card shadow="never">
+            <index-search @search="reload" />
+            <!-- 数据表格 -->
+            <ele-pro-table
+              ref="table"
+              row-key="id"
+              :columns="columns"
+              :datasource="datasource"
+              height="calc(100vh - 400px)"
+              full-height="calc(100vh - 116px)"
+              :default-expand-all="true"
+              cache-key="project-initiationTable"
+              :selection.sync="selection"
+              :tree-props="{ children: 'projectList' }"
+              @done="onDone"
+              :indent="15"
+            >
+              <!--        :lazy="true"-->
+              <!-- 表头工具栏 -->
+              <template v-slot:toolbar>
+                <el-button
+                  size="small"
+                  type="primary"
+                  icon="el-icon-plus"
+                  class="ele-btn-icon"
+                  v-if="$hasPermission('pro:projects:save')"
+                  @click="openEdit('', 'add')"
+                >
+                  新建
+                </el-button>
+                <el-button
+                  size="small"
+                  type="danger"
+                  icon="el-icon-delete"
+                  class="ele-btn-icon"
+                  v-if="$hasPermission('pro:projects:delete')"
+                  @click="allDelBtn"
+                >
+                  删除
+                </el-button>
+                <!--          <el-button-->
+                <!--            size="small"-->
+                <!--            type="danger"-->
+                <!--            icon="el-icon-remove-outline"-->
+                <!--            class="ele-btn-icon"-->
+                <!--            @click="handleStatus('4')"-->
+                <!--          >-->
+                <!--            终止-->
+                <!--          </el-button>-->
+                <!--          <el-button-->
+                <!--            size="small"-->
+                <!--            type="warning"-->
+                <!--            icon="el-icon-video-play"-->
+                <!--            class="ele-btn-icon"-->
+                <!--            @click="handleStatus('2')"-->
+                <!--          >-->
+                <!--            暂停-->
+                <!--          </el-button>-->
+                <!--          <el-button-->
+                <!--            size="small"-->
+                <!--            type="primary"-->
+                <!--            icon="el-icon-video-pause"-->
+                <!--            class="ele-btn-icon"-->
+                <!--            @click="handleStatus('1')"-->
+                <!--          >-->
+                <!--            启动-->
+                <!--          </el-button>-->
+                <!--          <el-button class="el-icon-sort" size="small" @click="expandAll">-->
+                <!--            展开/折叠-->
+                <!--          </el-button>-->
+                <!-- <div class="el-button--primary">122222</div> -->
+              </template>
+              <template v-slot:code="{ row }">
+                <el-button
+                  type="text"
+                  @click="handelBOMConstructDetail(row, 'view')"
+                  >{{ row.code }}</el-button
+                >
+              </template>
+              <template v-slot:status="{ row }">
+                {{ getDictV('pro_projects_status', row.status) }}
+              </template>
+              <!-- <template v-slot:type="{ row }">
               {{ getDictV('pro_projects_type', row.type) }}
             </template> -->
-            <template v-slot:isOverTime="{ row }">
-              <el-tag v-if="row.isOverTime == 0" type="success">正常</el-tag>
-              <el-tag v-else type="danger">超时</el-tag>
-            </template>
-            <template v-slot:isOverbudget="{ row }">
-              <el-tag v-if="row.isOverbudget == 0" type="success">否</el-tag>
-              <el-tag v-else type="danger">是</el-tag>
-            </template>
-            <template v-slot:speedPercent="{ row }">
-              <el-progress
-                :stroke-width="20"
-                text-color="#606266"
-                :text-inside="true"
-                :percentage="row.speedPercent || 0"
-                :color="customColorMethod"
-              ></el-progress>
-            </template>
+              <template v-slot:isOverTime="{ row }">
+                <el-tag v-if="row.isOverTime == 0" type="success">正常</el-tag>
+                <el-tag v-else type="danger">超时</el-tag>
+              </template>
+              <template v-slot:isOverbudget="{ row }">
+                <el-tag v-if="row.isOverbudget == 0" type="success">否</el-tag>
+                <el-tag v-else type="danger">是</el-tag>
+              </template>
+              <template v-slot:speedPercent="{ row }">
+                <el-progress
+                  :stroke-width="20"
+                  text-color="#606266"
+                  :text-inside="true"
+                  :percentage="row.speedPercent || 0"
+                  :color="customColorMethod"
+                ></el-progress>
+              </template>
 
-            <!-- 操作列 -->
-            <template v-slot:action="{ row }">
-              <el-link
-                type="primary"
-                :underline="false"
-                icon="el-icon-plus"
-                @click="processSubmit(row)"
-                v-if="[0, 3].includes(row.processStatus)"
-              >
-                提交
-              </el-link>
-              <el-link
-                type="primary"
-                :underline="false"
-                icon="el-icon-edit"
-                v-if="
-                  [0, 3].includes(row.processStatus) &&
-                  $hasPermission('pro:projects:update')
-                "
-                @click="openEdit(row, 'edit')"
-              >
-                修改
-              </el-link>
+              <!-- 操作列 -->
+              <template v-slot:action="{ row }">
+                <el-link
+                  type="primary"
+                  :underline="false"
+                  icon="el-icon-plus"
+                  @click="processSubmit(row)"
+                  v-if="[0, 3].includes(row.processStatus)"
+                >
+                  提交
+                </el-link>
+                <el-link
+                  type="primary"
+                  :underline="false"
+                  icon="el-icon-edit"
+                  v-if="
+                    [0, 3].includes(row.processStatus) &&
+                    $hasPermission('pro:projects:update')
+                  "
+                  @click="openEdit(row, 'edit')"
+                >
+                  修改
+                </el-link>
 
-              <el-popconfirm
-                class="ele-action"
-                title="确定要删除吗?"
-                v-if="
-                  [0, 3].includes(row.processStatus) &&
-                  $hasPermission('pro:projects:delete')
-                "
-                @confirm="remove([row.id])"
-              >
-                <template v-slot:reference>
-                  <el-link
-                    type="danger"
-                    :underline="false"
-                    icon="el-icon-delete"
-                  >
-                    删除
-                  </el-link>
-                </template>
-              </el-popconfirm>
-
-              <el-dropdown trigger="click">
-                <span class="el-dropdown-link">
-                  操作菜单<i class="el-icon-arrow-down el-icon--right"></i>
-                </span>
-                <el-dropdown-menu slot="dropdown">
-                  <el-dropdown-item
-                    v-if="
-                      ![0, 1, 3].includes(row.processStatus) &&
-                      ![4, 2, 3].includes(row.status) &&
-                      $hasPermission('pro:projects:update')
-                    "
-                  >
+                <el-popconfirm
+                  class="ele-action"
+                  title="确定要删除吗?"
+                  v-if="
+                    [0, 3].includes(row.processStatus) &&
+                    $hasPermission('pro:projects:delete')
+                  "
+                  @confirm="remove([row.id])"
+                >
+                  <template v-slot:reference>
                     <el-link
-                      icon="el-icon-success"
-                      type="success"
-                      :underline="false"
-                      @click="handleStatus(projectsFinishAPI, '完成', row)"
-                      >完成
-                    </el-link>
-                  </el-dropdown-item>
-                  <el-dropdown-item
-                    v-if="
-                      ![0, 1, 3].includes(row.processStatus) &&
-                      ![4, 2, 3].includes(row.status) &&
-                      $hasPermission('pro:projects:update')
-                    "
-                  >
-                    <el-link
-                      icon="el-icon-video-pause"
-                      type="warning"
-                      :underline="false"
-                      @click="handleStatus(projectsPauseAPI, '暂停', row)"
-                      >暂停
-                    </el-link>
-                  </el-dropdown-item>
-                  <el-dropdown-item
-                    v-if="
-                      ![0, 1, 3].includes(row.processStatus) &&
-                      ![4, 1, 0, 3].includes(row.status) &&
-                      $hasPermission('pro:projects:update')
-                    "
-                  >
-                    <el-link
-                      icon="el-icon-video-play"
-                      type="success"
-                      :underline="false"
-                      @click="handleStatus(projectsStartupAPI, '启动', row)"
-                      >启动
-                    </el-link>
-                  </el-dropdown-item>
-                  <el-dropdown-item
-                    v-if="
-                      ![0, 1, 3].includes(row.processStatus) &&
-                      ![4, 3].includes(row.status) &&
-                      $hasPermission('pro:projects:update')
-                    "
-                  >
-                    <el-link
-                      icon="el-icon-error"
                       type="danger"
                       :underline="false"
-                      @click="handleStatus(projectsTerminationAPI, '终止', row)"
-                      >终止</el-link
-                    >
-                  </el-dropdown-item>
-                  <el-dropdown-item>
-                    <el-link
-                      icon="el-icon-info"
-                      type="primary"
-                      :underline="false"
-                      @click="handelBOMConstructDetail(row)"
+                      icon="el-icon-delete"
                     >
-                      项目信息
+                      删除
                     </el-link>
-                  </el-dropdown-item>
-                  <el-dropdown-item
-                    divided
-                    v-if="
-                      [0, 1, 2, 3].includes(row.processStatus) &&
-                      [0, 1].includes(row.status)
-                    "
-                  >
-                    <el-link
-                      icon="el-icon-circle-plus"
-                      type="primary"
-                      :underline="false"
-                      @click="handleAddPlan(row)"
+                  </template>
+                </el-popconfirm>
+
+                <el-dropdown trigger="click">
+                  <span class="el-dropdown-link">
+                    操作菜单<i class="el-icon-arrow-down el-icon--right"></i>
+                  </span>
+                  <el-dropdown-menu slot="dropdown">
+                    <el-dropdown-item
+                      v-if="
+                        ![0, 1, 3].includes(row.processStatus) &&
+                        ![4, 2, 3].includes(row.status) &&
+                        $hasPermission('pro:projects:update')
+                      "
                     >
-                      新增计划
-                    </el-link>
-                  </el-dropdown-item>
-                </el-dropdown-menu>
-              </el-dropdown>
-            </template>
-          </ele-pro-table>
-        </el-card>
-      </template>
-      <!-- 编辑弹窗 -->
-      <add-or-edit-dialog
-        v-if="addOrEditDialogFlag"
-        @reload="reload"
-        :addOrEditDialogFlag.sync="addOrEditDialogFlag"
-        ref="addOrEditDialogRef"
-      ></add-or-edit-dialog>
-      <detail-dialog
-        v-if="detailDialogFlag"
-        :detailDialogFlag.sync="detailDialogFlag"
-        ref="detailDialogRef"
-      ></detail-dialog>
-      <!-- 新增计划 -->
-      <add-plan-dialog
-        v-if="addPlanDialogFLag"
-        @reload="reload"
-        :addOrEditDialogFlag.sync="addPlanDialogFLag"
-        ref="addPlanDialogRef"
-      ></add-plan-dialog>
-      <!-- 多选删除弹窗 -->
-      <pop-modal
-        :visible.sync="delVisible"
-        content="是否确定删除?"
-        @done="commitBtn"
-      />
-      <process-submit-dialog
-        :processSubmitDialogFlag.sync="processSubmitDialogFlag"
-        v-if="processSubmitDialogFlag"
-        ref="processSubmitDialogRef"
-        @reload="reload"
-      ></process-submit-dialog>
-    </ele-split-layout>
-  </el-card>
+                      <el-link
+                        icon="el-icon-success"
+                        type="success"
+                        :underline="false"
+                        @click="handleStatus(projectsFinishAPI, '完成', row)"
+                        >完成
+                      </el-link>
+                    </el-dropdown-item>
+                    <el-dropdown-item
+                      v-if="
+                        ![0, 1, 3].includes(row.processStatus) &&
+                        ![4, 2, 3].includes(row.status) &&
+                        $hasPermission('pro:projects:update')
+                      "
+                    >
+                      <el-link
+                        icon="el-icon-video-pause"
+                        type="warning"
+                        :underline="false"
+                        @click="handleStatus(projectsPauseAPI, '暂停', row)"
+                        >暂停
+                      </el-link>
+                    </el-dropdown-item>
+                    <el-dropdown-item
+                      v-if="
+                        ![0, 1, 3].includes(row.processStatus) &&
+                        ![4, 1, 0, 3].includes(row.status) &&
+                        $hasPermission('pro:projects:update')
+                      "
+                    >
+                      <el-link
+                        icon="el-icon-video-play"
+                        type="success"
+                        :underline="false"
+                        @click="handleStatus(projectsStartupAPI, '启动', row)"
+                        >启动
+                      </el-link>
+                    </el-dropdown-item>
+                    <el-dropdown-item
+                      v-if="
+                        ![0, 1, 3].includes(row.processStatus) &&
+                        ![4, 3].includes(row.status) &&
+                        $hasPermission('pro:projects:update')
+                      "
+                    >
+                      <el-link
+                        icon="el-icon-error"
+                        type="danger"
+                        :underline="false"
+                        @click="
+                          handleStatus(projectsTerminationAPI, '终止', row)
+                        "
+                        >终止</el-link
+                      >
+                    </el-dropdown-item>
+                    <el-dropdown-item>
+                      <el-link
+                        icon="el-icon-info"
+                        type="primary"
+                        :underline="false"
+                        @click="handelBOMConstructDetail(row)"
+                      >
+                        项目信息
+                      </el-link>
+                    </el-dropdown-item>
+                    <el-dropdown-item
+                      divided
+                      v-if="
+                        [0, 1, 2, 3].includes(row.processStatus) &&
+                        [0, 1].includes(row.status)
+                      "
+                    >
+                      <el-link
+                        icon="el-icon-circle-plus"
+                        type="primary"
+                        :underline="false"
+                        @click="handleAddPlan(row)"
+                      >
+                        新增计划
+                      </el-link>
+                    </el-dropdown-item>
+                  </el-dropdown-menu>
+                </el-dropdown>
+              </template>
+            </ele-pro-table>
+          </el-card>
+        </template>
+        <!-- 编辑弹窗 -->
+        <add-or-edit-dialog
+          v-if="addOrEditDialogFlag"
+          @reload="reload"
+          :addOrEditDialogFlag.sync="addOrEditDialogFlag"
+          ref="addOrEditDialogRef"
+        ></add-or-edit-dialog>
+        <detail-dialog
+          v-if="detailDialogFlag"
+          :detailDialogFlag.sync="detailDialogFlag"
+          ref="detailDialogRef"
+        ></detail-dialog>
+        <!-- 新增计划 -->
+        <add-plan-dialog
+          v-if="addPlanDialogFLag"
+          @reload="reload"
+          :addOrEditDialogFlag.sync="addPlanDialogFLag"
+          ref="addPlanDialogRef"
+        ></add-plan-dialog>
+        <!-- 多选删除弹窗 -->
+        <pop-modal
+          :visible.sync="delVisible"
+          content="是否确定删除?"
+          @done="commitBtn"
+        />
+        <process-submit-dialog
+          :processSubmitDialogFlag.sync="processSubmitDialogFlag"
+          v-if="processSubmitDialogFlag"
+          ref="processSubmitDialogRef"
+          @reload="reload"
+        ></process-submit-dialog>
+        <ProjectDetailDialog
+          ref="ProjectDetailDialogFlag"
+          @reload="reload"
+        ></ProjectDetailDialog>
+      </ele-split-layout>
+    </el-card>
+  </div>
 </template>
 
 <script>
+  import ProjectDetailDialog from '@/views/BOMmanage/ProjectDetailDialog.vue';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
   import indexSearch from './components/index-search.vue';
   import addOrEditDialog from './components/addOrEditDialog.vue';
@@ -328,7 +337,8 @@
       indexSearch,
       processSubmitDialog,
       addPlanDialog,
-      AssetTree
+      AssetTree,
+      ProjectDetailDialog
     },
     computed: {
       ...mapGetters(['getDictValue']),
@@ -542,13 +552,14 @@
         });
       },
       handelBOMConstructDetail(row, type = '') {
-        this.$router.push({
-          path: '/BOMmanage/details',
-          query: {
-            id: row.id,
-            type
-          }
-        });
+        // this.$router.push({
+        //   path: '/BOMmanage/details',
+        //   query: {
+        //     id: row.id,
+        //     type
+        //   }
+        // });
+        this.$refs.ProjectDetailDialogFlag.open(row, type);
       },
       customColorMethod(percentage) {
         if (percentage < 30) {