Merge branch 'feature/headquartersSetting' into feature/dockerSetting
This commit is contained in:
commit
22179284ec
@ -8,10 +8,11 @@ import {
|
||||
getAccountRoleAuthList,
|
||||
postAccountRole,
|
||||
} from "@/apis/account";
|
||||
import { defineProps, onMounted, ref, watch, computed } from "vue";
|
||||
import { defineProps, onMounted, ref, watch, computed, inject } from "vue";
|
||||
import useActiveBtn from "@/hooks/useActiveBtn";
|
||||
import { useI18n } from "vue-i18n";
|
||||
const { t } = useI18n();
|
||||
const { openToast } = inject("app_toast");
|
||||
const props = defineProps({
|
||||
selectedRole: Object,
|
||||
cancelModal: Function,
|
||||
@ -120,8 +121,12 @@ const onOk = async () => {
|
||||
...props.selectedRole,
|
||||
...postData,
|
||||
});
|
||||
props.update();
|
||||
onCancel();
|
||||
if (res.isSuccess) {
|
||||
props.update();
|
||||
onCancel();
|
||||
} else {
|
||||
openToast("error", res.msg, "#role_auth_modal");
|
||||
}
|
||||
};
|
||||
|
||||
watch(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user