|
@@ -1,7 +1,224 @@
|
|
|
<template>
|
|
|
- <div>人员档案管理</div>
|
|
|
+ <div class="person-files flex flex-col">
|
|
|
+ <SearchForm :fields="fields" :params="params"></SearchForm>
|
|
|
+ <div class="flex-1 page-wrap">
|
|
|
+ <div class="btn-group">
|
|
|
+ <t-button theme="success" @click="handleAdd">新增</t-button>
|
|
|
+ <t-button theme="success">批量导入</t-button>
|
|
|
+ <t-button theme="success">批量导出</t-button>
|
|
|
+ <t-button theme="success">作废</t-button>
|
|
|
+ </div>
|
|
|
+ <t-table
|
|
|
+ size="small"
|
|
|
+ row-key="id"
|
|
|
+ :columns="columns"
|
|
|
+ :data="tableData"
|
|
|
+ bordered
|
|
|
+ :pagination="{
|
|
|
+ defaultCurrent: 1,
|
|
|
+ defaultPageSize: 10,
|
|
|
+ onChange,
|
|
|
+ total: pagination.total,
|
|
|
+ }"
|
|
|
+ :selected-row-keys="selectedRowKeys"
|
|
|
+ select-on-row-click
|
|
|
+ @select-change="selectChange"
|
|
|
+ >
|
|
|
+ </t-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <AddPersonFileDialog
|
|
|
+ v-model:visible="showAddPersonFileDialog"
|
|
|
+ :title="title"
|
|
|
+ :type="type"
|
|
|
+ :handleSave="handleSave"
|
|
|
+ :formData="formData"
|
|
|
+ ref="formDialogRef"
|
|
|
+ ></AddPersonFileDialog>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
-<script setup name="PersonFiles"></script>
|
|
|
+<script setup lang="jsx" name="PersonFiles">
|
|
|
+import { ref, reactive } from 'vue';
|
|
|
+import { getTableData } from '@/api/test';
|
|
|
+import useFetchTable from '@/hooks/useFetchTable';
|
|
|
+import useTableCrud from '@/hooks/useTableCrud';
|
|
|
+import AddPersonFileDialog from './add-person-file-dialog';
|
|
|
+const formDialogRef = ref(null);
|
|
|
+const selectedRowKeys = ref([]);
|
|
|
+const selectChange = (value, { selectedRowData }) => {
|
|
|
+ selectedRowKeys.value = value;
|
|
|
+};
|
|
|
+const columns = [
|
|
|
+ {
|
|
|
+ colKey: 'row-select',
|
|
|
+ type: 'multiple',
|
|
|
+ width: 50,
|
|
|
+ fixed: 'left',
|
|
|
+ },
|
|
|
+ { colKey: 'a', title: '档案流水号' },
|
|
|
+ { colKey: 'b', title: '姓名' },
|
|
|
+ { colKey: 'c', title: '省份' },
|
|
|
+ { colKey: 'd', title: '城市' },
|
|
|
+ { colKey: 'e', title: '区县' },
|
|
|
+ { colKey: 'f', title: '性别' },
|
|
|
+ { colKey: 'g', title: '年龄' },
|
|
|
+ { colKey: 'h', title: '身份证号' },
|
|
|
+ { colKey: 'i', title: '学历' },
|
|
|
+ { colKey: 'j', title: '手机号' },
|
|
|
+ { colKey: 'k', title: '电子邮箱' },
|
|
|
+ { colKey: 'l', title: '底照' },
|
|
|
+ { colKey: 'm', title: '供应商' },
|
|
|
+ { colKey: 'n', title: '入档时间' },
|
|
|
+ { colKey: 'o', title: '认证项目角色', width: 110 },
|
|
|
+ { colKey: 'p', title: '认证分数' },
|
|
|
+ { colKey: 'q', title: '认证有效期' },
|
|
|
+ { colKey: 'r', title: '剩余有效天数', width: 110 },
|
|
|
+ { colKey: 's', title: '认证状态' },
|
|
|
+ { colKey: 't', title: '备注' },
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ colKey: 'operate',
|
|
|
+ fixed: 'right',
|
|
|
+ width: 150,
|
|
|
+ cell: (h, { row }) => {
|
|
|
+ return (
|
|
|
+ <div class="table-operations">
|
|
|
+ <t-link
|
|
|
+ theme="primary"
|
|
|
+ hover="color"
|
|
|
+ onClick={(e) => {
|
|
|
+ e.stopPropagation();
|
|
|
+ handleEdit(row);
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 修改
|
|
|
+ </t-link>
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+];
|
|
|
+const {
|
|
|
+ loading: tableLoading,
|
|
|
+ pagination,
|
|
|
+ tableData,
|
|
|
+ fetchData,
|
|
|
+ onChange,
|
|
|
+} = useFetchTable(getTableData);
|
|
|
+const add = async () => {
|
|
|
+ await 1;
|
|
|
+ alert(1);
|
|
|
+};
|
|
|
+const update = async () => {};
|
|
|
+const refresh = async () => {};
|
|
|
+
|
|
|
+const {
|
|
|
+ visible: showAddPersonFileDialog,
|
|
|
+ type,
|
|
|
+ title,
|
|
|
+ loading: dialogLoading,
|
|
|
+ handleAdd,
|
|
|
+ handleEdit,
|
|
|
+ handleSave,
|
|
|
+ formData,
|
|
|
+ formRef,
|
|
|
+} = useTableCrud(
|
|
|
+ {
|
|
|
+ name: '人员档案',
|
|
|
+ doCreate: add,
|
|
|
+ doUpdate: update,
|
|
|
+ refresh: refresh,
|
|
|
+ initForm: {
|
|
|
+ a: '',
|
|
|
+ b: '',
|
|
|
+ c: '',
|
|
|
+ d: '',
|
|
|
+ e: '',
|
|
|
+ f: '',
|
|
|
+ g: '',
|
|
|
+ h: '',
|
|
|
+ i: '',
|
|
|
+ j: '',
|
|
|
+ k: '',
|
|
|
+ l: '',
|
|
|
+ m: '',
|
|
|
+ n: '',
|
|
|
+ o: '',
|
|
|
+ },
|
|
|
+ },
|
|
|
+ formDialogRef
|
|
|
+);
|
|
|
+
|
|
|
+const fields = ref([
|
|
|
+ {
|
|
|
+ prop: 'a',
|
|
|
+ label: '区域',
|
|
|
+ labelWidth: 100,
|
|
|
+ type: 'select',
|
|
|
+ colSpan: 5,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'b',
|
|
|
+ label: '供应商',
|
|
|
+ labelWidth: 100,
|
|
|
+ type: 'select',
|
|
|
+ colSpan: 5,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'c',
|
|
|
+ label: '姓名',
|
|
|
+ labelWidth: 100,
|
|
|
+ colSpan: 5,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'd',
|
|
|
+ label: '认证角色',
|
|
|
+ labelWidth: 140,
|
|
|
+ type: 'select',
|
|
|
+ colSpan: 6,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'buttons',
|
|
|
+ colSpan: 2,
|
|
|
+ labelWidth: '0px',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ type: 'button',
|
|
|
+ text: '查询',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'e',
|
|
|
+ label: '认证状态',
|
|
|
+ labelWidth: 100,
|
|
|
+ type: 'select',
|
|
|
+ colSpan: 5,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'f',
|
|
|
+ label: '入档时间',
|
|
|
+ labelWidth: 100,
|
|
|
+ type: 'daterange',
|
|
|
+ colSpan: 10,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'g',
|
|
|
+ label: '剩余有效天数:≥',
|
|
|
+ labelWidth: 140,
|
|
|
+ colSpan: 6,
|
|
|
+ },
|
|
|
+]);
|
|
|
+const params = reactive({
|
|
|
+ a: '',
|
|
|
+ b: '',
|
|
|
+ c: '',
|
|
|
+ d: '',
|
|
|
+ e: '',
|
|
|
+ f: [],
|
|
|
+ g: '',
|
|
|
+});
|
|
|
+</script>
|
|
|
|
|
|
<style></style>
|