diff --git a/src/views/emergency/communication/components/detail.vue b/src/views/emergency/communication/components/detail.vue
index 9bd5a75..8931df7 100644
--- a/src/views/emergency/communication/components/detail.vue
+++ b/src/views/emergency/communication/components/detail.vue
@@ -15,7 +15,7 @@
{{ resultInfo?.initiatorUserMobile }}
-
+
{{ resultInfo?.initiatorUserAge }}
员工位置
@@ -31,7 +31,7 @@
{{ Object.keys(newEmploy).length > 0 ? newEmploy.phone : resultInfo?.salvageUserMobile }}
-
+
{{ Object.keys(newEmploy).length > 0 ? newEmploy.age : resultInfo?.salvageUserAge }}
@@ -82,7 +82,7 @@
保存
补充小节
-
+
diff --git a/src/views/emergency/communication/components/replaceOther.vue b/src/views/emergency/communication/components/replaceOther.vue
index c4e9e27..1e531eb 100644
--- a/src/views/emergency/communication/components/replaceOther.vue
+++ b/src/views/emergency/communication/components/replaceOther.vue
@@ -57,7 +57,7 @@
+
diff --git a/src/views/system/user/personnelManagement/components/personnelModal.vue b/src/views/system/user/personnelManagement/components/personnelModal.vue
new file mode 100644
index 0000000..a802da7
--- /dev/null
+++ b/src/views/system/user/personnelManagement/components/personnelModal.vue
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/user/personnelManagement/personnelManagement.api.ts b/src/views/system/user/personnelManagement/personnelManagement.api.ts
new file mode 100644
index 0000000..12e01d2
--- /dev/null
+++ b/src/views/system/user/personnelManagement/personnelManagement.api.ts
@@ -0,0 +1,61 @@
+import { defHttp } from '/@/utils/http/axios';
+import { useMessage } from '/@/hooks/web/useMessage';
+
+const { createConfirm } = useMessage();
+export enum Api {
+ list = '/health-emergency/emergency/profession/user/list',
+ save = '/health-emergency/emergency/profession/user/add',
+ edit = '/health-emergency/emergency/profession/user/edit',
+ deleteOne = '/health-emergency/emergency/profession/user/deleteBatch',
+ deleteBatch = '/health-emergency/emergency/profession/user/deleteBatch',
+}
+/**
+ * 列表接口
+ * @param params
+ */
+export const list = (params: any) => defHttp.get({ url: Api.list, params });
+/**
+ * 删除单个
+ */
+export const deleteOne = (params: any, handleSuccess: Function) => {
+ createConfirm({
+ iconType: 'warning',
+ title: '确认删除',
+ content: '是否删除选中数据',
+ okText: '确认',
+ cancelText: '取消',
+ onOk: () => {
+ return defHttp.post({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => {
+ handleSuccess();
+ });
+ },
+ });
+};
+/**
+ * 批量删除
+ * @param params
+ * @param handleSuccess
+ */
+export const batchDelete = (params: any, handleSuccess: Function) => {
+ createConfirm({
+ iconType: 'warning',
+ title: '确认删除',
+ content: '是否删除选中数据',
+ okText: '确认',
+ cancelText: '取消',
+ onOk: () => {
+ return defHttp.post({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => {
+ handleSuccess();
+ });
+ },
+ });
+};
+/**
+ * 保存或者更新
+ * @param params
+ * @param isUpdate
+ */
+export const saveOrUpdate = (params: any, isUpdate: Boolean) => {
+ const url = isUpdate ? Api.edit : Api.save;
+ return defHttp.post({ url: url, params });
+};
diff --git a/src/views/system/user/personnelManagement/personnelManagement.data.ts b/src/views/system/user/personnelManagement/personnelManagement.data.ts
new file mode 100644
index 0000000..7f9b551
--- /dev/null
+++ b/src/views/system/user/personnelManagement/personnelManagement.data.ts
@@ -0,0 +1,397 @@
+import { BasicColumn, FormSchema } from '/@/components/Table';
+import { h, ref } from 'vue';
+import { checkPassword } from '/@/hooks/checkPassword/checkPassword';
+import { getEmergencyList } from '/@/views/consult/agentManagement/agentManagement.api';
+import { allCenterApi } from '/@/views/emergency/scheduling/scheduling.api';
+import { rules } from '/@/utils/helper/validator';
+import { Image } from 'ant-design-vue';
+import { getFamaleDefaultImage, getFileAccessHttpUrl } from '/@/utils/common/compUtils';
+import { EyeOutlined } from '@ant-design/icons-vue';
+import { ComponentType } from '/@/components/Form/src/types';
+
+//列表数据
+export const columns = function (showGoodAt: boolean): BasicColumn[] {
+ return [
+ {
+ title: '用户账号',
+ align: 'center',
+ width: 150,
+ fixed: 'left',
+ dataIndex: 'username',
+ },
+ {
+ title: '姓名',
+ align: 'center',
+ fixed: 'left',
+ dataIndex: 'realname',
+ },
+ {
+ title: '头像',
+ align: 'center',
+ dataIndex: 'avatar',
+ width: 100,
+ customRender: ({ text }) => {
+ const t = text ? text.replace(',', '') : null;
+ return h(Image, {
+ placeholder: true,
+ src: getFileAccessHttpUrl(t),
+ height: 50,
+ width: 50,
+ fallback: getFamaleDefaultImage(''),
+ previewMask: () => {
+ return h(EyeOutlined, {
+ style: {
+ color: 'white',
+ },
+ });
+ },
+ });
+ },
+ },
+ {
+ title: '所属应急中心',
+ align: 'center',
+ dataIndex: 'centerName',
+ },
+ {
+ title: '职称',
+ align: 'center',
+ width: 90,
+ dataIndex: 'post_dictText',
+ },
+ {
+ title: '毕业院校',
+ align: 'center',
+ dataIndex: 'school',
+ },
+ {
+ title: '学历',
+ align: 'center',
+ dataIndex: 'edu_dictText',
+ },
+ {
+ title: '擅长症状',
+ align: 'center',
+ dataIndex: 'goodAt',
+ ifShow: showGoodAt,
+ },
+ ];
+};
+//查询数据
+
+export const searchFormSchema: FormSchema[] = [
+ {
+ label: '姓名',
+ field: 'name',
+ component: 'Input',
+ },
+ {
+ label: '所属应急中心',
+ field: 'centerId',
+ component: 'ApiSelect',
+ componentProps: {
+ //@ts-ignore
+ api: allCenterApi,
+ labelField: 'centerName',
+ valueField: 'id',
+ immediate: true,
+ resultField: 'records',
+ showSearch: true,
+ filterOption: (input: string, option: any): boolean => {
+ const str: string = input?.trim()?.toLowerCase();
+ return option.label.toLowerCase().indexOf(str) >= 0;
+ },
+ getPopupContainer: () => document.body,
+ },
+ },
+];
+
+//表单数据
+// @ts-ignore
+export const formSchema = function (showGoodAt: boolean): FormSchema[] {
+ return [
+ // 主键Id
+ {
+ label: '',
+ field: 'userId',
+ show: false,
+ component: 'Input',
+ },
+ {
+ label: '用户账号',
+ field: 'username',
+ component: 'Input',
+ componentProps: ({ formModel }) => {
+ return {
+ autocomplete: 'off',
+ onInput: (event: Event) => {
+ const target = event.target;
+ formModel.username = target?.value?.replace(/[^\w]/g, '');
+ },
+ };
+ },
+ rules: [{ required: true, message: '请输入用户账号' }],
+ dynamicDisabled: ({ values }) => {
+ return !!values.userId;
+ },
+ },
+ {
+ label: '头像',
+ field: 'avatar',
+ component: 'JImageUpload',
+ required: true,
+ componentProps: () => ({
+ maxCount: 1,
+ }),
+ },
+ {
+ label: '密码',
+ field: 'password',
+ component: 'StrengthMeter',
+ componentProps: {
+ //@ts-ignore
+ autocomplete: 'new-password',
+ readOnly: true,
+ onfocus: (field) => {
+ field.target.readOnly = false;
+ },
+ },
+ dynamicRules: () => {
+ return [
+ {
+ required: true,
+ validator: (_, value) => {
+ const { message } = checkPassword(value);
+ if (message === 'ok') {
+ return Promise.resolve();
+ } else {
+ return Promise.reject(message);
+ }
+ },
+ trigger: 'blur',
+ },
+ ];
+ },
+ ifShow: ({ values }) => {
+ return !values.userId;
+ },
+ },
+ {
+ label: '确认密码',
+ field: 'confirmPassword',
+ component: 'InputPassword',
+ dynamicRules: ({ values }) => rules.confirmPassword(values, true),
+ ifShow: ({ values }) => {
+ return !values.userId;
+ },
+ },
+ {
+ label: '姓名',
+ field: 'realname',
+ component: 'Input',
+ required: true,
+ },
+ {
+ label: '所属应急中心',
+ field: 'centerId',
+ component: 'ApiSelect',
+ required: true,
+ componentProps: {
+ //@ts-ignore
+ api: getEmergencyList,
+ params: {
+ pageNo: 1,
+ pageSize: 200,
+ },
+ labelField: 'centerName',
+ valueField: 'id',
+ immediate: true,
+ resultField: 'records',
+ showSearch: true,
+ filterOption: (input: string, option: any): boolean => {
+ const str: string = input?.trim()?.toLowerCase();
+ return option.label.toLowerCase().indexOf(str) >= 0;
+ },
+ getPopupContainer: () => document.body,
+ },
+ },
+ {
+ label: '擅长症状',
+ field: 'goodAt',
+ component: 'InputTextArea',
+ required: true,
+ ifShow: showGoodAt,
+ },
+ {
+ label: '职称',
+ field: 'post',
+ component: 'JDictSelectTag',
+ componentProps: () => ({
+ dictCode: 'z_doct_lev',
+ getPopupContainer: () => document.body,
+ }),
+ required: true,
+ },
+ {
+ label: '毕业院校',
+ field: 'school',
+ component: 'Input',
+ },
+ {
+ label: '学历',
+ field: 'edu',
+ component: 'JDictSelectTag',
+ componentProps: {
+ //@ts-ignore
+ dictCode: 'education',
+ showSearch: true,
+ filterOption: (input: string, option: any): boolean => {
+ const str: string = input.trim().toLowerCase();
+ return option.label.toLowerCase().indexOf(str) >= 0;
+ },
+ getPopupContainer: () => document.body,
+ },
+ },
+ {
+ label: '人员类型',
+ field: 'type',
+ component: 'Input',
+ show: false,
+ },
+ ];
+};
+
+interface DetailForm extends FormSchema {
+ value: string;
+ customRender?: Function;
+ component: ComponentType | 'Image';
+}
+
+export function useDetailForm(showGoodAt: boolean) {
+ const detailFormSchema = ref([
+ {
+ label: '用户账号',
+ field: 'username',
+ component: 'Input',
+ value: '',
+ },
+
+ {
+ label: '姓名',
+ field: 'realname',
+ component: 'Input',
+ value: '',
+ },
+ {
+ label: '头像',
+ field: 'avatar',
+ component: 'Image',
+ value: '',
+ },
+ {
+ label: '所属应急中心',
+ field: 'centerName',
+ component: 'Input',
+ value: '',
+ },
+ {
+ label: '职称',
+ field: 'post_dictText',
+ component: 'Input',
+ value: '',
+ },
+ {
+ label: '毕业院校',
+ field: 'school',
+ component: 'Input',
+ value: '',
+ },
+ {
+ label: '学历',
+ field: 'edu_dictText',
+ component: 'Input',
+ value: '',
+ },
+ {
+ label: '擅长症状',
+ field: 'goodAt',
+ component: 'InputTextArea',
+ value: '',
+ ifShow: showGoodAt,
+ },
+ ]);
+ function setData(record: Recordable, list: DetailForm[], callback?: Function) {
+ if (callback) {
+ callback(list);
+ return;
+ }
+ list = list.filter((item) => {
+ return item.ifShow === undefined || item.ifShow;
+ });
+ list.forEach((item) => {
+ const { field } = item;
+ const isEmpty = (obj, field) => {
+ if (!obj) return true;
+ return obj[field] === undefined || obj[field] === null || obj[field] === '';
+ };
+ if (!isEmpty(record, field)) {
+ if (Object.hasOwn(item, 'customRender')) {
+ // @ts-ignore
+ item.value = item.customRender(record);
+ } else if (Object.hasOwn(item, 'slot')) {
+ //@ts-ignore
+ item.value = { ...record, dataIndex: field };
+ } else {
+ item.value = record[field] || '';
+ }
+ } else {
+ item.value = '';
+ }
+ });
+ return list;
+ }
+ function getDetailSchema() {
+ return detailFormSchema.value.filter((item) => {
+ return item.ifShow === undefined || item.ifShow;
+ });
+ }
+ function setDetailFormData(record: Recordable) {
+ //@ts-ignore
+ setData(record, getDetailSchema());
+ }
+ return {
+ detailFormSchema,
+ getDetailSchema,
+ setDetailFormData,
+ };
+}
+/**
+ * 流程表单调用这个方法获取formSchema
+ */
+export function getBpmFormSchema(): FormSchema[] {
+ // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
+ return formSchema;
+}
+
+/**
+ * @description: 人员类型
+ */
+export function getPersonType(t: string) {
+ enum PersonType {
+ 'professional' = '6', //专业人员
+ 'operation' = '5', //操作人员
+ }
+ return PersonType[t];
+}
+export const week_text = (key) => {
+ const type = {
+ 1: '星期一',
+ 2: '星期二',
+ 3: '星期三',
+ 4: '星期四',
+ 5: '星期五',
+ 6: '星期六',
+ 7: '星期日',
+ };
+ return type[key];
+};
diff --git a/src/views/system/user/personnelManagement/personnelManagement1.vue b/src/views/system/user/personnelManagement/personnelManagement1.vue
new file mode 100644
index 0000000..65f0419
--- /dev/null
+++ b/src/views/system/user/personnelManagement/personnelManagement1.vue
@@ -0,0 +1,181 @@
+
+
+
+
+
+
+ 新增
+ 批量删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/user/personnelManagement/personnelManagement2.vue b/src/views/system/user/personnelManagement/personnelManagement2.vue
new file mode 100644
index 0000000..d9330c0
--- /dev/null
+++ b/src/views/system/user/personnelManagement/personnelManagement2.vue
@@ -0,0 +1,181 @@
+
+
+
+
+
+
+ 新增
+ 批量删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/user/user.data.ts b/src/views/system/user/user.data.ts
index c05c624..499b946 100644
--- a/src/views/system/user/user.data.ts
+++ b/src/views/system/user/user.data.ts
@@ -6,6 +6,8 @@ import { Component, h } from 'vue';
import HealthUserEmployeeEx from './HealthUserEmployeeEx/HealthUserEmployeeExList.vue';
import healthExpert from '/@/views/consult/doctor/message/conDoctorList.vue';
import healthHelper from '/@/views/consult/helper/conHelperList.vue';
+import personnelManagement1 from '/@/views/system/user/personnelManagement/personnelManagement1.vue';
+import personnelManagement2 from '/@/views/system/user/personnelManagement/personnelManagement2.vue';
import { encipher } from '/@/utils/jsencrypt';
import { checkPassword } from '/@/hooks/checkPassword/checkPassword';
import { isShowIdCard } from '/@/utils/getEnv';
@@ -649,6 +651,7 @@ export interface UserType {
title: string;
component: Component;
auth?: string;
+ type?: string;
}
export const typeList: UserType[] = [
@@ -664,6 +667,20 @@ export const typeList: UserType[] = [
component: healthExpert,
auth: 'system:consultation:con_doctor:list',
},
+ {
+ key: 4,
+ title: '操作人员',
+ component: personnelManagement1,
+ auth: 'system:health_operator_ex:list',
+ type: '5',
+ },
+ {
+ key: 5,
+ title: '专业人员',
+ component: personnelManagement2,
+ auth: 'system:health_user_operator_ex:list',
+ type: '6',
+ },
{
key: 3,
title: '全科医生',