diff --git a/components/users/user/account.vue b/components/users/user/account.vue index b9debb8..1fac31b 100644 --- a/components/users/user/account.vue +++ b/components/users/user/account.vue @@ -27,17 +27,17 @@ - + - + @@ -64,9 +64,9 @@ - + @@ -86,6 +86,11 @@ @update:checked-row-keys="handleCheck" :pagination="false" :bordered="false" /> + + @@ -278,6 +283,7 @@ const getPolicie = async () => { parentPolicy.value = JSON.stringify(await getPolicyByUserName(props.user.accessKey)) } getPolicie() + // 新增 function addItem() { editType.value = "add" @@ -294,16 +300,12 @@ function addItem() { } } // 编辑 +const editData = ref({}) async function openEditItem(row: any) { editType.value = "edit" editStatus.value = true const res = await getServiceAccount(row.accessKey) - formModel.value = { - ...res, - } - formModel.value.accessKey = row.accessKey - formModel.value.expiry = res.expiration - formModel.value.accountStatus = res.accountStatus + editData.value = { ...res, accessKey: row.accessKey } } function cancelAdd() { @@ -319,6 +321,7 @@ function cancelAdd() { policy: "", accountStatus: "on", } + getUserList() } interface Emits { diff --git a/components/users/user/acedit.vue b/components/users/user/acedit.vue new file mode 100644 index 0000000..993d4ce --- /dev/null +++ b/components/users/user/acedit.vue @@ -0,0 +1,183 @@ + + + + +