doum
6 天以前 4936ba718f4ec2d069a9c28d07215573ed8548aa
admin/src/views/business/admissionStatistics.vue
@@ -87,7 +87,7 @@
                    <el-table
                        style="width: 100%; margin-top: 15px;"
                        :data="list"
                        header-row-style="background-color: #F7F7F7;"
                        :header-row-style="{ backgroundColor: '#F7F7F7' }"
                        border
                    >
                        <el-table-column :prop="item" :label="item" align="center" :fixed="index === 0 ? true : index === column.length - 1 ? 'right' : false" v-for="(item, index) in column" :key="index"></el-table-column>
@@ -102,7 +102,7 @@
                <el-table
                    style="width: 100%; margin-top: 15px;"
                    :data="info.yearSortList"
                    header-row-style="background-color: #F7F7F7;"
                    :header-row-style="{ backgroundColor: '#F7F7F7' }"
                    border
                >
                    <el-table-column prop="name" label="人员分类" align="center"></el-table-column>
@@ -167,17 +167,19 @@
      getReportLists() {
        getReportList({ dateStr: this.date1, isGroupBy: this.isGroupBy, type: 1 })
          .then(res => {
            this.column = res[0]
            this.list = res.slice(1).map(row => {
              const obj = {};
              this.column.forEach((header, index) => {
                obj[header] = row[index];
            if (!res || res.length === 0) {
              this.column = []
              this.list = []
              return
            }
              this.column = res[0]
              this.list = res.slice(1).map(row => {
                const obj = {};
                this.column.forEach((header, index) => {
                  obj[header] = row[index];
                });
                return obj;
              });
              return obj;
            });
            // if (res.length === 0) {
            //   this.column = []
            //   this.list = []