| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257 |
- import { BasicColumn, FormSchema } from '/@/components/Table';
- import { listDictModel } from '@/api/common';
- // export const BasicWeek = [
- // {
- // field: 'monday',
- // label: '星期一',
- // },
- // {
- // field: 'tuesday',
- // label: '星期二',
- // },
- // {
- // field: 'wednesday',
- // label: '星期三',
- // },
- // {
- // field: 'thursday',
- // label: '星期四',
- // },
- // {
- // field: 'friday',
- // label: '星期五',
- // },
- // {
- // field: 'saturday',
- // label: '星期六',
- // },
- // {
- // field: 'sunday',
- // label: '星期日',
- // },
- // ];
- export enum BasicWeekEnum {
- monday = '星期一',
- monday_field = 'monday',
- tuesday = '星期二',
- tuesday_field = 'tuesday',
- wednesday = '星期三',
- wednesday_field = 'wednesday',
- thursday = '星期四',
- thursday_field = 'thursday',
- friday = '星期五',
- friday_field = 'friday',
- saturday = '星期六',
- saturday_field = 'saturday',
- sunday = '星期日',
- sunday_field = 'sunday',
- }
- export const BasicTab = [
- {
- key: '0',
- label: '全部',
- value: 0,
- hasValue: true,
- hasBracket: true,
- },
- {
- key: '1',
- label: '新患者',
- value: 12,
- hasValue: true,
- prefixColor: '#1BC1B3',
- // valueColor: 'red',
- hasBracket: true,
- },
- {
- key: '2',
- label: '无排班患者',
- value: 0,
- hasValue: true,
- prefixColor: '#F7B500',
- hasBracket: true,
- },
- ];
- export const BasicTabActive = BasicTab[0].key;
- export const columns: BasicColumn[] = [
- {
- title: '编号',
- dataIndex: 'patientUniqueNo',
- align: 'left',
- width: 160,
- },
- {
- title: '姓名',
- dataIndex: 'patientName',
- align: 'left',
- width: 120,
- },
- {
- title: '性别',
- dataIndex: 'patientGender',
- align: 'left',
- width: 80,
- },
- {
- title: '年龄',
- dataIndex: 'age',
- align: 'left',
- width: 80,
- },
- {
- title: '建档时间',
- dataIndex: 'archivesCreateTime',
- align: 'left',
- width: 200,
- },
- {
- title: '类型',
- dataIndex: 'patientType',
- align: 'left',
- width: 100,
- },
- {
- title: '透析机器',
- dataIndex: 'machine',
- align: 'left',
- width: 130,
- },
- {
- title: '透析频率',
- dataIndex: 'frequency',
- align: 'left',
- width: 120,
- },
- {
- title: '特殊时间需求',
- dataIndex: 'specialNeed',
- align: 'left',
- // width: 300,
- ellipsis: true,
- },
- ];
- // 表单新增编辑
- export const dataFormSchema: FormSchema[] = [
- {
- label: '编号',
- field: 'patientUniqueNo',
- component: 'PlainText',
- },
- {
- label: '建档时间',
- field: 'archivesCreateTime',
- component: 'PlainText',
- },
- {
- label: '类型',
- field: 'patientType',
- component: 'ApiSelect',
- componentProps: {
- api: listDictModel,
- params: {
- dictCode: 'pb_type',
- },
- disabled: true,
- },
- },
- {
- label: '透析机器',
- field: 'machine',
- component: 'ApiCheckboxGroup',
- componentProps: {
- api: listDictModel,
- params: {
- dictCode: 'bm_pump',
- },
- },
- },
- {
- field: 'frequency',
- label: '透析频次(次/周)',
- component: 'ApiInputDict',
- componentProps: ({ formModel }) => {
- return {
- api: listDictModel,
- params: {
- dictCode: 'sp_week',
- dictSort: true,
- },
- onChange: e => {
- console.log('🚀 ~ file: data.ts:81 ~ e:', e);
- return (formModel['frequency'] = e);
- },
- };
- },
- },
- {
- label: '特殊时间需求',
- field: 'special',
- component: 'RadioGroup',
- componentProps: {
- options: [
- { label: '无', value: 0 },
- { label: '有', value: 1 },
- ],
- },
- },
- {
- label: '期望周次',
- field: 'specialNeedWeek',
- required: true,
- component: 'CheckboxGroup',
- componentProps: {
- options: [
- {
- label: '第一班',
- value: '1',
- },
- {
- label: '第二班',
- value: '2',
- },
- {
- label: '第三班',
- value: '3',
- },
- ],
- },
- show: ({ values }) => {
- return values.special == 1;
- },
- colProps: {
- span: 24,
- },
- },
- {
- label: '期望班次',
- field: 'sailingSorts',
- required: true,
- component: 'CheckboxGroup',
- componentProps: {
- options: [
- {
- label: '第一班',
- value: '1',
- },
- {
- label: '第二班',
- value: '2',
- },
- {
- label: '第三班',
- value: '3',
- },
- ],
- },
- show: ({ values }) => {
- return values.special == 1;
- },
- colProps: {
- span: 24,
- },
- },
- ];
|