onchain-sdk
Advanced tools
Comparing version 0.0.26 to 0.0.28
@@ -5,2 +5,3 @@ export interface node_request { | ||
token: string; | ||
tenantId: string; | ||
} | ||
@@ -17,6 +18,5 @@ export declare namespace API.parmas { | ||
authType: string; | ||
version: string; | ||
versionOrder: string; | ||
version?: string; | ||
versionOrder?: string; | ||
userId: string; | ||
tenantId: string; | ||
}; | ||
@@ -28,4 +28,5 @@ } | ||
fetch: any; | ||
constructor({ baseUrl, fetch, token }: node_request); | ||
tenantId: string; | ||
constructor({ baseUrl, fetch, token, tenantId }: node_request); | ||
} | ||
export default GeneralUtils; |
import { TabInfo } from '../../hooks/useTabInfo/type'; | ||
import { APP } from '../../typings'; | ||
import GeneralUtils, { API, node_request } from './GeneralUtils'; | ||
import { tabInfoProps } from '../../components/PlmTabTemplate'; | ||
export interface instanceInter { | ||
@@ -8,2 +9,14 @@ params: {}; | ||
declare class InstanceUtils extends GeneralUtils { | ||
/** | ||
* 实例的属性阅读权限 | ||
*/ | ||
basicReadInstanceInfo: APP.instanceInfoType | undefined; | ||
/** | ||
* 实例的属性修改权限 | ||
*/ | ||
basicUpdateInstanceInfo: APP.instanceInfoType | undefined; | ||
/**实例的基本属性列表 */ | ||
BasicAttrs: any[] | undefined; | ||
/**实例的修改权限 */ | ||
hasEditAuth: boolean | undefined; | ||
constructor(data: node_request); | ||
@@ -22,2 +35,38 @@ /**修改实例的基本属性 */ | ||
}; | ||
static getEditAndControlledState(props: { | ||
/** 是否在变更中 */ | ||
isChange?: boolean; | ||
/** 是否在受影响分析中 */ | ||
isAnalyse?: boolean; | ||
/** 是否在变更处置中 */ | ||
isChangeDisposal?: boolean; | ||
/** 是否判断版本 */ | ||
isJudgeVersion?: boolean; | ||
/** 页签信息 */ | ||
tabInfo: tabInfoProps; | ||
/** 是否是版次管理 */ | ||
isVersionOrderManager?: boolean; | ||
/** 变更页签信息 */ | ||
topTabInfo?: tabInfoProps; | ||
/** 顶层变更实例 */ | ||
topInstanceInfo?: Record<string, any>; | ||
/** 是否是预览 */ | ||
isPreview?: boolean; | ||
}, | ||
/** 实例信息 */ | ||
instanceInfo: APP.ProjectInstance | APP.MaterialInstance | APP.FileInstance | APP.instanceInfoType): { | ||
/** 是否是 非草稿状态 */ | ||
notDraftVersion: boolean | ""; | ||
/** 不能编辑 */ | ||
uneditable: any; | ||
/** 是否是受控 tab */ | ||
isControlled: boolean; | ||
/** 禁止编辑状态 */ | ||
state: any; | ||
/** 错误原因提示消息 */ | ||
messageData: { | ||
data: string; | ||
type: string; | ||
}; | ||
}; | ||
/** | ||
@@ -28,5 +77,16 @@ * 初始化实例 | ||
/** | ||
* 获取实例的读取基本属性 | ||
* basicReadInstanceInfo | ||
* | ||
*/ | ||
getReadBasicInstanceInfo({ instanceId, userId }: API.parmas.instance): Promise<void>; | ||
/** | ||
* 获取实例的修改基本属性 | ||
*/ | ||
getUpdateBasicInstanceInfo({ instanceId, userId }: API.parmas.instance): Promise<void>; | ||
/** | ||
* 获取实例 | ||
* return 实例的基本属性 | ||
*/ | ||
getInstanceInfo({ instanceId, tabCode, authType, version, versionOrder, userId, tenantId }: API.parmas.instance): Promise<any>; | ||
getInstanceInfo({ instanceId, tabCode, authType, version, versionOrder, userId }: API.parmas.instance): Promise<any>; | ||
/** | ||
@@ -37,2 +97,5 @@ * 修改实例信息 | ||
/** | ||
* 判断实例能否有编辑权限 | ||
*/ | ||
/** | ||
* 处理实例的版本 | ||
@@ -39,0 +102,0 @@ */ |
{ | ||
"name": "onchain-sdk", | ||
"private": false, | ||
"version": "0.0.26", | ||
"version": "0.0.28", | ||
"scripts": { | ||
@@ -6,0 +6,0 @@ "start": "umi dev", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
511752
13391