Преглед на файлове

fix:调整以往运行记录上传年度筛选条件

liujiayin преди 2 години
родител
ревизия
bce258a3ec
променени са 1 файла, в които са добавени 9 реда и са изтрити 4 реда
  1. 9 4
      src/views/infosManage/fileIE.vue

+ 9 - 4
src/views/infosManage/fileIE.vue

@@ -242,7 +242,7 @@ export default {
             let start = ''
             //   console.log('this.$store.getters',this.$store.getters)
             const positionsDatas = this.$store.getters.userInfo.positions
-            console.log('getters', this.$store.getters)
+            console.log('getters1111', this.$store.getters)
             const needSelType = []
             if (this.$store.getters.userInfo.positions == 0) {
                 this.$message({
@@ -251,6 +251,8 @@ export default {
                 })
                 return
             }
+            console.log('33333333333', this.searchWhere)
+
             for (var i in this.searchWhere) {
                 if (i == 'b') {
                     start = this.searchWhere[i]
@@ -260,10 +262,13 @@ export default {
                     wheres2 = wheres2 + ` and bian_zhi_shi_jian between '${start} 00:00:00' and '${this.searchWhere[i]} 23:59:59'`
                     wheres3 = wheres3 + ` and bian_zhi_shi_jian between '${start} 00:00:00' and '${this.searchWhere[i]} 23:59:59'`
                 }
+                console.log('iiiii22222222', i)
+
                 if (i !== 'i' && i !== 'b') {
-                    wheres1 = wheres1 + ` and wj.${i} like '%${this.searchWhere[i]}%'`
-                    wheres2 = wheres2 + ` and wj.${i} like '%${this.searchWhere[i]}%'`
-                    wheres3 = wheres3 + ` and wj.${i} like '%${this.searchWhere[i]}%'`
+                    const likeWhere = i === 'nian_du_' ? this.searchWhere[i].getFullYear() : this.searchWhere[i]
+                    wheres1 = wheres1 + ` and wj.${i} like '%${likeWhere}%'`
+                    wheres2 = wheres2 + ` and wj.${i} like '%${likeWhere}%'`
+                    wheres3 = wheres3 + ` and wj.${i} like '%${likeWhere}%'`
                 }
             }