浏览代码

1. 优化

MONSTER-ygh 1 年之前
父节点
当前提交
a10350c458
共有 1 个文件被更改,包括 16 次插入4 次删除
  1. 16 4
      src/views/distribution/personnelMr/index.vue

+ 16 - 4
src/views/distribution/personnelMr/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="app-container">
+  <div class="app-container personnelMr-table">
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="120px">
       <el-form-item label="分销商名称" label-width="90px">
         <el-input
@@ -430,17 +430,22 @@ export default {
   methods: {
     /** 查询列表 */
     getList() {
+      this.dataList = []
       this.loading = true;
       pageList(this.queryParams)
       .then(response => {
-          this.dataList = response.data.rows;
-          this.dataList.forEach(item =>{
+          let list = response.data.rows
+          list.forEach(item =>{
             item.switchValue = item.status;
           })
+          this.dataList = list
           this.total = response.data.total;
           this.loading = false;
         }
-      );
+      ).catch(()=>{
+        this.dataList = []
+        this.loading = false;
+      })
     },
     // 取消按钮
     cancel() {
@@ -680,3 +685,10 @@ export default {
   }
 };
 </script>
+<style lang="scss" scoped>
+.personnelMr-table {
+  ::v-deep .el-table {
+    width: 99.9% !important;
+  }
+}
+</style>