|
@@ -37,11 +37,19 @@ export function dealWithData(data: Recordable, type: string) {
|
|
|
case BaseZoning.ZONING_POSTAL_CODE:
|
|
|
// 并接邮编显示
|
|
|
const filterData = newData.filter(item => item.startZipCode && item.endZipCode)
|
|
|
- str = filterData.map(item => {
|
|
|
- const startZipCode = item.startZipCode || ''
|
|
|
- const endZipCode = item.endZipCode || ''
|
|
|
- return startZipCode + ',' + endZipCode
|
|
|
- }).join('|')
|
|
|
+ if (isArrayLength(filterData)) {
|
|
|
+ str = filterData.map(item => {
|
|
|
+ const startZipCode = item.startZipCode || ''
|
|
|
+ const endZipCode = item.endZipCode || ''
|
|
|
+ return startZipCode + ',' + endZipCode
|
|
|
+ }).join('|')
|
|
|
+ } else {
|
|
|
+ str = newData.map(item => {
|
|
|
+ const startZipCode = item.startZipCode || ''
|
|
|
+ const endZipCode = item.endZipCode || ''
|
|
|
+ return startZipCode + ',' + endZipCode
|
|
|
+ }).join('|')
|
|
|
+ }
|
|
|
break;
|
|
|
default:
|
|
|
break;
|