Răsfoiți Sursa

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

qinzhipeng_v@didiglobal.com 4 ani în urmă
părinte
comite
25ff4042d6

+ 12 - 2
src/components/newLayout/Head.vue

@@ -13,10 +13,10 @@
     <div @mouseleave="target = true">
       <div :class="[target ? 'nav-div1' : 'nav-div2']">
         <el-tooltip v-if="!target" class="item" effect="dark" content="工具集合" placement="right">
-          <div class="div-child" @click="$router.push({ name: 'Interface' })"><svg-icon icon-class="b_工具集合" /></div>
+          <div class="div-child" @click="goto('Interface')"><svg-icon icon-class="b_工具集合" /></div>
         </el-tooltip>
         <el-tooltip v-if="!target" class="item" effect="dark" content="环境平台" placement="right">
-          <div class="div-child" @click="$router.push({ name: 'env' })"><svg-icon icon-class="b_环境平台" /></div>
+          <div class="div-child" @click="goto('env')"><svg-icon icon-class="b_环境平台" /></div>
         </el-tooltip>
       </div>
       <div class="nav-div3 nav-circular" />
@@ -60,6 +60,7 @@ import routes from '@/router/newRouter'
 import websocket from '@/views/workbench/mixins/websocket'
 import { memberGetLoginInMemberInfoByLdap } from '@/api/projectIndex'
 import { logoutUrl } from '@/apiConfig/requestIP.js'
+import { log } from '@/utils/global'
 export default {
   mixins: [websocket],
   data() {
@@ -84,6 +85,10 @@ export default {
     this.getLoginUser()
   },
   methods: {
+    goto(name) {
+      log({ c: 'project', d: `goto_${name}` })
+      this.$router.push({ name })
+    },
     getTarget() {
       this.target = !this.target
     },
@@ -105,6 +110,11 @@ export default {
     },
     // 设置二级导航类型
     setNavTagType(type) {
+      if (type === 2) {
+        log({ c: 'sys_setting', d: 'change_nav_bar_top' })
+      } else {
+        log({ c: 'sys_setting', d: 'change_nav_bar_side' })
+      }
       this.$store.dispatch('global/setNavTagType', type)
       localStorage.setItem('navTagType', type)
     },

+ 1 - 1
src/utils/global.js

@@ -61,5 +61,5 @@ export function log({ c: master_func, d: detail_func }) {
     'user': userName,
     master_func,
     detail_func
-  }).then((res) => console.log(res))
+  })
 }

+ 5 - 0
src/views/projectManage/projectList/projectIndex.vue

@@ -7,6 +7,7 @@
           <el-switch
             v-model="newTabOpen"
             active-text="新标签页跳转"
+            @change="logHandle('switchJumpOpen')"
           />
         </div>
         <div>
@@ -328,6 +329,7 @@
 <script>
 import { EncryptId } from '@/utils/crypto-js.js'
 import { mapGetters } from 'vuex'
+import { log } from '@/utils/global'
 import {
   projectList,
   memberQueryMemberInfoByIDAPorName,
@@ -404,6 +406,9 @@ export default {
     this.$store.state.data.status = false
   },
   methods: {
+    logHandle(d) {
+      log({ c: 'project', d })
+    },
     test2(item, e) {
       // 获取团队人员信息
       if (typeof this.test[item.idap] === 'undefined') {

+ 5 - 0
src/views/projectManage/requirement/list/index.vue

@@ -7,6 +7,7 @@
           <el-switch
             v-model="newTabOpen"
             active-text="新标签页跳转"
+            @change="logHandle('switchJumpOpen')"
           />
         </div>
         <el-button type="primary" size="mini" @click="createDialogVisible = true">新建需求</el-button>
@@ -225,6 +226,7 @@
 <script>
 import { EncryptId } from '@/utils/crypto-js.js'
 import { mapGetters } from 'vuex'
+import { log } from '@/utils/global'
 import {
   getRequirement,
   showRequirementEnum,
@@ -349,6 +351,9 @@ export default {
     this.$store.state.data.status = false
   },
   methods: {
+    logHandle(d) {
+      log({ c: 'requirement', d })
+    },
     getTableData() { // 查询
       if (this.bizId === -1) return
       for (const key in this.searchForm) { // 接口不接受空值的处理

+ 5 - 0
src/views/projectManage/taskList/taskIndex.vue

@@ -7,6 +7,7 @@
           <el-switch
             v-model="newTabOpen"
             active-text="新标签页跳转"
+            @change="logHandle('switchJumpOpen')"
           />
         </div>
         <div>
@@ -243,6 +244,7 @@
 <script>
 import { EncryptId } from '@/utils/crypto-js.js'
 import { mapGetters } from 'vuex'
+import { log } from '@/utils/global'
 import {
   taskList,
   configShowTaskEnum,
@@ -344,6 +346,9 @@ export default {
     this.$store.state.data.status = false
   },
   methods: {
+    logHandle(d) {
+      log({ c: 'task', d })
+    },
     test2(item, e) {
       // 获取团队人员信息
       if (typeof this.test[item.idap] === 'undefined') {