检验项目基本参数界面

This commit is contained in:
jiangs 2025-10-31 18:06:12 +08:00
parent 72dcbd0ff6
commit 3417b2fdbc
3 changed files with 66 additions and 112 deletions

98
src/types/Object.d.ts vendored
View File

@ -26,56 +26,56 @@ export class LabInstr {
}
export class XmInfoNew {
xmid: string; //项目ID
xmdh: string; //项目代号
xmmc: string; //项目名称
cksx: number;//参考值上限
ckxx: number;//参考值下限
dw: string; //单位
dyckz: string; //对应参考值
dyxh: number; //对应序号
xmlb: string; //项目类别
jsxm: string; //计算项目
yqdl: string; //仪器大类
val1: string; //备用1
val2: string; //备用2
val3: string; //备用3
val4: string; //备用4
val5: string; //备用5
uflag: string; //是否无效
xmid?: string; //项目ID
xmdh?: string; //项目代号
xmmc?: string; //项目名称
cksx?: number;//参考值上限
ckxx?: number;//参考值下限
dw?: string; //单位
dyckz?: string; //对应参考值
dyxh?: number; //对应序号
xmlb?: string; //项目类别
jsxm?: string; //计算项目
yqdl?: string; //仪器大类
val1?: string; //备用1
val2?: string; //备用2
val3?: string; //备用3
val4?: string; //备用4
val5?: string; //备用5
uflag?: boolean; //是否无效
cp_jgz?: string;
jgbz: string;
jgz: string;
xmgl: string;
mrz: string;
qccv: string;
xsbs: string;
whocode: string;
germflag: string;
yymc: string;
knowledge: string;
xsws: string;
dylx: string;
zhbdh: string;
bgdh: string;
jg: string;
zjf: string;
csff: string;
fzdyxh: number;
itemclass: string;
jsgs: string;
ygxb: string;
ygnl: string;
ygbb: string;
ygzq: string;
ygzd: string;
sjx: string;
xjx: string;
jgjg: string;
hlimt: string;
llimit: string;
redoxx: string;
redosx: string;
jgbz?: string;
jgz?: string;
xmgl?: string;
mrz?: string;
qccv?: string;
xsbs?: string;
whocode?: string;
germflag?: string;
yymc?: string;
knowledge?: string;
xsws?: number;
dylx?: string;
zhbdh?: string;
bgdh?: string;
jg?: number;
zjf?: string;
csff?: string;
fzdyxh?: number;
itemclass?: string;
jsgs?: string;
ygxb?: string;
ygnl?: string;
ygbb?: string;
ygzq?: string;
ygzd?: string;
sjx?: string;
xjx?: string;
jgjg?: string;
hlimt?: string;
llimit?: string;
redoxx?: string;
redosx?: string;
}
// 定义菜单项的类型

View File

@ -76,7 +76,7 @@
<tabView :tabList="tabList" v-model:activeTab="activeTab" />
<div class="tabDiv">
<template v-if="activeTab === 1">
<Basic :visible="true"/>
<Basic :visible="true" :dataList="basicTabData"/>
</template>
<template v-if="activeTab === 2">
<CommmonlyValues :visible="true"/>
@ -209,7 +209,6 @@ const yqdlFields = ref([
{ prop: 'value', label: '代号', width: 80, enablePinyinSearch: true },
{ prop: 'label', label: '名称', width: 150, enablePinyinSearch: true },
])
const yqdlList = ref<Array<any>>()
//tab页数据
const basicTabData = ref<XmInfoNew>();
@ -229,21 +228,13 @@ const getYqConfig = () => {
//获取表格数据
const getList = () => {
console.log('queryParams',queryParams.value);
queryXmInfoNewService(queryParams.value).then((res: any) => {
dataList.value = res.rows;
dataList.value = res.data;
})
}
onMounted(async () => {
// 初始化数据
// const dictRefs = await comDict('XMGL','ITEMCLASS', 'YQDL');
// // 从 ref 中获取实际数据
// dictData.value = {
// XMGL: toRaw(dictRefs.XMGL.value) || [],
// ITEMCLASS: toRaw(dictRefs.ITEMCLASS.value) || [],
// YQDL: toRaw(dictRefs.YQDL.value) || [],
// XMLB: xmlbList.value || []
// };
getDictData('XMGL','ITEMCLASS', 'YQDL');
getList()
getYqConfig();

View File

@ -167,8 +167,8 @@
</template>
<script setup lang="ts">
import { XmInfoNew,DictData } from '@/types';
import { formatDict,getDictData } from '@/hooks';
import { ref, computed, onMounted, PropType } from 'vue';
const props = defineProps({
//是否显示
@ -176,61 +176,16 @@ const props = defineProps({
type: Boolean,
required: true,
default: false
},
dataList: {
type: Object , //Object as PropType<XmInfoNew>
required: false
}
});
const formRef = ref();
const formData = ref<XmInfoNew>({
xmgl: '',
xmdh: '',
xmmc: '',
dw: '',
xmlb: '',
mrz: '',
yqdl: '',
qccv: '',
xsbs: '',
whocode: '',
germflag: '',
yymc: '',
xmid: '',
uflag: false,
knowledge: '',
xsws: 0,
dylx: '',
zhbdh: '',
bgdh: '',
jg: 0,
zjf: '',
csff: '',
fzdyxh: 0,
itemclass: '',
ckxx: '',
cksx: '',
dyckz: '',
jsgs: '',
ygxb: false,
ygnl: false,
ygbb: false,
ygzq: false,
ygzd: false,
jsxm: false,
sjx: '',
xjx: '',
jgjg: '',
cp_jgz: '',
hlimt: '',
llimit: '',
redoxx: '',
redosx: '',
val1: '',
val2: '',
val3: '',
val4: '',
val5: ''
}
);
const formData = ref<any>({});
computed(() => {
switch(formData.value.jgbz){
@ -243,6 +198,14 @@ computed(() => {
}
});
watch(
() => props.dataList,
(newVal, oldVal) => {
formData.value = newVal;
}
);
onMounted(() => {
getDictData('XMGL');
})