UI-Project/src/views/User/userlist.vue
@@ -13,7 +13,7 @@
  const { t } = useI18n()
  let language = ref(localStorage.getItem('lang') || 'zh')
//  import LanguageMixin from './lang/LanguageMixin'
const selectedProjectNoa = ref(''); // 当前选中的角色
const selectedProjectNoa = ref(null); // 当前选中的角色
// const options = ref<any[]>([]); // 下拉选项列表  
  const userName = ref('');
  const password = ref('');
@@ -99,6 +99,10 @@
// 处理编辑按钮点击  
function handleEdit(row) {  
  userName.value = row.userName; 
  if (row.roleList && row.roleList.length > 0) {
    const firstRole = row.roleList[0];
    selectedProjectNoa.value = firstRole.id; // 设置为ID,而不是name
  }
  adda.value = true; // 显示对话框  
  window.localStorage.setItem('id', row.id)