This commit is contained in:
xiaojunnuo
2024-09-23 13:23:49 +08:00
parent e0466409d0
commit 8e03e8463f
10 changed files with 86 additions and 56 deletions

View File

@@ -1,55 +1,55 @@
import { request } from "/src/api/service";
const apiPrefix = "/pi/access";
export function GetList(query: any) {
return request({
export async function GetList(query: any) {
return await request({
url: apiPrefix + "/page",
method: "post",
data: query
});
}
export function AddObj(obj: any) {
return request({
export async function AddObj(obj: any) {
return await request({
url: apiPrefix + "/add",
method: "post",
data: obj
});
}
export function UpdateObj(obj: any) {
return request({
export async function UpdateObj(obj: any) {
return await request({
url: apiPrefix + "/update",
method: "post",
data: obj
});
}
export function DelObj(id: number) {
return request({
export async function DelObj(id: number) {
return await request({
url: apiPrefix + "/delete",
method: "post",
params: { id }
});
}
export function GetObj(id: number) {
return request({
export async function GetObj(id: number) {
return await request({
url: apiPrefix + "/info",
method: "post",
params: { id }
});
}
export function GetProviderDefine(type: string) {
return request({
export async function GetProviderDefine(type: string) {
return await request({
url: apiPrefix + "/define",
method: "post",
params: { type }
});
}
export function GetProviderDefineByAccessType(type: string) {
return request({
export async function GetProviderDefineByAccessType(type: string) {
return await request({
url: apiPrefix + "/defineByAccessType",
method: "post",
params: { type }

View File

@@ -3,7 +3,7 @@ import { request } from "/src/api/service";
const apiPrefix = "/pi/history";
export function GetList(query: any) {
return request({
return await request({
url: apiPrefix + "/page",
method: "post",
data: query
@@ -11,7 +11,7 @@ export function GetList(query: any) {
}
export function AddObj(obj: any) {
return request({
return await request({
url: apiPrefix + "/add",
method: "post",
data: obj
@@ -19,7 +19,7 @@ export function AddObj(obj: any) {
}
export function UpdateObj(obj: any) {
return request({
return await request({
url: apiPrefix + "/update",
method: "post",
data: obj
@@ -27,7 +27,7 @@ export function UpdateObj(obj: any) {
}
export function DelObj(id: any) {
return request({
return await request({
url: apiPrefix + "/delete",
method: "post",
params: { id }
@@ -35,7 +35,7 @@ export function DelObj(id: any) {
}
export function GetObj(id: any) {
return request({
return await request({
url: apiPrefix + "/info",
method: "post",
params: { id }
@@ -43,7 +43,7 @@ export function GetObj(id: any) {
}
export function GetDetail(id: any) {
return request({
return await request({
url: apiPrefix + "/detail",
method: "post",
params: { id }
@@ -51,7 +51,7 @@ export function GetDetail(id: any) {
}
export function DeleteBatch(ids: any[]) {
return request({
return await request({
url: apiPrefix + "/deleteByIds",
method: "post",
data: { ids }

View File

@@ -1,14 +1,14 @@
import { request } from "/src/api/service";
export async function getMineInfo() {
return request({
return await request({
url: "/mine/info",
method: "POST"
});
}
export async function changePassword(form: any) {
return request({
return await request({
url: "/mine/changePassword",
method: "POST",
data: form

View File

@@ -4,7 +4,7 @@ const apiPrefix = "/pi/pipeline";
const historyApiPrefix = "/pi/history";
export function GetList(query: any) {
return request({
return await request({
url: apiPrefix + "/page",
method: "post",
data: query
@@ -12,7 +12,7 @@ export function GetList(query: any) {
}
export function AddObj(obj: any) {
return request({
return await request({
url: apiPrefix + "/add",
method: "post",
data: obj
@@ -20,7 +20,7 @@ export function AddObj(obj: any) {
}
export function UpdateObj(obj: any) {
return request({
return await request({
url: apiPrefix + "/update",
method: "post",
data: obj
@@ -28,7 +28,7 @@ export function UpdateObj(obj: any) {
}
export function DelObj(id: any) {
return request({
return await request({
url: apiPrefix + "/delete",
method: "post",
params: { id }
@@ -36,7 +36,7 @@ export function DelObj(id: any) {
}
export function GetObj(id: any) {
return request({
return await request({
url: apiPrefix + "/info",
method: "post",
params: { id }
@@ -44,7 +44,7 @@ export function GetObj(id: any) {
}
export function GetDetail(id: any) {
return request({
return await request({
url: apiPrefix + "/detail",
method: "post",
params: { id }
@@ -52,7 +52,7 @@ export function GetDetail(id: any) {
}
export function Save(pipelineEntity: any) {
return request({
return await request({
url: apiPrefix + "/save",
method: "post",
data: pipelineEntity
@@ -60,7 +60,7 @@ export function Save(pipelineEntity: any) {
}
export function Trigger(id: any, stepId?: string) {
return request({
return await request({
url: apiPrefix + "/trigger",
method: "post",
params: { id, stepId }
@@ -68,7 +68,7 @@ export function Trigger(id: any, stepId?: string) {
}
export function Cancel(historyId: any) {
return request({
return await request({
url: apiPrefix + "/cancel",
method: "post",
params: { historyId }
@@ -76,7 +76,7 @@ export function Cancel(historyId: any) {
}
export async function GetFiles(pipelineId: number) {
return request({
return await request({
url: historyApiPrefix + "/files",
method: "post",
params: { pipelineId }

View File

@@ -1,9 +1,25 @@
import { request } from "/@/api/service";
export function PreBindUser(userId: number) {
request({
export async function PreBindUser(userId: number) {
await request({
url: "/sys/account/preBindUser",
method: "post",
data: { userId }
});
}
export async function BindUser(userId: number) {
await request({
url: "/sys/account/bindUser",
method: "post",
data: { userId }
});
}
export async function UnbindUser(userId: number) {
await request({
url: "/sys/account/unbindUser",
method: "post",
data: { userId }
});
}

View File

@@ -32,10 +32,21 @@ onMounted(() => {
return subjectInfo;
});
iframeClient.register("preBindSubject", async (req) => {
let preBindUserId = null;
iframeClient.register("preBindUser", async (req) => {
const userId = req.data.userId;
preBindUserId = userId;
await api.PreBindUser(userId);
});
iframeClient.register("onBoundUser", async (req) => {
await api.BindUser(preBindUserId);
});
iframeClient.register("unbindUser", async (req) => {
const userId = req.data.userId;
await api.UnbindUser(userId);
});
});
</script>

View File

@@ -1,7 +1,7 @@
import { request } from "/src/api/service";
const apiPrefix = "/sys/authority/permission";
export async function GetList(query: any) {
return request({
return await request({
url: apiPrefix + "/page",
method: "post",
data: query
@@ -9,14 +9,14 @@ export async function GetList(query: any) {
}
export async function GetTree() {
return request({
return await request({
url: apiPrefix + "/tree",
method: "post"
});
}
export async function AddObj(obj: any) {
return request({
return await request({
url: apiPrefix + "/add",
method: "post",
data: obj
@@ -24,7 +24,7 @@ export async function AddObj(obj: any) {
}
export async function UpdateObj(obj: any) {
return request({
return await request({
url: apiPrefix + "/update",
method: "post",
data: obj
@@ -32,7 +32,7 @@ export async function UpdateObj(obj: any) {
}
export async function DelObj(id: any) {
return request({
return await request({
url: apiPrefix + "/delete",
method: "post",
params: { id }
@@ -40,7 +40,7 @@ export async function DelObj(id: any) {
}
export async function GetObj(id: any) {
return request({
return await request({
url: apiPrefix + "/info",
method: "post",
params: { id }

View File

@@ -1,7 +1,7 @@
import { request } from "/src/api/service";
const apiPrefix = "/sys/authority/role";
export async function GetList(query: any) {
return request({
return await request({
url: apiPrefix + "/page",
method: "post",
data: query
@@ -9,7 +9,7 @@ export async function GetList(query: any) {
}
export async function AddObj(obj: any) {
return request({
return await request({
url: apiPrefix + "/add",
method: "post",
data: obj
@@ -17,7 +17,7 @@ export async function AddObj(obj: any) {
}
export async function UpdateObj(obj: any) {
return request({
return await request({
url: apiPrefix + "/update",
method: "post",
data: obj
@@ -25,7 +25,7 @@ export async function UpdateObj(obj: any) {
}
export async function DelObj(id: any) {
return request({
return await request({
url: apiPrefix + "/delete",
method: "post",
params: { id }
@@ -33,7 +33,7 @@ export async function DelObj(id: any) {
}
export async function GetObj(id: any) {
return request({
return await request({
url: apiPrefix + "/info",
method: "post",
params: { id }
@@ -47,7 +47,7 @@ export async function GetObj(id: any) {
* @constructor
*/
export function getPermissionIds(roleId: any) {
return request({
return await request({
url: apiPrefix + "/getPermissionIds",
method: "post",
params: { id: roleId }
@@ -62,7 +62,7 @@ export function getPermissionIds(roleId: any) {
* @constructor
*/
export function DoAuthz(roleId: any, permissionIds: any) {
return request({
return await request({
url: apiPrefix + "/authz",
method: "post",
data: { roleId, permissionIds }

View File

@@ -1,7 +1,7 @@
import { request } from "/src/api/service";
const apiPrefix = "/sys/authority/user";
export async function GetList(query: any) {
return request({
return await request({
url: apiPrefix + "/page",
method: "post",
data: query
@@ -9,7 +9,7 @@ export async function GetList(query: any) {
}
export async function AddObj(obj: any) {
return request({
return await request({
url: apiPrefix + "/add",
method: "post",
data: obj
@@ -17,7 +17,7 @@ export async function AddObj(obj: any) {
}
export async function UpdateObj(obj: any) {
return request({
return await request({
url: apiPrefix + "/update",
method: "post",
data: obj
@@ -25,7 +25,7 @@ export async function UpdateObj(obj: any) {
}
export async function DelObj(id: any) {
return request({
return await request({
url: apiPrefix + "/delete",
method: "post",
params: { id }
@@ -33,7 +33,7 @@ export async function DelObj(id: any) {
}
export async function GetObj(id: any) {
return request({
return await request({
url: apiPrefix + "/info",
method: "post",
params: { id }