Procházet zdrojové kódy

Merge remote-tracking branch 'gogs/dev1.0' into dev1.0

Ciallo před 8 měsíci
rodič
revize
2cd447e493

+ 166 - 337
admin-ui/src/views/work/check/index.vue

@@ -1,358 +1,187 @@
-<script>
-import service from '@/utils/request'
-import Template from '@/views/work/follow/template/index.vue'
-import DepartmentTemplate from '@/views/work/check/DepartmentTemplate.vue'
+<template>
+  <div class="app-container">
+    <!-- 行容器 -->
+    <el-row :gutter="20" style="height: 100%">
+      <!-- 列容器 -->
+      <!-- 左边的列表,显示各个科室 -->
+      <el-col
+        :span="4"
+        style="
+          box-shadow: 0 3px 10px 0 rgb(0 0 0 / 6%);
+          border-right: 1px solid #f1f2f4;
+          overflow-y: auto;
+          height: 100%;
+        ">
+        <el-tree :data="deptOptions" @node-click="handleNodeClick"> </el-tree>
+      </el-col>
+      <!-- 患者诊断记录列表 -->
+      <el-col :span="20" style="height: 100%">
+        <el-form :model="queryParams" ref="queryForm" :inline="true">
+          <el-form-item prop="physician">
+            <el-input
+              v-model="queryParams.physician"
+              placeholder="请输入主治医生"
+              clearable
+              @keyup.enter.native="handleQuery"
+              class="se" />
+          </el-form-item>
+          <el-form-item prop="patientName">
+            <el-input
+              v-model="queryParams.patientName"
+              placeholder="请输入患者姓名"
+              clearable
+              @keyup.enter.native="handleQuery"
+              class="se" />
+          </el-form-item>
+          <el-form-item>
+            <el-button type="primary" icon="el-icon-search" @click="handleQuery"
+              >搜索</el-button
+            >
+            <el-button icon="el-icon-refresh" @click="resetQuery"
+              >重置</el-button
+            >
+          </el-form-item>
+        </el-form>
+        <el-table
+          :data="patientList"
+          border
+          @selection-change="selects"
+          height="calc(100vh - 230px)">
+          <el-table-column type="selection" width="55" align="center" />
+          <el-table-column label="科室" align="center" prop="department" />
+          <el-table-column label="患者姓名" align="center" prop="name" />
+          <el-table-column label="主治医生" align="center" prop="physician" />
+          <el-table-column
+            label="出院方式"
+            align="center"
+            prop="dischargeMethod">
+            <template slot-scope="scope">
+              <dict-tag
+                :options="dict.type.discharge_method"
+                :value="scope.row.dischargeMethod"></dict-tag>
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="出院时间"
+            align="center"
+            prop="dischargeTime" />
+          <el-table-column
+            label="操作"
+            align="center"
+            class-name="small-padding fixed-width">
+            <template slot-scope="scope">
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-search"
+                @click="op('search', scope.row)"
+                >查看</el-button
+              >
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination
+          v-if="total > 0"
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="getList" />
+      </el-col>
+    </el-row>
+  </div>
+</template>
 
