فهرست منبع

feat: 人资相关页面

outaozhen 5 سال پیش
والد
کامیت
d57fbcae86
3فایلهای تغییر یافته به همراه144 افزوده شده و 0 حذف شده
  1. 83 0
      src/pages/Staff/Employee/index.jsx
  2. 17 0
      src/pages/Staff/RoleMenu/index.jsx
  3. 44 0
      src/services/staff.js

+ 83 - 0
src/pages/Staff/Employee/index.jsx

@@ -0,0 +1,83 @@
+import React from 'react'
+import ProTable from '@ant-design/pro-table'
+import RoleMenu from '@/pages/Staff/RoleMenu'
+
+const Employee = () => {
+  const columns = [
+    {
+      title: '工号',
+      dataIndex: 'jobNumber',
+      key: 'jobNumber',
+      search: false,
+      width: 100
+    },
+    {
+      title: '姓名',
+      dataIndex: 'username',
+      key: 'username',
+      search: false,
+      width: 100
+    },
+    {
+      title: '手机',
+      dataIndex: 'phone',
+      key: 'phone',
+      search: false,
+      width: 100
+    },
+    {
+      title: 'QQ',
+      dataIndex: 'qq',
+      key: 'qq',
+      search: false,
+      width: 100
+    },
+    {
+      title: '办事处/部门',
+      dataIndex: 'category',
+      key: 'category',
+      search: false,
+      width: 100
+    },
+    {
+      title: '岗位',
+      dataIndex: 'position',
+      key: 'position',
+      search: false,
+      width: 100
+    },
+    {
+      title: '聘用状态',
+      dataIndex: 'nature',
+      key: 'nature',
+      search: false,
+      width: 100
+    },
+    {
+      title: '入职时间',
+      dataIndex: 'hiredate',
+      key: 'hiredate',
+      search: false,
+      width: 100
+    },
+    {
+      title: '离职时间',
+      dataIndex: 'dimissionDate',
+      key: 'dimissionDate',
+      search: false,
+      width: 100
+    }
+  ]
+  return (
+    <div className="h-full w-full flex flex-row">
+      <RoleMenu />
+      <div className="w-max-3/4">
+        <div className="ml-8 bg-white shadow-md shadow-hex-3e2c5a relative">
+          <ProTable bordered columns={columns} search={{ filterType: 'light' }} />
+        </div>
+      </div>
+    </div>
+  )
+}
+
+export default Employee

+ 17 - 0
src/pages/Staff/RoleMenu/index.jsx

@@ -0,0 +1,17 @@
+import React from 'react'
+import { ModalForm, ProFormText } from '@ant-design/pro-form'
+
+const RoleMenu = () => {
+  return (
+    <div className="h-full w-max-234px rounded-4px roleMenu">
+      <div className="p-4 border-b-1 border-solid border-black border-opacity-10 bg-[#f7f9fa] flex justify-around items-center">
+        <span className="text-[0.9375rem]">组织架构</span>
+      </div>
+      <div className="p-4 bg-white" style={{ height: 'calc(100% - 1rem*2 - 20px)' }}>
+        <div className="p-0 m-0 list-none text-primary flex flex-col flex-1">dads</div>
+      </div>
+    </div>
+  )
+}
+
+export default RoleMenu

+ 44 - 0
src/services/staff.js

@@ -0,0 +1,44 @@
+import request from '@/basic/utils/request'
+
+/**
+ * 获取部门列表
+ * @param {*} payload
+ * @returns 结果集
+ */
+export async function queryDepartment(payload) {
+  const data = await request.post('/department/list', {
+    data: payload
+  })
+  return data
+}
+
+/**
+ * 新增部门
+ * @param {string} data
+ */
+export async function apiAddDepartment(payload) {
+  const data = await request.post('/department/add', { data: payload })
+  return data
+}
+
+/**
+ * 获取员工列表
+ * @param {*} payload
+ * @returns 结果集
+ */
+export async function queryStaff(payload) {
+  const data = await request.post('/staff/list', {
+    data: payload
+  })
+  return data
+}
+
+/**
+ * 获取员工详情
+ * @param {string} id 联系人记录id
+ */
+export async function apiStaffDetail(id) {
+  const params = { id }
+  const data = await request('/staff/detail', { params })
+  return data
+}