Explorar o código

随访功能优化

ZTT hai 1 ano
pai
achega
000b775ba8

+ 14 - 6
src/components/Enabled.vue

@@ -114,6 +114,9 @@ const formProps = reactive<VxeFormProps<FollowModel>>({
     name: [{ required: true, message: '请输入计划名称' }],
     startDate: [{ required: true, message: '请选择开始日期' }],
     endDate: [{ required: true, message: '请选择截止日期' }],
+    // arrangeTime: [{ required: true }],
+    // frequency: [{ required: true }],
+    // remindTime: [{ required: true }],
   },
 });
 
@@ -143,8 +146,10 @@ const follow = shallowRef<PlanModel>();
 const frequencyArr = ref<any[]>([]);
 const formEmits: VxeFormListeners<PlanModel> = {
   submit({ data }) {
-    console.log(data, '时间复制前');
-    if (arrangeTime.value) {
+    console.log(data, currentPushTime.value, '时间复制前', arrangeTime.value);
+    if (!arrangeTime.value) {
+      data.arrangeTime = currentPushTime.value;
+    } else {
       data.arrangeTime = arrangeTime.value;
     }
     if (remindTime.value) {
@@ -158,7 +163,7 @@ const formEmits: VxeFormListeners<PlanModel> = {
     }
     formCheck(data);
     follow.value = { ...data };
-    console.log(data, follow.value, '时间复制');
+    console.log(follow.value, '时间复制');
   },
 };
 // 第二步 填写筛选病人表单
@@ -282,8 +287,9 @@ const followTimesArr = ref<any[]>([]);
 function changeFrequency() {
   const length = followTimesArr.value.length;
   const diff = (formProps.data?.frequency ?? 0) - length;
+  console.log(props.data?.frequency, '随访次数');
   if (diff > 0) {
-    for (let i = 0; i < diff; i++) {
+    for (var i = 0; i < diff; i++) {
       followTimesArr.value.push({
         field: 'secondTimes',
         title: `第${length + i + 1}随访时间`,
@@ -291,7 +297,9 @@ function changeFrequency() {
         slots: { default: 'secondTimes' },
         data: formProps?.data?.frequencyDays?.split(',')[i]
           ? formProps?.data?.frequencyDays?.split(',')[i]
-          : 0,
+          : props.data?.frequency === undefined
+            ? length + i + 1
+            : 1,
       });
     }
   } else {
@@ -348,7 +356,7 @@ function changeStep(currentStep) {
 }
 
 // 推送时间
-const currentPushTime = ref<string>();
+const currentPushTime = ref<string>(timeArr[0]);
 
 function selectPushTime(item, pushIndex) {
   arrangeTime.value = item;

+ 27 - 12
src/components/Evaluation.vue

@@ -23,18 +23,24 @@ const { loading, send: getDetail } = useRequest(EvaluateDetailMethod, {
   immediate: false,
   initialData: props.data ?? defaultModel,
 }).onSuccess(({ data }) => {
+  let medicalObj = {
+    arrangeTime: data?.medicalTime,
+    tonguefaceAnalysisReport: data?.tonguefaceAnalysisReport,
+  };
+  data.tasks.unshift(medicalObj);
+  console.log(data.tasks, '666');
   const tasks = data.tasks.map((item) => {
     let obj = {
       date: item.fillinTime || item.arrangeTime,
-      k3: item.analysis.tongue.pictures[0],
-      k4: item.analysis.tongue.pictures[1],
-      k5: item.analysis.face.pictures[0],
+      k3: item?.analysis?.tongue.pictures[0],
+      k4: item?.analysis?.tongue.pictures[1],
+      k5: item?.analysis?.face.pictures[0],
     };
-    item.analysis.tongue.analysis.forEach((analysis) => {
-      obj[analysis.subcategory] = analysis.resultValue;
+    item?.analysis?.tongue?.analysis.forEach((analysis) => {
+      obj[analysis?.subcategory] = analysis.resultValue;
     });
-    item.analysis.face.analysis.forEach((analysis) => {
-      obj[analysis.subcategory] = analysis.resultValue;
+    item.analysis?.face?.analysis.forEach((analysis) => {
+      obj[analysis?.subcategory] = analysis?.resultValue;
     });
     return obj;
   });
@@ -57,10 +63,12 @@ const { loading: submitting, send: submit } = useRequest(tagEditMethod, {
 const gridOptions = reactive<VxeGridProps<FormModel>>({
   border: true,
   showOverflow: true,
-  width: 900,
   height: 780,
   showHeader: false,
   columns: [{ field: 'title', title: '-', slots: { default: 'cell' } }],
+  // columnConfig:{
+  //   width:'auto'
+  // },
   data: [
     { title: '日期', key: 'date', col0: '-' },
     { title: '好转', key: 'k1' },
@@ -70,8 +78,12 @@ const gridOptions = reactive<VxeGridProps<FormModel>>({
     { title: '面部', key: 'k5' },
   ],
   cellStyle({ row, rowIndex, column, columnIndex }) {
+    // console.log('rowIndex:',rowIndex,'columnIndex',columnIndex);
     const value = row[column.field];
     const style = {};
+    if (columnIndex === 1) {
+      style.width = '100px';
+    }
     if (value?.includes('(') && value?.includes(')')) {
       style.color = 'red';
     }
@@ -177,7 +189,7 @@ function subEvalation() {
         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.createTime }}</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>
@@ -185,10 +197,10 @@ function subEvalation() {
       <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">症状:{{ props.data?.syndrome }}</div>
+      <div class="pl-6">症状:{{ props.data?.syndromeList.join(',') }}</div>
     </div>
 
-    <vxe-grid class="reverse-table ssss" v-bind="gridOptions">
+    <vxe-grid class="reverse-table detail" v-bind="gridOptions">
       <template #cell="{ row, rowIndex, column, columnIndex }">
         <a-image
           style="height: 100px"
@@ -207,6 +219,9 @@ function subEvalation() {
             对比
           </div>
         </div>
+        <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>
       <!--      已经评估-->
@@ -289,7 +304,7 @@ function subEvalation() {
   </div>
 </template>
 <style scoped lang="scss">
-.ssss {
+.detail {
   :deep(.vxe-cell) {
     height: 100% !important;
   }

+ 1 - 1
src/pages/index/follow/plan.vue

@@ -262,7 +262,7 @@ function editPlan(model?: PlanModel, index?: number) {
   VxeUI.modal.open({
     title: model?.id ? `修改随访计划` : `新增随访计划`,
     height: 800,
-    width: 800,
+    width: 850,
     position: {
       top: Math.min(100, window.innerHeight * 0.1),
     },

+ 1 - 1
src/pages/index/follow/task.vue

@@ -241,7 +241,7 @@ const progressArray = ref(['0', '1']);
       <vxe-grid ref="gridRef" v-bind="gridOptions" v-on="gridEvents" :loading="loading">
         <template #btn="{ row, rowIndex }">
           <div v-if="row.progress === '1'">
-            <vxe-button @click="remind(row, rowIndex)">提醒</vxe-button>
+            <vxe-button @click="remind(row, rowIndex)" v-show="row.isCanRemind==='Y'">提醒</vxe-button>
             <vxe-button @click="fillFollow(row, rowIndex)">填写随访</vxe-button>
           </div>
           <div v-else>