wangziqian 4 лет назад
Родитель
Сommit
213283ea57

+ 8 - 0
src/api/taskIndex.js

@@ -267,3 +267,11 @@ export function configShowTaskStatusEnum(id) {
     method: 'get'
   })
 }
+
+// 获取与望岳关联的任务
+export function showRelatedDpmTask(id) {
+  return request({
+    url: TeamManagement + `/task/showRelatedDpmTask?id=${id}`,
+    method: 'get'
+  })
+}

+ 0 - 1
src/views/projectManage/taskList/components/scheduleList.vue

@@ -169,7 +169,6 @@ export default {
   watch: {
     id: {
       handler(newV, oldV) {
-        console.log(newV)
         this.$nextTick(() => {
           this.listByTask(newV)
         })

+ 127 - 0
src/views/projectManage/taskList/dialog/synchronizeDialog.vue

@@ -0,0 +1,127 @@
+<template>
+  <normal-dialog
+    :show-dialog.sync="show"
+    title="同步排期至望月"
+    width="40%"
+    @confirm="confirmForm()"
+    @cancel="cancel()"
+  >
+    <div class="task-object-list">
+      <div class="synchronize-task">
+        是否需要同步当前任务的排期到望岳
+        <span>【{{ data.taskId }}】</span>
+        <span v-if="data.moduleInfoName">【{{ data.moduleInfoName }}】</span>
+        <span>【{{ data.name }}】</span>
+      </div>
+      <div class="title">以下任务与该望岳任务也关联,排期将一并同步,请知悉!</div>
+      <div v-for="(item,index) in taskObjectList" :key="'task-object'+index" class="task-item">
+        <span class="item-id">{{ item.taskId }}</span>
+        <span class="item-name">{{ item.name }}</span>
+        <span>{{ item.moduleInfoName }}</span>
+      </div>
+    </div>
+  </normal-dialog>
+</template>
+<script>
+import normalDialog from '@/components/dialog/normalDialog'
+import { showRelatedDpmTask } from '@/api/taskIndex'
+export default {
+  components: {
+    normalDialog
+  },
+  props: {
+    id: {
+      type: Number,
+      default: NaN,
+      required: true
+    },
+    visible: {
+      type: Boolean,
+      default: false,
+      required: true
+    },
+    data: {
+      type: Object,
+      default: () => null,
+      required: true
+    }
+  },
+  data() {
+    return {
+      show: this.visible,
+      taskObjectList: []
+    }
+  },
+  watch: {
+    visible: {
+      handler(newV) {
+        this.show = this.visible
+      },
+      immediate: true
+    },
+    id: {
+      handler(newV, oldV) {
+        this.$nextTick(() => {
+          this.listByTask(newV)
+        })
+      },
+      immediate: true
+    },
+    data: {
+      handler(newV, oldV) {
+        this.data = newV
+      }
+    }
+  },
+  methods: {
+    async listByTask(id) { // 获取排期列表
+      const res = await showRelatedDpmTask(id)
+      if (res.code === 200) {
+        this.taskObjectList = res.data
+      }
+    },
+    confirmForm() {
+
+    },
+    cancel() {
+      this.show = false
+      this.$emit('update:visible', this.show)
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.task-object-list {
+  width: 100%;
+  overflow: scroll;
+  font-size: 14px;
+  .synchronize-task {
+    color: #333333;
+    margin-bottom: 12px;
+    span {
+      color:#D98A38;
+    }
+  }
+  .title {
+    color: #333333;
+    margin-bottom: 12px;
+  }
+  .task-item {
+    width: 100%;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    overflow: hidden;
+    color: #999999;
+    .item-id {
+      padding-right: 20px;
+    }
+    .item-name {
+      color: #333333;
+      padding-right: 20px;
+    }
+  }
+}
+.task-object-list::-webkit-scrollbar {
+  display: none;
+}
+</style>

+ 20 - 4
src/views/projectManage/taskList/taskViewDetail.vue

@@ -189,12 +189,13 @@
                 <i v-if="tips" class="el-icon-warning-outline" style="color:#e88792;" />
                 <span v-if="tips" style="color:#e88792;">当前任务归属的需求计划排期呈锁定状态,当前任务的排期无法同步到需求计划中去,请将归属需求的排期解锁!</span>
               </div>
-              <div class="Layout_space_between">
+              <div class="schedule-control">
                 <div v-show="BackToTheLatest === false" class="Scheduling" style="margin-right: 20px;" @click="clickBackToTheLatest"><i class="el-icon-refresh" /> 回到最新</div>
                 <div v-show="isScheduleLocked === 0">
                   <div v-show="BackToTheLatest === true" class="Scheduling" style="margin-right: 20px;" @click="clickAddScheduling()"><i class="el-icon-circle-plus-outline" /> 添加排期</div>
                 </div>
-                <div v-show="BackToTheLatest === true" align="left" class="Scheduling" @click="scheduleHiHide"><div class="el-icon-document" /> 排期变更记录</div>
+                <div v-show="form_query.relatedDpmTaskInfo" class="Scheduling" @click="synchronizeDialog = true"><i class="el-icon-s-fold" /> 同步排期至望岳</div>
+                <div v-show="BackToTheLatest === true" align="left" class="Scheduling" @click="scheduleHiHide"><i class="el-icon-document" /> 排期变更记录</div>
                 <download :id="taskId" :name="'任务'" />
               </div>
             </div>
@@ -317,6 +318,14 @@
       <!-- 排期锁定 -->
       <schedule ref="ScheduleEvent" :visible.sync="scheduleVisble" :name="'任务'" :is-schedule-locked="isScheduleLocked" :require-id="taskId" @updataData="getScheduleGetTaskScheduleHistory" />
       <!-- 排期锁定 -->
+      <!-- 同步望月 -->
+      <synchronize-dialog
+        v-if="synchronizeDialog"
+        :id="taskId"
+        :data="form_query.relatedDpmTaskInfo"
+        :visible.sync="synchronizeDialog"
+      />
+      <!-- 同步望月 -->
       <drawer
         ref="drawer"
         title="任务成员"
@@ -376,6 +385,7 @@ import download from '@/views/projectManage/components/export.vue'
 import record from '@/views/projectManage/components/record.vue'
 import timeLine from '@/views/projectManage/components/timeLine.vue'
 import { dailyReportCheckStatus, reportreleaseCheckStatus, reportdelivertestCheckStatus } from '@/api/reportTemplate'
+import synchronizeDialog from './dialog/synchronizeDialog' // 同步弹框
 import '@/styles/PublicStyle/index.scss'
 export default {
   components: {
@@ -397,7 +407,8 @@ export default {
     schedule,
     download,
     record,
-    timeLine
+    timeLine,
+    synchronizeDialog
   },
   filters: {
     ellipsis(value, num) {
@@ -453,7 +464,8 @@ export default {
       iterationList: [], // 所属迭代列表
       commentContent: null, // 评论内容
       comments: [], // 评论列表
-      taskIds: '' // 将要修改状态的任务id
+      taskIds: '', // 将要修改状态的任务id
+      synchronizeDialog: false // 同步任务至望月弹框
     }
   },
   computed: {
@@ -814,6 +826,10 @@ export default {
       color: #444444;
     }
   }
+  .schedule-control {
+    display: flex;
+    justify-content: flex-end;
+  }
   .detail-info {
     padding: 0 34px 20px 34px;
     /deep/.el-input__inner{