Browse Source

Merge branch 'http_test' of git.xiaojukeji.com:jacklijiajia/thoth-frontend into http_test

qinzhipeng_v@didiglobal.com 4 years ago
parent
commit
e841aba2eb
1 changed files with 17 additions and 11 deletions
  1. 17 11
      src/views/projectManage/projectList/components/modifySchedule.vue

+ 17 - 11
src/views/projectManage/projectList/components/modifySchedule.vue

@@ -20,7 +20,7 @@
         <el-form-item label="参与人员" prop="peopleList">
           <search-people :value.sync="form.peopleList" :multiple="true" style="width: 100%" :size="'medium'" :disabled="disabled" />
         </el-form-item>
-        <el-form-item label="排期" prop="dayList">
+        <el-form-item label="排期" prop="dayList" class="">
           <div v-show="form.dayList.length > 0 ">{{ schedule }}(用时<span class="blue">{{ detailDayList.length }}</span>天)</div>
           <div v-show="form.dayList.length <= 0 " class="empty-schedule">添加排期</div>
           <div v-if="!disabled" class="picker-hidden">
@@ -35,7 +35,7 @@
           {{ form.bizName }}
         </el-form-item>
         <el-form-item label="关联任务" prop="taskList">
-          <el-select v-model="selectBy" placeholder="请选择" style="width: 22%" class="select-by" size="medium">
+          <el-select v-model="selectBy" placeholder="请选择" style="width: 105px" class="select-by" size="medium">
             <el-option label="任务名称" value="task" />
             <el-option label="需求名称" value="requirement" />
           </el-select>
@@ -49,7 +49,7 @@
             reserve-keyword
             :placeholder="selectBy==='requirement'?'按需求名称或ID搜索':'按任务名称或ID搜索'"
             :remote-method="debounceQuery"
-            style="width: 78%"
+            style="width: calc(100% - 105px)"
             :disabled="disabled"
             @change="tasksChange"
           >
@@ -66,7 +66,7 @@
                   <div class="belong-task">
                     <div class="task-id">{{ item.taskIdSting }}</div>
                     <div class="modules-name">
-                      <span class="name" :class="{'blue': innerList(item,tasksDetailList)}">{{ item.name }}</span>
+                      <span class="name" :class="{'blue': innerList(item,tasksDetailList),'modules':item.isScheduleLocked === 1}">{{ item.name }}</span>
                       <span v-if="item.moduleInfoName" class="modules" :class="{'blue': innerList(item,tasksDetailList)}">{{ item.moduleInfoName }}</span>
                       <i v-show="innerList(item,tasksDetailList)" class="el-icon-check blue" />
                     </div>
@@ -99,7 +99,7 @@
                     <div class="belong-task">
                       <div class="task-id">{{ item.taskId }}</div>
                       <div class="modules-name">
-                        <span class="name" :class="{'blue': innerList(item,tasksDetailList)}">{{ item.name }}</span>
+                        <span class="name" :class="{'blue': innerList(item,tasksDetailList),'modules':item.isScheduleLocked === 1}">{{ item.name }}</span>
                         <span v-if="item.moduleInfoName" class="modules" :class="{'blue': innerList(item,tasksDetailList)}">{{ item.moduleInfoName }}</span>
                         <i v-show="innerList(item,tasksDetailList)" class="el-icon-check blue" />
                       </div>
@@ -118,7 +118,7 @@
         </el-form-item>
       </el-form>
       <div class="task-list-show">
-        <div v-for="item in tasksDetailList" :key="'task'+item.id" class="task-list-item">
+        <div v-for="item in tasksDetailList" :id="'task'+item.id" :key="'task'+item.id" class="task-list-item">
           <div v-if="item.taskIdSting" class="item-id">{{ item.taskIdSting }}</div>
           <div v-if="item.taskId" class="item-id">{{ item.taskId }}</div>
           <div class="item-name"><span>{{ item.name }}</span></div>
@@ -450,6 +450,9 @@ export default {
       this.tasksDetailList.push(res)
       this.form.taskList.push(res.id)
       this.selectTask = null
+      this.$nextTick(() => {
+        document.getElementById(`task${res.id}`).scrollIntoView({ block: 'start', behavior: 'smooth' })
+      })
     },
     cancelTask(id) { // 删除单个关联任务
       if (this.disabled) return false
@@ -512,7 +515,7 @@ export default {
 </script>
 <style scoped lang="scss">
 article {
-  max-height: 60vh;
+  max-height: 450px;
   overflow: scroll;
   .blue {
     color: #409EFF;
@@ -524,6 +527,9 @@ article {
     margin-bottom: 20px;
     padding-left: 10px;
   }
+  .el-form-item  {
+    margin-bottom: 18px;
+  }
 }
 >>>.el-form {
   padding: 0 156px 0 60px;
@@ -564,19 +570,16 @@ article {
 .belong-task {
   max-width: 500px;
   display: flex;
+  font-size: 12px;
   .modules-name {
     width: calc(100% - 100px);
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
   }
-  .modules {
-    color: #999999;
-  }
   .task-id {
     color: #999999;
     width: 80px;
-    margin-right: 20px;
   }
   .name {
     color: #333333;
@@ -585,6 +588,9 @@ article {
   .blue {
     color: #409EFF;
   }
+  .modules {
+    color: #999999;
+  }
 }
 .picker-hidden {
   opacity: 0;