Commit c750767e authored by 田翔's avatar 田翔

fix: 点击官网可以选择

parent ae5505b3
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "5.6.1", "version": "5.6.2",
"description": "5.6.1 台账选择器问题修复", "description": "5.6.2 点击官网可以选择",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -41,7 +41,7 @@ const Device = (props) => { ...@@ -41,7 +41,7 @@ const Device = (props) => {
}) })
} }
clickref.current = new ClickQuery({ clickref.current = new ClickQuery({
layersInfo, layerInfos: layersInfo,
view: view.current, view: view.current,
offsetX: -150, offsetX: -150,
offsetY: -310, offsetY: -310,
...@@ -154,10 +154,20 @@ const Device = (props) => { ...@@ -154,10 +154,20 @@ const Device = (props) => {
if (isObject(values)) { if (isObject(values)) {
for (let key in values) { for (let key in values) {
if (key === 'GIS编码' && gisInfo.gisCode) { if (key === 'GIS编码' && gisInfo.gisCode) {
addons.setValue(`${v}.${key}`, gisInfo.gisCode) const schema = addons.getSchemaByPath(`${v}.${key}`);
if (['FileUpload', 'TextInput'].includes(schema.widget)) {
addons.setSchemaByPath(`${v}.${key}`, { ...schema, otherValue: gisInfo.gisCode });
} else {
addons.setValueByPath(`${v}.${key}`, gisInfo.gisCode)
}
} }
if (key === 'GIS图层' && gisInfo.layerName) { if (key === 'GIS图层' && gisInfo.layerName) {
addons.setValue(`${v}.${key}`, gisInfo.layerName) const schema = addons.getSchemaByPath(`${v}.${key}`);
if (['FileUpload', 'TextInput'].includes(schema.widget)) {
addons.setSchemaByPath(`${v}.${key}`, { ...schema, otherValue: gisInfo.layerName });
} else {
addons.setValueByPath(`${v}.${key}`, gisInfo.layerName)
}
} }
} }
} }
......
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