Browse Source

Merge remote-tracking branch 'origin/master'

master
wangxiang 3 years ago
parent
commit
11490655f4
  1. 2
      src/api/platform/system/entity/doctorModel.ts
  2. 2
      src/api/platform/system/entity/officeModel.ts
  3. 5
      src/views/institution/doctor/DoctorModal.vue
  4. 41
      src/views/institution/doctor/doctor.data.ts
  5. 2
      src/views/institution/hospital/HospitalModal.vue
  6. 7
      src/views/institution/institution/institution.data.ts
  7. 1
      src/views/institution/office/OfficeModal.vue
  8. 14
      src/views/institution/office/office.data.ts

2
src/api/platform/system/entity/doctorModel.ts

@ -26,7 +26,7 @@ export interface DoctorItem {
/**地址(门牌号)*/ /**地址(门牌号)*/
detailAddress: string; detailAddress: string;
/**组织类型*/ /**组织类型*/
organType: number; organType: string;
/**组织id*/ /**组织id*/
organId: string; organId: string;
/**组织名称*/ /**组织名称*/

2
src/api/platform/system/entity/officeModel.ts

@ -15,7 +15,7 @@ export interface OfficeItem extends CommonEntity{
name: string; name: string;
organType: number; organType: string;
organId: string; organId: string;

5
src/views/institution/doctor/DoctorModal.vue

@ -31,10 +31,9 @@ const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data)
resetFields(); resetFields();
setModalProps({confirmLoading: false}); setModalProps({confirmLoading: false});
isUpdate.value = !!data?.isUpdate; isUpdate.value = !!data?.isUpdate;
console.log(data.record);
if (unref(isUpdate)) { if (unref(isUpdate)) {
setFieldsValue({ setFieldsValue(data.record);
...data.record,
});
} }
}) })
// //

41
src/views/institution/doctor/doctor.data.ts

@ -1,10 +1,10 @@
import { BasicColumn } from '/@/components/Table'; 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 { list as hospitalList } from "/@/api/platform/system/controller/hospital"; import { list as hospitalList } from '/@/api/platform/system/controller/hospital';
import {list as institutionList, list as institutalList} from "/@/api/platform/system/controller/institution"; import {list as institutionList, list as institutalList} from '/@/api/platform/system/controller/institution';
import { list as officeList } from "/@/api/platform/system/controller/office"; import { list as officeList } from '/@/api/platform/system/controller/office';
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
@ -71,20 +71,17 @@ export const columns: BasicColumn[] = [
text = '未知'; text = '未知';
color = 'gray'; color = 'gray';
break; break;
} }
return h(Tag, { color: color }, () => text); return h(Tag, { color: color }, () => text);
} }
}, },
{ // {
title: '组织名称', // title: '科室名称',
dataIndex: 'organName', // dataIndex: 'officeName',
width: 120, // width: 120,
}, // },
{
title: '科室名称',
dataIndex: 'officeName',
width: 120,
},
{ {
title: '状态', title: '状态',
dataIndex: 'status', dataIndex: 'status',
@ -189,8 +186,8 @@ export const doctorFormSchema: FormSchema[] = [
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: [ options: [
{ label: '医院', value: 1 }, { label: '医院', value: '1' },
{ label: '医检', value: 2 } { label: '医检', value: '2' }
] ]
}, },
required: true, required: true,
@ -202,16 +199,22 @@ export const doctorFormSchema: FormSchema[] = [
required: true, required: true,
renderComponentContent: renderCallbackParams => { renderComponentContent: renderCallbackParams => {
const organType = renderCallbackParams.model.organType; const organType = renderCallbackParams.model.organType;
const dataApi = organType==1 ? hospitalList : institutionList; const dataApi = organType=='1' ? hospitalList : institutionList;
renderCallbackParams.schema.componentProps = { renderCallbackParams.schema.componentProps = {
resultField: 'list', resultField: 'list',
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
api: dataApi api: dataApi
} };
}, },
}, },
// {
// field: 'officeId',
// label: '所属科室',
// component: 'ApiSelect',
// required: true,
// },
{ {
field: 'status', field: 'status',
label: '状态', label: '状态',

2
src/views/institution/hospital/HospitalModal.vue

@ -50,7 +50,7 @@ async function handleSubmit() {
const values = await validate(); const values = await validate();
setModalProps({confirmLoading: true}); setModalProps({confirmLoading: true});
let val = toRaw<HospitalItem>(values); let val = toRaw<HospitalItem>(values);
values.addressIds = toRaw(val.addressIds).toString(); values.addressIds = toRaw(val.addressIds);
await set(values); await set(values);
closeModal(); closeModal();
emit('success'); emit('success');

7
src/views/institution/institution/institution.data.ts

@ -12,15 +12,16 @@ export const columns: BasicColumn[] = [
width: 120, width: 120,
}, },
{ {
title: '医检名', title: '机构名称',
dataIndex: 'name', dataIndex: 'name',
width: 120, width: 120,
}, },
{ {
title: '医检类型', title: '机构类型',
dataIndex: 'card', 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 = '';
let color = ''; let color = '';

1
src/views/institution/office/OfficeModal.vue

@ -42,6 +42,7 @@ const getTitle = computed(() => (!unref(isUpdate) ? '新增科室' : '编辑科
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate(); const values = await validate();
setModalProps({confirmLoading: true}); setModalProps({confirmLoading: true});
await set(values); await set(values);
closeModal(); closeModal();

14
src/views/institution/office/office.data.ts

@ -42,11 +42,11 @@ export const columns: BasicColumn[] = [
return h(Tag, { color: color }, () => text); return h(Tag, { color: color }, () => text);
} }
}, },
{ // {
title: '组织名称', // title: '组织名称',
dataIndex: 'organName', // dataIndex: 'organName',
width: 120, // width: 120,
}, // },
{ {
title: '主任名称', title: '主任名称',
dataIndex: 'directorName', dataIndex: 'directorName',
@ -129,8 +129,8 @@ export const officeFormSchema: FormSchema[] = [
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: [ options: [
{ label: '医院', value: 1 }, { label: '医院', value: '1' },
{ label: '医检', value: 2 } { label: '医检', value: '2' }
] ]
}, },
required: true, required: true,

Loading…
Cancel
Save