Browse Source

规划选址数据优化

lkk 11 months ago
parent
commit
20fa1c3092
1 changed files with 25 additions and 41 deletions
  1. 25 41
      src/views/siteselection/components/fzxz.vue

+ 25 - 41
src/views/siteselection/components/fzxz.vue

@@ -202,12 +202,12 @@ export default {
   },
   methods: {
     handleChange(value) {
-      console.log(value);
+      // console.log(value);
       const obj = this.$refs["Cascader"].getCheckedNodes();
       this.ydlxBSM = obj[0].value;
     },
     handleChange2(value) {
-      console.log(value);
+      // console.log(value);
       // const obj = this.$refs['Cascader'].getCheckedNodes()
       this.sjyBSM = value;
     },
@@ -231,46 +231,29 @@ export default {
             geomId: this.$refs.range.fileDataID,
             yxyz: this.tableData,
           };
-          console.log(obj, "objobj");
+          // 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)",
+            // 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: res.message,
+                type: res.success ? "success" : "warning",
               });
-              setTimeout(() => {
-                loading.close();
-                this.activeTabs = "lsju";
-                this.$emit("updateParent", "activeTabs", "lsju");
-                this.$message({
-                  message: "分析成功!",
-                  type: "success",
-                });
-                this.reset();
-              }, 2000);
-            }
+              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;
@@ -285,10 +268,11 @@ export default {
         ydlx: "",
         ydmjbegin: "", //用地面积开始
         ydmjend: "", //用地面积结束
-        sjy: "国土空间总体规划", //数据源
+        sjy: this.options[0].sjymc, //数据源
         xzmj: 0,
       }),
-        (this.tableData = []);
+        (this.sjyBSM = this.options[0].value);
+      this.tableData = [];
       this.$refs.ruleForm.resetFields();
       this.$refs.range.reset();
     },