This commit is contained in:
wyuu 2025-11-04 17:58:18 +08:00
commit 0c77a93fb3
10 changed files with 72 additions and 111 deletions

View File

@ -73,48 +73,17 @@
</el-col>
<!-- 右侧区域-->
<el-col :span="10" :xs="24">
<tabView :tabList="tabList" v-model:activeTab="activeTab" />
<KeepAlive>
<component :is="activeTabN"></component>
<component :is="activeTabN" :dataList="tabDataList"></component>
</KeepAlive>
<!-- {{ activeTab }} -->
<div class="tabDiv">
<template v-if="activeTab === 1">
<Basic :visible="true" :dataList="basicTabData"/>
</template>
<template v-if="activeTab === 2">
<CommmonlyValues :visible="true"/>
</template>
<template v-if="activeTab === 3">
<UseInstr :visible="true" :dataList="instrOptions"/>
</template>
<template v-if="activeTab === 4">
<Knowledge :visible="true"/>
</template>
<template v-if="activeTab === 5">
<Sort :visible="true"/>
</template>
<template v-if="activeTab === 6">
<CommonDescriptions :visible="true"/>
</template>
<template v-if="activeTab === 7">
<Parameter :visible="true"/>
</template>
<template v-if="activeTab === 8">
<ChannelNumber :visible="true"/>
</template>
<template v-if="activeTab === 9">
<ReferenceValueDetails :visible="true"/>
</template>
</div>
</el-col>
</el-row>
</div>
</template>
<script setup lang="ts">
import { onMounted, ref,toRaw } from 'vue';
import { onMounted, ref, toRaw, computed } from 'vue';
import Basic from './tab/base/Basic.vue'
import CommmonlyValues from './tab/CommmonlyValues.vue'
import UseInstr from './tab/UseInstr.vue'
@ -161,42 +130,28 @@ const itemclassFields = ref([
])
const instrOptions = ref<LabInstr[]>([])
const tabList = ref([
{ label: '基本资料', value: 1 },
{ label: '常用取值', value: 2 },
{ label: '使用仪器', value: 3 },
{ label: '知识库', value: 4 },
{ label: '整体排序', value: 5 },
{ label: '常见描述', value: 6 },
{ label: '基本资料', value: 'Basic' },
{ label: '常用取值', value: 'CommmonlyValues' },
{ label: '使用仪器', value: 'UseInstr' },
{ label: '知识库', value: 'Knowledge' },
{ label: '整体排序', value: 'Sort' },
{ label: '常见描述', value: 'CommonDescriptions' },
// { label: '参数', value: 7 },
// { label: '通道号', value: 8 },
{ label: '参考值明细', value: 9 },
{ label: '参考值明细', value: 'ReferenceValueDetails' },
]);
const activeTab = ref('Basic')
const activeTabMap = {
Basic,
CommmonlyValues,
UseInstr,
Knowledge,
Sort,
CommonDescriptions,
ReferenceValueDetails
}
const activeTabN = computed(() => activeTabMap[0])
// const activeTabName = computed(()=> {
// switch(activeTab.value){
// case 1:
// console.log('activeTabName:','Basic')
// return Basic;
// case 2:
// console.log('activeTabName:','CommmonlyValues')
// return CommmonlyValues;
// case 3:
// console.log('activeTabName:','UseInstr')
// return UseInstr;
// case 4:
// console.log('activeTabName:','Knowledge')
// return 'Knowledge';
// case 5:
// return 'Sort';
// }
// })
const activeTabN = computed(() => activeTabMap[activeTab.value as keyof typeof activeTabMap] || Basic);
//table表格列
const columns = ref([
@ -240,7 +195,7 @@ const yqdlFields = ref([
])
//tab页数据
const basicTabData = ref<XmInfoNew>();
const tabDataList = ref<any>();
// 仪器
const getYqConfig = () => {
@ -305,7 +260,24 @@ const changeStauts = () => {
// 选择行变化
const rowChange = (row: any) => {
queryXmInfoNewDetailService(row.xmid,row.yq,row.xmdh).then((res: any) => {
basicTabData.value = res.data.xmInfoNewRows[0];
switch(activeTab.value){
case 'Basic':
tabDataList.value = res.data.xmInfoNewRows[0];
break;
case 'CommmonlyValues':
tabDataList.value = res.data.xmValNewRows[0];
break;
case 'UseInstr':
tabDataList.value = res.data.xmInfoVsRows[0];
break;
case 'Knowledge':
//tabDataList.value = res.data.xmInfoVsRows[0];
case 'Sort':
case 'CommonDescriptions':
case 'ReferenceValueDetails':
}
console.log('明细数据:', res);
})
}

View File

@ -1,6 +1,6 @@
<template>
<!-- 基本资料 -->
<div v-show="visible">
<div>
<el-form ref="formRef" :model="formData" size="small" class="form-inline" inline label-width="80px">
<span class="text-span">基本参数:</span>
<el-divider style="margin: 5px 0;"/>
@ -175,12 +175,6 @@ import MultiRef from './child/MultiRef.vue';
import CalcGuilde from './child/CalcGuilde.vue';
const props = defineProps({
//是否显示
visible: {
type: Boolean,
required: true,
default: false
},
dataList: {
type: Object , //Object as PropType<XmInfoNew>
required: false

View File

@ -1,6 +1,6 @@
<!--通道号-->
<template>
<div v-show="visible">
<div>
<el-row>
<span>说明:“通道号”又称“接口代号”,是指仪器向电脑传送结果时项目的标识符,接口代号对于一个仪器不可重复。</span>
</el-row>

View File

@ -1,6 +1,6 @@
<!-- 常用取值 -->
<template>
<div v-show="visible">
<div>
<div class="modifyClass">
<el-button type="primary" @click="">增加</el-button>
<el-button type="primary" @click="">删除</el-button>
@ -16,11 +16,11 @@ import { ref } from 'vue';
const props = defineProps({
// 是否显示
visible: {
type: Boolean,
required: true,
default: false
}
// visible: {
// type: Boolean,
// required: true,
// default: false
// }
});
const tableRef = ref<any>(null);

View File

@ -1,6 +1,6 @@
<template>
<!-- 常见描述 -->
<div v-show="visible">
<div>
<div class="modifyClass">
<el-button type="primary" @click="">增加</el-button>
<el-button type="primary" @click="">删除</el-button>
@ -18,11 +18,11 @@ import { ref } from 'vue';
const props = defineProps({
// 是否显示
visible: {
type: Boolean,
required: true,
default: false
}
// visible: {
// type: Boolean,
// required: true,
// default: false
// }
});
const tableRef = ref<any>(null);

View File

@ -1,6 +1,6 @@
<template>
<!-- 知识库 -->
<div v-show="visible">
<div>
<CustomTable ref="tableRef" :data="dataList" :columns="columns" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
:config="tableConfig"/>
</div>
@ -13,11 +13,11 @@ import { ref } from 'vue';
const props = defineProps({
// 是否显示
visible: {
type: Boolean,
required: true,
default: false
}
// visible: {
// type: Boolean,
// required: true,
// default: false
// }
});

View File

@ -1,6 +1,6 @@
<template>
<!-- 参数设置 -->
<div v-show="visible">
<div>
<el-form ref="form" :model="formData" :rules="rules" label-width="80px" size="small" class="form-inline" inline>
<el-row>
<span>说明:公式中阴阳对照请用NC,PC表示</span>
@ -117,11 +117,11 @@ const rules = ref({
const props = defineProps({
// 是否显示
visible: {
type: Boolean,
required: true,
default: false
}
// visible: {
// type: Boolean,
// required: true,
// default: false
// }
});
</script>

View File

@ -1,6 +1,6 @@
<template>
<!--参考值明细-->
<div v-show="visible">
<div>
<div class="modifyClass">
<el-button type="primary" @click="">增加</el-button>
<el-button type="primary" @click="">删除</el-button>
@ -25,11 +25,11 @@ import { ref } from 'vue';
const props = defineProps({
// 是否显示
visible: {
type: Boolean,
required: true,
default: false
}
// visible: {
// type: Boolean,
// required: true,
// default: false
// }
});

View File

@ -1,6 +1,6 @@
<template>
<!-- 整体排序 -->
<div v-show="visible">
<div>
<div class="modifyClass">
<el-button type="primary" @click="">首位</el-button>
<el-button type="primary" @click="">↑上移</el-button>
@ -19,11 +19,11 @@ import { ref } from 'vue';
const props = defineProps({
// 是否显示
visible: {
type: Boolean,
required: true,
default: false
}
// visible: {
// type: Boolean,
// required: true,
// default: false
// }
});

View File

@ -1,6 +1,6 @@
<template>
<!-- 使用仪器 -->
<div v-show="visible">
<div>
<div>
<span>筛选:</span><input v-model="yq" style="width: 240px;" @change="handInputChange">
</div>
@ -17,11 +17,6 @@ import { ref } from 'vue';
const props = defineProps({
// 是否显示
visible: {
type: Boolean,
required: true,
default: false
},
dataList: {
type: Array<LabInstr>,
required: true,