chris 3 年之前
父節點
當前提交
0e863ef693
共有 4 個文件被更改,包括 11 次插入8 次删除
  1. 3 0
      src/api/util.js
  2. 3 3
      src/store/modules/common.js
  3. 3 3
      src/views/modules/common/e-desc.vue
  4. 2 2
      src/views/modules/msg-center/approve.vue

+ 3 - 0
src/api/util.js

@@ -56,6 +56,9 @@ export function checkStr (currentStr, strList) {
   if (!currentStr || !strList) return false
   let list = strList.split(',')
   let index = list.findIndex(item => item === currentStr)
+  // console.log('strList: ' + strList)
+  // console.log('currentUser: ' + currentStr)
+  // console.log('index: ' + index)
   return index > -1
 }
 

+ 3 - 3
src/store/modules/common.js

@@ -28,9 +28,9 @@ export default {
       {
         code: '1', value: '待审批'
       },
-      // {
-      //   code: '2', value: '审批中'
-      // },
+      {
+        code: '2', value: '审批中'
+      },
       {
         code: '3', value: '审批完成'
       },

+ 3 - 3
src/views/modules/common/e-desc.vue

@@ -90,9 +90,9 @@
       }
     },
     beforeDestroy () {
-      // if (!this.observe || this.observe.toString() === '') return
-      // console.log('obs = ' + JSON.stringify(this.observe))
-      this.observer.disconnect()
+      if (this.observe) {
+        this.observer.disconnect()
+      }
     }
   }
 </script>

+ 2 - 2
src/views/modules/msg-center/approve.vue

@@ -270,8 +270,8 @@
         })
       },
       checkUser (row) {
-        let currentUser = this.$store.state.user.name
-        return checkStr(currentUser, row.approver)
+        let currentUser = this.$store.state.user.id
+        return checkStr(currentUser, row.currentApprover)
       },
       // 新增 / 修改
       addOrUpdateHandle (businessType, businessId) {