专案对象

描述一个专案信息的对象。

对象元素

  • id:专案 ID
  • applyer:专案申请人的资料,用户对象
  • submittime:精确至毫秒的专案建立时间戳
  • template专案模板对象
  • priority:专案优先级
    • 1:重要
    • 2:普通
    • 3:低优先级
  • data:一组对象组成的数组
    • title:字段名称
    • data:字段数据
  • flow流程对象
  • status:专案状态与进度
    • 当其为正整数或 0 时,代表正在流程中的第几个步骤
    • -1:专案正在草稿状态且可被删除
    • -2:专案正在挂起状态(已被提交,但相应流程不正常,待流程正常后自动恢复正常)
    • -3:已被归档
    • -4:专案正在草稿状态但不可被删除
  • whoisprocessingnull 或一个代表目前审核人的 用户对象
  • rights:用户对专案可能的权限,一组数组,可能(的多个)值:
    • read:只读
    • processer:审核人
    • submitter:提交人
  • history:一组 流程历史对象 组成的数组

附注

  • 对象中的元素可能会根据不同的实际情况而有所出入

对象示例

{
  "id": 1,
  "applyer": {
      "firstname": "Astrian ",
      "lastname": "Zheng",
      "avatar": "https://url/to/avatar"
    },
  "submittime": 1495445137678,
  "template": {
    "id": 1,
    "title": "请假条",
    "description": "用于请假流程。",
    "sheets": [
      {
        "title": "请假时间",
        "description": "以天计算的请假时间",
        "type": "number"
      },
      {
        "title": "请假事由",
        "description": "填写请假事由",
        "type": "text"
      }
    ],
    "status": 1,
    "creator": 1,
    "createat": 1495276247096,
    "archivedtime": null
  },
  "priority": 2,
  "data": [
    {
      "title": "请假时间",
      "data": 3
    },
    {
      "title": "请假事由",
      "data": "hello"
    }
  ],
  "flow": {
    "id": 3,
    "title": "普通的流程",
    "description": "普通的流程描述",
    "flow": [
      -1,
      -2,
      {
        "firstname": "林",
        "lastname": "戈",
        "avatar": "https://url/to/avatar",
        "node": "人事部"
      }
    ],
    "status": 1
  },
  "status": 0,
  "whoisprocessing": {
    "firstname": "Astrian ",
    "lastname": "Zheng",
    "avatar": "https://url/to/avatar",
    "node": "人事部"
  },
  "rights": [
    "processer",
    "submitter"
  ],
  "history": [
    {
      "id": 1,
      "user": {
        "firstname": "Astrian ",
        "lastname": "Zheng",
        "avatar": "https://url/to/avatar",
        "node": "人事部"
      },
      "time": 1495467069785,
      "project": 1,
      "operation": "将专案提交至流程中",
      "flow": 3,
      "flowstep": -1,
      "duration": null
    },
    {
      "id": 2,
      "user": {
        "firstname": "Astrian ",
        "lastname": "Zheng",
        "avatar": "https://url/to/avatar",
        "node": "人事部"
      },
      "time": 1495469453755,
      "project": 1,
      "operation": "审核并同意该专案。",
      "flow": 3,
      "flowstep": 0,
      "duration": 2383970
    }
  ]
}

更新历史

V1.1:新对象

results matching ""

    No results matching ""