Преглед на файлове

由于业务需要,DMS新建我的任务模型(app专用)。

DESKTOP-6LTVLN7\Liumouren преди 2 години
родител
ревизия
5550a2ad82
променени са 3 файла, в които са добавени 31 реда и са изтрити 28 реда
  1. 19 26
      src/components/common/BottomForm/PutPhone.vue
  2. 1 1
      src/components/map/MapHolder.vue
  3. 11 1
      vue.config.js

+ 19 - 26
src/components/common/BottomForm/PutPhone.vue

@@ -10,7 +10,7 @@
     <template slot="title">
       <div class="dialogTitle">
         <div class="dialogTitleIcon"></div>
-        发到手机-新建任务
+        新建现场核查任务
       </div>
     </template>
     <el-form ref="createTaskForm" :model="createTaskForm" :rules="createTaskRrules" label-width="80px">
@@ -325,38 +325,31 @@ export default {
       this.$refs[formName].validate(valid => {
         if (valid) {
           if (this.createTaskForm.c_doubtful_points.length > 0) {
-            let changeMyTaskItem = this.associatedItemsOptionsDataIdByItem[this.createTaskForm.c_associated_item_ids];
             let content_ = {
-              id: changeMyTaskItem.id,
-              title: changeMyTaskItem.title,
-              content: changeMyTaskItem.content
+              title: this.createTaskForm.c_task_name,
+              content: this.createTaskForm.content,
+              c_task_id: this.createTaskForm.c_associated_item_ids,
+              c_user_id: localStorage.getItem("USER_ID")
             };
-            for (let key in changeMyTaskItem) {
-              if (key.indexOf("c_") == 0) {
-                if (typeof changeMyTaskItem[key] == "object") {
-                  content_[key] = JSON.stringify(changeMyTaskItem[key]);
-                } else {
-                  content_[key] = changeMyTaskItem[key];
-                }
-              }
-            }
-            content_["c_app_tag"] = true;
-            content_["c_app_state"] = 0;
-            content_["c_app_title"] = this.createTaskForm.c_task_name;
-            content_["c_app_content"] = this.createTaskForm.content;
-            content_["c_create_time"] = parseInt(new Date().getTime() / 1000) * 1000;
             // 修改当前模型图层数据,并重新进行叠置
             let modifyParams = new FormData();
             modifyParams = {
-              columnId: changeMyTaskItem.column_id,
-              modelId: changeMyTaskItem.model_id,
+              columnId: 1794,
+              modelId: 1130,
               content: JSON.stringify(content_)
             };
-            this.$Post(this.urlsCollection.updateContent, modifyParams).then(res => {
-              if (res.code !== 200) {
-                this.$message.error("任务修改失败!请联系开发人员修复!");
+            this.$Post(this.urlsCollection.addContent, modifyParams).then(
+              res => {
+                if (res.code === 200) {
+                  console.log("我的任务发送成功");
+                }
+              },
+              error => {
+                this.submitLoading = false;
+                this.$message.error(error);
               }
-            });
+            );
+            // 【】
             this.createTaskForm.c_doubtful_points.forEach(item => {
               this.createTaskForm.c_doubtful_points = item[1];
               this.createTaskForm.c_task_id = this.createTaskForm.c_associated_item_ids;
@@ -411,7 +404,7 @@ export default {
       layerParams = {
         columnId: columnId,
         states: "0,1,2,3",
-        pageSize: 9999,
+        pageSize: 100,
         page: 0
       };
       this.$Post(this.urlsCollection.selectContentList, layerParams).then(

+ 1 - 1
src/components/map/MapHolder.vue

@@ -718,7 +718,7 @@ export default {
       map2DViewer.map.setView(center, zoom);
     },
     renderPolygon: function (feature) {
-      let center = turf.center(feature.geometry);
+      let center = turf.centroid(feature.geometry);
       // let itemvalue = JSON.parse((Math.random() * 1000).toFixed(0));
       let name = feature.properties.NAME;
 

+ 11 - 1
vue.config.js

@@ -66,24 +66,34 @@ module.exports = {
       //   target: "http://121.43.55.7:10013",
       //   changeOrigin: true, // 允许跨域
       // },
+      // 小点声
       // "/oauth": {
       //   target: "http://117.131.26.69:10081",
       //   changeOrigin: true, // 允许跨域
       //   pathRewrite: {
-      //     "^/oauth" : "/proxy_oauth"
+      //     "^/oauth": "/proxy_oauth"
       //   }
       // },
       // "/dms": {
       //   target: "http://117.131.26.69:10081",
       //   changeOrigin: true, // 允许跨域
+      //   pathRewrite: {
+      //     "^/dms": "/proxy_dms"
+      //   }
       // },
       // "/conllection": {
       //   target: "http://117.131.26.69:10081",
       //   changeOrigin: true, // 允许跨域
+      //   pathRewrite: {
+      //     "^/conllection": "/proxy_conllection"
+      //   }
       // },
       // "/audit": {
       //   target: "http://117.131.26.69:10081",
       //   changeOrigin: true, // 允许跨域
+      //   pathRewrite: {
+      //     "^/audit": "/proxy_audit"
+      //   }
       // },
 
       "/oauth": {