Преглед изворни кода

对未在排版发布后加入考勤记录数据提示

cyy пре 1 година
родитељ
комит
d391137b01
1 измењених фајлова са 7 додато и 0 уклоњено
  1. 7 0
      src/views/platform/bpmn/my-schedule/index.vue

+ 7 - 0
src/views/platform/bpmn/my-schedule/index.vue

@@ -232,6 +232,7 @@ export default {
 
         this.schedule().then(res => {
           if (res.length > 0) {
+            let ind = 0
             const objArr = {}
             res.forEach((item, i) => {
               const dArr = this.generationDate(item.start_date_, item.end_date_)
@@ -241,6 +242,9 @@ export default {
                 const midReissueArr = reissueDataIn.filter(y => y.bu_ka_ri_qi_ === t && y.pai_ban_id_ === item.fid) || []
                 const isAbnormal = midClockArr.length > 0 ? midClockArr.filter(y => y.kao_qin_zhuang_ta === '异常' || !y.hasOwnProperty('da_ka_shi_jian_1_') || !y.hasOwnProperty('da_ka_shi_jian_2_')).length > 0 : true
                 const clockDataAll = { isAbnormal: isAbnormal, data: midClockArr }
+                if (midClockArr.length === 0) {
+                  ind = 1
+                }
                 if (objArr.hasOwnProperty(t)) {
                   // const strArr = objArr[t].name.split(',')
                   // if (strArr.findIndex(e => e === (item['d' + (n + 1) + '_'] ? item['d' + (n + 1) + '_'] : '')) === -1) {
@@ -289,6 +293,9 @@ export default {
               })
             })
             console.log(objArr)
+            if (ind === 1) {
+              this.$toast('没有相应的考勤记录表数据,请联系开发人员!')
+            }
             this.homologousDate(this.dateArr, objArr)
           }
         })