Compare commits

..

No commits in common. "dde3c944ed80cfe0f06cfa209f4425ba6fdc939c" and "75b2b750658242241a1f37e85a868234a2e3cc62" have entirely different histories.

8 changed files with 115 additions and 164 deletions

View File

@ -85,22 +85,3 @@ 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
})
}

View File

@ -120,7 +120,6 @@ export class XmValNew {
}
export class XmInfoVs {
vsid?: number;
yq: string;
xmid: number;
xs?: number;

View File

@ -101,7 +101,6 @@ 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' },
@ -210,7 +209,6 @@ const modelParam = ref<any>({
commonDescriptionsData: [],
referenceValueDetailsData: []
})
const basic = ref<boolean>(false)
@ -258,25 +256,6 @@ 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: [],
@ -289,14 +268,7 @@ 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) => {
@ -317,22 +289,59 @@ const rowChange = async (row: any) => {
selectRow.value = row;
const res = await queryXmInfoNewDetailService(row.xmid,row.yq,row.xmdh)
selectDetailRow.value = res.data
console.log('选中行明细数据:',selectDetailRow.value)
console.log('明细数据:', res);
changeActiveTab()
}
//tab变化
const updateActive = () => {
changeActiveTab()
changeActiveTab()
}
const changeActiveTab = () => {
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 || []);
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.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;
}
}
</script>

View File

@ -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: modelParam.value.basicData.xmid,
xmid: props.formData.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:modelParam.value.basicData.xmid,xh:selectRow.value.xh})
emit('refreshTabData',modelParam.value.basicData)
await delXmValNewService({xmid:props.formData.xmid,xh:selectRow.value.xh})
emit('refreshTabData',props.formData)
}
@ -114,10 +114,6 @@ onActivated(async ()=>{
tableList.value = modelParam.value.commonlyValuesData || []
})
defineExpose({
commonlyValuesData: tableList
})
</script>

View File

@ -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.basicData};
formData.value = {...newVal };
},
{ immediate: true,deep: true }
);
@ -292,11 +292,6 @@ onActivated(async () => {
await getDictData('XMGL');
})
defineExpose({
basicData: formData
})
</script>

View File

@ -20,17 +20,18 @@ 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({
// formData: {
// type: Object,
// default: {}
// }
// });
const modelParam = defineModel<any>()
const props = defineProps({
dataList: {
type: Array,
default: () => []
},
formData: {
type: Object,
default: {}
}
});
const tableRef = ref();
const tableList = ref<Array<XmTextresultNew>>([])
@ -52,21 +53,12 @@ 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
}
@ -74,8 +66,8 @@ const rowClick = (row:any) => {
const onAddClick = () => {
const newData: XmTextresultNew = {
xmid: modelParam.value.basicData.xmid,
xmdh: modelParam.value.basicData.xmdh,
xmid: props.formData.xmid,
xmdh: props.formData.xmdh,
xh: maxXh.value + 1
}
tableList.value.push(newData)
@ -85,13 +77,19 @@ 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)
await delXmTextresultNew({xmid:modelParam.value.basicData.xmid,xh:selectRow.value.xh})
emit('refreshTabData',modelParam.value.basicData)
tableList.value = tableList.value.filter((item:any) => item.xh != selectRow.value.xh)
}
}
watch(
() => props.dataList,
(newVal:any) => {
tableList.value = newVal;
}
);
defineExpose({
commonDescriptionsData: tableList
})

View File

@ -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,14 +95,12 @@ 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 modelParam = defineModel<any>()
const props = defineProps({
dataList: {
type: Array,
default: []
}
});
const optionsXb = [
{value: '1' ,label: '男'},
@ -128,15 +126,14 @@ const bblxOptions = ref<Array<{ zddh: string; zdmc: string }>>([]);
const tableRefUp = ref<any>();
const tableRefDown = ref<any>();
const dataListUp = ref();
const dataListUp = ref(props.dataList);
const dataListDown = ref();
const columnsUp = ref([
{ prop: 'xmid', label: 'xmid', visible: false, align: 'center'},
{ prop: 'xh', label: '序号', visible: false, align: 'center' },
{ prop: 'xh', label: '序号', visible: false, align: 'center', width: 70 },
{ prop: 'xb', label: '性别', visible: true, align: 'center',slot: 'xb', width: 70 },
{ prop: 'nl1', label: '年龄下限', visible: true, align: 'center',slot:'cp_nl1', width: 100 },
{ prop: 'cp_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: 'nl2', label: '年龄上限', visible: true, align: 'center',slot: 'cp_nl2', width: 100 },
{ prop: 'cp_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 },
@ -183,18 +180,9 @@ 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)

View File

@ -14,16 +14,16 @@
<el-input v-model="row.xs" class="full-width-input"/>
</template>
<template #zkxm="{row}">
<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>
<el-checkbox v-model="row.zkxm" />
</template>
<template #cksx="{row}">
<el-input v-model="row.cksx" class="full-width-input"></el-input>
</template>
<template #ckxx="{row}">
<el-input v-model="row.ckxx" class="full-width-input"></el-input>
</template>
<template #dyckz="{row}">
<el-input :model-value="getDyckz(row)" disabled class="full-width-input"></el-input>
<el-input v-model="row.dyckz" class="full-width-input"></el-input>
</template>
</CustomTable>
</div>
@ -35,28 +35,32 @@ 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({
// formData: {
// type: Object,
// required: false,
// default: {}
// }
// });
const props = defineProps({
// 显示数据
dataList: {
type: Array<XmInfoVs>,
required: true,
default: () => []
},
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: 'ckxx', label: '参考下限', visible: true, align: 'center',slot: 'ckxx', width: 100 },
{ prop: 'cksx', label: '参考上限', visible: true, align: 'center',slot: 'cksx', width: 100 },
{ prop: 'ckxx', label: '参考下限', visible: true, align: 'center',slot: 'ckxx', width: 100 },
{ prop: 'dyckz', label: '打印参考值', visible: true, align: 'center',slot: 'dyckz', width: 100 },
]);
const tableConfig = ref({
@ -70,15 +74,6 @@ 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) => {
@ -98,7 +93,7 @@ const handInputChange = () => {
const onClickAdd = () => {
const newData: XmInfoVs = {
yq: '',
xmid: modelParam.value.basicData.xmid,
xmid: props.formData.xmid,
}
yqList.value.push(newData)
}
@ -111,8 +106,7 @@ const onClickDel = async () => {
cancelButtonText: '取消',
type: 'warning',
});
await deleteXmInfoVs({vsid:selectRow.value.vsid || 0})
emit('refreshTabData',modelParam.value.basicData)
yqList.value = yqList.value.filter(item => item.yq != selectRow.value.yq);
}
}
@ -120,17 +114,8 @@ 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({