Просмотр исходного кода

feat(types): 企业版-分享库

vian 4 лет назад
Родитель
Сommit
d1c2901828
3 измененных файлов с 28 добавлено и 5 удалено
  1. 3 1
      types/src/interface/glj.ts
  2. 7 0
      types/src/interface/ration.ts
  3. 18 4
      types/src/interface/share.ts

+ 3 - 1
types/src/interface/glj.ts

@@ -374,7 +374,6 @@ export interface IInsertCptGlj {
 // 准备组成物返回数据接口
 export interface IPrepareComponentResult {
   displayComponents: ICptDisplayComponent[];
-  allowComponent: boolean;
 }
 
 // 补充人材机
@@ -390,6 +389,8 @@ export interface ISelectGljLibItem {
   from: FromType;
   isShare?: boolean; // 是否是被人分享的
   located?: boolean; // 定位到的库(替换时需要)
+  enterpriseID?: string; // 库来自企业的ID(企业分享会有)
+  enterpriseName?: string; // 库来自企业的名称(企业分享会有)
 }
 
 export interface IAddComponentOption {
@@ -408,6 +409,7 @@ export interface IGetPagingGljOptions {
   limit?: number; // 分页数量
   gtCode?: string; // 分页排序$gt code
   search?: string; // 搜索的内容(匹配编号、名称)
+  excludeIDs?: (number | string)[]; // 排除的人材机ID
 }
 
 // 选择人材机接口返回数据格式

+ 7 - 0
types/src/interface/ration.ts

@@ -7,6 +7,7 @@ import {
   BRType,
   IBRBase,
   ITreeScm,
+  IFileRef,
 } from './base';
 import { IBookmark } from './bill';
 import {
@@ -473,3 +474,9 @@ export interface ICptRationLib {
   isEnterpriseInternal: boolean;
   createDate: number;
 }
+
+// 定额库下拉项
+export interface ISelectRationLibItem extends IFileRef {
+  enterpriseID?: string; // 库来自企业的ID(企业分享会有)
+  enterpriseName?: string; // 库来自企业的名称(企业分享会有)
+}

+ 18 - 4
types/src/interface/share.ts

@@ -47,8 +47,6 @@ export interface IShareBase extends ISharePermission {
   ID: string;
   version: ShareVersion;
   type: ShareType;
-  ownerID: string;
-  ownerType: EntityType;
   userID: string;
   enterpriseID: string;
   receiverID: string;
@@ -66,6 +64,7 @@ export interface IShareProject extends IShareBase {
 
 export interface IShareLib extends IShareBase {
   compilationID: string;
+  libID: string;
 }
 
 export type ShareItem = IShareProject | IShareLib;
@@ -79,6 +78,7 @@ export interface IShareHistory extends ISharePermission {
   shareType: ShareType;
   projectID?: string;
   compilationID?: string;
+  libID?: string;
 }
 
 export interface ICreateShareProject extends ISharePermission {
@@ -91,6 +91,7 @@ export interface ICreateShareProject extends ISharePermission {
 export interface ICreateShareLib extends ISharePermission {
   ID: string;
   compilationID: string;
+  libID: string;
 }
 
 export interface ICreatShare {
@@ -143,8 +144,10 @@ export interface IShareLink {
   // 拥有者ID
   ownerID: string;
   ownerType: EntityType;
+  // 企业ID
+  enterpriseID: string;
   // 创建链接的人ID
-  creatorID: string;
+  userID: string;
   // 分享时间
   shareDate: number;
 }
@@ -246,6 +249,13 @@ export interface IReceivedShareProject {
   enterpriseName?: string;
 }
 
+// 分享库指定用户
+export interface IShareLibToUser {
+  name: string;
+  enterpriseID?: string;
+  enterpriseName?: string;
+}
+
 // 接收到的库数据
 export interface IReceivedShareLib {
   // 类型
@@ -258,8 +268,12 @@ export interface IReceivedShareLib {
   shareDate: number;
   // 来自用户名
   fromUserName: string;
+  // 分享项目来自的企业ID
+  enterpriseID?: string;
+  // 分享项目来自的企业名称
+  enterpriseName?: string;
   // 指定用户(名称)
-  toUsers?: string[];
+  toUsers?: IShareLibToUser[];
 }
 
 // 根据手机号搜索出来用户信息