Skip to content

系统视图设置

系统中关于项目视图的管理

GET 项目视图列表

GET /admin/tx/project/view/model/list

请求参数

名称位置类型必选说明
enablequerystring可用该参数查询启用的视图 1
viewModelIdquerystring可用该参数查询视图详情,理论上list里只有1个
Authorizationheaderstringnone

返回示例

json
{
  "code": 0,
  "msg": null,
  "data": [
    {
      "viewModelId": "960632ea-80d4-46f7-b565-8330766b48dd",
      "createBy": "admin",
      "enable": 1,
      "name": "视图名称",
      "describe": null,
      "type": 2,
      "fieldsList": [
        "f30cc46e58f15913b618a79f28d17adf"
      ]
    }
  ],
  "ok": true
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenonenone
» msgnulltruenonenone
» data[object]truenonenone
»» viewModelIdstringfalsenonenone
»» createBystringfalsenonenone
»» enableintegerfalsenonenone
»» namestringfalsenonenone
»» describenullfalsenonenone
»» typeintegerfalsenonenone
»» fieldsList[string]falsenonenone
» okbooleantruenonenone

POST 项目视图新增

POST /admin/tx/project/view/model/add

Body 请求参数

json
{
  "name": "string",
  "describe": "string",
  "fieldsIds": "string"
}

请求参数

名称位置类型必选说明
Authorizationheaderstringnone
bodybodyobjectnone
» namebodystring视图名称
» describebodystring描述
» fieldsIdsbodystring对应字段

返回示例

json
{
  "code": 0,
  "msg": null,
  "data": {
    "id": "5ae746916599b12a89861530e0760f44",
    "name": "城市",
    "describe": "描述",
    "type": 1,
    "createBy": "admin",
    "createTime": "2024-09-20 16:19:35",
    "updateBy": "admin",
    "updateTime": "2024-09-20 16:19:35",
    "delFlag": "0",
    "tenantId": null,
    "classify": null,
    "enable": 1,
    "fieldValue": "[{'asdas':'asdasd'}]",
    "condition": "[{'vvvv':'vvv'}]"
  },
  "ok": true
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenonenone
» msgnulltruenonenone
» dataobjecttruenonenone
»» idstringtruenonenone
»» namestringtruenone字段名
»» describestringtruenone字段备注
»» typeintegertruenone字段类型1单行文本 2多行文本 3单选下拉 4人名输入框 5日期 6数值
»» createBystringtruenonenone
»» createTimestringtruenonenone
»» updateBystringtruenonenone
»» updateTimestringtruenonenone
»» delFlagstringtruenonenone
»» tenantIdnulltruenonenone
»» classifynulltruenone字段分类 1系统字段 2 自定义字段
»» enableintegertruenone是否启用 1启动 0不启用
»» fieldValuestringtruenone初始值(JSON格式)
»» conditionstringtruenone条件(例如仅为整数等等,格式前端组织,JSON格式)
» okbooleantruenonenone

PUT 项目视图编辑

PUT /admin/tx/project/view/model/update

Body 请求参数

json
{
  "name": "string",
  "describe": "string",
  "fieldsIds": "string",
  "viewModelId": "string"
}

请求参数

名称位置类型必选说明
Authorizationheaderstringnone
bodybodyobjectnone
» namebodystringnone
» describebodystringnone
» fieldsIdsbodystringnone
» viewModelIdbodystringnone

返回示例

json
{
  "code": 0,
  "msg": null,
  "data": {
    "id": "5ae746916599b12a89861530e0760f44",
    "name": "城市",
    "describe": "描述",
    "type": 1,
    "createBy": "admin",
    "createTime": "2024-09-20 16:19:35",
    "updateBy": "admin",
    "updateTime": "2024-09-20 16:19:35",
    "delFlag": "0",
    "tenantId": null,
    "classify": null,
    "enable": 1,
    "fieldValue": "[{'asdas':'asdasd'}]",
    "condition": "[{'vvvv':'vvv'}]"
  },
  "ok": true
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenonenone
» msgnulltruenonenone
» dataobjecttruenonenone
»» idstringtruenonenone
»» namestringtruenone字段名
»» describestringtruenone字段备注
»» typeintegertruenone字段类型1单行文本 2多行文本 3单选下拉 4人名输入框 5日期 6数值
»» createBystringtruenonenone
»» createTimestringtruenonenone
»» updateBystringtruenonenone
»» updateTimestringtruenonenone
»» delFlagstringtruenonenone
»» tenantIdnulltruenonenone
»» classifynulltruenone字段分类 1系统字段 2 自定义字段
»» enableintegertruenone是否启用 1启动 0不启用
»» fieldValuestringtruenone初始值(JSON格式)
»» conditionstringtruenone条件(例如仅为整数等等,格式前端组织,JSON格式)
» okbooleantruenonenone

PUT 项目视图启用/禁用

PUT /admin/tx/project/view/model/updateEnable

Body 请求参数

json
{
  "enable": 0,
  "viewModelId": "string"
}

请求参数

名称位置类型必选说明
Authorizationheaderstringnone
bodybodyobjectnone
» enablebodyintegernone
» viewModelIdbodystringnone

返回示例

200 Response

json
{
  "code": 0,
  "msg": null,
  "data": {
    "id": "string",
    "name": "string",
    "describe": "string",
    "type": 0,
    "createBy": "string",
    "createTime": "string",
    "updateBy": "string",
    "updateTime": "string",
    "delFlag": "string",
    "tenantId": null,
    "classify": null,
    "enable": 0,
    "fieldValue": "string",
    "condition": "string"
  },
  "ok": true
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenonenone
» msgnulltruenonenone
» dataobjecttruenonenone
»» idstringtruenonenone
»» namestringtruenone字段名
»» describestringtruenone字段备注
»» typeintegertruenone字段类型1单行文本 2多行文本 3单选下拉 4人名输入框 5日期 6数值
»» createBystringtruenonenone
»» createTimestringtruenonenone
»» updateBystringtruenonenone
»» updateTimestringtruenonenone
»» delFlagstringtruenonenone
»» tenantIdnulltruenonenone
»» classifynulltruenone字段分类 1系统字段 2 自定义字段
»» enableintegertruenone是否启用 1启动 0不启用
»» fieldValuestringtruenone初始值(JSON格式)
»» conditionstringtruenone条件(例如仅为整数等等,格式前端组织,JSON格式)
» okbooleantruenonenone

GET 视图模式树结构

GET /admin/tx/project/treeByViewModel

请求参数

名称位置类型必选说明
viewModelIdquerystring视图ID
Authorizationheaderstringnone

返回示例

json
{
  "code": 0,
  "msg": null,
  "data": [
    {
      "fieldsValue": "2024",
      "fieldsId": "f30cc46e58f15913b618a79f28d17adf",
      "children": [],
      "fieldsType": 3,
      "isShow": true
    }
  ],
  "ok": true
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenonenone
» msgnulltruenonenone
» data[object]truenonenone
»» fieldsValuestringfalsenonenone
»» fieldsIdstringfalsenonenone
»» children[string]falsenonenone
»» fieldsTypeintegerfalsenonenone
»» isShowbooleanfalsenonenone
» okbooleantruenonenone

Released under the MIT License.