注意 distance geography


"responseField": {

    // #endregion 查找带回
    "view": {
      // #region 计算2点之间距离
      "all": "{distance} distance",
      "order": " {distance},modify_date",
      // #endregion 计算2点之间距离
      "showExtand": "{geography},null lng_lat",
      "bridgeColumnExtand": "lng_lat",
      "originalExtand": "0.0 lng,0.0 lat",
      "show": "merc_id,merc_name,merc_code,business_id,img_url,area_code,address,propertys,freight_insurance,freight_max_price,packing_free,boundary,min_price,contact_us,contact_tel",
      "original": "",
      "viewCountClosed": true,
      "where": " {where_sql} and is_enabled=1 and audit_status=1"
    },
    "view_detail": {
      // #region 计算2点之间距离
      "all": "{distance} distance",
      "order": " {distance},modify_date",
      // #endregion 计算2点之间距离
      "showExtand": "{geography},null lng_lat",
      "bridgeColumnExtand": "lng_lat",
      "originalExtand": "0.0 lng,0.0 lat",
      "show": "merc_id,merc_name,merc_code,business_id,img_url,area_code,address,propertys,freight_insurance,freight_max_price,packing_free,boundary,min_price,contact_us,contact_tel,content",
      "primaryWhere": " {s-if:mercId}{op-neq:0} merc_id=@mercId {op-neq:0}{e-if:mercId} {s-if:mercId}{op-eq:0} is_enabled=1 and audit_status=1 {op-eq:0}{e-if:mercId}",
      "original": "",
      "viewCountClosed": false
    }
  },
{
  "columns": {
    // #region 计算2点之间距离
    "distance": {
      "tableId": 1,
      "field": "distance",
      "dataType": "varchar",
      "title": "距离",
      "remark": "计算2点之间距离",
      "name": "distance",
      "alias": "distance",
      "isData": false,
      "geography": {
        "type": "point2point",
        "geography": "geography",
        "pointLng": null,
        "pointLat": null,
        "endLng": "@_userLng",
        "endLat": "@_userLat",
        "line": null,
        "polygon": null
      },
      "editPropertie": { "showMethod": "text" },
      "pagePropertie": {
        "showMethod": "text"
      },
      "maxLength": 36,
      "range": [
        {
          "min": 0,
          "max": 1000,
          "format": "f0",
          "unit": "m"
        },
        {
          "min": 1000,
          "format": "f2",
          "unit": "km",
          "divisor": 1000
        }
      ],
      "placeholder": "-"
    },
    // #endregion 计算2点之间距离
    "geography": {
      "tableId": 1,
      "field": "geography",
      "dataType": "geography",
      "title": "地理位置",
      "name": "geography",
      "alias": "geography",
      "isData": true,
      "geography": {
        "type": "point",
        "geography": "geography",
        "outPut": "lnglat"
      },
      "editPropertie": {
        "showMethod": "text"
      },
      "pagePropertie": {
        "showMethod": "text"
      },
      "maxLength": -1
    },
    "lng": {
      "extendAlias": "lng",
      "tableId": 1,
      "field": "lng",
      "dataType": "numeric",
      "title": "经度",
      "name": "lng",
      "alias": "lng",
      "maxLength": 18,
      "colDecimal": 15
    },
    "lat": {
      "extendAlias": "lat",
      "tableId": 1,
      "field": "lat",
      "dataType": "numeric",
      "title": "纬度",
      "name": "lat",
      "alias": "lat",
      "maxLength": 17,
      "colDecimal": 15
    }
  }
}
文档更新时间: 2022-06-04 16:28   作者:admin