检验项目模块
This commit is contained in:
parent
fe03afe569
commit
63a04f037c
@ -85,3 +85,22 @@ export function delXmValNewService(query:any){
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//删除常见描述
|
||||
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
|
||||
})
|
||||
}
|
||||
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;
|
||||
|
||||
@ -101,6 +101,7 @@ 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' },
|
||||
@ -209,6 +210,7 @@ const modelParam = ref<any>({
|
||||
commonDescriptionsData: [],
|
||||
referenceValueDetailsData: []
|
||||
})
|
||||
const basic = ref<boolean>(false)
|
||||
|
||||
|
||||
|
||||
@ -256,6 +258,25 @@ const handleDelCorr = () => {
|
||||
|
||||
//保存
|
||||
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: [],
|
||||
@ -268,7 +289,14 @@ const handleSave = async () => {
|
||||
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) => {
|
||||
@ -289,7 +317,7 @@ 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()
|
||||
}
|
||||
|
||||
@ -300,48 +328,11 @@ const updateActive = () => {
|
||||
|
||||
|
||||
const changeActiveTab = () => {
|
||||
switch(activeTab.value){
|
||||
case 'Basic':
|
||||
if(selectDetailRow.value.xmInfoNew){
|
||||
modelParam.value = toRaw(selectDetailRow.value.xmInfoNew || {});
|
||||
// basicData.value = tableTabRef.value.basicData || []
|
||||
}else{
|
||||
//basicData.value = []
|
||||
}
|
||||
break;
|
||||
case 'CommonlyValues':
|
||||
if(selectDetailRow.value.xmValNewRows){
|
||||
console.log('selectDetailRow.value.xmValNewRows',selectDetailRow.value.xmValNewRows)
|
||||
modelParam.value.basicData = toRaw(selectDetailRow.value.xmInfoNew || {});
|
||||
modelParam.value.commonlyValuesData = toRaw(selectDetailRow.value.xmValNewRows || []);
|
||||
}else{
|
||||
modelParam.value.commonlyValuesData = []
|
||||
}
|
||||
break;
|
||||
case 'UseInstr':
|
||||
if(selectDetailRow.value.xmInfoVsRows.length){
|
||||
tabDataList.value = selectDetailRow.value.xmInfoVsRows[0] || [];
|
||||
}else{
|
||||
tabDataList.value = []
|
||||
}
|
||||
break;
|
||||
case 'Knowledge':
|
||||
//tabDataList.value = res.data.xmInfoVsRows[0];
|
||||
case 'Sort':
|
||||
case 'CommonDescriptions':
|
||||
if(selectDetailRow.value.xmTextresultNewRows.length){
|
||||
tabDataList.value = selectDetailRow.value.xmTextresultNewRows[0] || [];
|
||||
}else{
|
||||
tabDataList.value = []
|
||||
}
|
||||
break;
|
||||
case 'ReferenceValueDetails':
|
||||
if(selectDetailRow.value.xmRefNewRows.length){
|
||||
tabDataList.value = selectDetailRow.value.xmRefNewRows[0] || [];
|
||||
}else{
|
||||
tabDataList.value = []
|
||||
}
|
||||
break;
|
||||
}
|
||||
modelParam.value.userInstrData = toRaw(selectDetailRow.value.xmInfoVsRows || []);
|
||||
modelParam.value.commonDescriptionsData = toRaw(selectDetailRow.value.xmTextresultNewRows || []);
|
||||
modelParam.value.referenceValueDetailsData = toRaw(selectDetailRow.value.xmRefNewRows || []);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@ -30,12 +30,12 @@ import { dictData,getDictData } from '@/hooks';
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
import {delXmValNewService} from '@/api/liswork/labItem/labItemApi'
|
||||
|
||||
const props = defineProps({
|
||||
formData: {
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
});
|
||||
// const props = defineProps({
|
||||
// formData: {
|
||||
// type: Object,
|
||||
// default: {}
|
||||
// }
|
||||
// });
|
||||
|
||||
const modelParam = defineModel<any>()
|
||||
const emit = defineEmits(['refreshTabData'])
|
||||
@ -78,7 +78,7 @@ const maxXh = computed(() => {
|
||||
|
||||
const bClickAdd = () => {
|
||||
const newData = {
|
||||
xmid: props.formData.xmid,
|
||||
xmid: modelParam.value.basicData.xmid,
|
||||
qz: '',
|
||||
srm: '',
|
||||
jgbz: '',
|
||||
@ -94,8 +94,8 @@ const bClickDel = async () => {
|
||||
{confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'});
|
||||
//删掉界面上面的数据
|
||||
//tableList.value = tableList.value?.filter((item:any) => item.xh != selectRow.value.xh );
|
||||
await delXmValNewService({xmid:props.formData.xmid,xh:selectRow.value.xh})
|
||||
emit('refreshTabData',props.formData)
|
||||
await delXmValNewService({xmid:modelParam.value.basicData.xmid,xh:selectRow.value.xh})
|
||||
emit('refreshTabData',modelParam.value.basicData)
|
||||
}
|
||||
|
||||
|
||||
@ -114,6 +114,10 @@ onActivated(async ()=>{
|
||||
tableList.value = modelParam.value.commonlyValuesData || []
|
||||
})
|
||||
|
||||
defineExpose({
|
||||
commonlyValuesData: tableList
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@ -164,12 +164,12 @@ 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>()
|
||||
|
||||
@ -251,7 +251,7 @@ const ygxbCheck = computed({
|
||||
watch(
|
||||
() => modelParam.value,
|
||||
(newVal:any) => {
|
||||
formData.value = {...newVal };
|
||||
formData.value = {...newVal.basicData};
|
||||
},
|
||||
{ immediate: true,deep: true }
|
||||
);
|
||||
@ -292,6 +292,11 @@ onActivated(async () => {
|
||||
await getDictData('XMGL');
|
||||
})
|
||||
|
||||
|
||||
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,13 @@ 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
|
||||
})
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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,8 +120,17 @@ 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({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user