Explorar o código

我的工作台 10.14

qinzhipeng_v %!s(int64=5) %!d(string=hai) anos
pai
achega
3a1cdd124d
Modificáronse 4 ficheiros con 25 adicións e 20 borrados
  1. 10 10
      src/App.vue
  2. 2 2
      src/apiConfig/mock.js
  3. 1 1
      src/router/index.js
  4. 12 7
      src/views/Platform/workbench.vue

+ 10 - 10
src/App.vue

@@ -10,16 +10,16 @@ import { getUserInfo } from '@/api/user.js'
 export default {
   name: 'App',
   mounted() {
-    if (location.href.indexOf('localhost') < 0) {
-      getUserInfo()
-        .then(res => {
-          localStorage.setItem('realname', res.data.realname)
-          localStorage.setItem('username', res.data.username)
-        })
-    } else {
-      localStorage.setItem('realname', 'unlogin')
-      localStorage.setItem('username', 'unlogin')
-    }
+    // if (location.href.indexOf('localhost') < 0) {
+    getUserInfo()
+      .then(res => {
+        localStorage.setItem('realname', res.data.realname)
+        localStorage.setItem('username', res.data.username)
+      })
+    // } else {
+    //   localStorage.setItem('realname', 'unlogin')
+    //   localStorage.setItem('username', 'unlogin')
+    // }
   }
 }
 </script>

+ 2 - 2
src/apiConfig/mock.js

@@ -1,4 +1,4 @@
 /*eslint-disable*/   //规避eslint的检查,如没有eslint可不写
-// export const mockUrl = 'http://10.179.88.110:8089' // stable
+export const mockUrl = 'http://10.179.88.110:8089' // stable
 // export const mockUrl = 'http://mock.Intra.xiaojukeji.com' // 线上
-export const mockUrl = 'http://10.179.101.226:8089' // test
+// export const mockUrl = 'http://10.179.101.226:8089' // test

+ 1 - 1
src/router/index.js

@@ -94,7 +94,7 @@ export const constantRoutes = [
       {
         path: 'useCasePage',
         name: 'useCasePage',
-        hidden: true,
+        // hidden: true,
         component: () => import('@/views/Platform/useCasePage'),
         meta: { title: '用例管理' }
       },

+ 12 - 7
src/views/Platform/workbench.vue

@@ -234,6 +234,7 @@ export default {
   },
   created() {
     this.getTopShowData()
+    this.Setstatus(1)
   },
   methods: {
     // 待处理  list
@@ -296,6 +297,7 @@ export default {
 
     // 待处理 查询
     clickQuery(e) {
+      e.status === '' ? e.status = [] : ''
       if (e.isBugOrTask === 0 || e.isBugOrTask === 1) {
         this.isBugOrTask = e.isBugOrTask
         this.userName = e
@@ -349,6 +351,7 @@ export default {
     // 工作统计全局list
     handleClick(tab) {
       this.total = 0
+      this.$set(this.bugOrTask, 'isBugOrTask', '任务')
       if (tab.label === '工作统计') {
         this.userName = { bizId: this.bizJson, handlerPerson: this.userInformation, timeType: 0 }
         personalworkstationQueryPeriodBugAndTask(this.userName).then(res => {
@@ -387,11 +390,11 @@ export default {
 
     // 工作统计查询
     clickQueryTaskAndBug(e) {
-      console.log(e)
       this.selectData = localStorage.getItem('selectData')
       if (this.selectData === null) {
         this.selectData = 2
       }
+      e.status === '' ? e.status = [] : ''
       this.isBugOrTask = e.isBugOrTask
       if (e.value2) {
         if (e.value2 !== '') {
@@ -435,13 +438,15 @@ export default {
       this.Informationen.bizId = this.bizJson
       this.Informationen.handlerPerson = this.userInformation
       personalworkstationQueryStatusAndPriority(this.Informationen).then(res => {
-        var periodStatusList = res.data.periodStatusList
-        var arr = []
-        for (var a in periodStatusList) {
-          arr.push({ 'code': a, 'name': periodStatusList[a] })
-        }
-        this.bugStatusStr = arr
+        if (res.code === 200) {
+          var periodStatusList = res.data.periodStatusList
+          var arr = []
+          for (var a in periodStatusList) {
+            arr.push({ 'code': a, 'name': periodStatusList[a] })
+          }
+          this.bugStatusStr = arr
         // e === 0 ? this.bugStatusStr = arr : this.bugStatusStr = brr
+        }
       })
       e === 1 ? this.tableData.isBugOrTask = '任务' : this.tableData.isBugOrTask = '缺陷'
     },