Browse Source

不接受空值处理

panxiandiao_i 5 years ago
parent
commit
25dbb8e46a
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/views/projectManage/taskList/taskListIndex.vue

+ 5 - 0
src/views/projectManage/taskList/taskListIndex.vue

@@ -364,6 +364,11 @@ export default {
       queryCode.bizId = localStorage.getItem('key')
       queryCode.bizId = localStorage.getItem('key')
       queryCode.pageSize = this.pageSize
       queryCode.pageSize = this.pageSize
       queryCode.curIndex = this.curIndex
       queryCode.curIndex = this.curIndex
+      for (const key in queryCode) { // 接口不接受空值的处理
+        if (queryCode[key] === '') {
+          delete queryCode[key]
+        }
+      }
       taskListGet(queryCode).then(res => {
       taskListGet(queryCode).then(res => {
         res.code === 200 ? this.tableData = res.data : this.errorFun(res.msg)
         res.code === 200 ? this.tableData = res.data : this.errorFun(res.msg)
       })
       })