fix permission edit registry
This commit is contained in:
parent
01e1da066f
commit
4812e671ff
2 changed files with 8 additions and 7 deletions
|
|
@ -181,11 +181,11 @@ export default {
|
||||||
|
|
||||||
//EditPage
|
//EditPage
|
||||||
salaryTemp: `${orgProfile}/salaryTemp`,
|
salaryTemp: `${orgProfile}/salaryTemp`,
|
||||||
profilePermission: `${orgProfile}/keycloak/permissionProfile`,
|
profilePermission: (rootId: string) =>
|
||||||
|
`${orgProfile}/keycloak/permissionProfile/${rootId}`,
|
||||||
profileidPosition: (type: string) =>
|
profileidPosition: (type: string) =>
|
||||||
`${orgProfile}${type}/profileid/position`,
|
`${orgProfile}${type}/profileid/position`,
|
||||||
|
|
||||||
workflowCommanderOperate:`${workflow}/commander/operate`,
|
workflowCommanderOperate: `${workflow}/commander/operate`,
|
||||||
workflowCommanderSign:`${workflow}/commander/sign`,
|
workflowCommanderSign: `${workflow}/commander/sign`,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ async function fetchDataProfile() {
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
statusCheckEdit.value = data.statusCheckEdit;
|
statusCheckEdit.value = data.statusCheckEdit;
|
||||||
|
fetchPromission(data.rootId);
|
||||||
dataProfile.value = {
|
dataProfile.value = {
|
||||||
fullName: `${data.prefix}${data.firstName} ${data.lastName}`,
|
fullName: `${data.prefix}${data.firstName} ${data.lastName}`,
|
||||||
position: data.position,
|
position: data.position,
|
||||||
|
|
@ -62,9 +63,9 @@ async function fetchDataProfile() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function fetchPromission() {
|
function fetchPromission(rootId: string) {
|
||||||
http
|
http
|
||||||
.get(config.API.profilePermission)
|
.get(config.API.profilePermission(rootId))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
isConfirmEdit.value = data.isEdit;
|
isConfirmEdit.value = data.isEdit;
|
||||||
|
|
@ -133,7 +134,7 @@ function onConfirmDone() {
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
try {
|
try {
|
||||||
showLoader();
|
showLoader();
|
||||||
await Promise.all([fetchDataProfile(), fetchPromission()]);
|
await fetchDataProfile();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue