xiaochan преди 8 месеца
родител
ревизия
e9d9ad4c9e
променени са 2 файла, в които са добавени 79 реда и са изтрити 78 реда
  1. 30 35
      src/api/emr-control/emr-control.ts
  2. 49 43
      src/components/cy/date-range/CyDateRange.vue

+ 30 - 35
src/api/emr-control/emr-control.ts

@@ -2,49 +2,44 @@ import request from "./request";
 import requestV2 from "../../utils/request-v2";
 
 export function linkQualityControl(data: any) {
-    return request({
-        url: '/emrQualityControl/linkControl',
-        method: 'post',
-        data
-    })
+  return request({
+    url: "/emrQualityControl/linkControl",
+    method: "post",
+    data,
+  });
 }
 
-export function obtainTheProportionOfMedicalRecords(startDate: string, endDate: string, finalControl: number) {
-    return requestV2<string>({
-        url: '/emrQualityControl/obtainTheProportionOfMedicalRecords',
-        method: 'get',
-        params: {startDate, endDate, finalControl}
-    })
+export function obtainTheProportionOfMedicalRecords(
+  startDate: string,
+  endDate: string,
+  finalControl: number
+) {
+  return requestV2<string>({
+    url: "/emrQualityControl/obtainTheProportionOfMedicalRecords",
+    method: "get",
+    params: { startDate, endDate, finalControl },
+  });
 }
 
 export function finalControl(data: any) {
-    return request({
-        url: '/emrQualityControl/finalControl',
-        method: 'post',
-        data
-    })
+  return request({
+    url: "/emrQualityControl/finalControl",
+    method: "post",
+    data,
+  });
 }
-
-export function selectControlByPatNo(patNo: string, times: number) {
-    return request({
-        url: '/emrQualityControl/selectControlByPatNo',
-        method: 'get',
-        params: {patNo, times}
-    })
-}
-
 export function saveEmr(data: any) {
-    return request({
-        url: '/save',
-        method: 'post',
-        data
-    });
+  return request({
+    url: "/save",
+    method: "post",
+    data,
+  });
 }
 
 export function finalControlAdvancedRetrieval(data: any) {
-    return request({
-        url: '/emrQualityControl/finalControlAdvancedRetrieval',
-        method: 'post',
-        data
-    })
+  return request({
+    url: "/emrQualityControl/finalControlAdvancedRetrieval",
+    method: "post",
+    data,
+  });
 }

+ 49 - 43
src/components/cy/date-range/CyDateRange.vue

@@ -1,6 +1,6 @@
 <script setup lang="ts">
-import {ElDatePicker} from "element-plus";
-import {listNotBlank} from "@/utils/blank-utils";
+import { ElDatePicker } from "element-plus";
+import { listNotBlank } from "@/utils/blank-utils";
 import {
   DATEFORMAT,
   elDateRangeAddTime,
@@ -8,60 +8,66 @@ import {
 } from "@/utils/moment-utils";
 import moment from "moment/moment";
 import XEUtils from "xe-utils";
-import {WritableComputedRef} from "vue";
-import {useVModel} from "@vueuse/core";
+import { WritableComputedRef } from "vue";
+import { useVModel } from "@vueuse/core";
 
 const shortcuts = [
   {
-    text: '今天',
-    value: [moment(), moment()]
+    text: "今天",
+    value: [moment(), moment()],
   },
   {
-    text: '最近一周',
-    value: [moment().subtract(7, 'days'), moment()]
+    text: "最近一周",
+    value: [moment().subtract(7, "days"), moment()],
   },
   {
-    text: '最近一个月',
-    value: [moment().subtract(1, 'months'), moment()]
+    text: "最近一个月",
+    value: [moment().subtract(1, "months"), moment()],
   },
   {
-    text: '最近三个月',
-    value: [moment().subtract(3, 'months'), moment()]
+    text: "最近三个月",
+    value: [moment().subtract(3, "months"), moment()],
   },
   {
-    text: '本月',
-    value: [moment().startOf('month'), moment().endOf('month')]
+    text: "本月",
+    value: [moment().startOf("month"), moment().endOf("month")],
   },
   {
-    text: '上个月',
-    value: [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
+    text: "上个月",
+    value: [
+      moment().subtract(1, "month").startOf("month"),
+      moment().subtract(1, "month").endOf("month"),
+    ],
   },
   {
-    text: '今年',
-    value: [moment().startOf('year'), moment()]
+    text: "今年",
+    value: [moment().startOf("year"), moment()],
   },
   {
-    text: '去年',
-    value: [moment().subtract(1, 'year').startOf('year'), moment().subtract(1, 'year').endOf('year')]
-  }
+    text: "去年",
+    value: [
+      moment().subtract(1, "year").startOf("year"),
+      moment().subtract(1, "year").endOf("year"),
+    ],
+  },
 ];
 
 const props = withDefaults(
-    defineProps<{
-      modelValue?: any;
-      start?: string;
-      end?: string;
-      clearable?: boolean;
-      unlinkPanels?: boolean;
-      shortcutsIndex?: number | string | null;
-    }>(),
-    {
-      start: "startTime",
-      end: "endTime",
-      clearable: true,
-      unlinkPanels: true,
-      shortcutsIndex: null,
-    }
+  defineProps<{
+    modelValue?: any;
+    start?: string;
+    end?: string;
+    clearable?: boolean;
+    unlinkPanels?: boolean;
+    shortcutsIndex?: number | string | null;
+  }>(),
+  {
+    start: "startTime",
+    end: "endTime",
+    clearable: true,
+    unlinkPanels: true,
+    shortcutsIndex: null,
+  }
 );
 
 const emits = defineEmits(["update:modelValue"]);
@@ -87,7 +93,7 @@ const dateRange: WritableComputedRef<string[]> = computed({
     }
   },
   set(value: string[]) {
-    const {start, end} = elDateRangeAddTime(value);
+    const { start, end } = elDateRangeAddTime(value);
     if (isArr) {
       model.value = value === null ? null : [start, end];
     } else {
@@ -109,12 +115,12 @@ onMounted(() => {
 
 <template>
   <el-date-picker
-      v-model="dateRange"
-      :unlinkPanels
-      :shortcuts
-      :clearable
-      type="daterange"
-      style="display: inline-flex; vertical-align: middle; width: 220px"
+    v-model="dateRange"
+    :unlinkPanels
+    :shortcuts
+    :clearable
+    type="daterange"
+    style="display: inline-flex; vertical-align: middle; width: 220px"
   />
 </template>