diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1da1977..9b06f24 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -92,6 +92,9 @@ importers: vue3-print-nb: specifier: ^0.1.4 version: 0.1.4(typescript@5.9.3) + vue3-seamless-scroll: + specifier: ^3.0.2 + version: 3.0.2(vue@3.5.23(typescript@5.9.3)) vue3-select2-component: specifier: ^0.1.7 version: 0.1.7 @@ -2711,6 +2714,9 @@ packages: vue3-print-nb@0.1.4: resolution: {integrity: sha512-LExI7viEzplR6ZKQ2b+V4U0cwGYbVD4fut/XHvk3UPGlT5CcvIGs6VlwGp107aKgk6P8Pgx4rco3Rehv2lti3A==} + vue3-seamless-scroll@3.0.2: + resolution: {integrity: sha512-LpKoL1ht71MASabUBsoSqbhLqcuKSrD+u01dgHac+/cthPAShKvcdM7dSGtaxjVntSFqdeViqJssjcwy/KqRSA==} + vue3-select2-component@0.1.7: resolution: {integrity: sha512-8UPZmFl02I47XwW+j8ICmHyAND8wfbavlvMrqh10wwdSVER1aF2kI9XCmfIrNlVQvxSbvc0mJjWQAHHSCW9dkw==} @@ -5611,6 +5617,13 @@ snapshots: transitivePeerDependencies: - typescript + vue3-seamless-scroll@3.0.2(vue@3.5.23(typescript@5.9.3)): + dependencies: + element-plus: 2.11.5(vue@3.5.23(typescript@5.9.3)) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + vue3-select2-component@0.1.7: dependencies: jquery: 3.7.1 diff --git a/src/hooks/lisData/dictData.ts b/src/hooks/lisData/dictData.ts index f729bd2..b27c1d4 100644 --- a/src/hooks/lisData/dictData.ts +++ b/src/hooks/lisData/dictData.ts @@ -25,6 +25,7 @@ export const getDictData = async (...args: string[]) => { if(dictRefs.ITEMCLASS != undefined) dictData.value.ITEMCLASS = toRaw(dictRefs.ITEMCLASS.value) || [] if(dictRefs.YQDL != undefined) dictData.value.YQDL = toRaw(dictRefs.YQDL.value) || [] if(dictRefs.VA != undefined) dictData.value.VA = toRaw(dictRefs.VA.value) || [] + if(dictRefs.LF != undefined) dictData.value.LF = toRaw(dictRefs.LF.value) || [] } //字典数据格式化方法 diff --git a/src/types/Object.d.ts b/src/types/Object.d.ts index 6ac3fa5..4645edc 100644 --- a/src/types/Object.d.ts +++ b/src/types/Object.d.ts @@ -15,6 +15,8 @@ export interface DictData { YQDL?: Array; xmlbList?: Array; YQ?: Array; + VA?: Array; + LF?: Array; [key: string]: any[] | undefined; // 添加索引签名以支持动态访问 } diff --git a/src/views/liswork/labItem/index.vue b/src/views/liswork/labItem/index.vue index 0336ad8..b18447f 100644 --- a/src/views/liswork/labItem/index.vue +++ b/src/views/liswork/labItem/index.vue @@ -85,7 +85,7 @@ \ No newline at end of file diff --git a/src/views/liswork/labItem/tab/base/Basic.vue b/src/views/liswork/labItem/tab/base/Basic.vue index d581175..0fbb769 100644 --- a/src/views/liswork/labItem/tab/base/Basic.vue +++ b/src/views/liswork/labItem/tab/base/Basic.vue @@ -286,10 +286,11 @@ const conditionClick = () => { } -onMounted(() => { - getDictData('XMGL'); +onActivated(async () => { + await getDictData('XMGL'); }) + diff --git a/src/views/liswork/labItem/tab/useInstr.vue b/src/views/liswork/labItem/tab/useInstr.vue index fc5da48..f737463 100644 --- a/src/views/liswork/labItem/tab/useInstr.vue +++ b/src/views/liswork/labItem/tab/useInstr.vue @@ -2,10 +2,11 @@
- 筛选: + 新增 + 删除
- +
@@ -16,19 +17,21 @@ import { LabInstr } from '@/types'; import { ref } from 'vue' const props = defineProps({ - // 是否显示 + // 显示数据 dataList: { - type: Array, + type: Array, required: true, default: () => [] } }); -const yq = ref(''); -const tableRef = ref(null); -const yqList = ref>(props.dataList); + + +//const yq = ref(''); +const tableRef = ref(); +const yqList = ref([]); const columns = ref([ - { prop: 'xz', label: '选择', visible: true, align: 'center', width: 50,type: 'selection' }, + { prop: 'xz', label: '选择', visible: true, align: 'center', width: 50 }, { prop: 'yq', label: '仪器代号', visible: true, align: 'center', width: 150 }, { prop: 'yqmc', label: '仪器名称', visible: true, align: 'center', width: 200}, { prop: 'xs', label: '调整系数', visible: true, align: 'center', width: 100 }, @@ -43,10 +46,10 @@ const tableConfig = ref({ //退拽属性 -// const handleColumnDragEnd = (data: any) => { -// // 更新列配置 -// columns.value = data.columns; -// } +const handleColumnDragEnd = (data: any) => { + // 更新列配置 + columns.value = data.columns; +} const handInputChange = () => { // yqList.value = yqList.value.filter(item => { @@ -57,7 +60,15 @@ const handInputChange = () => { // } } -onMounted(() =>{ +const onClickAdd = () => { +} + +const onClickDel = () => { + +} + +onActivated(() =>{ + yqList.value = props.dataList; }) \ No newline at end of file