前端使用 columnAlias usercount

handleLoadMyFactory(v) {
        let that = this;
        // that.filter.remoteName = v;
        // that.filter.word = v;
        method.loadDataComm(that, {
          factName: this.filter.word,
          _columnAlias:"fact_id,fact_name,user_count,audit_status,factory_user",
          pageSize: 300,
        }, null, {
          mkey: "cpc-ws-factory",
          field: "my",
        }, { data: 'myFactory' })
      },

mapper配置

{
  "rules": {},
  "responseField": {},
  "columns": {
    //#region 配置in查询
    //"userType": {
    //  "filter": {
    //    "method": "in"
    //  },
    //  "isSearch": true,
    //  "isData": true
    //}
    //#endregion 配置in查询
    "userCount": {
      "fieldSort": 9999,
      "tableId": 1,
      "dataType": "varchar",
      "title": "成员数",
      "remark": "成员数",
      "guidMethod": "None",
      "isRequired": false,
      "isSearch": false,
      "isData": false,
      "editPropertie": {
        "showMethod": "text"
      },
      "pagePropertie": {
        "showMethod": "text"
      },
      "filter": {},
      "sqlNames": "(select count(fu_id) from cpc_ws_factory_user where factory_id=fact_id) user_count",
      "field": "userCount",
      "name": "user_count",
      "alias": "user_count",
      "isDate": false,
      "isPrimary": false,
      "isIdentity": false,
      "maxLength": 50
    }
    // #endregion 查找带回
  },
  "dimDatas": {}
}
文档更新时间: 2022-07-06 06:32   作者:admin