病例库联调

main
ysn 2 days ago
parent f8ef13d049
commit 455d614f4a
  1. 2
      package.json
  2. 72
      src/api/cases/index.js
  3. 5
      src/main.js
  4. 30
      src/store/modules/user.js
  5. 26
      src/utils/ruoyi.js
  6. 864
      src/views/cases/index.vue

@ -28,6 +28,8 @@
"axios": "0.30.3", "axios": "0.30.3",
"clipboard": "2.0.8", "clipboard": "2.0.8",
"core-js": "3.37.1", "core-js": "3.37.1",
"crypto-js": "^4.2.0",
"dayjs": "^1.11.21",
"echarts": "5.4.0", "echarts": "5.4.0",
"element-ui": "2.15.14", "element-ui": "2.15.14",
"file-saver": "2.0.5", "file-saver": "2.0.5",

@ -1,44 +1,70 @@
import request from '@/utils/request' import request from '@/utils/request'
// 查询病例列表
export function listCase(query) { // 检查类型
// 检查诊室
export function postReportExamRoomList(data) {
return request({ return request({
url: '/business/case/list', url: '/report/exam_room_list',
method: 'get', method: 'post',
params: query data: data
}) })
} }
// 检查部位
// 查询病例详情 export function postReportTemplateTree(data) {
export function getCase(id) {
return request({ return request({
url: '/business/case/' + id, url: '/report/template_tree',
method: 'get' 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({ return request({
url: '/business/case', url: '/report/create',
method: 'post', method: 'post',
data: data data: data
}) })
} }
// 病例库-详情
// 修改病例 export function postReportInfo(data) {
export function updateCase(data) {
return request({ return request({
url: '/business/case', url: '/report/info',
method: 'put', method: 'post',
data: data data: data
}) })
} }
// 修改病例
// 删除病例 export function postReportEdit(data) {
export function delCase(id) {
return request({ return request({
url: '/business/case/' + id, url: '/report/edit',
method: 'delete' method: 'post',
data: data
}) })
} }

@ -1,6 +1,7 @@
import Vue from 'vue' import Vue from 'vue'
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
import dayjs from 'dayjs'
import Element from 'element-ui' import Element from 'element-ui'
import './assets/styles/element-variables.scss' import './assets/styles/element-variables.scss'
@ -20,7 +21,7 @@ import './assets/icons' // icon
import './permission' // permission control import './permission' // permission control
import { getDicts } from "@/api/system/dict/data" import { getDicts } from "@/api/system/dict/data"
import { getConfigKey } from "@/api/system/config" 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" import Pagination from "@/components/Pagination"
// 自定义表格工具组件 // 自定义表格工具组件
@ -48,6 +49,8 @@ Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.selectDictLabels = selectDictLabels Vue.prototype.selectDictLabels = selectDictLabels
Vue.prototype.download = download Vue.prototype.download = download
Vue.prototype.handleTree = handleTree Vue.prototype.handleTree = handleTree
Vue.prototype.desensitize = desensitize
Vue.prototype.$dayjs = dayjs
// 全局组件挂载 // 全局组件挂载
Vue.component('DictTag', DictTag) Vue.component('DictTag', DictTag)

@ -1,8 +1,8 @@
import store from '@/store' import store from '@/store'
import router from '@/router' import router from '@/router'
import cache from '@/plugins/cache' import cache from '@/plugins/cache'
import { MessageBox, } from 'element-ui' import { MessageBox } from 'element-ui'
import { login, logout, getInfo } from '@/api/login' import { login, logout, getInfo, getCommonConfigOptions } from '@/api/login'
import { getToken, setToken, removeToken } from '@/utils/auth' import { getToken, setToken, removeToken } from '@/utils/auth'
import { isHttp, isEmpty } from "@/utils/validate" import { isHttp, isEmpty } from "@/utils/validate"
import defAva from '@/assets/images/profile.jpg' import defAva from '@/assets/images/profile.jpg'
@ -17,7 +17,12 @@ const user = {
roles: [], roles: [],
permissions: [], permissions: [],
dept: '', dept: '',
status: '' status: '',
netConfig: {
httpProtocol: 'http',
ipAddress: '',
port: ''
}
}, },
mutations: { mutations: {
@ -47,9 +52,11 @@ const user = {
}, },
SET_STATUS: (state, status) => { SET_STATUS: (state, status) => {
state.status = status state.status = status
} },
SET_NET_CONFIG: (state, netConfig) => {
state.netConfig = netConfig
},
}, },
actions: { actions: {
// 登录 // 登录
Login({ commit }, userInfo) { 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 }) { LogOut({ commit, state }) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {

@ -226,3 +226,29 @@ export function getNormalPath(p) {
export function blobValidate(data) { export function blobValidate(data) {
return data.type !== 'application/json' 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;
}

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save