Commit b512b8d8 authored by 田翔's avatar 田翔

fix: 反馈状态标签优化

parent 218079eb
{
"name": "panda-xform",
"version": "6.9.8",
"description": "6.9.8 区域任务控件增加操作列",
"version": "6.9.10",
"description": "6.9.10 反馈状态标签优化",
"keywords": [
"panda-xform"
],
......
......@@ -17,7 +17,7 @@ const TagPack = (props) => {
return (
<span
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}
{onClose ? <CloseOutlined style={{ fontSize: '12px', marginLeft: '2px' }} onClick={() => onClose()} /> : null}
......
......@@ -23,6 +23,7 @@ import {
GetCaseGISAreaData,
} from '../../../../apis/process'
import FileView from '../../../Account/components/TablePack/components/FileView'
import TagPack from '../../../components/TagPack'
const getRings = (rings) => {
rings = rings.map(ring => {
......@@ -126,6 +127,23 @@ const AreaTask = (props) => {
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 {
array.push({
title: v.fieldAliasName,
......@@ -412,7 +430,7 @@ const AreaTask = (props) => {
let params = {
user: userID,
mapServerName: service,
caseNo: codes['工单编号'],
caseNo: codes['工单编号'] || 'QB-2024-0000088',
feedbackTableName: tableName,
caseTableName: tableNameParent,
// sortFields: '录入时间',
......@@ -422,7 +440,7 @@ const AreaTask = (props) => {
// pageSize: 0,
// queryWheres: [{ field: '工单编号', type: '等于', value: codes['工单编号'] }],
}
if (!codes['工单编号']) return
// if (!codes['工单编号']) return
const { code, data, msg } = await GetCaseGISAreaData(params)
if (code === 0) {
setDataSource(data)
......
......@@ -40,84 +40,86 @@ const Device = (props) => {
const getView = (mapObj, Map, extentInfos, layersInfo) => {
if (mapObj && layersInfo && !isSendQueryRef.current) {
let gisCode = ''
let gisLayerName = ''
let values = addons?.getValues()
if (isObject(values)) {
Object.keys(values).forEach(key => {
if (isObject(values[key])) {
Object.keys(values[key]).forEach(k => {
if (k === 'GIS编码') {
gisCode = 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
setTimeout(() => {
let gisCode = ''
let gisLayerName = ''
let values = addons?.getValues()
if (isObject(values)) {
Object.keys(values).forEach(key => {
if (isObject(values[key])) {
Object.keys(values[key]).forEach(k => {
if (k === 'GIS编码') {
gisCode = values[key][k] || ''
}
if (k === 'GIS图层') {
gisLayerName = values[key][k] || ''
}
})
}
})
}
if (clickref.current) {
clickref.current?.closetip()
clickref.current = null
}
clickref.current = new WorkFlowEquipmentQuery({
layerInfos: layersInfo,
view: view.current,
offsetX: -150,
offsetY: -310,
continuous: true,
// service: service,
parentName: '设备选择',
layerName: layerName,
code: gisCode,
gisLayerName: gisLayerName,
onlyWhatch: disabled,
...obj,
callback: ({ clickPoint, matchPoint, data }) => {
gisInfo = {}
if (layer) {
view.current.map.remove(layer)
}
if (matchPoint) {
geometrystr = `${matchPoint.x},${matchPoint.y}`
gisInfo = { layerName: data.layerName, gisCode: data.attributes.code, ...data.attributes }
console.log('gisInfo', gisInfo)
} else if (clickPoint) {
geometrystr = `${clickPoint.x},${clickPoint.y}`
layer = new GraphicsLayer({
id: 'ok-layers',
})
if (geometrystr) {
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"
},
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) {
clickref.current?.closetip()
clickref.current = null
}
clickref.current = new WorkFlowEquipmentQuery({
layerInfos: layersInfo,
view: view.current,
offsetX: -150,
offsetY: -310,
continuous: true,
// service: service,
parentName: '设备选择',
layerName: layerName,
code: gisCode,
gisLayerName: gisLayerName,
onlyWhatch: disabled,
...obj,
callback: ({ clickPoint, matchPoint, data }) => {
gisInfo = {}
if (layer) {
view.current.map.remove(layer)
}
if (matchPoint) {
geometrystr = `${matchPoint.x},${matchPoint.y}`
gisInfo = { layerName: data.layerName, gisCode: data.attributes.code, ...data.attributes }
console.log('gisInfo', gisInfo)
} else if (clickPoint) {
geometrystr = `${clickPoint.x},${clickPoint.y}`
layer = new GraphicsLayer({
id: 'ok-layers',
})
layer.add(polypointGraphic)
view.current.map.add(layer)
if (geometrystr) {
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
}
}
......
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