|
@@ -29,6 +29,7 @@ const props = defineProps<{ data: FollowModel }>();
|
|
|
const fileList = ref<UploadFile[]>([]);
|
|
const fileList = ref<UploadFile[]>([]);
|
|
|
const uploadProps = reactive({ showRemoveIcon: true });
|
|
const uploadProps = reactive({ showRemoveIcon: true });
|
|
|
const emit = defineEmits<{ submit: [data?: SystemCwModel] }>();
|
|
const emit = defineEmits<{ submit: [data?: SystemCwModel] }>();
|
|
|
|
|
+const deptId = ref<string>('');
|
|
|
// 获取所有的机构
|
|
// 获取所有的机构
|
|
|
const branch = ref<any[]>([]);
|
|
const branch = ref<any[]>([]);
|
|
|
const { loading: branchLoading } = useRequest(branchMethod).onSuccess(({ data }) => {
|
|
const { loading: branchLoading } = useRequest(branchMethod).onSuccess(({ data }) => {
|
|
@@ -68,35 +69,7 @@ const formData = reactive<FollowModel>({
|
|
|
constitutionGroupNames: [],
|
|
constitutionGroupNames: [],
|
|
|
willillStateNames: [],
|
|
willillStateNames: [],
|
|
|
},
|
|
},
|
|
|
- // cwPatientMatchRules: [
|
|
|
|
|
- // {
|
|
|
|
|
- // diagnoseDiseaseNames: [],
|
|
|
|
|
- // diagnoseSyndromeNames: [],
|
|
|
|
|
- // constitutionGroupNames: [],
|
|
|
|
|
- // diagnoseDisease: {
|
|
|
|
|
- // id: '',
|
|
|
|
|
- // code: '',
|
|
|
|
|
- // name: '',
|
|
|
|
|
- // optionalWords: '',
|
|
|
|
|
- // attributes: [],
|
|
|
|
|
- // children: [],
|
|
|
|
|
- // },
|
|
|
|
|
- // diagnoseSyndrome: {
|
|
|
|
|
- // code: '',
|
|
|
|
|
- // name: '',
|
|
|
|
|
- // analysis: '',
|
|
|
|
|
- // remark: '',
|
|
|
|
|
- // },
|
|
|
|
|
- // constitutionGroup: {
|
|
|
|
|
- // id: '',
|
|
|
|
|
- // code: '',
|
|
|
|
|
- // name: '',
|
|
|
|
|
- // definition: '',
|
|
|
|
|
- // remark: '',
|
|
|
|
|
- // },
|
|
|
|
|
- // },
|
|
|
|
|
- // ], // 适用情况
|
|
|
|
|
- items: [], // Initialize as empty array
|
|
|
|
|
|
|
+ items: [],
|
|
|
});
|
|
});
|
|
|
const emptyRow = {
|
|
const emptyRow = {
|
|
|
id: '',
|
|
id: '',
|
|
@@ -178,6 +151,7 @@ watch(totalPrice, (val) => {
|
|
|
|
|
|
|
|
const projectSearchRef = useTemplateRef<HTMLInputElement>('projectSearchRef');
|
|
const projectSearchRef = useTemplateRef<HTMLInputElement>('projectSearchRef');
|
|
|
const projectSearchFocus = (visible: boolean) => {
|
|
const projectSearchFocus = (visible: boolean) => {
|
|
|
|
|
+ showProjectPopover.value = visible;
|
|
|
if (visible) setTimeout(() => projectSearchRef.value?.focus?.(), 300);
|
|
if (visible) setTimeout(() => projectSearchRef.value?.focus?.(), 300);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -488,7 +462,9 @@ async function getDesiredConditions() {
|
|
|
}
|
|
}
|
|
|
// 获取性别
|
|
// 获取性别
|
|
|
const genders = ref<{ id: string; name: string }[]>([]);
|
|
const genders = ref<{ id: string; name: string }[]>([]);
|
|
|
|
|
+const gendersLoading = ref(false);
|
|
|
async function getGender() {
|
|
async function getGender() {
|
|
|
|
|
+ gendersLoading.value = true;
|
|
|
const res = await getDictionaryMethod('sys_user_sex');
|
|
const res = await getDictionaryMethod('sys_user_sex');
|
|
|
if (res && res.length > 0) {
|
|
if (res && res.length > 0) {
|
|
|
genders.value = res.map((item: any) => ({
|
|
genders.value = res.map((item: any) => ({
|
|
@@ -496,6 +472,7 @@ async function getGender() {
|
|
|
name: item.label,
|
|
name: item.label,
|
|
|
}));
|
|
}));
|
|
|
}
|
|
}
|
|
|
|
|
+ gendersLoading.value = false;
|
|
|
}
|
|
}
|
|
|
// 获取年龄
|
|
// 获取年龄
|
|
|
const ages = ref<{ id: string; name: string }[]>([]);
|
|
const ages = ref<{ id: string; name: string }[]>([]);
|
|
@@ -518,17 +495,24 @@ async function getConstitutionGroup() {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
|
|
|
+ // 获取欲病状态
|
|
|
getDesiredConditions();
|
|
getDesiredConditions();
|
|
|
|
|
+ // 获取性别
|
|
|
getGender();
|
|
getGender();
|
|
|
|
|
+ // 获取年龄
|
|
|
getAge();
|
|
getAge();
|
|
|
|
|
+ // 获取体质
|
|
|
getConstitutionGroup();
|
|
getConstitutionGroup();
|
|
|
|
|
+ // 获取机构项目列表 服务包内容点击 弹窗里的内容
|
|
|
|
|
+ await getProjectList();
|
|
|
|
|
+ // 有id说明是编辑
|
|
|
if (props.data.id) {
|
|
if (props.data.id) {
|
|
|
- props.data.types = 'institution'; // Modify the local copy instead
|
|
|
|
|
- // 调编辑接口获取数据
|
|
|
|
|
|
|
+ props.data.types = 'institution';
|
|
|
|
|
+ // 调编辑接口获取调理包详情 机构服务包和系统服务包的详情接口是一样的
|
|
|
const res: any = await getConditioningRecordDetailMethod(props.data);
|
|
const res: any = await getConditioningRecordDetailMethod(props.data);
|
|
|
Object.assign(formData, res); // Use the response to update formData
|
|
Object.assign(formData, res); // Use the response to update formData
|
|
|
await nextTick(); // 确保视图更新
|
|
await nextTick(); // 确保视图更新
|
|
|
-
|
|
|
|
|
|
|
+ // 获取适用情况
|
|
|
const matchRule = res?.conditioningWrapPatientMatchRule || {};
|
|
const matchRule = res?.conditioningWrapPatientMatchRule || {};
|
|
|
Object.assign(formData.conditioningWrapPatientMatchRule!, {
|
|
Object.assign(formData.conditioningWrapPatientMatchRule!, {
|
|
|
sex: matchRule.sex ?? '',
|
|
sex: matchRule.sex ?? '',
|
|
@@ -554,7 +538,6 @@ onMounted(async () => {
|
|
|
row.frequencyTypeing = row.frequencyType ? [row.frequencyType] : [];
|
|
row.frequencyTypeing = row.frequencyType ? [row.frequencyType] : [];
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
- await getProjectList();
|
|
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const tableData = computed(() => {
|
|
const tableData = computed(() => {
|
|
@@ -568,6 +551,9 @@ function removeTableRow(idx: number) {
|
|
|
}
|
|
}
|
|
|
// 引入服务包
|
|
// 引入服务包
|
|
|
function addInstitution() {
|
|
function addInstitution() {
|
|
|
|
|
+ deptId.value = localStorage.getItem('deptId') || '';
|
|
|
|
|
+ console.log(deptId.value, '当前机构');
|
|
|
|
|
+ console.log(formData.institutionId, '选择的机构');
|
|
|
VxeUI.modal.open({
|
|
VxeUI.modal.open({
|
|
|
title: '选择引入',
|
|
title: '选择引入',
|
|
|
width: 1000,
|
|
width: 1000,
|
|
@@ -581,6 +567,7 @@ function addInstitution() {
|
|
|
default() {
|
|
default() {
|
|
|
return h(ServicePackageList, {
|
|
return h(ServicePackageList, {
|
|
|
data: formData,
|
|
data: formData,
|
|
|
|
|
+ institutionId: formData.institutionId ? formData.institutionId : deptId.value,
|
|
|
onSubmit(data: SystemCwModel) {
|
|
onSubmit(data: SystemCwModel) {
|
|
|
VxeUI.modal.close(`systemService-list-modal`);
|
|
VxeUI.modal.close(`systemService-list-modal`);
|
|
|
},
|
|
},
|
|
@@ -612,9 +599,9 @@ const handlePreview = async (file: UploadFile) => {
|
|
|
previewImg.value = file.response?.url ?? file.thumbUrl;
|
|
previewImg.value = file.response?.url ?? file.thumbUrl;
|
|
|
visible.value = true;
|
|
visible.value = true;
|
|
|
};
|
|
};
|
|
|
-function set(){
|
|
|
|
|
|
|
+function set() {
|
|
|
formData.items = [];
|
|
formData.items = [];
|
|
|
- formData.name='';
|
|
|
|
|
|
|
+ formData.name = '';
|
|
|
formData.conditioningWrapPatientMatchRule = {
|
|
formData.conditioningWrapPatientMatchRule = {
|
|
|
sex: '',
|
|
sex: '',
|
|
|
age: '',
|
|
age: '',
|
|
@@ -629,9 +616,9 @@ function handleSelect(value: string, node: any, extra: any) {
|
|
|
set();
|
|
set();
|
|
|
formData.institutionId = value;
|
|
formData.institutionId = value;
|
|
|
formData.institutionName = node.label;
|
|
formData.institutionName = node.label;
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
function openPopover() {
|
|
function openPopover() {
|
|
|
|
|
+ console.log('openPopover');
|
|
|
showProjectPopover.value = true;
|
|
showProjectPopover.value = true;
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
@@ -644,14 +631,14 @@ function openPopover() {
|
|
|
<span style="white-space: nowrap; margin-right: 8px">机构名称:</span>
|
|
<span style="white-space: nowrap; margin-right: 8px">机构名称:</span>
|
|
|
<a-tree-select
|
|
<a-tree-select
|
|
|
v-model:value="formData.institutionId"
|
|
v-model:value="formData.institutionId"
|
|
|
- show-search
|
|
|
|
|
style="width: 220px"
|
|
style="width: 220px"
|
|
|
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
|
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
|
- allow-clear
|
|
|
|
|
tree-default-expand-all
|
|
tree-default-expand-all
|
|
|
:tree-data="branch"
|
|
:tree-data="branch"
|
|
|
@select="handleSelect"
|
|
@select="handleSelect"
|
|
|
|
|
+ :loading="branchLoading"
|
|
|
|
|
+ :getPopupContainer="(triggerNode: any) => triggerNode.parentNode"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
<!-- 服务包名称 -->
|
|
<!-- 服务包名称 -->
|
|
@@ -686,7 +673,14 @@ function openPopover() {
|
|
|
<span class="w-20">使用限制</span>
|
|
<span class="w-20">使用限制</span>
|
|
|
<div class="mr-10">
|
|
<div class="mr-10">
|
|
|
<span>性别:</span>
|
|
<span>性别:</span>
|
|
|
- <a-select placeholder="请选择" v-model:value="formData.conditioningWrapPatientMatchRule.sex" style="width: 150px; margin: 0 5px" allowClear>
|
|
|
|
|
|
|
+ <a-select
|
|
|
|
|
+ placeholder="请选择"
|
|
|
|
|
+ v-model:value="formData.conditioningWrapPatientMatchRule.sex"
|
|
|
|
|
+ style="width: 150px; margin: 0 5px"
|
|
|
|
|
+ allowClear
|
|
|
|
|
+ :loading="gendersLoading"
|
|
|
|
|
+ :getPopupContainer="(triggerNode: any) => triggerNode.parentNode"
|
|
|
|
|
+ >
|
|
|
<a-select-option v-for="option in genders" :key="option.id" :value="option.id" placeholder="请选择">
|
|
<a-select-option v-for="option in genders" :key="option.id" :value="option.id" placeholder="请选择">
|
|
|
{{ option.name }}
|
|
{{ option.name }}
|
|
|
</a-select-option>
|
|
</a-select-option>
|
|
@@ -694,7 +688,13 @@ function openPopover() {
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
<span>年龄:</span>
|
|
<span>年龄:</span>
|
|
|
- <a-select v-model:value="formData.conditioningWrapPatientMatchRule.age" style="width: 150px; margin: 0 8px" placeholder="请选择" allowClear>
|
|
|
|
|
|
|
+ <a-select
|
|
|
|
|
+ v-model:value="formData.conditioningWrapPatientMatchRule.age"
|
|
|
|
|
+ style="width: 150px; margin: 0 8px"
|
|
|
|
|
+ placeholder="请选择"
|
|
|
|
|
+ allowClear
|
|
|
|
|
+ :getPopupContainer="(triggerNode: any) => triggerNode.parentNode"
|
|
|
|
|
+ >
|
|
|
<a-select-option v-for="option in ages" :key="option.id" :value="option.id" placeholder="请选择">{{ option.name }}</a-select-option>
|
|
<a-select-option v-for="option in ages" :key="option.id" :value="option.id" placeholder="请选择">{{ option.name }}</a-select-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
|
</div>
|
|
</div>
|
|
@@ -730,6 +730,7 @@ function openPopover() {
|
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
|
allowClear
|
|
allowClear
|
|
|
mode="multiple"
|
|
mode="multiple"
|
|
|
|
|
+ :getPopupContainer="(triggerNode: any) => triggerNode.parentNode"
|
|
|
>
|
|
>
|
|
|
<a-select-option v-for="option in constitutionGroups" :key="option.id" :value="option.id" placeholder="请选择">{{ option.name }}</a-select-option>
|
|
<a-select-option v-for="option in constitutionGroups" :key="option.id" :value="option.id" placeholder="请选择">{{ option.name }}</a-select-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
@@ -743,6 +744,7 @@ function openPopover() {
|
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
|
allowClear
|
|
allowClear
|
|
|
mode="multiple"
|
|
mode="multiple"
|
|
|
|
|
+ :getPopupContainer="(triggerNode: any) => triggerNode.parentNode"
|
|
|
@change="(value) => (formData.conditioningWrapPatientMatchRule.willillStateNames = value)"
|
|
@change="(value) => (formData.conditioningWrapPatientMatchRule.willillStateNames = value)"
|
|
|
>
|
|
>
|
|
|
<a-select-option v-for="option in desiredConditions" :key="option.id" :value="option.id" placeholder="请选择">{{ option.name }}</a-select-option>
|
|
<a-select-option v-for="option in desiredConditions" :key="option.id" :value="option.id" placeholder="请选择">{{ option.name }}</a-select-option>
|
|
@@ -784,7 +786,7 @@ function openPopover() {
|
|
|
</vxe-column>
|
|
</vxe-column>
|
|
|
</vxe-table>
|
|
</vxe-table>
|
|
|
</template>
|
|
</template>
|
|
|
- <a-input v-model:value="row.name" placeholder="请搜索" style="width: 120px" @click="openPopover" readonly />
|
|
|
|
|
|
|
+ <a-input v-model:value="row.name" placeholder="请搜索" style="width: 120px" @focus="openPopover" readonly />
|
|
|
</a-popover>
|
|
</a-popover>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else>
|
|
<template v-else>
|