فهرست منبع

Merge branch 'master' of http://192.168.1.41:3000/SmartCost/SCCommon

lishihao 5 سال پیش
والد
کامیت
03f3534639
5فایلهای تغییر یافته به همراه54 افزوده شده و 6 حذف شده
  1. 1 1
      types/package.json
  2. 11 0
      types/src/interface/User.ts
  3. 31 5
      types/src/interface/base.ts
  4. 6 0
      types/src/interface/project.ts
  5. 5 0
      types/src/interface/ration.ts

+ 1 - 1
types/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@sc/types",
-  "version": "1.0.22",
+  "version": "1.0.23",
   "description": "共用类型文件",
   "main": "./dist/index.cjs.js",
   "module": "./dist/index.esm.js",

+ 11 - 0
types/src/interface/User.ts

@@ -1,3 +1,4 @@
+import { ICompilation, ICptItem } from './compilation';
 /* eslint-disable camelcase */
 export enum ELockInfo {
   BORROW = 1, // 借用
@@ -77,3 +78,13 @@ export interface IUserSession extends IUser {
 export interface IRecentUser extends IUser {
   recentDate: number;
 }
+
+export interface IBootResult {
+  compilation: ICompilation;
+  path: string;
+}
+
+export interface ILoginResult {
+  userInfo: IUser;
+  cptList: ICptItem;
+}

+ 31 - 5
types/src/interface/base.ts

@@ -1,3 +1,10 @@
+import { IProjectGlj } from './glj';
+import { IBill } from './bill';
+import { IProject, IProjectPermission } from './project';
+import { IRation } from './ration';
+import { IFeeRateFile } from './feeRate';
+import { ICalcProgramFile } from './calculation';
+
 export interface IAny {
   [prop: string]: any;
 }
@@ -25,6 +32,13 @@ export enum DeleteEnum {
   COMPLETEDELETED,
 }
 
+// 返回数据接口
+export interface IResult<T = any> {
+  errno: number;
+  message: string;
+  data: T;
+}
+
 export enum fromType {
   STD = 'std',
   CPT = 'cpt',
@@ -161,9 +175,21 @@ export interface IColumnMeta {
   source?: string[];
 }
 
-// 返回数据接口
-export interface IResult<T = any> {
-  errno: number;
-  message: string;
-  data: T;
+// subject getData数据接口
+export interface ISubjectGetData {
+  project: IProject;
+  [CptModelName.bills]: IBill[];
+  [CptModelName.rations]: IRation[];
+  [CptModelName.projectGljs]: IProjectGlj[];
+  [CptModelName.feeRateFile]: IFeeRateFile;
+  [CptModelName.calcProgramFile]: ICalcProgramFile;
+}
+
+// getData数据接口
+export interface IGetData {
+  subject: ISubjectGetData;
+  construction: { project?: IProject };
+  treeData: IProject[];
+  isOwner: boolean;
+  projectsPermission: IProjectPermission[];
 }

+ 6 - 0
types/src/interface/project.ts

@@ -263,3 +263,9 @@ export interface IProjectPermission {
   projectID: string;
   share: ISharePermission;
 }
+
+// constructionTreeData接口
+export interface IConstructionTreeData {
+  construction: { project: IProject };
+  treeData: IProject[];
+}

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

@@ -345,3 +345,8 @@ export interface IRations {
   index: number;
   rations: IRation[];
 }
+
+export interface IStdRationsAndGljs {
+  rations: (IStdRation | ICptRation)[];
+  rationGljs: (IStdRationGlj | ICptRationGlj)[];
+}