63 lines
1.7 KiB
Vue
Raw Normal View History

2025-10-21 17:43:57 +08:00
<template>
<!-- 使用仪器 -->
2025-11-04 17:54:29 +08:00
<div>
2025-10-31 15:22:51 +08:00
<div>
<span>筛选:</span><input v-model="yq" style="width: 240px;" @change="handInputChange">
</div>
2025-11-07 17:50:06 +08:00
<!-- <CustomTable ref="tableRef" :data="yqList" :columns="columns" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
:config="tableConfig"/> -->
2025-10-28 16:22:44 +08:00
</div>
2025-10-21 17:43:57 +08:00
</template>
2025-10-24 15:37:24 +08:00
<script setup lang="ts">
2025-10-28 16:22:44 +08:00
import CustomTable from '@/components/elTable/index.vue'
2025-10-31 15:22:51 +08:00
import { LabInstr } from '@/types';
2025-11-07 17:50:06 +08:00
import { ref } from 'vue'
2025-10-21 17:43:57 +08:00
const props = defineProps({
2025-10-28 16:22:44 +08:00
// 是否显示
2025-10-31 15:22:51 +08:00
dataList: {
type: Array<LabInstr>,
required: true,
default: () => []
2025-10-21 17:43:57 +08:00
}
});
2025-10-28 16:22:44 +08:00
2025-10-31 15:22:51 +08:00
const yq = ref<string>('');
2025-10-28 16:22:44 +08:00
const tableRef = ref<any>(null);
2025-10-31 15:22:51 +08:00
const yqList = ref<Array<LabInstr>>(props.dataList);
2025-10-28 16:22:44 +08:00
const columns = ref([
2025-10-31 15:22:51 +08:00
{ prop: 'xz', label: '选择', visible: true, align: 'center', width: 50,type: 'selection' },
{ prop: 'yq', label: '仪器代号', visible: true, align: 'center', width: 150 },
{ prop: 'yqmc', label: '仪器名称', visible: true, align: 'center', width: 200},
2025-10-28 16:22:44 +08:00
{ prop: 'xs', label: '调整系数', visible: true, align: 'center', width: 100 },
{ prop: 'zkxm', label: '质控', visible: true, align: 'center', width: 100 }
]);
const tableConfig = ref({
border: true, // 边框
height: '85vh', // 高度
highlightCurrentRow: true, // 高亮当前行
// cellStyle: cellStyleHd
})
//退拽属性
2025-11-07 17:50:06 +08:00
// const handleColumnDragEnd = (data: any) => {
// // 更新列配置
// columns.value = data.columns;
// }
2025-10-31 15:22:51 +08:00
const handInputChange = () => {
2025-11-07 17:50:06 +08:00
// yqList.value = yqList.value.filter(item => {
// return item.yq.includes(yq.value) || item.yqmc.includes(yq.value);
// });
// if (yq.value === '') {
// yqList.value = props.dataList;
// }
2025-10-31 15:22:51 +08:00
}
onMounted(() =>{
})
2025-10-21 17:43:57 +08:00
</script>