lxz 2 лет назад
Родитель
Сommit
cd46e504e2

+ 22 - 0
src/api/biz/visit/prepareApi.ts

@@ -0,0 +1,22 @@
+import { defHttp } from '/@/utils/http/axios';
+enum Api {
+  readyPrepare = '/visit/prePrepare/query/personList',
+  prePrepareSailing = '/visit/prePrepare/query/sailings',
+  wardInfo = '/biz/sys/wardInfo/query/list',
+}
+
+/**
+ * @description: 获取透前准备页面人员信息
+ * @method: POET
+ */
+export const readyPrepare = (params?: object) => {
+  return defHttp.post({ url: Api.readyPrepare, params: params });
+};
+
+export const wardInfo = (params?: object) => {
+  return defHttp.post({ url: Api.wardInfo, params: params });
+};
+
+export const prePrepareSailing = (params?: object) => {
+  return defHttp.get({ url: Api.prePrepareSailing, params: params });
+};

+ 19 - 2
src/views/biz/visit/ready/data.ts

@@ -2,6 +2,22 @@ import { BasicColumn } from '/@/components/Table';
 import { FormSchema } from '/@/components/Form';
 import { FormSchema } from '/@/components/Form';
 import { radioBoolean } from '/@/utils/filters';
 import { radioBoolean } from '/@/utils/filters';
 import { listDictModel } from '/@/api/common';
 import { listDictModel } from '/@/api/common';
