zhangwencui
13 小时以前 b7754a0723ec899af5afc99a6be90c4a6d1dea4e
src/views/officeProcessAutomation/HrManage/resign-apply/index.vue
@@ -4,26 +4,24 @@
    <div class="search_form mb20">
      <div>
        <span class="search_title">姓名:</span>
        <el-input
            v-model="searchForm.staffName"
        <el-input v-model="searchForm.staffName"
            style="width: 240px"
            placeholder="请输入姓名搜索"
            @change="handleQuery"
            clearable
            :prefix-icon="Search"
        />
        <el-button type="primary" @click="handleQuery" style="margin-left: 10px"
        >搜索</el-button
        >
                  :prefix-icon="Search" />
        <el-button type="primary"
                   @click="handleQuery"
                   style="margin-left: 10px">搜索</el-button>
      </div>
      <div>
        <el-button type="primary" @click="openForm('add')">新增离职</el-button>
        <el-button type="primary"
                   @click="openForm('add')">新增离职</el-button>
        <el-button @click="handleOut">导出</el-button>
      </div>
    </div>
    <div class="table_list">
      <PIMTable
          rowKey="id"
      <PIMTable rowKey="id"
          :column="tableColumn"
          :tableData="tableData"
          :page="page"
@@ -31,10 +29,10 @@
          @selection-change="handleSelectionChange"
          :tableLoading="tableLoading"
          @pagination="pagination"
          :total="page.total"
      ></PIMTable>
                :total="page.total"></PIMTable>
    </div>
    <form-dia ref="formDia" @close="handleQuery"></form-dia>
    <form-dia ref="formDia"
              @close="handleQuery"></form-dia>
  </div>
</template>
@@ -56,7 +54,7 @@
    label: "状态",
    prop: "staffState",
    dataType: "tag",
    formatData: (params) => {
      formatData: params => {
      if (params == 0) {
        return "离职";
      } else if (params == 1) {
@@ -65,7 +63,7 @@
        return null;
      }
    },
    formatType: (params) => {
      formatType: params => {
      if (params == 0) {
        return "danger";
      } else if (params == 1) {
@@ -92,10 +90,6 @@
    prop: "sex",
  },
  {
    label: "户籍住址",
    prop: "nativePlace",
  },
  {
    label: "部门",
    prop: "deptName",
  },
@@ -104,18 +98,13 @@
    prop: "postName",
  },
  {
    label: "现住址",
    prop: "adress",
    width:200
  },
  {
    label: "第一学历",
    prop: "firstStudy",
  },
  {
    label: "专业",
    prop: "profession",
    width:100
      width: 100,
  },
  {
    label: "年龄",
@@ -124,28 +113,28 @@
  {
    label: "联系电话",
    prop: "phone",
    width:150
      width: 150,
  },
  {
    label: "紧急联系人",
    prop: "emergencyContact",
    width: 120
      width: 120,
  },
  {
    label: "紧急联系人电话",
    prop: "emergencyContactPhone",
    width:150
      width: 150,
  },
  {
    dataType: "action",
    label: "操作",
    align: "center",
    fixed: 'right',
      fixed: "right",
    operation: [
      {
        name: "编辑",
        type: "text",
        clickFun: (row) => {
          clickFun: row => {
          openForm("edit", row);
        },
      },
@@ -160,9 +149,8 @@
  size: 100,
  total: 0,
});
const formDia = ref()
const { proxy } = getCurrentInstance()
  const formDia = ref();
  const { proxy } = getCurrentInstance();
// 查询列表
/** 搜索按钮操作 */
@@ -170,31 +158,33 @@
  page.current = 1;
  getList();
};
const pagination = (obj) => {
  const pagination = obj => {
  page.current = obj.page;
  page.size = obj.limit;
  getList();
};
const getList = () => {
  tableLoading.value = true;
  findStaffLeaveListPage({...page, ...searchForm.value}).then(res => {
    findStaffLeaveListPage({ ...page, ...searchForm.value })
      .then(res => {
    tableLoading.value = false;
    tableData.value = res.data.records
        tableData.value = res.data.records;
    page.total = res.data.total;
  }).catch(err => {
    tableLoading.value = false;
  })
      .catch(err => {
        tableLoading.value = false;
      });
};
// 表格选择数据
const handleSelectionChange = (selection) => {
  const handleSelectionChange = selection => {
  selectedRows.value = selection;
};
// 打开弹框
const openForm = (type, row) => {
  nextTick(() => {
    formDia.value?.openDialog(type, row)
  })
      formDia.value?.openDialog(type, row);
    });
};
// 导出