LIJU 2 weeks ago
parent
commit
4893ee54cb
1 changed files with 27 additions and 0 deletions
  1. 27 0
      src/components/medical-advice/temperature/GraphicsTempalte.vue

+ 27 - 0
src/components/medical-advice/temperature/GraphicsTempalte.vue

@@ -35,6 +35,9 @@
         <el-button icon="Search" type="primary" @click="queryInfo"
           >查询
         </el-button>
+        <el-button icon="Refresh" type="warning" @click="refreshData"
+          >刷新
+        </el-button>
         <el-button icon="Printer" type="success" v-print="'#scdPrint'"
           >打印 </el-button
         >&nbsp;
@@ -104,6 +107,30 @@ const queryInfo = () => {
   });
 };
 
+// 刷新数据,重新获取周数信息
+const refreshData = () => {
+  if (stringIsBlank(patientInfo.value.inpatientNo)) {
+    return;
+  }
+  clearQueryData();
+  getWeek({
+    inpatientNo: patientInfo.value.inpatientNo,
+    admissTimes: patientInfo.value.admissTimes,
+  }).then(res => {
+    weekMap.value = res;
+    weekList.value = [];
+    for (let i = 1; i <= res.totalWeek; i++) {
+      let temp = {};
+      temp["code"] = i;
+      temp["name"] = `第${i}周`;
+      weekList.value.push(temp);
+    }
+    queryParam.value.week = 1;
+    selectWeek(1);
+    queryInfo();
+  });
+};
+
 onMounted(() => {});
 watch(
   () => props.patientInfo,