Ver Fonte

请求时 日期查询条件没有传到后端的问题

zhulu há 1 ano atrás
pai
commit
66ba36ed1e
1 ficheiros alterados com 4 adições e 0 exclusões
  1. 4 0
      src/views/registerBook/index.vue

+ 4 - 0
src/views/registerBook/index.vue

@@ -26,6 +26,7 @@
                 <el-date-picker
                   v-model="queryParams.date"
                   type="month"
+                  format="yyyy-MM-dd"
                   value-format="yyyy-MM-dd"
                   placeholder="请选择保存日期">
                 </el-date-picker>
@@ -233,9 +234,12 @@ export default {
     this.getList();
   },
   methods: {
+    dayjs,
     /** 查询registerBook列表 */
     getList() {
       this.loading = true;
+      
+      this.queryParams.date=dayjs(this.queryParams.date).format("YYYY-MM-DD");
       listRegisterBook(this.queryParams).then(response => {
         this.registerBookList = response.rows;
         this.total = response.total;