Эх сурвалжийг харах

新建项目接口调试完成

lkk 1 жил өмнө
parent
commit
2330312b85

+ 10 - 1
src/api/ghss/ghxz.js

@@ -31,4 +31,13 @@ export function AddFzxz(data) {
         method: 'post',
         data:data
     })
-}
+}
+
+// 选址结果信息
+export function GetXzjg(params) {
+    return request({
+        url: '/analyse/fzss/GetXzjg',
+        method: 'get',
+        params
+    })
+}

+ 53 - 34
src/views/siteselection/components/fzxz.vue

@@ -113,7 +113,7 @@
 <script>
 import yxyzPop from "./yxyzPop.vue"; ///mapview/range
 import range from "@/components/mapview/range.vue"; ///mapview/range
-import { GetDldmTree, GetSjyList ,AddFzxz} from "../../../api/ghss/ghxz.js";
+import { GetDldmTree, GetSjyList, AddFzxz } from "../../../api/ghss/ghxz.js";
 import hgxfx from "../../../../static/data/ghss/data.js";
 export default {
   components: {
@@ -459,40 +459,59 @@ export default {
       this.ruleForm.xzmj = _temp.xzmj || hgxfx.xzmj;
       this.$refs.ruleForm.validate((valid) => {
         if (valid) {
-          // let obj = {
-          //   xzmj: this.ruleForm.xzmj,
-          //   xmmc: this.ruleForm.xmmc,
-          //   xmlx: this.ruleForm.xmlx,
-          //   jsdw: this.ruleForm.jsdw,
-          //   ydxz_bsm: this.ydlxBSM, //用地性质标识码
-          //   // ydlx: this.ruleForm.ydlx,
-          //   ydmjbegin: this.ruleForm.ydmjbegin, //用地面积开始
-          //   ydmjend: this.ruleForm.ydmjend, //用地面积结束
-          //   sjy: this.sjyBSM, //数据源标识码
-          //   geomId: this.$refs.range.fileDataID,
-          //   yxyz: this.tableData,
-          // };
-          // console.log(obj, "objobj");
-          // AddFzxz(obj).then((res) => {
-          //   console.log(res, "哈哈哈哈哈");
-          // });
-
-          const loading = this.$loading({
-            lock: true,
-            text: "分析中",
-            spinner: "el-icon-loading",
-            background: "rgba(0, 0, 0, 0.7)",
+          let obj = {
+            xzmj: Number(this.ruleForm.xzmj),
+            xmmc: this.ruleForm.xmmc,
+            xmlx: this.ruleForm.xmlx,
+            jsdw: this.ruleForm.jsdw,
+            ydxz_bsm: this.ydlxBSM, //用地性质标识码
+            // ydlx: this.ruleForm.ydlx,
+            ydmjbegin: Number(this.ruleForm.ydmjbegin), //用地面积开始
+            ydmjend: Number(this.ruleForm.ydmjend), //用地面积结束
+            sjy: this.sjyBSM, //数据源标识码
+            geomId: this.$refs.range.fileDataID,
+            yxyz: this.tableData,
+          };
+          console.log(obj, "objobj");
+          AddFzxz(obj).then((res) => {
+            console.log(res, "哈哈哈哈哈");
+            if (res.success) {
+              // this.bus.$emit("recordBsm", res.data.rwbsm);
+              const loading = this.$loading({
+                lock: true,
+                text: "分析中",
+                spinner: "el-icon-loading",
+                background: "rgba(0, 0, 0, 0.7)",
+              });
+              setTimeout(() => {
+                loading.close();
+                this.activeTabs = "lsju";
+                this.$emit("updateParent", "activeTabs", "lsju");
+                this.$message({
+                  message: "分析成功!",
+                  type: "success",
+                });
+                this.reset();
+              }, 2000);
+            }
           });
-          setTimeout(() => {
-            loading.close();
-            this.activeTabs = "lsju";
-            this.$emit("updateParent", "activeTabs", "lsju");
-            this.$message({
-              message: "分析成功!",
-              type: "success",
-            });
-            this.reset();
-          }, 2000);
+
+          // const loading = this.$loading({
+          //   lock: true,
+          //   text: "分析中",
+          //   spinner: "el-icon-loading",
+          //   background: "rgba(0, 0, 0, 0.7)",
+          // });
+          // setTimeout(() => {
+          //   loading.close();
+          //   this.activeTabs = "lsju";
+          //   this.$emit("updateParent", "activeTabs", "lsju");
+          //   this.$message({
+          //     message: "分析成功!",
+          //     type: "success",
+          //   });
+          //   this.reset();
+          // }, 2000);
         } else {
           console.log("error submit!!");
           return false;