فهرست منبع

修复 【随访管理】的【随访评估】中疾病转归点击选择好转提交后为恶化。

张田田 9 ماه پیش
والد
کامیت
1c7daa63ca
1فایلهای تغییر یافته به همراه33 افزوده شده و 68 حذف شده
  1. 33 68
      src/components/Evaluation.vue

+ 33 - 68
src/components/Evaluation.vue

@@ -27,14 +27,19 @@ const { loading, send: getDetail } = useRequest(EvaluateDetailMethod, {
   let medicalObj = {
     arrangeTime: data?.medicalTime,
     tonguefaceAnalysisReport: data?.tonguefaceAnalysisReport,
-
   };
   data.tasks.unshift(medicalObj);
   const tasks = data.tasks.map((item: any) => {
     let obj = {
       date: item.fillinTime || item.arrangeTime,
-      k1:item.fillin?.symptomsList?.filter((item:any)=>item.type === '好' || item.type === '好转').map((item:any)=>item.name).join(','),
-      k2:item.fillin?.symptomsList?.filter((item:any)=>item.type === '不好' || item.type === '恶化').map((item:any)=>item.name).join(','),
+      k1: item.fillin?.symptomsList
+        ?.filter((item: any) => item.type === '好' || item.type === '好转')
+        .map((item: any) => item.name)
+        .join(','),
+      k2: item.fillin?.symptomsList
+        ?.filter((item: any) => item.type === '不好' || item.type === '恶化')
+        .map((item: any) => item.name)
+        .join(','),
       k3: item?.analysis?.tongue.pictures[0],
       k4: item?.analysis?.tongue.pictures[1],
       k5: item?.analysis?.face.pictures[0],
@@ -90,11 +95,7 @@ const gridOptions = reactive<VxeGridProps<FormModel>>({
       style.color = 'red';
     }
 
-    if (
-      columnIndex > 1 &&
-      value !== row.col1 &&
-      HealthReportAnalysisItemConfig.map((item) => item.subcategory).includes(row.key)
-    ) {
+    if (columnIndex > 1 && value !== row.col1 && HealthReportAnalysisItemConfig.map((item) => item.subcategory).includes(row.key)) {
       style.background = 'yellow';
     }
     if (value?.startsWith('http')) {
@@ -109,7 +110,6 @@ function loadAssessDetail(data = []) {
   const columns = gridOptions.columns;
   const rows = gridOptions.data;
   let col = columns.length;
-  console.log(data, '加载详情');
   for (const item of data) {
     const field = `col${col}`;
     columns.push({
@@ -183,78 +183,54 @@ function subEvalation() {
     emits('submit');
   });
 }
+const StatusTextMap: Record<string, string> = {
+  '1': '痊愈',
+  '2': '好转',
+  '3': '无变化',
+  '4': '恶化',
+};
+const DealTextMap: Record<string, string> = {
+  '1': '复诊',
+  '2': '中医调养',
+};
 </script>
 <template>
   <div>
-    <div
-      class="flex"
-      style="background: #eeeeee; padding: 10px; font-size: 13px; border: 0.5px solid lightgrey"
-    >
-      <div
-        class="border-r border-r-2 border-r-gray-300 border-r-solid pr-6 flex align--center justify-center"
-      >
+    <div class="flex" style="background: #eeeeee; padding: 10px; font-size: 13px; border: 0.5px solid lightgrey">
+      <div class="border-r border-r-2 border-r-gray-300 border-r-solid pr-6 flex align--center justify-center">
         <div class="mr-2 font-bold" style="font-size: 14px">基本信息</div>
         <div class="mr-3">{{ props.data.medicalTime }}</div>
         <span class="mr-3">{{ props.data.patientName }}</span>
         <span class="mr-3"> {{ props.data.sex === '1' ? '女' : '男' }}</span>
         <span> {{ props.data.age }}岁</span>
       </div>
-      <div class="border-r border-r-2 border-r-gray-300 border-r-solid pr-6 pl-6">
-        诊断:{{ props.data?.diagnosis }}
-      </div>
+      <div class="border-r border-r-2 border-r-gray-300 border-r-solid pr-6 pl-6">诊断:{{ props.data?.diagnosis }}</div>
       <div class="pl-6" v-if="props.data?.syndromeList?.length > 0">症状:{{ props.data?.syndromeList?.join(',') }}</div>
     </div>
 
     <vxe-grid class="reverse-table detail" v-bind="gridOptions">
       <template #cell="{ row, rowIndex, column, columnIndex }">
-        <a-image
-          style="height: 100px"
-          v-if="row[column.field] && rowIndex > 2 && rowIndex < 6 && columnIndex !== 0"
-          :src="row[column.field]"
-        ></a-image>
-        <div
-          v-else-if="
-            row[column.field] === '舌面' ||
-            row[column.field] === '舌下' ||
-            row[column.field] === '面部'
-          "
-        >
+        <a-image style="height: 100px" v-if="row[column.field] && rowIndex > 2 && rowIndex < 6 && columnIndex !== 0" :src="row[column.field]"></a-image>
+        <div v-else-if="row[column.field] === '舌面' || row[column.field] === '舌下' || row[column.field] === '面部'">
           <div>{{ row[column.field] }}</div>
-          <div @click="openSwiperImage(row, column)" style="margin-top: 10px; color: #1890ff">
-            对比
-          </div>
+          <div @click="openSwiperImage(row, column)" style="margin-top: 10px; color: #1890ff">对比</div>
         </div>
-        <span v-else-if="row[column.field] == props.data.medicalTime" style="color: red"
-          >{{ row[column.field] }}(就诊日)
-        </span>
+        <span v-else-if="row[column.field] == props.data.medicalTime" style="color: red">{{ row[column.field] }}(就诊日) </span>
         <template v-else>{{ row[column.field] }}</template>
       </template>
       <!--      已经评估-->
       <template #right v-if="props.data?.evaluateProgress === '1'">
         <div class="pl-6 pr-4">
-          <div
-            style="width: 160px; font-size: 16px"
-            class="border-1 border-gray font-bold mt-2 mb-3"
-          >
-            随访结果评估
-          </div>
+          <div style="width: 160px; font-size: 16px" class="border-1 border-gray font-bold mt-2 mb-3">随访结果评估</div>
           <div style="width: 160px" class="border-1 border-gray font-bold mt-2 mb-3">疾病转归</div>
           <div class="mb-8 indent-6">
-            {{
-              props.data?.evaluateSituation === '1'
-                ? '痊愈'
-                : props.data?.evaluateSituation === '2'
-                  ? '好转'
-                  : props.data?.evaluateSituation === '3'
-                    ? '无变化'
-                    : '恶化'
-            }}
+            {{ StatusTextMap[props?.data?.evaluate.evaluateSituation] || '' }}
           </div>
           <div class="font-bold mt-2 mb-1" v-if="props.data?.evaluateDesc">备注:</div>
           <p class="indent-6 w-30 text-pretty" v-if="props.data?.evaluateDesc">{{ props.data?.evaluateDesc }}</p>
           <div class="font-bold mb-4 mt-15">下一步处置</div>
           <div class="indent-6 font-bold">
-            {{ props.data?.evaluateDeal === '1' ? '复诊' : '中医调养' }}
+            {{ DealTextMap[props?.data?.evaluate.evaluateDeal] || '' }}
           </div>
           <div class="mt-10 flex justify-end flex-col items-center">
             <div>{{ props.data?.evaluateBy }}</div>
@@ -265,39 +241,28 @@ function subEvalation() {
       <!--未评估-->
       <template #right v-else>
         <div class="pl-6 pr-4">
-          <div style="font-size: 18px" class="border-1 border-gray font-bold mt-2 mb-3">
-            随访结果评估
-          </div>
+          <div style="font-size: 18px" class="border-1 border-gray font-bold mt-2 mb-3">随访结果评估</div>
           <div class="flex items-center justify-center mb-2">
             <div class="w-1 h-1 bg-blue-400"></div>
             <div style="width: 200px" class="border-1 border-gray font-bold ml-2">疾病转归</div>
           </div>
           <div class="ml-2 mb-3">
             <a-radio-group v-model:value="props.data.evaluateSituation">
-              <a-radio :style="radioStyle" :value="item.value" v-for="item in symptomStatus"
-                >{{ item.label }}
-              </a-radio>
+              <a-radio :style="radioStyle" :value="item.value" v-for="item in symptomStatus">{{ item.label }} </a-radio>
             </a-radio-group>
           </div>
           <div class="flex items-center justify-center mb-2">
             <div class="w-1 h-1 bg-blue-400"></div>
             <div style="width: 200px" class="border-1 border-gray font-bold ml-2">备注</div>
           </div>
-          <a-textarea
-            v-model:value="props.data.evaluateDesc"
-            placeholder="请输入"
-            allow-clear
-            style="margin-bottom: 20px"
-          />
+          <a-textarea v-model:value="props.data.evaluateDesc" placeholder="请输入" allow-clear style="margin-bottom: 20px" />
           <div class="flex items-center justify-center mb-2">
             <div class="w-1 h-1 bg-blue-400"></div>
             <div style="width: 200px" class="border-1 border-gray font-bold ml-2">下一步处置</div>
           </div>
           <div>
             <a-radio-group v-model:value="props.data.evaluateDeal">
-              <a-radio :style="radioStyle" :value="item.value" v-for="item in nextStatus"
-                >{{ item.label }}
-              </a-radio>
+              <a-radio :style="radioStyle" :value="item.value" v-for="item in nextStatus">{{ item.label }} </a-radio>
             </a-radio-group>
           </div>
           <div class="mt-20 flex justify-center" v-show="props.data.evaluateProgress !== '1'">