|
|
@ -2,7 +2,7 @@ import { BasicColumn } from '/@/components/Table'; |
|
|
|
import { FormSchema } from '/@/components/Table'; |
|
|
|
import { FormSchema } from '/@/components/Table'; |
|
|
|
import { h } from 'vue'; |
|
|
|
import { h } from 'vue'; |
|
|
|
import { Tag } from 'ant-design-vue'; |
|
|
|
import { Tag } from 'ant-design-vue'; |
|
|
|
|
|
|
|
import { listRegionCascade } from '/@/api/platform/system/controller/region'; |
|
|
|
|
|
|
|
|
|
|
|
export const columns: BasicColumn[] = [ |
|
|
|
export const columns: BasicColumn[] = [ |
|
|
|
{ |
|
|
|
{ |
|
|
@ -20,10 +20,8 @@ export const columns: BasicColumn[] = [ |
|
|
|
dataIndex: 'type', |
|
|
|
dataIndex: 'type', |
|
|
|
width: 120, |
|
|
|
width: 120, |
|
|
|
customRender: ({ record }) =>{ |
|
|
|
customRender: ({ record }) =>{ |
|
|
|
console.log(record); |
|
|
|
|
|
|
|
const type = record.type; |
|
|
|
const type = record.type; |
|
|
|
let text = ''; |
|
|
|
let text = '', color = ''; |
|
|
|
let color = ''; |
|
|
|
|
|
|
|
switch (type) { |
|
|
|
switch (type) { |
|
|
|
case '1': |
|
|
|
case '1': |
|
|
|
text = '医检机构'; |
|
|
|
text = '医检机构'; |
|
|
@ -37,28 +35,23 @@ export const columns: BasicColumn[] = [ |
|
|
|
text = '其他机构'; |
|
|
|
text = '其他机构'; |
|
|
|
color = 'gray'; |
|
|
|
color = 'gray'; |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: |
|
|
|
|
|
|
|
text = '其他医院'; |
|
|
|
|
|
|
|
color = 'gray'; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return h(Tag, { color: color }, () => text); |
|
|
|
return h(Tag, { color: color }, () => text); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: '联系人', |
|
|
|
title: '联系人', |
|
|
|
dataIndex: 'contactsName', |
|
|
|
dataIndex: 'contactName', |
|
|
|
width: 120, |
|
|
|
width: 120, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: '联系人电话', |
|
|
|
title: '联系人电话', |
|
|
|
dataIndex: 'contactsTel', |
|
|
|
dataIndex: 'contactPhone', |
|
|
|
width: 120, |
|
|
|
width: 120, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: '联系人职称', |
|
|
|
title: '联系人职称', |
|
|
|
dataIndex: 'contactsTitle', |
|
|
|
dataIndex: 'contactTitle', |
|
|
|
width: 120, |
|
|
|
width: 120, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
@ -72,7 +65,7 @@ export const columns: BasicColumn[] = [ |
|
|
|
width: 100, |
|
|
|
width: 100, |
|
|
|
customRender: ({ record }) => { |
|
|
|
customRender: ({ record }) => { |
|
|
|
const status = record.status; |
|
|
|
const status = record.status; |
|
|
|
const enable = status === '0'; |
|
|
|
const enable = ~~status === 0; |
|
|
|
const color = enable ? 'green' : 'red'; |
|
|
|
const color = enable ? 'green' : 'red'; |
|
|
|
const text = enable ? '启用' : '禁用'; |
|
|
|
const text = enable ? '启用' : '禁用'; |
|
|
|
return h(Tag, { color: color }, () => text); |
|
|
|
return h(Tag, { color: color }, () => text); |
|
|
@ -104,12 +97,12 @@ export const searchFormSchema: FormSchema[] = [ |
|
|
|
field: 'type', |
|
|
|
field: 'type', |
|
|
|
label: '机构类型', |
|
|
|
label: '机构类型', |
|
|
|
component: 'Select', |
|
|
|
component: 'Select', |
|
|
|
|
|
|
|
defaultValue: '1', |
|
|
|
componentProps: { |
|
|
|
componentProps: { |
|
|
|
options: [ |
|
|
|
options: [ |
|
|
|
{label: '医检机构',value: '1'}, |
|
|
|
{label: '医检机构',value: '1'}, |
|
|
|
{label: '三甲机构',value: '2'}, |
|
|
|
{label: '三甲机构',value: '2'}, |
|
|
|
{label: '其他机构',value: '0'}, |
|
|
|
{label: '其他机构',value: '0'} |
|
|
|
] |
|
|
|
] |
|
|
|
}, |
|
|
|
}, |
|
|
|
colProps: {span: 5} |
|
|
|
colProps: {span: 5} |
|
|
@ -152,19 +145,18 @@ export const institutionFormSchema: FormSchema[] = [ |
|
|
|
{ label: '其他机构', value: '0' }, |
|
|
|
{ label: '其他机构', value: '0' }, |
|
|
|
] |
|
|
|
] |
|
|
|
}, |
|
|
|
}, |
|
|
|
required: true, |
|
|
|
required: true |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
field: 'contactsName', |
|
|
|
field: 'contactName', |
|
|
|
label: '联系人名称', |
|
|
|
label: '联系人名称', |
|
|
|
component: 'Input', |
|
|
|
component: 'Input', |
|
|
|
required: true |
|
|
|
required: true |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
field: 'contactsTel', |
|
|
|
field: 'contactPhone', |
|
|
|
label: '联系人电话', |
|
|
|
label: '联系人电话', |
|
|
|
component: 'Input', |
|
|
|
component: 'Input', |
|
|
|
|
|
|
|
|
|
|
|
rules: [ |
|
|
|
rules: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
pattern: new RegExp('^1[3|4|5|6|7|8|9][0-9]\\d{8}$'), |
|
|
|
pattern: new RegExp('^1[3|4|5|6|7|8|9][0-9]\\d{8}$'), |
|
|
@ -173,23 +165,27 @@ export const institutionFormSchema: FormSchema[] = [ |
|
|
|
required: true |
|
|
|
required: true |
|
|
|
} |
|
|
|
} |
|
|
|
], |
|
|
|
], |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
field: 'contactsTitle', |
|
|
|
field: 'contactTitle', |
|
|
|
label: '联系人职称', |
|
|
|
label: '联系人职称', |
|
|
|
component: 'Input', |
|
|
|
component: 'Input', |
|
|
|
required: true |
|
|
|
required: true |
|
|
|
}, |
|
|
|
}, |
|
|
|
/* { |
|
|
|
{ |
|
|
|
field: 'addressIds', |
|
|
|
field: 'addressIds', |
|
|
|
label: '地址', |
|
|
|
label: '城市地址', |
|
|
|
component: 'ApiAddressCascader', |
|
|
|
component: 'ApiCascader', |
|
|
|
componentProps: { |
|
|
|
componentProps: { |
|
|
|
api: addressList |
|
|
|
api: listRegionCascade, |
|
|
|
|
|
|
|
asyncFetchParamKey: 'parentId', |
|
|
|
|
|
|
|
labelField: 'name', |
|
|
|
|
|
|
|
valueField: 'id', |
|
|
|
|
|
|
|
initFetchParams: { |
|
|
|
|
|
|
|
parentId: '0' |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
},*/ |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
field: 'detailAddress', |
|
|
|
field: 'detailAddress', |
|
|
|
label: '详细地址', |
|
|
|
label: '详细地址', |
|
|
|