riku
2024-01-09 023ea35893ed047887a43555509335eec7a8b161
src/views/notice/NoticeManage.vue
@@ -121,15 +121,15 @@
    <!-- <el-table-column prop="ecReceiverid" label="签收人" /> -->
  </el-table>
  <!-- <el-affix :offset="0" position="bottom"> -->
    <el-pagination
      class="el-pagination"
      v-model:current-page="currentPage"
      v-model:page-size="pageSize"
      :page-sizes="[10, 20, 50, 100]"
      :background="true"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total"
    />
  <el-pagination
    class="el-pagination"
    v-model:current-page="currentPage"
    v-model:page-size="pageSize"
    :page-sizes="[10, 20, 50, 100]"
    :background="true"
    layout="total, sizes, prev, pager, next, jumper"
    :total="total"
  />
  <!-- </el-affix> -->
  <CompNoticeAddDrawer
    v-model:drawer="drawer"
@@ -140,7 +140,7 @@
<script>
import noticeApi from '@/api/fytz/noticeApi';
import { useDateFormat } from '@vueuse/core';
import { enumScene_1 } from '@/enum/scene';
import { enumScene } from '@/enum/scene';
import { enumDistrict } from '@/enum/district';
import { enumNotice } from '@/enum/notice';
@@ -156,7 +156,7 @@
      loading: false,
      drawer: false,
      districts: enumDistrict(),
      sceneTypes: enumScene_1(),
      sceneTypes: enumScene(1),
      noticeTypes: enumNotice(),
      formSearch: {
        district: '',
@@ -173,12 +173,12 @@
    // }
    currentPage(nValue, oValue) {
      if (nValue != oValue) {
        this.onNoticeType()
        this.onNoticeType();
      }
    },
    pageSize(nValue, oValue) {
      if (nValue != oValue) {
        this.onNoticeType()
        this.onNoticeType();
      }
    },
  },
@@ -204,13 +204,13 @@
          type: noticeType,
          subtype: noticeSubType,
          page: this.currentPage,
          perPage: this.pageSize
          perPage: this.pageSize,
        })
        .then((res) => {
          if (res.success) {
            this.tableData = res.data;
            this.currentPage = res.head.page
            this.total = res.head.totalCount
            this.currentPage = res.head.page;
            this.total = res.head.totalCount;
          }
        })
        .finally(() => {
@@ -219,15 +219,21 @@
      // noticeApi.getNotification().then()
    },
    districtFormatter(row) {
      let district = '未设置';
      this.districts.forEach((d) => {
        if (d.value == row.ecExtension1) {
          district = d.label;
          return;
        }
      });
      if (row.ecExtension1 == null) {
      let district = '';
      if (row.ecExtension1 == null || row.ecExtension1 == '0;') {
        district = '全部';
      } else if (row.ecExtension1 == '-1') {
        district = '未设置';
      } else {
        row.ecExtension1.split(';').forEach((t) => {
          this.districts.forEach((d) => {
            if (t == d.value) {
              district += d.label + '、';
              return;
            }
          });
        });
        district = district.slice(0, district.length - 1)
      }
      return district;
    },
@@ -246,6 +252,7 @@
            }
          });
        });
        scene = scene.slice(0, scene.length - 1)
      }
      return scene;
    },