| | |
| | | |
| | | |
| | | export function getDictLabel(value, dictList) { |
| | | return dictList.find(item => item.dictKey === value)?.dictValue || value || '-' |
| | | return dictList.find(item => item.dictKey === String(value))?.dictValue || value || '' |
| | | } |
| | | |
| | | export function blobDownload(res) { |
| | |
| | | elink.click() |
| | | document.body.removeChild(elink) |
| | | } |
| | | |
| | | export function geomAnalysis(str) { |
| | | if (!str) return [] |
| | | return str |
| | | .replace('POLYGON((', '') |
| | | .replace('))', '') |
| | | .split(',') |
| | | .map(pair => { |
| | | const [longitude, latitude] = pair.trim().split(' ').map(Number) |
| | | return { longitude, latitude } |
| | | }) |
| | | } |