qinzhipeng_v@didiglobal.com 4 vuotta sitten
vanhempi
sitoutus
d56ecb3be5

+ 10 - 2
src/api/requirement.js

@@ -307,7 +307,7 @@ export function taskDeleteRelationship(id) {
   })
 }
 
-// 同步排期到望
+// 同步排期到望
 export function taskShowRelatedDpmTask(id) {
   return request({
     url: requestIp + `/task/showRelatedDpmTask?id=${id}`,
@@ -315,10 +315,18 @@ export function taskShowRelatedDpmTask(id) {
   })
 }
 
-// 同步排期到望(确认)
+// 同步排期到望(确认)
 export function taskSyncScheduleToDpm(id) {
   return request({
     url: requestIp + `/task/syncScheduleToDpm?id=${id}`,
     method: 'get'
   })
 }
+
+// 同步望岳排期到质惠
+export function requirementSyncDpmWorkflow(id) {
+  return request({
+    url: requestIp + `/requirement/syncDpmWorkflow?id=${id}`,
+    method: 'get'
+  })
+}

+ 9 - 1
src/views/projectManage/components/workflowAndStatus.vue

@@ -15,13 +15,14 @@
     </div>
     <span slot="footer" class="dialog-footer">
       <el-button @click="close">取 消</el-button>
-      <el-button type="danger" @click="dialogVisible = false">确 定</el-button>
+      <el-button type="danger" @click="requirementSyncDpmWorkflow">确 定</el-button>
     </span>
   </el-dialog>
 </template>
 
 <script>
 import '@/styles/PublicStyle/index.scss'
+import { requirementSyncDpmWorkflow } from '@/api/requirement.js'
 export default {
   props: {
     visible: { type: Boolean, default: false },
@@ -32,6 +33,7 @@ export default {
     return {
       dia_content: this.name,
       dialogVisible: false,
+      requirementId: Number(this.$route.query.id), // 需求id
       titName: ''
     }
   },
@@ -53,6 +55,12 @@ export default {
 
   },
   methods: {
+    async requirementSyncDpmWorkflow() {
+      const res = await requirementSyncDpmWorkflow(this.requirementId)
+      if (res.code === 200) {
+        this.$emit('update')
+      }
+    },
     close() {
       this.dialogVisible = false
       this.$emit('update')

+ 1 - 0
src/views/projectManage/requirement/requirementDetail.vue

@@ -772,6 +772,7 @@ export default {
           }
         }
       })
+      this.$refs.timeLine1.taskGetWorkFlow()
     },
     async getCommentList() { // 获取需求评论
       const res = await getCommentList({ type: 4, joinId: this.$route.query.id })