Explorar o código

Merge remote-tracking branch 'origin/康年堂' into 康年堂

ct hai 20 horas
pai
achega
458210da43
Modificáronse 1 ficheiros con 12 adicións e 4 borrados
  1. 12 4
      src/views/hisStore/adv/index.vue

+ 12 - 4
src/views/hisStore/adv/index.vue

@@ -2,7 +2,7 @@
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
       <el-form-item label="广告位置" prop="advType">
-        <el-select v-model="queryParams.advType" placeholder="请选择广告位置" clearable size="small">
+        <el-select v-model="queryParams.advTypes" placeholder="请选择广告位置" clearable size="small" multiple>
           <el-option
                 v-for="item in advTypeOptions"
                 :key="item.dictValue"
@@ -248,7 +248,8 @@ export default {
         status: null,
         sort: null,
         advType: null,
-        showType: null
+        showType: null,
+        advTypes: []
       },
       // 表单参数
       form: {},
@@ -331,7 +332,13 @@ export default {
     /** 查询广告列表 */
     getList() {
       this.loading = true;
-      listAdv(this.queryParams).then(response => {
+      const params = {
+        ...this.queryParams,
+        advTypes: Array.isArray(this.queryParams.advTypes)
+          ? this.queryParams.advTypes.join(",")
+          : ""
+      };
+      listAdv(params).then(response => {
         this.advList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -368,6 +375,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.queryParams.advTypes = [];
       this.handleQuery();
     },
     // 多选框选中数据
@@ -476,7 +484,7 @@ export default {
           this.download(response.msg);
           this.exportLoading = false;
         }).catch(() => {});
-    }
+    },
   }
 };
 </script>