From 49cc1d8afa85e48c886b3d242873c989ed1d2a4d Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Tue, 27 Jan 2026 10:09:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=BA=E5=91=98=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/personManage/person.js | 8 +- src/views/basicManage/groupManage/index.vue | 0 .../personManage/addAndEditForm.vue | 162 +++++++ src/views/basicManage/personManage/config.js | 76 ++++ src/views/basicManage/personManage/index.vue | 397 ++++++++++++++++++ 5 files changed, 639 insertions(+), 4 deletions(-) create mode 100644 src/views/basicManage/groupManage/index.vue create mode 100644 src/views/basicManage/personManage/addAndEditForm.vue create mode 100644 src/views/basicManage/personManage/config.js create mode 100644 src/views/basicManage/personManage/index.vue diff --git a/src/api/personManage/person.js b/src/api/personManage/person.js index 03c6c3f..eff0aab 100644 --- a/src/api/personManage/person.js +++ b/src/api/personManage/person.js @@ -3,7 +3,7 @@ import request from '@/utils/request' // 人员管理- 查询列表 export function listPersonAPI(query) { return request({ - url: '/personnel/getPersonnelList', + url: '/worker/getWorkerList', method: 'GET', params: query, }) @@ -12,7 +12,7 @@ export function listPersonAPI(query) { // 人员管理- 新增 export function addPersonAPI(data) { return request({ - url: '/personnel/addPersonnel', + url: '/worker/addWorker', method: 'POST', data, }) @@ -21,7 +21,7 @@ export function addPersonAPI(data) { // 人员管理- 修改 export function updatePersonAPI(data) { return request({ - url: '/personnel/updatePersonnel', + url: '/worker/updateWorker', method: 'POST', data, }) @@ -30,7 +30,7 @@ export function updatePersonAPI(data) { // 人员管理- 删除 export function delPersonAPI(data) { return request({ - url: `/personnel/delPersonnel`, + url: `/worker/delWorker`, method: 'POST', data, }) diff --git a/src/views/basicManage/groupManage/index.vue b/src/views/basicManage/groupManage/index.vue new file mode 100644 index 0000000..e69de29 diff --git a/src/views/basicManage/personManage/addAndEditForm.vue b/src/views/basicManage/personManage/addAndEditForm.vue new file mode 100644 index 0000000..2adf6cf --- /dev/null +++ b/src/views/basicManage/personManage/addAndEditForm.vue @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + 男性 ♂ + 女性 ♀ + + + + + + + + + + + + diff --git a/src/views/basicManage/personManage/config.js b/src/views/basicManage/personManage/config.js new file mode 100644 index 0000000..ffab8f3 --- /dev/null +++ b/src/views/basicManage/personManage/config.js @@ -0,0 +1,76 @@ +import { reactive } from 'vue' +import CryptoUtil from "../../../api/crypto.js"; + +// 根据下拉数据构建搜索表单配置 +// 注意:这里不直接发请求,只依赖调用方传入的 options,避免在模块顶层使用组合式 API +export const buildFormColumns = ( + positionOptions = [], + natureOptions = [], + categoryOptions = [], +) => [ + { + type: 'input', + prop: 'name', + placeholder: '请输入姓名', + }, + { + type: 'select', + prop: 'sex', + placeholder: '请选择性别', + options: [ + { + label: '男', + value: 1, + }, + { + label: '女', + value: 0, + }, + ], + }, + { + type: 'select', + prop: 'positionId', + placeholder: '请选择部门', + options: positionOptions.map((item) => ({ + label: item.value, + value: item.id, + })), + }, +] + +export const tableColumns = [ + { + prop: 'inspectionStationName', + label: '人员所属部门', + }, + { + prop: 'name', + label: '姓名', + }, + { + prop: 'sex', + label: '性别', + formatter: (row) => (row.sex == 1 ? '男' : '女'), + }, + { + prop: 'phone', + label: '电话', + formatter: (row) => (CryptoUtil.decrypt(row.phone)), + }, + +] + +export const dialogConfig = reactive({ + outerVisible: false, + outerTitle: '新增人员', + outerWidth: '640px', // 根据图片缩小宽度更美观 + minHeight: '400px', + maxHeight: '80vh', +}) + +export default { + tableColumns, + dialogConfig, + buildFormColumns, +} diff --git a/src/views/basicManage/personManage/index.vue b/src/views/basicManage/personManage/index.vue new file mode 100644 index 0000000..6f1f862 --- /dev/null +++ b/src/views/basicManage/personManage/index.vue @@ -0,0 +1,397 @@ + + + + + + + 新建人员 + + + + 导入人员 + + + + + + + + + + + + + + 取消 + 保存 + + + + + + + + + + 将文件拖到此处,或点击上传 + + + 仅允许导入xls、xlsx格式文件。 + + 下载模板 + + + + + + + 取消 + 确定 + + + + + + +