From 455d614f4a1d624cbbb75b47a8eb9bbac2195835 Mon Sep 17 00:00:00 2001
From: ysn <2126564605@qq.com>
Date: Fri, 29 May 2026 09:06:26 +0800
Subject: [PATCH] =?UTF-8?q?=E7=97=85=E4=BE=8B=E5=BA=93=E8=81=94=E8=B0=83?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package.json | 2 +
src/api/cases/index.js | 72 +++-
src/main.js | 5 +-
src/store/modules/user.js | 30 +-
src/utils/ruoyi.js | 26 ++
src/views/cases/index.vue | 864 ++++++++++++++++++++++++++------------
6 files changed, 693 insertions(+), 306 deletions(-)
diff --git a/package.json b/package.json
index 080dcce..768ba63 100644
--- a/package.json
+++ b/package.json
@@ -28,6 +28,8 @@
"axios": "0.30.3",
"clipboard": "2.0.8",
"core-js": "3.37.1",
+ "crypto-js": "^4.2.0",
+ "dayjs": "^1.11.21",
"echarts": "5.4.0",
"element-ui": "2.15.14",
"file-saver": "2.0.5",
diff --git a/src/api/cases/index.js b/src/api/cases/index.js
index 46c2322..a6366b4 100644
--- a/src/api/cases/index.js
+++ b/src/api/cases/index.js
@@ -1,44 +1,70 @@
import request from '@/utils/request'
-// 查询病例列表
-export function listCase(query) {
+
+// 检查类型
+// 检查诊室
+export function postReportExamRoomList(data) {
return request({
- url: '/business/case/list',
- method: 'get',
- params: query
+ url: '/report/exam_room_list',
+ method: 'post',
+ data: data
})
}
-
-// 查询病例详情
-export function getCase(id) {
+// 检查部位
+export function postReportTemplateTree(data) {
return request({
- url: '/business/case/' + id,
- method: 'get'
+ url: '/report/template_tree',
+ method: 'post',
+ data: data
+ })
+}
+// 检查设备
+export function postReportEquipmentList(data) {
+ return request({
+ url: '/report/equipment_list',
+ method: 'post',
+ data: data
+ })
+}
+// 预约时间
+export function postReportTimeSections(data) {
+ return request({
+ url: '/report/time_sections',
+ method: 'post',
+ data: data
+ })
+}
+// 病例类型
+// 检查结果
+// 病例库-列表
+export function postReportList(data) {
+ return request({
+ url: '/report/list',
+ method: 'post',
+ data: data
})
}
-
// 新增病例
-export function addCase(data) {
+export function postReportCreate(data) {
return request({
- url: '/business/case',
+ url: '/report/create',
method: 'post',
data: data
})
}
-
-// 修改病例
-export function updateCase(data) {
+// 病例库-详情
+export function postReportInfo(data) {
return request({
- url: '/business/case',
- method: 'put',
+ url: '/report/info',
+ method: 'post',
data: data
})
}
-
-// 删除病例
-export function delCase(id) {
+// 修改病例
+export function postReportEdit(data) {
return request({
- url: '/business/case/' + id,
- method: 'delete'
+ url: '/report/edit',
+ method: 'post',
+ data: data
})
}
\ No newline at end of file
diff --git a/src/main.js b/src/main.js
index 50a1c5f..b7fc26d 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,6 +1,7 @@
import Vue from 'vue'
import Cookies from 'js-cookie'
+import dayjs from 'dayjs'
import Element from 'element-ui'
import './assets/styles/element-variables.scss'
@@ -20,7 +21,7 @@ import './assets/icons' // icon
import './permission' // permission control
import { getDicts } from "@/api/system/dict/data"
import { getConfigKey } from "@/api/system/config"
-import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi"
+import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree, desensitize } from "@/utils/ruoyi"
// 分页组件
import Pagination from "@/components/Pagination"
// 自定义表格工具组件
@@ -48,6 +49,8 @@ Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.selectDictLabels = selectDictLabels
Vue.prototype.download = download
Vue.prototype.handleTree = handleTree
+Vue.prototype.desensitize = desensitize
+Vue.prototype.$dayjs = dayjs
// 全局组件挂载
Vue.component('DictTag', DictTag)
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 0ccbd62..054a265 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -1,8 +1,8 @@
import store from '@/store'
import router from '@/router'
import cache from '@/plugins/cache'
-import { MessageBox, } from 'element-ui'
-import { login, logout, getInfo } from '@/api/login'
+import { MessageBox } from 'element-ui'
+import { login, logout, getInfo, getCommonConfigOptions } from '@/api/login'
import { getToken, setToken, removeToken } from '@/utils/auth'
import { isHttp, isEmpty } from "@/utils/validate"
import defAva from '@/assets/images/profile.jpg'
@@ -17,7 +17,12 @@ const user = {
roles: [],
permissions: [],
dept: '',
- status: ''
+ status: '',
+ netConfig: {
+ httpProtocol: 'http',
+ ipAddress: '',
+ port: ''
+ }
},
mutations: {
@@ -47,9 +52,11 @@ const user = {
},
SET_STATUS: (state, status) => {
state.status = status
- }
+ },
+ SET_NET_CONFIG: (state, netConfig) => {
+ state.netConfig = netConfig
+ },
},
-
actions: {
// 登录
Login({ commit }, userInfo) {
@@ -105,7 +112,18 @@ const user = {
})
})
},
-
+ // 获取网络配置
+ GetNetConfig({ commit }) {
+ return new Promise((resolve, reject) => {
+ getCommonConfigOptions().then(res => {
+ const data = res.data
+ commit('SET_NET_CONFIG', data)
+ resolve(res)
+ }).catch(error => {
+ reject(error)
+ })
+ })
+ },
// 退出系统
LogOut({ commit, state }) {
return new Promise((resolve, reject) => {
diff --git a/src/utils/ruoyi.js b/src/utils/ruoyi.js
index 3de2d98..8f4cc22 100644
--- a/src/utils/ruoyi.js
+++ b/src/utils/ruoyi.js
@@ -226,3 +226,29 @@ export function getNormalPath(p) {
export function blobValidate(data) {
return data.type !== 'application/json'
}
+//
+/**
+ * 通用信息脱敏工具方法
+ * @param {String} str - 需要脱敏的原始字符串
+ * @param {Number} prefixLen - 前面保留几位
+ * @param {Number} suffixLen - 后面保留几位
+ * @param {Number} maskLen - 脱敏显示多少位 *(不传则自动计算)
+ * @returns {String} 脱敏后的字符串
+ */
+export function desensitize(str, prefixLen, suffixLen, maskLen) {
+ if (!str) return '';
+ str = String(str);
+ const length = str.length;
+
+ // 边界:长度不足,直接返回原文
+ if (length <= prefixLen + suffixLen) {
+ return str;
+ }
+
+ // 前缀 + 脱敏符号 + 后缀
+ const prefix = str.substring(0, prefixLen);
+ const suffix = str.substring(length - suffixLen);
+ const mask = maskLen ? '*'.repeat(maskLen) : '***'; // 默认显示3个*
+
+ return prefix + mask + suffix;
+}
\ No newline at end of file
diff --git a/src/views/cases/index.vue b/src/views/cases/index.vue
index 605b86b..206b9c1 100644
--- a/src/views/cases/index.vue
+++ b/src/views/cases/index.vue
@@ -4,17 +4,17 @@
-
- 创建时间
- 审核时间
- 预约时间
+
+ 创建时间
+ 审核时间
+ 预约时间
-
+
-
+
-
+
-
+
@@ -91,22 +104,26 @@
-
+
-
+
-
+
-
+
-
+
-
+
{{
- scope.row.patientName
- ? scope.row.patientName.replace(/^(.).*(.)$/, "$1***$2")
- : "-"
+ desensitize(
+ scope.row.patient_name,
+ 1,
+ 0,
+ scope.row.patient_name.length
+ )
}}
- {{ genderList.find((i) => i.value == scope.row.gender).label || "-" }}
+ {{
+ patientSexList.find((i) => i.value == scope.row.patient_sex)
+ .label || "-"
+ }}
- {{ scope.row.age || "" }}
- {{
- ageUnitList.find((i) => i.value == scope.row.ageUnit).label || ""
- }}
+ {{ scope.row.patient_age }}
+ {{ getAgeUnit(scope.row.patient_age_type) }}
+ >
+
+ {{ scope.row.date_time }} {{ scope.row.time_section }}
+
+
- {{ scope.row.customPart || scope.row.checkPart || "-" }}
+ {{ scope.row.positions.map((r) => r.level2.name).join("|") }}
{{
- checkTypeList.find((i) => i.value == scope.row.checkType).label ||
- "-"
+ patientTypeList.find((i) => i.value == scope.row.patient_type)
+ .label || "-"
}}
@@ -288,108 +317,100 @@
>
{{
- checkResultList.find((i) => i.value == scope.row.checkResult)
- .label || "-"
+ negativeList.find((i) => i.value == scope.row.negative).label || "-"
}}
- {{
- checkRoomList.find((i) => i.value == scope.row.checkRoom).label ||
- "-"
- }}
+ {{ scope.row.exam_rooms.map((r) => r.name).join(", ") || "-" }}
+
+ >
+
+ {{ statusList.find((i) => i.value == scope.row.status).label || "-" }}
+
+
-
-
@@ -427,9 +448,9 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+