Przeglądaj źródła

任务统一走配置文件的后台,元素个数判断优化。

DESKTOP-6LTVLN7\Liumouren 3 tygodni temu
rodzic
commit
37fc6741e4

+ 1 - 1
src/api/rwgl.js

@@ -4,7 +4,7 @@ import content from "./content";
 const dmsPath = systemConfig.dmsDataProxy;
 const multiSearch = dmsPath + "/content/multipleFormsOfJointInvestigation";
 const taskSearch = systemConfig.baseServicerPath + "/task/getTask";
-const taskExecute = "/oneMap/task/execute";
+const taskExecute = systemConfig.baseServicerPath + "/task/execute";
 
 const taskDmsId = systemConfig.columnIds[6];
 

+ 5 - 2
src/components/wgn/controlPanel.vue

@@ -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;
       // 实际项目中使用以下代码发送请求

+ 1 - 0
src/views/wgn/Example.vue

@@ -24,6 +24,7 @@ export default {
     window.loadScripts(systemConfig.example.scriptArr).then(() => {
       this.creatMap();
     });
+    // app.vue已经加过了
     // window.loadScripts([systemConfig.scriptMain]).then(() => {
     //   this.creatMap();
     // });