一单四制优化及加入工作流
This commit is contained in:
@@ -118,6 +118,15 @@ export function getHazardDetail(hazardId) {
|
||||
method: 'GET'
|
||||
});
|
||||
}
|
||||
|
||||
/** 隐患流程链(动态 nodes 时间线) */
|
||||
export function getHazardProcessChain(hazardId) {
|
||||
return requestAPI({
|
||||
url: '/frontend/hazard/process-chain',
|
||||
method: 'GET',
|
||||
data: { hazardId }
|
||||
});
|
||||
}
|
||||
//获取隐患排查列表
|
||||
export function getHiddenDangerList(params) {
|
||||
return requestAPI({
|
||||
@@ -267,6 +276,33 @@ export function getWriteOffApplyDetail(applyId) {
|
||||
method: 'GET'
|
||||
});
|
||||
}
|
||||
//获取销号审批表单数据(按隐患ID)
|
||||
export function getWriteoffForm(hazardId) {
|
||||
return requestAPI({
|
||||
url: '/frontend/hazard/writeoff/form',
|
||||
method: 'GET',
|
||||
data: { hazardId }
|
||||
});
|
||||
}
|
||||
//销号审核通过
|
||||
export function writeoffApprove(params) {
|
||||
return requestAPI({
|
||||
url: '/admin/hazard/writeoff/approve',
|
||||
method: 'POST',
|
||||
data: {
|
||||
...params,
|
||||
type: 'agree'
|
||||
}
|
||||
});
|
||||
}
|
||||
//销号驳回
|
||||
export function writeoffReject(params) {
|
||||
return requestAPI({
|
||||
url: '/admin/hazard/writeoff/reject',
|
||||
method: 'POST',
|
||||
data: params
|
||||
});
|
||||
}
|
||||
|
||||
//验收整改
|
||||
export function acceptanceRectification(params) {
|
||||
@@ -426,14 +462,32 @@ export function getCheckItemListDetail(params) {
|
||||
});
|
||||
}
|
||||
|
||||
// 根据部门id获取用户列表
|
||||
export function getDeptUsers(deptId) {
|
||||
// 根据部门id获取用户列表;可选 params.type:1=部门全部用户(默认),2=部门 manage 角色用户,3=非 manage 角色用户(验收页非快速审批用)
|
||||
export function getDeptUsers(deptId, params = {}) {
|
||||
return requestAPI({
|
||||
url: deptId ? `/admin/user/dept/users/${deptId}` : '/admin/user/dept/users',
|
||||
method: 'GET',
|
||||
data: params
|
||||
});
|
||||
}
|
||||
|
||||
/** 上报时获取上级范围内可选处理人(deptId 取当前身份 userIdentity.deptId) */
|
||||
export function getDeptSuperiorScope(deptId) {
|
||||
return requestAPI({
|
||||
url: `/admin/user/dept/${deptId}/superior-scope`,
|
||||
method: 'GET'
|
||||
});
|
||||
}
|
||||
|
||||
/** 流程审批:获取下一步处理人候选(部门树 + users) */
|
||||
export function getFlowApproverCandidates(taskId) {
|
||||
return requestAPI({
|
||||
url: '/admin/user/flow/approver-candidates',
|
||||
method: 'GET',
|
||||
data: { taskId }
|
||||
});
|
||||
}
|
||||
|
||||
// 获取子级部门列表(从当前到最后一层)
|
||||
export function getDeptChildren() {
|
||||
return requestAPI({
|
||||
@@ -487,4 +541,42 @@ export function generateWriteoffContent(params) {
|
||||
data: params,
|
||||
loadingText: 'AI生成销号方案中'
|
||||
});
|
||||
}
|
||||
|
||||
// 预览流程下一节点
|
||||
export function getFlowNextNodes(params) {
|
||||
return requestAPI({
|
||||
url: '/flow/task/next-nodes',
|
||||
method: 'POST',
|
||||
data: params,
|
||||
loadingText: false
|
||||
});
|
||||
}
|
||||
|
||||
// 流程任务审批(同意/驳回/上报/重新整改等)
|
||||
export function flowTaskApprove(params) {
|
||||
return requestAPI({
|
||||
url: '/flow/task/approve',
|
||||
method: 'POST',
|
||||
data: params,
|
||||
loadingText: false
|
||||
});
|
||||
}
|
||||
|
||||
// 查询当前身份的 Flowable 待办(候选组 + assignee 并集)
|
||||
export function getFlowTodoList(params) {
|
||||
return requestAPI({
|
||||
url: '/frontend/flow/todo',
|
||||
method: 'GET',
|
||||
data: params
|
||||
});
|
||||
}
|
||||
|
||||
// 查询当前用户/身份的已办(办结人匹配用户 ID 或身份 ID)
|
||||
export function getFlowDoneList(params) {
|
||||
return requestAPI({
|
||||
url: '/frontend/flow/done',
|
||||
method: 'GET',
|
||||
data: params
|
||||
});
|
||||
}
|
||||
26
request/identity.js
Normal file
26
request/identity.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import { requestAPI } from './request.js';
|
||||
|
||||
/** 获取当前用户身份列表及当前生效身份 */
|
||||
export function getMyIdentity() {
|
||||
return requestAPI({
|
||||
url: '/system/identity/my',
|
||||
method: 'GET'
|
||||
});
|
||||
}
|
||||
|
||||
/** 切换当前用户身份 */
|
||||
export function switchIdentity(identityId) {
|
||||
return requestAPI({
|
||||
url: '/system/identity/switch',
|
||||
method: 'POST',
|
||||
data: { identityId }
|
||||
});
|
||||
}
|
||||
|
||||
/** 设置默认身份 */
|
||||
export function setDefaultIdentity(identityId) {
|
||||
return requestAPI({
|
||||
url: `/system/identity/setDefault/${identityId}`,
|
||||
method: 'PUT'
|
||||
});
|
||||
}
|
||||
@@ -2,10 +2,10 @@ import Request from './luch-request/index.js';
|
||||
// 基础的url
|
||||
|
||||
|
||||
// const baseUrl = 'https://yingji.hexieapi.com/prod-api';
|
||||
const baseUrl = 'https://yingji.hexieapi.com/prod-api';
|
||||
// const baseUrl = 'http://192.168.1.168:5004'; //廖哥本地
|
||||
const baseUrl = 'http://192.168.1.140:5004'; //超哥本地
|
||||
// const baseUrl = 'http://192.168.1.158:7003/prod-api'; //测试环境
|
||||
// const baseUrl = 'http://192.168.1.140:5004'; //超哥本地
|
||||
// const baseUrl = 'http://192.168.1.158:7003/prod-api'; //测试环境
|
||||
|
||||
|
||||
// 图片/文件资源域名:去掉 /prod-api,便于 <image> / previewImage / downloadFile 直接访问
|
||||
|
||||
Reference in New Issue
Block a user