+import { ColorEnum } from '@/enums/colorEnum';
+
+export enum TitleEnum {
+  finish = '已完成',
+  finishColor = ColorEnum.MUTED,
+  finishBg = ColorEnum.MUTED_BG,
+  printable = '可打印',
+  printableColor = ColorEnum.SUCCESS,
+  printableBg = ColorEnum.SUCCESS_BG,
+  unWeighed = '未称量',
+  unWeighedColor = ColorEnum.PRIMARY,
+  unWeighedBg = ColorEnum.PRIMARY_BG,
+  unconfirmed = '待确认',
+  unconfirmedColor = ColorEnum.WARNING,
+  unconfirmedBg = ColorEnum.WARNING_BG,
+}
 
 
 export const dataFormSchema: FormSchema[] = [
 export const dataFormSchema: FormSchema[] = [
   {
   {
@@ -13,7 +29,7 @@ export const dataFormSchema: FormSchema[] = [
     },
     },
   },
   },
   {
   {
-    field: 'PlainText1111',
+    field: 'PlainText',
     component: 'RadioDescGroup',
     component: 'RadioDescGroup',
     label: '1、干体重在过去3~6个月总的变化',
     label: '1、干体重在过去3~6个月总的变化',
     componentProps: {
     componentProps: {
@@ -78,7 +94,7 @@ export const dataFormSchema: FormSchema[] = [
   {
   {
     field: 'configKey',
     field: 'configKey',
     label: '参数键名',
     label: '参数键名',
-    labelColor: '#818694',
+    labelColor: '#81869 4',
     subLabel: '测试',
     subLabel: '测试',
     subLabelColor: '#FF5D39',
     subLabelColor: '#FF5D39',
     component: 'Input',
     component: 'Input',
@@ -175,6 +191,7 @@ export const dataFormSchema: FormSchema[] = [
     },
     },
   },
   },
 ];
 ];
+
 export const columns: BasicColumn[] = [
 export const columns: BasicColumn[] = [
   {
   {
     title: '名称',
     title: '名称',

+ 150 - 0
src/views/biz/visit/ready/importView.vue

@@ -0,0 +1,150 @@
+<template>
+  <BasicModal
+    @register="registerModal"
+    width="500px"
+    title="导入数据"
+    @ok="handleSubmit"
+    @cancel="handleCancel"
+  >
+    <Card style="background-color: rgb(240 240 240)" v-if="statsUpload == 'done'">
+      <h2 style="text-align: center">数据导入中...</h2>
+      <h5 style="text-align: center">请不要离开此页面</h5>
+      <Progress :percent="percentProgress" :showInfo="false" status="active" />
+    </Card>
+    <Card style="background-color: rgb(240 240 240)" v-else-if="statsUpload == 'success'">
+      <h2 style="text-align: center">成功</h2>
+      <h2 style="text-align: center"><a @click="goOnImport">继续导入</a></h2>
+    </Card>
+    <Card style="background-color: rgb(240 240 240)" v-else-if="statsUpload == 'fail'">
+      <h2 style="text-align: center">失败</h2>
+      <h5 style="text-align: center"><a @click="getExportExcel">下载失败文件</a></h5>
+      <div style="text-align: center">
+        <span> 失败: {{ importExcelInfo.fail }}</span>
+        <span> 成功: {{ importExcelInfo.success }}</span>
+        <span> 总数: {{ importExcelInfo.total }}</span>
+      </div>
+    </Card>
+    <Card style="background-color: rgb(240 240 240)" v-else>
+      <h2 style="text-align: center">选择需要导入的文件</h2>
+      <h5 style="text-align: center"
+        >若您是第一次上传文件,可先下载<a @click="downloadFile">文件模板</a>,文件大小不超过5M</h5
+      >
+      <div class="flex flex-col justify-center">
+        <Upload
+          class="button-style"
+          name="file"
+          :beforeUpload="handleBeforeUpload"
+          :maxCount="1"
+          :action="uploadApi"
+          @change="onChange"
+        >
+          <Button type="primary"> 点击上传 </Button>
+        </Upload>
+      </div>
+      <!-- //v-auth="['dialysis:patientbasic:import']" -->
+    </Card>
+  </BasicModal>
+</template>
+<script lang="ts" setup>
+  import { onBeforeMount, onUnmounted, reactive, ref } from 'vue';
+  import { Card } from 'ant-design-vue';
+  import { Progress } from 'ant-design-vue';
+  import { Upload } from 'ant-design-vue';
+  import { Button } from '/@/components/Button';
+  import { BasicModal, useModalInner } from '/@/components/Modal';
+  import { useGlobSetting } from '/@/hooks/setting';
+  import { excelSheetDetail, getDownloadUrl, tempDownload } from '/@/api/common/index';
+  const globSetting = useGlobSetting();
+  import { listDictModel } from '/@/api/common';
+  import { downloadByBase64, downloadByUrl } from '/@/utils/file/download';
+  const uploadApi = globSetting.apiUrl + '/archives/patientBasic/import/batch';
+  const fileUpload = ref();
+  const typeOptions = ref();
+  const statsUpload = ref('default');
+  const timer = ref(null);
+  const exportFileId = ref('');
+  const percentProgress = ref(0);
+  const importExcelInfo = reactive({
+    success: 0,
+    fail: 0,
+    total: 0,
+  });
+
+  onBeforeMount(async () => {
+    typeOptions.value = await listDictModel({ dictCode: 'sys_login_log_type' });
+    fileUpload.value = '';
+  });
+  // closeModal
+  const [registerModal, { setModalProps }] = useModalInner(async data => {
+    console.log('🚀 ~ file: code.vue:21 ~ data:', data);
+    setModalProps({ confirmLoading: false });
+  });
+  async function handleBeforeUpload(file) {
+    console.log('file', file);
+    fileUpload.value = file;
+  }
+  async function handleSubmit() {
+    console.log('11111');
+  }
+  function handleCancel() {
+    statsUpload.value = 'default';
+  }
+  function goOnImport() {
+    statsUpload.value = 'default';
+  }
+  async function onChange(file) {
+    if (file.file.status === 'done') {
+      statsUpload.value = 'done';
+      const id = file.file.response.data;
+      if (id) {
+        timer.value = setInterval(async function () {
+          const importStats = await excelSheetDetail(id);
+          console.log('importStats', importStats);
+          importExcelInfo.fail = importStats.failCount;
+          importExcelInfo.success = importStats.successCount;
+          importExcelInfo.total = importStats.totalCount;
+          // 进度条
+          percentProgress.value =
+            ((importStats.failCount + importStats.successCount) / importStats.totalCount) * 100;
+          console.log('进度条:', percentProgress.value);
+          const isFinish =
+            importStats.failCount + importStats.successCount == importStats.totalCount;
+          if (isFinish) {
+            clearInterval(timer.value);
+            setTimeout(() => {
+              if (importStats.failCount) {
+                statsUpload.value = 'fail';
+                exportFileId.value = importStats.exportFileId;
+                percentProgress.value = 0;
+              } else {
+                statsUpload.value = 'success';
+                percentProgress.value = 0;
+              }
+            }, 3000);
+          }
+        }, 1000);
+      }
+    }
+  }
+
+  async function getExportExcel() {
+    const res = await getDownloadUrl(exportFileId.value);
+    console.log('res', res);
+    downloadByUrl({ url: res });
+  }
+  async function downloadFile() {
+    const res = await tempDownload([]);
+    downloadByBase64(res.base64, res.fileName + '.xlsx');
+  }
+  onUnmounted(() => {
+    timer.value ? clearInterval(timer.value) : null;
+  });
+</script>
+<style lang="less" scoped>
+  .button-style {
+    display: flex;
+    justify-content: center;
+    flex-direction: column;
+    align-items: center;
+  }
+</style>

+ 197 - 491
src/views/biz/visit/ready/index.vue

@@ -4,14 +4,7 @@
     <a-button type="primary" @click="plusFn">
     <a-button type="primary" @click="plusFn">
       {{ countRef }}
       {{ countRef }}
     </a-button> -->
     </a-button> -->
-    <XTTitle title="透析病历" :right-data="titleData" />
-
-    <div class="mt-6" />
-    <XTTab type="illness11" :selected="tabSelected" :data="tabData1" @item-click="callTab" />
-    <div class="mt-6" />
-    <div class="mt-6" />
-    <XTTab type="illness11" :selected="tabSelected" :data="tabData2" @item-click="callTab" />
-    <div class="mt-6" />
+    <XTTitle title="透析病历" :right-data="titleData" @click="cellTitle" />
     <div class="flex justify-between my-4">
     <div class="flex justify-between my-4">
       <XTTab
       <XTTab
         type="illness"
         type="illness"
@@ -20,67 +13,12 @@
         :data="tabData"
         :data="tabData"
         @item-click="callTab"
         @item-click="callTab"
       />
       />
-      <XTForm :form-data="formData" />
-    </div>
-    <div class="flex">
-      <Sift :data="siftData" />
-    </div>
-    <div class="m-6">
-      <BasicForm @register="registerForm" @field-value-change="filedChange" />
+      <XTForm :form-data="formData" @change="cellFrom" />
     </div>
     </div>
     <div>
     <div>
-      <BasicTable @register="registerTable">
-        <template #headerTop>
-          <span>headerTop</span>
-        </template>
-        <template #toolbar>
-          <span>toolbar</span>
-        </template>
-      </BasicTable>
-    </div>
-    <div class="mx-6 my-2">
-      <ChartsCard
-        title="透前血压趋势"
-        :has-safe="true"
-        :colors="chartData.colors"
-        :safe-range="chartData.safeRange"
-      />
-    </div>
-    <div class="mx-6 my-2">
-      <DescCard
-        id="1"
-        icon="icon-xt-add_default"
-        title="透析测量"
-        type="touxi"
-        :data="descData"
-        :right="descRight"
-      />
-    </div>
-    <div class="mx-6 my-2">
-      <TimeLine :data="timeLineData" @hover="callHover">
-        <template #head>
-          <transition class="animate__animated animate__slideInLeft">
-            <div class="timeline-outer" v-if="timeOuter">
-              <div class="timeline-outer_item" @click="handleAdd">AVF</div>
-              <div class="timeline-outer_item">AVH</div>
-              <div class="timeline-outer_item">TCG</div>
-            </div>
-          </transition>
-        </template>
-      </TimeLine>
-    </div>
-    <div class="mx-6 my-2">
-      <List type="default" :data="listData" selected="0" />
-    </div>
-    <div class="mx-6 my-2">
-      <List type="attachment" :data="listData1" selected="0" :width="320" />
-    </div>
-    <div class="flex justify-between">
-      <XTCard class="m-2" :data="cardData1" @item-click="cellCard" />
-    </div>
-    <div class="flex justify-between">
-      <XTCard class="m-2" :data="cardData" @item-click="cellCard" />
+      <XTCard class="flex justify-around my-2" :data="dataCard" @item-click="cellCard" />
     </div>
     </div>
+    <importView @register="registerModal" />
   </div>
   </div>
 </template>
 </template>
 
 
@@ -90,20 +28,28 @@
   import { XTCard } from '/@/components/XTCard/index';
   import { XTCard } from '/@/components/XTCard/index';
   import { XTForm } from '/@/components/XTForm/index';
   import { XTForm } from '/@/components/XTForm/index';
   import { XTTitle } from '/@/components/XTTitle/index';
   import { XTTitle } from '/@/components/XTTitle/index';
-  import { ColorEnum } from '/@/enums/colorEnum';
-  import { BasicForm, useForm } from '/@/components/Form';
-  import { dataFormSchema, columns } from './data';
-  import { BasicTable, useTable } from '/@/components/Table';
   import { onMounted } from 'vue';
   import { onMounted } from 'vue';
-  import ChartsCard from '/@/components/XTCard/src/ChartsCard.vue';
-  import DescCard from '/@/components/XTCard/src/DescCard.vue';
-  import TimeLine from '/@/components/XTTimeLine/src/TimeLine.vue';
-  import List from '/@/components/XTList/src/List.vue';
-  import { Sift } from '/@/components/XTList/index';
-  // import { TransitionPresets, useTransition } from '@vueuse/core';
+  import { readyPrepare, prePrepareSailing, wardInfo } from '/@/api/biz/visit/prepareApi';
+  import { TitleEnum } from './data';
+  import { nanoid } from 'nanoid';
+  import { useModal } from '/@/components/Modal';
+  import importView from './importView.vue';
+  const dataCard = ref([]) as any; // 卡片数据
+  const tabSelected = ref('0'); // 默认病区 // 病区id
+  const SailingList = ref([]) as any; // 班次列表
+  const tabData = ref([]);
+  const Status = ref(''); // 状态
+  const Name = ref('');
+  const Sailing = ref('1'); //班次
+  // const wardId = ref('');
+  // const abcdefg = [
+  //   { key: '0', label: '全部' },
+  //   { key: '1', label: 'A区' },
+  //   { key: '2', label: 'B区' },
+  // ];
+  // 默认状态
 
 
-  const tabSelected = ref('0');
-  const dataSource = ref([]);
+  const [registerModal, { openModal }] = useModal();
   const titleData = [
   const titleData = [
     {
     {
       type: 'import',
       type: 'import',
@@ -119,457 +65,217 @@
       btnText: '患者建档',
       btnText: '患者建档',
     },
     },
   ];
   ];
-  const siftData = [
-    {
-      field: 'gender',
-      label: '性别',
-      value: '男',
-    },
-    {
-      field: 'age',
-      label: '年龄区间',
-      value: '25岁-50岁',
-    },
-  ];
-  const chartData = {
-    colors: [
-      {
-        color: 'rgba(0, 117, 255, 1)',
-        label: '化验值',
-        dot: 'rgba(0, 117, 255, 1)',
-      },
-    ],
-    safeRange: [
-      {
-        // name: '60分到80分',
-        yAxis: 0,
-      },
-      {
-        yAxis: 20,
-      },
-    ],
-  };
-  const listData = [
-    {
-      id: '0',
-      title: '红细胞笔迹测定',
-      startTime: '2023-11-11 12:00',
-      endTime: '2023-12-11 12:00',
-      status: 'default',
-    },
-    {
-      id: '2',
-      title: '红细胞笔迹测定2',
-      startTime: '2023-11-11 12:00',
-      endTime: '2023-12-11 12:00',
-      status: 'default',
-    },
-  ];
-  const listData1 = [
-    {
-      id: '0',
-      title: '红细胞笔迹测定',
-      startTime: '2023-11-11 12:00',
-      endTime: '2023-12-11 12:00',
-      status: 'default',
-    },
-    {
-      id: '2',
-      title: '红细胞笔迹测定2',
-      startTime: '2023-11-11 12:00',
-      endTime: '2023-12-11 12:00',
-      status: 'default',
-    },
-  ];
 
 
-  const descData = [
-    {
-      label: '诊断名称/病史/状态',
-      value: '乙肝 / 2022-01-19 ~',
-      tags: [{ id: '12', label: '活动中', type: 'error' }],
-    },
-    {
-      label: '备注',
-      value: '药物治疗或其他治疗',
-    },
-    {
-      label: '测试',
-      value: '药物治疗或其他治疗',
-    },
-    {
-      label: '诊断名称/病史/状态备份',
-      value: '结核 / 2022-02-10 ~ 20',
-      tags: [
-        { id: '1', label: '未活动', type: 'muted' },
-        { id: '2', label: '未活动1', type: 'primary' },
-      ],
-    },
-  ];
-  const descRight = {
-    show: true,
-    date: '2023-04-23',
-    doctor: '张医生',
-    edit: true,
-    delete: true,
-  };
-
-  const timeLineData = [
-    {
-      id: '1',
-      dot: '王医生',
-      date: '2023-05-20',
-      cnt: {
-        title: '测试' + Math.round(Math.random() * 1000),
-        id: '123',
-        type: '123',
-        data: descData,
-      },
-    },
-    {
-      id: '12',
-      dot: '范医生',
-      date: '2023-03-20',
-      cnt: {
-        title: '测试' + Math.round(Math.random() * 1000),
-        id: '123',
-        type: '123',
-        data: descData,
-      },
-    },
-  ];
-  const timeOuter = ref(false);
   onMounted(async () => {
   onMounted(async () => {
-    for (let i = 0; i < 10; i++) {
+    const PrepareData = await readyPrepare({ sailingSort: '1' });
+    const SailingData = await prePrepareSailing();
+    const wardData = await wardInfo();
+    for (const i of SailingData) {
       const obj = {
       const obj = {
-        createTime: '2023-05-23 10:09:48',
-        updateTime: '2023-05-23 19:00:32',
-        id: '1660830352886149125' + Math.round(Math.random() * 10000),
-        name: '驼人',
-        packageId: '1655202440997244930',
-        packageName: '测试套餐',
-        username: 'tuoren',
-        type: 'custom',
-        contractUser: 'Lf',
-        contactMobile: '18339543638',
-        remark: null,
-        disable: 0,
+        label: i.name,
+        value: i.sort,
       };
       };
-      dataSource.value.push(obj);
+      SailingList.value.push(obj);
     }
     }
-
-    await setFieldsValue({
-      configName333: {
-        bool: 1,
-        remark: '321321dsada',
-        dictValues: ['DIC_BIZ', '-1'],
-      },
-      configValue: [100, 150],
-      idCard: {
-        input: '测试',
-        dictValue: 'DICT_SYS',
-      },
-      apiCheck: ['pump_single'],
-    });
-  });
-  // const count = ref(0);
-  // const countRef = useTransition(count, {
-  //   duration: 1000,
-  //   transition: TransitionPresets.easeInCirc,
-  // });
-  // function plusFn() {
-  //   count.value = Math.round(Math.random() * 100);
-  // }
-  // const [registerTable, { reload, getCacheColumns, setColumns }] = useTable({
-  const [registerTable] = useTable({
-    id: 'sys_config',
-    title: '参数列表2121',
-    columns,
-    dataSource: dataSource,
-    useSearchForm: false,
-    titleStyle: {
-      fontSize: '14px',
-      color: '#000a18',
-      cursor: 'default',
-    },
-    titleLined: true,
-    bordered: false,
-    showIndexColumn: false,
-    pagination: false,
-    // maxHeight: 350,
-    canResize: false,
-  });
-
-  const [registerForm, { setFieldsValue }] = useForm({
-    layout: 'vertical',
-    labelWidth: '100%',
-    baseColProps: {
-      span: 8,
-    },
-    baseRowGutter: [16, 8],
-    schemas: dataFormSchema,
-    showActionButtonGroup: false,
-    actionColOptions: {
-      span: 8,
-    },
-    showResetButton: false,
-    submitButtonOptions: {
-      text: '添加',
-    },
+    for (const i of wardData) {
+      if (!i.disable) {
+        const obj = {
+          key: i.id,
+          label: i.name,
+        };
+        tabData.value.push(obj);
+      }
+    }
+    console.log('PrepareData', PrepareData);
+    for (const i in PrepareData) {
+      // console.log('i', i, PrepareData[i]);
+      if (PrepareData[i] == null) continue;
+      const obj = {
+        groupKey: PrepareData[i] ? i : nanoid(),
+        groupTit: TitleEnum[i],
+        groupMode: 'simple',
+        groupValue: [
+          {
+            value: PrepareData[i] ? PrepareData[i].length : 0,
+            color: TitleEnum[i + 'Color'],
+            background: TitleEnum[i + 'Bg'],
+          },
+        ],
+        groupValueShow: true,
+        groupData: PrepareData[i].map(ele => {
+          return {
+            id: ele.patientBasicId,
+            type: '1',
+            borderLeftColor: TitleEnum[i + 'Color'],
+            ward: ele.inpatientWard,
+            bed: ele.bed,
+            cure: 'HDF/AVF',
+            name: ele.name,
+            age: ele.age,
+            gender: ele.gender,
+            infoShow: false,
+            way: [
+              { label: '透前称量', type: '2' },
+              { label: '确认配方', type: '3' },
+            ],
+          };
+        }),
+      };
+      dataCard.value.push(obj);
+    }
+    console.log(' dataCard.value', dataCard.value);
   });
   });
 
 
-  function filedChange(key, value) {
-    console.log('🚀 ~ file: index.vue:47 ~ filedChange ~ value:', value);
-    console.log('🚀 ~ file: index.vue:47 ~ filedChange ~ key:', key);
-  }
-  const tabData = [
-    {
-      key: '0',
-      label: '全部',
-      value: 128,
-      hasValue: true,
-      hasBracket: true,
-    },
-    {
-      key: '1',
-      label: 'A区',
-      value: 12,
-      hasValue: true,
-      prefixColor: '#1BC1B3',
-      valueColor: 'red',
-      hasBracket: true,
-    },
-    {
-      key: '2',
-      label: 'B区',
-      value: 18,
-      hasValue: true,
-      prefixColor: '#854AFF',
-      hasBracket: true,
-    },
-  ];
-  const tabData2 = [
-    {
-      key: '0',
-      label: 'A1',
-    },
-    {
-      key: '1',
-      label: 'A2',
-      disabled: true,
-    },
-    {
-      key: '2',
-      label: 'B3',
-    },
-  ];
-  const tabData1 = [
-    {
-      key: '0',
-      label: '全部',
-    },
-    {
-      key: '1',
-      label: 'A区',
-    },
-    {
-      key: '2',
-      label: 'B区',
-    },
-  ];
   // formdata
   // formdata
   const formData = [
   const formData = [
     {
     {
-      name: 'text',
+      name: 'prepareStatus',
       label: '全部',
       label: '全部',
       componentType: 'Select',
       componentType: 'Select',
       placeholder: '请选择',
       placeholder: '请选择',
-      width: 80,
-      defaultValue: '1',
+      width: 100,
+      defaultValue: '',
       dicts: [
       dicts: [
-        { label: '全部', value: '1' },
-        { label: '未称量', value: '2', prefixColor: '#1BC1B3' },
-        { label: '待确认', value: '3', prefixColor: '#854AFF' },
-        { label: '可打印', value: '4', prefixColor: '#1BC1B3' },
-        { label: '完成', value: '5', prefixColor: '#854AFF' },
+        { label: '全部', value: '' },
+        { label: '未称量', value: 'pds_unWeighed', prefixColor: TitleEnum.unWeighedColor },
+        { label: '待确认', value: 'pds_unconfirmed', prefixColor: TitleEnum.unconfirmedColor },
+        { label: '可打印', value: 'pds_printable', prefixColor: TitleEnum.printableColor },
+        { label: '已完成', value: 'pds_finish', prefixColor: TitleEnum.finishColor },
       ],
       ],
     },
     },
     {
     {
-      name: 'text22',
+      name: 'sailingSort',
       componentType: 'Select',
       componentType: 'Select',
       placeholder: '请选择',
       placeholder: '请选择',
       width: 120,
       width: 120,
-      defaultValue: '1',
+      defaultValue: '1班',
       label: '班次',
       label: '班次',
-      dicts: [
-        { label: '第一班', value: '1' },
-        { label: '第二班', value: '2' },
-        { label: '第三班', value: '3' },
-      ],
+      dicts: SailingList.value,
     },
     },
     {
     {
-      name: 'text1',
+      name: 'name',
       componentType: 'Input',
       componentType: 'Input',
       placeholder: '请输入',
       placeholder: '请输入',
       width: 200,
       width: 200,
     },
     },
-    {
-      name: 'text233',
-      componentType: 'DatePicker',
-      placeholder: '请输入',
-      format: 'YYYY-MM-DD',
-      valueFormat: 'YYYY-MM-DD',
-    },
-    {
-      name: 'text233',
-      componentType: 'RangePicker',
-      placeholder: '请输入',
-      format: 'YYYY-MM-DD',
-      valueFormat: 'YYYY-MM-DD',
-    },
-    {
-      name: 'filter',
-      componentType: 'IconBtn',
-      count: 4,
-    },
-  ];
-  // card 标签组
-  const cardData = [
-    {
-      groupKey: '123',
-      groupTit: '待确认/测试/待核对',
-      groupMode: 'default',
-      groupValue: [
-        { value: 10, color: ColorEnum.BLUE, background: ColorEnum.BLUE_BG },
-        { value: 1, color: ColorEnum.MUTED, background: ColorEnum.MUTED_BG },
-        { value: 4, color: ColorEnum.PRIMARY, background: ColorEnum.PRIMARY_BG },
-      ],
-      groupValueShow: true,
-      groupData: [
-        {
-          id: '1',
-          type: '1',
-          borderLeftColor: ColorEnum.BLUE,
-          ward: 'A区',
-          bed: '99',
-          cure: 'HDF/AVF',
-          name: '范了饭饭饭',
-          age: 20,
-          gender: '1',
-          infoShow: true,
-          info: [
-            { label: '时间', value: '4:00', span: 12 },
-            { label: '超滤量', value: '2.1', suffix: 'kg', span: 12 },
-            { label: '血流量', value: '300', span: 12 },
-            { label: '透析器', value: 'fx60', span: 12 },
-            { label: '抗凝剂', value: '低分子肝素1配上低分子肝素2', span: 24 },
-          ],
-          way: [
-            { label: '下机', type: '0' },
-            { label: '医嘱执行', type: '1', badge: 12 },
-            { label: '记录并发症', type: '2', badge: 2 },
-            { label: '交叉核对', type: '3' },
-          ],
-        },
-        {
-          id: '12',
-          type: '2',
-          borderLeftColor: ColorEnum.PRIMARY,
-          ward: 'C区',
-          bed: '99',
-          cure: 'HDF/AVF',
-          name: '范了饭饭饭',
-          age: 20,
-          gender: '1',
-          infoShow: true,
-          info: [
-            { label: '时间', value: '4:00', span: 12 },
-            { label: '超滤量', value: '2.1', suffix: 'kg', span: 12 },
-            { label: '血流量', value: '300', span: 12 },
-            { label: '透析器', value: 'fx60', span: 12 },
-            { label: '抗凝剂', value: '低分子肝素1配上低分子肝素2', span: 24 },
-          ],
-          way: [
-            { label: '下机', type: '0' },
-            { label: '医嘱执行', type: '1', badge: 12 },
-            { label: '记录并发症', type: '2', badge: 2 },
-            { label: '交叉核对', type: '3' },
-          ],
-        },
-        {
-          id: '3',
-          type: '3',
-          borderLeftColor: ColorEnum.MUTED,
-          ward: 'C区',
-          bed: '99',
-          cure: 'HDF/AVF',
-          name: '范了饭饭饭',
-          age: 20,
-          gender: '1',
-          infoShow: true,
-          info: [
-            { label: '时间', value: '4:00', span: 12 },
-            { label: '超滤量', value: '2.1', suffix: 'kg', span: 12 },
-            { label: '血流量', value: '300', span: 12 },
-            { label: '透析器', value: 'fx60', span: 12 },
-            { label: '抗凝剂', value: '低分子肝素1配上低分子肝素2', span: 24 },
-          ],
-          way: [
-            { label: '下机', type: '0' },
-            { label: '医嘱执行', type: '1', badge: 12 },
-            { label: '记录并发症', type: '2', badge: 2 },
-            { label: '交叉核对', type: '3' },
-          ],
-        },
-      ],
-    },
-  ];
-  const cardData1 = [
-    {
-      groupKey: '123',
-      groupTit: '待确认/测试',
-      groupMode: 'simple',
-      groupValue: [
-        { value: 10, color: ColorEnum.BLUE, background: ColorEnum.BLUE_BG },
-        { value: 1, color: ColorEnum.MUTED, background: ColorEnum.MUTED_BG },
-      ],
-      groupValueShow: true,
-      groupData: [
-        {
-          id: '1',
-          type: '1',
-          borderLeftColor: ColorEnum.BLUE,
-          ward: 'A区',
-          bed: '99',
-          cure: 'HDF/AVF',
-          name: '范了饭饭饭',
-          age: 20,
-          gender: '1',
-          infoShow: false,
-          way: [
-            { label: '透前称量', type: '2' },
-            { label: '确认配方', type: '3' },
-          ],
-        },
-      ],
-    },
   ];
   ];
 
 
-  function handleAdd() {
-    timeOuter.value = false;
-  }
   // 回调
   // 回调
-  function callTab(data) {
+  async function callTab(data) {
     console.log('🚀 ~ file: index.vue:41 ~ callTab ~ data:', data);
     console.log('🚀 ~ file: index.vue:41 ~ callTab ~ data:', data);
     tabSelected.value = data.value;
     tabSelected.value = data.value;
+    const formData = {
+      prepareStatus: Status.value,
+      sailingSort: Sailing.value,
+      name: Name.value,
+      inpatientWardId: tabSelected.value,
+    };
+    const PrepareData = await readyPrepare(formData);
+    console.log('PrepareData', PrepareData);
+    dataCard.value = [];
+    for (const i in PrepareData) {
+      // console.log('i', i, PrepareData[i]);
+      if (PrepareData[i] == null) continue;
+      const obj = {
+        groupKey: PrepareData[i] ? i : nanoid(),
+        groupTit: TitleEnum[i],
+        groupMode: 'simple',
+        groupValue: [
+          {
+            value: PrepareData[i] ? PrepareData[i].length : 0,
+            color: TitleEnum[i + 'Color'],
+            background: TitleEnum[i + 'Bg'],
+          },
+        ],
+        groupValueShow: true,
+        groupData: PrepareData[i].map(ele => {
+          return {
+            id: ele.patientBasicId,
+            type: '1',
+            borderLeftColor: TitleEnum[i + 'Color'],
+            ward: ele.inpatientWard,
+            bed: ele.bed,
+            cure: 'HDF/AVF',
+            name: ele.name,
+            age: ele.age,
+            gender: ele.gender,
+            infoShow: false,
+            way: [
+              { label: '透前称量', type: '2' },
+              { label: '确认配方', type: '3' },
+            ],
+          };
+        }),
+      };
+      dataCard.value.push(obj);
+    }
   }
   }
 
 
   function cellCard(data) {
   function cellCard(data) {
     console.log('🚀 ~ file: index.vue:106 ~ cellCard ~ data:', data);
     console.log('🚀 ~ file: index.vue:106 ~ cellCard ~ data:', data);
   }
   }
-
-  function callHover() {
-    timeOuter.value = true;
+  //  导入导出回调
+  function cellTitle(data) {
+    console.log('🚀 ~ file: index.vue:106 ~ cellTitle ~ data:', data);
+    if (data.type == 'import') {
+      openModal(true);
+    }
+  }
+  async function cellFrom(data) {
+    Status.value = data.prepareStatus;
+    if (data.sailingSort) {
+      Sailing.value = data.sailingSort;
+    }
+    Name.value = data.name;
+    data.inpatientWardId = tabSelected.value;
+    console.log('🚀 ~ file: index.vue:106 ~ cellFrom ~ data:', data);
+    if (!data.sailingSort) {
+      data.sailingSort = '1';
+    }
+    const PrepareData = await readyPrepare(data);
+    console.log('PrepareData', PrepareData);
+    dataCard.value = [];
+    for (const i in PrepareData) {
+      // console.log('i', i, PrepareData[i]);
+      if (PrepareData[i] == null) continue;
+      const obj = {
+        groupKey: PrepareData[i] ? i : nanoid(),
+        groupTit: TitleEnum[i],
+        groupMode: 'simple',
+        groupValue: [
+          {
+            value: PrepareData[i] ? PrepareData[i].length : 0,
+            color: TitleEnum[i + 'Color'],
+            background: TitleEnum[i + 'Bg'],
+          },
+        ],
+        groupValueShow: true,
+        groupData: PrepareData[i].map(ele => {
+          return {
+            id: ele.patientBasicId,
+            type: '1',
+            borderLeftColor: TitleEnum[i + 'Color'],
+            ward: ele.inpatientWard,
+            bed: ele.bed,
+            cure: 'HDF/AVF',
+            name: ele.name,
+            age: ele.age,
+            gender: ele.gender,
+            infoShow: false,
+            way: [
+              { label: '透前称量', type: '2' },
+              { label: '确认配方', type: '3' },
+            ],
+          };
+        }),
+      };
+      dataCard.value.push(obj);
+    }
   }
   }
+
+  // function callHover() {
+  //   timeOuter.value = true;
+  // }
 </script>
 </script>
 
 
 <style lang="less" scoped>
 <style lang="less" scoped>