| | |
| | | tableData.value = response.data |
| | | // titleSelectJsona.value.processTypea = response.data.menuList; |
| | | // options.value = response.data.menuList |
| | | console.log(response.data); |
| | | } else { |
| | | ElMessage.warning(response.data); |
| | | } |
| | |
| | | } |
| | | if (selectedOptions.value !== topLevelItems) { |
| | | selectedOptions.value = topLevelItems; |
| | | } |
| | | console.log(topLevelItems); |
| | | } |
| | | // selectedOptions.value = topLevelItems; |
| | | const topLevelItemsWithChildren = topLevelItems; // 包含顶级菜单项及其子菜单项的数组 |
| | | let selectedPath = []; |
| | |
| | | } |
| | | } |
| | | } |
| | | console.log(selectedPath); |
| | | selectedOptions.value = selectedPath; |
| | | } |
| | | // 编辑 |
| | |
| | | }; |
| | | 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) |
| | | } |
| | |
| | | </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" |
| | |
| | | <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> |
| | |
| | | </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"> |
| | |
| | | </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"> |