Commit 3b8604aa authored by 田翔's avatar 田翔

fix: 表单更新

parent 0efdc95a
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "6.10.11", "version": "6.10.13",
"description": "6.10.11 下拉框单选支持颜色", "description": "6.10.13 坐标控件回填地址名称支持文本形态",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -192,12 +192,12 @@ export const getDeptList = (params) => { ...@@ -192,12 +192,12 @@ export const getDeptList = (params) => {
} }
// 台账的配置查询 // 台账的配置查询
export function GetAccountConfigInfo(accountName) { export function GetAccountConfigInfo(accountName, time = new Date().getTime()) {
return request({ return request({
// headers: { // headers: {
// 'Civ-Site': window?.globalConfig?.userInfo?.site // 'Civ-Site': window?.globalConfig?.userInfo?.site
// }, // },
url: `${BASEURL}/GetAccountConfigInfo?accountName=${accountName}`, url: `${BASEURL}/GetAccountConfigInfo?accountName=${accountName}&time=${time}`,
method: 'get', method: 'get',
}); });
} }
......
...@@ -144,7 +144,7 @@ const RelationForm = (props) => { ...@@ -144,7 +144,7 @@ const RelationForm = (props) => {
} }
const getConfig = async () => { const getConfig = async () => {
let { code, data, msg } = await GetAccountConfigInfo(accountName) let { code, data, msg } = await GetAccountConfigInfo(accountName, new Date().getTime())
if (code === 0) { if (code === 0) {
let config = { ...data, formJson: isJson(data.formJson) ? JSON.parse(data.formJson) : {} } let config = { ...data, formJson: isJson(data.formJson) ? JSON.parse(data.formJson) : {} }
setConfig(config) setConfig(config)
...@@ -186,6 +186,7 @@ const RelationForm = (props) => { ...@@ -186,6 +186,7 @@ const RelationForm = (props) => {
pageIndex: 0, pageIndex: 0,
pageSize: 0, pageSize: 0,
queryWheres, queryWheres,
time: new Date().getTime()
} }
if (queryWheres.every(v => !v.value)) return if (queryWheres.every(v => !v.value)) return
const { code, data, msg } = await GetAccountPageList(params) const { code, data, msg } = await GetAccountPageList(params)
...@@ -342,7 +343,7 @@ const RelationForm = (props) => { ...@@ -342,7 +343,7 @@ const RelationForm = (props) => {
} }
const getConfigOther = async () => { const getConfigOther = async () => {
let { code, data, msg } = await GetAccountConfigInfo(otherSource.accountName) let { code, data, msg } = await GetAccountConfigInfo(otherSource.accountName, new Date().getTime())
if (code === 0) { if (code === 0) {
setConfigOther({ ...data, formJson: isJson(data.formJson) ? JSON.parse(data.formJson) : {} }) setConfigOther({ ...data, formJson: isJson(data.formJson) ? JSON.parse(data.formJson) : {} })
getDataSourceOther({}) getDataSourceOther({})
......
...@@ -184,7 +184,13 @@ const Coordinate = (props) => { ...@@ -184,7 +184,13 @@ const Coordinate = (props) => {
if (code === '0' && isJson(data)) { if (code === '0' && isJson(data)) {
let res = JSON.parse(data) || {} let res = JSON.parse(data) || {}
let text = res?.result?.addressComponent?.poi || res?.result?.formatted_address || '' let text = res?.result?.addressComponent?.poi || res?.result?.formatted_address || ''
addons.setValue(targetPath, text) const schema = addons.getSchemaByPath(targetPath);
if (['TextInput', 'fileUpload'].includes(schema.widget)) {
addons.setSchemaByPath(targetPath, { ...schema, otherValue: text });
} else {
addons.setValue(targetPath, text || '');
}
// addons.setValue(targetPath, text)
} }
} }
} }
......
...@@ -33,7 +33,8 @@ const DrawPath = (props) => { ...@@ -33,7 +33,8 @@ const DrawPath = (props) => {
let layer = new Graphic({ let layer = new Graphic({
geometry: geomUtils.toGeometry(JSON.parse(value)), geometry: geomUtils.toGeometry(JSON.parse(value)),
symbol: new SimpleLineSymbol({ symbol: new SimpleLineSymbol({
// color: "#ff0000",
width: 2
}), }),
}) })
layers.current = new GraphicsLayer() layers.current = new GraphicsLayer()
...@@ -68,8 +69,59 @@ const DrawPath = (props) => { ...@@ -68,8 +69,59 @@ const DrawPath = (props) => {
let layer = new Graphic({ let layer = new Graphic({
geometry: geometry, geometry: geometry,
symbol: new SimpleLineSymbol({ symbol: new SimpleLineSymbol({
// color: "#ff0000",
width: 2
}), }),
// symbol: {
// type: "CIMLineSymbol",
// symbolLayers: [{
// // black 1px line symbol
// type: "CIMSolidStroke",
// enable: true,
// width: 1,
// color: [0, 0, 0, 255]
// },
// {
// // arrow symbol
// type: "CIMVectorMarker",
// enable: true,
// size: 5,
// markerPlacement: {
// type: "CIMMarkerPlacementAlongLineSameSize", // places same size markers along the line
// endings: "WithMarkers",
// placementTemplate: [19.5], // determines space between each arrow
// angleToLine: true // symbol will maintain its angle to the line when map is rotated
// },
// frame: {
// xmin: -5,
// ymin: -5,
// xmax: 5,
// ymax: 5
// },
// markerGraphics: [{
// type: "CIMMarkerGraphic",
// geometry: {
// rings: [
// [
// [-8, -5.47],
// [-8, 5.6],
// [1.96, -0.03],
// [-8, -5.47]
// ]
// ]
// },
// symbol: {
// // black fill for the arrow symbol
// type: "CIMPolygonSymbol",
// symbolLayers: [{
// type: "CIMSolidFill",
// enable: true,
// color: [0, 0, 0, 255]
// }]
// }
// }]
// }]
// }
}) })
layers.current = new GraphicsLayer() layers.current = new GraphicsLayer()
layers.current.add(layer) layers.current.add(layer)
......
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