Ver código fonte

港大打卡修复打卡班次没有主部门时传空值

zhonghuizhen 2 semanas atrás
pai
commit
26784a20d1
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      src/views/system/dashboard/components/util.js

+ 2 - 2
src/views/system/dashboard/components/util.js

@@ -948,7 +948,7 @@ export function buildComponent(name, column, preview, vm) {
         // 港大新首页打卡处理逻辑
         // 港大新首页打卡处理逻辑
         handleClockFromTabNew() {
         handleClockFromTabNew() {
           const { userInfo } = this.$store.getters || {}
           const { userInfo } = this.$store.getters || {}
-          const buMen = userInfo.mainPosition?.id || ''
+          const buMen = userInfo.mainPosition?.id || userInfo.positions[0]?.id || ''
           const params = {
           const params = {
               "pageNo": 1,
               "pageNo": 1,
               "limit": 50,
               "limit": 50,
@@ -964,7 +964,7 @@ export function buildComponent(name, column, preview, vm) {
             if (data.length > 0) { 
             if (data.length > 0) { 
               this.$emit('action-event', 'daka', data)
               this.$emit('action-event', 'daka', data)
             } else {
             } else {
-              this.$message.warning('您所在部门目前没有配置班次,无法打卡')
+              this.$message.warning('您所在部门目前没有配置生效的班次,无法打卡')
             }
             }
           })
           })
           .catch(() => {
           .catch(() => {