| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275 |
- import { BasicColumn } from '/@/components/Table';
- import { FormSchema } from '/@/components/Form';
- import { radioBoolean } from '/@/utils/filters';
- import { listDictModel } from '/@/api/common';
- import { ColorEnum } from '@/enums/colorEnum';
- export enum TitleEnum {
- finish = '已完成',
- finishColor = ColorEnum.MUTED,
- finishBg = ColorEnum.MUTED_BG,
- printable = '可打印',
- printableColor = ColorEnum.SUCCESS,
- printableBg = ColorEnum.SUCCESS_BG,
- unWeighed = '未称量',
- unWeighedColor = ColorEnum.PRIMARY,
- unWeighedBg = ColorEnum.PRIMARY_BG,
- unconfirmed = '待确认',
- unconfirmedColor = ColorEnum.WARNING,
- unconfirmedBg = ColorEnum.WARNING_BG,
- }
- export const dataFormSchema: FormSchema[] = [
- {
- field: 'PlainTitle',
- component: 'PlainTitle',
- defaultValue: '检测时间',
- colProps: {
- span: 24,
- },
- },
- {
- field: 'PlainText',
- component: 'RadioDescGroup',
- label: '1、干体重在过去3~6个月总的变化',
- componentProps: {
- options: [
- { label: '干体重没有减少或体重丢失 <0.5kg (0分)', value: 0 },
- { label: '体重丢失 ≥0.5kg,但 <1kg (1分)', value: 1 },
- ],
- },
- colProps: {
- span: 24,
- },
- defaultValue: 1,
- },
- {
- field: 'configName',
- label: '参数名称',
- labelColor: '#818694',
- component: 'Input',
- componentProps: {
- placeholder: '请输入参数名称',
- extra: '123123',
- },
- },
- {
- field: 'configName1',
- label: '参数名称',
- labelColor: '#818694',
- component: 'Input',
- componentProps: {
- placeholder: '请输入参数名称',
- extra: '123123',
- },
- },
- {
- field: 'configName22',
- label: '参数名称',
- labelColor: '#818694',
- component: 'Input',
- componentProps: {
- placeholder: '请输入参数名称',
- extra: '123123',
- },
- },
- {
- field: 'configName333',
- label: '有无异常',
- component: 'ApiComplex',
- componentProps: ({ formModel }) => {
- return {
- placeholder: '请输入异常内容',
- api: listDictModel,
- params: {
- dictCode: 'sys_dict_type',
- },
- onChange: e => {
- console.log('🚀 ~ file: data.ts:81 ~ e:', e);
- return (formModel['configName333'] = e);
- },
- };
- },
- },
- {
- field: 'configKey',
- label: '参数键名',
- labelColor: '#81869 4',
- subLabel: '测试',
- subLabelColor: '#FF5D39',
- component: 'Input',
- required: true,
- componentProps: {
- placeholder: '请输入参数键名',
- // style: { width: '200px' },
- },
- },
- {
- field: 'configValue',
- label: '参数键值',
- component: 'InputNumberGroup',
- componentProps: ({ formModel }) => {
- return {
- options: [
- { min: 0, max: 200, placeholder: '最小值 0', field: 'min' },
- { min: 0, max: 200, placeholder: '最大值 200', field: 'max' },
- ],
- onChange: e => {
- return (formModel['configValue'] = e);
- },
- };
- },
- },
- {
- field: 'idCard',
- label: '证件号码',
- component: 'ApiInputDict',
- componentProps: ({ formModel }) => {
- return {
- placeholder: '请输入异常内容',
- api: listDictModel,
- params: {
- dictCode: 'sys_dict_type',
- dictSort: true,
- },
- onChange: e => {
- console.log('🚀 ~ file: data.ts:81 ~ e:', e);
- return (formModel['idCard'] = e);
- },
- };
- },
- },
- {
- field: 'sort',
- label: '排序',
- component: 'InputNumber',
- required: true,
- defaultValue: '1',
- componentProps: {
- placeholder: '请输入排序',
- min: 1,
- },
- },
- {
- field: 'sysInner',
- label: '系统内置',
- component: 'RadioGroup',
- componentProps: {
- options: radioBoolean,
- disabled: true,
- },
- defaultValue: '1',
- },
- {
- field: 'apiCheck',
- label: '系统内置',
- component: 'ApiCheckboxGroup',
- componentProps: {
- api: listDictModel,
- params: {
- dictCode: 'bm_pump',
- },
- },
- // defaultValue: ['pump_single'],
- },
- // {
- // field: 'disable',
- // label: '状态',
- // component: 'RadioGroup',
- // required: true,
- // componentProps: {
- // options: radioSwitch,
- // },
- // defaultValue: '0',
- // },
- {
- label: '备注',
- field: 'remark',
- component: 'InputTextArea',
- componentProps: {
- placeholder: '请输入备注',
- },
- },
- ];
- export const columns: BasicColumn[] = [
- {
- title: '名称',
- dataIndex: 'name',
- width: 100,
- edit: true,
- editable: true,
- editComponent: 'Input',
- },
- {
- title: '类型',
- dataIndex: 'type',
- width: 150,
- },
- {
- title: '联系人',
- dataIndex: 'contractUser',
- width: 150,
- },
- {
- title: '联系人电话',
- dataIndex: 'contactMobile',
- width: 150,
- },
- {
- title: '名称',
- dataIndex: 'name',
- width: 100,
- },
- {
- title: '类型',
- dataIndex: 'type',
- width: 150,
- },
- {
- title: '联系人',
- dataIndex: 'contractUser',
- width: 150,
- },
- {
- title: '联系人电话',
- dataIndex: 'contactMobile',
- width: 150,
- },
- {
- title: '管理账号',
- dataIndex: 'username',
- width: 150,
- },
- {
- title: '套餐名称',
- dataIndex: 'packageName',
- width: 150,
- },
- {
- title: '联系人',
- dataIndex: 'contractUser',
- width: 150,
- },
- {
- title: '联系人电话',
- dataIndex: 'contactMobile',
- width: 150,
- },
- {
- title: '管理账号',
- dataIndex: 'username',
- width: 150,
- },
- {
- title: '套餐名称',
- dataIndex: 'packageName',
- width: 150,
- fixed: 'right',
- },
- {
- title: '状态',
- dataIndex: 'disable',
- fixed: 'right',
- },
- ];
|