+<script>
+import search from '@/views/work/patient/search.vue'
+import window from '@/views/work/check/window.vue'
 export default {
-  components: { DepartmentTemplate, Template },
-  name: 'Check',
+  dicts: ['discharge_method'],
+  name: 'checkUser',
   data() {
     return {
-      // 检查窗口需要用到的数据
-      dialogVisible: false,
-      orcAndObrList: [],
-      reportItemLabelList: [
-        { key: 'reportNo', label: '报告单号' },
-        // { key: "medTechProCode", label: "医技号" },
-        { key: 'medTechProName', label: '医技项目名称' },
-        // { key: 'reportClass', label: '报告单类别名称' },
-        { key: 'reportCompleteTime', label: '报告完成时间' },
-        { key: 'signs', label: '危机标志' },
-        { key: 'sampleReceivedDate', label: '样本收到日期' },
-        { key: 'checkpoint', label: '检查部位或样本' },
-        { key: 'executeDepartmentName', label: '执行科室名称' },
-        // { key: "applyDoctorName", label: "申请医生" },
-        // { key: "testingDoctorName", label: "检验医生信息名称" },
-        { key: 'reviewDoctorName', label: '审核医生' },
-        { key: 'reportDate', label: '报告单日期' },
-      ],
-      timeGroup: {},
-      currentDate: '',
-      currentOrcAndObr: {
-        id: '',
-        orcId: '',
-        medTechProCode: null,
-        medTechProName: '',
-        reportClass: '',
-        reportCompleteTime: '',
-        signs: '',
-        sampleReceivedDate: '',
-        checkpoint: '',
-        executeDepartmentCode: '',
-        executeDepartmentName: '',
-        isFlag: '',
-        reviewDoctorCode: null,
-        reviewDoctorName: '',
-        reportDate: '',
-        reportNo: '',
-      },
-      currentObxList: [],
-
-      /**
-       * 当前病人相关数据
-       * @property {string} patId - 病人id
-       * @property {Array} reportDataList - 报告数据列表
-       * @property {Array} resultList - 检测结果列表
-       */
-      current: {
-        patId: '',
-        obrId: '',
-        reportDataList: [],
-        resultList: [],
-      },
-      checkResultPagination: {
-        total: 0,
-        pageSize: 5,
-        currentPage: 1,
-        obrId: ''
+      total: 0,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      //科室名称
+      deptName: undefined,
+      // 部门树选项
+      deptOptions: null,
+      //患者表
+      patientList: null,
+      //查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        physician: undefined,
+        patientName: undefined,
+        department: undefined,
+        deptId: undefined
       },
     }
   },
+  watch: {},
+  created() {
+    this.getDepartment()
+  },
   methods: {
-    /**
-     * 获取当前病人的所有检查项目结果,通过obrId取出对应检查项目的结果
-     */
-    getCurrentPatientObxList() {
-      service
-        .get(`/work/result/patid/${this.currentPatId}`)
-        .then((response) => {
-          this.obxListAll = response.rows
-          console.log(this.obxListAll)
-          console.log(this.currentOrcAndObr)
-          this.currentObxList = this.obxListAll.filter(
-            (item) => item.obrId === this.currentOrcAndObr.id,
-          )
-        })
-    },
-
-    fillReportItem(reportItemLabelList) {
-      const filledList = [...reportItemLabelList]
-
-      const remainder = filledList.length % 3
-      if (remainder !== 0) {
-        const num = 3 - remainder
-
-        for (let i = num; i > 0; i--) {
-          filledList.push({ key: ``, label: '' })
-        }
-      }
-      return filledList
-    },
-    /**
-     * 处理字符串日期
-     * @param {string} dateString 字符串日期
-     * @example
-     * ```
-     * dateString取值2024-07-23 12:28:42时,
-     * 函数将返回{year: '2024', month: '07', day: '23', time: '12:28:42'}
-     * ```
-     * @return {{year: string, month: string, day: string, time: string}}
-     */
-    handleDate(dateString) {
-      //先把年月日和当天时间分离 2024-07-23 12:28:42->['2024-07-23','12:28:42']
-      const [yearMonthDay, time] = dateString.split(' ')
-
-      //接着把年月日分离 '2024-07-23'->['2024','07','23']
-      const [year, month, day] = yearMonthDay.split('-')
-
-      return {
-        year,
-        month,
-        day,
-        time,
+    // 表单重置
+    reset() {
+      this.form = {
+        physician: undefined,
+        name: undefined,
       }
+      this.resetForm('form')
     },
-    /**
-     * 处理日期数组
-     * @param {{year: string, month: string, day: string, time: string}[]} dates
-     * @return {Record<string,Record<string,Record<string,string[]>>>}
-     * @example
-     * ```
-     * dates取值[
-      { year: '2024', month: '07', day: '23', time: '18:23:23' },
-      { year: '2024', month: '07', day: '23', time: '20:23:23' },
-      { year: '2024', month: '08', day: '24', time: '12:23:23' },
-      { year: '2023', month: '04', day: '08', time: '14:23:23' }
-    ],
-      函数返回
-    {
-      '2023': { '04': { '08': '14:23:23' } },
-      '2024': { '07': { '23': ['18:23:23','20:23:23'] }, '08': { '24': ['12:23:23'] } }
-    }
-     * ```
-     */
-    organizeDates(dates) {
-      const result = {}
-      dates.forEach((date) => {
-        const { year, month, day, time } = date
-        if (!result[year]) {
-          result[year] = {}
-        }
-        if (!result[year][month]) {
-          result[year][month] = {}
-        }
-        if (!result[year][month][day]) {
-          result[year][month][day] = []
-        }
-        result[year][month][day].push(time)
-        // console.log(result)
+    /** 查询患者列表*/
+    getList() {
+      this.get({
+        url: '/work/visit/patientCard',
+        data: {
+          ...this.queryParams,
+        },
+      }).then((response) => {
+        this.patientList = response.rows
+        this.total = response.total
       })
-      return result
     },
-    /**
-     * 处理检测报告数据:把每项待检测报告数据的id属性值(即obrId)作为键,剩余作为对应的值
-     * @param {Array} reportDataList - 待处理的检测报告数据
-     * @example
-     * ```
-     * reportDataList取值[{id: '222', orcId: '33', medTechProCode: null, checkpoint: '样本', ...}]
-     * 函数返回{'222': {orcId: '33', medTechProCode: null, checkpoint: '样本', ...},}
-     * ```
-     */
-    organizeReportData(reportDataList) {
-
+    /** 查询部门 */
+    getDepartment() {
+      this.get({
+        url: '/system/user/deptTree',
+      }).then((response) => {
+        this.deptOptions = response.data
+      })
     },
-    /**
-     * 映射危机标志的对应含义
-     * @param {string} signs 危机标志数值
-     * @return {string} 危机标志对应含义
-     */
-    mapSigns(signs) {
-      switch (signs) {
-        case '0':
-          return '正常'
-        case '1':
-          return '危机'
-        default:
-          return ''
-      }
+    handleNodeClick(data) {
+      this.queryParams.departmentName = data.label
+      this.getList()
     },
-    /**
-     * 映射高低标志的对应含义
-     * @param {string} sign 高低标志
-     * @return {string} 高低标志对应含义
-     */
-    mapHighSign(sign) {
-      switch (sign) {
-        case '0':
-          return '正常'
-        case '1':
-          return '偏低'
-        case '2':
-          return '偏高'
-        default:
-          return ''
-      }
+    selects(rows) {
+      this.ids = rows.map((item) => item.id)
     },
-    /**
-     * 表格分页组件页面变化时的处理逻辑
-     * @param {number} newPage - 新页码
-     */
-    handleCurrentChange(newPage) {
-      console.log(`查看第${newPage}页的数据`)
-      this.checkResultPagination.currentPage = newPage
-
-      this.getCheckResult()
-    },
-    getReportData(patientId) {
-      service.get(`work/request/patid/${patientId}`).then((response) => {
-        console.log(response)
-        this.current.reportDataList = response.rows
+    op(tag, row) {
+      this.iframe({
+        obj: window,
+        param: { id: row.patId },
+        title: '查看患者信息',
+        width: '90%',
+        height: '90%',
+        scroll: true,
       })
     },
-    getCheckResult() {
-      service.get('work/result/list', {
-        params: {
-          obrId: this.checkResultPagination.obrId,
-          pageNum: this.checkResultPagination.currentPage,
-          pageSize: this.checkResultPagination.pageSize,
-        }
-      }).then(response => {
-        this.checkResultPagination.total = response.total
-        console.log(`获得${response.rows}`)
-      })
-    }
-  },
-  watch: {
-    // 监听当前病人id的变化
-    'current.patId'(newPatId) {
-      // console.log(`current.patId=${newPatId}`)
-      this.getReportData(newPatId)
+    handleQuery() {
+      this.queryParams.pageNum = 1
+      this.getList()
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm('queryForm')
+      this.handleQuery()
     },
   },
 }
 </script>
-
-<template>
-  <DepartmentTemplate :patient-id.sync="current.patId">
-    <template>
-      <el-row class="tac" :gutter="10">
-        <el-col :span="4">
-          <el-menu
-            default-active="1"
-            class="el-menu-vertical-demo"
-            style="height: 200px">
-            <el-submenu
-              v-for="(year, yearIndex) in Object.keys(timeGroup)"
-              :index="`${yearIndex}`">
-              <template slot="title">
-                <span>{{ year }}年</span>
-              </template>
-              <el-submenu
-                v-for="(month, monthIndex) in Object.keys(timeGroup[year])"
-                :index="`${yearIndex}-${monthIndex}`">
-                <template slot="title">
-                  <span>{{ month }}月</span>
-                </template>
-                <el-submenu
-                  v-for="(day, dayIndex) in Object.keys(timeGroup[year][month])"
-                  :index="`${yearIndex}-${monthIndex}-${dayIndex}`">
-                  <template slot="title">
-                    <span>{{ day }}日</span>
-                  </template>
-                  <el-menu-item
-                    v-for="(time, timeIndex) in timeGroup[year][month][day]"
-                    :index="`${yearIndex}-${monthIndex}-${dayIndex} ${timeIndex}`"
-                    @click="
-                      currentDate = `${year}-${month}-${day} ${time}`
-                      currentOrcAndObr = orcAndObrList.find(
-                        (item) => item.reportDate === currentDate,
-                      )
-                      getCurrentPatientObxList()
-                    ">
-                    <span>{{ time }}</span>
-                  </el-menu-item>
-                </el-submenu>
-              </el-submenu>
-            </el-submenu>
-          </el-menu>
-        </el-col>
-
-        <el-col :span="20" style="overflow-y: scroll">
-          <el-descriptions
-            class="margin-top"
-            title="详细检测报告"
-            :column="3"
-            border>
-            <el-descriptions-item
-              v-for="item in fillReportItem(reportItemLabelList)"
-              :key="item.key"
-              :label="item.label">
-              <span v-if="currentOrcAndObr[item.key] && item.key !== 'signs'">{{
-                currentOrcAndObr[item.key]
-              }}</span>
-              <span v-else-if="item.key === 'signs'">{{
-                mapSigns(currentOrcAndObr[item.key])
-              }}</span>
-              <span v-else>{{ '' }}</span>
-            </el-descriptions-item>
-          </el-descriptions>
-
-          <div id="patient-check-projects-table">
-            <el-table width="100%" stripe :data="currentObxList">
-              <el-table-column
-                label="医技项目名称"
-                align="center"
-                prop="mecTechObsName"></el-table-column>
-              <el-table-column
-                label="项目信息结果"
-                align="center"
-                prop="result"></el-table-column>
-              <el-table-column
-                label="项目单位"
-                align="center"
-                prop="unitCode"></el-table-column>
-              <el-table-column
-                label="结果参考值"
-                align="center"
-                prop="result"></el-table-column>
-              <el-table-column
-                label="高低标志"
-                align="center"
-                prop="sign"></el-table-column>
-              <el-table-column
-                label="微生物观察分类"
-                align="center"
-                prop="obsClassification"></el-table-column>
-              <el-table-column
-                label="检验方法"
-                align="center"
-                prop="testMethod"></el-table-column>
-            </el-table>
-            <el-pagination
-              :page-size="checkResultPagination.pageSize"
-              :total="checkResultPagination.total"
-              :current-page.sync="checkResultPagination.currentPage"
-              @current-change="handleCurrentChange"></el-pagination>
-          </div>
-        </el-col>
-      </el-row>
-    </template>
-  </DepartmentTemplate>
-</template>
-
-<style scoped>
-#patient-check-projects-table {
-  min-height: 300px;
-  margin-top: 5vh;
-}
-</style>

+ 332 - 0
admin-ui/src/views/work/check/window.vue

@@ -0,0 +1,332 @@
+<template>
+  <div id="check-window" style="width:100%;">
+    <el-row class="tac" :gutter="10">
+      <el-col :span="4">
+        <el-menu
+          default-active="1"
+          class="el-menu-vertical-demo"
+          style="height: 200px">
+          <el-submenu :index="`year`" v-for="year in Object.keys(timeGroup)">
+            <template slot="title">{{ year }}年</template>
+            <el-submenu
+              :index="`${year}-${month}`"
+              v-for="month in Object.keys(timeGroup[year])">
+              <template slot="title">{{ month }}月</template>
+              <el-submenu
+                :index="`${year}-${month}-${day}`"
+                v-for="day in Object.keys(timeGroup[year][month])">
+                <template slot="title">{{ day }}日</template>
+                <el-menu-item
+                  :index="`${year}-${month}-${day}-${obrIdAndTime.time}`"
+                  v-for="obrIdAndTime in timeGroup[year][month][day]"
+                  @click="current.obrId = obrIdAndTime.obrId">
+                  {{ obrIdAndTime.time }}
+                </el-menu-item>
+              </el-submenu>
+            </el-submenu>
+          </el-submenu>
+        </el-menu>
+      </el-col>
+
+      <el-col :span="20" style="overflow-y: scroll">
+        <el-descriptions
+          class="margin-top"
+          title="详细检测报告"
+          :column="3"
+          border>
+          <el-descriptions-item
+            v-for="item in fillReportItem(reportItemLabelList)"
+            :key="item.key"
+            :label="item.label">
+            <span v-if="current.obr[item.key] && item.key !== 'signs'">{{
+              current.obr[item.key]
+            }}</span>
+            <span v-else-if="item.key === 'signs'">{{
+              mapSigns(current.obr[item.key])
+            }}</span>
+            <span v-else>{{ '' }}</span>
+          </el-descriptions-item>
+        </el-descriptions>
+
+        <div id="patient-check-projects-table">
+          <el-table width="100%" stripe :data="current.obxList">
+            <el-table-column
+              label="医技项目名称"
+              align="center"
+              prop="mecTechObsName"></el-table-column>
+            <el-table-column
+              label="项目信息结果"
+              align="center"
+              prop="result"></el-table-column>
+            <el-table-column
+              label="项目单位"
+              align="center"
+              prop="unitCode"></el-table-column>
+            <el-table-column
+              label="结果参考值"
+              align="center"
+              prop="result"></el-table-column>
+            <el-table-column
+              label="高低标志"
+              align="center"
+              prop="sign"></el-table-column>
+            <el-table-column
+              label="微生物观察分类"
+              align="center"
+              prop="obsClassification"></el-table-column>
+            <el-table-column
+              label="检验方法"
+              align="center"
+              prop="testMethod"></el-table-column>
+          </el-table>
+          <el-pagination
+            :page-count.sync="obxPaginationParams.pageNum"
+            :total="obxPaginationParams.total"
+            :page-size="obxPaginationParams.pageSize" @current-change="handleCurrentPageChange">
+          </el-pagination>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import service from '@/utils/request'
+
+export default {
+  name: 'checkWindow',
+  props: {
+    param: {
+      type: Object,
+      default: () => {
+        return { id: '' }
+      },
+    },
+  },
+  data() {
+    return {
+      current: {
+        obrId: '',
+        obrAllList: [],
+        obr: {},
+        obxAllList: [],
+        obxList: [],
+      },
+      timeGroup: {},
+      reportItemLabelList: [
+        // { key: 'reportNo', label: '报告单号' },
+        // { key: "medTechProCode", label: "医技号" },
+        { key: 'medTechProName', label: '医技项目名称' },
+        // { key: 'reportClass', label: '报告单类别名称' },
+        { key: 'reportCompleteTime', label: '报告完成时间' },
+        { key: 'signs', label: '危机标志' },
+        { key: 'sampleReceivedDate', label: '样本收到日期' },
+        { key: 'checkpoint', label: '检查部位或样本' },
+        { key: 'executeDepartmentName', label: '执行科室名称' },
+        // { key: "applyDoctorName", label: "申请医生" },
+        // { key: "testingDoctorName", label: "检验医生信息名称" },
+        { key: 'reviewDoctorName', label: '审核医生' },
+        { key: 'reportDate', label: '报告单日期' },
+      ],
+      obxPaginationParams:{
+        pageNum: 1, //当前页数
+        pageSize: 5, //每页数据数量
+        total: 0 //总共数据量
+      },
+      testPatId: 24502 //测试用的patId  测试值:24502, 24503, 24504, 24656
+    }
+  },
+  watch: {
+    'current.obrId'(newValue) {
+      this.current.obr = this.current.obrAllList.find(
+        (item) => item.id === newValue
+      )
+      this.current.obxList = this.current.obxAllList.filter(
+        (item) => item.obrId === newValue
+      )
+    },
+    'current.obxList'(newValue) {
+      // 将obxList每个obx对象的sign替换成对应意义
+      if(newValue) {
+      // console.log(newValue)
+
+      const rs = newValue.map(item => {
+        if(item) {
+        console.log(item)
+
+        item.sign = this.mapHighSign(item.sign)
+        }
+      })
+        console.log(rs)
+      }
+    }
+  },
+  methods: {
+    // 获取当前患者的所有检查项目,同时生成菜单栏需要的时间数据
+    getObrAllListAndGenerateTime() {
+      // this.testPatId要改为this.$props.param.id
+      this.$props.param.id = this.testPatId //后续数据库更新后需要把这行代码注释掉
+      service({
+        url: `/work/request/patid/${this.$props.param.id}`,
+      }).then((response) => {
+        this.current.obrAllList = response.rows
+        // 得到obrAllList的数据后接着生成timeGroup
+        this.handleObrList(response.rows)
+      })
+    },
+    // 获取所有检查项目的所有检测结果,通过检测项目标识obrId来取出对应检测结果,默认获取第一页的数据
+    getObxAllList() {
+      // this.testPatId要改为this.$props.param.id
+      this.$props.param.id = this.testPatId //后续数据库更新后需要把这行代码注释掉
+      service({
+        url: `/work/result/patid/${this.$props.param.id}`,
+        params: {
+          ...this.obxPaginationParams
+        }
+      }).then((response) => {
+        this.current.obxAllList = response.rows
+        this.obxPaginationParams.total = response.total
+              if(this.current.obrId!=='') {
+
+         this.current.obxList = this.current.obxAllList.filter(item => item.obrId === this.current.obrId)
+        }
+      })
+    },
+    // 分页组件页面变化时请求对应页的检测结果
+    handleCurrentPageChange(newPage) {
+      this.obxPaginationParams.pageNum = newPage
+      this.getObxAllList()
+
+    },
+    fillReportItem(reportItemLabelList) {
+      const filledList = [...reportItemLabelList]
+
+      const remainder = filledList.length % 3
+      if (remainder !== 0) {
+        const num = 3 - remainder
+
+        for (let i = num; i > 0; i--) {
+          filledList.push({ key: ``, label: '' })
+        }
+      }
+      return filledList
+    },
+    /**
+     * 映射危机标志的对应含义
+     * @param {string} signs 危机标志数值
+     * @return {string} 危机标志对应含义
+     */
+    mapSigns(signs) {
+      switch (signs) {
+        case '0':
+          return '正常'
+        case '1':
+          return '危机'
+        default:
+          return ''
+      }
+    },
+    /**
+     * 映射高低标志的对应含义
+     * @param {string} sign 高低标志
+     * @return {string} 高低标志对应含义
+     */
+    mapHighSign(sign) {
+      switch (sign) {
+        case '0':
+          return '正常'
+        case '1':
+          return '偏低'
+        case '2':
+          return '偏高'
+        default:
+          return ''
+      }
+    },
+    /**
+     * 处理字符串日期
+     * @param {string} dateString 字符串日期
+     * @example
+     * ```
+     * dateString取值2024-07-23 12:28:42时,
+     * 函数将返回{year: '2024', month: '07', day: '23', time: '12:28:42'}
+     * ```
+     * @return {{year: string, month: string, day: string, time: string}}
+     */
+    handleDate(dateString) {
+      //先把年月日和当天时间分离 2024-07-23 12:28:42->['2024-07-23','12:28:42']
+      const [yearMonthDay, time] = dateString.split(' ')
+
+      //接着把年月日分离 '2024-07-23'->['2024','07','23']
+      const [year, month, day] = yearMonthDay.split('-')
+
+      return { year, month, day, time }
+    },
+    /**
+     * 处理日期数组
+     * @param {{obrId:string,reportCompleteTime:{year: string, month: string, day: string, time: string}}[]} orcIdAndTimeList
+     * @return {Record<string,Record<string,Record<string,string[]>>>}
+     * @example
+     * ```
+     * dates取值[
+      {obrId:'223',reportCompleteTime:{ year: '2024', month: '07', day: '23', time: '18:23:23' }},
+      {obrId:'223',reportCompleteTime:{ year: '2024', month: '07', day: '23', time: '20:23:23' }},
+      {obrId:'223',reportCompleteTime:{ year: '2024', month: '08', day: '24', time: '12:23:23' }},
+      {obrId:'223',reportCompleteTime:{ year: '2023', month: '04', day: '08', time: '14:23:23' }}
+    ],
+      函数返回
+    {
+      '2023': { '04': { '08': [{orcId: '233',time:'14:23:23'}] } },
+      '2024': {
+         '07': { '23': [{orcId: '233',time: '18:23:23'},{orcId: '233',time: '20:23:23'}] },
+         '08': { '24': [{orcId: '233',time: '12:23:23'}]  }
+      }
+     * ```
+     */
+    organizeDates(orcIdAndTimeList) {
+      const result = {}
+      orcIdAndTimeList.forEach((item) => {
+        const { year, month, day, time } = item.reportCompleteTime
+        if (!result[year]) {
+          result[year] = {}
+        }
+        if (!result[year][month]) {
+          result[year][month] = {}
+        }
+        if (!result[year][month][day]) {
+          result[year][month][day] = []
+        }
+        result[year][month][day].push({ obrId: item.obrId, time: time })
+      })
+      return result
+    },
+    /**
+     * 处理current.obrAllList
+     * @param {Array} obrAllList
+     */
+    handleObrList(obrAllList) {
+      // 从current.obrAllList获取对象{obrId: '',reportCompleteTime: {year, month, day, time}}数组
+      const orcIdAndTimeList = obrAllList.map((item) => {
+
+        const handledDate = this.handleDate(item.reportCompleteTime)
+        return { obrId: item.id, reportCompleteTime: handledDate }
+      })
+
+
+      this.timeGroup = this.organizeDates(orcIdAndTimeList)
+    },
+  },
+  // 当弹窗组件创建时请求当前患者所有检查项目信息
+  created() {
+    this.getObrAllListAndGenerateTime()
+    this.getObxAllList()
+  },
+}
+</script>
+
+<style scoped>
+#patient-check-projects-table {
+  min-height: 300px;
+  margin-top: 5vh;
+}
+</style>

+ 8 - 11
admin-ui/src/views/work/patient/index.vue → admin-ui/src/views/work/visit/index.vue

@@ -1,15 +1,9 @@
 <template>
   <div class="app-container">
-    <!-- 行容器 -->
     <el-row :gutter="20" style="height: 100%">
-      <!-- 列容器 -->
-      <!-- 左边的列表,显示各个科室 -->
       <el-col :span="4" style="box-shadow: 0 3px 10px 0 rgb(0 0 0 / 6%); border-right: 1px solid #f1f2f4; overflow-y: auto; height: 100%">
-        <el-tree :data="deptOptions" @node-click="handleNodeClick">
-
-        </el-tree>
+        <el-tree :data="deptOptions" @node-click="handleNodeClick" :default-expand-all="true"></el-tree>
       </el-col>
-      <!-- 患者诊断记录列表 -->
       <el-col :span="20" style="height: 100%">
         <el-form :model="queryParams" ref="queryForm" :inline="true" >
           <el-form-item prop="physician">
@@ -41,14 +35,13 @@
           </el-table-column>
         </el-table>
         <pagination v-if="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList"/>
-
       </el-col>
     </el-row>
   </div>
 </template>
 
 <script>
-import search from "@/views/work/patient/search.vue";
+import search from "@/views/work/visit/search.vue";
 export default {
   dicts:['discharge_method'],
   name: 'User',
@@ -73,7 +66,8 @@ export default {
         pageSize:10,
         physician: undefined,
         patientName:undefined,
-        departmentName:undefined,
+        department:undefined,
+        deptId:undefined,
       },
     };
   },
@@ -93,6 +87,7 @@ export default {
     },
     /** 查询患者列表*/
     getList(){
+      console.log(this.deptId)
       this.get({
         url:'/work/visit/patientCard',
         data: {
@@ -109,10 +104,12 @@ export default {
         url:'/system/user/deptTree'
       }).then((response) => {
         this.deptOptions = response.data;
+        this.queryParams.deptId = response.data[0].id;
+        this.getList();
       });
     },
     handleNodeClick(data){
-      this.queryParams.departmentName = data.label;
+      this.queryParams.deptId = data.id;
       this.getList();
     },
     selects(rows) {

+ 17 - 11
admin-ui/src/views/work/patient/search.vue → admin-ui/src/views/work/visit/search.vue

@@ -2,7 +2,6 @@
   <div class="container" style="height: 80vh; width: 87vw">
     <el-row :gutter="10">
       <el-col :span="5">
-        <!-- 左边的导航菜单 -->
         <div class="left-body">
           <el-menu :default-active="activeNow" @open="handleOpen" :unique-opened="true">
             <el-menu-item index="1" @click="activePatient(1)">
@@ -23,7 +22,7 @@
                     <span>{{month}}月</span>
                   </template>
                   <el-menu-item v-for="item in days" @click="getCard(item.id); activePatient(2); getDgList()" :key="item.id" :index="item.id.toString()">
-                    {{year}}年{{month}}月{{item.day}}日
+                    {{item.day}}日 {{item.HH}}:{{item.MM}}:{{item.SS}}
                   </el-menu-item>
                 </el-submenu>
               </el-submenu>
@@ -32,11 +31,8 @@
         </div>
       </el-col>
       <el-col :span="19">
-        <!-- 右边的信息显示 -->
         <div class="right-body">
-          <!-- 患者基本信息/亲属 -->
           <div class="patient-info-nk" v-if="active === 1">
-            <!-- 患者基本信息 -->
             <div class="patient-info">
               <el-descriptions  style="width: 69vw; margin-top: 10px" title="患者信息" :column="3" border>
                 <el-descriptions-item label="患者标识符" v-if="patientInfo">{{patientInfo.patientCode}}</el-descriptions-item>
@@ -60,7 +56,7 @@
                 <el-descriptions-item label="婴儿序号" v-if="patientInfo">{{patientInfo.yexh}}</el-descriptions-item>
               </el-descriptions>
             </div>
-            <!-- 患者亲属 -->
+
             <div class="patient-nk" style="margin-top: 10px">
               <el-table style="width:69vw;" height="calc(75vh - 270px)"  :data="nkList" highlight-current-row>
                 <el-table-column label="姓名" align="center" prop="name"></el-table-column>
@@ -73,9 +69,8 @@
               <pagination v-show="totalNk > 0" :total="totalNk" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getNkList" />
             </div>
           </div>
-          <!-- 诊断信息 -->
+
           <div class="dg-info" v-if="active === 2">
-            <!-- 单次就诊的详细信息 -->
             <div class="pv">
               <el-descriptions :column="3" border style="width: 69vw; margin-top: 10px"  title="就诊信息">
                 <el-descriptions-item label="患者类别">
@@ -100,7 +95,7 @@
                 <el-descriptions-item label="出区原因">{{pvList.reasonArea}}</el-descriptions-item>
               </el-descriptions>
             </div>
-            <!-- 诊断结果列表 -->
+
             <div class="dg" style="margin-top: 10px">
               <el-table style=" width:69vw;" height="calc(75vh - 270px)" :data="dgList" highlight-current-row>
                 <el-table-column label="诊断名称" align="center" prop="diagnosticName"></el-table-column>
@@ -179,7 +174,7 @@ export default {
     this.getNkList();
   },
   methods:{
-    handleOpen(index, indexPath){
+    handleOpen(index){
       if(index === "2"){
         this.activeIndex();
       }
@@ -238,6 +233,7 @@ export default {
         }
       }).then( (response) => {
         this.timeList = response.rows;
+        console.log(this.timeList)
         this.groupDates(this.timeList);
       })
     },
@@ -246,6 +242,9 @@ export default {
         this.year = date.admissionTime.substring(0, 4);
         this.month = date.admissionTime.substring(5, 7);
         this.day = date.admissionTime.substring(8, 10);
+        this.HH = date.admissionTime.substring(11,13);
+        this.MM = date.admissionTime.substring(14,16);
+        this.SS = date.admissionTime.substring(17,20);
         this.id = date.id;
         if (!this.groupedDates[this.year]) {
           this.groupedDates[this.year] = {};
@@ -253,7 +252,14 @@ export default {
         if (!this.groupedDates[this.year][this.month]) {
           this.groupedDates[this.year][this.month] = [];
         }
-        this.groupedDates[this.year][this.month].push({id: this.id, day: this.day});
+        this.groupedDates[this.year][this.month].push(
+          {
+            id: this.id,
+            day: this.day,
+            HH: this.HH,
+            MM: this.MM,
+            SS: this.SS
+          });
       })
       this.$forceUpdate();
     },

+ 1 - 0
java.java

@@ -0,0 +1 @@
+修改测试