|
@@ -1,5 +1,5 @@
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-import { ref, computed, nextTick, h, watch, onMounted, openBlock } from 'vue';
|
|
|
|
|
|
|
+import { ref, computed, nextTick, h, watch, onMounted } from 'vue';
|
|
|
import { notification } from 'ant-design-vue';
|
|
import { notification } from 'ant-design-vue';
|
|
|
import { getDictionaryMethod } from '@/request/api/dictionary.api';
|
|
import { getDictionaryMethod } from '@/request/api/dictionary.api';
|
|
|
import { UploadIFile } from '@/request/api/follow.api';
|
|
import { UploadIFile } from '@/request/api/follow.api';
|
|
@@ -68,34 +68,34 @@ 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: '',
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- ], // 适用情况
|
|
|
|
|
|
|
+ // 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: [], // Initialize as empty array
|
|
|
});
|
|
});
|
|
|
const emptyRow = {
|
|
const emptyRow = {
|
|
@@ -176,23 +176,6 @@ watch(totalPrice, (val) => {
|
|
|
formData.price = val;
|
|
formData.price = val;
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
-// function addSituation() {
|
|
|
|
|
-// if (!formData.cwPatientMatchRules) formData.cwPatientMatchRules = [];
|
|
|
|
|
-// formData.cwPatientMatchRules.push({
|
|
|
|
|
-// diagnoseDiseaseNames: [],
|
|
|
|
|
-// diagnoseSyndromeNames: [],
|
|
|
|
|
-// constitutionGroupNames: [],
|
|
|
|
|
-// diagnoseDisease: { id: '', code: '', name: '' },
|
|
|
|
|
-// diagnoseSyndrome: { code: '', name: '', analysis: '', remark: '' },
|
|
|
|
|
-// constitutionGroup: { id: '', code: '', name: '', definition: '', remark: '' },
|
|
|
|
|
-// });
|
|
|
|
|
-// }
|
|
|
|
|
-
|
|
|
|
|
-// function removeSituation(idx: number) {
|
|
|
|
|
-// if (formData.cwPatientMatchRules) {
|
|
|
|
|
-// formData.cwPatientMatchRules.splice(idx, 1);
|
|
|
|
|
-// }
|
|
|
|
|
-// }
|
|
|
|
|
const projectSearchRef = useTemplateRef<HTMLInputElement>('projectSearchRef');
|
|
const projectSearchRef = useTemplateRef<HTMLInputElement>('projectSearchRef');
|
|
|
const projectSearchFocus = (visible: boolean) => {
|
|
const projectSearchFocus = (visible: boolean) => {
|
|
|
if (visible) setTimeout(() => projectSearchRef.value?.focus?.(), 300);
|
|
if (visible) setTimeout(() => projectSearchRef.value?.focus?.(), 300);
|
|
@@ -227,14 +210,6 @@ function onSelectProject({ row }: any) {
|
|
|
}
|
|
}
|
|
|
// 添加新行到主表格
|
|
// 添加新行到主表格
|
|
|
if (!formData.items) formData.items = [];
|
|
if (!formData.items) formData.items = [];
|
|
|
- // if (row.cpDynamicPricingRule[0]?.priceType === 0) {
|
|
|
|
|
- // // 单价
|
|
|
|
|
- // let unitPrice: number = row.cpDynamicPricingRule[0].price;
|
|
|
|
|
- // row.unitPrice = unitPrice;
|
|
|
|
|
- // } else if (row.cpDynamicPricingRule[0]?.priceType === 1) {
|
|
|
|
|
- // // 一口价
|
|
|
|
|
- // row.unitPrice = '-';
|
|
|
|
|
- // }
|
|
|
|
|
formData.items.push({
|
|
formData.items.push({
|
|
|
id: '',
|
|
id: '',
|
|
|
conditioningWrapId: '',
|
|
conditioningWrapId: '',
|
|
@@ -278,7 +253,7 @@ function onSelectProject({ row }: any) {
|
|
|
}
|
|
}
|
|
|
// 预览
|
|
// 预览
|
|
|
|
|
|
|
|
-function onPreview(row) {
|
|
|
|
|
|
|
+function onPreview(row: any) {
|
|
|
if (row.conditioningProgramDetail.id) {
|
|
if (row.conditioningProgramDetail.id) {
|
|
|
// 这里写你的预览逻辑
|
|
// 这里写你的预览逻辑
|
|
|
VxeUI.modal.open({
|
|
VxeUI.modal.open({
|
|
@@ -294,7 +269,7 @@ function onPreview(row) {
|
|
|
default() {
|
|
default() {
|
|
|
return h(ServiceDetail, {
|
|
return h(ServiceDetail, {
|
|
|
data: row.conditioningProgramDetail,
|
|
data: row.conditioningProgramDetail,
|
|
|
- onSubmit: (data) => {
|
|
|
|
|
|
|
+ onSubmit: (data: any) => {
|
|
|
VxeUI.modal.close(`preview-modal`);
|
|
VxeUI.modal.close(`preview-modal`);
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
@@ -474,9 +449,7 @@ function confirm() {
|
|
|
VxeUI.modal.close(`edit-system-service-modal`);
|
|
VxeUI.modal.close(`edit-system-service-modal`);
|
|
|
});
|
|
});
|
|
|
} else if (props.data.types === 'institution') {
|
|
} else if (props.data.types === 'institution') {
|
|
|
- console.log(fileList.value, '机构服务包的形象照');
|
|
|
|
|
if (fileList.value.length > 0) {
|
|
if (fileList.value.length > 0) {
|
|
|
- console.log(fileList.value, 'fileList.value');
|
|
|
|
|
const upImg = fileList.value[0]?.response?.url || fileList.value[0]?.thumbUrl;
|
|
const upImg = fileList.value[0]?.response?.url || fileList.value[0]?.thumbUrl;
|
|
|
formData.photo = upImg;
|
|
formData.photo = upImg;
|
|
|
fileList.value = upImg
|
|
fileList.value = upImg
|
|
@@ -553,20 +526,19 @@ onMounted(async () => {
|
|
|
props.data.types = 'institution'; // Modify the local copy instead
|
|
props.data.types = 'institution'; // Modify the local copy instead
|
|
|
// 调编辑接口获取数据
|
|
// 调编辑接口获取数据
|
|
|
const res: any = await getConditioningRecordDetailMethod(props.data);
|
|
const res: any = await getConditioningRecordDetailMethod(props.data);
|
|
|
- console.log(res, '获取详情');
|
|
|
|
|
Object.assign(formData, res); // Use the response to update formData
|
|
Object.assign(formData, res); // Use the response to update formData
|
|
|
await nextTick(); // 确保视图更新
|
|
await nextTick(); // 确保视图更新
|
|
|
|
|
|
|
|
- formData.conditioningWrapPatientMatchRule = res?.conditioningWrapPatientMatchRule ?? {
|
|
|
|
|
- sex: '',
|
|
|
|
|
- age: '',
|
|
|
|
|
- diagnoseDiseaseNames: [],
|
|
|
|
|
- diagnoseSyndromeNames: [],
|
|
|
|
|
- constitutionGroupNames: [],
|
|
|
|
|
- willillStateNames: [],
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ const matchRule = res?.conditioningWrapPatientMatchRule || {};
|
|
|
|
|
+ Object.assign(formData.conditioningWrapPatientMatchRule!, {
|
|
|
|
|
+ sex: matchRule.sex ?? '',
|
|
|
|
|
+ age: matchRule.age ?? '',
|
|
|
|
|
+ diagnoseDiseaseNames: Array.isArray(matchRule.diagnoseDiseaseNames) ? matchRule.diagnoseDiseaseNames : [],
|
|
|
|
|
+ diagnoseSyndromeNames: Array.isArray(matchRule.diagnoseSyndromeNames) ? matchRule.diagnoseSyndromeNames : [],
|
|
|
|
|
+ constitutionGroupNames: Array.isArray(matchRule.constitutionGroupNames) ? matchRule.constitutionGroupNames : [],
|
|
|
|
|
+ willillStateNames: Array.isArray(matchRule.willillStateNames) ? matchRule.willillStateNames : [],
|
|
|
|
|
+ });
|
|
|
formData.items = res?.items ?? [];
|
|
formData.items = res?.items ?? [];
|
|
|
- console.log(res?.photo, 'res?.photo');
|
|
|
|
|
fileList.value = res?.photo
|
|
fileList.value = res?.photo
|
|
|
? [
|
|
? [
|
|
|
{
|
|
{
|
|
@@ -640,10 +612,24 @@ 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(){
|
|
|
|
|
+ formData.items = [];
|
|
|
|
|
+ formData.name='';
|
|
|
|
|
+ formData.conditioningWrapPatientMatchRule = {
|
|
|
|
|
+ sex: '',
|
|
|
|
|
+ age: '',
|
|
|
|
|
+ diagnoseDiseaseNames: [],
|
|
|
|
|
+ diagnoseSyndromeNames: [],
|
|
|
|
|
+ constitutionGroupNames: [],
|
|
|
|
|
+ willillStateNames: [],
|
|
|
|
|
+ };
|
|
|
|
|
+}
|
|
|
let multiple = ref<boolean>(true);
|
|
let multiple = ref<boolean>(true);
|
|
|
function handleSelect(value: string, node: any, extra: any) {
|
|
function handleSelect(value: string, node: any, extra: any) {
|
|
|
|
|
+ set();
|
|
|
formData.institutionId = value;
|
|
formData.institutionId = value;
|
|
|
formData.institutionName = node.label;
|
|
formData.institutionName = node.label;
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
function openPopover() {
|
|
function openPopover() {
|
|
|
showProjectPopover.value = true;
|
|
showProjectPopover.value = true;
|