|
|
@@ -607,7 +607,8 @@ export default {
|
|
|
return null;
|
|
|
},
|
|
|
/**
|
|
|
- * 发送前校验:以「元素个数」numberOf 为主,与入参 FeatureCollection.features 数量对齐;
|
|
|
+ * 发送前校验:当「元素个数」numberOf > 0 时,与入参 FeatureCollection.features 数量对齐;
|
|
|
+ * numberOf 为 0 时表示几何要素个数不固定(支持多个),不拦截数量。
|
|
|
* 「参数类型」elementTypes 中的 point/polyline/polygon 仅表示允许的几何类型(可多选),
|
|
|
* 不要求每种类型各来一个,也不要求与声明顺序一一对应(忽略 unit/file 等非几何项)。
|
|
|
*/
|
|
|
@@ -633,7 +634,8 @@ export default {
|
|
|
let expectedGeomCount = null;
|
|
|
if (rawN !== undefined && rawN !== null && rawN !== "") {
|
|
|
const parsedN = typeof rawN === "number" ? rawN : Number(rawN);
|
|
|
- if (Number.isFinite(parsedN) && parsedN >= 0) {
|
|
|
+ // 0 表示不固定个数、支持多个要素,不做「元素个数」与 features 数量对齐拦截
|
|
|
+ if (Number.isFinite(parsedN) && parsedN > 0) {
|
|
|
expectedGeomCount = parsedN;
|
|
|
}
|
|
|
}
|
|
|
@@ -3445,6 +3447,7 @@ export default {
|
|
|
requestData.append(key, this.params[key]);
|
|
|
}
|
|
|
});
|
|
|
+ requestData.append("token", localStorage.getItem("token"));
|
|
|
}
|
|
|
let that = this;
|
|
|
// 实际项目中使用以下代码发送请求
|