"manager": {
      "showExtand": "{child_count},null parent_name",
      "bridgeColumnExtand": "child_count,parent_name",
      "extend": "basis",
      "auth": true,
      "columns": {}
    },

mapper_cpc-product-type_sql__biz.parent.json

{
  "rules": {},
  "responseField": {},
  "columns": {
    "parentName": {
      "fieldSort": 9999,
      "tableId": 1,
      "dataType": "varchar",
      "title": "上级类别",
      "remark": "用于搜索",
      "guidMethod": "None",
      "isRequired": true,
      "isSearch": true,
      "isData": false,
      "editPropertie": {
        "showMethod": "text"
      },
      "pagePropertie": {
        "showMethod": "text"
      },
      "filter": {
        "method": "custom",
        "isMust": false,
        "sqlCustom": {
          "mysql": " and parent_id in (select type_id from cpc_product_type where type_name like CONCAT('%',@parentName,'%'))",
          "oracle": " and parent_id in (select type_id from cpc_product_type where type_name like '%'||@parentName||'%')",
          "sqlserver": " and parent_id in (select type_id from cpc_product_type where type_name like '%'+@parentName+'%')"
        }
      },
      "field": "parentName",
      "name": "parent_name",
      "alias": "parent_name",
      "isDate": false,
      "isPrimary": false,
      "isIdentity": false,
      "maxLength": 50
    },
    "parentId": {
      "fieldSort": 9999,
      "tableId": 1,
      "dataType": "varchar",
      "title": "上级类别",
      "guidMethod": "None",
      "isRequired": false,
      "isSearch": true,
      "isData": true,
      "dimJoin": {
        "fromDimField": "parentId",
        "allFilter": "",
        "joinChar": ","
      },
      "filter": {
        "isMust": false,
        "method": "iteration",
        "sql": " and type_id in @parentId",
        "tableName": "cpc_product_type",
        "whereSql": " ",
        "iterationId": "type_id",
        "iterationparentId": "parent_id",
        "dbRead": null
      },
      "field": "parentId",
      "name": "parent_id",
      "alias": "parent_id",
      "editPropertie": {
        "showMethodOut": "kv",
        "showMethod": "text",
        "type": null,
        "format": null,
        "defaultValue": null
      },
      "addPropertie": {
        "showMethodOut": "kv",
        "showMethod": "text",
        "type": null,
        "format": null,
        "defaultValue": null
      },
      "pagePropertie": {
        "showMethodOut": "kv",
        "showMethod": "text",
        "type": null,
        "format": null,
        "defaultValue": null
      },
      "isDate": false,
      "isPrimary": false,
      "isIdentity": false,
      "maxLength": 100,
      "colDecimal": 0
    },
    "childCount": {
      "extendAlias": "input_basis",
      "fieldSort": 9999,
      "tableId": 1,
      "dataType": "varchar",
      "title": "子类别数",
      "isData": false,
      "filter": {
        "isMust": false
      },
      "sql": "(select count(type_id) from cpc_product_type tb_child where tb_child.parent_id=cpc_product_type.type_id) child_count",
      "selectSql": {
        "oracle": null,
        "sqlserver": null,
        "mysql": null,
        "sqlite": null
      },
      "field": "childCount",
      "name": "child_count",
      "alias": "child_count",
      "isDate": false,
      "isPrimary": false,
      "isIdentity": false,
      "maxLength": 200
    }
  },
  "dimDatas": {
    // #region 上级类别 start
    "parentId": {
      "allSql": "select type_name name,parent_id,type_id id,type_id value from cpc_product_type where {s-if:_fromPrimaryIds} type_id in @_fromPrimaryIds {e-if:_fromPrimaryIds}",
      "connName": "ConnCpc",
      "dataFromType": "Database",
      "name": "上级类别",
      "dimCacheKey": "dim-cpc-product-type-parent-id"
    }
    // #endregion 上级类别
  }
}

bridge_cpc-product-type__biz.parent.json


{
  "table": {
    "columns": {
      "parentId": {
        "sortId": 9999,
        "alias": "parent_id",
        "field": "parentId",
        "events": {},
        "attrs": {
          "label": "上级类别",
          "maxlength": 10,
          "clearable": 10,
          "multiple": false,
          "remote": true,
          "filterable": true
        },
        "meta": {
          "fromValue": true,
          "html": true,
          "edit": true,
          "dimSessionKey": "dim-cpc-product-type-parent-id",
          "dimLocalKey": "dim-cpc-product-type-parent-id",
          "dimMkey": "cpc-product-type",
          "dimResField": "global",
          "dimColumnField": "global",
          "dimDataType": "string",
          "dimRemote": true,
          "dimUrl": null,
          "prop": "parentId",
          "rowId": 1,
          "type": "basis",
          "span": 12,
          "auth": true,
          "component": "bs-text",
          "componentOp": "bs-select"
        }
      },
      "childCount": {
        "sortId": 9999,
        "alias": "child_count",
        "field": "childCount",
        "events": {},
        "attrs": {
          "component-action": "el-buttion",
          "component-action-icon": "el-icon-circle-plus-outline",
          "component-action-label-edit": "修改类别",
          "component-action-label-add": "新增类别",
          "component-action-field": "typeName",
          "label": "子类别数",
          "maxlength": 200,
          "clearable": true,
          "component-open-method": "tab",
          "tab-menu-mkey": "menu-nav",
          "tab-menu-field": "content_detail",
          //4040534538726674432
          "tab-menu-id": "{_menuId}",
          "tab-action-field": "typeName",
          "tab-action-tabid-field": "typeId",
          "tab-view-component": "bs-form",
          "tab-view-events-type": "add",
          "tab-view-primary-field": "typeId",
          "tab-view-primary-alias": "type_id",
          "open-parent-click": true,
          "closed-bottom-action": true
        },
        "attrsInt": {},
        "meta": {
          "html": false,
          "edit": false,
          "component": "bs-text-action",
          "componentOp": "bs-lookup-remote",
          "rowId": "1",
          "tabId": "1",
          "type": "basis",
          "span": 12
        },
        "queryMenu": {
          "parentId": "typeId"
        },
        "query": {},
        "queryLeft": {},
        "queryRight": {},
        "params": {}
      }
    }
  },
  "form": {
    "columns": {
      "parentId": {
        "sortId": 9999,
        "alias": "parent_id",
        "field": "parentId",
        "events": {},
        "attrs": {
          "label": "上级类别",
          "maxlength": 10,
          "clearable": 10,
          "multiple": false,
          "remote": true,
          "filterable": true
        },
        "meta": {
          "fromValue": true,
          "dimSessionKey": "dim-cpc-product-type-parent-id",
          "dimLocalKey": "dim-cpc-product-type-parent-id",
          "dimMkey": "cpc-product-type",
          "dimResField": "global",
          "dimColumnField": "global",
          "dimDataType": "string",
          "dimRemote": true,
          "dimUrl": null,
          "prop": "parentId",
          "rowId": 1,
          "type": "basis",
          "span": 12,
          "auth": true,
          "component": "bs-select"
        }
      }
    }
  },
  "search": {}
}
文档更新时间: 2022-06-13 09:34   作者:admin