Bläddra i källkod

子任务层级设置

wangziqian 5 år sedan
förälder
incheckning
29b6981b83

+ 2 - 2
src/views/projectManage/projectList/components/taskList.vue

@@ -43,7 +43,7 @@
           </span>
         </template>
       </el-table-column>
-      <el-table-column label="任务名称" width="200" align="left" show-overflow-tooltip>
+      <el-table-column label="任务名称" min-width="200" align="left" show-overflow-tooltip>
         <template slot-scope="scope">
           <div class="task-main">
             <span class="task-id">TASK-{{ scope.row.id }}
@@ -89,7 +89,7 @@
       <el-table-column label="测试负责人" width="100" align="center" show-overflow-tooltip>
         <template slot-scope="scope">{{ scope.row.qaObject ? scope.row.qaObject.name : '' }}</template>
       </el-table-column>
-      <el-table-column label="任务进度" min-width="150" align="center">
+      <el-table-column label="任务进度" width="200" align="center">
         <template slot-scope="scope">
           <el-progress :percentage="Number(scope.row.rate && scope.row.rate.substring(0,4))" color="#409eff" />
         </template>

+ 2 - 2
src/views/projectManage/requirement/components/taskList.vue

@@ -43,7 +43,7 @@
           </span>
         </template>
       </el-table-column>
-      <el-table-column label="任务名称" width="200" align="left" show-overflow-tooltip>
+      <el-table-column label="任务名称" min-width="200" align="left" show-overflow-tooltip>
         <template slot-scope="scope">
           <div class="task-main">
             <span class="task-id">
@@ -87,7 +87,7 @@
       <el-table-column label="测试负责人" width="100" align="center" show-overflow-tooltip>
         <template slot-scope="scope">{{ scope.row.qaObject ? scope.row.qaObject.name : '' }}</template>
       </el-table-column>
-      <el-table-column label="任务进度" min-width="150" align="center">
+      <el-table-column label="任务进度" width="200" align="center">
         <template slot-scope="scope">
           <el-progress :percentage="Number(scope.row.rate && scope.row.rate.substring(0,4))" color="#409eff" />
         </template>

+ 8 - 2
src/views/projectManage/taskList/childrenTask/addChildrenList.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="children-task">
-    <label v-if="isTitle">子任务<i class="el-icon-circle-plus child-add" @click="addChild()" /></label>
+    <label v-if="isTitle">子任务<i v-if="formData.level <= 2" class="el-icon-circle-plus child-add" @click="addChild()" /></label>
     <div class="children-list">
       <div v-for="(item,index) in childrenList" :id="'child' + id + index" :key="'child' + index" class="children-item">
         <el-select
@@ -38,7 +38,7 @@
           />
         </div>
         <div class="select-people">
-          <select-people :value.sync="item.owner" :init="!item.edit" @change="update()" />
+          <select-people :value.sync="item.owner" :init="!item.edit" @change="updateOwner(item)" />
         </div>
         <div class="child-control">
           <el-popover
@@ -194,6 +194,12 @@ export default {
       this.nowSubTask = e
       this.changeArea('endTime')
     },
+    updateOwner(e) { // 变更负责人
+      if (this.add) return
+      if (e.newNode) return
+      this.nowSubTask = e
+      this.changeArea('owner')
+    },
     updateStatus(e) { // 变更状态
       if (this.add) return // 如果是新建状态,返回
       if (e.newNode) return// 如果是新加节点,返回

+ 1 - 1
src/views/projectManage/taskList/childrenTask/childDrawer.vue

@@ -28,7 +28,7 @@
             </el-dropdown-menu>
           </el-dropdown>
           <div class="control">
-            <span @click="createChildren = true"><i class="el-icon-s-operation" />添加子任务</span>
+            <span v-if="formData.level <= 2" @click="createChildren = true"><i class="el-icon-s-operation" />添加子任务</span>
             <span @click="toDetail()"><i class="el-icon-tickets" />查看详情</span>
             <span @click="deleteDialog = true"><i class="el-icon-delete" />删除</span>
           </div>

+ 4 - 1
src/views/projectManage/taskList/childrenTask/createChildren.vue

@@ -67,6 +67,7 @@
         </div>
       </el-form>
       <add-children-list
+        v-if="formData.level <= 2"
         id="create"
         :list.sync="childrenList"
         :data="formData"
@@ -130,7 +131,8 @@ export default {
         status: 0,
         process: 0,
         remark: null,
-        childSubTaskInfos: []
+        childSubTaskInfos: [],
+        level: 0 // 子任务层级
       },
       parentList: [], // 父任务列表
       bizList: [], // 业务线列表
@@ -198,6 +200,7 @@ export default {
         this.formData.taskId = data.taskId || data.id
         this.formData.parentId = data.id
         this.formData.bizId = data.bizId
+        this.formData.level = data.level
       })
     },
     async getTaskStatus() { // 获取任务状态列表,跟版客户端列表