Quellcode durchsuchen

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

reedliuqing_i vor 5 Jahren
Ursprung
Commit
d541c1fbd6

+ 1 - 1
src/apiConfig/virtualDevices.js

@@ -1,3 +1,3 @@
 /*eslint-disable*/ //规避eslint的检查,如没有eslint可不写
 export const mockUrl = 'http:// 10.179.181.103:9999/virtual-devices' // 线上
-// export const mockUrl = 'http://10.96.113.197:9999/virtual-devices' // 线下
+// export const mockUrl = 'http://10.96.113.197:9999/virtual-devices' // 线下

+ 4 - 1
src/views/Platform/presentation/PresentReport.vue

@@ -231,6 +231,9 @@ export default {
         }
       })
     },
+    parentHandleclick() {
+      this.getCreateData(this.dataChange)
+    },
     getCreateData(ele) {
       this.$refs['dataChange'].validate((valid) => {
         if (valid) {
@@ -248,7 +251,7 @@ export default {
           launchTestCreate(this.objData).then(res => {
             if (res.code === 200) {
               this.$message.success(res.msg)
-              this.$router.go(-1)
+              this.$emit('keHu', this.dataChange)
             } else {
               this.$message.error(res.msg)
             }

+ 12 - 14
src/views/Platform/presentation/Templates/TestReport.vue

@@ -26,7 +26,7 @@
         <el-button size="small" type="primary" @click="NextStep()">下一步</el-button>
       </div>
     </div>
-    <el-dialog :visible.sync="showClient" width="80%" top="4vh" :close-on-click-modal="false" append-to-body :before-close="handleClose1()">
+    <el-dialog :visible.sync="showClient" width="80%" top="4vh" :close-on-click-modal="false" append-to-body :before-close="handleClose1">
       <div class="flex_start titFont">
         <div class="titIcon" />
         <span style="margin-left: 1%; width: 100px;">提测报告</span>
@@ -39,7 +39,7 @@
         </el-steps>
       </div>
       <div class="descr" style=" margin-bottom: 2%; height: 440px; overflow:scroll; overflow-x: hidden">
-        <Present v-if="Present1" ref="Present" />
+        <Present v-if="Present1" ref="Present" :ke-hu="getKeHu" />
         <presentation v-if="presentation1" ref="presentationRef" />
       </div>
       <div align="center">
@@ -109,7 +109,7 @@ export default {
     }
   },
   methods: {
-    init(e, id) {
+    init() {
       this.dialogVisible1 = true
     },
     handleClose1(e) {
@@ -129,12 +129,16 @@ export default {
       this.showClientYL = false
     },
     created_out() {
-      this.$refs.presentationRef.parentHandleclick()
+      if (this.radio === '2') {
+        this.$refs.presentationRef.parentHandleclick()
+      }
+      if (this.radio === '1') {
+        this.$refs.Present.parentHandleclick()
+      }
+    },
+    getKeHu(data) {
       this.showClientYL = true
-      // this.$nextTick(() => {
-      //   this.$refs.acceptthe.int()
-      // })
-      console.log(this.$refs)
+      console.log(data)
     },
     NextStep() {
       switch (Number(this.radio)) {
@@ -142,17 +146,11 @@ export default {
           this.showClient = true
           this.Present1 = true
           this.presentation1 = false
-          // this.$nextTick(() => {
-          //   this.$refs.Present.init()
-          // })
           break
         case 2:
           this.showClient = true
           this.Present1 = false
           this.presentation1 = true
-          // this.$nextTick(() => {
-          //   this.$refs.Present.init()
-          // })
           break
         case 3:
           this.$message({ message: '请选择要创建的‘模版’', type: 'error', duration: 1000, offset: 150 })

+ 102 - 3
src/views/projectManage/projectList/projectViewDetails.vue

@@ -258,14 +258,29 @@
               <div class="titIcon" />
               <div class="titSonName">任务列表</div>
             </div>
+            <el-row v-if="!showHeader" class="select-main" type="flex" align="center">
+              <el-col :span="2">
+                <el-checkbox v-model="planChecked" class="plan-checked" @change="changeCheck" />
+              </el-col>
+              <el-col :span="2" class="item-checked">已选择<span style="color: #409EFF">{{ curcentChecked }}</span>个</el-col>
+              <el-col :span="1" class="item-click">|</el-col>
+              <el-col :span="2" class="item-click" @click.native="handlePlan('test')">提测</el-col>
+              <el-col :span="2" class="item-click" @click.native="handlePlan('allow')">准出</el-col>
+              <el-col :span="4" class="item-click">建立测试日报</el-col>
+              <el-col :span="4" class="item-click" @click.native="handlePlan('cancel')">取消选择</el-col>
+            </el-row>
             <el-table
+              ref="planTable"
               :data="all_task"
               style="width: 100%;"
               size="mini"
               :header-cell-style="{ color: '#4A4A4A', fontSize: '14px', fontWeight: '550', textAlign: 'center' }"
               show-overflow-tooltip="true"
+              :show-header="showHeader"
+              @selection-change="handleSelectionChange"
             >
-              <el-table-column label="任务名称" min-width="100" align="center" show-overflow-tooltip>
+              <el-table-column type="selection" width="55" align="center" />
+              <el-table-column label="任务名称" min-width="90" align="center" show-overflow-tooltip>
                 <template slot-scope="scope"><div style="cursor: pointer;" @click="link_task(scope.row.id)">{{ scope.row.name }}</div></template>
               </el-table-column>
               <el-table-column label="所属需求" min-width="100" align="center" show-overflow-tooltip>
@@ -274,7 +289,7 @@
               <el-table-column label="状态" min-width="100" align="center">
                 <template slot-scope="scope">{{ scope.row.statusString }}</template>
               </el-table-column>
-              <el-table-column label="任务健康状态" min-width="100" align="center">
+              <el-table-column label="任务健康状态" min-width="120" align="center">
                 <template slot-scope="scope">{{ scope.row.stageString }}</template>
               </el-table-column>
               <el-table-column label="开发负责人" min-width="100" align="center" show-overflow-tooltip>
@@ -716,7 +731,12 @@ export default {
       condition: '',
       noRequire: '',
       formBackgroungInfo: [],
-      requirement: null
+      requirement: null,
+      showHeader: true, // 任务列表的表头是否显示
+      curcentList: [], // 当前已选择的列表
+      curcentChecked: 0, // 当前已选择的数量
+      planChecked: false,
+      planHandleType: '' // 任务列表操作类型
     }
   },
   created() {
@@ -1126,7 +1146,86 @@ export default {
     handleCurrentChange(curIndex) { //  分页
       this.curIndex = curIndex
       this.click_name1(this.condition)
+    },
+    handleSelectionChange(val) { // 任务列表删选操作
+      val.length > 0 ? this.showHeader = false : this.showHeader = true
+      this.curcentChecked = val.length
+      this.curcentList = val
+    },
+    changeCheck(val) {
+      if (val) {
+        this.all_task.forEach(row => {
+          this.$refs.planTable.toggleRowSelection(row, true)
+        })
+      } else {
+        this.$refs.planTable.clearSelection()
+      }
+    },
+    handlePlan(type) { // 任务列表操作
+      this.planHandleType = type
+      switch (type) {
+        case 'test':
+          this.filtrateTest()
+          break
+        case 'allow':
+          this.filtrateAllow()
+          break
+        case 'cancel':
+          this.$refs.planTable.clearSelection()
+          break
+      }
+    },
+    filtrateTest() { // 提测筛选
+      const isDevelop = this.curcentList.every(item => {
+        return item.statusString === '开发中'
+      })
+      if (!isDevelop) {
+        this.$message({
+          message: '存在状态不是【开发中】的任务,请将任务状态为【开发中】才可提测,请检查!',
+          type: 'error',
+          duration: 3000,
+          offset: 150
+        })
+      }
+    },
+    filtrateAllow() { // 准出筛选
+      const isDevelop = this.curcentList.every(item => {
+        return item.statusString === '测试中'
+      })
+      if (!isDevelop) {
+        this.$message({
+          message: '存在状态不是【测试中】的任务,请将任务状态为【测试中】才可提测,请检查!',
+          type: 'error',
+          duration: 3000,
+          offset: 150
+        })
+      }
     }
   }
 }
 </script>
+<style scoped lang="scss">
+.plan-checked {
+  padding-left: 21px;
+}
+.select-main {
+  border-bottom: 1px solid #DCDFE6;
+  .item-checked {
+    color: #606266;
+    font-size: 14px;
+    display: flex;
+    align-items: center;
+    justify-content: left;
+    cursor: pointer;
+  }
+  .item-click{
+    color: #606266;
+    font-size: 14px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    cursor: pointer;
+  }
+}
+
+</style>

+ 21 - 17
src/views/projectManage/taskList/taskViewDetails.vue

@@ -1263,7 +1263,7 @@ export default {
           case 1:
             this.dialogVisible1 = true
             this.$nextTick(() => {
-              this.$refs.TestReport.init(1)
+              this.$refs.TestReport.init()
             })
             // if (this.task_form.statusString === '开发中') {
             //   this.$router.push({
@@ -1280,9 +1280,9 @@ export default {
             // }
             break
           case 2:
-            this.dialogDaily = true
+            // this.dialogDaily = true
             this.$nextTick(() => {
-              this.$refs.DailyReport.init(1)
+              this.$refs.DailyReport.init()
             })
             // this.$router.push({
             //   path: '/Platform/presentation/DailyNewsAdded',
@@ -1292,7 +1292,7 @@ export default {
           case 3:
             this.dialogClient = true
             this.$nextTick(() => {
-              this.$refs.ClientReport.init(1)
+              this.$refs.ClientReport.init()
             })
             // if (this.task_form.statusString === '测试中') {
             //   this.$router.push({
@@ -1318,19 +1318,23 @@ export default {
       } else {
         switch (e) {
           case 1:
-            if (this.task_form.statusString === '开发中') {
-              this.$router.push({
-                path: '/Platform/presentation/presentationReport',
-                query: { task: ele }
-              }) // 服务端提测
-            } else {
-              this.$message({
-                message: '该状态下不支持提测,请先将状态更改为【开发中】',
-                type: 'success',
-                duration: 1000,
-                offset: 150
-              })
-            }
+            this.dialogVisible1 = true
+            this.$nextTick(() => {
+              this.$refs.TestReport.init()
+            })
+            // if (this.task_form.statusString === '开发中') {
+            //   this.$router.push({
+            //     path: '/Platform/presentation/presentationReport',
+            //     query: { task: ele }
+            //   }) // 服务端提测
+            // } else {
+            //   this.$message({
+            //     message: '该状态下不支持提测,请先将状态更改为【开发中】',
+            //     type: 'success',
+            //     duration: 1000,
+            //     offset: 150
+            //   })
+            // }
             break
           case 2:
             this.$router.push({