chenrui пре 3 година
родитељ
комит
7d3258c9af

+ 1 - 1
src/components/GlobalHeader/GlobalHeader.vue

@@ -74,7 +74,7 @@ export default {
   },
   mounted () {
     document.addEventListener('scroll', this.handleScroll, { passive: true })
-    console.log(this.multiTab)
+    // console.log(this.multiTab)
   },
   methods: {
     handleScroll () {

+ 1 - 1
src/components/MultiTab/MultiTab.vue

@@ -135,7 +135,7 @@ export default {
     },
     activeKey: function (newPathKey) {
       const row = this.pages.find(item => item.name == newPathKey)
-      console.log(row.fullPath)
+      // console.log(row.fullPath)
       this.$router.push({ path: row.fullPath })
     }
   },

+ 9 - 9
src/components/Table/index.js

@@ -89,7 +89,7 @@ export default {
       default: ''
     },
     index: {
-      type: [String,Number],
+      type: [String, Number],
       default: ''
     }
   }),
@@ -127,9 +127,9 @@ export default {
       pageSize: this.pageSize,
       showSizeChanger: this.showSizeChanger
     }) || false
-    console.log('this.localPagination', this.localPagination)
+    // console.log('this.localPagination', this.localPagination)
     this.needTotalList = this.initTotalList(this.columns)
-    if(this.defaultLoadData){
+    if (this.defaultLoadData) {
       this.loadData()
     }
   },
@@ -157,7 +157,7 @@ export default {
         pageNo: (pagination && pagination.current) ||
           this.showPagination && this.localPagination.current || this.pageNum,
         pageSize: (pagination && pagination.pageSize) ||
-          this.showPagination && this.localPagination.pageSize || this.pageSize,
+          this.showPagination && this.localPagination.pageSize || this.pageSize
       },
       (sorter && sorter.field && {
         sortField: sorter.field
@@ -168,20 +168,20 @@ export default {
         ...filters
       }
       )
-      if(this.tableId != ''){
+      if (this.tableId != '') {
         parameter.tableId = this.tableId
       }
-      if(this.index != ''){
+      if (this.index != '') {
         parameter.index = this.index
       }
-      console.log('parameter', parameter)
+      // console.log('parameter', parameter)
       const result = this.data(parameter)
       // 对接自己的通用数据接口需要修改下方代码中的 r.pageNo, r.count, r.data
       // eslint-disable-next-line
       if ((typeof result === 'object' || typeof result === 'function') && typeof result.then === 'function') {
         result.then(r => {
           const list = r.list || r.data || r
-          console.log(r,'rrrrrrrrrr')
+          // console.log(r,'rrrrrrrrrr')
           this.localPagination = this.showPagination && Object.assign({}, this.localPagination, {
             current: r.pageNo, // 返回结果中的当前分页数
             total: Number(r.count), // 返回结果中的总记录数
@@ -306,7 +306,7 @@ export default {
       if (k === 'rowSelection') {
         if (showAlert && this.rowSelection) {
           // 如果需要使用alert,则重新绑定 rowSelection 事件
-          console.log('this.rowSelection', this.rowSelection)
+          // console.log('this.rowSelection', this.rowSelection)
           props[k] = {
             ...this.rowSelection,
             selectedRows: this.selectedRows,

+ 3 - 3
src/permission.js

@@ -27,7 +27,7 @@ router.beforeEach((to, from, next) => {
       NProgress.done()
     } else {
       const userInfo = Vue.ls.get('userName')
-      console.log(userInfo)
+      // console.log(userInfo)
       if (userInfo) {
         store.dispatch('SetInfo', userInfo)
       } else {
@@ -35,13 +35,13 @@ router.beforeEach((to, from, next) => {
           next({ path: '/user/login', query: { redirect: to.fullPath } })
         })
       }
-      console.log(store.getters.roles)
+      // console.log(store.getters.roles)
       if (store.getters.roles.permissionList.length === 0) {
         store
           .dispatch('GetInfo', token)
           .then(res => {
             const roles = res
-            console.log(roles, 'roles')
+            // console.log(roles, 'roles')
             if (roles.permissionList.length == 0 || !roles) {
               store.dispatch('Logout').then(() => {
                 store.dispatch('ResetRoutes').then(() => {

+ 6 - 7
src/store/modules/websocketStore.js

@@ -28,16 +28,15 @@ export default {
       const sid = 'pc/u' + this.getters.userInfo.userid + 'epc'
       const protocol = process.env.NODE_ENV == 'production' ? (window.location.protocol == 'http:' ? 'ws:' : 'wss:') : 'ws:'
       const wsUrl = protocol + baseUrl + sid
-      console.log(process.env.NODE_ENV, wsUrl)
+      // console.log(process.env.NODE_ENV, wsUrl)
       state.websock = new WebSocket(wsUrl)
       state.websock.onopen = function () {
-        console.log('连接成功!')
+        // console.log('连接成功!')
         _this.dispatch('getUnreadMessageCount')
       }
       state.websock.onmessage = function (e) {
-        console.log('ws接收!', e.data)
+        // console.log('ws接收!', e.data)
         if (e.data != 'pong') {
-          console.log('进来----------')
           state.wsMessageData = JSON.parse(e.data)
         }
       }
@@ -50,7 +49,7 @@ export default {
 
       // 发送心跳包
       state.heartInterId = setInterval(function () {
-        console.log('ws发送心跳!')
+        // console.log('ws发送心跳!')
         if (state.websock.readyState == 3) {
           clearInterval(state.heartInterId)
           _this.commit('WEBSOCKET_INIT', url)
@@ -63,7 +62,7 @@ export default {
       clearInterval(state.heartInterId)
     },
     WEBSOCKET_SEND (state, p) {
-      console.log('ws发送!', p)
+      // console.log('ws发送!', p)
       state.websock.send(p)
     },
     UPDATE_HOME (state, p) {
@@ -89,7 +88,7 @@ export default {
     // 此方法用来获取未读消息条数,接口只返回数值,不返回消息列表
     getUnreadMessageCount ({ state, commit }) {
       getUnreadCount().then(res => {
-        console.log(res, '---------------请求未读消息', res.data ? res.data.no_read_count : 0)
+        // console.log(res, '---------------请求未读消息', res.data ? res.data.no_read_count : 0)
         commit('setMessageCount', res.data ? res.data.no_read_count : 0)
       })
     },