检验项目基本参数界面

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

View File

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

View File

@ -167,8 +167,8 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { XmInfoNew,DictData } from '@/types';
import { formatDict,getDictData } from '@/hooks'; import { formatDict,getDictData } from '@/hooks';
import { ref, computed, onMounted, PropType } from 'vue';
const props = defineProps({ const props = defineProps({
//是否显示 //是否显示
@ -176,61 +176,16 @@ const props = defineProps({
type: Boolean, type: Boolean,
required: true, required: true,
default: false default: false
},
dataList: {
type: Object , //Object as PropType<XmInfoNew>
required: false
} }
}); });
const formRef = ref(); const formRef = ref();
const formData = ref<XmInfoNew>({ const formData = ref<any>({});
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: ''
}
);
computed(() => { computed(() => {
switch(formData.value.jgbz){ switch(formData.value.jgbz){
@ -243,6 +198,14 @@ computed(() => {
} }
}); });
watch(
() => props.dataList,
(newVal, oldVal) => {
formData.value = newVal;
}
);
onMounted(() => { onMounted(() => {
getDictData('XMGL'); getDictData('XMGL');
}) })