使用仪器界面

This commit is contained in:
jiangs 2025-11-17 17:42:09 +08:00
parent 39e982ce3a
commit 35d00b9bfa
4 changed files with 46 additions and 26 deletions

13
pnpm-lock.yaml generated
View File

@ -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

View File

@ -195,7 +195,7 @@ const yqdlFields = ref([
])
//tab页数据
const tabDataList = ref<any>();
const tabDataList = ref<any>([]);
//选中行数据
const selectRow = ref();
@ -271,7 +271,6 @@ const rowChange = (row: any) => {
if(res.data.xmValNewRows){
tabDataList.value = res.data.xmValNewRows[0] || [];
}
break;
case 'UseInstr':
if(res.data.xmInfoVsRows){

View File

@ -7,18 +7,18 @@
</div>
<CustomTable ref="tableRef" :data="dataList" :columns="columns" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
:config="tableConfig" @row-click="handRowClick">
<template #qz>
<el-select v-model="qzValue" clearable allow-create filterable default-first-option>
<template #qz = {row}>
<el-select v-model="row.qz" clearable allow-create filterable default-first-option>
<el-option v-for="item in qzOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</template>
<template #jgbz>
<el-select v-model="jgbzValue" clearable>
<template #jgbz = {row}>
<el-select v-model="row.jgbz" clearable>
<el-option v-for="item in jgbzOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</template>
<template #srm>
<el-input v-model="srmValue" class="full-width-input"></el-input>
<template #srm = {row}>
<el-input v-model="row.srm" class="full-width-input"></el-input>
</template>
</CustomTable>
</div>
@ -55,11 +55,8 @@ const tableConfig = ref({
// cellStyle: cellStyleHd
})
const qzOptions = ref()
const qzValue = ref()
const selectRow = ref()
const jgbzValue = ref()
const jgbzOptions = ref()
const srmValue = ref()
//退拽属性
const handleColumnDragEnd = (data: any) => {
@ -70,7 +67,7 @@ const handleColumnDragEnd = (data: any) => {
const bClickAdd = () => {
const newData: XmValNew = {
xmid: props.formData.xmid,
qz: qzValue.value,
qz: '',
srm: '',
jgbz: ''
}

View File

@ -2,10 +2,11 @@
<!-- 使用仪器 -->
<div>
<div>
<span>筛选:</span><input v-model="yq" style="width: 240px;" @change="handInputChange">
<el-button type="primary" @click="onClickAdd">新增</el-button>
<el-button type="primary" @click="onClickDel">删除</el-button>
</div>
<!-- <CustomTable ref="tableRef" :data="yqList" :columns="columns" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
:config="tableConfig"/> -->
<CustomTable ref="tableRef" :data="yqList" :columns="columns" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
:config="tableConfig"/>
</div>
</template>
@ -16,19 +17,21 @@ import { LabInstr } from '@/types';
import { ref } from 'vue'
const props = defineProps({
// 是否显示
// 显示数据
dataList: {
type: Array<LabInstr>,
type: Array,
required: true,
default: () => []
}
});
const yq = ref<string>('');
const tableRef = ref<any>(null);
const yqList = ref<Array<LabInstr>>(props.dataList);
//const yq = ref<string>('');
const tableRef = ref<any>();
const yqList = ref<any>([]);
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;
})
</script>