diff --git a/package.json b/package.json index bfbf776..00c114e 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/api/liswork/labItem/LabItemApi.ts b/src/api/liswork/labItem/LabItemApi.ts index d2329bd..eface31 100644 --- a/src/api/liswork/labItem/LabItemApi.ts +++ b/src/api/liswork/labItem/LabItemApi.ts @@ -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 + }) +} \ No newline at end of file diff --git a/src/api/liswork/micro/index.ts b/src/api/liswork/micro/index.ts index 57790ab..0acd6c5 100644 --- a/src/api/liswork/micro/index.ts +++ b/src/api/liswork/micro/index.ts @@ -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 + }) } \ No newline at end of file diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index 2123427..5331e82 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -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; diff --git a/src/assets/styles/ruoyi.scss b/src/assets/styles/ruoyi.scss index c8a4094..7e7c07d 100644 --- a/src/assets/styles/ruoyi.scss +++ b/src/assets/styles/ruoyi.scss @@ -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 { diff --git a/src/components/Ballpit/index.vue b/src/components/Ballpit/index.vue new file mode 100644 index 0000000..196d08f --- /dev/null +++ b/src/components/Ballpit/index.vue @@ -0,0 +1,511 @@ + + + diff --git a/src/components/SelectTable/index.vue b/src/components/SelectTable/index.vue index 850b02e..e03c36e 100644 --- a/src/components/SelectTable/index.vue +++ b/src/components/SelectTable/index.vue @@ -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") { diff --git a/src/components/elTable/index.vue b/src/components/elTable/index.vue index bfe57ab..ee6aef4 100644 --- a/src/components/elTable/index.vue +++ b/src/components/elTable/index.vue @@ -26,7 +26,10 @@ - - + + \ No newline at end of file diff --git a/src/views/liswork/components/others/index.vue b/src/views/liswork/components/othersResult/index.vue similarity index 99% rename from src/views/liswork/components/others/index.vue rename to src/views/liswork/components/othersResult/index.vue index 00aa891..6a002f9 100644 --- a/src/views/liswork/components/others/index.vue +++ b/src/views/liswork/components/othersResult/index.vue @@ -171,7 +171,10 @@ const getOthersInfo = () => { watch(() => props.queryParams, (newValue) => { getOthersInfo() -}, { immediate: true }) +}, { + immediate: true, + deep: true +}) // 获取明细 const handleRowClick = (row: any) => { diff --git a/src/views/liswork/components/reexamination/index.vue b/src/views/liswork/components/reexamination/index.vue index 5e9c0ea..c2e7e64 100644 --- a/src/views/liswork/components/reexamination/index.vue +++ b/src/views/liswork/components/reexamination/index.vue @@ -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) } diff --git a/src/views/liswork/components/resultGraph/index.vue b/src/views/liswork/components/resultGraph/index.vue index ef4ace5..a120b5f 100644 --- a/src/views/liswork/components/resultGraph/index.vue +++ b/src/views/liswork/components/resultGraph/index.vue @@ -43,7 +43,10 @@ const getResultGraph = () => { watch(() => props.queryParams, (newValue) => { getResultGraph() -}, { immediate: true }) +}, { + immediate: true, + deep: true +}) \ No newline at end of file diff --git a/src/views/liswork/labItem/tab/base/Basic.vue b/src/views/liswork/labItem/tab/base/Basic.vue index 0fbb769..22f79ed 100644 --- a/src/views/liswork/labItem/tab/base/Basic.vue +++ b/src/views/liswork/labItem/tab/base/Basic.vue @@ -45,7 +45,7 @@ - + 停用 @@ -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 - required: false - } -}); +// const props = defineProps({ +// dataList: { +// type: Object , //Object as PropType +// required: false +// } +// }); +const modelParam = defineModel() const formRef = ref(); const formData = ref({}); @@ -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 +}) + diff --git a/src/views/liswork/labItem/tab/commonDescriptions.vue b/src/views/liswork/labItem/tab/commonDescriptions.vue index cefb99a..49943eb 100644 --- a/src/views/liswork/labItem/tab/commonDescriptions.vue +++ b/src/views/liswork/labItem/tab/commonDescriptions.vue @@ -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() const tableRef = ref(); const tableList = ref>([]) @@ -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 +}) diff --git a/src/views/liswork/labItem/tab/referenceValueDetails.vue b/src/views/liswork/labItem/tab/referenceValueDetails.vue index 72a0102..3340571 100644 --- a/src/views/liswork/labItem/tab/referenceValueDetails.vue +++ b/src/views/liswork/labItem/tab/referenceValueDetails.vue @@ -73,7 +73,7 @@ @@ -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() const optionsXb = [ {value: '1' ,label: '男'}, @@ -126,14 +128,15 @@ const bblxOptions = ref>([]); const tableRefUp = ref(); const tableRefDown = ref(); -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 +}) + diff --git a/src/views/liswork/labItem/tab/useInstr.vue b/src/views/liswork/labItem/tab/useInstr.vue index ff20f7f..e339d71 100644 --- a/src/views/liswork/labItem/tab/useInstr.vue +++ b/src/views/liswork/labItem/tab/useInstr.vue @@ -14,16 +14,16 @@ - + @@ -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, - required: true, - default: () => [] - }, - formData: { - type: Object, - required: false, - default: {} - } -}); - +// const props = defineProps({ +// formData: { +// type: Object, +// required: false, +// default: {} +// } +// }); +const modelParam = defineModel() //const yq = ref(''); const tableRef = ref(); const yqList = ref>([]); 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({ 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 +}) + \ No newline at end of file diff --git a/src/views/liswork/micro/index.vue b/src/views/liswork/micro/index.vue index a454a33..86fe029 100644 --- a/src/views/liswork/micro/index.vue +++ b/src/views/liswork/micro/index.vue @@ -9,24 +9,20 @@
-
- - - -
- -
- - - -
+ + +
- + @@ -63,26 +59,23 @@ - + :userList="userList" @fetchLabResults="resultsHandle" @changeStatus="changeStatus" + @previewHandle="previewHandle" /> - - + - + - -
@@ -95,14 +88,16 @@ - - + + + + activeTabMap[activeTab.value as keyof typeof activeTabMap] || 'LabPatList'); @@ -249,9 +249,7 @@ const searchText = ref('') const rules = ref([]) const instrGroupOptions = ref([]) 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) { diff --git a/src/views/liswork/micro/labpat.vue b/src/views/liswork/micro/labpat.vue index 3e71883..f04d818 100644 --- a/src/views/liswork/micro/labpat.vue +++ b/src/views/liswork/micro/labpat.vue @@ -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(); diff --git a/src/views/liswork/micro/labresult/byj.vue b/src/views/liswork/micro/labresult/byj.vue deleted file mode 100644 index 56f939b..0000000 --- a/src/views/liswork/micro/labresult/byj.vue +++ /dev/null @@ -1,92 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/views/liswork/micro/labresult/cbReport.vue b/src/views/liswork/micro/labresult/cbReport.vue index 3a2f38b..70ac4f8 100644 --- a/src/views/liswork/micro/labresult/cbReport.vue +++ b/src/views/liswork/micro/labresult/cbReport.vue @@ -1,22 +1,18 @@ - -
- 二报人:{{ formatUser(erInfo?.confirmer) }}    报告时间:{{ erInfo?.confirmdt - }}   + 初报人:{{ formatUser(cbInfo?.confirmer) }} + 报告时间: {{ cbInfo?.confirmdt }}
-
{{ erInfo?.jgbz == '2' ? '已二报' : '' }}
+
{{ cbInfo?.jgbz == '2' ? '已初报' : '' }}
+
- 二报审核 - 取消审核 - 新增 - 删除 - 取消审核 + 新增 + 删除 + 组合项目 打印 预览 @@ -122,7 +118,13 @@ {{ formatDict(row.germclass, 'germclass') }} - +
+
+ 二报人:{{ formatUser(erInfo?.confirmer) }} + 报告时间:{{ erInfo?.confirmdt }} +
+
{{ erInfo?.jgbz == '2' ? '已二报' : '' }}
+
@@ -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) => { \ No newline at end of file diff --git a/src/views/liswork/micro/labresult/components/commentDialog.vue b/src/views/liswork/micro/labresult/components/commentDialog.vue new file mode 100644 index 0000000..0dcaf86 --- /dev/null +++ b/src/views/liswork/micro/labresult/components/commentDialog.vue @@ -0,0 +1,89 @@ + + + + + \ No newline at end of file diff --git a/src/views/liswork/micro/labresult/components/pyjDict.vue b/src/views/liswork/micro/labresult/components/pyjDict.vue new file mode 100644 index 0000000..e0271d6 --- /dev/null +++ b/src/views/liswork/micro/labresult/components/pyjDict.vue @@ -0,0 +1,161 @@ + + + + + \ No newline at end of file diff --git a/src/views/liswork/micro/labresult/pyj.vue b/src/views/liswork/micro/labresult/pyj.vue new file mode 100644 index 0000000..0bc6896 --- /dev/null +++ b/src/views/liswork/micro/labresult/pyj.vue @@ -0,0 +1,208 @@ + + + + + \ No newline at end of file diff --git a/src/views/liswork/micro/labresult/zbReport.vue b/src/views/liswork/micro/labresult/zbReport.vue index 13cbdbd..31ef8a5 100644 --- a/src/views/liswork/micro/labresult/zbReport.vue +++ b/src/views/liswork/micro/labresult/zbReport.vue @@ -4,52 +4,55 @@ 审核 取消审核 - 新增 - 删除 - 组合项目 + 新增 + 删除 + 组合项目
- - - - - - - - - + + + + + + + + + + +
@@ -59,23 +62,23 @@ 抗生素({{ ymTableData.length }})项 @@ -111,22 +114,31 @@
+ + + @@ -152,6 +164,22 @@ + + + + + + + + + + + + + + + @@ -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, + 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(() => [ + { 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] ?? ''; } diff --git a/src/views/liswork/work/components/CheckUser.vue b/src/views/liswork/work/components/CheckUser.vue index 25a7348..d1c1280 100644 --- a/src/views/liswork/work/components/CheckUser.vue +++ b/src/views/liswork/work/components/CheckUser.vue @@ -1,7 +1,7 @@