5 changed files with 847 additions and 0 deletions
@ -0,0 +1,33 @@
@@ -0,0 +1,33 @@
|
||||
import {DoctorParams,DoctorItem,DoctorItemListResult} from '/@/api/platform/system/entity/doctorModel'; |
||||
import { defHttp } from '/@/utils/http/axios'; |
||||
import {isDef} from '/@/utils/is'; |
||||
|
||||
|
||||
|
||||
|
||||
enum Api { |
||||
QueryById = '/system_proxy/system/doctor/query', |
||||
list = '/system_proxy/system/doctor/list', |
||||
add = '/system_proxy/system/doctor/add', |
||||
edit = '/system_proxy/system/doctor/update', |
||||
del = '/system_proxy/system/doctor/remove', |
||||
get = '/system_proxy/system/doctor' |
||||
} |
||||
|
||||
export const queryById = (params: { id: String }) => |
||||
defHttp.get<DoctorItem>({url: Api.QueryById + `/${params.id}`}); |
||||
|
||||
/** 查询医生列表 */ |
||||
export const listReport = (params?: Partial<DoctorItem>) => defHttp.get<DoctorItemListResult>({ url: Api.list, params }, { isReturnResultResponse: true }); |
||||
|
||||
/** 新增医生*/ |
||||
export const addReport = (params: Partial<DoctorParams>) => defHttp.post({ url: Api.add, data: params }); |
||||
|
||||
/** 修改医生 */ |
||||
export const editReport = (params: Partial<DoctorParams>) => defHttp.put({ url: Api.edit, data: params }); |
||||
|
||||
/** 查询医生详细 */ |
||||
export const getReport = (id: string) => defHttp.get<DoctorItem>({ url: `${Api.get}/${id}` }); |
||||
|
||||
/** 删除医生 */ |
||||
export const delReport = (id: string) => defHttp.delete({ url: `${Api.del}/${id}` }); |
@ -0,0 +1,49 @@
@@ -0,0 +1,49 @@
|
||||
// 引入基础包
|
||||
import type { R } from '/#/axios'; |
||||
import type { Page } from '/@/api/common/data/entity'; |
||||
|
||||
export type DoctorParams = { |
||||
name?: string; |
||||
beginTime?: string; |
||||
endTime?: string; |
||||
} & Page; |
||||
|
||||
|
||||
export interface DoctorItem { |
||||
|
||||
/**医生ID*/ |
||||
id: string; |
||||
/**医生姓名*/ |
||||
name: string; |
||||
/**医生职称*/ |
||||
title: string; |
||||
/**医生性别*/ |
||||
sex: string; |
||||
/**医生电话*/ |
||||
phone: string; |
||||
/**医生邮箱*/ |
||||
email: string; |
||||
/**地址(门牌号)*/ |
||||
detailAddress: string; |
||||
/**组织类型*/ |
||||
organType: string; |
||||
/**组织id*/ |
||||
organId: string; |
||||
/**组织名称*/ |
||||
organName: string; |
||||
/**科室ID*/ |
||||
officeId: string; |
||||
/**科室名称*/ |
||||
officeName: string; |
||||
/**医生状态*/ |
||||
status: string; |
||||
|
||||
createById: string; |
||||
|
||||
createByName: string; |
||||
|
||||
createTime: string; |
||||
|
||||
} |
||||
|
||||
export type DoctorItemListResult = R<DoctorItem>; |
@ -0,0 +1,79 @@
@@ -0,0 +1,79 @@
|
||||
<template> |
||||
<BasicModal v-bind="$attrs" |
||||
width="720px" |
||||
@register="registerModal" |
||||
@ok="handleSubmit" |
||||
> |
||||
<BasicForm @register="registerForm"/> |
||||
</BasicModal> |
||||
</template> |
||||
<script lang="ts" setup> |
||||
/** |
||||
* 提供模板规范代码参考,请尽量保证编写代码风格跟模板规范代码一致 |
||||
* 采用vben-动态表格表单封装组件编写,采用 setup 写法 |
||||
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved. |
||||
* author entfrm开发团队-王翔 |
||||
*/ |
||||
import { ref, unref } from 'vue'; |
||||
import { BasicForm, useForm } from '/@/components/Form/index'; |
||||
import { doctorFormSchema } from './report.data'; |
||||
import {addReport, delReport,getReport,editReport} from '/@/api/platform/system/controller/report'; |
||||
import { BasicModal, ModalProps, useModalInner } from '/@/components/Modal'; |
||||
import { isEmpty } from '/@/utils/is'; |
||||
|
||||
/** 通用变量统一声明区域 */ |
||||
const tag = ref<Nullable<string>>(''); |
||||
/** https://v3.cn.vuejs.org/api/options-data.html#emits */ |
||||
const emit = defineEmits(['success', 'register']); |
||||
const [registerForm, { resetFields, setFieldsValue, validate, clearValidate, updateSchema }] = useForm({ |
||||
labelWidth: 100, |
||||
schemas: doctorFormSchema, |
||||
showActionButtonGroup: false, |
||||
baseColProps: { span: 24 } |
||||
}); |
||||
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data: WindowInnerData = { _tag: '' }) => { |
||||
// 处理清除脏数据 |
||||
await resetFields(); |
||||
await clearValidate(); |
||||
// 处理设置数据 |
||||
tag.value = data._tag; |
||||
const id = data.record?.id; |
||||
const props: Partial<ModalProps> = { confirmLoading: false }; |
||||
// 采用tag标签区分操作 |
||||
switch (unref(tag)) { |
||||
case 'add': |
||||
props.title = '医生'; |
||||
break; |
||||
case 'edit': |
||||
props.title = '编辑医生'; |
||||
await setFieldsValue(await getReport(id)); |
||||
break; |
||||
} |
||||
// 尾部:设置处理后的最终配置数据 |
||||
setModalProps(props); |
||||
}); |
||||
|
||||
/** 处理弹出框提交 */ |
||||
async function handleSubmit() { |
||||
try { |
||||
// 提取验证数据 |
||||
const formData = await validate(); |
||||
// 处理提交之前逻辑 |
||||
setModalProps({ confirmLoading: true }); |
||||
// 采用tag标签区分操作 |
||||
switch (unref(tag)) { |
||||
case 'add': |
||||
await addReport(formData); |
||||
break; |
||||
case 'edit': |
||||
await editReport(formData); |
||||
break; |
||||
} |
||||
// 处理提交完成之后逻辑 |
||||
closeModal(); |
||||
emit('success'); |
||||
} finally { |
||||
setModalProps({ confirmLoading: false }); |
||||
} |
||||
} |
||||
</script> |
@ -0,0 +1,256 @@
@@ -0,0 +1,256 @@
|
||||
<template> |
||||
<div> |
||||
<BasicTable @register="registerTable" |
||||
@selection-change="handleSelectionChange" |
||||
> |
||||
<template #tableTitle> |
||||
<a-button |
||||
type="primary" |
||||
preIcon="ant-design:plus-outlined" |
||||
@click="handleAdd()" |
||||
>新增</a-button> |
||||
<a-button |
||||
preIcon="ant-design:plus-outlined" |
||||
type="primary" |
||||
@click="handleAdd()" |
||||
>批量新增</a-button> |
||||
<a-button type="primary" |
||||
preIcon="ant-design:upload-outlined" |
||||
@click="handleClickMergeUpload()" |
||||
>合并上传</a-button> |
||||
<a-button type="primary" |
||||
preIcon="ant-design:user-outlined" |
||||
@click="handleClickBatchCollect()" |
||||
>设置收样员</a-button> |
||||
<a-button type="primary" |
||||
preIcon="ant-design:printer-outlined" |
||||
@click="handleClickBatchPrint()" |
||||
>批量打印</a-button> |
||||
<a-button type="primary" |
||||
preIcon="ant-design:download-outlined" |
||||
@click="handleClickBatchDownload()" |
||||
>批量下载</a-button> |
||||
<a-button type="primary" |
||||
preIcon="ant-design:export-outlined" |
||||
@click="handleClickExport(0)" |
||||
>导出</a-button> |
||||
<a-button preIcon="ant-design:export-outlined" |
||||
type="primary" |
||||
@click="handleClickExport(1)" |
||||
>合并导出</a-button> |
||||
<a-button type="primary" |
||||
preIcon="ant-design:export-outlined" |
||||
@click="handleClickExportPreCode()" |
||||
>导出预制码</a-button> |
||||
</template> |
||||
<template #action="{ record }"> |
||||
<TableAction :dropDownActions="getDropDownAction(record)"/> |
||||
</template> |
||||
</BasicTable> |
||||
<!--弹出窗体区域--> |
||||
<ReportModal @register="registerModal" @success="handleRefreshTable"/> |
||||
</div> |
||||
</template> |
||||
|
||||
<script lang="ts" setup> |
||||
/** |
||||
* 提供模板规范代码参考,请尽量保证编写代码风格跟模板规范代码一致 |
||||
* 采用vben-动态表格表单封装组件编写,采用 setup 写法 |
||||
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved. |
||||
* author entfrm开发团队-王翔 |
||||
*/ |
||||
import { reactive, ref, toRaw } from 'vue'; |
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table'; |
||||
import {listReport, delReport} from '/@/api/platform/system/controller/report'; |
||||
import { useModal } from '/@/components/Modal'; |
||||
import { columns, searchFormSchema } from './report.data'; |
||||
import { useMessage } from '/@/hooks/web/useMessage'; |
||||
import ReportModal from './ReportModal.vue'; |
||||
import { useDrawer } from '/@/components/Drawer'; |
||||
const showFooter = ref(true); |
||||
|
||||
/** 类型规范统一声明定义区域 */ |
||||
interface TableState { |
||||
single: boolean; |
||||
multiple: boolean; |
||||
} |
||||
|
||||
/** 通用变量统一声明区域 */ |
||||
const state = reactive<TableState>({ |
||||
// 非单个禁用 |
||||
single: true, |
||||
// 非多个禁用 |
||||
multiple: true |
||||
}); |
||||
const { createConfirm, createMessage } = useMessage(); |
||||
const [registerModal, { openModal }] = useModal(); |
||||
const [rolePermissionDrawer, { openDrawer: openRolePermissionDrawer }] = useDrawer(); |
||||
const [registerTable, { reload, clearSelectedRowKeys, getSelectRowKeys }] = useTable({ |
||||
api: listReport, |
||||
rowKey: 'id', |
||||
columns, |
||||
formConfig: { |
||||
labelWidth: 120, |
||||
schemas: searchFormSchema, |
||||
autoSubmitOnEnter: true, |
||||
fieldMapToTime: [['dateRange', ['beginTime', 'endTime'], 'YYYY-MM-DD']] |
||||
}, |
||||
rowSelection: { type: 'checkbox' }, |
||||
useSearchForm: true, |
||||
showTableSetting: true, |
||||
bordered: true, |
||||
clickToRowSelect: false, |
||||
showIndexColumn: false, |
||||
actionColumn: { |
||||
width: 220, |
||||
title: '操作', |
||||
dataIndex: 'action', |
||||
slots: { customRender: 'action' }, |
||||
fixed: false |
||||
}, |
||||
handleSearchInfoFn: () => clearSelectedRowKeys() |
||||
}); |
||||
|
||||
/** 处理多选框选中数据 */ |
||||
function handleSelectionChange(selection?: Recordable) { |
||||
const rowSelection = toRaw(selection?.keys) || []; |
||||
state.single = rowSelection.length != 1; |
||||
state.multiple = !rowSelection.length; |
||||
} |
||||
|
||||
/** 新增按钮操作,行内新增与工具栏局域新增通用 */ |
||||
function handleAdd() { |
||||
openModal(true,{ _tag: 'add' }); |
||||
} |
||||
|
||||
/** 编辑按钮操作,行内编辑 */ |
||||
function handleEdit(record?: Recordable) { |
||||
record = record || { id: getSelectRowKeys() }; |
||||
openModal(true, { _tag: 'edit', record }); |
||||
} |
||||
|
||||
/** 删除按钮操作,行内删除 */ |
||||
async function handleDel(record?: Recordable) { |
||||
const id = record?.id || getSelectRowKeys(); |
||||
createConfirm({ |
||||
iconType: 'warning', |
||||
title: '警告', |
||||
content: `是否确认删除医生编号为${id}医生吗?`, |
||||
onOk: async () => { |
||||
await delReport(id); |
||||
createMessage.success('删除成功!'); |
||||
handleRefreshTable(); |
||||
} |
||||
}); |
||||
} |
||||
|
||||
/**编辑*/ |
||||
function handleClickEditor(record) { |
||||
|
||||
} |
||||
/**收取*/ |
||||
function handleClickCollect(record) { |
||||
|
||||
} |
||||
/**送达*/ |
||||
function handleClickDelivered(record){ |
||||
|
||||
} |
||||
/**确认收到*/ |
||||
function handleClickReceived(record){ |
||||
|
||||
} |
||||
/**上传结果*/ |
||||
function handleClickUpload(record) { |
||||
|
||||
} |
||||
/**查看病情*/ |
||||
function handleClickPatientDetail(record){ |
||||
|
||||
} |
||||
/**上传病情*/ |
||||
function handleClickHealthUpload(record) { |
||||
|
||||
} |
||||
/**联系医生*/ |
||||
function handleClickLinkDoctor(record) { |
||||
|
||||
} |
||||
/**合并上传*/ |
||||
function handleClickMergeUpload() { |
||||
|
||||
} |
||||
/**设置收样员*/ |
||||
function handleClickBatchCollect() { |
||||
|
||||
} |
||||
/**批量打印*/ |
||||
function handleClickBatchPrint() { |
||||
|
||||
} |
||||
/**批量下载*/ |
||||
function handleClickBatchDownload() { |
||||
|
||||
} |
||||
/**导出*/ |
||||
function handleClickExport() { |
||||
|
||||
} |
||||
/**导出预制码*/ |
||||
function handleClickExportPreCode() { |
||||
|
||||
} |
||||
function getDropDownAction(record) { |
||||
return [ |
||||
{ |
||||
label: '查看', |
||||
onClick: handleEdit.bind(null, record), |
||||
}, |
||||
{ |
||||
label: '编辑', |
||||
onClick: handleClickEditor.bind(null, record), |
||||
}, |
||||
{ |
||||
label: '收取', |
||||
onClick: handleClickCollect.bind(null, record), |
||||
}, |
||||
{ |
||||
label: '送达', |
||||
onClick: handleClickDelivered.bind(null, record), |
||||
}, |
||||
{ |
||||
label: '确认收到', |
||||
onClick: handleClickReceived.bind(null, record), |
||||
}, |
||||
{ |
||||
label: '添加项目', |
||||
onClick: handleAdd.bind(null, record), |
||||
}, |
||||
{ |
||||
label: '上传结果', |
||||
onClick: handleClickUpload.bind(null, record), |
||||
}, |
||||
{ |
||||
label: '查看病情', |
||||
onClick: handleClickPatientDetail.bind(null, record), |
||||
}, |
||||
{ |
||||
label: '上传病情', |
||||
onClick: handleClickHealthUpload.bind(null, record), |
||||
}, |
||||
{ |
||||
label: '联系医生', |
||||
onClick: handleClickLinkDoctor.bind(null, record), |
||||
}, |
||||
{ |
||||
label: '删除', |
||||
onClick: handleDel.bind(null, record), |
||||
}, |
||||
]; |
||||
} |
||||
/** 处理表格刷新 */ |
||||
function handleRefreshTable() { |
||||
clearSelectedRowKeys(); |
||||
reload(); |
||||
} |
||||
</script> |
@ -0,0 +1,430 @@
@@ -0,0 +1,430 @@
|
||||
import { BasicColumn } from '/@/components/Table'; |
||||
import { FormSchema } from '/@/components/Table'; |
||||
|
||||
export const columns: BasicColumn[] = [ |
||||
{ |
||||
title: '序号', |
||||
dataIndex: 'id', |
||||
width: 120, |
||||
}, |
||||
{ |
||||
title: '送检时间', |
||||
dataIndex: 'name', |
||||
width: 120, |
||||
}, |
||||
{ |
||||
title: '编号', |
||||
dataIndex: 'title', |
||||
width: 120, |
||||
}, |
||||
{ |
||||
title: '姓名-性别-年龄', |
||||
dataIndex: 'sex', |
||||
width: 120, |
||||
}, |
||||
{ |
||||
title: '医院-科室-医生', |
||||
dataIndex: 'phone', |
||||
width: 120, |
||||
}, |
||||
{ |
||||
title: '医检机构', |
||||
dataIndex: 'email', |
||||
width: 120, |
||||
}, |
||||
{ |
||||
title: '平台/医检条码号', |
||||
dataIndex: 'detailAddress', |
||||
width: 120, |
||||
}, |
||||
{ |
||||
title: '送检项目', |
||||
dataIndex: 'organType', |
||||
width: 120, |
||||
|
||||
}, |
||||
{ |
||||
title: '检测/打印', |
||||
dataIndex: 'officeName', |
||||
width: 120, |
||||
}, |
||||
{ |
||||
title: '报告时间', |
||||
dataIndex: 'status', |
||||
width: 100, |
||||
|
||||
}, |
||||
{ |
||||
title: '收样员', |
||||
dataIndex: 'createByName', |
||||
width: 180, |
||||
}, |
||||
{ |
||||
title: '创建人', |
||||
dataIndex: 'createTime', |
||||
width: 180, |
||||
}, |
||||
{ |
||||
title: '创建时间', |
||||
dataIndex: 'createTime', |
||||
width: 180, |
||||
}, |
||||
{ |
||||
title: '上机状态', |
||||
dataIndex: 'createTime', |
||||
width: 180, |
||||
}, |
||||
{ |
||||
title: '最新打印时间', |
||||
dataIndex: 'createTime', |
||||
width: 180, |
||||
} |
||||
]; |
||||
|
||||
export const searchFormSchema: FormSchema[] = [ |
||||
{ |
||||
field: 'name', |
||||
label: ' ', |
||||
component: 'Input', |
||||
componentProps: { |
||||
placeholder: '平台/医检条码号', |
||||
}, |
||||
colProps: { span: 5 }, |
||||
}, |
||||
{ |
||||
field: 'organType', |
||||
label: ' ', |
||||
component: 'Input', |
||||
componentProps: { |
||||
placeholder: '送检项目', |
||||
}, |
||||
colProps: {span: 5} |
||||
}, |
||||
{ |
||||
field: 'organType', |
||||
label: ' ', |
||||
component: 'Input', |
||||
componentProps: { |
||||
placeholder: '患者姓名/手机/身份证' |
||||
}, |
||||
colProps: { span: 5 } |
||||
}, |
||||
{ |
||||
field: 'status', |
||||
label: ' ', |
||||
component: 'Select', |
||||
componentProps: { |
||||
placeholder: '收样员姓名', |
||||
}, |
||||
colProps: {span: 5} |
||||
}, |
||||
{ |
||||
field: 'createByName', |
||||
label: ' ', |
||||
component: 'Select', |
||||
componentProps: { |
||||
placeholder: '医院名称', |
||||
}, |
||||
colProps: {span: 5} |
||||
}, |
||||
{ |
||||
field: 'detailAddress', |
||||
label: ' ', |
||||
component: 'Select', |
||||
componentProps: { |
||||
placeholder: '科室名称', |
||||
}, |
||||
colProps: {span: 5} |
||||
}, |
||||
{ |
||||
field: 'officeName', |
||||
label: ' ', |
||||
component: 'Select', |
||||
componentProps: { |
||||
placeholder: '医生名称', |
||||
}, |
||||
colProps: {span: 5} |
||||
}, |
||||
{ |
||||
field: 'email', |
||||
label: ' ', |
||||
component: 'Select', |
||||
componentProps: { |
||||
placeholder: '医检名称', |
||||
}, |
||||
colProps: {span: 5} |
||||
}, |
||||
{ |
||||
field: 'phone', |
||||
label: ' ', |
||||
component: 'Select', |
||||
componentProps: { |
||||
options:[ |
||||
{label: '未收取',value:'0'}, |
||||
{label: '已收取',value:'5'}, |
||||
{label: '已送达',value:'10'}, |
||||
{label: '已收到',value:'12'}, |
||||
{label: '检测中',value:'15'}, |
||||
{label: '已出部分结果',value:'17'}, |
||||
{label: '已出结果',value:'20'}, |
||||
], |
||||
placeholder: '报告单状态', |
||||
}, |
||||
colProps: {span: 5} |
||||
}, |
||||
{ |
||||
field: 'sex', |
||||
label: ' ', |
||||
component: 'Select', |
||||
componentProps: { |
||||
options:[ |
||||
{label: '检测中',value:'0'}, |
||||
{label: '已出结果',value:'1'}, |
||||
], |
||||
placeholder: '结果状态', |
||||
}, |
||||
colProps: {span: 5} |
||||
}, |
||||
{ |
||||
field: 'card', |
||||
label: ' ', |
||||
component: 'Select', |
||||
componentProps: { |
||||
options:[ |
||||
{label: '未打印',value:'0'}, |
||||
{label: '已打印',value:'1'}, |
||||
], |
||||
placeholder: '打印状态', |
||||
}, |
||||
colProps: {span: 5} |
||||
}, |
||||
{ |
||||
field: 'dateRange', |
||||
label: ' ', |
||||
component: 'RangePicker', |
||||
componentProps: { |
||||
|
||||
valueFormat: 'YYYY-MM-DD', |
||||
placeholder: ['送检开始日期','送检结束日期'] |
||||
}, |
||||
colProps: { span: 5 } |
||||
}, |
||||
{ |
||||
field: 'contactsName', |
||||
label: ' ', |
||||
component: 'Select', |
||||
componentProps: { |
||||
options:[ |
||||
{label: '条码号异常',value:'1'}, |
||||
{label: '姓名/身份证异常',value:'2'}, |
||||
{label: '年龄/性别异常',value: '3'}, |
||||
{label: '多条结果',value: '4'}, |
||||
{label: '报告单结果未全出',value: '7'}, |
||||
{label: '认证错误',value: '8'} |
||||
], |
||||
placeholder: '异常状态', |
||||
}, |
||||
colProps: {span: 5} |
||||
}, |
||||
{ |
||||
field: 'contactsTel', |
||||
label: ' ', |
||||
component: 'Input', |
||||
componentProps: { |
||||
placeholder: '采样编号', |
||||
}, |
||||
colProps: {span: 5} |
||||
}, |
||||
{ |
||||
field: 'contactsTitle', |
||||
label: ' ', |
||||
component: 'Select', |
||||
defaultValue: '1', |
||||
componentProps: { |
||||
options:[ |
||||
{label: '正常',value:'1'}, |
||||
{label: '已删除',value:'-1'}, |
||||
], |
||||
placeholder: '状态', |
||||
}, |
||||
colProps: {span: 5} |
||||
}, |
||||
]; |
||||
|
||||
export const doctorFormSchema: FormSchema[] = [ |
||||
{ |
||||
field: 'id', |
||||
label: '医院名称', |
||||
component: 'Select', |
||||
componentProps:{ |
||||
|
||||
}, |
||||
required: true, |
||||
}, |
||||
{ |
||||
field: 'name', |
||||
label: '科室名称', |
||||
component: 'Select', |
||||
componentProps:{ |
||||
|
||||
}, |
||||
required: true |
||||
}, |
||||
{ |
||||
field: 'title', |
||||
label: '医生名称', |
||||
component: 'Select', |
||||
componentProps:{ |
||||
|
||||
}, |
||||
required: true, |
||||
}, |
||||
{ |
||||
field: 'title', |
||||
label: '项目名称', |
||||
component: 'Input', |
||||
required: true, |
||||
}, |
||||
{ |
||||
field: 'title', |
||||
label: '医院项目', |
||||
component: 'Select', |
||||
componentProps:{ |
||||
|
||||
}, |
||||
required: true, |
||||
}, |
||||
{ |
||||
field: 'title', |
||||
label: '医检名称', |
||||
component: 'Select', |
||||
componentProps:{ |
||||
|
||||
}, |
||||
required: true, |
||||
}, |
||||
{ |
||||
field: 'title', |
||||
label: '科室名称', |
||||
component: 'Select', |
||||
componentProps:{ |
||||
|
||||
}, |
||||
required: true, |
||||
}, |
||||
{ |
||||
field: 'title', |
||||
label: '患者姓名', |
||||
component: 'Input', |
||||
required: true, |
||||
}, |
||||
{ |
||||
field: 'sex', |
||||
label: '患者性别', |
||||
component: 'Select', |
||||
required: false, |
||||
defaultValue: 'M', |
||||
componentProps: { |
||||
options: [ |
||||
{ label: '男', value: 'M' }, |
||||
{ label: '女', value: 'F' }, |
||||
] |
||||
} |
||||
}, |
||||
{ |
||||
field: 'phone', |
||||
label: '医生电话', |
||||
component: 'Input', |
||||
rules: [ |
||||
{ |
||||
pattern: new RegExp('^1[3|4|5|6|7|8|9][0-9]\\d{8}$'), |
||||
message: '请输入正确的手机号', |
||||
validateTrigger: 'change', |
||||
required: true |
||||
} |
||||
], |
||||
}, |
||||
{ |
||||
field: 'email', |
||||
label: '医生邮箱', |
||||
component: 'Input', |
||||
rules: [ |
||||
{ |
||||
type: 'email', |
||||
message: '请输入正确的邮箱', |
||||
validateTrigger: 'change', |
||||
required: true |
||||
} |
||||
], |
||||
}, |
||||
{ |
||||
field: 'detailAddress', |
||||
label: '地址', |
||||
component: 'Input', |
||||
required: false, |
||||
}, |
||||
{ |
||||
field: 'organType', |
||||
label: '所属组织类型', |
||||
component: 'Select', |
||||
componentProps: { |
||||
options: [ |
||||
{ label: '医院', value: '1' }, |
||||
{ label: '医检', value: '2' } |
||||
] |
||||
}, |
||||
required: true, |
||||
}, |
||||
// {
|
||||
// field: 'organId',
|
||||
// label: '所属组织',
|
||||
// component: 'ApiSelect',
|
||||
// required: true,
|
||||
// renderComponentContent: ({ schema, values, model, field }) => {
|
||||
// const organType = model.organType;
|
||||
// watch(organType,
|
||||
// () => {
|
||||
// const dataApi = organType=='1' ? hospitalList : institutionList;
|
||||
// console.log(schema);
|
||||
// schema.componentProps = deepMerge({
|
||||
// api: dataApi,
|
||||
// labelField: 'name',
|
||||
// valueField: 'id'
|
||||
// });
|
||||
// },
|
||||
// {
|
||||
// immediate: true,
|
||||
// }
|
||||
// );
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// field: 'officeId',
|
||||
// label: '所属科室',
|
||||
// component: 'ApiSelect',
|
||||
// componentProps: {
|
||||
// mode: 'multiple',
|
||||
// resultField: 'list',
|
||||
// labelField: 'name',
|
||||
// valueField: 'id',
|
||||
// api: officeList,
|
||||
// },
|
||||
// },
|
||||
{ |
||||
field: 'status', |
||||
label: '状态', |
||||
component: 'RadioButtonGroup', |
||||
defaultValue: '0', |
||||
componentProps: { |
||||
options: [ |
||||
{ label: '启用', value: '0' }, |
||||
{ label: '禁用', value: '1' }, |
||||
], |
||||
}, |
||||
}, |
||||
{ |
||||
label: '备注', |
||||
field: 'remarks', |
||||
component: 'InputTextArea', |
||||
} |
||||
]; |
Loading…
Reference in new issue