Explorar o código

不接受空值处理

panxiandiao_i %!s(int64=5) %!d(string=hai) anos
pai
achega
25dbb8e46a
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  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.pageSize = this.pageSize
       queryCode.curIndex = this.curIndex
+      for (const key in queryCode) { // 接口不接受空值的处理
+        if (queryCode[key] === '') {
+          delete queryCode[key]
+        }
+      }
       taskListGet(queryCode).then(res => {
         res.code === 200 ? this.tableData = res.data : this.errorFun(res.msg)
       })