董国庆
2026-01-22 2b92a2b9b89eb18b1892eca8ff5f550d7de53bd4
tjiao
1个文件已修改
17 ■■■■■ 已修改文件
laboratory/src/views/dataManagement/sampleSubmissionList/components/receiveConfirmDialog.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/dataManagement/sampleSubmissionList/components/receiveConfirmDialog.vue
@@ -27,10 +27,10 @@
                <span>{{ scope.row.nickName }}</span>
              </template>
            </el-table-column>
            <el-table-column prop="id" label="操作" min-width="120" align="center">
            <el-table-column prop="userId" label="操作" min-width="120" align="center">
              <template slot-scope="scope">
                <!-- <el-radio v-model="selectedPersonnelId" :label="scope.row.nickName"></el-radio> -->
                <el-checkbox :value="selectedPersonnelId ==scope.row.id"></el-checkbox>
                <el-checkbox :value="selectedPersonnelId ==scope.row.userId"></el-checkbox>
              </template>
            </el-table-column>
            <!-- <el-table-column prop="id" label="人员ID" min-width="120" align="center">
@@ -99,7 +99,7 @@
      type: Array,
      default: () => [],
      validator: (value) => {
        return value.every(item => item.id && item.nickName)
        return value.every(item => item.userId && item.nickName)
      }
    },
  },
@@ -137,16 +137,17 @@
      // 当点击表格行时,设置为选中状态
      this.$refs.personnelTable.clearSelection();
      this.$refs.personnelTable.toggleRowSelection(row);
      this.selectedPersonnelId = row.id;
      console.log('111111111111111',row)
      this.selectedPersonnelId = row.userId;
    },
    getPersonnelRowClassName({ row }) {
      // 根据是否选中来设置行样式
      return row.id === this.selectedPersonnelId ? 'selected-personnel' : '';
      return row.userId === this.selectedPersonnelId ? 'selected-personnel' : '';
    },
    handleSelectionChange(selection) {
      // 当radio选择改变时,更新选中的人员
      if (selection && selection.id) {
        this.selectedPersonnelId = selection.id;
      if (selection && selection.userId) {
        this.selectedPersonnelId = selection.userId;
      } else {
        this.selectedPersonnelId = null;
      }
@@ -163,7 +164,7 @@
      
      this.$emit("confirm", {
        personnelId: this.selectedPersonnelId,
        personnelName: this.personnelList.find(p => p.id === this.selectedPersonnelId)?.name || '',
        personnelName: this.personnelList.find(p => p.userId === this.selectedPersonnelId)?.name || '',
        imgSrc: this.imgSrc
      });
      this.handleClose();