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 @@ + + +