Merge branch 'main' of http://47.97.125.165:8902/jiangs/lis8.0-vue3
This commit is contained in:
commit
f3c715875d
@ -36,6 +36,7 @@
|
||||
"select2": "^4.1.0-rc.0",
|
||||
"socket.io-client": "^4.8.1",
|
||||
"sortablejs": "^1.14.0",
|
||||
"three": "^0.181.2",
|
||||
"vue": "3.5.23",
|
||||
"vue-cropper": "1.1.1",
|
||||
"vue-plugin-hiprint": "^0.0.60",
|
||||
|
||||
@ -2,6 +2,8 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
//检验项目界面
|
||||
|
||||
|
||||
//获取列表数据
|
||||
export function queryXmInfoNewService(query: any){
|
||||
return request({
|
||||
@ -65,3 +67,40 @@ export function delXmAlarmdetailNew(xmid:number,seq:number){
|
||||
})
|
||||
}
|
||||
|
||||
//保存数据
|
||||
export function saveDataService(query:any){
|
||||
return request({
|
||||
url: '/xminfo/update',
|
||||
method: 'post',
|
||||
data: query
|
||||
})
|
||||
}
|
||||
|
||||
//删除常用取值
|
||||
export function delXmValNewService(query:any){
|
||||
return request({
|
||||
url: '/xminfo/delXmValNew',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//删除常见描述
|
||||
export function delXmTextresultNew(query:any){
|
||||
return request({
|
||||
url: '/xminfo/delXmTextresultNew',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//删除仪器对照
|
||||
export function deleteXmInfoVs(query:any){
|
||||
return request({
|
||||
url: '/xminfo/delvs',
|
||||
method: 'delete',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
@ -34,6 +34,14 @@ export function getresultmedList(query?: Object) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 获取专家评语字典
|
||||
export function getgermtextdict(query?: Object) {
|
||||
return request({
|
||||
url: '/lisworkgerm/getgermtextdict',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 写入专家评语
|
||||
export function savetestResult(query?: Object) {
|
||||
return request({
|
||||
@ -132,6 +140,46 @@ export function getmediumList(data?: Object) {
|
||||
params: data
|
||||
})
|
||||
}
|
||||
//获取培养基字典
|
||||
export function getbactmediumList(data?: Object) {
|
||||
return request({
|
||||
url: '/lisworkgerm/getbactmedium',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
//新增培养基
|
||||
export function insertmedium(data?: Object) {
|
||||
return request({
|
||||
url: '/lisworkgerm/insertmedium',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
//修改培养基
|
||||
export function updatemedium(data?: Object) {
|
||||
return request({
|
||||
url: '/lisworkgerm/updatemedium',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
//删除培养基
|
||||
export function deletemedium(data?: Object) {
|
||||
return request({
|
||||
url: '/lisworkgerm/deletemedium',
|
||||
method: 'delete',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
//删除培养基 Array
|
||||
export function deletemediums(data?: Object) {
|
||||
return request({
|
||||
url: '/lisworkgerm/deletemedium',
|
||||
method: 'delete',
|
||||
data
|
||||
})
|
||||
}
|
||||
//微生物报告审核
|
||||
export function cbebCheck(data?: Object) {
|
||||
return request({
|
||||
@ -139,4 +187,12 @@ export function cbebCheck(data?: Object) {
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
//修改样本检验日期
|
||||
export function changepatjyrq(data?: Object) {
|
||||
return request({
|
||||
url: '/lisworkgerm/changepatjyrq',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
@ -293,8 +293,8 @@ aside {
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.jtIcon {
|
||||
width: 2.5rem;
|
||||
.jt_btn {
|
||||
width: 1.5rem;
|
||||
height: 2rem;
|
||||
line-height: 2rem;
|
||||
font-size: 1rem;
|
||||
|
||||
@ -395,6 +395,9 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.el-table--default .cell {
|
||||
padding: 0 0 0 .3125rem !important;
|
||||
}
|
||||
|
||||
// 表格input宽度,表格select宽度
|
||||
.full-width-input .el-input__inner .el-select__inner {
|
||||
@ -411,6 +414,7 @@
|
||||
box-shadow: none;
|
||||
background: transparent !important;
|
||||
padding: 0 !important;
|
||||
padding-left: .3125rem !important;
|
||||
outline: none;
|
||||
|
||||
&:hover {
|
||||
@ -422,6 +426,7 @@
|
||||
box-shadow: none;
|
||||
background: transparent !important;
|
||||
padding: 0 !important;
|
||||
padding-left: .3125rem !important;
|
||||
outline: none;
|
||||
|
||||
&:hover {
|
||||
|
||||
511
src/components/Ballpit/index.vue
Normal file
511
src/components/Ballpit/index.vue
Normal file
@ -0,0 +1,511 @@
|
||||
<script setup lang="ts">
|
||||
// @ts-ignore
|
||||
import { Clock, Mesh, OrthographicCamera, PlaneGeometry, Scene, ShaderMaterial, Vector2, Vector3, WebGLRenderer } from 'three';
|
||||
import { onBeforeUnmount, onMounted, ref, useTemplateRef, watch, type CSSProperties } from 'vue';
|
||||
|
||||
const vertexShader = `
|
||||
precision highp float;
|
||||
|
||||
void main() {
|
||||
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
||||
}
|
||||
`;
|
||||
|
||||
const fragmentShader = `
|
||||
precision highp float;
|
||||
|
||||
uniform float iTime;
|
||||
uniform vec3 iResolution;
|
||||
uniform float animationSpeed;
|
||||
|
||||
uniform bool enableTop;
|
||||
uniform bool enableMiddle;
|
||||
uniform bool enableBottom;
|
||||
|
||||
uniform int topLineCount;
|
||||
uniform int middleLineCount;
|
||||
uniform int bottomLineCount;
|
||||
|
||||
uniform float topLineDistance;
|
||||
uniform float middleLineDistance;
|
||||
uniform float bottomLineDistance;
|
||||
|
||||
uniform vec3 topWavePosition;
|
||||
uniform vec3 middleWavePosition;
|
||||
uniform vec3 bottomWavePosition;
|
||||
|
||||
uniform vec2 iMouse;
|
||||
uniform bool interactive;
|
||||
uniform float bendRadius;
|
||||
uniform float bendStrength;
|
||||
uniform float bendInfluence;
|
||||
|
||||
uniform bool parallax;
|
||||
uniform float parallaxStrength;
|
||||
uniform vec2 parallaxOffset;
|
||||
|
||||
uniform vec3 lineGradient[8];
|
||||
uniform int lineGradientCount;
|
||||
|
||||
const vec3 BLACK = vec3(0.0);
|
||||
const vec3 PINK = vec3(233.0, 71.0, 245.0) / 255.0;
|
||||
const vec3 BLUE = vec3(47.0, 75.0, 162.0) / 255.0;
|
||||
|
||||
mat2 rotate(float r) {
|
||||
return mat2(cos(r), sin(r), -sin(r), cos(r));
|
||||
}
|
||||
|
||||
vec3 background_color(vec2 uv) {
|
||||
vec3 col = vec3(0.0);
|
||||
|
||||
float y = sin(uv.x - 0.2) * 0.3 - 0.1;
|
||||
float m = uv.y - y;
|
||||
|
||||
col += mix(BLUE, BLACK, smoothstep(0.0, 1.0, abs(m)));
|
||||
col += mix(PINK, BLACK, smoothstep(0.0, 1.0, abs(m - 0.8)));
|
||||
return col * 0.5;
|
||||
}
|
||||
|
||||
vec3 getLineColor(float t, vec3 baseColor) {
|
||||
if (lineGradientCount <= 0) {
|
||||
return baseColor;
|
||||
}
|
||||
|
||||
vec3 gradientColor;
|
||||
|
||||
if (lineGradientCount == 1) {
|
||||
gradientColor = lineGradient[0];
|
||||
} else {
|
||||
float clampedT = clamp(t, 0.0, 0.9999);
|
||||
float scaled = clampedT * float(lineGradientCount - 1);
|
||||
int idx = int(floor(scaled));
|
||||
float f = fract(scaled);
|
||||
int idx2 = min(idx + 1, lineGradientCount - 1);
|
||||
|
||||
vec3 c1 = lineGradient[idx];
|
||||
vec3 c2 = lineGradient[idx2];
|
||||
|
||||
gradientColor = mix(c1, c2, f);
|
||||
}
|
||||
|
||||
return gradientColor * 0.5;
|
||||
}
|
||||
|
||||
float wave(vec2 uv, float offset, vec2 screenUv, vec2 mouseUv, bool shouldBend) {
|
||||
float time = iTime * animationSpeed;
|
||||
|
||||
float x_offset = offset;
|
||||
float x_movement = time * 0.1;
|
||||
float amp = sin(offset + time * 0.2) * 0.3;
|
||||
float y = sin(uv.x + x_offset + x_movement) * amp;
|
||||
|
||||
if (shouldBend) {
|
||||
vec2 d = screenUv - mouseUv;
|
||||
float influence = exp(-dot(d, d) * bendRadius);
|
||||
float bendOffset = (mouseUv.y - screenUv.y) * influence * bendStrength * bendInfluence;
|
||||
y += bendOffset;
|
||||
}
|
||||
|
||||
float m = uv.y - y;
|
||||
return 0.0175 / max(abs(m) + 0.01, 1e-3) + 0.01;
|
||||
}
|
||||
|
||||
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
|
||||
vec2 baseUv = (2.0 * fragCoord - iResolution.xy) / iResolution.y;
|
||||
baseUv.y *= -1.0;
|
||||
|
||||
if (parallax) {
|
||||
baseUv += parallaxOffset;
|
||||
}
|
||||
|
||||
vec3 col = vec3(0.0);
|
||||
|
||||
vec3 b = lineGradientCount > 0 ? vec3(0.0) : background_color(baseUv);
|
||||
|
||||
vec2 mouseUv = vec2(0.0);
|
||||
if (interactive) {
|
||||
mouseUv = (2.0 * iMouse - iResolution.xy) / iResolution.y;
|
||||
mouseUv.y *= -1.0;
|
||||
}
|
||||
|
||||
if (enableBottom) {
|
||||
for (int i = 0; i < bottomLineCount; ++i) {
|
||||
float fi = float(i);
|
||||
float t = fi / max(float(bottomLineCount - 1), 1.0);
|
||||
vec3 lineCol = getLineColor(t, b);
|
||||
|
||||
float angle = bottomWavePosition.z * log(length(baseUv) + 1.0);
|
||||
vec2 ruv = baseUv * rotate(angle);
|
||||
col += lineCol * wave(
|
||||
ruv + vec2(bottomLineDistance * fi + bottomWavePosition.x, bottomWavePosition.y),
|
||||
1.5 + 0.2 * fi,
|
||||
baseUv,
|
||||
mouseUv,
|
||||
interactive
|
||||
) * 0.2;
|
||||
}
|
||||
}
|
||||
|
||||
if (enableMiddle) {
|
||||
for (int i = 0; i < middleLineCount; ++i) {
|
||||
float fi = float(i);
|
||||
float t = fi / max(float(middleLineCount - 1), 1.0);
|
||||
vec3 lineCol = getLineColor(t, b);
|
||||
|
||||
float angle = middleWavePosition.z * log(length(baseUv) + 1.0);
|
||||
vec2 ruv = baseUv * rotate(angle);
|
||||
col += lineCol * wave(
|
||||
ruv + vec2(middleLineDistance * fi + middleWavePosition.x, middleWavePosition.y),
|
||||
2.0 + 0.15 * fi,
|
||||
baseUv,
|
||||
mouseUv,
|
||||
interactive
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (enableTop) {
|
||||
for (int i = 0; i < topLineCount; ++i) {
|
||||
float fi = float(i);
|
||||
float t = fi / max(float(topLineCount - 1), 1.0);
|
||||
vec3 lineCol = getLineColor(t, b);
|
||||
|
||||
float angle = topWavePosition.z * log(length(baseUv) + 1.0);
|
||||
vec2 ruv = baseUv * rotate(angle);
|
||||
ruv.x *= -1.0;
|
||||
col += lineCol * wave(
|
||||
ruv + vec2(topLineDistance * fi + topWavePosition.x, topWavePosition.y),
|
||||
1.0 + 0.2 * fi,
|
||||
baseUv,
|
||||
mouseUv,
|
||||
interactive
|
||||
) * 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
fragColor = vec4(col, 1.0);
|
||||
}
|
||||
|
||||
void main() {
|
||||
vec4 color = vec4(0.0);
|
||||
mainImage(color, gl_FragCoord.xy);
|
||||
gl_FragColor = color;
|
||||
}
|
||||
`;
|
||||
|
||||
const MAX_GRADIENT_STOPS = 8;
|
||||
|
||||
type WavePosition = {
|
||||
x: number;
|
||||
y: number;
|
||||
rotate: number;
|
||||
};
|
||||
|
||||
type FloatingLinesProps = {
|
||||
linesGradient?: string[];
|
||||
enabledWaves?: Array<'top' | 'middle' | 'bottom'>;
|
||||
lineCount?: number | number[];
|
||||
lineDistance?: number | number[];
|
||||
topWavePosition?: WavePosition;
|
||||
middleWavePosition?: WavePosition;
|
||||
bottomWavePosition?: WavePosition;
|
||||
animationSpeed?: number;
|
||||
interactive?: boolean;
|
||||
bendRadius?: number;
|
||||
bendStrength?: number;
|
||||
mouseDamping?: number;
|
||||
parallax?: boolean;
|
||||
parallaxStrength?: number;
|
||||
mixBlendMode?: CSSProperties['mixBlendMode'];
|
||||
};
|
||||
|
||||
const props = withDefaults(defineProps<FloatingLinesProps>(), {
|
||||
enabledWaves: () => ['top', 'middle', 'bottom'],
|
||||
lineCount: () => [6],
|
||||
lineDistance: () => [5],
|
||||
bottomWavePosition: () => ({ x: 2.0, y: -0.7, rotate: -1 }),
|
||||
animationSpeed: 1,
|
||||
interactive: true,
|
||||
bendRadius: 5.0,
|
||||
bendStrength: -0.5,
|
||||
mouseDamping: 0.05,
|
||||
parallax: true,
|
||||
parallaxStrength: 0.2,
|
||||
mixBlendMode: 'screen'
|
||||
});
|
||||
|
||||
function hexToVec3(hex: string): Vector3 {
|
||||
let value = hex.trim();
|
||||
|
||||
if (value.startsWith('#')) {
|
||||
value = value.slice(1);
|
||||
}
|
||||
|
||||
let r = 255;
|
||||
let g = 255;
|
||||
let b = 255;
|
||||
|
||||
if (value.length === 3) {
|
||||
r = parseInt(value[0] + value[0], 16);
|
||||
g = parseInt(value[1] + value[1], 16);
|
||||
b = parseInt(value[2] + value[2], 16);
|
||||
} else if (value.length === 6) {
|
||||
r = parseInt(value.slice(0, 2), 16);
|
||||
g = parseInt(value.slice(2, 4), 16);
|
||||
b = parseInt(value.slice(4, 6), 16);
|
||||
}
|
||||
|
||||
return new Vector3(r / 255, g / 255, b / 255);
|
||||
}
|
||||
|
||||
const containerRef = useTemplateRef('containerRef');
|
||||
const targetMouseRef = ref<Vector2>(new Vector2(-1000, -1000));
|
||||
const currentMouseRef = ref<Vector2>(new Vector2(-1000, -1000));
|
||||
const targetInfluenceRef = ref<number>(0);
|
||||
const currentInfluenceRef = ref<number>(0);
|
||||
const targetParallaxRef = ref<Vector2>(new Vector2(0, 0));
|
||||
const currentParallaxRef = ref<Vector2>(new Vector2(0, 0));
|
||||
|
||||
let cleanup: (() => void) | null = null;
|
||||
const setup = () => {
|
||||
if (!containerRef.value) return;
|
||||
|
||||
const getLineCount = (waveType: 'top' | 'middle' | 'bottom'): number => {
|
||||
if (typeof props.lineCount === 'number') return props.lineCount;
|
||||
if (!props.enabledWaves.includes(waveType)) return 0;
|
||||
const index = props.enabledWaves.indexOf(waveType);
|
||||
return props.lineCount[index] ?? 6;
|
||||
};
|
||||
|
||||
const getLineDistance = (waveType: 'top' | 'middle' | 'bottom'): number => {
|
||||
if (typeof props.lineDistance === 'number') return props.lineDistance;
|
||||
if (!props.enabledWaves.includes(waveType)) return 0.1;
|
||||
const index = props.enabledWaves.indexOf(waveType);
|
||||
return props.lineDistance[index] ?? 0.1;
|
||||
};
|
||||
|
||||
const topLineCount = props.enabledWaves.includes('top') ? getLineCount('top') : 0;
|
||||
const middleLineCount = props.enabledWaves.includes('middle') ? getLineCount('middle') : 0;
|
||||
const bottomLineCount = props.enabledWaves.includes('bottom') ? getLineCount('bottom') : 0;
|
||||
|
||||
const topLineDistance = props.enabledWaves.includes('top') ? getLineDistance('top') * 0.01 : 0.01;
|
||||
const middleLineDistance = props.enabledWaves.includes('middle') ? getLineDistance('middle') * 0.01 : 0.01;
|
||||
const bottomLineDistance = props.enabledWaves.includes('bottom') ? getLineDistance('bottom') * 0.01 : 0.01;
|
||||
|
||||
const scene = new Scene();
|
||||
|
||||
const camera = new OrthographicCamera(-1, 1, 1, -1, 0, 1);
|
||||
camera.position.z = 1;
|
||||
|
||||
const renderer = new WebGLRenderer({ antialias: true, alpha: false });
|
||||
renderer.setPixelRatio(Math.min(window.devicePixelRatio || 1, 2));
|
||||
renderer.domElement.style.width = '100%';
|
||||
renderer.domElement.style.height = '100%';
|
||||
containerRef.value.appendChild(renderer.domElement);
|
||||
|
||||
const uniforms = {
|
||||
iTime: { value: 0 },
|
||||
iResolution: { value: new Vector3(1, 1, 1) },
|
||||
animationSpeed: { value: props.animationSpeed },
|
||||
|
||||
enableTop: { value: props.enabledWaves.includes('top') },
|
||||
enableMiddle: { value: props.enabledWaves.includes('middle') },
|
||||
enableBottom: { value: props.enabledWaves.includes('bottom') },
|
||||
|
||||
topLineCount: { value: topLineCount },
|
||||
middleLineCount: { value: middleLineCount },
|
||||
bottomLineCount: { value: bottomLineCount },
|
||||
|
||||
topLineDistance: { value: topLineDistance },
|
||||
middleLineDistance: { value: middleLineDistance },
|
||||
bottomLineDistance: { value: bottomLineDistance },
|
||||
|
||||
topWavePosition: {
|
||||
value: new Vector3(
|
||||
props.topWavePosition?.x ?? 10.0,
|
||||
props.topWavePosition?.y ?? 0.5,
|
||||
props.topWavePosition?.rotate ?? -0.4
|
||||
)
|
||||
},
|
||||
middleWavePosition: {
|
||||
value: new Vector3(
|
||||
props.middleWavePosition?.x ?? 5.0,
|
||||
props.middleWavePosition?.y ?? 0.0,
|
||||
props.middleWavePosition?.rotate ?? 0.2
|
||||
)
|
||||
},
|
||||
bottomWavePosition: {
|
||||
value: new Vector3(
|
||||
props.bottomWavePosition?.x ?? 2.0,
|
||||
props.bottomWavePosition?.y ?? -0.7,
|
||||
props.bottomWavePosition?.rotate ?? 0.4
|
||||
)
|
||||
},
|
||||
|
||||
iMouse: { value: new Vector2(-1000, -1000) },
|
||||
interactive: { value: props.interactive },
|
||||
bendRadius: { value: props.bendRadius },
|
||||
bendStrength: { value: props.bendStrength },
|
||||
bendInfluence: { value: 0 },
|
||||
|
||||
parallax: { value: props.parallax },
|
||||
parallaxStrength: { value: props.parallaxStrength },
|
||||
parallaxOffset: { value: new Vector2(0, 0) },
|
||||
|
||||
lineGradient: {
|
||||
value: Array.from({ length: MAX_GRADIENT_STOPS }, () => new Vector3(1, 1, 1))
|
||||
},
|
||||
lineGradientCount: { value: 0 }
|
||||
};
|
||||
|
||||
if (props.linesGradient && props.linesGradient.length > 0) {
|
||||
const stops = props.linesGradient.slice(0, MAX_GRADIENT_STOPS);
|
||||
uniforms.lineGradientCount.value = stops.length;
|
||||
|
||||
stops.forEach((hex, i) => {
|
||||
const color = hexToVec3(hex);
|
||||
uniforms.lineGradient.value[i].set(color.x, color.y, color.z);
|
||||
});
|
||||
}
|
||||
|
||||
const material = new ShaderMaterial({
|
||||
uniforms,
|
||||
vertexShader,
|
||||
fragmentShader
|
||||
});
|
||||
|
||||
const geometry = new PlaneGeometry(2, 2);
|
||||
const mesh = new Mesh(geometry, material);
|
||||
scene.add(mesh);
|
||||
|
||||
const clock = new Clock();
|
||||
|
||||
const setSize = () => {
|
||||
const el = containerRef.value!;
|
||||
const width = el.clientWidth || 1;
|
||||
const height = el.clientHeight || 1;
|
||||
|
||||
renderer.setSize(width, height, false);
|
||||
|
||||
const canvasWidth = renderer.domElement.width;
|
||||
const canvasHeight = renderer.domElement.height;
|
||||
uniforms.iResolution.value.set(canvasWidth, canvasHeight, 1);
|
||||
};
|
||||
|
||||
setSize();
|
||||
|
||||
const ro = typeof ResizeObserver !== 'undefined' ? new ResizeObserver(setSize) : null;
|
||||
|
||||
if (ro && containerRef.value) {
|
||||
ro.observe(containerRef.value);
|
||||
}
|
||||
|
||||
const handlePointerMove = (event: PointerEvent) => {
|
||||
const rect = renderer.domElement.getBoundingClientRect();
|
||||
const x = event.clientX - rect.left;
|
||||
const y = event.clientY - rect.top;
|
||||
const dpr = renderer.getPixelRatio();
|
||||
|
||||
targetMouseRef.value.set(x * dpr, (rect.height - y) * dpr);
|
||||
targetInfluenceRef.value = 1.0;
|
||||
|
||||
if (props.parallax) {
|
||||
const centerX = rect.width / 2;
|
||||
const centerY = rect.height / 2;
|
||||
const offsetX = (x - centerX) / rect.width;
|
||||
const offsetY = -(y - centerY) / rect.height;
|
||||
targetParallaxRef.value.set(offsetX * props.parallaxStrength, offsetY * props.parallaxStrength);
|
||||
}
|
||||
};
|
||||
|
||||
const handlePointerLeave = () => {
|
||||
targetInfluenceRef.value = 0.0;
|
||||
};
|
||||
|
||||
if (props.interactive) {
|
||||
renderer.domElement.addEventListener('pointermove', handlePointerMove);
|
||||
renderer.domElement.addEventListener('pointerleave', handlePointerLeave);
|
||||
}
|
||||
|
||||
let raf = 0;
|
||||
const renderLoop = () => {
|
||||
uniforms.iTime.value = clock.getElapsedTime();
|
||||
|
||||
if (props.interactive) {
|
||||
currentMouseRef.value.lerp(targetMouseRef.value, props.mouseDamping);
|
||||
uniforms.iMouse.value.copy(currentMouseRef.value);
|
||||
|
||||
currentInfluenceRef.value += (targetInfluenceRef.value - currentInfluenceRef.value) * props.mouseDamping;
|
||||
uniforms.bendInfluence.value = currentInfluenceRef.value;
|
||||
}
|
||||
|
||||
if (props.parallax) {
|
||||
currentParallaxRef.value.lerp(targetParallaxRef.value, props.mouseDamping);
|
||||
uniforms.parallaxOffset.value.copy(currentParallaxRef.value);
|
||||
}
|
||||
|
||||
renderer.render(scene, camera);
|
||||
raf = requestAnimationFrame(renderLoop);
|
||||
};
|
||||
renderLoop();
|
||||
|
||||
cleanup = () => {
|
||||
cancelAnimationFrame(raf);
|
||||
if (ro && containerRef.value) {
|
||||
ro.disconnect();
|
||||
}
|
||||
|
||||
if (props.interactive) {
|
||||
renderer.domElement.removeEventListener('pointermove', handlePointerMove);
|
||||
renderer.domElement.removeEventListener('pointerleave', handlePointerLeave);
|
||||
}
|
||||
|
||||
geometry.dispose();
|
||||
material.dispose();
|
||||
renderer.dispose();
|
||||
if (renderer.domElement.parentElement) {
|
||||
renderer.domElement.parentElement.removeChild(renderer.domElement);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
setup();
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
cleanup?.();
|
||||
});
|
||||
|
||||
watch(
|
||||
() => [
|
||||
props.linesGradient,
|
||||
props.enabledWaves,
|
||||
props.lineCount,
|
||||
props.lineDistance,
|
||||
props.topWavePosition,
|
||||
props.middleWavePosition,
|
||||
props.bottomWavePosition,
|
||||
props.animationSpeed,
|
||||
props.interactive,
|
||||
props.bendRadius,
|
||||
props.bendStrength,
|
||||
props.mouseDamping,
|
||||
props.parallax,
|
||||
props.parallaxStrength
|
||||
],
|
||||
() => {
|
||||
cleanup?.();
|
||||
setup();
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div ref="containerRef" class="relative w-full h-full overflow-hidden floating-lines-container" :style="{
|
||||
mixBlendMode: mixBlendMode
|
||||
}" />
|
||||
</template>
|
||||
@ -113,7 +113,7 @@ const visibleChange = (val: any) => {
|
||||
currentIndex.value = filterData.value.findIndex(item => item[props.value!] === props.data);
|
||||
if (currentIndex.value >= 0) {
|
||||
tableRef.value.setCurrentRow(filterData.value[currentIndex.value]);
|
||||
tableRef.value.setScrollTop(currentIndex.value * 25);
|
||||
tableRef.value.setScrollTop(currentIndex.value * 30);
|
||||
}
|
||||
}, 10);
|
||||
}
|
||||
@ -235,7 +235,7 @@ const handleKeydown = (e: any) => {
|
||||
tableRef.value.setCurrentRow(filterData.value[currentIndex.value]);
|
||||
|
||||
// 滚动到当前行
|
||||
tableRef.value.setScrollTop(currentIndex.value * 25);
|
||||
tableRef.value.setScrollTop(currentIndex.value * 30);
|
||||
|
||||
// 回车确认
|
||||
if (e.key === "Enter") {
|
||||
|
||||
@ -26,7 +26,10 @@
|
||||
<el-table-column v-if="!item.type && item.slot && item.visible" :prop="item.prop" :label="item.label"
|
||||
:width="item.width" :min-width="item.minWidth" :fixed="item.fixed" :align="item.align || 'left'"
|
||||
:sortable="item.sortable" :show-overflow-tooltip="item.showOverflowTooltip !== false">
|
||||
<template #default="scope">
|
||||
<template v-if="item.headerSlot" #header="scope">
|
||||
<slot :name="item.headerSlot" :column="scope.column" :$index="scope.$index" />
|
||||
</template>
|
||||
<template v-if="item.slot" #default="scope">
|
||||
<slot :name="item.slot" :row="scope.row" :$index="scope.$index" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@ -15,9 +15,10 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, watch, onMounted } from 'vue';
|
||||
import { queryXmInfo } from '@/api/liswork/work/LisWork'
|
||||
// @ts-ignore
|
||||
import { getFirstLetter } from '@/utils/pinyin.js'; // 引入拼音处理工具
|
||||
// 组件参数
|
||||
const props = defineProps({
|
||||
@ -55,7 +56,7 @@ const loadDictData = async () => {
|
||||
};
|
||||
const response = await queryXmInfo(requestParams);
|
||||
|
||||
const rawData = response.data.map((item, index) => {
|
||||
const rawData = response.data.map((item: any, index: number) => {
|
||||
return {
|
||||
value: item.xmdh || `未知编码_${index}`, // 确保value存在
|
||||
label: item.xmmc || `未知名称_${index}`, // 确保label存在
|
||||
@ -64,7 +65,7 @@ const loadDictData = async () => {
|
||||
};
|
||||
});
|
||||
// 为每个字典项添加简拼字段
|
||||
dictData.value = (rawData || []).map(item => ({
|
||||
dictData.value = (rawData || []).map((item: any) => ({
|
||||
...item,
|
||||
pinyin: getFirstLetter(item.label) // 新增pinyin字段存储简拼
|
||||
}));
|
||||
@ -87,7 +88,7 @@ const filterDictData = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
filteredDictData.value = dictData.value.filter(item => {
|
||||
filteredDictData.value = dictData.value.filter((item: any) => {
|
||||
// 1. 模糊搜索:匹配label(名称)或value(编码)
|
||||
const matchLabel = item.label.toLowerCase().includes(key);
|
||||
const matchValue = String(item.value).toLowerCase().includes(key);
|
||||
@ -123,7 +124,7 @@ const openDictSelector = async () => {
|
||||
|
||||
|
||||
// 选择字典项
|
||||
const selectItem = (item) => {
|
||||
const selectItem = (item: any) => {
|
||||
emit('select', item);
|
||||
dialogVisible.value = false;
|
||||
};
|
||||
|
||||
@ -70,7 +70,7 @@ const scrollToActiveTab = () => {
|
||||
// 如果Tab不在可见区域内,则滚动到可见区域
|
||||
if (tabRect.left < containerRect.left || tabRect.right > containerRect.right) {
|
||||
scrollContainer.scrollTo({
|
||||
left: tabRect.left - containerRect.left + scrollContainer.scrollLeft - 100,
|
||||
left: tabRect.left - containerRect.left + scrollContainer.scrollLeft - 200,
|
||||
behavior: 'smooth'
|
||||
});
|
||||
}
|
||||
|
||||
@ -1,20 +1,20 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-model="visible" :title="title" :width="500" :close-on-click-modal="false" :draggable="true">
|
||||
<el-form ref="formRef" :model="formValue" label-width="100px">
|
||||
<el-form ref="formRef" :model="formData" label-width="100px">
|
||||
<!-- 用户代号 -->
|
||||
<el-form-item label="用户代号:" prop="yhdh" :rules="[{ required: true, message: '请输入用户代号', trigger: 'change' }]">
|
||||
<el-input ref="yhdhRef" v-model="formValue.yhdh" @change="handleChange" />
|
||||
<el-input ref="yhdhRef" v-model="formData.yhdh" @change="handleChange" />
|
||||
</el-form-item>
|
||||
|
||||
<!-- 用户姓名 -->
|
||||
<el-form-item label="用户姓名:">
|
||||
<el-input v-model="formValue.userName" disabled />
|
||||
<el-input v-model="formData.userName" disabled />
|
||||
</el-form-item>
|
||||
|
||||
<!-- 密码输入 -->
|
||||
<el-form-item label="密码:" prop="mm" :rules="[{ required: true, message: '请输入密码', trigger: 'change' }]">
|
||||
<el-input v-model="formValue.mm" type="password" @keyup.enter="handleConfirm" />
|
||||
<el-input v-model="formData.mm" type="password" @keyup.enter="handleConfirm" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@ -36,14 +36,6 @@ interface UserInfo {
|
||||
nickName: string,
|
||||
}
|
||||
const props = defineProps({
|
||||
formValue: {
|
||||
type: Object,
|
||||
default: {
|
||||
yhdh: '',
|
||||
userName: '',
|
||||
mm: '',
|
||||
}
|
||||
},
|
||||
|
||||
labPatKey: {
|
||||
type: Object,
|
||||
@ -61,7 +53,11 @@ const props = defineProps({
|
||||
});
|
||||
const visible = ref(false);
|
||||
// 表单数据
|
||||
|
||||
const formData = ref({
|
||||
yhdh: '',
|
||||
userName: '',
|
||||
mm: '',
|
||||
})
|
||||
|
||||
const formRef = ref();
|
||||
const yhdhRef = ref();
|
||||
@ -74,7 +70,7 @@ const open = () => {
|
||||
});
|
||||
}
|
||||
|
||||
const emit = defineEmits(["confirm", "cancel",]);
|
||||
const emit = defineEmits(["confirm"]);
|
||||
// 处理确定按钮点击
|
||||
const handleConfirm = async () => {
|
||||
if (!formRef.value) return;
|
||||
@ -82,9 +78,9 @@ const handleConfirm = async () => {
|
||||
// 表单验证
|
||||
const valid = await formRef.value.validate();
|
||||
if (valid) {
|
||||
checkYsUser({ ...props.formValue, ...props.labPatKey }).then((res: any) => {
|
||||
checkYsUser({ ...formData.value, ...props.labPatKey }).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
emit('confirm', props.formValue)
|
||||
emit('confirm', formData.value)
|
||||
}
|
||||
})
|
||||
|
||||
@ -93,14 +89,18 @@ const handleConfirm = async () => {
|
||||
|
||||
// 处理取消按钮点击
|
||||
const cancel = () => {
|
||||
formData.value = {
|
||||
yhdh: '',
|
||||
userName: '',
|
||||
mm: '',
|
||||
}
|
||||
formRef.value?.resetFields();
|
||||
visible.value = false
|
||||
emit('cancel',)
|
||||
};
|
||||
|
||||
|
||||
const handleChange = (value: string) => {
|
||||
props.formValue.userName = props.userList.find((item: any) => item.userName == value)?.nickName
|
||||
formData.value.userName = props.userList.find((item: any) => item.userName == value)?.nickName || value
|
||||
};
|
||||
|
||||
|
||||
|
||||
1
src/types/Object.d.ts
vendored
1
src/types/Object.d.ts
vendored
@ -120,6 +120,7 @@ export class XmValNew {
|
||||
}
|
||||
|
||||
export class XmInfoVs {
|
||||
vsid?: number;
|
||||
yq: string;
|
||||
xmid: number;
|
||||
xs?: number;
|
||||
|
||||
5
src/utils/czUtil/lisUtil.ts
Normal file
5
src/utils/czUtil/lisUtil.ts
Normal file
@ -0,0 +1,5 @@
|
||||
|
||||
|
||||
// export function getArrayMaxXh(tableList: Array<any>) {
|
||||
// return tableList.length > 0 ? Math.max(...tableList.map((item:any) => item.xh || 0)) : 0;
|
||||
// }
|
||||
@ -535,7 +535,15 @@ const rightTableConfig = ref(
|
||||
)
|
||||
|
||||
const formatJgbz = (v: string) => {
|
||||
return v == 'H' ? '高' : v == 'L' ? '低' : v == 'N' ? '阴性' : v == 'P' ? '阳性' : v == 'Q' ? '弱阳性' : v == 'M' ? '正常' : ''
|
||||
const jgbzMap = {
|
||||
'H': '高',
|
||||
'L': '低',
|
||||
'N': '阴性',
|
||||
'P': '阳性',
|
||||
'Q': '弱阳性',
|
||||
'M': '正常'
|
||||
};
|
||||
return jgbzMap[v as keyof typeof jgbzMap] ?? '';
|
||||
}
|
||||
|
||||
const expertComment = ref('')
|
||||
|
||||
@ -100,9 +100,12 @@ const getInfoList = () => {
|
||||
})
|
||||
}
|
||||
|
||||
watch(() => props.queryParams, (newValue) => {
|
||||
watch(() => queryParams, (newValue) => {
|
||||
getInfoList()
|
||||
}, { immediate: true })
|
||||
}, {
|
||||
immediate: true,
|
||||
deep: true
|
||||
})
|
||||
|
||||
const getMxInfo = (row: any) => {
|
||||
const data = {
|
||||
|
||||
@ -13,7 +13,6 @@ const info = ref('')
|
||||
const getClinicalInfo = (data: any) => {
|
||||
clinicInfo(data).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
console.log('临床意义==>', res.data);
|
||||
info.value = res.data
|
||||
}
|
||||
})
|
||||
@ -26,7 +25,6 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
emitter.on('refreshClinical', (data) => {
|
||||
console.log('data==>', data);
|
||||
getClinicalInfo(data)
|
||||
})
|
||||
})
|
||||
|
||||
@ -58,7 +58,10 @@ const getCombination = () => {
|
||||
};
|
||||
watch(() => props.queryParams.yq, (newValue) => {
|
||||
getCombination()
|
||||
}, { immediate: true })
|
||||
}, {
|
||||
immediate: true,
|
||||
deep: true
|
||||
})
|
||||
|
||||
const changeLxsr = (row: any) => {
|
||||
const lxsrs = tableData.value.filter((item: any) => item.lxsr).map((item: any) => item.mbmc);
|
||||
|
||||
@ -203,7 +203,10 @@ const getList = () => {
|
||||
|
||||
watch(() => props.queryParams, (newValue) => {
|
||||
getList()
|
||||
}, { immediate: true })
|
||||
}, {
|
||||
immediate: true,
|
||||
deep: true
|
||||
})
|
||||
|
||||
const handleRowClick = (row: any) => {
|
||||
nextTick(() => {
|
||||
@ -214,9 +217,9 @@ const handleRowClick = (row: any) => {
|
||||
const myEcharts = ref()
|
||||
const getEcharts = (data: any) => {
|
||||
const periods = ['nine', 'eight', 'seven', 'six', 'five', 'four', 'three', 'two', 'one', 'first']
|
||||
|
||||
const xData = periods.map(period => { return data[`${period}Date`] }).filter(Boolean) //过滤掉空值
|
||||
const yData = periods.map(period => { return data[`${period}Csjg`] }).filter(Boolean)
|
||||
if (!data) return
|
||||
const xData = periods.map(period => { return data[`${period}Date`] })?.filter(Boolean) //过滤掉空值
|
||||
const yData = periods.map(period => { return data[`${period}Csjg`] })?.filter(Boolean)
|
||||
const Intance = echarts.init(myEcharts.value);
|
||||
|
||||
|
||||
|
||||
125
src/views/liswork/components/otherInformation/index.vue
Normal file
125
src/views/liswork/components/otherInformation/index.vue
Normal file
@ -0,0 +1,125 @@
|
||||
<!-- 其他信息 -->
|
||||
<template>
|
||||
<div>
|
||||
<!-- 电子签名信息 -->
|
||||
<div class="section">
|
||||
<div class="section-title">电子签名信息</div>
|
||||
<el-row class="info-row">
|
||||
<el-col :span="6" class="info-label">签名证书: </el-col>
|
||||
<el-col :span="6">
|
||||
<el-button type="primary" plain size="small">验证签名</el-button>
|
||||
<el-button type="primary" plain size="small">导出签名值</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="info-row">
|
||||
<el-col :span="6" class="info-label">签名时间:</el-col>
|
||||
<el-col :span="18" class="info-value">{{ info.sn_tss }} </el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<!-- 电子签名值 -->
|
||||
<div class="section signature-section">
|
||||
<div class="section-title">电子签名值</div>
|
||||
<div class="signature-content">
|
||||
<el-scrollbar height="120px">
|
||||
<pre>{{ info.sn_result }} </pre>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { reqinfo } from '@/api/liswork/work/LisWork';
|
||||
|
||||
|
||||
const props = defineProps({
|
||||
// 主键
|
||||
queryParams: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
})
|
||||
|
||||
const { queryParams } = toRefs(props)
|
||||
|
||||
const info = ref({
|
||||
sn_tss: '',
|
||||
sn_result: ''
|
||||
})
|
||||
watch(queryParams, () => {
|
||||
getInfo()
|
||||
})
|
||||
const getInfo = () => {
|
||||
reqinfo(queryParams.value).then((res: any) => {
|
||||
info.value = res.data[0] || {}
|
||||
}, {
|
||||
immediate: true,
|
||||
deep: true
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
/* 区块样式 */
|
||||
.section {
|
||||
margin-bottom: 10px;
|
||||
border: 1px solid #e0e0e0;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
background-color: #a6caf0;
|
||||
padding: 3px 10px;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid #e0e0e0;
|
||||
}
|
||||
|
||||
/* 信息行样式 */
|
||||
.info-row {
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
|
||||
.info-label {
|
||||
padding: 4px 10px;
|
||||
background-color: #fafafa;
|
||||
font-size: 13px;
|
||||
color: #333;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
padding: 4px 10px;
|
||||
font-size: 13px;
|
||||
color: #666;
|
||||
text-align: left;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
/* 签名区域样式 */
|
||||
.signature-section {
|
||||
border: 1px solid #e0e0e0;
|
||||
}
|
||||
|
||||
.signature-content {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.signature-content pre {
|
||||
margin: 0;
|
||||
font-family: monospace;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
@ -171,7 +171,10 @@ const getOthersInfo = () => {
|
||||
|
||||
watch(() => props.queryParams, (newValue) => {
|
||||
getOthersInfo()
|
||||
}, { immediate: true })
|
||||
}, {
|
||||
immediate: true,
|
||||
deep: true
|
||||
})
|
||||
|
||||
// 获取明细
|
||||
const handleRowClick = (row: any) => {
|
||||
@ -56,7 +56,10 @@ const getReexamination = () => {
|
||||
|
||||
watch(() => queryParams.value, () => {
|
||||
getReexamination();
|
||||
}, { immediate: true })
|
||||
}, {
|
||||
immediate: true,
|
||||
deep: true
|
||||
})
|
||||
|
||||
const tableRef = ref();
|
||||
const itemDictRef = ref(); // DictInput组件引用
|
||||
@ -111,7 +114,6 @@ const addRowFromDict = async (rowData: any) => {
|
||||
};
|
||||
|
||||
const handleCsjgEnter = (row: any) => {
|
||||
console.log('复查结果修改', row);
|
||||
saveRedo(row)
|
||||
}
|
||||
|
||||
|
||||
@ -43,7 +43,10 @@ const getResultGraph = () => {
|
||||
|
||||
watch(() => props.queryParams, (newValue) => {
|
||||
getResultGraph()
|
||||
}, { immediate: true })
|
||||
}, {
|
||||
immediate: true,
|
||||
deep: true
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@ -189,13 +189,16 @@ const lastTimeIndex = computed(() => {
|
||||
|
||||
const getInfo = () => {
|
||||
reqinfo(queryParams.value).then((res: any) => {
|
||||
info.value = res.data[0]
|
||||
info.value = res.data[0] || {}
|
||||
})
|
||||
}
|
||||
|
||||
watch(() => props.queryParams, (newValue) => {
|
||||
getInfo()
|
||||
}, { immediate: true })
|
||||
}, {
|
||||
immediate: true,
|
||||
deep: true
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
const data = { status: 0, del_flag: 0, pageSize: 1000, pageNum: 1 }
|
||||
|
||||
@ -75,7 +75,7 @@
|
||||
<el-col :span="10" :xs="24">
|
||||
<tabView :tabList="tabList" v-model:activeTab="activeTab" @update:active-tab="updateActive" />
|
||||
<KeepAlive>
|
||||
<component class="tabDiv" :is="activeTabN" :dataList="tabDataList" :formData="selectRow"></component>
|
||||
<component class="tabDiv" ref="tableTabRef" :is="activeTabN" :dataList="tabDataList" :formData="selectRow" v-model="modelParam" @refreshTabData="rowChange"></component>
|
||||
</KeepAlive>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -94,12 +94,14 @@ import Sort from './tab/Sort.vue'
|
||||
import Parameter from './tab/Parameter.vue';
|
||||
import ChannelNumber from './tab/ChannelNumber.vue';
|
||||
import ReferenceValueDetails from './tab/ReferenceValueDetails.vue';
|
||||
import { queryXmInfoNewService,queryXmInfoNewDetailService } from '@/api/liswork/labItem/labItemApi';
|
||||
import { queryXmInfoNewService,queryXmInfoNewDetailService,saveDataService} from '@/api/liswork/labItem/labItemApi';
|
||||
import SelectTable from '@/components/SelectTable/index.vue'
|
||||
import { getGroupInstrdList } from '@/api/liswork/work/LisWork';
|
||||
import tabView from '@/components/tabViews/index.vue';
|
||||
import { LabInstr,XmInfoNew } from '@/types';
|
||||
import { formatDict,getDictData,dictData } from '@/hooks';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { datalink } from '../../../api/liswork/work/LisWork';
|
||||
|
||||
const xmlbList = ref<Array<any>>([
|
||||
{ label: '数值型', value: '1' },
|
||||
@ -200,6 +202,17 @@ const tabDataList = ref<any>([]);
|
||||
const selectRow = ref();
|
||||
//明细数据
|
||||
const selectDetailRow = ref()
|
||||
const tableTabRef = ref()
|
||||
const modelParam = ref<any>({
|
||||
basicData: {},
|
||||
commonlyValuesData: [],
|
||||
userInstrData: [],
|
||||
commonDescriptionsData: [],
|
||||
referenceValueDetailsData: []
|
||||
})
|
||||
const basic = ref<boolean>(false)
|
||||
|
||||
|
||||
|
||||
// 仪器
|
||||
const getYqConfig = () => {
|
||||
@ -244,8 +257,46 @@ const handleDelCorr = () => {
|
||||
}
|
||||
|
||||
//保存
|
||||
const handleSave = () => {
|
||||
console.log('保存')
|
||||
const handleSave = async () => {
|
||||
|
||||
switch(activeTab.value){
|
||||
case 'Basic':
|
||||
basic.value = true
|
||||
modelParam.value.basicData = tableTabRef.value.basicData;
|
||||
break;
|
||||
case 'CommonlyValues':
|
||||
modelParam.value.commonlyValuesData = tableTabRef.value.commonlyValuesData;
|
||||
break;
|
||||
case 'UseInstr':
|
||||
modelParam.value.userInstrData = tableTabRef.value.userInstrData;
|
||||
break;
|
||||
case 'CommonDescriptions':
|
||||
modelParam.value.commonDescriptionsData = tableTabRef.value.commonDescriptionsData;
|
||||
break;
|
||||
case 'ReferenceValueDetails':
|
||||
modelParam.value.referenceValueDetailsData = tableTabRef.value.referenceValueDetailsData;
|
||||
break;
|
||||
}
|
||||
await saveDataService({
|
||||
xmInfoNew: modelParam.value.basicData,
|
||||
xmDoubleRows: [],
|
||||
xmValRows: [],
|
||||
xmInterRows: [],
|
||||
xmRefRows: [],
|
||||
xmTextResultRows: [],
|
||||
xmValNewRows: modelParam.value.commonlyValuesData,
|
||||
xmRefNewRows: modelParam.value.referenceValueDetailsData,
|
||||
xmInfoVsRows: modelParam.value.userInstrData,
|
||||
xmTextresultNewRows: modelParam.value.commonDescriptionsData
|
||||
})
|
||||
rowChange(selectRow.value)
|
||||
if(basic.value){
|
||||
await getList();
|
||||
basic.value = false
|
||||
}
|
||||
|
||||
ElMessage.success('保存成功!')
|
||||
|
||||
}
|
||||
//退拽属性
|
||||
const handleColumnDragEnd = (data: any) => {
|
||||
@ -266,37 +317,22 @@ const rowChange = async (row: any) => {
|
||||
selectRow.value = row;
|
||||
const res = await queryXmInfoNewDetailService(row.xmid,row.yq,row.xmdh)
|
||||
selectDetailRow.value = res.data
|
||||
console.log('明细数据:', res);
|
||||
console.log('选中行明细数据:',selectDetailRow.value)
|
||||
changeActiveTab()
|
||||
}
|
||||
|
||||
//tab变化
|
||||
const updateActive = () => {
|
||||
changeActiveTab()
|
||||
changeActiveTab()
|
||||
}
|
||||
|
||||
|
||||
const changeActiveTab = () => {
|
||||
switch(activeTab.value){
|
||||
case 'Basic':
|
||||
tabDataList.value = selectDetailRow.value.xmInfoNewRows[0] || [];
|
||||
break;
|
||||
case 'CommonlyValues':
|
||||
tabDataList.value = selectDetailRow.value.xmValNewRows[0] || [];
|
||||
break;
|
||||
case 'UseInstr':
|
||||
tabDataList.value = selectDetailRow.value.xmInfoVsRows[0] || [];
|
||||
break;
|
||||
case 'Knowledge':
|
||||
//tabDataList.value = res.data.xmInfoVsRows[0];
|
||||
case 'Sort':
|
||||
case 'CommonDescriptions':
|
||||
tabDataList.value = selectDetailRow.value.xmTextresultNewRows[0] || [];
|
||||
break;
|
||||
case 'ReferenceValueDetails':
|
||||
tabDataList.value = selectDetailRow.value.xmRefNewRows[0] || [];
|
||||
break;
|
||||
}
|
||||
modelParam.value.basicData = toRaw(selectDetailRow.value.xmInfoNew || {});
|
||||
modelParam.value.commonlyValuesData = toRaw(selectDetailRow.value.xmValNewRows || []);
|
||||
modelParam.value.userInstrData = toRaw(selectDetailRow.value.xmInfoVsRows || []);
|
||||
modelParam.value.commonDescriptionsData = toRaw(selectDetailRow.value.xmTextresultNewRows || []);
|
||||
modelParam.value.referenceValueDetailsData = toRaw(selectDetailRow.value.xmRefNewRows || []);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<el-button type="primary" @click="bClickAdd">增加</el-button>
|
||||
<el-button type="primary" @click="bClickDel">删除</el-button>
|
||||
</div>
|
||||
<CustomTable ref="tableRef" :data="dataList" :columns="columns" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
|
||||
<CustomTable ref="tableRef" :data="tableList" :columns="columns" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
|
||||
:config="tableConfig" @row-click="handRowClick">
|
||||
<template #qz = {row}>
|
||||
<el-select v-model="row.qz" clearable allow-create filterable default-first-option>
|
||||
@ -27,22 +27,21 @@
|
||||
<script setup lang="ts">
|
||||
import CustomTable from '@/components/elTable/index.vue'
|
||||
import { dictData,getDictData } from '@/hooks';
|
||||
import { DictData, XmValNew } from '@/types';
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
import {delXmValNewService} from '@/api/liswork/labItem/labItemApi'
|
||||
|
||||
const props = defineProps({
|
||||
dataList: {
|
||||
type: Object,
|
||||
default: []
|
||||
},
|
||||
formData: {
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
});
|
||||
// const props = defineProps({
|
||||
// formData: {
|
||||
// type: Object,
|
||||
// default: {}
|
||||
// }
|
||||
// });
|
||||
|
||||
const tableRef = ref<any>(null);
|
||||
const dataList = ref<Array<XmValNew>>([]);
|
||||
const modelParam = defineModel<any>()
|
||||
const emit = defineEmits(['refreshTabData'])
|
||||
|
||||
const tableRef = ref<any>();
|
||||
const tableList = ref<any>();
|
||||
const columns = ref([
|
||||
{ prop: 'qz', label: '取值', visible: true, align: 'center', slot:'qz', width: 200 },
|
||||
{ prop: 'srm', label: '快速输入码', visible: true, align: 'center',slot: 'srm', width: 100 },
|
||||
@ -64,27 +63,42 @@ const handleColumnDragEnd = (data: any) => {
|
||||
columns.value = data.columns;
|
||||
}
|
||||
|
||||
watch(
|
||||
() => modelParam.value,
|
||||
(newVal:any) => {
|
||||
tableList.value = [...newVal.commonlyValuesData];
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
|
||||
//序号最大值
|
||||
const maxXh = computed(() => {
|
||||
return tableList.value.length > 0 ? Math.max(...tableList.value.map((item:any) => item.xh || 0)) : 0;
|
||||
});
|
||||
|
||||
const bClickAdd = () => {
|
||||
const newData: XmValNew = {
|
||||
xmid: props.formData.xmid,
|
||||
const newData = {
|
||||
xmid: modelParam.value.basicData.xmid,
|
||||
qz: '',
|
||||
srm: '',
|
||||
jgbz: ''
|
||||
jgbz: '',
|
||||
xh: maxXh.value + 1
|
||||
}
|
||||
dataList.value?.push(newData);
|
||||
tableList.value.push(newData);
|
||||
|
||||
}
|
||||
|
||||
const bClickDel = async () => {
|
||||
await ElMessageBox.confirm('是否要删除选中的数据?','Warning',
|
||||
{
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'warning',
|
||||
}
|
||||
);
|
||||
if(selectRow.value){
|
||||
await ElMessageBox.confirm('是否要删除选中的数据?','警告',
|
||||
{confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'});
|
||||
//删掉界面上面的数据
|
||||
dataList.value = dataList.value?.filter(item => item.xh != selectRow.value.xh );
|
||||
//tableList.value = tableList.value?.filter((item:any) => item.xh != selectRow.value.xh );
|
||||
await delXmValNewService({xmid:modelParam.value.basicData.xmid,xh:selectRow.value.xh})
|
||||
emit('refreshTabData',modelParam.value.basicData)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -97,6 +111,15 @@ onActivated(async ()=>{
|
||||
await getDictData('VA','LF')
|
||||
qzOptions.value = dictData.value.VA
|
||||
jgbzOptions.value = dictData.value.LF
|
||||
tableList.value = modelParam.value.commonlyValuesData || []
|
||||
})
|
||||
|
||||
</script>
|
||||
defineExpose({
|
||||
commonlyValuesData: tableList
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
@ -45,7 +45,7 @@
|
||||
<el-input placeholder="英文名称" v-model="formData.yymc"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目ID" prop="xmid">
|
||||
<el-input placeholder="项目ID" v-model="formData.xmid"></el-input>
|
||||
<el-input placeholder="项目ID" disabled v-model="formData.xmid"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="uflag">
|
||||
<el-checkbox value="uflag">停用</el-checkbox>
|
||||
@ -164,13 +164,14 @@ import CalcGuilde from './child/CalcGuilde.vue';
|
||||
import SelectTable from '@/components/SelectTable/index.vue'
|
||||
import Condition from './child/Condition.vue';
|
||||
|
||||
const props = defineProps({
|
||||
dataList: {
|
||||
type: Object , //Object as PropType<XmInfoNew>
|
||||
required: false
|
||||
}
|
||||
});
|
||||
// const props = defineProps({
|
||||
// dataList: {
|
||||
// type: Object , //Object as PropType<XmInfoNew>
|
||||
// required: false
|
||||
// }
|
||||
// });
|
||||
|
||||
const modelParam = defineModel<any>()
|
||||
|
||||
const formRef = ref();
|
||||
const formData = ref<any>({});
|
||||
@ -248,10 +249,11 @@ const ygxbCheck = computed({
|
||||
})
|
||||
|
||||
watch(
|
||||
() => props.dataList,
|
||||
() => modelParam.value,
|
||||
(newVal:any) => {
|
||||
formData.value = newVal;
|
||||
}
|
||||
formData.value = {...newVal.basicData};
|
||||
},
|
||||
{ immediate: true,deep: true }
|
||||
);
|
||||
|
||||
//多行参考值
|
||||
@ -291,6 +293,10 @@ onActivated(async () => {
|
||||
})
|
||||
|
||||
|
||||
defineExpose({
|
||||
basicData: formData
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@ -20,18 +20,17 @@ import CustomTable from '@/components/elTable/index.vue'
|
||||
import { XmTextresultNew } from '@/types';
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
import { ref } from 'vue';
|
||||
import { delXmTextresultNew } from '@/api/liswork/labItem/labItemApi';
|
||||
|
||||
|
||||
const props = defineProps({
|
||||
dataList: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
formData: {
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
});
|
||||
// const props = defineProps({
|
||||
// formData: {
|
||||
// type: Object,
|
||||
// default: {}
|
||||
// }
|
||||
// });
|
||||
|
||||
const modelParam = defineModel<any>()
|
||||
|
||||
const tableRef = ref();
|
||||
const tableList = ref<Array<XmTextresultNew>>([])
|
||||
@ -53,12 +52,21 @@ const handleColumnDragEnd = (data: any) => {
|
||||
}
|
||||
|
||||
const selectRow = ref()
|
||||
const emit = defineEmits(['refreshTabData'])
|
||||
|
||||
//序号最大值
|
||||
const maxXh = computed(() => {
|
||||
return tableList.value.length > 0 ? Math.max(...tableList.value.map((item:any) => item.xh || 0)) : 0;
|
||||
});
|
||||
|
||||
watch(
|
||||
() => modelParam.value,
|
||||
(newVal:any) => {
|
||||
tableList.value = [...newVal.commonDescriptionsData];
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
|
||||
const rowClick = (row:any) => {
|
||||
selectRow.value = row
|
||||
}
|
||||
@ -66,8 +74,8 @@ const rowClick = (row:any) => {
|
||||
|
||||
const onAddClick = () => {
|
||||
const newData: XmTextresultNew = {
|
||||
xmid: props.formData.xmid,
|
||||
xmdh: props.formData.xmdh,
|
||||
xmid: modelParam.value.basicData.xmid,
|
||||
xmdh: modelParam.value.basicData.xmdh,
|
||||
xh: maxXh.value + 1
|
||||
}
|
||||
tableList.value.push(newData)
|
||||
@ -77,19 +85,16 @@ const onDelClick = async ()=> {
|
||||
if(selectRow.value){
|
||||
await ElMessageBox.confirm('是否要删除选中的数据?','警告',
|
||||
{ confirmButtonText: 'OK',cancelButtonText: 'Cancel',type: 'warning',});
|
||||
tableList.value = tableList.value.filter((item:any) => item.xh != selectRow.value.xh)
|
||||
//tableList.value = tableList.value.filter((item:any) => item.xh != selectRow.value.xh)
|
||||
await delXmTextresultNew({xmid:modelParam.value.basicData.xmid,xh:selectRow.value.xh})
|
||||
emit('refreshTabData',modelParam.value.basicData)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
watch(
|
||||
() => props.dataList,
|
||||
(newVal:any) => {
|
||||
tableList.value = newVal;
|
||||
}
|
||||
);
|
||||
|
||||
defineExpose({
|
||||
commonDescriptionsData: tableList
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@ -73,7 +73,7 @@
|
||||
<el-input v-model="row.altersx" class="full-width-input"></el-input>
|
||||
</template>
|
||||
<template #dyck="{row}">
|
||||
{{ row.ckxx + '--' + row.cksx }}
|
||||
{{ !row.ckxx && !row.cksx ? '':row.ckxx + '--' + row.cksx }}
|
||||
</template>
|
||||
</CustomTable>
|
||||
<el-row>
|
||||
@ -95,12 +95,14 @@ import {getDictData,dictData} from '@/hooks'
|
||||
import SelectTable from '@/components/SelectTable/index.vue'
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
|
||||
const props = defineProps({
|
||||
dataList: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
});
|
||||
// const props = defineProps({
|
||||
// dataList: {
|
||||
// type: Array,
|
||||
// default: []
|
||||
// }
|
||||
// });
|
||||
|
||||
const modelParam = defineModel<any>()
|
||||
|
||||
const optionsXb = [
|
||||
{value: '1' ,label: '男'},
|
||||
@ -126,14 +128,15 @@ const bblxOptions = ref<Array<{ zddh: string; zdmc: string }>>([]);
|
||||
|
||||
const tableRefUp = ref<any>();
|
||||
const tableRefDown = ref<any>();
|
||||
const dataListUp = ref(props.dataList);
|
||||
const dataListUp = ref();
|
||||
const dataListDown = ref();
|
||||
const columnsUp = ref([
|
||||
{ prop: 'xh', label: '序号', visible: false, align: 'center', width: 70 },
|
||||
{ prop: 'xmid', label: 'xmid', visible: false, align: 'center'},
|
||||
{ prop: 'xh', label: '序号', visible: false, align: 'center' },
|
||||
{ prop: 'xb', label: '性别', visible: true, align: 'center',slot: 'xb', width: 70 },
|
||||
{ prop: 'cp_nl1', label: '年龄下限', visible: true, align: 'center',slot:'cp_nl1', width: 100 },
|
||||
{ prop: 'nl1', label: '年龄下限', visible: true, align: 'center',slot:'cp_nl1', width: 100 },
|
||||
{ prop: 'cp_nldw1', label: '年龄单位', visible: true, align: 'center',slot:'cp_nldw1', width: 70 },
|
||||
{ prop: 'cp_nl2', label: '年龄上限', visible: true, align: 'center',slot: 'cp_nl2', width: 100 },
|
||||
{ prop: 'nl2', label: '年龄上限', visible: true, align: 'center',slot: 'cp_nl2', width: 100 },
|
||||
{ prop: 'cp_nldw2', label: '年龄单位', visible: true, align: 'center',slot: 'cp_nldw2', width: 100 },
|
||||
{ prop: 'bblx', label: '标本类型', visible: true, align: 'center',slot: 'bblx', width: 100 },
|
||||
{ prop: 'slzq', label: '生理周期', visible: true, align: 'center',slot: 'slzq', width: 100 },
|
||||
@ -180,9 +183,18 @@ const maxXh = computed(() => {
|
||||
return dataListUp.value.length > 0 ? Math.max(...dataListUp.value.map((item:any) => item.xh || 0)) : 0;
|
||||
});
|
||||
|
||||
watch(
|
||||
() => modelParam.value,
|
||||
(newVal:any) => {
|
||||
dataListUp.value = [...newVal.referenceValueDetailsData];
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
|
||||
const onAddClick = () => {
|
||||
const newData = {
|
||||
xmid: modelParam.value.basicData.xmid,
|
||||
yq: '0',
|
||||
xh: maxXh.value + 1
|
||||
}
|
||||
dataListUp.value.push(newData)
|
||||
@ -208,6 +220,10 @@ onActivated( async ()=>{
|
||||
optionsSLZQ.value = dictData.value.SLZQ || []
|
||||
})
|
||||
|
||||
defineExpose({
|
||||
referenceValueDetailsData: dataListUp
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@ -14,16 +14,16 @@
|
||||
<el-input v-model="row.xs" class="full-width-input"/>
|
||||
</template>
|
||||
<template #zkxm="{row}">
|
||||
<el-checkbox v-model="row.zkxm" />
|
||||
</template>
|
||||
<template #cksx="{row}">
|
||||
<el-input v-model="row.cksx" class="full-width-input"></el-input>
|
||||
<el-checkbox :checked="row.zkxm === '1'" @change="(val:any) => row.zkxm = val ? 1 : 0" />
|
||||
</template>
|
||||
<template #ckxx="{row}">
|
||||
<el-input v-model="row.ckxx" class="full-width-input"></el-input>
|
||||
</template>
|
||||
<template #cksx="{row}">
|
||||
<el-input v-model="row.cksx" class="full-width-input"></el-input>
|
||||
</template>
|
||||
<template #dyckz="{row}">
|
||||
<el-input v-model="row.dyckz" class="full-width-input"></el-input>
|
||||
<el-input :model-value="getDyckz(row)" disabled class="full-width-input"></el-input>
|
||||
</template>
|
||||
</CustomTable>
|
||||
</div>
|
||||
@ -35,32 +35,28 @@ import CustomTable from '@/components/elTable/index.vue'
|
||||
import { XmInfoVs } from '@/types';
|
||||
import YQSelectTable from '@/components/SelectTable/YQSelectTable/index.vue'
|
||||
import {ElMessageBox} from 'element-plus'
|
||||
import { deleteXmInfoVs } from '@/api/liswork/labItem/labItemApi';
|
||||
|
||||
const props = defineProps({
|
||||
// 显示数据
|
||||
dataList: {
|
||||
type: Array<XmInfoVs>,
|
||||
required: true,
|
||||
default: () => []
|
||||
},
|
||||
formData: {
|
||||
type: Object,
|
||||
required: false,
|
||||
default: {}
|
||||
}
|
||||
});
|
||||
|
||||
// const props = defineProps({
|
||||
// formData: {
|
||||
// type: Object,
|
||||
// required: false,
|
||||
// default: {}
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
const modelParam = defineModel<any>()
|
||||
//const yq = ref<string>('');
|
||||
const tableRef = ref<any>();
|
||||
const yqList = ref<Array<XmInfoVs>>([]);
|
||||
const columns = ref([
|
||||
{ prop: 'vsid', label: '对照编码', visible: false, align: 'center' },
|
||||
{ prop: 'yq', label: '仪器代号', visible: true, align: 'center', slot: 'yq', width: 150 },
|
||||
{ prop: 'xs', label: '调整系数', visible: true, align: 'center', slot: 'xs', width: 100 },
|
||||
{ prop: 'zkxm', label: '质控', visible: true, align: 'center', slot: 'zkxm', width: 40 },
|
||||
{ prop: 'cksx', label: '参考上限', visible: true, align: 'center',slot: 'cksx', width: 100 },
|
||||
{ prop: 'ckxx', label: '参考下限', visible: true, align: 'center',slot: 'ckxx', width: 100 },
|
||||
{ prop: 'cksx', label: '参考上限', visible: true, align: 'center',slot: 'cksx', width: 100 },
|
||||
{ prop: 'dyckz', label: '打印参考值', visible: true, align: 'center',slot: 'dyckz', width: 100 },
|
||||
]);
|
||||
const tableConfig = ref({
|
||||
@ -74,6 +70,15 @@ const selectRow = ref<XmInfoVs>({
|
||||
xmid: 0
|
||||
})
|
||||
|
||||
watch(
|
||||
() => modelParam.value,
|
||||
(newVal:any) => {
|
||||
yqList.value = [...newVal.userInstrData];
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
|
||||
const emit = defineEmits(['refreshTabData'])
|
||||
|
||||
//退拽属性
|
||||
const handleColumnDragEnd = (data: any) => {
|
||||
@ -93,7 +98,7 @@ const handInputChange = () => {
|
||||
const onClickAdd = () => {
|
||||
const newData: XmInfoVs = {
|
||||
yq: '',
|
||||
xmid: props.formData.xmid,
|
||||
xmid: modelParam.value.basicData.xmid,
|
||||
}
|
||||
yqList.value.push(newData)
|
||||
}
|
||||
@ -106,7 +111,8 @@ const onClickDel = async () => {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
});
|
||||
yqList.value = yqList.value.filter(item => item.yq != selectRow.value.yq);
|
||||
await deleteXmInfoVs({vsid:selectRow.value.vsid || 0})
|
||||
emit('refreshTabData',modelParam.value.basicData)
|
||||
}
|
||||
}
|
||||
|
||||
@ -114,7 +120,21 @@ const onRowClick = (row: any) => {
|
||||
selectRow.value = row
|
||||
}
|
||||
|
||||
const getDyckz = (row: XmInfoVs) => {
|
||||
if(!row.cksx && !row.ckxx){
|
||||
return '';
|
||||
}else{
|
||||
return `${row.ckxx || ''}--${row.cksx || ''}`;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
onActivated(() =>{
|
||||
yqList.value = Array.isArray(props.dataList) ? props.dataList : [];
|
||||
|
||||
})
|
||||
|
||||
defineExpose({
|
||||
userInstrData: yqList
|
||||
})
|
||||
|
||||
</script>
|
||||
@ -9,24 +9,20 @@
|
||||
<el-col :span="6">
|
||||
<el-form-item label="" prop="ybh">
|
||||
<div class="next_box">
|
||||
<div class="jtIcon" @click="handlePrev">
|
||||
<el-icon>
|
||||
<ArrowUpBold />
|
||||
</el-icon>
|
||||
</div>
|
||||
<el-input v-model="labInfo.ybh" placeholder="样本编号" @keyup.enter="handleQuery" style="width:100%" />
|
||||
<div class="jtIcon" @click="handleNext">
|
||||
<el-icon>
|
||||
<ArrowDownBold />
|
||||
</el-icon>
|
||||
</div>
|
||||
<el-button type="primary" class="jt_btn" :size="aotuSize" icon="ArrowUpBold"
|
||||
@click="handlePrev"></el-button>
|
||||
<el-input v-model="queryParams.ybh" placeholder="样本编号" @keyup.enter="handleQuery"
|
||||
style="width:100%" />
|
||||
<el-button type="primary" class="jt_btn" :size="aotuSize" icon="ArrowDownBold"
|
||||
@click="handleNext"></el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="日期:" prop="jyrq">
|
||||
<el-date-picker v-model="labInfo.jyrq" type="date" label-width="1.25rem" placeholder="检验日期"
|
||||
value-format="YYYY-MM-DD" :clearable="false" @change="" style="width:100%"></el-date-picker>
|
||||
<el-date-picker v-model="ybJyrq" type="date" label-width="1.25rem" placeholder="检验日期"
|
||||
value-format="YYYY-MM-DD" :clearable="false" @change="jyrqChange" ref="datePickerRef"
|
||||
style="width:100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@ -63,26 +59,23 @@
|
||||
<el-col :span="16">
|
||||
<el-tabs v-model="activeName" type="card" class="demo-tabs">
|
||||
<el-tab-pane label="鉴定(终报)结果" name="first">
|
||||
<ZbReport ref="labResultRef" v-model:labPat="labInfo" :labPatKey="queryParams"
|
||||
<ZbReport ref="labResultRef" v-model:labPat="labPat" :labPatKey="queryParams"
|
||||
@update:labPatKey="queryParams = $event" :dictData="dictData" :labResutsData="zbLabResuts"
|
||||
@fetchLabResults="resultsHandle" @changeStatus="changeStatus" @previewHandle="previewHandle" />
|
||||
:userList="userList" @fetchLabResults="resultsHandle" @changeStatus="changeStatus"
|
||||
@previewHandle="previewHandle" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="初级和二级报告" name="second">
|
||||
<CbReport v-model:labPat="labInfo" :labPatKey="queryParams" @update:labPatKey="queryParams = $event"
|
||||
<CbReport v-model:labPat="labPat" :labPatKey="queryParams" @update:labPatKey="queryParams = $event"
|
||||
:instrdComOpt="instrdComOpt" :dictData="dictData" @changeStatus="changeStatus" :userList="userList"
|
||||
@previewHandle="previewHandle" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="培养基接种" name="third">
|
||||
<Byj :labPat="labInfo" :labPatKey="queryParams" />
|
||||
<Pyj :labPat="labPat" :labPatKey="queryParams" :userList="userList" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="操作记录" name="fourth">
|
||||
<Record :labPat="labInfo" :labPatKey="queryParams" />
|
||||
<Record :labPat="labPat" :labPatKey="queryParams" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<!-- <LabResult ref="labResultRef" v-model:labPat="labInfo" :labPatKey="queryParams" :dictData="dictData"
|
||||
:labResutsData="labResuts" @fetchLabResults="resultsHandle" @changeStatus="changeStatus"
|
||||
@previewHandle="previewHandle" /> -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
@ -95,14 +88,16 @@
|
||||
<template v-if="activeTab == 'LabPatList'">
|
||||
<div class="flex-between">
|
||||
<div>
|
||||
<el-button type="primary" :size="aotuSize" icon="RefreshRight" @click="fetchlabPatList">刷新</el-button>
|
||||
<el-button type="danger" :size="aotuSize" @click="delSampleHd">删除</el-button>
|
||||
<el-button class="btn_green" :size="aotuSize" icon="top" @click="handlePrev">上一个</el-button>
|
||||
<el-button class="btn_green mr5" :size="aotuSize" icon="bottom" @click="handleNext">下一个</el-button>
|
||||
<el-button type="primary" :size="aotuSize" icon="RefreshRight" circle
|
||||
@click="fetchlabPatList"></el-button>
|
||||
<el-button type="danger" :size="aotuSize" icon="Delete" circle @click="delSampleHd"></el-button>
|
||||
<el-button class="btn_green" :size="aotuSize" icon="top" circle @click="handlePrev"></el-button>
|
||||
<el-button class="btn_green mr5" :size="aotuSize" icon="bottom" circle
|
||||
@click="handleNext"></el-button>
|
||||
<PatientQueryForm :initial-params="initialParams" @query="handleQueryResult" @reset="handleReset"
|
||||
width="9rem" :size="aotuSize" placeholder="查询条件" :dict-data="dictData" :clearable="true" />
|
||||
<el-input v-model="searchText" clearable :size="aotuSize" @keyup.enter="searchQuery"
|
||||
@clear="clearSearch" style="width: 6rem" />
|
||||
width="14rem" :size="aotuSize" placeholder="查询条件" :dict-data="dictData" :clearable="true" />
|
||||
<el-input v-model="searchText" clearable :size="aotuSize" @keyup.enter="searchQuery" class="ml10"
|
||||
@clear="clearSearch" style="width: 10rem" />
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox v-model="lbFlag" :size="aotuSize"> 列表翻页 </el-checkbox>
|
||||
@ -115,18 +110,19 @@
|
||||
<el-radio :value="60">近60天</el-radio>
|
||||
<el-radio :value="90">近90天</el-radio>
|
||||
<el-radio :value="7">近7天</el-radio>
|
||||
<el-radio :value="0">此日 -></el-radio>
|
||||
<el-radio :value="0">此日
|
||||
<el-icon>
|
||||
<Right />
|
||||
</el-icon>
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
<el-date-picker v-model="queryParams.jyrq" type="date" :size="aotuSize" @change="fetchlabPatList"
|
||||
style="width: 9.375rem;" />
|
||||
value-format="YYYY-MM-DD" style="width: 10rem;" />
|
||||
</div>
|
||||
<LabPatList ref="labPatListRef" :labPatList="labPatList" :loading="loading" @select="selectJob"
|
||||
:tableKey="queryParams" :dictData="dictData" @search="searchJobs" />
|
||||
:tableKey="{ ...queryParams, jyrq: ybJyrq }" :dictData="dictData" @search="searchJobs" />
|
||||
|
||||
<div class="button-group">
|
||||
<!-- <div class="text1">样本总数:<span>{{ ybs }}</span></div>
|
||||
<div class="text2">未审:<span>{{ ws }}</span></div>
|
||||
<div class="text3">危:<span>{{ wjs }}</span></div> -->
|
||||
<el-pagination v-model:current-page="queryParams.pageNum" v-model:page-size="queryParams.pageSize"
|
||||
:page-sizes="[300, 600, 1000]" :size="aotuSize" background
|
||||
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange"
|
||||
@ -134,14 +130,16 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<component :is="activeTabName" :queryParams="queryParams" :dictData="dictData" :instrOptions="instrOptions"
|
||||
@fetchResults="fetchLabResults" :tablekey="queryParams" />
|
||||
<!-- tab栏 内容 -->
|
||||
<component :is="activeTabName" :queryParams="{ ...queryParams, jyrq: ybJyrq }" :dictData="dictData"
|
||||
:instrOptions="instrOptions" @fetchResults="fetchLabResults" :tablekey="labPat" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 校验用户 -->
|
||||
<CheckUser ref="checkUserRef" @onConfirm="handleCheckUserConfirm" @onCancel="checkUserCancel" />
|
||||
<!-- 批量扫码弹窗 -->
|
||||
<BatchCode ref="batchRef" v-model:labPat="labPat" :labPatKey="queryParams" :dictData="dictData"
|
||||
:totalCount="labPatList.length" @goNext="handleNext" @goPrev="handlePrev" @goLast="handleLast"
|
||||
@ -160,26 +158,26 @@ import SelectTable from '@/components/SelectTable/index.vue';
|
||||
import tabView from '@/components/tabViews/index.vue';
|
||||
// @ts-ignore
|
||||
import iFrame from "@/components/iFrame/index.vue";
|
||||
// @ts-ignore
|
||||
import LabResult from './labresult/index.vue';
|
||||
import LabPatList from './labpatlist.vue';
|
||||
import History from '../components/history/index.vue'
|
||||
import Others from '../components/others/index.vue'
|
||||
import OthersResult from '../components/othersResult/index.vue'
|
||||
import Reexamination from '../components/reexamination/index.vue'
|
||||
import Charge from '../components/charge/index.vue'
|
||||
import Combination from '../components/combination/index.vue'
|
||||
import Clinical from '../components/clinical/index.vue'
|
||||
import Sample from '../components/sample/index.vue'
|
||||
import OtherInformation from '../components/otherInformation/index.vue'
|
||||
import ResultGraph from '../components/resultGraph/index.vue'
|
||||
import CheckUser from '../work/components/CheckUser.vue';
|
||||
// 中间部分
|
||||
import ZbReport from './labresult/zbReport.vue';
|
||||
import CbReport from './labresult/cbReport.vue';
|
||||
import Byj from './labresult/byj.vue';
|
||||
import Pyj from './labresult/pyj.vue';
|
||||
import Record from './labresult/record.vue';
|
||||
// @ts-ignore
|
||||
import { comDict } from '@/utils/dict'
|
||||
import { queryLabResults, loadDefault, queryLabPat, instrdconfig, delSample, getGroupInstrdList } from "@/api/liswork/work/LisWork";
|
||||
import { wswsamplelistpage, sampleMedInfo } from "@/api/liswork/micro/index";
|
||||
import { queryLabResults, loadDefault, queryLabPat, instrdconfig, delSample, getGroupInstrdList, checkuser, updateLabPat } from "@/api/liswork/work/LisWork";
|
||||
import { wswsamplelistpage, sampleMedInfo, changepatjyrq } from "@/api/liswork/micro/index";
|
||||
import { getComDicts, queryComDictListService } from "@/api/liswork/dict/ComDict";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import BatchCode from '../work/components/batchCode.vue';
|
||||
@ -208,7 +206,7 @@ const queryParams = ref({
|
||||
})
|
||||
|
||||
|
||||
const activeName = ref('second');
|
||||
const activeName = ref('first');
|
||||
|
||||
const total = ref(0)
|
||||
const ybs = ref(0)
|
||||
@ -219,23 +217,25 @@ const tabList = ref([
|
||||
{ label: '标本列表', value: 'LabPatList' },
|
||||
{ label: '结果图形', value: 'ResultGraph' },
|
||||
{ label: '历史对照', value: 'History' },
|
||||
{ label: '其他结果', value: 'Others' },
|
||||
{ label: '其他结果', value: 'OthersResult' },
|
||||
{ label: '结果复查', value: 'Reexamination' },
|
||||
{ label: '收费信息', value: 'Charge' },
|
||||
{ label: '组合项目', value: 'Combination' },
|
||||
{ label: '临床意义', value: 'Clinical' },
|
||||
{ label: '样本流转', value: 'Sample' },
|
||||
{ label: '其他信息', value: 'OtherInformation' },
|
||||
])
|
||||
|
||||
const activeTabMap = {
|
||||
ResultGraph,
|
||||
History,
|
||||
Others,
|
||||
OthersResult,
|
||||
Reexamination,
|
||||
Charge,
|
||||
Combination,
|
||||
Clinical,
|
||||
Sample
|
||||
Sample,
|
||||
OtherInformation
|
||||
}
|
||||
|
||||
const activeTabName = computed(() => activeTabMap[activeTab.value as keyof typeof activeTabMap] || 'LabPatList');
|
||||
@ -249,9 +249,7 @@ const searchText = ref('')
|
||||
const rules = ref([])
|
||||
const instrGroupOptions = ref<any[]>([])
|
||||
const instrOptions = ref<{ yq: string; yqmc: string }[]>([])
|
||||
|
||||
const pdfUrl = ref('')
|
||||
|
||||
// 初始查询参数(可选)
|
||||
const initialParams = {}
|
||||
|
||||
@ -265,11 +263,71 @@ interface QueryParams {
|
||||
finish?: string | number
|
||||
autojgbz?: string | number
|
||||
}
|
||||
const ybJyrq = ref('')
|
||||
|
||||
watch(() => labPat.value, (newValue) => {
|
||||
queryParams.value.ybh = newValue.ybh;
|
||||
ybJyrq.value = newValue.jyrq;
|
||||
}, { deep: true });
|
||||
|
||||
const checkUserRef = ref()
|
||||
const datePickerRef = ref()
|
||||
const jyrqChange = (val: string) => {
|
||||
datePickerRef.value?.blur();
|
||||
ElMessageBox.confirm(
|
||||
`确定修改当前样本检验日期?`,
|
||||
'提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
).then(() => {
|
||||
if (!queryParams.value.yhdh) {
|
||||
checkUserRef.value.open();
|
||||
} else {
|
||||
updateJyrq()
|
||||
}
|
||||
}).catch(() => {
|
||||
fetchLabPat();
|
||||
datePickerRef.value?.blur();
|
||||
})
|
||||
|
||||
};
|
||||
|
||||
const handleCheckUserConfirm = (info: { yhdh: string, mm: string }) => {
|
||||
checkuser({ yhdh: info.yhdh, mm: info.mm }).then((response: any) => {
|
||||
if (response.code == 0) {
|
||||
queryParams.value.yhdh = info.yhdh;
|
||||
updateJyrq()
|
||||
} else {
|
||||
fetchLabPat();
|
||||
datePickerRef.value?.blur();
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
const checkUserCancel = () => {
|
||||
fetchLabPat();
|
||||
};
|
||||
|
||||
// 更新检验日期
|
||||
const updateJyrq = () => {
|
||||
changepatjyrq({ ...queryParams.value, jyrq: ybJyrq.value }).then((response: any) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.success('检验日期修改成功');
|
||||
changeStatus(
|
||||
{
|
||||
jyrq: ybJyrq.value,
|
||||
ybh: labPat.value.ybh,
|
||||
yq: labPat.value.yq
|
||||
}, false
|
||||
)
|
||||
datePickerRef.value?.blur();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 模糊查询
|
||||
const searchQuery = () => {
|
||||
let filterMhList = [...originalLabPatList.value];
|
||||
@ -294,7 +352,6 @@ const searchQuery = () => {
|
||||
selectJob(firstRow);
|
||||
} else {
|
||||
labPat.value = {};
|
||||
labInfo.value = {};
|
||||
zbLabResuts.value = [];
|
||||
highlightRowIndex.value = -1;
|
||||
}
|
||||
@ -332,7 +389,6 @@ const handleQueryResult = (params: QueryParams) => {
|
||||
selectJob(firstRow);
|
||||
} else {
|
||||
labPat.value = {};
|
||||
labInfo.value = {};
|
||||
zbLabResuts.value = [];
|
||||
highlightRowIndex.value = -1;
|
||||
}
|
||||
@ -355,7 +411,6 @@ const mbStore = useCommonStore();
|
||||
const yqHandleChange = (val: any) => {
|
||||
zbLabResuts.value = [];
|
||||
labPat.value = {}
|
||||
labInfo.value = {}
|
||||
mbStore.setLxsrList([]);
|
||||
getSysList()
|
||||
fetchlabPatList()
|
||||
@ -413,7 +468,7 @@ const selectJob = (job: any) => {
|
||||
}
|
||||
const zbLabResuts = ref([])
|
||||
//载入样本结果表单(中间labresult.vue组件)
|
||||
const fetchLabResults = async () => {
|
||||
const fetchLabResults = () => {
|
||||
sampleMedInfo({ jyrq: labInfo.value.jyrq ? labInfo.value.jyrq : queryParams.value.jyrq, yq: labInfo.value.yq, ybh: labInfo.value.ybh }).then((response: any) => {
|
||||
zbLabResuts.value = response.data;
|
||||
})
|
||||
@ -436,20 +491,21 @@ const lastRow: any = ref({})
|
||||
// 批量扫码ybh同步样本编号
|
||||
const ybhChangeTb = (val: string) => {
|
||||
// console.log('val==>', val);
|
||||
labInfo.value.ybh = val
|
||||
labPat.value.ybh = val
|
||||
queryParams.value.ybh = val
|
||||
handleQuery();
|
||||
}
|
||||
const handleQuery = () => {
|
||||
if (!labPatList.value.length) return
|
||||
if (!labInfo.value.ybh) {
|
||||
if (!queryParams.value.ybh) {
|
||||
highlightRowIndex.value = -1;
|
||||
ElMessage.warning('请输入样本编号')
|
||||
labInfo.value.ybh = lastRow.value.ybh
|
||||
queryParams.value.ybh = lastRow.value.ybh
|
||||
return;
|
||||
}
|
||||
// queryParams.value = { ...queryParams.value };
|
||||
// 查找匹配的行
|
||||
const matchedIndex = labPatList.value.findIndex((item: any) => item.ybh == labInfo.value.ybh);
|
||||
const matchedIndex = labPatList.value.findIndex((item: any) => item.ybh == queryParams.value.ybh);
|
||||
const row = labPatList.value[matchedIndex]
|
||||
|
||||
if (matchedIndex !== -1) {
|
||||
@ -468,11 +524,10 @@ const handleQuery = () => {
|
||||
|
||||
// 创建新样本
|
||||
const handleCreate = () => {
|
||||
labInfo.value.jyrq = ''
|
||||
ybJyrq.value = ''
|
||||
loadDefault({ ...queryParams.value }).then((response: any) => {
|
||||
if (response.code == 0) {
|
||||
labPat.value = response.data;
|
||||
labInfo.value = response.data;
|
||||
labPat.value.id = `temp_${Date.now()}_${Math.random().toString(36).substr(2, 8)}`;
|
||||
zbLabResuts.value = [];
|
||||
labPatListRef.value?.clearCurrentRow();
|
||||
@ -484,15 +539,15 @@ const handleCreate = () => {
|
||||
|
||||
// 删除样本
|
||||
const delSampleHd = () => {
|
||||
if (labInfo.value.jgbz == '2') return ElMessage.warning('标本已审核,不能删除!')
|
||||
if (labPat.value.jgbz == '2') return ElMessage.warning('标本已审核,不能删除!')
|
||||
const data = {
|
||||
jyrq: labInfo.value.jyrq,
|
||||
yq: labInfo.value.yq.trim(),
|
||||
ybh: labInfo.value.ybh,
|
||||
jyrq: labPat.value.jyrq,
|
||||
yq: labPat.value.yq.trim(),
|
||||
ybh: labPat.value.ybh,
|
||||
}
|
||||
|
||||
ElMessageBox.confirm(
|
||||
`确定删除当前${labInfo.value.ybh}号标本?`,
|
||||
`确定删除当前${labPat.value.ybh}号标本?`,
|
||||
'提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
@ -504,7 +559,7 @@ const delSampleHd = () => {
|
||||
delSample(data).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
ElMessage.success('删除成功')
|
||||
labPatList.value = labPatList.value.filter((item: any) => item.ybh != labInfo.value.ybh)
|
||||
labPatList.value = labPatList.value.filter((item: any) => item.ybh != labPat.value.ybh)
|
||||
// 删除跳当前页面下一个样本
|
||||
// handleNext()
|
||||
if (highlightRowIndex.value > labPatList.value.length - 1) {
|
||||
@ -524,13 +579,15 @@ const delSampleHd = () => {
|
||||
// 上一个样本
|
||||
const handlePrev = () => {
|
||||
if (!lbFlag.value) {
|
||||
const ybh = getPreviousNumber(labInfo.value.ybh) as string;
|
||||
labInfo.value.ybh = ybh;
|
||||
const ybh = getPreviousNumber(labPat.value.ybh) as string;
|
||||
queryParams.value.ybh = ybh;
|
||||
const index = labPatList.value.findIndex((item: any) => item.ybh == ybh)
|
||||
if (index !== -1) {
|
||||
highlightRowIndex.value = index;
|
||||
const row = labPatList.value[index];
|
||||
labPatListRef.value.setCurrentRow(row);
|
||||
if (activeTab.value == 'LabPatList') {
|
||||
labPatListRef.value.setCurrentRow(row);
|
||||
}
|
||||
selectJob(row);
|
||||
} else {
|
||||
handleCreate();
|
||||
@ -539,7 +596,9 @@ const handlePrev = () => {
|
||||
if (highlightRowIndex.value > 0) {
|
||||
highlightRowIndex.value--;
|
||||
const row = labPatList.value[highlightRowIndex.value];
|
||||
labPatListRef.value.setCurrentRow(row);
|
||||
if (activeTab.value == 'LabPatList') {
|
||||
labPatListRef.value.setCurrentRow(row);
|
||||
}
|
||||
selectJob(row);
|
||||
}
|
||||
}
|
||||
@ -549,13 +608,15 @@ const handlePrev = () => {
|
||||
// 下一个样本
|
||||
const handleNext = () => {
|
||||
if (!lbFlag.value) {
|
||||
const ybh = getNextNumber(labInfo.value.ybh) as string;
|
||||
labInfo.value.ybh = ybh;
|
||||
const ybh = getNextNumber(labPat.value.ybh) as string;
|
||||
queryParams.value.ybh = ybh;
|
||||
const index = labPatList.value.findIndex((item: any) => item.ybh == ybh)
|
||||
if (index !== -1) {
|
||||
highlightRowIndex.value = index;
|
||||
const row = labPatList.value[index];
|
||||
labPatListRef.value.setCurrentRow(row);
|
||||
if (activeTab.value == 'LabPatList') {
|
||||
labPatListRef.value.setCurrentRow(row);
|
||||
}
|
||||
selectJob(row);
|
||||
} else {
|
||||
handleCreate();
|
||||
@ -564,17 +625,19 @@ const handleNext = () => {
|
||||
if (highlightRowIndex.value < labPatList.value.length - 1) {
|
||||
highlightRowIndex.value++;
|
||||
const row = labPatList.value[highlightRowIndex.value];
|
||||
labPatListRef.value.setCurrentRow(row);
|
||||
if (activeTab.value == 'LabPatList') {
|
||||
labPatListRef.value.setCurrentRow(row);
|
||||
}
|
||||
selectJob(row);
|
||||
} else {
|
||||
labInfo.value.ybh = getNextNumber(labInfo.value.ybh) as string;
|
||||
queryParams.value.ybh = labPat.value.ybh;
|
||||
handleCreate();
|
||||
}
|
||||
}
|
||||
}
|
||||
// 最后一个样本
|
||||
const handleLast = () => {
|
||||
labInfo.value.ybh = labPatList.value[labPatList.value.length - 1].ybh;
|
||||
queryParams.value.ybh = labPatList.value[labPatList.value.length - 1].ybh;
|
||||
handleNext();
|
||||
}
|
||||
const batchRef = ref()
|
||||
@ -592,7 +655,6 @@ const changeStatus = (updatedPat: any, flag: boolean) => {
|
||||
queryLabPat(data).then((response: any) => {
|
||||
if (response.code == 0) {
|
||||
labPat.value = response.data;
|
||||
labInfo.value = response.data;
|
||||
const index = labPatList.value.findIndex((item: any) => item.ybh == updatedPat.ybh);
|
||||
if (index !== -1) {
|
||||
labPatList.value = labPatList.value.map((item, i) =>
|
||||
@ -642,10 +704,6 @@ const handleCurrentChange = (page: number) => {
|
||||
|
||||
//载入样本列表(右边labpatlist.vue组件)
|
||||
const fetchlabPatList = () => {
|
||||
// if (!queryParams.value.jyrq) {
|
||||
// queryParams.value.jyrq = lastRow.value.jyrq
|
||||
// return ElMessage.warning('请选择检验日期')
|
||||
// }
|
||||
loading.value = true;
|
||||
wswsamplelistpage(queryParams.value).then((res: any) => {
|
||||
if (res.code == 200) {
|
||||
|
||||
@ -72,10 +72,8 @@ import { ref, reactive, watch, toRaw, computed, onMounted, nextTick } from 'vue'
|
||||
import { changepatcolumn, updateLabPat, checkYsUser } from "@/api/liswork/work/LisWork";
|
||||
import SelectTable from '@/components/SelectTable/index.vue';
|
||||
import YhVerification from '../work/components/yhVerification.vue';
|
||||
|
||||
import emitter from '@/utils/mitt';
|
||||
import { classCom } from '@/utils/classCom';
|
||||
import Labpat from '../work/components/labpat.vue';
|
||||
const aotuSize = classCom.useAutoSize();
|
||||
|
||||
|
||||
|
||||
@ -1,92 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="top-btns">
|
||||
<el-button type="primary" plain size="small" @click="printHandle">打印培养基条码</el-button>
|
||||
<el-checkbox v-model="checked">自动打印培养基条码</el-checkbox>
|
||||
</div>
|
||||
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :config="tableConfig" :enable-column-drag="true"
|
||||
@column-drag-end="handleColumnDragEnd" @selection-change="handleSelectionChange">
|
||||
<template #mediumname="{ column }">
|
||||
培养基 {{ tableData.length }}个
|
||||
</template>
|
||||
</CustomTable>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import CustomTable from '@/components/elTable/index.vue';
|
||||
import { getmediumList } from '@/api/liswork/micro/index';
|
||||
|
||||
const props = defineProps({
|
||||
labPat: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
//结果主键
|
||||
labPatKey: {
|
||||
type: Object,
|
||||
default: () => { }
|
||||
},
|
||||
});
|
||||
|
||||
const { labPat, labPatKey } = toRefs(props);
|
||||
|
||||
const checked = ref(false);
|
||||
const tableRef = ref();
|
||||
const tableData = ref([]);
|
||||
const columns = ref([
|
||||
{ type: "selection", width: 40, align: 'center', visible: true },
|
||||
{ label: "培养基", prop: "mediumname", align: 'center', visible: true, width: 80, headerSlot: 'mediumname' },
|
||||
{ label: "接种时间", prop: "sheetdate", align: 'center', visible: true, width: 120 },
|
||||
{ label: "接种人", prop: "sheetuser", align: 'center', visible: true, width: 60 },
|
||||
{ label: "培养基结果", prop: "mediu", align: 'center', visible: true, },
|
||||
{ label: "转种类型", prop: "comments", align: 'center', visible: true, },
|
||||
{ label: "培养周期(小时)", prop: "conidtions", align: 'center', visible: true, width: 100 },
|
||||
{ label: "观察间隔(小时)", prop: "watchinterval", align: 'center', visible: true, width: 100 },
|
||||
]);
|
||||
const tableConfig = ref({
|
||||
border: true,
|
||||
height: '74vh',
|
||||
})
|
||||
|
||||
const handleColumnDragEnd = (data: any) => {
|
||||
columns.value = data.columns;
|
||||
}
|
||||
|
||||
const handleSelectionChange = (selection: any) => {
|
||||
console.log(selection);
|
||||
}
|
||||
|
||||
const printHandle = () => {
|
||||
console.log('打印培养基条码');
|
||||
}
|
||||
|
||||
const getbyjList = () => {
|
||||
const data = {
|
||||
jyrq: labPat.value.jyrq,
|
||||
yq: labPat.value.yq,
|
||||
ybh: labPat.value.ybh,
|
||||
}
|
||||
getmediumList(data).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
tableData.value = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
watch(() => props.labPat, (newValue) => {
|
||||
if (newValue.jyrq && newValue.ybh && newValue.yq) {
|
||||
getbyjList()
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.top-btns {
|
||||
margin-bottom: .3125rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
@ -1,22 +1,18 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="title">
|
||||
<div>
|
||||
<span>初报人:</span>{{ formatUser(cbInfo?.confirmer) }} <span>报告时间:</span>{{ cbInfo?.confirmdt
|
||||
}}
|
||||
</div>
|
||||
<div><span>{{ cbInfo?.jgbz == '2' ? '已初报' : '' }}</span></div>
|
||||
</div>
|
||||
<div>
|
||||
<el-button class="btn_green btns_box" :size="autoSize" v-if="cbInfo?.jgbz != 2"
|
||||
@click="handleCheck(3)">初报审核</el-button>
|
||||
<el-button class="btns_box" :size="autoSize" v-if="cbInfo?.jgbz == 2" @click="handleCheck(-3)">取消审核</el-button>
|
||||
<el-button class="btns_box" type="primary" :size="autoSize" plain :disabled="cbInfo?.jgbz == '2'"
|
||||
:disabled="erInfo?.jgbz == 2 || labPat.jgbz == 2" @click="handleCheck(3)">初报审核</el-button>
|
||||
<el-button class="btns_box" :size="autoSize" v-if="cbInfo?.jgbz == 2"
|
||||
:disabled="erInfo?.jgbz == 2 || labPat.jgbz == 2" @click="handleCheck(-3)">取消审核</el-button>
|
||||
<el-button class="btns_box" type="primary" :size="autoSize" plain
|
||||
:disabled="cbInfo?.jgbz == '2' || erInfo?.jgbz == 2 || labPat.jgbz == 2"
|
||||
@click="openItemDictDialog(1)">新增</el-button>
|
||||
<el-button class="btns_box" type="danger" :size="autoSize" :disabled="cbInfo?.jgbz == '2'" plain
|
||||
<el-button class="btns_box" type="danger" :size="autoSize"
|
||||
:disabled="cbInfo?.jgbz == '2' || erInfo?.jgbz == 2 || labPat.jgbz == 2" plain
|
||||
@click="handleBatchDelete(1)">删除</el-button>
|
||||
<el-button class="btn_green btns_box" :size="autoSize" :disabled="cbInfo?.jgbz == '2'"
|
||||
@click="zhHandel(1)">组合项目</el-button>
|
||||
<el-button class="btn_green btns_box" :size="autoSize"
|
||||
:disabled="cbInfo?.jgbz == '2' || erInfo?.jgbz == 2 || labPat.jgbz == 2" @click="zhHandel(1)">组合项目</el-button>
|
||||
<el-button type="primary" plain class=" btns_box" @click="printHandle(1)">打印</el-button>
|
||||
<el-button type="primary" plain class=" btns_box" @click="previewHandle(2)">预览</el-button>
|
||||
</div>
|
||||
@ -60,24 +56,24 @@
|
||||
{{ formatDict(row.germclass, 'germclass') }}
|
||||
</template>
|
||||
</CustomTable>
|
||||
|
||||
|
||||
<div class="title ertext">
|
||||
<div>
|
||||
<span>二报人:</span>{{ formatUser(erInfo?.confirmer) }} <span>报告时间:</span>{{ erInfo?.confirmdt
|
||||
}}
|
||||
<span>初报人:<span class="name">{{ formatUser(cbInfo?.confirmer) }}</span></span>
|
||||
<span>报告时间:<span class="time"> {{ cbInfo?.confirmdt }} </span></span>
|
||||
</div>
|
||||
<div><span>{{ erInfo?.jgbz == '2' ? '已二报' : '' }}</span></div>
|
||||
<div><span>{{ cbInfo?.jgbz == '2' ? '已初报' : '' }}</span></div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<el-button class="btn_green btns_box" :size="autoSize" v-if="erInfo?.jgbz != 2"
|
||||
<el-button class="btn_green btns_box" :size="autoSize" v-if="erInfo?.jgbz != 2" :disabled="labPat.jgbz == 2"
|
||||
@click="handleCheck(4)">二报审核</el-button>
|
||||
<el-button class="btns_box" :size="autoSize" v-if="erInfo?.jgbz == 2" @click="handleCheck(-4)">取消审核</el-button>
|
||||
<el-button class="btns_box" type="primary" :size="autoSize" plain :disabled="erInfo?.jgbz == '2'"
|
||||
@click="openItemDictDialog(2)">新增</el-button>
|
||||
<el-button class="btns_box" type="danger" :size="autoSize" :disabled="erInfo?.jgbz == '2'" plain
|
||||
@click="handleBatchDelete(2)">删除</el-button>
|
||||
<el-button class="btn_green btns_box" :size="autoSize" :disabled="erInfo?.jgbz == '2'"
|
||||
<el-button class="btns_box" :size="autoSize" v-if="erInfo?.jgbz == 2" :disabled="labPat.jgbz == 2"
|
||||
@click="handleCheck(-4)">取消审核</el-button>
|
||||
<el-button class="btns_box" type="primary" :size="autoSize" plain
|
||||
:disabled="erInfo?.jgbz == '2' || labPat.jgbz == 2" @click="openItemDictDialog(2)">新增</el-button>
|
||||
<el-button class="btns_box" type="danger" :size="autoSize" :disabled="erInfo?.jgbz == '2' || labPat.jgbz == 2"
|
||||
plain @click="handleBatchDelete(2)">删除</el-button>
|
||||
<el-button class="btn_green btns_box" :size="autoSize" :disabled="erInfo?.jgbz == '2' || labPat.jgbz == 2"
|
||||
@click="zhHandel(2)">组合项目</el-button>
|
||||
<el-button type="primary" plain class=" btns_box" @click="printHandle(2)">打印</el-button>
|
||||
<el-button type="primary" plain class=" btns_box" @click="previewHandle(2)">预览</el-button>
|
||||
@ -122,7 +118,13 @@
|
||||
{{ formatDict(row.germclass, 'germclass') }}
|
||||
</template>
|
||||
</CustomTable>
|
||||
|
||||
<div class="title">
|
||||
<div>
|
||||
<span>二报人:<span class="name">{{ formatUser(erInfo?.confirmer) }}</span></span>
|
||||
<span>报告时间:<span class="time">{{ erInfo?.confirmdt }}</span> </span>
|
||||
</div>
|
||||
<div><span>{{ erInfo?.jgbz == '2' ? '已二报' : '' }}</span></div>
|
||||
</div>
|
||||
|
||||
<!-- 新增明细 -->
|
||||
<ProjectDetails ref="itemDictRef" :dialog-title="'选择检验项目'" :tableKey="labPatKey" @select="handleItemSelect" />
|
||||
@ -341,7 +343,7 @@ const CellStyleHd = ({ row, column, rowIndex, columnIndex }: {
|
||||
};
|
||||
|
||||
const tableConfig = ref({
|
||||
height: '32vh',
|
||||
height: '33vh',
|
||||
border: true,
|
||||
highlightCurrentRow: true,
|
||||
cellStyle: CellStyleHd
|
||||
@ -618,7 +620,15 @@ const formatDict = (v: string, dictType: string) => {
|
||||
}
|
||||
|
||||
const formatJgbz = (v: string) => {
|
||||
return v == 'H' ? '高' : v == 'L' ? '低' : v == 'N' ? '阴性' : v == 'P' ? '阳性' : v == 'Q' ? '弱阳性' : v == 'M' ? '正常' : ''
|
||||
const jgbzMap = {
|
||||
'H': '高',
|
||||
'L': '低',
|
||||
'N': '阴性',
|
||||
'P': '阳性',
|
||||
'Q': '弱阳性',
|
||||
'M': '正常'
|
||||
};
|
||||
return jgbzMap[v as keyof typeof jgbzMap] ?? '';
|
||||
}
|
||||
const formatUser = (yhdh: string) => {
|
||||
return userList.value.find((item: any) => item.userName == yhdh)?.nickName || yhdh
|
||||
@ -627,22 +637,29 @@ const formatUser = (yhdh: string) => {
|
||||
|
||||
<style scoped lang="scss">
|
||||
.title {
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 3px 0;
|
||||
// padding: 3px 0;
|
||||
font-family: SourceHanSansCN, SourceHanSansCN;
|
||||
|
||||
span {
|
||||
color: #057c34;
|
||||
display: inline-block;
|
||||
color: #1f6dd3;
|
||||
}
|
||||
|
||||
.name {
|
||||
width: 6.25rem;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.time {
|
||||
width: 15rem;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
|
||||
.ertext {
|
||||
margin-top: 10px;
|
||||
|
||||
span {
|
||||
color: #e2e20c;
|
||||
}
|
||||
border-bottom: 1px solid #dcdfe6;
|
||||
margin-bottom: .3125rem;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,89 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog title="编辑项目文字描述" v-model="visible" width="40vw" :close-on-click-modal="false" :draggable="true">
|
||||
<div class="bination_box">
|
||||
<div class="text_area mb5">
|
||||
<div class="title">
|
||||
<div>
|
||||
<el-button type="primary" @click="subHandle">确定</el-button>
|
||||
<el-button @click="close">取消</el-button>
|
||||
</div>
|
||||
|
||||
<div class="tips"> 说明:单击为追加,双击为替换。</div>
|
||||
</div>
|
||||
<el-input v-model="text" type="textarea" placeholder="请输入内容" :rows="8"></el-input>
|
||||
</div>
|
||||
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :config="tableConfig" @row-click="rowClick"
|
||||
@row-dblclick="handleRowDblclick">
|
||||
</CustomTable>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import CustomTable from "@/components/elTable/index.vue"
|
||||
import { getgermtextdict } from "@/api/liswork/micro"
|
||||
|
||||
const visible = ref(false)
|
||||
const text = ref('')
|
||||
|
||||
const tableData = ref([])
|
||||
|
||||
const columns = ref([
|
||||
{ prop: 'reserve', label: '模板名称', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'textresult', label: '文字描述', visible: true, showOverflowTooltip: false }
|
||||
])
|
||||
|
||||
const tableConfig = ref({
|
||||
border: true,
|
||||
height: '500px',
|
||||
highlightCurrentRow: true,
|
||||
})
|
||||
|
||||
const emits = defineEmits(['update:text'])
|
||||
|
||||
const rowClick = (row: any) => {
|
||||
text.value += row.textresult
|
||||
}
|
||||
const handleRowDblclick = (row: any) => {
|
||||
text.value = row.textresult
|
||||
}
|
||||
|
||||
const open = () => {
|
||||
text.value = ''
|
||||
getgermtextdict().then((res: any) => {
|
||||
tableData.value = res.data
|
||||
})
|
||||
visible.value = true
|
||||
}
|
||||
|
||||
const subHandle = () => {
|
||||
emits('update:text', text.value)
|
||||
visible.value = false
|
||||
}
|
||||
const close = () => {
|
||||
text.value = ''
|
||||
visible.value = false
|
||||
}
|
||||
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.text_area {
|
||||
.title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 5px;
|
||||
|
||||
.tips {
|
||||
color: #0d86e9;
|
||||
font-size: 14px;
|
||||
font-family: SourceHanSansCN, SourceHanSansCN;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
161
src/views/liswork/micro/labresult/components/pyjDict.vue
Normal file
161
src/views/liswork/micro/labresult/components/pyjDict.vue
Normal file
@ -0,0 +1,161 @@
|
||||
<template>
|
||||
<div class="dict-input-wrapper">
|
||||
<!-- 字典选择弹窗 -->
|
||||
<el-dialog v-model="dialogVisible" :title="dialogTitle" width="30vw" :close-on-click-modal="false" :draggable="true"
|
||||
@close="handleDialogClose">
|
||||
<el-input ref="inputRef" v-model="searchKey" placeholder="搜索(支持名称、编码、简拼)..." class="mb10" clearable
|
||||
@clear="filterDictData" @input="filterDictData" />
|
||||
|
||||
<el-table :data="filteredDictData" height="300px" border @row-dblclick="selectItem" highlight-current-row>
|
||||
<el-table-column prop="value" label="培养基代号" align="center" width="150" />
|
||||
<el-table-column prop="label" label="培养基名称" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="pinyin" label="简拼" align="center" width="150" /> <!-- 显示简拼便于调试 -->
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, watch, onMounted } from 'vue';
|
||||
import { getbactmediumList } from '@/api/liswork/micro/index';
|
||||
// @ts-ignore
|
||||
import { getFirstLetter } from '@/utils/pinyin.js'; // 引入拼音处理工具
|
||||
// 组件参数
|
||||
const props = defineProps({
|
||||
modelValue: { type: [String, Number], default: '' },
|
||||
dictType: { type: String },
|
||||
placeholder: { type: String, default: '请输入或双击选择' },
|
||||
clearable: { type: Boolean, default: true },
|
||||
disabled: { type: Boolean, default: false },
|
||||
dialogTitle: { type: String, default: '选择字典项' },
|
||||
tableKey: { type: Object, default: () => { } },
|
||||
});
|
||||
|
||||
// 组件事件
|
||||
const emit = defineEmits(['select']);
|
||||
|
||||
|
||||
const dictData = ref([]); // 存储带简拼的字典数据
|
||||
const filteredDictData = ref([]);
|
||||
const isDictLoading = ref(false);
|
||||
const dialogVisible = ref(false);
|
||||
const searchKey = ref('');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 加载字典数据(并添加简拼字段)
|
||||
const loadDictData = async () => {
|
||||
try {
|
||||
isDictLoading.value = true;
|
||||
|
||||
const response = await getbactmediumList();
|
||||
|
||||
const rawData = response.data.map((item: any, index: number) => {
|
||||
return {
|
||||
value: item.mediumno || `未知编码_${index}`, // 确保value存在
|
||||
label: item.mediumname || `未知名称_${index}`, // 确保label存在
|
||||
};
|
||||
});
|
||||
// 为每个字典项添加简拼字段
|
||||
dictData.value = (rawData || []).map((item: any) => ({
|
||||
...item,
|
||||
pinyin: getFirstLetter(item.label) // 新增pinyin字段存储简拼
|
||||
}));
|
||||
|
||||
filteredDictData.value = [...dictData.value];
|
||||
} catch (error) {
|
||||
console.error(`加载${props.dictType}字典失败:`, error);
|
||||
dictData.value = [];
|
||||
filteredDictData.value = [];
|
||||
} finally {
|
||||
isDictLoading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
// 核心搜索逻辑(支持模糊搜索+简拼搜索)
|
||||
const filterDictData = () => {
|
||||
const key = searchKey.value.trim().toLowerCase();
|
||||
if (!key) {
|
||||
filteredDictData.value = [...dictData.value];
|
||||
return;
|
||||
}
|
||||
|
||||
filteredDictData.value = dictData.value.filter((item: any) => {
|
||||
// 1. 模糊搜索:匹配label(名称)或value(编码)
|
||||
const matchLabel = item.label.toLowerCase().includes(key);
|
||||
const matchValue = String(item.value).toLowerCase().includes(key);
|
||||
|
||||
// 2. 简拼搜索:匹配首字母简拼
|
||||
const matchPinyin = item.pinyin.toLowerCase().includes(key);
|
||||
|
||||
// 满足任一条件即匹配
|
||||
return matchLabel || matchValue || matchPinyin;
|
||||
});
|
||||
};
|
||||
|
||||
const inputRef = ref()
|
||||
// 关键修改:打开弹窗时重新加载数据
|
||||
const openDictSelector = async () => {
|
||||
if (props.disabled || isDictLoading.value) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 打开弹窗前先加载数据(确保每次打开都是最新的)
|
||||
await loadDictData();
|
||||
|
||||
// 数据加载完成后再显示弹窗
|
||||
dialogVisible.value = true;
|
||||
searchKey.value = '';
|
||||
nextTick(() => {
|
||||
setTimeout(() => {
|
||||
inputRef.value.focus();
|
||||
}, 100);
|
||||
});
|
||||
filterDictData();
|
||||
};
|
||||
|
||||
|
||||
// 选择字典项
|
||||
const selectItem = (item: any) => {
|
||||
emit('select', item);
|
||||
dialogVisible.value = false;
|
||||
};
|
||||
|
||||
|
||||
const handleDialogClose = () => {
|
||||
dialogVisible.value = false;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
openDictSelector, // 暴露打开弹窗的方法
|
||||
// 可选:暴露其他可能需要的方法(如刷新字典数据)
|
||||
loadDictData,
|
||||
handleDialogClose
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 样式保持不变 */
|
||||
.dict-input-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.select-icon {
|
||||
cursor: pointer;
|
||||
color: #666;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.select-icon:hover {
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
:deep(.el-input__suffix) {
|
||||
gap: 4px;
|
||||
}
|
||||
</style>
|
||||
208
src/views/liswork/micro/labresult/pyj.vue
Normal file
208
src/views/liswork/micro/labresult/pyj.vue
Normal file
@ -0,0 +1,208 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="top-btns">
|
||||
<el-button type="primary" plain :size="autoSize" @click="addItem">新增</el-button>
|
||||
<el-button type="danger" plain :size="autoSize" @click="deleteItem">删除</el-button>
|
||||
<el-button type="primary" plain :size="autoSize" @click="printHandle">打印培养基条码</el-button>
|
||||
<el-checkbox v-model="checked" :size="autoSize" class="ml5">自动打印培养基条码</el-checkbox>
|
||||
</div>
|
||||
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :config="tableConfig" :enable-column-drag="true"
|
||||
@column-drag-end="handleColumnDragEnd" @selection-change="handleSelectionChange">
|
||||
<template #mediumnameHeadTitle="{ column }">
|
||||
培养基 {{ tableData?.length }}个
|
||||
</template>
|
||||
<template #mediumname="{ row }">
|
||||
<el-input v-model="row.mediumname" size="small" class="full-width-input" @change="handleCsjgEnter(row)"
|
||||
@dblclick="handleInputFocus(row)" />
|
||||
</template>
|
||||
<template #sheetdate="{ row }">
|
||||
<el-date-picker v-model="row.sheetdate" type="datetime" format="YYYY-MM-DD HH:mm:ss"
|
||||
class="full-width-input no-prefix-icon" value-format="YYYY-MM-DD HH:mm:ss" @change="handleCsjgEnter(row)" />
|
||||
|
||||
</template>
|
||||
<template #sheetuser="{ row }">
|
||||
<SelectTable v-model:data="row.sheetuser" :fields="ysFields" :tableData="userList" label="nickName"
|
||||
class="full-width-input" value="userName" objKey="userName" :border="true" size="small"
|
||||
@getDataValue="handleCsjgEnter(row)" placeholder="" :clearable="false" />
|
||||
</template>
|
||||
<template #mediu="{ row }">
|
||||
<el-input v-model="row.mediu" size="small" class="full-width-input" @change="handleCsjgEnter(row)" />
|
||||
</template>
|
||||
<template #comments="{ row }">
|
||||
<el-input v-model="row.comments" size="small" class="full-width-input" @change="handleCsjgEnter(row)" />
|
||||
</template>
|
||||
<template #conidtions="{ row }">
|
||||
<el-input v-model="row.conidtions" size="small" class="full-width-input" @change="handleCsjgEnter(row)" />
|
||||
</template>
|
||||
<template #watchinterval="{ row }">
|
||||
<el-input v-model="row.watchinterval" size="small" class="full-width-input" @change="handleCsjgEnter(row)" />
|
||||
</template>
|
||||
</CustomTable>
|
||||
<PyjDict ref="pyjRef" :dialogTitle="'培养基选择'" @select="selectItem" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import CustomTable from '@/components/elTable/index.vue';
|
||||
import { getmediumList, insertmedium, updatemedium, deletemedium, deletemediums } from '@/api/liswork/micro/index';
|
||||
import { classCom } from '@/utils/classCom';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
import PyjDict from './components/pyjDict.vue';
|
||||
import SelectTable from '@/components/SelectTable/index.vue';
|
||||
// @ts-ignore
|
||||
import useUserStore from '@/store/modules/user'
|
||||
const autoSize = classCom.useAutoSize()
|
||||
const userStore = useUserStore()
|
||||
const props = defineProps({
|
||||
labPat: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
//结果主键
|
||||
labPatKey: {
|
||||
type: Object,
|
||||
default: () => { }
|
||||
},
|
||||
userList: {
|
||||
type: Array as PropType<object[]>,
|
||||
default: () => []
|
||||
}
|
||||
});
|
||||
|
||||
const { labPat, labPatKey } = toRefs(props);
|
||||
|
||||
const checked = ref(false);
|
||||
const tableRef = ref();
|
||||
const tableData: any = ref([]);
|
||||
const columns = ref([
|
||||
{ type: "selection", width: 40, align: 'center', visible: true },
|
||||
{ label: "培养基", prop: "mediumname", align: 'center', visible: true, width: 80, headerSlot: 'mediumnameHeadTitle', slot: 'mediumname' },
|
||||
{ label: "接种时间", prop: "sheetdate", align: 'center', visible: true, width: 150, slot: 'sheetdate', showOverflowTooltip: false },
|
||||
{ label: "接种人", prop: "sheetuser", align: 'center', visible: true, width: 80, slot: 'sheetuser' },
|
||||
{ label: "培养基结果", prop: "mediu", align: 'center', visible: true, slot: 'mediu' },
|
||||
{ label: "转种类型", prop: "comments", align: 'center', visible: true, slot: 'comments' },
|
||||
{ label: "培养周期(小时)", prop: "conidtions", align: 'center', visible: true, width: 100, slot: 'conidtions' },
|
||||
{ label: "观察间隔(小时)", prop: "watchinterval", align: 'center', visible: true, width: 100, slot: 'watchinterval' },
|
||||
]);
|
||||
const tableConfig = ref({
|
||||
border: true,
|
||||
height: '74vh',
|
||||
// highlightCurrentRow: true,
|
||||
})
|
||||
const pyjRef = ref();
|
||||
const handleColumnDragEnd = (data: any) => {
|
||||
columns.value = data.columns;
|
||||
}
|
||||
|
||||
const updateItem: any = ref(null);
|
||||
|
||||
const handleCsjgEnter = (row: any) => {
|
||||
updatemedium(row)
|
||||
}
|
||||
const handleInputFocus = (row: any) => {
|
||||
updateItem.value = row;
|
||||
pyjRef.value.openDictSelector();
|
||||
}
|
||||
const selectItem = (item: any) => {
|
||||
if (updateItem.value) {
|
||||
tableData.value.forEach((v: any) => {
|
||||
if (updateItem.value.gsid == v.gsid) {
|
||||
v.mediumno = item.value;
|
||||
v.mediumname = item.label;
|
||||
updatemedium(v).then((res: any) => {
|
||||
updateItem.value = null
|
||||
pyjRef.value.handleDialogClose();
|
||||
})
|
||||
}
|
||||
});
|
||||
} else {
|
||||
const data = {
|
||||
mediumno: item.value,
|
||||
mediumname: item.label,
|
||||
jyrq: labPat.value.jyrq,
|
||||
yq: labPat.value.yq,
|
||||
ybh: labPat.value.ybh,
|
||||
sheetdate: labPat.value.sqsj,
|
||||
sheetuser: userStore.name,
|
||||
}
|
||||
insertmedium(data).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
tableData.value.push(data)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const ysFields = ref([
|
||||
{ prop: 'userName', label: '用户代号', width: 80, enablePinyinSearch: true },
|
||||
{ prop: 'nickName', label: '用户姓名', width: 150, enablePinyinSearch: true },
|
||||
])
|
||||
|
||||
const selectedRows: any = ref([]);
|
||||
const handleSelectionChange = (selection: any) => {
|
||||
selectedRows.value = selection;
|
||||
}
|
||||
|
||||
const addItem = () => {
|
||||
pyjRef.value.openDictSelector();
|
||||
}
|
||||
|
||||
const deleteItem = () => {
|
||||
if (selectedRows.value.length === 0) return ElMessage.warning('请选择要删除的培养基!');
|
||||
ElMessageBox.confirm(
|
||||
`确定删除当前${selectedRows.value.length}个培养基?`,
|
||||
'提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
).then(() => {
|
||||
const arr = selectedRows.value.map((item: any) => item.gsid);
|
||||
deletemediums(arr).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
ElMessage.success('删除成功');
|
||||
getbyjList();
|
||||
selectedRows.value = []
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
const printHandle = () => {
|
||||
console.log('打印培养基条码');
|
||||
}
|
||||
|
||||
const getbyjList = () => {
|
||||
const data = {
|
||||
jyrq: labPat.value.jyrq,
|
||||
yq: labPat.value.yq,
|
||||
ybh: labPat.value.ybh,
|
||||
}
|
||||
getmediumList(data).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
tableData.value = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
watch(() => props.labPat, (newValue) => {
|
||||
if (newValue.jyrq && newValue.ybh && newValue.yq) {
|
||||
getbyjList()
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.top-btns {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: .3125rem;
|
||||
}
|
||||
|
||||
:deep(.el-input__prefix) {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
@ -4,52 +4,55 @@
|
||||
<el-button class="btn_green btns_box" :size="autoSize" v-if="labPat.jgbz != 2"
|
||||
@click="handleCheck(2)">审核</el-button>
|
||||
<el-button class="btns_box" :size="autoSize" v-if="labPat.jgbz == 2" @click="handleCheck(3)">取消审核</el-button>
|
||||
<el-button class="btns_box" type="primary" :size="autoSize" plain
|
||||
:disabled="labPat.jgbz != null && labPat.jgbz != 0" @click="openItemDictDialog">新增</el-button>
|
||||
<el-button class="btns_box" type="danger" :size="autoSize" :disabled="labPat.jgbz != null && labPat.jgbz != 0"
|
||||
plain @click="handleBatchDelete">删除</el-button>
|
||||
<el-button class="btn_green btns_box" :size="autoSize" @click="zhHandel">组合项目</el-button>
|
||||
<el-button class="btns_box" type="primary" :size="autoSize" plain :disabled="labPat.jgbz == 2"
|
||||
@click="openItemDictDialog">新增</el-button>
|
||||
<el-button class="btns_box" type="danger" :size="autoSize" :disabled="labPat.jgbz == 2" plain
|
||||
@click="handleBatchDelete">删除</el-button>
|
||||
<el-button class="btn_green btns_box" :size="autoSize" :disabled="labPat.jgbz == 2"
|
||||
@click="zhHandel">组合项目</el-button>
|
||||
</div>
|
||||
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :config="tableConfig" :enable-column-drag="true"
|
||||
@column-drag-end="handleColumnDragEnd" @row-click="rowHandle">
|
||||
<template #xmdh="{ column }">
|
||||
细菌/结果({{ tableData.length }})项
|
||||
</template>
|
||||
<template #od="{ row }">
|
||||
<el-input v-model="row.od" v-if="labPat.jgbz == 0 || labPat.jgbz == null" size="small"
|
||||
class="full-width-input foucs-input" @change="handleCsjgEnter(row)" />
|
||||
<span v-else>{{ row.od }}</span>
|
||||
</template>
|
||||
<template #csjg="{ row }">
|
||||
<el-input v-model="row.csjg" v-if="labPat.jgbz == 0 || labPat.jgbz == null" size="small"
|
||||
class="full-width-input" @change="handleCsjgEnter(row)" @dblclick="handleInputFocus(row)" />
|
||||
<span v-else>{{ row.csjg }}</span>
|
||||
</template>
|
||||
<template #jgbz="{ row }">
|
||||
<el-select v-model="row.jgbz" class="full-width-input" v-if="labPat.jgbz == 0 || labPat.jgbz == null"
|
||||
placeholder="" @change="handleCsjgEnter(row)">
|
||||
<el-option label="阳性" value="P" />
|
||||
<el-option label="阴性" value="N" />
|
||||
</el-select>
|
||||
<span v-else> {{ formatJgbz(row.jgbz) }}</span>
|
||||
</template>
|
||||
<template #cutoff="{ row }">
|
||||
<el-input v-model="row.cutoff" v-if="labPat.jgbz == 0 || labPat.jgbz == null" size="small"
|
||||
class="full-width-input" @change="handleCsjgEnter(row)" />
|
||||
<span v-else>{{ row.cutoff }}</span>
|
||||
</template>
|
||||
<template #alarm_flag="{ row }">
|
||||
<el-select v-model="row.alarm_flag" class="full-width-input" v-if="labPat.jgbz == 0 || labPat.jgbz == null"
|
||||
placeholder="" @change="handleCsjgEnter(row)">
|
||||
<el-option label="危急值" value="H" />
|
||||
<el-option label="无" value="" />
|
||||
</el-select>
|
||||
<span v-else> {{ row.alarm_flag == 'H' ? '危急值' : '' }}</span>
|
||||
</template>
|
||||
<template #germclass="{ row }">
|
||||
{{ formatDict(row.germclass, 'germclass') }}
|
||||
</template>
|
||||
</CustomTable>
|
||||
<ContextMenu :items="contextMenuItems" @select="handleMenuSelect">
|
||||
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :config="tableConfig" :enable-column-drag="true"
|
||||
@column-drag-end="handleColumnDragEnd" @row-click="rowHandle">
|
||||
<template #xmdh="{ column }">
|
||||
细菌/结果({{ tableData.length }})项
|
||||
</template>
|
||||
<template #od="{ row }">
|
||||
<el-input v-model="row.od" v-if="labPat.jgbz != 2" size="small" class="full-width-input foucs-input"
|
||||
@change="handleCsjgEnter(row)" />
|
||||
<span v-else>{{ row.od }}</span>
|
||||
</template>
|
||||
<template #csjg="{ row }">
|
||||
<el-input v-model="row.csjg" v-if="labPat.jgbz != 2" size="small" class="full-width-input"
|
||||
@change="handleCsjgEnter(row)" @dblclick="handleInputFocus(row)" />
|
||||
<span v-else>{{ row.csjg }}</span>
|
||||
</template>
|
||||
<template #jgbz="{ row }">
|
||||
<el-select v-model="row.jgbz" class="full-width-input" v-if="labPat.jgbz != 2" placeholder=""
|
||||
@change="handleCsjgEnter(row)">
|
||||
<el-option label="阳性" value="P" />
|
||||
<el-option label="阴性" value="N" />
|
||||
</el-select>
|
||||
<span v-else> {{ formatJgbz(row.jgbz) }}</span>
|
||||
</template>
|
||||
<template #cutoff="{ row }">
|
||||
<el-input v-model="row.cutoff" v-if="labPat.jgbz != 2" size="small" class="full-width-input"
|
||||
@change="handleCsjgEnter(row)" />
|
||||
<span v-else>{{ row.cutoff }}</span>
|
||||
</template>
|
||||
<template #alarm_flag="{ row }">
|
||||
<el-select v-model="row.alarm_flag" class="full-width-input" v-if="labPat.jgbz != 2" placeholder=""
|
||||
@change="handleCsjgEnter(row)">
|
||||
<el-option label="危急值" value="H" />
|
||||
<el-option label="无" value="" />
|
||||
</el-select>
|
||||
<span v-else> {{ row.alarm_flag == 'H' ? '危急值' : '' }}</span>
|
||||
</template>
|
||||
<template #germclass="{ row }">
|
||||
{{ formatDict(row.germclass, 'germclass') }}
|
||||
</template>
|
||||
</CustomTable>
|
||||
</ContextMenu>
|
||||
<div class="tabs_btns">
|
||||
<el-tabs v-model="activeName2" type="card" class="demo-tabs" :size="autoSize">
|
||||
<el-tab-pane label="药敏结果" name="first">
|
||||
@ -59,23 +62,23 @@
|
||||
抗生素({{ ymTableData.length }})项
|
||||
</template>
|
||||
<template #mic="{ row }">
|
||||
<el-input v-model="row.mic" v-if="labPat.jgbz == 0 || labPat.jgbz == null" size="small"
|
||||
class="ymFoucs full-width-input" @change="ymHandleEnter(row)" />
|
||||
<el-input v-model="row.mic" v-if="labPat.jgbz != 2" size="small" class="ymFoucs full-width-input"
|
||||
@change="ymHandleEnter(row)" />
|
||||
<span v-else>{{ row.mic }}</span>
|
||||
</template>
|
||||
<template #rad="{ row }">
|
||||
<el-input v-model="row.rad" v-if="labPat.jgbz == 0 || labPat.jgbz == null" size="small"
|
||||
class="full-width-input" @change="ymHandleEnter(row)" />
|
||||
<el-input v-model="row.rad" v-if="labPat.jgbz != 2" size="small" class="full-width-input"
|
||||
@change="ymHandleEnter(row)" />
|
||||
<span v-else>{{ row.rad }}</span>
|
||||
</template>
|
||||
<template #csjg="{ row }">
|
||||
<el-input v-model="row.csjg" v-if="labPat.jgbz == 0 || labPat.jgbz == null" size="small"
|
||||
class="full-width-input" @change="ymHandleEnter(row)" />
|
||||
<el-input v-model="row.csjg" v-if="labPat.jgbz != 2" size="small" class="full-width-input"
|
||||
@change="ymHandleEnter(row)" />
|
||||
<span v-else>{{ row.csjg }}</span>
|
||||
</template>
|
||||
|
||||
<template #jgbz="{ row }">
|
||||
<el-radio-group v-model="row.jgbz" :disabled="labPat.jgbz == 0 || labPat.jgbz == null ? false : true"
|
||||
<el-radio-group v-model="row.jgbz" :disabled="labPat.jgbz != 2 ? false : true"
|
||||
@change="(val: string) => { jgbzHandle(val, row) }">
|
||||
<el-radio value="R">R</el-radio>
|
||||
<el-radio value="I">I</el-radio>
|
||||
@ -86,20 +89,20 @@
|
||||
</template>
|
||||
|
||||
<template #bz="{ row }">
|
||||
<el-input v-model="row.bz" v-if="labPat.jgbz == 0 || labPat.jgbz == null" size="small"
|
||||
class="full-width-input" @change="ymHandleEnter(row)" />
|
||||
<el-input v-model="row.bz" v-if="labPat.jgbz != 2" size="small" class="full-width-input"
|
||||
@change="ymHandleEnter(row)" />
|
||||
<span v-else>{{ row.bz }}</span>
|
||||
</template>
|
||||
|
||||
<template #txtresult="{ row }">
|
||||
<el-input v-model="row.txtresult" v-if="labPat.jgbz == 0 || labPat.jgbz == null" size="small"
|
||||
class="full-width-input" @change="ymHandleEnter(row)" />
|
||||
<el-input v-model="row.txtresult" v-if="labPat.jgbz != 2" size="small" class="full-width-input"
|
||||
@change="ymHandleEnter(row)" />
|
||||
<span v-else>{{ row.txtresult }}</span>
|
||||
</template>
|
||||
|
||||
<template #cp_bz="{ row }">
|
||||
<el-input v-model="row.cp_bz" v-if="labPat.jgbz == 0 || labPat.jgbz == null" size="small"
|
||||
class="full-width-input" @change="ymHandleEnter(row)" />
|
||||
<el-input v-model="row.cp_bz" v-if="labPat.jgbz != 2" size="small" class="full-width-input"
|
||||
@change="ymHandleEnter(row)" />
|
||||
<span v-else>{{ row.cp_bz }}</span>
|
||||
</template>
|
||||
</CustomTable>
|
||||
@ -111,22 +114,31 @@
|
||||
</el-tabs>
|
||||
<div class="btns anchor">
|
||||
<template v-if="activeName2 == 'first'">
|
||||
<el-button class="btns_box" type="primary" :size="autoSize" plain
|
||||
:disabled="labPat.jgbz != null && labPat.jgbz != 0" @click="addMed">新增</el-button>
|
||||
<el-button class="btns_box" type="danger" :size="autoSize" :disabled="labPat.jgbz != null && labPat.jgbz != 0"
|
||||
plain @click="delMed">删除</el-button>
|
||||
<el-button type="primary" class="btns_box" plain :size="autoSize" @click="changeKss">更换抗生素组</el-button>
|
||||
<el-button type="primary" class="btns_box" plain :size="autoSize" @click="addKss">添加抗生素组</el-button>
|
||||
<el-button class="btns_box" type="primary" :size="autoSize" plain :disabled="labPat.jgbz == 2"
|
||||
@click="addMed">新增</el-button>
|
||||
<el-button class="btns_box" type="danger" :size="autoSize" :disabled="labPat.jgbz == 2" plain
|
||||
@click="delMed">删除</el-button>
|
||||
<el-button type="primary" class="btns_box" plain :size="autoSize" :disabled="labPat.jgbz == 2"
|
||||
@click="changeKss">更换抗生素组</el-button>
|
||||
<el-button type="primary" class="btns_box" plain :size="autoSize" :disabled="labPat.jgbz == 2"
|
||||
@click="addKss">添加抗生素组</el-button>
|
||||
</template>
|
||||
|
||||
<template v-if="activeName2 == 'second'">
|
||||
<el-button type="primary" class="btns_box" plain :size="autoSize" @click="handleTextareaEnter">确定</el-button>
|
||||
<el-button type="primary" class="btns_box" plain :size="autoSize" @click="textarea = ''">清除</el-button>
|
||||
<el-button class="btns_box" type="primary" :size="autoSize" plain :disabled="labPat.jgbz == 2"
|
||||
@click="pyMb">评语模板</el-button>
|
||||
<el-button type="primary" class="btns_box" plain :size="autoSize" :disabled="labPat.jgbz == 2"
|
||||
@click="handleTextarea">确定</el-button>
|
||||
<el-button type="primary" class="btns_box" plain :size="autoSize" :disabled="labPat.jgbz == 2"
|
||||
@click="textarea = ''">清除</el-button>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 专家评语 -->
|
||||
<CommentDialog ref="commentRef" @update:text="handleCommentConfirm" />
|
||||
|
||||
<!-- 新增明细 -->
|
||||
<ProjectDetails ref="itemDictRef" :dialog-title="'选择检验项目'" :tableKey="labPatKey" @select="handleItemSelect" />
|
||||
|
||||
@ -152,6 +164,22 @@
|
||||
<!-- 危急值结果上报 -->
|
||||
<UploadWarning ref="uploadwarningRef" :warningMsgdata="warningMsgdata" :tableKey="labPatKey"
|
||||
@onupload="shHandleCheck" />
|
||||
|
||||
<!-- 用户校验 -->
|
||||
<userVerification ref="formRef" :title="verTitle" :userList="userList" @confirm="handleConfirm" />
|
||||
|
||||
<!-- 合并当前病人其他结果 -->
|
||||
<MergeResults ref="mergeRef" :tableKey="{ ...labPatKey, jyrq: labPat.jyrq }" :dictData="dictData" />
|
||||
|
||||
<!-- 查看备份数据 -->
|
||||
<ViewBackup ref="backRef" :tableKey="{ ...labPatKey, jyrq: labPat.jyrq }" :userList="userList"
|
||||
:dictData="dictData" />
|
||||
|
||||
<!-- 双工流水线 -->
|
||||
<DlDialog ref="dlRef" :tableKey="{ ...labPatKey, jyrq: labPat.jyrq }" :dictData="dictData" />
|
||||
|
||||
<!-- 未建项目结果 -->
|
||||
<BuiltDialog ref="builtRef" :tableKey="{ ...labPatKey, jyrq: labPat.jyrq }" @clearPro="clearProHandle" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -162,7 +190,11 @@ import {
|
||||
getresultmedList, savetestResult, changeresult, saveresult, newresult, getmeddictList, savemedresult,
|
||||
savemedresultall, deletemedresult, getmedgroupMbList
|
||||
} from '@/api/liswork/micro/index';
|
||||
import { check2, uncheck2, unconfirmlog, checkuser, deleteresult, queryXmVal, setinputmdl, } from "@/api/liswork/work/LisWork";
|
||||
import {
|
||||
check2, uncheck2, unconfirmlog, checkuser, deleteresult, queryXmVal, setinputmdl, clearPrintflag,
|
||||
clearnotComplete, emrquery, allPatquery, lockSample, unLockSample,
|
||||
printListwork,
|
||||
} from "@/api/liswork/work/LisWork";
|
||||
import { useCommonStore } from "@/store/modules/commonStore";
|
||||
import CheckUser from "../../work/components/CheckUser.vue";
|
||||
import Unconfirmlog from "../../work/components/unconfirmlog.vue";
|
||||
@ -179,7 +211,14 @@ import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import emitter from "@/utils/mitt";
|
||||
const autoSize = classCom.useAutoSize();
|
||||
import { LabResultItem, ymTableDataItem } from '@/types/index';
|
||||
|
||||
import ContextMenu from "@/components/contextMenu/index.vue";
|
||||
import { ContextMenuItem } from '@/types/index'
|
||||
import BuiltDialog from "../../work/components/builtDialog.vue"
|
||||
import ViewBackup from "../../work/components/viewBackup.vue"
|
||||
import userVerification from "@/components/userVerification/index.vue";
|
||||
import DlDialog from "../../work/components/dlDialog.vue";
|
||||
import MergeResults from "../../work/components/mergeResults.vue";
|
||||
import CommentDialog from "./components/commentDialog.vue";
|
||||
|
||||
const props = defineProps({
|
||||
labPat: {
|
||||
@ -198,6 +237,10 @@ const props = defineProps({
|
||||
dictData: {
|
||||
type: Object,
|
||||
default: () => { }
|
||||
},
|
||||
userList: {
|
||||
type: Array as PropType<any[]>,
|
||||
default: () => []
|
||||
}
|
||||
});
|
||||
const { labPat, labPatKey, labResutsData, dictData } = toRefs(props);
|
||||
@ -249,8 +292,6 @@ const CellStyleHd = ({ row, column, rowIndex, columnIndex }: {
|
||||
if (column.label == "检验结果" && row.jgbz == "Q") {
|
||||
return { background: '#ffff80 !important', color: '#606266' };
|
||||
}
|
||||
|
||||
|
||||
if (column.label == "阴阳性" && row.jgbz == "H") {
|
||||
return { background: '#ffc0c0 !important', color: '#606266' };
|
||||
}
|
||||
@ -276,11 +317,206 @@ const handleColumnDragEnd = (data: any) => {
|
||||
columns.value = data.columns;
|
||||
}
|
||||
|
||||
// 右键菜单配置
|
||||
const contextMenuItems = computed<ContextMenuItem[]>(() => [
|
||||
{ label: '打印预览', action: 'view', shortcut: 'V', },
|
||||
{ label: 'PDF报告预览', action: 'bgyl', shortcut: 'P', },
|
||||
{ label: '合并病人当前其他结果', action: 'merge', shortcut: 'B', },
|
||||
{ type: 'divider' },
|
||||
{ label: '锁定报告', action: 'Lock', shortcut: 'L', },
|
||||
{ label: '解除报告锁定', action: 'lift', shortcut: 'W', },
|
||||
{ type: 'divider' },
|
||||
// { label: '删除记录', action: 'delete', danger: true, shortcut: 'd', },
|
||||
{ label: '查看电子病历', action: 'emrquery', shortcut: 'E', },
|
||||
{ label: '查看360全景视图', action: 'patquery', shortcut: 'Y', },
|
||||
{ label: '查看备份数据', action: 'viewbackup', shortcut: 'P', },
|
||||
{ label: '双工流水线', action: 'datalink', shortcut: 'F', },
|
||||
{ type: 'divider' },
|
||||
{ label: '解除审核', action: 'unblock', shortcut: 'C', },
|
||||
{ label: '清除打印标志', action: 'clearPrint', shortcut: 'U', },
|
||||
{ label: '清除所有未做项目', action: 'clearPro', shortcut: 'T', },
|
||||
{ type: 'divider' },
|
||||
{ label: '未建项目结果', action: 'unbuilt', shortcut: 'N', },
|
||||
]);
|
||||
|
||||
// 处理菜单选择
|
||||
const handleMenuSelect = (item: any) => {
|
||||
switch (item.action) {
|
||||
case 'view':
|
||||
previewHandle(1) //打印预览
|
||||
break;
|
||||
case 'bgyl':
|
||||
previewHandle(2) //PDF报告预览
|
||||
break;
|
||||
case 'merge':
|
||||
mergeHandle()
|
||||
// alert(`合并病人当前其他结果`);
|
||||
break;
|
||||
case 'Lock':
|
||||
lockHandle(); //锁定
|
||||
break;
|
||||
case 'lift':
|
||||
unlockHandle() //解锁
|
||||
break;
|
||||
case 'emrquery':
|
||||
emrqueryHandle() //电子病历查询
|
||||
break;
|
||||
case 'patquery':
|
||||
patqueryHandle() //360视图
|
||||
break;
|
||||
case 'viewbackup':
|
||||
viewbackupHandle() //查看备份数据
|
||||
break;
|
||||
case 'datalink':
|
||||
datalinkHandle() //流水线
|
||||
break;
|
||||
case 'unblock':
|
||||
handleCheck(3) //解除审核
|
||||
break;
|
||||
case 'clearPrint':
|
||||
clearPrintHandle() //清除打印标志
|
||||
break;
|
||||
case 'clearPro':
|
||||
clearProHandle() //清除所有未做项目
|
||||
break;
|
||||
case 'unbuilt':
|
||||
unbuiltHandle() //未建项目结果
|
||||
break;
|
||||
case 'delete':
|
||||
if (confirm(`确定要删除患者的记录吗?`)) {
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const previewHandle = (type: number) => { //1 打印预览 2 PDF报告预览
|
||||
const data = {
|
||||
jyrq: labPat.value.jyrq,
|
||||
yq: labPat.value.yq,
|
||||
ybh: labPat.value.ybh,
|
||||
sqh: labPat.value.sqh
|
||||
}
|
||||
printListwork(data).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
if (type == 1) {
|
||||
classCom.printBase64PDF(res.data)
|
||||
} else {
|
||||
emits('previewHandle', res.data);
|
||||
}
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
const mergeRef = ref()
|
||||
const mergeHandle = () => {
|
||||
mergeRef.value.open()
|
||||
};
|
||||
|
||||
const formRef = ref();
|
||||
const verTitle = ref('请输入锁定人员账号密码')
|
||||
const lockType = ref(1)
|
||||
// 锁定报告
|
||||
const lockHandle = () => {
|
||||
if (props.labPat.jgbz != 0) return ElMessage.warning('样本已审核,不能锁定!')
|
||||
lockType.value = 1
|
||||
formRef.value.open()
|
||||
verTitle.value = '请输入锁定人员账号密码'
|
||||
}
|
||||
|
||||
// 解除锁定报告
|
||||
const unlockHandle = () => {
|
||||
if (props.labPat.jgbz != 5) return ElMessage.warning('目标标本未锁定,不可解除锁定!')
|
||||
lockType.value = 2
|
||||
verTitle.value = '请输入解除锁定人员账号密码'
|
||||
formRef.value.open()
|
||||
}
|
||||
|
||||
// 锁定样本
|
||||
const handleConfirm = (data: { yhdh: string, userName: string, mm: string }) => {
|
||||
const obj = {
|
||||
...labPatKey.value,
|
||||
jyrq: labPat.value.jyrq,
|
||||
yhdh: data.yhdh,
|
||||
}
|
||||
|
||||
emits('update:labPatKey', {
|
||||
...labPatKey.value,
|
||||
yhdh: data.yhdh,
|
||||
});
|
||||
if (lockType.value == 1) {
|
||||
lockSample(obj).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
formRef.value?.cancel()
|
||||
ElMessage.success(res.msg)
|
||||
emits('changeStatus', labPat.value)
|
||||
}
|
||||
});
|
||||
} else {
|
||||
unLockSample(obj).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
formRef.value?.cancel()
|
||||
ElMessage.success(res.msg)
|
||||
emits('changeStatus', labPat.value)
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const emrqueryHandle = () => {
|
||||
emrquery({ ...labPatKey.value, jyrq: labPat.value.jyrq }).then((res: any) => {
|
||||
if (res.data) {
|
||||
window.open(res.data)
|
||||
}
|
||||
})
|
||||
};
|
||||
const patqueryHandle = () => {
|
||||
allPatquery({ ...labPatKey.value, jyrq: labPat.value.jyrq }).then((res: any) => {
|
||||
if (res.data) {
|
||||
window.open(res.data)
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
const dlRef = ref()
|
||||
const datalinkHandle = () => {
|
||||
dlRef.value.open()
|
||||
};
|
||||
|
||||
const backRef = ref()
|
||||
const viewbackupHandle = () => {
|
||||
backRef.value.openDialog()
|
||||
};
|
||||
|
||||
const builtRef = ref()
|
||||
const unbuiltHandle = () => {
|
||||
builtRef.value.open()
|
||||
};
|
||||
|
||||
const clearPrintHandle = () => {
|
||||
clearPrintflag({ ...labPatKey.value, jyrq: labPat.value.jyrq }).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
emits('changeStatus', labPat.value)
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
const clearProHandle = () => {
|
||||
clearnotComplete({ ...labPatKey.value, jyrq: labPat.value.jyrq }).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
emits('fetchLabResults')
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
const reasonText = ref('');
|
||||
const warningMsgdata = ref('');
|
||||
const checktitle = ref('');
|
||||
const checkUserRef = ref();
|
||||
const runnextstepname = ref(-1);
|
||||
const runnextstepname = ref(-1); // 审核类型
|
||||
|
||||
const handleCheck = (checkType: number) => {
|
||||
runnextstepname.value = checkType
|
||||
labPatKey.value.problemId = 0;
|
||||
@ -299,7 +535,10 @@ const handleCheckUserConfirm = (info: { yhdh: string, mm: string }) => {
|
||||
...labPatKey.value,
|
||||
yhdh: info.yhdh
|
||||
});
|
||||
proceedCheck(runnextstepname.value)
|
||||
// 异步处理 等待yhdh数据更新
|
||||
setTimeout(() => {
|
||||
proceedCheck(runnextstepname.value)
|
||||
}, 100);
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -320,7 +559,7 @@ const proceedCheck = (type: number) => {
|
||||
}
|
||||
const uploadwarningRef = ref();
|
||||
const shHandleCheck = () => {
|
||||
check2({ ...labPatKey.value, jyrq: labPat.value.jyrq, yhdh: props.labPat.yhdh }).then((res: any) => {
|
||||
check2({ ...labPatKey.value, jyrq: labPat.value.jyrq }).then((res: any) => {
|
||||
emits("changeStatus", props.labPat);
|
||||
if (res.code == "4" && res.problemId === 4) {
|
||||
labPatKey.value.problemId = res.problemId;
|
||||
@ -332,7 +571,7 @@ const shHandleCheck = () => {
|
||||
const unconfirmlogRef = ref();
|
||||
|
||||
const unShHandle = () => {
|
||||
uncheck2({ ...labPatKey.value, jyrq: labPat.value.jyrq, yhdh: props.labPat.yhdh }).then((res: any) => {
|
||||
uncheck2({ ...labPatKey.value, jyrq: labPat.value.jyrq }).then((res: any) => {
|
||||
if (res.code == "4") {
|
||||
labPatKey.value.problemId = res.problemId;
|
||||
reasonText.value = res.msg;
|
||||
@ -342,10 +581,6 @@ const unShHandle = () => {
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const itemDictRef = ref();
|
||||
const openItemDictDialog = () => {
|
||||
itemDictRef.value.openDictSelector();
|
||||
@ -477,8 +712,9 @@ watch(labResutsData, (newVal: any) => {
|
||||
}
|
||||
})
|
||||
|
||||
const handleTextareaEnter = () => {
|
||||
const handleTextarea = () => {
|
||||
if (!rowInfo.value.xmdh) return
|
||||
if (!textarea.value) return ElMessage.warning('请填写专家评语!')
|
||||
savetestResult({ ...rowInfo.value, textresult: textarea.value }).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
ElMessage.success('保存成功');
|
||||
@ -490,6 +726,8 @@ const rowHandle = (row: any) => {
|
||||
selectedRows.value = [row];
|
||||
emitter.emitWithCache('refreshClinical', row);
|
||||
rowInfo.value = row
|
||||
textarea.value = row.textresult
|
||||
|
||||
const data = {
|
||||
ybh: labPat.value.ybh,
|
||||
yq: labPat.value.yq,
|
||||
@ -604,7 +842,7 @@ const ymColumns = ref([
|
||||
{ label: "Mic", prop: "mic", align: 'center', visible: true, width: 60, slot: 'mic' },
|
||||
{ label: "KB", prop: "rad", align: 'center', visible: true, width: 50, slot: 'rad' },
|
||||
{ label: "结果", prop: "csjg", align: 'center', visible: true, width: 60, slot: 'csjg' },
|
||||
{ label: "结果标志", prop: "jgbz", align: 'center', visible: true, slot: 'jgbz', width: 200, showOverflowTooltip: false },
|
||||
{ label: "结果标志", prop: "jgbz", align: 'center', visible: true, slot: 'jgbz', width: 180, showOverflowTooltip: false },
|
||||
{ label: "折点", prop: "ckz", align: 'center', visible: true, },
|
||||
{ label: "分组", prop: "bz", align: 'center', visible: true, slot: 'bz' },
|
||||
{ label: "专家值", prop: "txtresult", align: 'center', visible: true, slot: 'txtresult' },
|
||||
@ -685,6 +923,15 @@ const kssSelect = (row: any) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const commentRef = ref()
|
||||
const pyMb = () => {
|
||||
commentRef.value.open()
|
||||
}
|
||||
|
||||
const handleCommentConfirm = (text: string) => {
|
||||
textarea.value = text
|
||||
}
|
||||
const addMed = () => {
|
||||
medDictRef.value.openDictSelector();
|
||||
}
|
||||
@ -706,7 +953,6 @@ const delMed = () => {
|
||||
ymselectedRows.value = [];
|
||||
}
|
||||
const medSelect = (row: any) => {
|
||||
console.log('row==>', row);
|
||||
const ymFlag = tableData.value.some((item: any) => item.ywdh === row.value);
|
||||
if (ymFlag) return ElMessage.warning(`抗生素【${row.label}】已存在`);
|
||||
// 1. 构造新增行数据
|
||||
@ -781,7 +1027,15 @@ const formatDict = (v: string, dictType: string) => {
|
||||
return props.dictData[dictType]?.find((item: any) => item.value == v)?.label || v;
|
||||
}
|
||||
const formatJgbz = (v: string) => {
|
||||
return v == 'H' ? '高' : v == 'L' ? '低' : v == 'N' ? '阴性' : v == 'P' ? '阳性' : v == 'Q' ? '弱阳性' : v == 'M' ? '正常' : ''
|
||||
const jgbzMap = {
|
||||
'H': '高',
|
||||
'L': '低',
|
||||
'N': '阴性',
|
||||
'P': '阳性',
|
||||
'Q': '弱阳性',
|
||||
'M': '正常'
|
||||
};
|
||||
return jgbzMap[v as keyof typeof jgbzMap] ?? '';
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-model="checkShow" :title="title" width="500" :close-on-click-modal="false" :draggable="true"
|
||||
@close="handleCancel">
|
||||
@close="close">
|
||||
<el-form ref="ruleFormRef" style="max-width: 600px" :model="ruleForm" :rules="rules" label-width="auto">
|
||||
<el-form-item label="用户工号:" prop="yhdh">
|
||||
<el-input ref="yhdhRef" v-model.trim="ruleForm.yhdh" placeholder="请输入用户工号" maxlength="20"
|
||||
@ -48,6 +48,7 @@ const props = defineProps({
|
||||
// 组件事件
|
||||
const emit = defineEmits([
|
||||
'onConfirm', // 验证成功回调
|
||||
'onCancel'
|
||||
]);
|
||||
|
||||
// 表单数据
|
||||
@ -69,6 +70,7 @@ const rules = ref(
|
||||
const yhdhRef = ref();
|
||||
const open = () => {
|
||||
checkShow.value = true;
|
||||
flag.value = true;
|
||||
nextTick(() => {
|
||||
setTimeout(() => {
|
||||
yhdhRef.value.focus();
|
||||
@ -77,11 +79,13 @@ const open = () => {
|
||||
};
|
||||
const checkShow = ref(false);
|
||||
const ruleFormRef = ref();
|
||||
const flag = ref(true);
|
||||
// 处理确认验证
|
||||
const handleConfirm = () => {
|
||||
ruleFormRef.value.validate((valid: boolean) => {
|
||||
if (valid) {
|
||||
emit('onConfirm', { yhdh: ruleForm.value.yhdh, mm: ruleForm.value.mm });
|
||||
flag.value = false;
|
||||
checkShow.value = false;
|
||||
} else {
|
||||
return false;
|
||||
@ -95,6 +99,16 @@ const handleCancel = () => {
|
||||
ruleForm.value.yhdh = '';
|
||||
ruleForm.value.mm = '';
|
||||
ruleFormRef.value.resetFields();
|
||||
emit('onCancel');
|
||||
};
|
||||
|
||||
const close = () => {
|
||||
ruleForm.value.yhdh = '';
|
||||
ruleForm.value.mm = '';
|
||||
ruleFormRef.value.resetFields();
|
||||
if (flag.value) {
|
||||
emit('onCancel');
|
||||
}
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
|
||||
177
src/views/liswork/work/components/builtDialog.vue
Normal file
177
src/views/liswork/work/components/builtDialog.vue
Normal file
@ -0,0 +1,177 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-model="builtShow" title="检验结果对照" width="40vw" :close-on-click-modal="false" :draggable="true">
|
||||
<div class="tips mb10">字典中不存在项目</div>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="16">
|
||||
<el-table :data="builtTableData" height="50vh" border show-overflow-tooltip>
|
||||
<el-table-column label="接口/通道号" prop="xmdh" />
|
||||
<el-table-column label="结果" prop="csjg" />
|
||||
<el-table-column label="对应检验项目" width="180">
|
||||
<template #default="{ row }">
|
||||
<el-select v-model="row.xmdh0" placeholder="" filterable @change="" size="small"
|
||||
class="full-width-input">
|
||||
<el-option v-for="item in builtOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="tips">
|
||||
提示:<br />
|
||||
如果结果就是某个检验项目的结果,请在“对应检验项目”列表中直接选择进行对照。<br />
|
||||
如果不是,<br />
|
||||
请选择菜单“字典”一>“检验项目”进入检验维护作业后点击按钮<br />
|
||||
自动加载”加入项目。<br />
|
||||
</div>
|
||||
<div class="btns_box">
|
||||
<div class="btn" @click="cpHandle">存盘</div>
|
||||
<div class="btn" @click="builtShow = false">退出</div>
|
||||
<div class="btn" @lcick="clearProHandle">清除未做</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { noiteMresult, queryXmInfo, setitemInter } from '@/api/liswork/work/LisWork';
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
|
||||
|
||||
const props = defineProps({
|
||||
tableKey: {
|
||||
type: Object as PropType<any>,
|
||||
required: true
|
||||
}
|
||||
});
|
||||
const { tableKey } = toRefs(props);
|
||||
|
||||
|
||||
const builtShow = ref(false);
|
||||
const builtTableData = ref<Array<any>>([]);
|
||||
const builtOptions = ref<Array<any>>([]);
|
||||
|
||||
const emits = defineEmits(['clearPro']);
|
||||
const open = () => {
|
||||
queryXmInfo({ yq: tableKey.value.yq }).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
builtOptions.value = res.data.map((item: any) => {
|
||||
return {
|
||||
value: item.xmdh,
|
||||
label: item.xmdh + ' - ' + item.xmmc
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
noiteMresult(tableKey.value).then((res: any) => {
|
||||
builtTableData.value = res.data.map((item: any) => {
|
||||
return {
|
||||
...item,
|
||||
xmdh0: ''
|
||||
}
|
||||
})
|
||||
})
|
||||
builtShow.value = true;
|
||||
}
|
||||
const cpHandle = () => {
|
||||
const validItems = builtTableData.value.filter(item => item.xmdh0);
|
||||
|
||||
if (validItems.length === 0) {
|
||||
console.log("没有需要处理的项");
|
||||
return;
|
||||
}
|
||||
|
||||
let successCount = 0;
|
||||
let failCount = 0;
|
||||
|
||||
|
||||
const requests = validItems.map((item, index) => {
|
||||
return setitemInter({ ...tableKey.value, xmdh0: item.xmdh0, xmdh: item.xmdh })
|
||||
.then((response: any) => ({
|
||||
index,
|
||||
success: true,
|
||||
data: response
|
||||
}))
|
||||
.catch((error: any) => ({
|
||||
index,
|
||||
success: false,
|
||||
error: error
|
||||
}));
|
||||
});
|
||||
|
||||
Promise.all(requests).then(results => {
|
||||
results.forEach((result: any) => {
|
||||
if (result.success) {
|
||||
successCount++;
|
||||
// console.log(`第 ${result.index + 1} 项成功:`, result.data);
|
||||
} else {
|
||||
failCount++;
|
||||
// console.error(`第 ${result.index + 1} 项失败:`, result.error);
|
||||
}
|
||||
});
|
||||
// 输出统计结果
|
||||
ElMessageBox.alert(
|
||||
`项目与通道号对照已经完成,成功${successCount}个;失败${failCount}个。<br />你可以重新从仪器端传送一遍数据,就可以看到正确的结果了。`,
|
||||
'信息',
|
||||
{
|
||||
dangerouslyUseHTMLString: true,
|
||||
}
|
||||
)
|
||||
})
|
||||
};
|
||||
|
||||
const clearProHandle = () => {
|
||||
emits('clearPro')
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
open
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.tips {
|
||||
font-family: SourceHanSansCN, SourceHanSansCN;
|
||||
}
|
||||
|
||||
|
||||
.btns_box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
margin-top: 1.875rem;
|
||||
|
||||
.btn {
|
||||
width: 80%;
|
||||
height: 2.5rem;
|
||||
line-height: 2.5rem;
|
||||
margin-bottom: 0.5rem;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 500;
|
||||
border-radius: 0.5rem;
|
||||
background-color: var(--el-color-primary);
|
||||
color: var(--el-color-white);
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--el-color-primary-light-2);
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
background-color: var(--el-color-primary-light-5);
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
130
src/views/liswork/work/components/dlDialog.vue
Normal file
130
src/views/liswork/work/components/dlDialog.vue
Normal file
@ -0,0 +1,130 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-model="dlShow" title="双工流水线申请单列表" width="40vw" :close-on-click-modal="false" :draggable="true">
|
||||
<div class="mb10">
|
||||
<el-button type="primary" @click="getDlList">刷新</el-button>
|
||||
<el-button type="primary" @click="cfHandle">重发申请单</el-button>
|
||||
<el-button @click="closeHandle">取消申请单</el-button>
|
||||
</div>
|
||||
<CustomTable :data="dlTableData" :columns="dlColumns" :config="dlTableConfig" :enable-column-drag="true"
|
||||
@column-drag-end="dlDragEnd" @selection-change="dlSelectionChange">
|
||||
<template #instrid="{ row }">
|
||||
{{ row.instrid ? dlObj[row.instrid] : '未发送指令' }}
|
||||
</template>
|
||||
<template #brxb="{ row }">
|
||||
{{ formatDict(row.brxb, 'SX') }}
|
||||
</template>
|
||||
<template #nldw="{ row }">
|
||||
{{ formatDict(row.nldw, 'AU') }}
|
||||
</template>
|
||||
</CustomTable>
|
||||
<div class="mt5" style="text-align: center;color:blue;">样本总数:{{ dlTableData.length }}</div>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { changeLinkList, datalink } from '@/api/liswork/work/LisWork'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import CustomTable from '@/components/elTable/index.vue'
|
||||
|
||||
const props = defineProps({
|
||||
tableKey: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
dictData: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
})
|
||||
|
||||
const { tableKey } = toRefs(props)
|
||||
|
||||
const dlObj: any = {
|
||||
0: '申请发送',
|
||||
1: '已发送指令',
|
||||
2: '申请撤销中'
|
||||
}
|
||||
|
||||
const dlShow = ref(false)
|
||||
const dlTableData = ref([])
|
||||
const dlColumns = ref([
|
||||
{ label: "选择", type: 'selection', align: 'center', width: 40, visible: true, },
|
||||
{ label: "动作状态", prop: "instrid", align: 'center', visible: true, slot: 'instrid' },
|
||||
{ label: "申请号", prop: "sqh", align: 'center', visible: true, },
|
||||
{ label: "样本号", prop: "ybh", align: 'center', visible: true, },
|
||||
{ label: "姓名", prop: "brxm", align: 'center', visible: true, },
|
||||
{ label: "性别", prop: "brxb", width: 30, align: 'center', visible: true, slot: 'brxb' },
|
||||
{ label: "年", prop: "nl", width: 30, align: 'center', visible: true, },
|
||||
{ label: "龄", prop: "nldw", width: 30, align: 'center', visible: true, slot: "nldw" },
|
||||
{ label: "检验目的", prop: "jymd", width: 180, visible: true, },
|
||||
])
|
||||
|
||||
const dlTableConfig = ref({
|
||||
border: true,
|
||||
height: '500px',
|
||||
cellStyle: ({ row, column }: any) => {
|
||||
if (row.instrid == 1) {
|
||||
return { background: '#c0c0c0 !important' }
|
||||
}
|
||||
},
|
||||
})
|
||||
const dlDragEnd = (data: any) => {
|
||||
dlColumns.value = data.columns
|
||||
}
|
||||
const dlList = ref([])
|
||||
|
||||
|
||||
const dlSelectionChange = (selection: any) => {
|
||||
dlList.value = selection
|
||||
}
|
||||
|
||||
|
||||
const getDlList = () => {
|
||||
datalink(tableKey.value).then((res: any) => {
|
||||
dlTableData.value = res.data;
|
||||
})
|
||||
}
|
||||
|
||||
const cfHandle = () => {
|
||||
if (dlList.value.length < 0) return ElMessage.warning('请选择数据')
|
||||
const arr = dlList.value.filter((item: any) => item.instrid == 1)
|
||||
arr.forEach((v: any) => {
|
||||
v.instrid = null
|
||||
})
|
||||
changeLinkList(arr).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
getDlList()
|
||||
}
|
||||
})
|
||||
}
|
||||
const closeHandle = () => {
|
||||
dlList.value.forEach((v: any) => {
|
||||
v.instrid = 2
|
||||
})
|
||||
|
||||
changeLinkList(dlList.value).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
getDlList()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const open = () => {
|
||||
getDlList()
|
||||
dlShow.value = true
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
open
|
||||
})
|
||||
|
||||
const formatDict = (v: string, dictType: string) => {
|
||||
return props.dictData[dictType]?.find((item: any) => item.value == v)?.label || v;
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
113
src/views/liswork/work/components/mergeResults.vue
Normal file
113
src/views/liswork/work/components/mergeResults.vue
Normal file
@ -0,0 +1,113 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-model="jgShow" title="绑定其他结果" width="40vw" :close-on-click-modal="false" :draggable="true">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-radio-group v-model="radio1">
|
||||
<el-radio value="1">5天内</el-radio>
|
||||
<el-radio value="2">10天内</el-radio>
|
||||
<el-radio value="3">20天内</el-radio>
|
||||
<el-radio value="4">30天内</el-radio>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-radio-group v-model="radio2">
|
||||
<el-radio value="1">复制</el-radio>
|
||||
<el-radio value="2">移动</el-radio>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-radio-group v-model="radio3">
|
||||
<el-radio value="1">覆盖</el-radio>
|
||||
<el-radio value="2">不覆盖</el-radio>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div> <el-checkbox>只显示同一申请单号</el-checkbox> </div>
|
||||
<div>
|
||||
<el-button type="primary">合并</el-button>
|
||||
<el-button>取消</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<CustomTable :data="mTableData" :columns="mColumns" :config="mTableConfig" :enable-column-drag="true"
|
||||
@column-drag-end="mDragEnd" @selection-change="mSelectionChange">
|
||||
<template #brxb="{ row }">
|
||||
{{ formatDict(row.brxb, 'SX') }}
|
||||
</template>
|
||||
<template #nldw="{ row }">
|
||||
{{ formatDict(row.nldw, 'AU') }}
|
||||
</template>
|
||||
</CustomTable>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import CustomTable from '@/components/elTable/index.vue'
|
||||
|
||||
const props = defineProps({
|
||||
tableKey: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
dictData: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
})
|
||||
|
||||
const { tableKey } = toRefs(props)
|
||||
|
||||
const jgShow = ref(false)
|
||||
const radio1 = ref('1')
|
||||
const radio2 = ref('1')
|
||||
const radio3 = ref('1')
|
||||
|
||||
const mTableData = ref([])
|
||||
|
||||
|
||||
const mColumns = ref([
|
||||
{ label: "选择", type: 'selection', align: 'center', width: 40, visible: true, },
|
||||
{ label: "仪器", prop: "yq", visible: true, },
|
||||
{ label: "检验日期", prop: "jyrq", visible: true, },
|
||||
{ label: "样本号", prop: "ybh", visible: true, },
|
||||
{ label: "病历号", prop: "brdh", visible: true, },
|
||||
{ label: "病人姓名", prop: "brxm", visible: true, },
|
||||
{ label: "年", prop: "nl", width: 40, visible: true, },
|
||||
{ label: "龄", prop: "nldw", width: 30, visible: true, slot: "nldw" },
|
||||
{ label: "检验项目", prop: "xmdh", visible: true, },
|
||||
{ label: "检验结果", prop: "csjg", width: 60, visible: true, },
|
||||
{ label: "申请号", prop: "sqh", visible: true, },
|
||||
])
|
||||
|
||||
|
||||
const mTableConfig = {
|
||||
border: true,
|
||||
height: '500px'
|
||||
}
|
||||
|
||||
const mDragEnd = (data: any) => {
|
||||
mColumns.value = data.columns
|
||||
}
|
||||
|
||||
const mSelectionChange = (data: any) => {
|
||||
|
||||
}
|
||||
|
||||
const open = () => {
|
||||
jgShow.value = true
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
open
|
||||
})
|
||||
|
||||
const formatDict = (v: string, dictType: string) => {
|
||||
return props.dictData[dictType]?.find((item: any) => item.value == v)?.label || v;
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
@ -105,17 +105,15 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { viewBackup } from '@/api/liswork/work/LisWork';
|
||||
import SelectTable from '@/components/SelectTable/index.vue';
|
||||
|
||||
const props = defineProps({
|
||||
backTableData: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
backLabInfo: {
|
||||
tableKey: {
|
||||
type: Object,
|
||||
default: () => { },
|
||||
required: true,
|
||||
},
|
||||
|
||||
userList: {
|
||||
type: Array as PropType<object[]>,
|
||||
default: () => [],
|
||||
@ -143,6 +141,12 @@ const backTableData = ref([])
|
||||
const backLabInfo: any = ref({})
|
||||
|
||||
const openDialog = () => {
|
||||
viewBackup(props.tableKey).then((res: any) => {
|
||||
if (res.data) {
|
||||
backTableData.value = res.data.labresultbk
|
||||
backLabInfo.value = res.data.labpatbk || {}
|
||||
}
|
||||
})
|
||||
backShow.value = true
|
||||
}
|
||||
|
||||
|
||||
@ -132,9 +132,9 @@ import {
|
||||
} from "../../../api/liswork/work/LisWork";
|
||||
import { querylabInstrList, querylabInstrListByLisgroup } from "../../../api/liswork/dict/LabInstr";
|
||||
import { getComDicts, queryComDictListService } from "../../../api/liswork/dict/ComDict";
|
||||
import LabPatForm from './components/labpat.vue'
|
||||
import LabResultForm from './components/labresult.vue'
|
||||
import LabPatListForm from './components/labpatlist.vue'
|
||||
import LabPatForm from './labpat.vue'
|
||||
import LabResultForm from './labresult.vue'
|
||||
import LabPatListForm from './labpatlist.vue'
|
||||
import Unconfirmlog from './components/unconfirmlog.vue'
|
||||
import Ddlb from './components/ddlb.vue'
|
||||
import CheckUser from './components/CheckUser.vue'
|
||||
|
||||
@ -9,18 +9,12 @@
|
||||
<el-col :span="6">
|
||||
<el-form-item label="" prop="ybh">
|
||||
<div class="next_box">
|
||||
<div class="jtIcon" @click="handlePrev">
|
||||
<el-icon>
|
||||
<ArrowUpBold />
|
||||
</el-icon>
|
||||
</div>
|
||||
<el-button type="primary" class="jt_btn" :size="aotuSize" icon="ArrowUpBold"
|
||||
@click="handlePrev"></el-button>
|
||||
<el-input v-model="queryParams.ybh" placeholder="样本编号" @keyup.enter="handleQuery"
|
||||
style="width:100%" />
|
||||
<div class="jtIcon" @click="handleNext">
|
||||
<el-icon>
|
||||
<ArrowDownBold />
|
||||
</el-icon>
|
||||
</div>
|
||||
<el-button type="primary" class="jt_btn" :size="aotuSize" icon="ArrowDownBold"
|
||||
@click="handleNext"></el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -79,15 +73,18 @@
|
||||
<template v-if="activeTab == 'LabPatList'">
|
||||
<div class="flex-between">
|
||||
<div>
|
||||
<el-button type="primary" :size="aotuSize" icon="RefreshRight" @click="fetchlabPatList">刷新</el-button>
|
||||
<el-button type="danger" :size="aotuSize" @click="delSampleHd">删除</el-button>
|
||||
<el-button class="btn_green" :size="aotuSize" icon="top" @click="handlePrev">上一个</el-button>
|
||||
<el-button class="btn_green mr5" :size="aotuSize" icon="bottom" @click="handleNext">下一个</el-button>
|
||||
<el-button type="primary" :size="aotuSize" icon="RefreshRight" circle
|
||||
@click="fetchlabPatList"></el-button>
|
||||
<el-button type="danger" :size="aotuSize" icon="Delete" circle @click="delSampleHd"></el-button>
|
||||
<el-button class="btn_green" :size="aotuSize" icon="top" circle @click="handlePrev"></el-button>
|
||||
<el-button class="btn_green mr5" :size="aotuSize" icon="bottom" circle
|
||||
@click="handleNext"></el-button>
|
||||
<PatientQueryForm :initial-params="initialParams" @query="handleQueryResult" @reset="handleReset"
|
||||
width="9rem" :size="aotuSize" placeholder="查询条件" :dict-data="dictData" :clearable="true" />
|
||||
<el-input v-model="searchText" clearable :size="aotuSize" @keyup.enter="searchQuery"
|
||||
@clear="clearSearch" style="width: 6rem" />
|
||||
width="14rem" :size="aotuSize" placeholder="查询条件" :dict-data="dictData" :clearable="true" />
|
||||
<el-input v-model="searchText" clearable :size="aotuSize" @keyup.enter="searchQuery" class="ml10"
|
||||
@clear="clearSearch" style="width: 10rem" />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<el-checkbox v-model="lbFlag" :size="aotuSize"> 列表翻页 </el-checkbox>
|
||||
</div>
|
||||
@ -102,7 +99,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<!-- tab栏 内容 -->
|
||||
<component :is="activeTabName" :queryParams="queryParams" :dictData="dictData" :instrOptions="instrOptions"
|
||||
@fetchResults="fetchLabResults" :tablekey="queryParams" />
|
||||
|
||||
@ -123,26 +120,27 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, nextTick, onMounted, toRaw } from 'vue';
|
||||
import LabPat from './components/labpat.vue';
|
||||
import LabPat from './labpat.vue';
|
||||
import SelectTable from '@/components/SelectTable/index.vue';
|
||||
import tabView from '@/components/tabViews/index.vue';
|
||||
// @ts-ignore
|
||||
import iFrame from "@/components/iFrame/index.vue";
|
||||
// @ts-ignore
|
||||
import LabResult from './components/labresult.vue';
|
||||
import LabPatList from './components/labpatlist.vue';
|
||||
import LabResult from './labresult.vue';
|
||||
import LabPatList from './labpatlist.vue';
|
||||
// @ts-ignore
|
||||
import { comDict } from '@/utils/dict'
|
||||
import { queryLabPatList, queryLabResults, loadDefault, queryLabPat, instrdconfig, delSample, getGroupInstrdList } from "@/api/liswork/work/LisWork";
|
||||
import { getComDicts, queryComDictListService } from "@/api/liswork/dict/ComDict";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import History from '../components/history/index.vue'
|
||||
import Others from '../components/others/index.vue'
|
||||
import OthersResult from '../components/othersResult/index.vue'
|
||||
import Reexamination from '../components/reexamination/index.vue'
|
||||
import Charge from '../components/charge/index.vue'
|
||||
import Combination from '../components/combination/index.vue'
|
||||
import Clinical from '../components/clinical/index.vue'
|
||||
import Sample from '../components/sample/index.vue'
|
||||
import OtherInformation from '../components/otherInformation/index.vue'
|
||||
import ResultGraph from '../components/resultGraph/index.vue'
|
||||
import { getNextNumber, getPreviousNumber } from "@/utils/getNextNumber";
|
||||
import { useCommonStore } from '@/store/modules/commonStore';
|
||||
@ -174,23 +172,25 @@ const tabList = ref([
|
||||
{ label: '标本列表', value: 'LabPatList' },
|
||||
{ label: '结果图形', value: 'ResultGraph' },
|
||||
{ label: '历史对照', value: 'History' },
|
||||
{ label: '其他结果', value: 'Others' },
|
||||
{ label: '其他结果', value: 'OthersResult' },
|
||||
{ label: '结果复查', value: 'Reexamination' },
|
||||
{ label: '收费信息', value: 'Charge' },
|
||||
{ label: '组合项目', value: 'Combination' },
|
||||
{ label: '临床意义', value: 'Clinical' },
|
||||
{ label: '样本流转', value: 'Sample' },
|
||||
{ label: '其他信息', value: 'OtherInformation' },
|
||||
])
|
||||
|
||||
const activeTabMap = {
|
||||
ResultGraph,
|
||||
History,
|
||||
Others,
|
||||
OthersResult,
|
||||
Reexamination,
|
||||
Charge,
|
||||
Combination,
|
||||
Clinical,
|
||||
Sample
|
||||
Sample,
|
||||
OtherInformation
|
||||
}
|
||||
|
||||
const activeTabName = computed(() => activeTabMap[activeTab.value as keyof typeof activeTabMap] || 'LabPatList');
|
||||
@ -480,7 +480,9 @@ const handlePrev = () => {
|
||||
if (index !== -1) {
|
||||
highlightRowIndex.value = index;
|
||||
const row = labPatList.value[index];
|
||||
labPatListRef.value.setCurrentRow(row);
|
||||
if (activeTab.value == 'LabPatList') {
|
||||
labPatListRef.value.setCurrentRow(row);
|
||||
}
|
||||
selectJob(row);
|
||||
} else {
|
||||
handleCreate();
|
||||
@ -489,7 +491,9 @@ const handlePrev = () => {
|
||||
if (highlightRowIndex.value > 0) {
|
||||
highlightRowIndex.value--;
|
||||
const row = labPatList.value[highlightRowIndex.value];
|
||||
labPatListRef.value.setCurrentRow(row);
|
||||
if (activeTab.value == 'LabPatList') {
|
||||
labPatListRef.value.setCurrentRow(row);
|
||||
}
|
||||
selectJob(row);
|
||||
}
|
||||
}
|
||||
@ -505,7 +509,9 @@ const handleNext = () => {
|
||||
if (index !== -1) {
|
||||
highlightRowIndex.value = index;
|
||||
const row = labPatList.value[index];
|
||||
labPatListRef.value.setCurrentRow(row);
|
||||
if (activeTab.value == 'LabPatList') {
|
||||
labPatListRef.value.setCurrentRow(row);
|
||||
}
|
||||
selectJob(row);
|
||||
} else {
|
||||
handleCreate();
|
||||
@ -514,7 +520,9 @@ const handleNext = () => {
|
||||
if (highlightRowIndex.value < labPatList.value.length - 1) {
|
||||
highlightRowIndex.value++;
|
||||
const row = labPatList.value[highlightRowIndex.value];
|
||||
labPatListRef.value.setCurrentRow(row);
|
||||
if (activeTab.value == 'LabPatList') {
|
||||
labPatListRef.value.setCurrentRow(row);
|
||||
}
|
||||
selectJob(row);
|
||||
} else {
|
||||
queryParams.value.ybh = getNextNumber(queryParams.value.ybh) as string;
|
||||
|
||||
@ -71,7 +71,7 @@
|
||||
import { ref, reactive, watch, toRaw, computed, onMounted, nextTick } from 'vue';
|
||||
import { changepatcolumn, updateLabPat, checkYsUser } from "@/api/liswork/work/LisWork";
|
||||
import SelectTable from '@/components/SelectTable/index.vue';
|
||||
import YhVerification from './yhVerification.vue';
|
||||
import YhVerification from './components/yhVerification.vue';
|
||||
|
||||
import emitter from '@/utils/mitt';
|
||||
import { classCom } from '@/utils/classCom';
|
||||
@ -11,8 +11,8 @@
|
||||
@click="handleBatchDelete">删除</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="primary" plain icon="Files" :size="aotuSize" @click="printHandle">打印</el-button>
|
||||
<el-button type="primary" plain icon="View" :size="aotuSize" @click="previewHandle">预览</el-button>
|
||||
<el-button type="primary" plain icon="Files" :size="aotuSize" @click="previewHandle(1)">打印</el-button>
|
||||
<el-button type="primary" plain icon="View" :size="aotuSize" @click="previewHandle(2)">预览</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<ContextMenu :items="contextMenuItems" @select="handleMenuSelect">
|
||||
@ -77,121 +77,28 @@
|
||||
|
||||
<!-- 校验用户 -->
|
||||
<CheckUser ref="checkUserRef" :title="checktitle" @onConfirm="handleCheckUserConfirm" />
|
||||
|
||||
<!-- 危急值结果上报 -->
|
||||
<UploadWarning ref="uploadwarningRef" :warningMsgdata="warningMsgdata" :tableKey="tableKey"
|
||||
@onupload="shHandleCheck" />
|
||||
|
||||
<!-- 操作原因 -->
|
||||
<Unconfirmlog ref="unconfirmlogRef" :reasonText="reasonText" :tableKey="tableKey" @onConfirm="unShHandle" />
|
||||
|
||||
|
||||
|
||||
<!-- 合并当前病人其他结果 -->
|
||||
<el-dialog v-model="jgShow" title="绑定其他结果" width="40vw" :close-on-click-modal="false" :draggable="true">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-radio-group v-model="radio2">
|
||||
<el-radio value="1">5天内</el-radio>
|
||||
<el-radio value="2">10天内</el-radio>
|
||||
<el-radio value="2">20天内</el-radio>
|
||||
<el-radio value="2">30天内</el-radio>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-radio-group v-model="radio2">
|
||||
<el-radio value="1">复制</el-radio>
|
||||
<el-radio value="2">移动</el-radio>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-radio-group v-model="radio2">
|
||||
<el-radio value="1">覆盖</el-radio>
|
||||
<el-radio value="2">不覆盖</el-radio>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div> <el-checkbox>只显示同一申请单号</el-checkbox> </div>
|
||||
<div>
|
||||
<el-button type="primary">合并</el-button>
|
||||
<el-button>取消</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<CustomTable :data="mTableData" :columns="mColumns" :config="mTableConfig" :enable-column-drag="true"
|
||||
@column-drag-end="mDragEnd" @selection-change="mSelectionChange">
|
||||
<template #brxb="{ row }">
|
||||
{{ formatDict(row.brxb, 'SX') }}
|
||||
</template>
|
||||
<template #nldw="{ row }">
|
||||
{{ formatDict(row.nldw, 'AU') }}
|
||||
</template>
|
||||
</CustomTable>
|
||||
</el-dialog>
|
||||
<MergeResults ref="mergeRef" :tableKey="tableKey" :dictData="dictData" />
|
||||
|
||||
<!-- 用户校验 -->
|
||||
<userVerification ref="formRef" :title="verTitle" :form-value="formData" :userList="userList"
|
||||
@confirm="handleConfirm" @cancel="handleCancel" />
|
||||
|
||||
<userVerification ref="formRef" :title="verTitle" :userList="userList" @confirm="handleConfirm" />
|
||||
|
||||
<!-- 双工流水线 -->
|
||||
<el-dialog v-model="dlShow" title="双工流水线申请单列表" width="40vw" :close-on-click-modal="false" :draggable="true">
|
||||
<div class="mb10">
|
||||
<el-button type="primary" @click="getDlList">刷新</el-button>
|
||||
<el-button type="primary" @click="cfHandle">重发申请单</el-button>
|
||||
<el-button @click="closeHandle">取消申请单</el-button>
|
||||
</div>
|
||||
<CustomTable :data="dlTableData" :columns="dlColumns" :config="dlTableConfig" :enable-column-drag="true"
|
||||
@column-drag-end="dlDragEnd" @selection-change="dlSelectionChange">
|
||||
<template #instrid="{ row }">
|
||||
{{ row.instrid ? dlObj[row.instrid] : '未发送指令' }}
|
||||
</template>
|
||||
<template #brxb="{ row }">
|
||||
{{ formatDict(row.brxb, 'SX') }}
|
||||
</template>
|
||||
<template #nldw="{ row }">
|
||||
{{ formatDict(row.nldw, 'AU') }}
|
||||
</template>
|
||||
</CustomTable>
|
||||
<div class="mt5" style="text-align: center;color:blue;">样本总数:{{ dlTableData.length }}</div>
|
||||
<DlDialog ref="dlRef" :tableKey="tableKey" :dictData="dictData" />
|
||||
|
||||
</el-dialog>
|
||||
<!-- 查看备份数据 -->
|
||||
<ViewBackup ref="backRef" :backLabInfo="backLabInfo" :backTableData="backTableData" :userList="userList"
|
||||
:dictData="dictData" />
|
||||
<ViewBackup ref="backRef" :tableKey="tableKey" :userList="userList" :dictData="dictData" />
|
||||
|
||||
<!-- 未建项目结果 -->
|
||||
<el-dialog v-model="builtShow" title="检验结果对照" width="40vw" :close-on-click-modal="false" :draggable="true">
|
||||
<div class="tips mb10">字典中不存在项目</div>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="16">
|
||||
<el-table :data="builtTableData" height="50vh" border show-overflow-tooltip>
|
||||
<el-table-column label="接口/通道号" prop="xmdh" />
|
||||
<el-table-column label="结果" prop="csjg" />
|
||||
<el-table-column label="对应检验项目" width="180">
|
||||
<template #default="{ row }">
|
||||
<el-select v-model="row.xmdh0" placeholder="" filterable @change="" size="small"
|
||||
class="full-width-input">
|
||||
<el-option v-for="item in builtOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="tips">
|
||||
提示:<br />
|
||||
如果结果就是某个检验项目的结果,请在“对应检验项目”列表中直接选择进行对照。<br />
|
||||
如果不是,<br />
|
||||
请选择菜单“字典”一>“检验项目”进入检验维护作业后点击按钮<br />
|
||||
自动加载”加入项目。<br />
|
||||
</div>
|
||||
<div class="btns_box">
|
||||
<div class="btn" @click="cpHandle">存盘</div>
|
||||
<div class="btn" @click="builtShow = false">退出</div>
|
||||
<div class="btn" @lcick="clearProHandle">清除未做</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<BuiltDialog ref="builtRef" :tableKey="tableKey" @clearPro="clearProHandle" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -199,23 +106,26 @@
|
||||
import { ref, toRefs, watch, nextTick, onMounted, computed } from "vue";
|
||||
import userVerification from "@/components/userVerification/index.vue";
|
||||
import {
|
||||
check1, check2, uncheck2, unconfirmlog, checkuser, reglimit, deleteresult, changeresult, allPatquery, emrquery, datalink, changeLinkList,
|
||||
viewBackup, newresult, queryXmVal, printListwork, getresultchangelog, setinputmdl, saveResult, lockSample, unLockSample, clearnotComplete, clearPrintflag,
|
||||
noiteMresult, queryXmInfo, setitemInter
|
||||
check1, check2, uncheck2, checkuser, deleteresult, changeresult, allPatquery, emrquery,
|
||||
newresult, queryXmVal, printListwork, getresultchangelog, setinputmdl, saveResult, lockSample, unLockSample, clearnotComplete, clearPrintflag
|
||||
} from "@/api/liswork/work/LisWork";
|
||||
import { ElMessageBox, ElMessage } from "element-plus";
|
||||
import ProjectDetails from "@/components/projectDetails/index.vue";
|
||||
import projectsJg from "@/components/projectsjg/index.vue"
|
||||
import BuiltDialog from "./components/builtDialog.vue";
|
||||
import { classCom } from '@/utils/classCom'
|
||||
import CustomTable from '@/components/elTable/index.vue'
|
||||
import dayjs from 'dayjs';
|
||||
import emitter from "@/utils/mitt";
|
||||
import CheckUser from "./CheckUser.vue";
|
||||
import Unconfirmlog from './unconfirmlog.vue';
|
||||
import UploadWarning from "./uploadwarning.vue";
|
||||
import CheckUser from "./components/CheckUser.vue";
|
||||
import Unconfirmlog from './components/unconfirmlog.vue';
|
||||
import UploadWarning from "./components/uploadwarning.vue";
|
||||
import { useCommonStore } from "@/store/modules/commonStore";
|
||||
import ContextMenu from "@/components/contextMenu/index.vue";
|
||||
import ViewBackup from "./viewBackup.vue";
|
||||
import ViewBackup from "./components/viewBackup.vue";
|
||||
import DlDialog from "./components/dlDialog.vue";
|
||||
import MergeResults from "./components/mergeResults.vue";
|
||||
import { dictData } from "@/hooks";
|
||||
// 组件属性定义
|
||||
const props = defineProps({
|
||||
resultSysList: { type: Array, required: true },
|
||||
@ -320,10 +230,10 @@ const contextMenuItems = computed(() => [
|
||||
const handleMenuSelect = (item) => {
|
||||
switch (item.action) {
|
||||
case 'view':
|
||||
printHandle() //打印预览
|
||||
previewHandle(1) //打印预览
|
||||
break;
|
||||
case 'bgyl':
|
||||
previewHandle() //PDF报告预览
|
||||
previewHandle(2) //PDF报告预览
|
||||
break;
|
||||
case 'merge':
|
||||
mergeHandle()
|
||||
@ -366,82 +276,12 @@ const handleMenuSelect = (item) => {
|
||||
break;
|
||||
}
|
||||
};
|
||||
const builtShow = ref(false)
|
||||
const builtTableData = ref([])
|
||||
const builtOptions = ref([])
|
||||
const builtRef = ref()
|
||||
|
||||
const unbuiltHandle = () => {
|
||||
queryXmInfo({ yq: tableKey.value.yq }).then(res => {
|
||||
if (res.code == 0) {
|
||||
builtOptions.value = res.data.map(item => {
|
||||
return {
|
||||
value: item.xmdh,
|
||||
label: item.xmdh + ' - ' + item.xmmc
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
noiteMresult(tableKey.value).then(res => {
|
||||
builtTableData.value = res.data.map(item => {
|
||||
return {
|
||||
...item,
|
||||
xmdh0: ''
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
builtShow.value = true
|
||||
builtRef.value.open()
|
||||
};
|
||||
|
||||
const cpHandle = () => {
|
||||
const validItems = builtTableData.value.filter(item => item.xmdh0);
|
||||
|
||||
if (validItems.length === 0) {
|
||||
console.log("没有需要处理的项");
|
||||
return;
|
||||
}
|
||||
|
||||
let successCount = 0;
|
||||
let failCount = 0;
|
||||
|
||||
|
||||
const requests = validItems.map((item, index) => {
|
||||
return setitemInter({ ...tableKey.value, xmdh0: item.xmdh0, xmdh: item.xmdh })
|
||||
.then(response => ({
|
||||
index,
|
||||
success: true,
|
||||
data: response
|
||||
}))
|
||||
.catch(error => ({
|
||||
index,
|
||||
success: false,
|
||||
error: error
|
||||
}));
|
||||
});
|
||||
|
||||
Promise.all(requests).then(results => {
|
||||
results.forEach(result => {
|
||||
if (result.success) {
|
||||
successCount++;
|
||||
// console.log(`第 ${result.index + 1} 项成功:`, result.data);
|
||||
} else {
|
||||
failCount++;
|
||||
// console.error(`第 ${result.index + 1} 项失败:`, result.error);
|
||||
}
|
||||
});
|
||||
// 输出统计结果
|
||||
ElMessageBox.alert(
|
||||
`项目与通道号对照已经完成,成功${successCount}个;失败${failCount}个。<br />你可以重新从仪器端传送一遍数据,就可以看到正确的结果了。`,
|
||||
'信息',
|
||||
{
|
||||
dangerouslyUseHTMLString: true,
|
||||
}
|
||||
)
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
|
||||
const clearPrintHandle = () => {
|
||||
clearPrintflag(tableKey.value).then(res => {
|
||||
if (res.code == 0) {
|
||||
@ -458,36 +298,9 @@ const clearProHandle = () => {
|
||||
}
|
||||
})
|
||||
};
|
||||
const mTableData = ref([])
|
||||
|
||||
|
||||
const mColumns = ref([
|
||||
{ label: "选择", type: 'selection', align: 'center', width: 40, visible: true, },
|
||||
{ label: "仪器", prop: "yq", visible: true, },
|
||||
{ label: "检验日期", prop: "jyrq", visible: true, },
|
||||
{ label: "样本号", prop: "ybh", visible: true, },
|
||||
{ label: "病历号", prop: "brdh", visible: true, },
|
||||
{ label: "病人姓名", prop: "brxm", visible: true, },
|
||||
{ label: "年", prop: "nl", width: 40, visible: true, },
|
||||
{ label: "龄", prop: "nldw", width: 30, visible: true, slot: "nldw" },
|
||||
{ label: "检验项目", prop: "xmdh", visible: true, },
|
||||
{ label: "检验结果", prop: "csjg", width: 60, visible: true, },
|
||||
{ label: "申请号", prop: "sqh", visible: true, },
|
||||
])
|
||||
|
||||
|
||||
const mTableConfig = {
|
||||
border: true
|
||||
}
|
||||
|
||||
const mDragEnd = (data) => {
|
||||
mColumns.value = data.columns
|
||||
}
|
||||
|
||||
const mSelectionChange = (data) => {
|
||||
}
|
||||
const mergeRef = ref()
|
||||
const mergeHandle = () => {
|
||||
jgShow.value = true;
|
||||
mergeRef.value.open()
|
||||
};
|
||||
|
||||
const emrqueryHandle = () => {
|
||||
@ -505,94 +318,17 @@ const patqueryHandle = () => {
|
||||
})
|
||||
};
|
||||
const backRef = ref()
|
||||
const backLabInfo = ref({})
|
||||
const backTableData = ref([])
|
||||
|
||||
const viewbackupHandle = () => {
|
||||
viewBackup(tableKey.value).then(res => {
|
||||
if (res.data) {
|
||||
backTableData.value = res.data.labresultbk
|
||||
backLabInfo.value = res.data.labpatbk
|
||||
}
|
||||
})
|
||||
backRef.value.openDialog()
|
||||
};
|
||||
const dlObj = {
|
||||
0: '申请发送',
|
||||
1: '已发送指令',
|
||||
2: '申请撤销中'
|
||||
}
|
||||
const dlShow = ref(false)
|
||||
const dlTableData = ref([])
|
||||
const dlColumns = ref([
|
||||
{ label: "选择", type: 'selection', align: 'center', width: 40, visible: true, },
|
||||
{ label: "动作状态", prop: "instrid", align: 'center', visible: true, slot: 'instrid' },
|
||||
{ label: "申请号", prop: "sqh", align: 'center', visible: true, },
|
||||
{ label: "样本号", prop: "ybh", align: 'center', visible: true, },
|
||||
{ label: "姓名", prop: "brxm", align: 'center', visible: true, },
|
||||
{ label: "性别", prop: "brxb", width: 30, align: 'center', visible: true, slot: 'brxb' },
|
||||
{ label: "年", prop: "nl", width: 30, align: 'center', visible: true, },
|
||||
{ label: "龄", prop: "nldw", width: 30, align: 'center', visible: true, slot: "nldw" },
|
||||
{ label: "检验目的", prop: "jymd", width: 180, visible: true, },
|
||||
])
|
||||
|
||||
const dlTableConfig = ref({
|
||||
border: true,
|
||||
maxHeight: 500,
|
||||
cellStyle: ({ row, column }) => {
|
||||
if (row.instrid == 1) {
|
||||
return { background: '#c0c0c0 !important' }
|
||||
}
|
||||
},
|
||||
})
|
||||
const dlDragEnd = (data) => {
|
||||
dlColumns.value = data.columns
|
||||
}
|
||||
const dlList = ref([])
|
||||
const dlSelectionChange = (selection) => {
|
||||
dlList.value = selection
|
||||
}
|
||||
|
||||
const dlRef = ref()
|
||||
const datalinkHandle = () => {
|
||||
getDlList()
|
||||
dlShow.value = true;
|
||||
dlRef.value.open()
|
||||
};
|
||||
|
||||
const getDlList = () => {
|
||||
datalink(tableKey.value).then(res => {
|
||||
dlTableData.value = res.data;
|
||||
})
|
||||
}
|
||||
|
||||
const cfHandle = () => {
|
||||
if (dlList.value.length < 0) return ElMessage.warning('请选择数据')
|
||||
const arr = dlList.value.filter(item => item.instrid == 1)
|
||||
arr.forEach(v => {
|
||||
v.instrid = null
|
||||
})
|
||||
changeLinkList(arr).then(res => {
|
||||
if (res.code == 0) {
|
||||
getDlList()
|
||||
}
|
||||
})
|
||||
}
|
||||
const closeHandle = () => {
|
||||
dlList.value.forEach(v => {
|
||||
v.instrid = 2
|
||||
})
|
||||
|
||||
changeLinkList(dlList.value).then(res => {
|
||||
if (res.code == 0) {
|
||||
getDlList()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const formRef = ref();
|
||||
|
||||
const formData = ref({
|
||||
yhdh: '',
|
||||
userName: '',
|
||||
mm: '',
|
||||
})
|
||||
const verTitle = ref('请输入锁定人员账号密码')
|
||||
const lockType = ref(1)
|
||||
// 锁定报告
|
||||
@ -614,9 +350,13 @@ const unlockHandle = () => {
|
||||
// 锁定样本
|
||||
const handleConfirm = (data) => {
|
||||
const obj = {
|
||||
...tableKey.value,
|
||||
yhdh: data.yhdh,
|
||||
...tableKey.value
|
||||
}
|
||||
emits('update:tableKey', {
|
||||
...tableKey.value,
|
||||
yhdh: info.yhdh
|
||||
});
|
||||
if (lockType.value == 1) {
|
||||
lockSample(obj).then((res) => {
|
||||
if (res.code == 0) {
|
||||
@ -635,13 +375,7 @@ const handleConfirm = (data) => {
|
||||
});
|
||||
}
|
||||
}
|
||||
const handleCancel = () => {
|
||||
formData.value = {
|
||||
yhdh: '',
|
||||
userName: '',
|
||||
mm: '',
|
||||
}
|
||||
}
|
||||
|
||||
const columns = ref([
|
||||
{ label: 'No', prop: 'index', width: 30, align: 'center', visible: true, slot: "index" },
|
||||
{ label: "复", prop: "redo_flag", width: 30, align: 'center', visible: true, },
|
||||
@ -751,7 +485,11 @@ const handleCheckUserConfirm = (info) => {
|
||||
...tableKey.value,
|
||||
yhdh: info.yhdh
|
||||
});
|
||||
proceedCheck(runnextstepname.value)
|
||||
|
||||
// 异步处理 等待yhdh数据更新
|
||||
setTimeout(() => {
|
||||
proceedCheck(runnextstepname.value)
|
||||
}, 100);
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -759,7 +497,7 @@ const handleCheckUserConfirm = (info) => {
|
||||
const proceedCheck = (checkType) => {
|
||||
switch (checkType) {
|
||||
case 1: // 初审
|
||||
check1({ ...tableKey.value, yhdh: props.labPat.yhdh }).then(res => {
|
||||
check1({ ...tableKey.value }).then(res => {
|
||||
emits("changeStatus", props.labPat);
|
||||
})
|
||||
break;
|
||||
@ -777,7 +515,7 @@ const proceedCheck = (checkType) => {
|
||||
}
|
||||
const uploadwarningRef = ref();
|
||||
const shHandleCheck = () => {
|
||||
check2({ ...props.tableKey, yhdh: props.labPat.yhdh }).then(res => {
|
||||
check2({ ...props.tableKey }).then(res => {
|
||||
emits("changeStatus", props.labPat);
|
||||
if (res.code == "4" && res.problemId === 4) {
|
||||
tableKey.value.problemId = res.problemId;
|
||||
@ -790,8 +528,7 @@ const shHandleCheck = () => {
|
||||
|
||||
const unconfirmlogRef = ref();
|
||||
const unShHandle = () => {
|
||||
uncheck2({ ...tableKey.value, yhdh: props.labPat.yhdh }).then(res => {
|
||||
console.log('res',res);
|
||||
uncheck2({ ...tableKey.value }).then(res => {
|
||||
if (res.code == "4") {
|
||||
tableKey.value.problemId = res.problemId;
|
||||
reasonText.value = res.msg;
|
||||
@ -1013,7 +750,8 @@ const handleBatchDelete = () => {
|
||||
});
|
||||
};
|
||||
|
||||
const printHandle = () => {
|
||||
|
||||
const previewHandle = (type) => {
|
||||
const data = {
|
||||
jyrq: tableKey.value.jyrq,
|
||||
yq: tableKey.value.yq,
|
||||
@ -1022,20 +760,11 @@ const printHandle = () => {
|
||||
}
|
||||
printListwork(data).then(res => {
|
||||
if (res.code == 0) {
|
||||
classCom.printBase64PDF(res.data)
|
||||
}
|
||||
})
|
||||
};
|
||||
const previewHandle = () => {
|
||||
const data = {
|
||||
jyrq: tableKey.value.jyrq,
|
||||
yq: tableKey.value.yq,
|
||||
ybh: tableKey.value.ybh,
|
||||
sqh: tableKey.value.sqh
|
||||
}
|
||||
printListwork(data).then(res => {
|
||||
if (res.code == 0) {
|
||||
emits('previewHandle', res.data);
|
||||
if (type == 1) {
|
||||
classCom.printBase64PDF(res.data)
|
||||
} else {
|
||||
emits('previewHandle', res.data);
|
||||
}
|
||||
}
|
||||
})
|
||||
};
|
||||
@ -1103,43 +832,4 @@ const formatDict = (v, dictType) => {
|
||||
.custom-table-container {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.tips {
|
||||
font-family: SourceHanSansCN, SourceHanSansCN;
|
||||
}
|
||||
|
||||
.btns_box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
margin-top: 1.875rem;
|
||||
|
||||
.btn {
|
||||
width: 80%;
|
||||
height: 2.5rem;
|
||||
line-height: 2.5rem;
|
||||
margin-bottom: 0.5rem;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 500;
|
||||
border-radius: 0.5rem;
|
||||
background-color: var(--el-color-primary);
|
||||
color: var(--el-color-white);
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--el-color-primary-light-2);
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
background-color: var(--el-color-primary-light-5);
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,13 +1,15 @@
|
||||
<template>
|
||||
<div class="login">
|
||||
<el-form ref="loginRef" class="login-form">
|
||||
<!-- <FloatingLines :enabled-waves="['top', 'middle', 'bottom']" :line-count="[10, 15, 20]" :line-distance="[8, 6, 4]"
|
||||
:bend-radius="5.0" :bend-strength="-0.5" :interactive="true" :parallax="true" /> -->
|
||||
<el-form ref="loginRef" class="login-form">
|
||||
<div class="login-header">
|
||||
<div class="login-logo">
|
||||
<img src="@/assets/images/logo_new.png" alt="系统Logo" />
|
||||
</div>
|
||||
<div class="login-split"></div>
|
||||
<div class="login-title">
|
||||
<h1>{{ oem.appname}}</h1>
|
||||
<h1>{{ oem.appname }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -15,21 +17,12 @@
|
||||
<el-tabs v-model="activeName" type="card" @tab-click="handleClick" class="login-tabs">
|
||||
<!-- 工号登录 Tab -->
|
||||
<el-tab-pane label="账号密码登录" name="first">
|
||||
<el-form-item label="医疗机构:" prop="loginYLJG"class="custom-select">
|
||||
<el-select
|
||||
v-model="loginForm.loginParam.loginYLJG"
|
||||
placeholder="请选择医疗机构"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-form-item label="医疗机构:" prop="loginYLJG" class="custom-select">
|
||||
<el-select v-model="loginForm.loginParam.loginYLJG" placeholder="请选择医疗机构" style="width: 100%">
|
||||
<template #prefix>
|
||||
<svg-icon icon-class="international" class="el-input__icon input-icon" />
|
||||
</template>
|
||||
<el-option
|
||||
v-for="item in selectOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
<el-option v-for="item in selectOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
@ -43,7 +36,7 @@
|
||||
|
||||
<el-form-item label="登录密码:" prop="password">
|
||||
<el-input v-model="loginForm.password" type="password" size="large" auto-complete="off" placeholder="密码"
|
||||
@keyup.enter="handleLogin">
|
||||
@keyup.enter="handleLogin">
|
||||
<template #prefix>
|
||||
<svg-icon icon-class="password" class="el-input__icon input-icon" />
|
||||
</template>
|
||||
@ -56,15 +49,8 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="code" label="验 证 码 :" v-if="captchaEnabled">
|
||||
<el-input
|
||||
|
||||
v-model="loginForm.code"
|
||||
size="large"
|
||||
auto-complete="off"
|
||||
placeholder="验证码"
|
||||
style="width: 53%"
|
||||
@keyup.enter="handleLogin"
|
||||
>
|
||||
<el-input v-model="loginForm.code" size="large" auto-complete="off" placeholder="验证码" style="width: 53%"
|
||||
@keyup.enter="handleLogin">
|
||||
<template #prefix>
|
||||
<svg-icon icon-class="validCode" class="el-input__icon input-icon" />
|
||||
</template>
|
||||
@ -75,7 +61,8 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item style="width: 100%;">
|
||||
<el-button :loading="loading" size="large" type="primary" class="login-btn" style="width: 100%;" @click.prevent="handleLogin">
|
||||
<el-button :loading="loading" size="large" type="primary" class="login-btn" style="width: 100%;"
|
||||
@click.prevent="handleLogin">
|
||||
<span v-if="!loading">登 录</span>
|
||||
<span v-else>登 录 中...</span>
|
||||
</el-button>
|
||||
@ -87,7 +74,9 @@
|
||||
|
||||
<el-tab-pane label="扫码登录" name="second">
|
||||
<div class="tab-placeholder">
|
||||
<el-icon class="placeholder-icon"><Sms /></el-icon>
|
||||
<el-icon class="placeholder-icon">
|
||||
<Sms />
|
||||
</el-icon>
|
||||
<p>正在加载二维码...</p>
|
||||
<el-button type="success" icon="wechat" class="wechat-login-btn">刷新二维码</el-button>
|
||||
</div>
|
||||
@ -95,7 +84,9 @@
|
||||
|
||||
<el-tab-pane label="UKEY登录" name="third">
|
||||
<div class="tab-placeholder">
|
||||
<el-icon class="placeholder-icon"><Wechat /></el-icon>
|
||||
<el-icon class="placeholder-icon">
|
||||
<Wechat />
|
||||
</el-icon>
|
||||
<p>UKEY登录功能开发中...</p>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
@ -103,7 +94,7 @@
|
||||
</el-form>
|
||||
|
||||
<div class="el-login-footer">
|
||||
<span>版权所有(R)2022-2026 {{ oem.compay}} 电话:{{oem.phone}} E-mail:{{oem.Email}} version:{{oem.version}}</span>
|
||||
<span>版权所有(R)2022-2026 {{ oem.compay }} 电话:{{ oem.phone }} E-mail:{{ oem.Email }} version:{{ oem.version }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -116,6 +107,7 @@ import { getCodeImg, getInfo, getLocalconfig } from "@/api/login";
|
||||
import Cookies from "js-cookie";
|
||||
import { encrypt, decrypt } from "@/utils/jsencrypt";
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import FloatingLines from '@/components/Ballpit/index.vue';
|
||||
|
||||
// 初始化响应式变量
|
||||
const activeName = ref('first');
|
||||
@ -136,12 +128,12 @@ const loginForm = ref({
|
||||
rememberMe: false,
|
||||
code: "",
|
||||
uuid: "",
|
||||
loginParam:{loginYLJG:"",localid:""}
|
||||
loginParam: { loginYLJG: "", localid: "" }
|
||||
});
|
||||
const selectOptions = ref([{ id: '1', name: '总院' }]);
|
||||
const loginRules = ref({ // 修复:改为ref响应式,方便动态修改
|
||||
username: [{ required: true, trigger: "blur", message: "请输入您的账号" }],
|
||||
// password: [{ required: true, trigger: "blur", message: "请输入您的密码" }],
|
||||
// password: [{ required: true, trigger: "blur", message: "请输入您的密码" }],
|
||||
hospid: [{ required: true, message: '请选择医疗机构', trigger: 'change' }],
|
||||
code: [{ required: true, trigger: "change", message: "请输入验证码" }]
|
||||
});
|
||||
@ -153,41 +145,41 @@ const redirect = ref(undefined);
|
||||
|
||||
// 路由监听(优化版)
|
||||
watch(
|
||||
() => route.query.redirect,
|
||||
(newRedirect) => {
|
||||
if (redirect.value !== newRedirect) {
|
||||
redirect.value = newRedirect || '';
|
||||
}
|
||||
},
|
||||
{ immediate: true, deep: false }
|
||||
() => route.query.redirect,
|
||||
(newRedirect) => {
|
||||
if (redirect.value !== newRedirect) {
|
||||
redirect.value = newRedirect || '';
|
||||
}
|
||||
},
|
||||
{ immediate: true, deep: false }
|
||||
);
|
||||
|
||||
// 登录方法(修复proxy.$refs问题)
|
||||
const handleLogin = async () => {
|
||||
loginForm.value.loginParam.loginYLJG
|
||||
loading.value = true;
|
||||
Cookies.set("czlis_username", loginForm.value.username, { expires: 30 });
|
||||
Cookies.set("czlis_loginYLJG", loginForm.value.loginParam.loginYLJG, {expires: 30});
|
||||
// 调用action的登录方法
|
||||
userStore.login(loginForm.value).then(() => {
|
||||
const query = route.query;
|
||||
const otherQueryParams = Object.keys(query).reduce((acc, cur) => {
|
||||
if (cur !== "redirect") {
|
||||
acc[cur] = query[cur];
|
||||
}
|
||||
return acc;
|
||||
}, {});
|
||||
const targetPath = redirect.value || "/";
|
||||
if (route.path !== targetPath) {
|
||||
router.push({ path: targetPath, query: otherQueryParams });
|
||||
}
|
||||
}).catch(() => {
|
||||
loading.value = false;
|
||||
// 重新获取验证码
|
||||
if (captchaEnabled.value) {
|
||||
getCode();
|
||||
}
|
||||
});
|
||||
loading.value = true;
|
||||
Cookies.set("czlis_username", loginForm.value.username, { expires: 30 });
|
||||
Cookies.set("czlis_loginYLJG", loginForm.value.loginParam.loginYLJG, { expires: 30 });
|
||||
// 调用action的登录方法
|
||||
userStore.login(loginForm.value).then(() => {
|
||||
const query = route.query;
|
||||
const otherQueryParams = Object.keys(query).reduce((acc, cur) => {
|
||||
if (cur !== "redirect") {
|
||||
acc[cur] = query[cur];
|
||||
}
|
||||
return acc;
|
||||
}, {});
|
||||
const targetPath = redirect.value || "/";
|
||||
if (route.path !== targetPath) {
|
||||
router.push({ path: targetPath, query: otherQueryParams });
|
||||
}
|
||||
}).catch(() => {
|
||||
loading.value = false;
|
||||
// 重新获取验证码
|
||||
if (captchaEnabled.value) {
|
||||
getCode();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 获取验证码
|
||||
@ -202,7 +194,7 @@ const getCode = () => {
|
||||
if (!captchaEnabled.value) {
|
||||
loginRules.value.code = [];
|
||||
} else {
|
||||
loginRules.value.code = [{required: true, trigger: "change", message: "请输入验证码"}];
|
||||
loginRules.value.code = [{ required: true, trigger: "change", message: "请输入验证码" }];
|
||||
}
|
||||
});
|
||||
};
|
||||
@ -212,10 +204,10 @@ const getCookie = () => {
|
||||
const cookieUsername = Cookies.get("czlis_username");
|
||||
const cookieloginYLJG = Cookies.get("czlis_loginYLJG");
|
||||
//console.log('cookieloginYLJG', cookieloginYLJG);
|
||||
if (cookieUsername !== undefined && cookieUsername !== null&& cookieUsername !=="") {
|
||||
if (cookieUsername !== undefined && cookieUsername !== null && cookieUsername !== "") {
|
||||
loginForm.value.username = cookieUsername;
|
||||
}
|
||||
if (cookieloginYLJG !== undefined && cookieloginYLJG !== null&& cookieloginYLJG !=="") {
|
||||
if (cookieloginYLJG !== undefined && cookieloginYLJG !== null && cookieloginYLJG !== "") {
|
||||
loginForm.value.loginParam.loginYLJG = cookieloginYLJG;
|
||||
}
|
||||
//console.log('loginForm', loginForm);
|
||||
@ -223,16 +215,16 @@ const getCookie = () => {
|
||||
|
||||
// 获取本地配置
|
||||
const Localconfig = (localid) => {
|
||||
getLocalconfig({localid}).then(res => {
|
||||
getLocalconfig({ localid }).then(res => {
|
||||
if (res) {
|
||||
const {localconfig, hosplist, oem: oemData} = res;
|
||||
const { localconfig, hosplist, oem: oemData } = res;
|
||||
// 修复:赋值oem数据,显示动态标题
|
||||
if (oemData) oem.value = oemData;
|
||||
// console.log('oemData', oemData);
|
||||
// console.log('oem', oem.value);
|
||||
// console.log('oemData', oemData);
|
||||
// console.log('oem', oem.value);
|
||||
// 修复:判重后更新下拉选项,避免递归
|
||||
if (JSON.stringify(selectOptions.value) !== JSON.stringify(hosplist)) {
|
||||
selectOptions.value = hosplist || [{id: '1', name: '总院'}];
|
||||
selectOptions.value = hosplist || [{ id: '1', name: '总院' }];
|
||||
// 判重后赋值,避免重复修改触发更新
|
||||
if (!selectOptions.value.some(item => item.id === loginForm.value.hospid)) {
|
||||
loginForm.value.loginParam.loginYLJG = selectOptions.value[0]?.id || '1';
|
||||
@ -246,11 +238,11 @@ const Localconfig = (localid) => {
|
||||
};
|
||||
|
||||
// 获取指纹并加载配置
|
||||
const {getFingerprint} = useFingerprint();
|
||||
const { getFingerprint } = useFingerprint();
|
||||
const refreshFingerprint = async () => {
|
||||
try {
|
||||
const res = await getFingerprint();
|
||||
loginForm.value.loginParam.localid=res.visitorId
|
||||
loginForm.value.loginParam.localid = res.visitorId
|
||||
Localconfig(res.visitorId);
|
||||
} catch (err) {
|
||||
console.error("获取指纹失败:", err);
|
||||
@ -276,15 +268,18 @@ onMounted(() => {
|
||||
|
||||
<style lang='scss' scoped>
|
||||
.login {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
height: 100vh;
|
||||
background-image: url("../assets/images/login-background.jpg");
|
||||
background-size: cover;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.login-form {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
background: rgba(255, 255, 255, 0.4);
|
||||
backdrop-filter: blur(10px);
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
@ -390,7 +385,8 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.custom-select {
|
||||
margin-top: 20px; /* 可根据需求调整数值 */
|
||||
margin-top: 20px;
|
||||
/* 可根据需求调整数值 */
|
||||
}
|
||||
|
||||
/* Tab占位样式 */
|
||||
|
||||
@ -544,7 +544,15 @@ const rightTableConfig = ref(
|
||||
)
|
||||
|
||||
const formatJgbz = (v: string) => {
|
||||
return v == 'H' ? '高' : v == 'L' ? '低' : v == 'N' ? '阴性' : v == 'P' ? '阳性' : v == 'Q' ? '弱阳性' : v == 'M' ? '正常' : ''
|
||||
const jgbzMap = {
|
||||
'H': '高',
|
||||
'L': '低',
|
||||
'N': '阴性',
|
||||
'P': '阳性',
|
||||
'Q': '弱阳性',
|
||||
'M': '正常'
|
||||
};
|
||||
return jgbzMap[v as keyof typeof jgbzMap] ?? '';
|
||||
}
|
||||
|
||||
const expertComment = ref('')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user