diff --git a/src/views/liswork/labItem/index.vue b/src/views/liswork/labItem/index.vue
index e93bea1..0336ad8 100644
--- a/src/views/liswork/labItem/index.vue
+++ b/src/views/liswork/labItem/index.vue
@@ -75,7 +75,7 @@
-
+
@@ -196,6 +196,8 @@ const yqdlFields = ref([
//tab页数据
const tabDataList = ref();
+//选中行数据
+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':
diff --git a/src/views/liswork/labItem/tab/commmonlyValues.vue b/src/views/liswork/labItem/tab/commmonlyValues.vue
index 3dbab08..ea63d24 100644
--- a/src/views/liswork/labItem/tab/commmonlyValues.vue
+++ b/src/views/liswork/labItem/tab/commmonlyValues.vue
@@ -6,7 +6,7 @@
删除
+ :config="tableConfig" @row-click="handRowClick">
(null);
-const dataList = ref();
+const dataList = ref>();
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: ''
}
-
- dataList.value.push(newData);
+ console.log('@@新增行:',newData);
+ dataList.value?.push(newData);
}
-const bClickDel = () => {
+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 handRowClick = (row:any) => {
+ selectRow.value = row
}
onMounted(()=>{
//默认取值
getDictData('VA')
init()
+ console.log('常用取值:',props.formData);
})