瀏覽代碼

需求任务添加测试TAB

qinzhipeng_v@didiglobal.com 4 年之前
父節點
當前提交
1c8e2b900e

+ 6 - 1
src/views/projectManage/components/testPlan.vue

@@ -1,11 +1,16 @@
 <template>
   <div>
-    <iframe src="http://localhost:7100/#/taskTest" style="width: calc(100vw - 225px); margin: -60px 0 0 10px;" :height="iframeHeight" scrolling="yes" frameborder="0" />
+    <iframe :src="`http://localhost:7100/#/taskTest?bizId=${bizid}&keyType=${type}_${id}`" style="width: calc(100vw - 225px); margin: -60px 0 0 10px;" :height="iframeHeight" scrolling="yes" frameborder="0" />
   </div>
 </template>
 
 <script>
 export default {
+  props: {
+    bizid: { type: [Number, String], required: true },
+    id: { type: Number, required: true },
+    type: { type: String, required: true }
+  },
   data() {
     return {
       iframeHeight: '750'

+ 4 - 2
src/views/projectManage/requirement/requirementDetail.vue

@@ -247,8 +247,8 @@
       </el-container>
       <!-- 任务 -->
        <!-- 测试 -->
-      <el-container v-show="activeName === '7'">
-        <testPlan />
+      <el-container v-if="activeName === '7'">
+        <testPlan :id="form_query.id" :bizid="bizId" type="requirement" />
       </el-container>
       <!-- 测试 -->
       <!-- 缺陷 -->
@@ -392,6 +392,7 @@ export default {
       showunlock: true,
       textarea2: '',
       HoldTask: '',
+      bizId: '',
       dialogVisible: false,
       status_dialong: {}, // 切换状态
       toilp: '',
@@ -461,6 +462,7 @@ export default {
     analysisBizId_id() { // 解析路由中的bizId_id
       if (!this.$route.query.bizId_id) return
       const bizId_id = analysisBizId_id(this.$route.query.bizId_id)
+      this.bizId = bizId_id[0]
       this.requirementId = bizId_id[1]
       this.bugListQuery = { requireId: this.requirementId }
       this.getRequirementById()

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

@@ -331,8 +331,8 @@
       </el-container>
       <!-- 子任务 -->
       <!-- 测试 -->
-      <el-container v-show="activeName === '7'">
-        <testPlan />
+      <el-container v-if="activeName === '7'">
+        <testPlan :id="form_query.id" :bizid="bizId" type="task" />
       </el-container>
       <!-- 测试 -->
       <!-- 缺陷 -->
@@ -529,6 +529,7 @@ export default {
       textarea1: '',
       HoldTask: '',
       closeTask: '',
+      bizId: '',
       visible: false, // Hold任务
       taskVisible: false, // 关闭任务
       dialogVisible: false,
@@ -612,6 +613,7 @@ export default {
     analysisBizId_id() { // 解析路由中的bizId_id
       if (!this.$route.query.bizId_id) return
       const bizId_id = analysisBizId_id(this.$route.query.bizId_id)
+      this.bizId = bizId_id[0]
       this.taskId = bizId_id[1]
       this.taskGet()
       this.getTaskStatus()