wangfei
2025-03-26 e553bf03da95027fc26ac06384e17ef43dd3ccf4
UI-Project/src/views/User/rolelist.vue
@@ -38,7 +38,6 @@
     tableData.value = response.data
    // titleSelectJsona.value.processTypea = response.data.menuList;
    // options.value = response.data.menuList
    console.log(response.data);
    } else {  
      ElMessage.warning(response.data);  
    }  
@@ -132,8 +131,7 @@
  }  
  if (selectedOptions.value !== topLevelItems) {  
    selectedOptions.value = topLevelItems;  
  }
  console.log(topLevelItems);
  }
  // selectedOptions.value = topLevelItems;
const topLevelItemsWithChildren = topLevelItems; // 包含顶级菜单项及其子菜单项的数组  
 let selectedPath = [];
@@ -149,7 +147,6 @@
        }  
    }  
}
 console.log(selectedPath);
selectedOptions.value = selectedPath;
}
// 编辑
@@ -237,9 +234,7 @@
};
request.get("/loadGlass/sys/menu/nav").then((res) => {
 if (res.code == 200) {
 console.log(res.data);
 options.value = res.data.tree
 console.log( options.value);
 } else {
 ElMessage.warning(res.msg)
 }
@@ -247,7 +242,7 @@
</script>
<template>
  <div>
     <el-button type="primary" style="margin-top: 10px;margin-left: 10px;"  size="mini" id="searchButton" @click="add = true">{{ $t('delivery.addrole') }}</el-button>
     <el-button type="primary" style="margin-top: 10px;margin-left: 10px;"  id="searchButton" @click="add = true">{{ $t('delivery.addrole') }}</el-button>
    <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
        <el-table height="750" ref="table"
@@ -255,8 +250,8 @@
          <el-table-column prop="name" align="center" :label="$t('delivery.role')" min-width="180" />
          <el-table-column fixed="right" :label="$t('delivery.operate')" align="center" width="200">
            <template #default="scope">
              <el-button size="mini" type="text" plain  @click="handleEdit(scope.row)">{{ $t('delivery.edit') }}</el-button>
              <el-button size="mini" type="text" plain @click="opena(scope.row)">{{ $t('delivery.delete') }}</el-button>
              <el-button type="text" plain  @click="handleEdit(scope.row)">{{ $t('delivery.edit') }}</el-button>
              <el-button type="text" plain @click="opena(scope.row)">{{ $t('delivery.delete') }}</el-button>
            </template>
        </el-table-column>
        </el-table>
@@ -265,7 +260,7 @@
  </div>
  <el-dialog v-model="add" top="23vh" width="37%" :title="$t('productStock.addusername')" >
    <div style="margin-left: -50px;margin-top: 10px;margin-bottom: 10px;">
            <el-form ref="formRef" size="mini" label-width="150px">
            <el-form ref="formRef" label-width="150px">
      <el-form label-width="100px" label-position="right">
        <el-row style="margin-top: -15px;margin-bottom: -2px;">
          <el-col :span="6">
@@ -305,7 +300,7 @@
  </el-dialog> 
  <el-dialog v-model="adda" top="23vh" width="37%" :title="$t('delivery.editrole')">
    <div style="margin-left: -50px;margin-top: 10px;margin-bottom: 10px;">
            <el-form ref="formRef" size="mini" label-width="150px">
            <el-form ref="formRef" label-width="150px">
              <el-form label-width="100px" label-position="right">
        <el-row style="margin-top: -15px;margin-bottom: -2px;">
          <el-col :span="6">