qinzhipeng_v 5 năm trước cách đây
mục cha
commit
d2d73c4552
2 tập tin đã thay đổi với 31 bổ sung19 xóa
  1. 3 2
      src/main.js
  2. 28 17
      src/views/Platform/workbench.vue

+ 3 - 2
src/main.js

@@ -4,7 +4,7 @@ import 'normalize.css/normalize.css' // A modern alternative to CSS resets
 
 import ElementUI from 'element-ui'
 import 'element-ui/lib/theme-chalk/index.css'
-import locale from 'element-ui/lib/locale/lang/en' // lang i18n
+// import locale from 'element-ui/lib/locale/lang/en' // lang i18n 英文
 
 import '@/styles/index.scss' // global css
 
@@ -35,7 +35,8 @@ import axios from 'axios'
 Vue.prototype.$http = axios
 
 // set ElementUI lang to EN
-Vue.use(ElementUI, { locale })
+// Vue.use(ElementUI, { locale }) 英文
+Vue.use(ElementUI)
 
 Vue.config.productionTip = false
 

+ 28 - 17
src/views/Platform/workbench.vue

@@ -150,7 +150,7 @@
 <script>
 
 import { personalworkstationQueryBackLog, personalworkstationQueryBackLogBugAndTask, personalworkstationQueryStatusAndPriority, personalworkstationQueryPeriodBugAndTask } from '@/api/workbench'
-
+import Utils from '../../util.js'
 export default {
   name: 'Workbench',
   data() {
@@ -227,36 +227,47 @@ export default {
     }
   },
   created() {
-    this.getTopShowData()
+    this.getTopShowData(localStorage.getItem('key'))
     this.Setstatus(1)
   },
+  mounted() {
+    var that = this
+    Utils.$on('demo', function(msg) {
+      that.getTopShowData(msg)
+    })
+  },
+  // watch:{
+  //   bizJson(old,new){
+
+  //   },
+  // },
   methods: {
     // 待处理  list
-    getTopShowData() {
-      this.userName = { bizId: this.bizJson, ename: this.userInformation }
+    getTopShowData(e) {
+      this.userName = { bizId: e, ename: this.userInformation }
       personalworkstationQueryBackLog(this.userName).then(res => {
+        Object.assign(this.$data, this.$options.data())
+        // this.show1 = false
+        // this.show2 = false
+        // this.show3 = false
+        // this.bugOrTask1 = {}
+        // this.bugOrTask = {}
+        // this.tableType = []
+        // this.tableData = []
         if (res.code === 200) {
           this.getAllData = res.data.list
           if (res.data.list[0]) {
             this.oneData = res.data.list[0]
-            // this.num1 = res.data.list[0].taskCount
             this.show1 = true
           }
           if (res.data.list[1]) {
             this.oneData1 = res.data.list[1]
-            // this.num2 = res.data.list[1].taskCount
             this.show2 = true
           }
           if (res.data.list[2]) {
             this.oneData2 = res.data.list[2]
-            // this.num3 = res.data.list[2].taskCount
             this.show3 = true
           }
-          // if (this.num1 + this.num2 + this.num3 === 0) {
-          //   this.img = false
-          // } else {
-          //   this.img = true
-          // }
           this.oneData3 = res.data.list
         }
       })
@@ -297,7 +308,7 @@ export default {
         this.isBugOrTask = e.isBugOrTask
         this.userName = e
         this.userName.status = e.status
-        this.userName.bizId = this.bizJson
+        this.userName.bizId = localStorage.getItem('key')
         this.userName.handlerPerson = this.userInformation
         this.userName.title = e.titles
         personalworkstationQueryBackLogBugAndTask(this.userName).then(res => {
@@ -325,7 +336,7 @@ export default {
       this.$set(this.bugOrTask1, 'status', '')
       this.tableType = []
       this.Informationen.isBugOrTask = e
-      this.Informationen.bizId = this.bizJson
+      this.Informationen.bizId = localStorage.getItem('key')
       this.Informationen.handlerPerson = this.userInformation
       personalworkstationQueryStatusAndPriority(this.Informationen).then(res => {
         var backLogStatusList = res.data.backLogStatusList
@@ -348,7 +359,7 @@ export default {
       this.total = 0
       this.$set(this.bugOrTask, 'isBugOrTask', 1)
       if (tab.label === '工作统计') {
-        this.userName = { bizId: this.bizJson, handlerPerson: this.userInformation, timeType: 0 }
+        this.userName = { bizId: localStorage.getItem('key'), handlerPerson: this.userInformation, timeType: 0 }
         personalworkstationQueryPeriodBugAndTask(this.userName).then(res => {
           this.HashSet = res.data.taskInfoDoingList.length
           this.HashSetArray = res.data.taskInfoDoingList
@@ -394,7 +405,7 @@ export default {
       if (e.value2) {
         if (e.value2 !== '') {
           var obj = {
-            bizId: this.bizJson,
+            bizId: localStorage.getItem('key'),
             timeType: this.selectData,
             status: e.status,
             isBugOrTask: e.isBugOrTask,
@@ -430,7 +441,7 @@ export default {
     Setstatus(e) {
       this.$set(this.bugOrTask, 'status', '')
       this.Informationen.isBugOrTask = e
-      this.Informationen.bizId = this.bizJson
+      this.Informationen.bizId = localStorage.getItem('key')
       this.Informationen.handlerPerson = this.userInformation
       personalworkstationQueryStatusAndPriority(this.Informationen).then(res => {
         if (res.code === 200) {