maven
5 天以前 c15270d076083d0d91c731496070112120d7e5ba
yys  优化导入导出
已修改2个文件
51 ■■■■■ 文件已修改
src/utils/util.js 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/lavorissue/ledger/index.vue 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/util.js
@@ -1,4 +1,6 @@
//防抖
import dayjs from "dayjs";
export  function debounce(fn) {
    console.log(1)
    let t = null //只会执行一次
@@ -103,4 +105,17 @@
}
  export function filterArr(arr) {
      return arr.filter(item => item.flag !== false);
  }
  }
 export function getCurrentMonth () {
    let month = dayjs().month() + 1
    if (month <= 3) {
        return '1';
    } else if (month <= 6) {
        return '2';
    } else if (month <= 9) {
        return '3';
    } else if (month <= 12) {
        return '4';
    }
}
src/views/lavorissue/ledger/index.vue
@@ -1,6 +1,17 @@
<template>
  <div class="app-container">
    <el-form :model="filters" :inline="true">
      <el-form-item label="发放季度:" prop="season">
        <el-select
            style="width: 200px;"
            @change="handleQuery"
            v-model="filters.season"
            placeholder="请选择"
            :clearable="false"
        >
          <el-option :label="item.label" :value="item.value" v-for="(item,index) in jidu" :key="value" />
        </el-select>
      </el-form-item>
      <el-form-item label="员工名称:">
        <el-input
            v-model="filters.staffName"
@@ -68,6 +79,7 @@
import { ElMessageBox, ElMessage } from "element-plus";
import dayjs from "dayjs";
import FilesDia from "./filesDia.vue";
import { getCurrentMonth } from "@/utils/util"
// 表格多选框选中项
const multipleList = ref([]);
@@ -89,6 +101,7 @@
    listPage,
    {
      staffName: '',
      season: getCurrentMonth(),
    },
    [
      {
@@ -153,6 +166,25 @@
      },
    ]
);
const jidu = ref([
  {
    value: '1',
    label: '第一季度'
  },
  {
    value: '2',
    label: '第二季度'
  },
  {
    value: '3',
    label: '第三季度'
  },
  {
    value: '4',
    label: '第四季度'
  }
])
// 多选后做什么
const handleSelectionChange = (selectionList) => {
@@ -231,7 +263,7 @@
    type: "warning",
  })
      .then(() => {
        proxy.download(`/lavorIssue/export`, {}, "劳保台账.xlsx");
        proxy.download(`/lavorIssue/exportCopy`, {season: filters.season}, "劳保台账.xlsx");
      })
      .catch(() => {
        proxy.$modal.msg("已取消");