Commit dc011b5b authored by 田翔's avatar 田翔

fix: 坐标获取地址修复

parent ab875fa9
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "5.0.3", "version": "5.0.4",
"description": "5.0.3 设备选择映射字段支持清空,缩略图优化", "description": "5.0.4 坐标获取地址修复",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -63,7 +63,7 @@ const textWidgets = [ ...@@ -63,7 +63,7 @@ const textWidgets = [
title: '文本', title: '文本',
type: 'string', type: 'string',
widget: 'TextInput', widget: 'TextInput',
placeholder: '请输入内容', placeholder: '',
}, },
setting: { setting: {
widget: { widget: {
...@@ -248,7 +248,7 @@ const textWidgets = [ ...@@ -248,7 +248,7 @@ const textWidgets = [
title: '多行文本', title: '多行文本',
type: 'string', type: 'string',
widget: 'TextArea', widget: 'TextArea',
placeholder: '请输入内容' placeholder: ''
}, },
setting: { setting: {
widget: { widget: {
...@@ -368,7 +368,7 @@ const textWidgets = [ ...@@ -368,7 +368,7 @@ const textWidgets = [
type: 'string', type: 'string',
widget: 'NumberInput', widget: 'NumberInput',
presetValue: '0', presetValue: '0',
placeholder: '请输入内容', placeholder: '',
}, },
setting: { setting: {
widget: { widget: {
...@@ -716,7 +716,7 @@ const textWidgets = [ ...@@ -716,7 +716,7 @@ const textWidgets = [
title: '地址', title: '地址',
type: 'string', type: 'string',
widget: 'SearchLocation', widget: 'SearchLocation',
placeholder: '请输入地址', placeholder: '',
}, },
setting: { setting: {
widget: { widget: {
...@@ -829,7 +829,7 @@ const selectWidgets = [ ...@@ -829,7 +829,7 @@ const selectWidgets = [
placeholder: { placeholder: {
title: '提示语', title: '提示语',
type: 'string', type: 'string',
default: '点击下拉选择内容', default: '',
}, },
description: { description: {
title: '字段说明', title: '字段说明',
...@@ -1315,7 +1315,7 @@ const selectWidgets = [ ...@@ -1315,7 +1315,7 @@ const selectWidgets = [
name: '关联选择', name: '关联选择',
type: 'string', type: 'string',
widget: 'RelevanceSelect', widget: 'RelevanceSelect',
placeholder: '请选择内容', placeholder: '',
}, },
setting: { setting: {
widget: { widget: {
...@@ -1401,7 +1401,7 @@ const selectWidgets = [ ...@@ -1401,7 +1401,7 @@ const selectWidgets = [
name: '级联选择', name: '级联选择',
type: 'string', type: 'string',
widget: 'CascadeSelector', widget: 'CascadeSelector',
placeholder: '点击下拉选择内容', placeholder: '',
}, },
setting: { setting: {
widget: { widget: {
...@@ -1504,7 +1504,7 @@ const businessWidgets = [ ...@@ -1504,7 +1504,7 @@ const businessWidgets = [
title: '人员选择', title: '人员选择',
type: 'string', type: 'string',
widget: 'PersonSelector', widget: 'PersonSelector',
placeholder: '点击选择人员', placeholder: '',
}, },
setting: { setting: {
widget: { widget: {
...@@ -1625,7 +1625,7 @@ const businessWidgets = [ ...@@ -1625,7 +1625,7 @@ const businessWidgets = [
title: '部门选择', title: '部门选择',
type: 'string', type: 'string',
widget: 'DeptSelector', widget: 'DeptSelector',
placeholder: '点击选择部门', placeholder: '',
}, },
setting: { setting: {
widget: { widget: {
...@@ -1721,7 +1721,7 @@ const businessWidgets = [ ...@@ -1721,7 +1721,7 @@ const businessWidgets = [
title: '台账选择', title: '台账选择',
type: 'string', type: 'string',
widget: 'AccountSelector', widget: 'AccountSelector',
placeholder: '点击输入框弹出选择框', placeholder: '',
}, },
setting: { setting: {
widget: { widget: {
...@@ -1839,7 +1839,7 @@ const dateWidgets = [ ...@@ -1839,7 +1839,7 @@ const dateWidgets = [
title: '日期选择', title: '日期选择',
type: 'string', type: 'string',
widget: 'DateTime', widget: 'DateTime',
placeholder: '请选择日期', placeholder: '',
}, },
setting: { setting: {
widget: { widget: {
...@@ -1939,7 +1939,7 @@ const dateWidgets = [ ...@@ -1939,7 +1939,7 @@ const dateWidgets = [
title: '时间选择', title: '时间选择',
type: 'string', type: 'string',
widget: 'Time', widget: 'Time',
placeholder: '请选择时间', placeholder: '',
}, },
setting: { setting: {
widget: { widget: {
...@@ -2160,7 +2160,7 @@ const mapWidgets = [ ...@@ -2160,7 +2160,7 @@ const mapWidgets = [
title: '地图坐标', title: '地图坐标',
type: 'string', type: 'string',
widget: 'Coordinate', widget: 'Coordinate',
placeholder: '请选择地图坐标', placeholder: '',
}, },
setting: { setting: {
widget: { widget: {
...@@ -2259,7 +2259,7 @@ const mapWidgets = [ ...@@ -2259,7 +2259,7 @@ const mapWidgets = [
title: '设备选择', title: '设备选择',
type: 'string', type: 'string',
widget: 'Device', widget: 'Device',
placeholder: '请选择设备', placeholder: '',
}, },
setting: { setting: {
widget: { widget: {
...@@ -2353,7 +2353,7 @@ const mapWidgets = [ ...@@ -2353,7 +2353,7 @@ const mapWidgets = [
title: '路径控件', title: '路径控件',
type: 'string', type: 'string',
widget: 'DrawPath', widget: 'DrawPath',
placeholder: '绘制地图路径', placeholder: '',
}, },
setting: { setting: {
widget: { widget: {
...@@ -2440,7 +2440,7 @@ const mapWidgets = [ ...@@ -2440,7 +2440,7 @@ const mapWidgets = [
title: '区域控件', title: '区域控件',
type: 'string', type: 'string',
widget: 'DrawArea', widget: 'DrawArea',
placeholder: '绘制地图区域', placeholder: '',
}, },
setting: { setting: {
widget: { widget: {
......
...@@ -171,7 +171,9 @@ const Coordinate = (props) => { ...@@ -171,7 +171,9 @@ const Coordinate = (props) => {
const getAddress = async (presetValue) => { const getAddress = async (presetValue) => {
if (presetValue) { if (presetValue) {
const { code, data } = await getLocation(presetValue) let coordinate = presetValue.split(',')
let LngLat = mercatorToLngLat(coordinate[0], coordinate[1])
const { code, data } = await getLocation(LngLat.join(','))
if (Array.isArray(data) && data.length) { if (Array.isArray(data) && data.length) {
const { pname, adname, name, address } = data[0] const { pname, adname, name, address } = data[0]
setText(`${pname}/${adname}/${name}`) setText(`${pname}/${adname}/${name}`)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment