Pārlūkot izejas kodu

添加自动化测试入口,优化任务详情页header

qinzhipeng_v@didiglobal.com 4 gadi atpakaļ
vecāks
revīzija
a86db84e7d

+ 3 - 0
src/apiConfig/requestIP.js

@@ -7,6 +7,7 @@ export let envTag = 'test'
 export let envUrl = 'http://zhihui-test.intra.xiaojukeji.com/zhihui_env/'
 export let toolsUrl = 'http://zhihui-test.intra.xiaojukeji.com/tools/'
 export let playBackUrl = 'http://zhihui-test.intra.xiaojukeji.com/playback/'
+export let automation = 'http://zhihui-test.intra.xiaojukeji.com/automation/'
 if (location.host.indexOf('localhost') < 0) {
   host = 'http://' + location.host
   requestIp = host + '/zuul'
@@ -17,11 +18,13 @@ if (location.host.indexOf('localhost') < 0) {
     envUrl = 'http://zhihui-pre.intra.xiaojukeji.com/zhihui_env/'
     toolsUrl = 'http://zhihui-pre.intra.xiaojukeji.com/tools/'
     playBackUrl = 'http://zhihui-pre.intra.xiaojukeji.com/playback/'
+    automation = 'http://zhihui-pre.intra.xiaojukeji.com/automation/'
   } else if (host.indexOf('zhihui.xiaojukeji.com') >= 0) {
     envTag = 'online'
     envUrl = 'http://zhihui.xiaojukeji.com/zhihui_env/'
     toolsUrl = 'http://zhihui.xiaojukeji.com/tools/'
     playBackUrl = 'http://zhihui.xiaojukeji.com/playback/'
+    automation = 'http://zhihui.xiaojukeji.com/automation/'
   }
 }
 

+ 20 - 1
src/styles/detail-pages.less

@@ -67,7 +67,7 @@
     display: flex;
     flex-direction: column;
     max-width: 250px;
-    margin-right: 20px;
+    // margin-right: 20px;
     .title-id{
       color:rgba(51,59,74,0.5);
       font-size: 12px;
@@ -103,6 +103,25 @@
       color: #409EFF;
     }
   }
+  .top-tabs-public {
+    height: 100%;
+    position: absolute;
+    left: 60%;
+    top: 0;
+    transform: translate(-50%,0);
+    /deep/.el-tabs__header {
+      margin: 0;
+    }
+    /deep/.el-tabs__item {
+      height: 60px;
+      line-height: 60px;
+      font-size: 16px;
+      color: #666666;
+    }
+    /deep/.el-tabs__item.is-active {
+      color: #409EFF;
+    }
+  }
   .top-control {
     // width: 235px;
     display: flex;

+ 7 - 1
src/views/home/index.vue

@@ -42,6 +42,8 @@
           <el-button plain class="enter-button" @click.native="handleSelect('1')"><svg-icon icon-class="env-enter" />环境管理</el-button>
           <el-button plain class="enter-button" @click.native="handleSelect('playback')"><svg-icon icon-class="playback-enter" />流量回放</el-button>
           <el-button plain class="enter-button" @click.native="handleSelect('9')"><svg-icon icon-class="tool-enter" />工具集合</el-button>
+          <el-button v-if="false" plain class="enter-button" @click.native="handleSelect('auto')">
+            <svg-icon icon-class="tool-enter" />自动化测试</el-button>
         </div>
         <div class="home-carousel">
           <el-carousel :height="imgHeight + 'px'" indicator-position="outside">
@@ -192,6 +194,7 @@ img.img-arrow {
   left: 48.95%;
 }
 .enter-button {
+  width: 120px;
   margin-top: 6vh;
   margin-right: 30px;
   margin-left: 0px;
@@ -299,7 +302,7 @@ img.img-arrow {
 <script>
 import { mapGetters } from 'vuex'
 import FloatMenu from './floatMenu'
-import { logoutUrl, envUrl, toolsUrl, playBackUrl } from '@/apiConfig/requestIP.js'
+import { logoutUrl, envUrl, toolsUrl, playBackUrl, automation } from '@/apiConfig/requestIP.js'
 import { settingUserGetBiz } from '@/api/projectIndex'
 import { materialGetMaterialList } from '@/api/monthly/index.js'
 
@@ -400,6 +403,9 @@ export default {
         case '10':
           this.$router.push({ name: '测试用例' })
           break
+        case 'auto':
+          window.open(automation, '_block')
+          break
         case 'playback':
           window.open(playBackUrl, '_self')
           break

+ 1 - 1
src/views/projectManage/taskList/taskViewDetail.vue

@@ -61,7 +61,7 @@
             </el-dropdown-menu>
           </el-dropdown>
         </div>
-        <div class="top-tabs">
+        <div class="top-tabs-public">
           <el-tabs v-model="activeName">
             <el-tab-pane label="概览" name="1" />
             <el-tab-pane label="子任务" name="2" />