Sfoglia il codice sorgente

fix: 透析设备bug修复

Tong 2 anni fa
parent
commit
4eaa7c5d6d

+ 37 - 26
src/views/biz/engineer/dialysis/data.ts

@@ -117,14 +117,12 @@ export const columns: BasicColumn[] = [
     dataIndex: 'useDate',
     align: 'left',
     width: 180,
-    sorter: true,
   },
   {
     title: '生产时间',
     dataIndex: 'produceDate',
     align: 'left',
     width: 180,
-    sorter: true,
   },
   {
     title: '保修期限(年)',
@@ -137,7 +135,7 @@ export const columns: BasicColumn[] = [
 export const dataFormSchema: FormSchema[] = [
   {
     label: '设备编号',
-    field: 'unique',
+    field: 'uniqueCode',
     required: true,
     component: 'Input',
     componentProps: {
@@ -157,6 +155,16 @@ export const dataFormSchema: FormSchema[] = [
       },
     },
   },
+  {
+    label: '设备名称',
+    field: 'name',
+    required: true,
+    component: 'Input',
+    componentProps: {
+      placeholder: '请输入设备名称',
+      maxLength: 60,
+    },
+  },
   {
     label: '传染标识',
     field: 'infectiousDiseases',
@@ -164,7 +172,7 @@ export const dataFormSchema: FormSchema[] = [
     component: 'ApiSelect',
     componentProps: {
       api: listDictModel,
-      mode: 'multiple',
+      mode: 'single',
       params: {
         dictCode: 'pb_epidemic',
       },
@@ -181,15 +189,6 @@ export const dataFormSchema: FormSchema[] = [
     },
   },
 
-  {
-    label: '备注',
-    field: 'remark',
-    required: true,
-    component: 'Input',
-    componentProps: {
-      placeholder: '请输入备注',
-    },
-  },
   {
     label: '泵类型',
     field: 'pumpType',
@@ -221,15 +220,15 @@ export const dataFormSchema: FormSchema[] = [
       placeholder: '请输入型号',
     },
   },
-  {
-    label: '产地',
-    field: 'model',
-    required: true,
-    component: 'Input',
-    componentProps: {
-      placeholder: '请输入产地',
-    },
-  },
+  // {
+  //   label: '产地',
+  //   field: 'model',
+  //   required: true,
+  //   component: 'Input',
+  //   componentProps: {
+  //     placeholder: '请输入产地',
+  //   },
+  // },
   {
     label: '采购金额(万元)',
     field: 'price',
@@ -241,7 +240,7 @@ export const dataFormSchema: FormSchema[] = [
   },
   {
     label: '购入日期',
-    field: 'birthday',
+    field: 'purchaseDate',
     required: true,
     component: 'DatePicker',
     componentProps: {
@@ -256,7 +255,7 @@ export const dataFormSchema: FormSchema[] = [
   },
   {
     label: '使用日期',
-    field: 'birthday',
+    field: 'useDate',
     required: true,
     component: 'DatePicker',
     componentProps: {
@@ -271,7 +270,7 @@ export const dataFormSchema: FormSchema[] = [
   },
   {
     label: '生产日期',
-    field: 'birthday',
+    field: 'produceDate',
     required: true,
     component: 'DatePicker',
     componentProps: {
@@ -286,11 +285,23 @@ export const dataFormSchema: FormSchema[] = [
   },
   {
     label: '保修期限(年)',
-    field: 'price',
+    field: 'warrantyPeriod',
     required: true,
     component: 'InputNumber',
     componentProps: {
       placeholder: '请输入保修期限(年)',
     },
   },
+  {
+    label: '备注',
+    field: 'remark',
+    required: true,
+    component: 'InputTextArea',
+    componentProps: {
+      placeholder: '请输入备注',
+    },
+    colProps: {
+      span: 24,
+    },
+  },
 ];

+ 31 - 56
src/views/biz/engineer/dialysis/index.vue

@@ -17,52 +17,42 @@
       </div>
       <BasicTable @register="registerTable">
         <template #bodyCell="{ column, record }">
-          <template v-if="column.key === 'name'">
-            <span :class="['table-dot', 'table-dot--' + record.status]" />
-            <span>{{ record.name }}</span>
+          <template v-if="column.key === 'useDate'">
+            {{ record.useDate ? dayjs(record.useDate).format('YYYY-MM-DD') : '' }}
           </template>
-          <template v-if="column.key === 'birthday'">
-            {{ record.birthday ? dayjs(record.birthday).format('YYYY-MM-DD') : '' }}
+          <template v-if="column.key === 'produceDate'">
+            {{ record.produceDate ? dayjs(record.produceDate).format('YYYY-MM-DD') : '' }}
           </template>
-          <template v-if="column.key === 'firstDialysisTime'">
-            {{
-              record.firstDialysisTime ? dayjs(record.firstDialysisTime).format('YYYY-MM-DD') : ''
-            }}
+          <template v-if="column.key === 'pumpType'">
+            {{ formatDictValue(bizDictOptions.pumpType, record.pumpType) }}
           </template>
-          <template v-if="column.key === 'gender'">
+          <template v-if="column.key === 'deviceType'">
             <span
+              :class="['table-dot']"
               :style="{
-                backgroundColor: formatDictColor(bizDictOptions.gender, record.gender),
-                color: formatDictFontColor(bizDictOptions.gender, record.gender),
-                padding: '1px 6px',
-                borderRadius: '2px',
-                marginRight: '4px',
+                backgroundColor: formatDictPreColor(bizDictOptions.deviceType, record.deviceType),
               }"
-            >
-              {{ formatDictValue(bizDictOptions.gender, record.gender) }}
-            </span>
-          </template>
-          <template v-if="column.key === 'firstDialysisType'">
-            {{ formatDictValue(bizDictOptions.firstDialysisType, record.firstDialysisType) }}
-          </template>
-          <template v-if="column.key === 'type'">
-            {{ formatDictValue(bizDictOptions.type, record.type) }}
+            />
+            {{ formatDictValue(bizDictOptions.deviceType, record.deviceType) }}
           </template>
           <template v-if="column.key === 'infectiousDiseases'">
             <div class="flex">
               <div
-                v-for="item in record.infectiousDiseases"
-                :key="item"
                 :style="{
-                  backgroundColor: formatDictColor(bizDictOptions.infectiousDiseases, item),
-                  color: formatDictFontColor(bizDictOptions.infectiousDiseases, item),
+                  backgroundColor: formatDictColor(
+                    bizDictOptions.infectiousDiseases,
+                    record.infectiousDiseases,
+                  ),
+                  color: formatDictFontColor(
+                    bizDictOptions.infectiousDiseases,
+                    record.infectiousDiseases,
+                  ),
                   padding: '1px 6px',
                   borderRadius: '2px',
                   marginRight: '4px',
                 }"
               >
-                <!-- {{ record.infectiousDiseases }} -->
-                {{ formatDictValue(bizDictOptions.infectiousDiseases, item) }}
+                {{ formatDictValue(bizDictOptions.infectiousDiseases, record.infectiousDiseases) }}
               </div>
             </div>
           </template>
@@ -105,7 +95,12 @@
   import { archivesPatientBasicStats } from '/@/api/biz/archives/patientBasicApi';
   import { engineerDialysisDeviceQueryPage } from '@/api/biz/engineer/dialysisDeviceApi';
   import { listDictModelBatch } from '@/api/common';
-  import { formatDictColor, formatDictFontColor, formatDictValue } from '/@/utils';
+  import {
+    formatDictColor,
+    formatDictFontColor,
+    formatDictValue,
+    formatDictPreColor,
+  } from '/@/utils';
   import { onMounted, reactive } from 'vue';
   import dayjs from 'dayjs';
   import { useModal } from '/@/components/Modal';
@@ -116,20 +111,12 @@
 
   const bizDictOptions = reactive<any>({});
   const bizDictData = ref([
-    // 血管材料
-    { key: 'gender', dictCode: 'pb_sex' },
-    // 转归类型
-    { key: 'patientReturn', dictCode: 'pb_return' },
-    // 传染病
+    // 泵类型
+    { key: 'pumpType', dictCode: 'bm_pump' },
+    // 设备类型
+    { key: 'deviceType', dictCode: 'bm_det' },
+    // 传染病类型
     { key: 'infectiousDiseases', dictCode: 'pb_epidemic' },
-    // 患者类型
-    { key: 'type', dictCode: 'pb_type' },
-    // 通路类型
-    { key: 'vascularAccess', dictCode: 'va_type' },
-    // 转归原因
-    { key: 'return', dictCode: 'va_return' },
-    // 首次透析方式
-    { key: 'firstDialysisType', dictCode: 'dt' },
   ]);
   // 路由跳转
   const router = useRouter();
@@ -351,18 +338,6 @@
     height: 10px;
     margin-right: 6px;
     border-radius: 50%;
-
-    &--1 {
-      background-color: #1bc1b3;
-    }
-
-    &--2 {
-      background-color: #d3d8dd;
-    }
-
-    &--3 {
-      background-color: #f7b500;
-    }
   }
 
   ::v-deep(.ant-btn-link) {

+ 1 - 1
src/views/biz/visit/deviceDisinfect/index.vue

@@ -242,7 +242,7 @@
       margin-left: 20px;
       margin-top: 20px;
       background-color: #fff !important;
-      display: inline-block;
+      display: inline-flex;
     }
   }
 </style>

+ 1 - 28
src/views/biz/visit/ready/index.vue

@@ -16,11 +16,9 @@
       <XTForm :form-data="formData" @change="cellFrom" />
     </div>
     <div>
-      <XTCard class="flex justify-around my-2" :data="dataCard" @item-click="cellCard" />
+      <XTCard class="flex justify-around my-2" :data="dataCard" />
     </div>
     <importView @register="registerModal" />
-    <beforeWeight @register="registerDrawer" @success="handleSuccess" />
-    <confirmedDrawer @register="registerConfirmedDrawer" @success="handleSuccess" />
   </div>
 </template>
 
@@ -35,10 +33,7 @@
   import { TitleEnum } from './data';
   import { nanoid } from 'nanoid';
   import { useModal } from '/@/components/Modal';
-  import { useDrawer } from '@/components/Drawer';
   import importView from './importView.vue';
-  import beforeWeight from './beforeWeight.vue';
-  import confirmedDrawer from './confirmedDrawer.vue';
   const dataCard = ref([]) as any; // 卡片数据
   const tabSelected = ref(''); // 默认病区 // 病区id
   const SailingList = ref([]) as any; // 班次列表
@@ -60,8 +55,6 @@
   // 默认状态
 
   const [registerModal, { openModal }] = useModal();
-  const [registerDrawer, { openDrawer }] = useDrawer();
-  const [registerConfirmedDrawer, { openDrawer: openConfirmedDrawer }] = useDrawer();
   const titleData = [
     {
       type: 'import',
@@ -224,19 +217,6 @@
     }
   }
 
-  function cellCard(data) {
-    console.log('🚀 ~ file: index.vue:106 ~ cellCard ~ data:', data);
-    if (data.type == '2') {
-      openDrawer(true, {
-        data,
-      });
-    }
-    if (data.type == '3') {
-      openConfirmedDrawer(true, {
-        data,
-      });
-    }
-  }
   //  导入导出回调
   function cellTitle(data) {
     console.log('🚀 ~ file: index.vue:106 ~ cellTitle ~ data:', data);
@@ -296,13 +276,6 @@
       dataCard.value.push(obj);
     }
   }
-  async function handleSuccess({ isUpdate, values }) {
-    console.log(isUpdate);
-    console.log(values);
-  }
-  // function callHover() {
-  //   timeOuter.value = true;
-  // }
 </script>
 
 <style lang="less" scoped>