Commit b512b8d8 authored by 田翔's avatar 田翔

fix: 反馈状态标签优化

parent 218079eb
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "6.9.8", "version": "6.9.10",
"description": "6.9.8 区域任务控件增加操作列", "description": "6.9.10 反馈状态标签优化",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -17,7 +17,7 @@ const TagPack = (props) => { ...@@ -17,7 +17,7 @@ const TagPack = (props) => {
return ( return (
<span <span
className={styles.tagPack} className={styles.tagPack}
style={{ background: hexToRgba(color, 0.4), color: color, border: color ? '1px solid' : 'none' }} style={{ background: hexToRgba(color, 0.3), color: color, border: color ? '1px solid' : 'none' }}
> >
{text} {text}
{onClose ? <CloseOutlined style={{ fontSize: '12px', marginLeft: '2px' }} onClick={() => onClose()} /> : null} {onClose ? <CloseOutlined style={{ fontSize: '12px', marginLeft: '2px' }} onClick={() => onClose()} /> : null}
......
...@@ -23,6 +23,7 @@ import { ...@@ -23,6 +23,7 @@ import {
GetCaseGISAreaData, GetCaseGISAreaData,
} from '../../../../apis/process' } from '../../../../apis/process'
import FileView from '../../../Account/components/TablePack/components/FileView' import FileView from '../../../Account/components/TablePack/components/FileView'
import TagPack from '../../../components/TagPack'
const getRings = (rings) => { const getRings = (rings) => {
rings = rings.map(ring => { rings = rings.map(ring => {
...@@ -126,6 +127,23 @@ const AreaTask = (props) => { ...@@ -126,6 +127,23 @@ const AreaTask = (props) => {
return <FileView value={row[`${v.fieldType}-${v.fieldName}`]} {...schema} /> return <FileView value={row[`${v.fieldType}-${v.fieldName}`]} {...schema} />
} }
}) })
} else if (v.fieldType === '台账' && v.fieldName === '反馈状态') {
array.push({
title: v.fieldAliasName,
dataIndex: isGIS ? v.fieldName : `${v.fieldType}-${v.fieldName}`,
key: isGIS ? v.fieldName : `${v.fieldType}-${v.fieldName}`,
render: (_, row) => {
if (!row['台账-反馈状态']) return null
let color = 'rgb(75, 172, 25)'
if (row['台账-反馈状态'] === '进行中') {
color = 'rgb(255, 169, 64)'
}
if (row['台账-反馈状态'] === '被驳回') {
color = 'rgb(255, 77, 79)'
}
return <TagPack color={color} text={row['台账-反馈状态']} />
}
})
} else { } else {
array.push({ array.push({
title: v.fieldAliasName, title: v.fieldAliasName,
...@@ -412,7 +430,7 @@ const AreaTask = (props) => { ...@@ -412,7 +430,7 @@ const AreaTask = (props) => {
let params = { let params = {
user: userID, user: userID,
mapServerName: service, mapServerName: service,
caseNo: codes['工单编号'], caseNo: codes['工单编号'] || 'QB-2024-0000088',
feedbackTableName: tableName, feedbackTableName: tableName,
caseTableName: tableNameParent, caseTableName: tableNameParent,
// sortFields: '录入时间', // sortFields: '录入时间',
...@@ -422,7 +440,7 @@ const AreaTask = (props) => { ...@@ -422,7 +440,7 @@ const AreaTask = (props) => {
// pageSize: 0, // pageSize: 0,
// queryWheres: [{ field: '工单编号', type: '等于', value: codes['工单编号'] }], // queryWheres: [{ field: '工单编号', type: '等于', value: codes['工单编号'] }],
} }
if (!codes['工单编号']) return // if (!codes['工单编号']) return
const { code, data, msg } = await GetCaseGISAreaData(params) const { code, data, msg } = await GetCaseGISAreaData(params)
if (code === 0) { if (code === 0) {
setDataSource(data) setDataSource(data)
......
...@@ -40,84 +40,86 @@ const Device = (props) => { ...@@ -40,84 +40,86 @@ const Device = (props) => {
const getView = (mapObj, Map, extentInfos, layersInfo) => { const getView = (mapObj, Map, extentInfos, layersInfo) => {
if (mapObj && layersInfo && !isSendQueryRef.current) { if (mapObj && layersInfo && !isSendQueryRef.current) {
let gisCode = '' setTimeout(() => {
let gisLayerName = '' let gisCode = ''
let values = addons?.getValues() let gisLayerName = ''
if (isObject(values)) { let values = addons?.getValues()
Object.keys(values).forEach(key => { if (isObject(values)) {
if (isObject(values[key])) { Object.keys(values).forEach(key => {
Object.keys(values[key]).forEach(k => { if (isObject(values[key])) {
if (k === 'GIS编码') { Object.keys(values[key]).forEach(k => {
gisCode = values[key][k] || '' if (k === 'GIS编码') {
} gisCode = values[key][k] || ''
if (k === 'GIS图层') { }
gisLayerName = values[key][k] || '' if (k === 'GIS图层') {
} gisLayerName = values[key][k] || ''
}) }
} })
}) }
}
if (mapObj) {
view.current = mapObj
let arr = (value && value.split(',')) || []
let obj = (arr.length === 2) ? { point: { x: Number(arr[0]), y: Number(arr[1]) } } : {}
if (arr.length === 2) {
view.current.goTo({
center: geomUtils.toGeometry({ x: Number(arr[0]), y: Number(arr[1]) }),
zoom: 15
}) })
} }
if (clickref.current) { if (mapObj) {
clickref.current?.closetip() view.current = mapObj
clickref.current = null let arr = (value && value.split(',')) || []
} let obj = (arr.length === 2) ? { point: { x: Number(arr[0]), y: Number(arr[1]) } } : {}
clickref.current = new WorkFlowEquipmentQuery({ if (arr.length === 2) {
layerInfos: layersInfo, view.current.goTo({
view: view.current, center: geomUtils.toGeometry({ x: Number(arr[0]), y: Number(arr[1]) }),
offsetX: -150, zoom: 15
offsetY: -310, })
continuous: true, }
// service: service, if (clickref.current) {
parentName: '设备选择', clickref.current?.closetip()
layerName: layerName, clickref.current = null
code: gisCode, }
gisLayerName: gisLayerName, clickref.current = new WorkFlowEquipmentQuery({
onlyWhatch: disabled, layerInfos: layersInfo,
...obj, view: view.current,
callback: ({ clickPoint, matchPoint, data }) => { offsetX: -150,
gisInfo = {} offsetY: -310,
if (layer) { continuous: true,
view.current.map.remove(layer) // service: service,
} parentName: '设备选择',
if (matchPoint) { layerName: layerName,
geometrystr = `${matchPoint.x},${matchPoint.y}` code: gisCode,
gisInfo = { layerName: data.layerName, gisCode: data.attributes.code, ...data.attributes } gisLayerName: gisLayerName,
console.log('gisInfo', gisInfo) onlyWhatch: disabled,
} else if (clickPoint) { ...obj,
geometrystr = `${clickPoint.x},${clickPoint.y}` callback: ({ clickPoint, matchPoint, data }) => {
layer = new GraphicsLayer({ gisInfo = {}
id: 'ok-layers', if (layer) {
}) view.current.map.remove(layer)
if (geometrystr) { }
const polypointGraphic = new Graphic({ if (matchPoint) {
geometry: geomUtils.toGeometry({ geometrystr = `${matchPoint.x},${matchPoint.y}`
x: Number(geometrystr.split(',')[0]), gisInfo = { layerName: data.layerName, gisCode: data.attributes.code, ...data.attributes }
y: Number(geometrystr.split(',')[1]) console.log('gisInfo', gisInfo)
}), } else if (clickPoint) {
symbol: { geometrystr = `${clickPoint.x},${clickPoint.y}`
type: "picture-marker", layer = new GraphicsLayer({
url: point, id: 'ok-layers',
width: "20px",
height: "20px"
},
}) })
layer.add(polypointGraphic) if (geometrystr) {
view.current.map.add(layer) const polypointGraphic = new Graphic({
geometry: geomUtils.toGeometry({
x: Number(geometrystr.split(',')[0]),
y: Number(geometrystr.split(',')[1])
}),
symbol: {
type: "picture-marker",
url: point,
width: "20px",
height: "20px"
},
})
layer.add(polypointGraphic)
view.current.map.add(layer)
}
} }
} }
} })
}) }
} }, 500)
isSendQueryRef.current = true isSendQueryRef.current = true
} }
} }
......
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