检验项目
This commit is contained in:
parent
afe4e5f45d
commit
3e040b6cea
@ -75,7 +75,7 @@
|
||||
<el-col :span="10" :xs="24">
|
||||
<tabView :tabList="tabList" v-model:activeTab="activeTab" />
|
||||
<KeepAlive>
|
||||
<component class="tabDiv" :is="activeTabN" :dataList="tabDataList"></component>
|
||||
<component class="tabDiv" :is="activeTabN" :dataList="tabDataList" :formData="selectRow"></component>
|
||||
</KeepAlive>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -196,6 +196,8 @@ const yqdlFields = ref([
|
||||
|
||||
//tab页数据
|
||||
const tabDataList = ref<any>();
|
||||
//选中行数据
|
||||
const selectRow = ref();
|
||||
|
||||
// 仪器
|
||||
const getYqConfig = () => {
|
||||
@ -259,6 +261,7 @@ const changeStauts = () => {
|
||||
|
||||
// 选择行变化
|
||||
const rowChange = (row: any) => {
|
||||
selectRow.value = row;
|
||||
queryXmInfoNewDetailService(row.xmid,row.yq,row.xmdh).then((res: any) => {
|
||||
switch(activeTab.value){
|
||||
case 'Basic':
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<el-button type="primary" @click="bClickDel">删除</el-button>
|
||||
</div>
|
||||
<CustomTable ref="tableRef" :data="dataList" :columns="columns" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
|
||||
:config="tableConfig">
|
||||
:config="tableConfig" @row-click="handRowClick">
|
||||
<template #qz>
|
||||
<el-select v-model="selectValue" clearable>
|
||||
<el-option
|
||||
@ -25,8 +25,13 @@
|
||||
import CustomTable from '@/components/elTable/index.vue'
|
||||
import { dictData,getDictData } from '@/hooks';
|
||||
import { XmValNew } from '@/types';
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
|
||||
const props = defineProps({
|
||||
dataList: {
|
||||
type: Object,
|
||||
default: []
|
||||
},
|
||||
formData: {
|
||||
type: Object,
|
||||
default: {}
|
||||
@ -34,7 +39,7 @@ const props = defineProps({
|
||||
});
|
||||
|
||||
const tableRef = ref<any>(null);
|
||||
const dataList = ref();
|
||||
const dataList = ref<Array<XmValNew>>();
|
||||
const columns = ref([
|
||||
{ prop: 'qz', label: '取值', visible: true, align: 'center', slot:'qz', width: 200 },
|
||||
{ prop: 'srm', label: '快速输入码', visible: true, align: 'center', width: 100 },
|
||||
@ -48,6 +53,7 @@ const tableConfig = ref({
|
||||
})
|
||||
const options = ref()
|
||||
const selectValue = ref()
|
||||
const selectRow = ref()
|
||||
|
||||
//退拽属性
|
||||
const handleColumnDragEnd = (data: any) => {
|
||||
@ -62,20 +68,36 @@ const init = () => {
|
||||
const bClickAdd = () => {
|
||||
const newData: XmValNew = {
|
||||
xmid: props.formData.xmid,
|
||||
qz: ''
|
||||
qz: '',
|
||||
srm: '',
|
||||
jgbz: ''
|
||||
}
|
||||
console.log('@@新增行:',newData);
|
||||
dataList.value?.push(newData);
|
||||
}
|
||||
|
||||
dataList.value.push(newData);
|
||||
const bClickDel = async () => {
|
||||
await ElMessageBox.confirm('是否要删除选中的数据?','Warning',
|
||||
{
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'warning',
|
||||
}
|
||||
);
|
||||
//删掉界面上面的数据
|
||||
dataList.value = dataList.value?.filter(item => item.xh != selectRow.value.xh );
|
||||
}
|
||||
|
||||
const bClickDel = () => {
|
||||
|
||||
const handRowClick = (row:any) => {
|
||||
selectRow.value = row
|
||||
}
|
||||
|
||||
onMounted(()=>{
|
||||
//默认取值
|
||||
getDictData('VA')
|
||||
init()
|
||||
console.log('常用取值:',props.formData);
|
||||
})
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user