Ver código fonte

耕保检测研判新增接口接入

lkk 9 meses atrás
pai
commit
2fb6ccb1b4
2 arquivos alterados com 35 adições e 17 exclusões
  1. 18 1
      src/api/ghss/gdbh.js
  2. 17 16
      src/views/farmlandProtection/components/fzjcyp.vue

+ 18 - 1
src/api/ghss/gdbh.js

@@ -13,4 +13,21 @@ export function GetFactorList(params) {
         method: 'get',
         params
     })
-}
+}
+//添加模型分析研判
+export function AddGdbh(data) {
+    return request({
+        url: '/apply/gdbh/AddGdbh',
+        method: 'post',
+        data:data
+    })
+}
+//历史记录查询
+export function SelectGdbhList(params) {
+    return request({
+        url: '/apply/gdbh/SelectGdbhList',
+        method: 'get',
+        params
+    })
+}
+

+ 17 - 16
src/views/farmlandProtection/components/fzjcyp.vue

@@ -53,7 +53,7 @@ import range from "@/components/mapview/range.vue"; //绘制范围
 import zdyModelPop from "./zdyModelPop.vue"; //自定义模型面板
 import moment from "moment";
 import { Message } from "element-ui";
-import { GetMxList } from "../../../api/ghss/gdbh.js";
+import { GetMxList ,AddGdbh} from "../../../api/ghss/gdbh.js";
 export default {
   components: {
     range,
@@ -170,8 +170,9 @@ export default {
             return;
           }
           let obj = {
-            xzmj: Number(this.ruleForm.xzmj),
+            xzfw: this.$refs.range.fileDataID,
             xmmc: this.ruleForm.xmmc,
+            mxlist:this.anaModels
           };
 
           const loading = this.$loading({
@@ -185,20 +186,20 @@ export default {
             this.activeTabs = "lsju";
             this.$emit("updateParent", "activeTabs", "lsju");
           }, 1000);
-          //   AddFzxz(obj)
-          //     .then((res) => {
-          //       loading.close();
-          //       this.activeTabs = "lsju";
-          //       this.$emit("updateParent", "activeTabs", "lsju");
-          //       this.$message({
-          //         message: res.message,
-          //         type: res.success ? "success" : "warning",
-          //       });
-          //       this.reset();
-          //     }).catch((error) => {
-          //       loading.close();
-          //       Message.error(error)
-          //     });
+          AddGdbh(obj)
+              .then((res) => {
+                loading.close();
+                this.activeTabs = "lsju";
+                this.$emit("updateParent", "activeTabs", "lsju");
+                this.$message({
+                  message: res.message,
+                  type: res.success ? "success" : "warning",
+                });
+                this.reset();
+              }).catch((error) => {
+                loading.close();
+                Message.error(error)
+              });
         } else {
           loading.close();
           console.log("error submit!!");