66 lines
1.9 KiB
Vue
Raw Normal View History

2025-10-16 11:20:50 +08:00
<template>
2025-10-22 17:36:25 +08:00
<div class="bination_box">
<CustomTable ref="tableRef" :data="tableData" :columns="columns" :config="tableConfig">
<template #lxsr="{ row }">
<el-checkbox :model-value="row.lxsr == '1'" readonly />
</template>
<template #zdsr="{ row }">
<el-checkbox :model-value="row.zdsr == '1'" readonly />
</template>
</CustomTable>
2025-10-16 11:20:50 +08:00
</div>
</template>
<script setup lang="ts">
2025-10-22 17:36:25 +08:00
import { ref, watch, toRefs, onMounted, computed } from 'vue'
import { inputmdl } from "@/api/liswork/work/LisWork";
import CustomTable from '@/components/elTable/index.vue'
const props = defineProps({
// 主键
queryParams: {
type: Object,
default: {}
},
})
const { queryParams } = toRefs(props);
const tableData = ref([])
const columns = ref([
{ prop: 'mbmc', label: '批输入模板', visible: true, align: 'center', },
{ prop: 'yblx', label: '标本类型', visible: true, align: 'center', width: 80 },
{ prop: 'lxsr', label: '连续输入', visible: true, align: 'center', width: 80, slot: 'lxsr' },
{ prop: 'zdsr', label: '自动输入', visible: true, align: 'center', width: 80, slot: 'zdsr' },
{ prop: 'qsybh', label: '自动起始号', visible: true, align: 'center', width: 100 },
{ prop: 'jsybh', label: '自动结束号', visible: true, align: 'center', width: 100 },
{ prop: 'srbh', label: '输入编号', visible: true, align: 'center', width: 100 },
])
// 左侧表格配置
const tableConfig = ref({
border: true, // 边框
height: '', // 高度
highlightCurrentRow: true, // 高亮当前行
})
const getCombination = () => {
inputmdl(queryParams.value).then((res: any) => {
if (res.code == 0) {
tableData.value = res.data || []
}
})
};
watch(() => props.queryParams, (newValue) => {
getCombination()
}, { immediate: true })
// 解构 props
2025-10-16 11:20:50 +08:00
</script>
2025-10-22 17:36:25 +08:00
<style scoped lang="scss">
.bination_box {
height: 82vh;
overflow-y: auto;
}
</style>