Commit 54f867eb authored by 田翔's avatar 田翔

fix: 区域任务列表实现照片预览

parent 333803de
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "6.7.5", "version": "6.7.6",
"description": "6.7.5 列表显示数值配置问题", "description": "6.7.6 区域任务列表实现照片预览",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -14,7 +14,7 @@ import { ...@@ -14,7 +14,7 @@ import {
SimpleFillSymbol, SimpleFillSymbol,
} from '@wisdom-map/arcgismap' } from '@wisdom-map/arcgismap'
import Drag from '../../../components/Drag' import Drag from '../../../components/Drag'
import { isJson, isObject, getNanoid, mercatorToLngLat } from '../../../../utils' import { isJson, isObject, getNanoid, mercatorToLngLat, getFieldInfo } from '../../../../utils'
import { import {
FetchAreaList, FetchAreaList,
GetAreaLayerTaskData, GetAreaLayerTaskData,
...@@ -22,6 +22,7 @@ import { ...@@ -22,6 +22,7 @@ import {
GetAccountPageList, GetAccountPageList,
GetCaseGISAreaData, GetCaseGISAreaData,
} from '../../../../apis/process' } from '../../../../apis/process'
import FileView from '../../../Account/components/TablePack/components/FileView'
const getRings = (rings) => { const getRings = (rings) => {
rings = rings.map(ring => { rings = rings.map(ring => {
...@@ -110,15 +111,31 @@ const AreaTask = (props) => { ...@@ -110,15 +111,31 @@ const AreaTask = (props) => {
const columns = useMemo(() => { const columns = useMemo(() => {
let array = [] let array = []
let widgetInfo = {}
if (formJson) {
widgetInfo = getFieldInfo(JSON.parse(formJson))
}
fieldList?.forEach(v => { fieldList?.forEach(v => {
array.push({ let schema = widgetInfo[v.fieldName]
title: v.fieldAliasName, if (v.fieldType === '台账' && schema?.widget === 'FileUpload') {
dataIndex: isGIS ? v.fieldName : `${v.fieldType}-${v.fieldName}`, array.push({
key: isGIS ? v.fieldName : `${v.fieldType}-${v.fieldName}`, title: v.fieldAliasName,
}) dataIndex: isGIS ? v.fieldName : `${v.fieldType}-${v.fieldName}`,
key: isGIS ? v.fieldName : `${v.fieldType}-${v.fieldName}`,
render: (value) => {
return <FileView value={value} {...schema} />
}
})
} else {
array.push({
title: v.fieldAliasName,
dataIndex: isGIS ? v.fieldName : `${v.fieldType}-${v.fieldName}`,
key: isGIS ? v.fieldName : `${v.fieldType}-${v.fieldName}`,
})
}
}) })
return array return array
}, [isGIS, fieldList]) }, [isGIS, fieldList, formJson])
const onSelect = (value, areaList) => { const onSelect = (value, areaList) => {
setSelectedKeys(value) setSelectedKeys(value)
...@@ -219,8 +236,10 @@ const AreaTask = (props) => { ...@@ -219,8 +236,10 @@ const AreaTask = (props) => {
} }
const showMap = () => { const showMap = () => {
getData(value) if (addons) {
setVisible(true) getData(value)
setVisible(true)
}
} }
const onCancel = () => { const onCancel = () => {
...@@ -338,7 +357,7 @@ const AreaTask = (props) => { ...@@ -338,7 +357,7 @@ const AreaTask = (props) => {
} }
} }
const getDataSource = async (presetValue) => { const getDataSource = async () => {
let params = { let params = {
user: userID, user: userID,
mapServerName: service, mapServerName: service,
...@@ -365,7 +384,7 @@ const AreaTask = (props) => { ...@@ -365,7 +384,7 @@ const AreaTask = (props) => {
addons.setValueByPath(addons.dataPath, presetValue) addons.setValueByPath(addons.dataPath, presetValue)
if (presetValue) { if (presetValue) {
getConfig() getConfig()
getDataSource(presetValue) getDataSource()
} }
} else { } else {
onChange(presetValue) onChange(presetValue)
......
...@@ -115,6 +115,7 @@ const TextInput = (props) => { ...@@ -115,6 +115,7 @@ const TextInput = (props) => {
setShowValue(valueNext) setShowValue(valueNext)
if (isStoreID && valueNext) { if (isStoreID && valueNext) {
if (textDefalut === '【本人姓名】') { if (textDefalut === '【本人姓名】') {
console.log('props', props, valueNext)
getUserInfo(valueNext) getUserInfo(valueNext)
} else if (textDefalut === '【本人部门】') { } else if (textDefalut === '【本人部门】') {
getDeptInfo(valueNext) getDeptInfo(valueNext)
......
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