Browse Source

Merge branch 'master' of http://114.244.114.158:8802/siwei/real3d-portalsite

zpf 11 months ago
parent
commit
eeb70fe11b

+ 18 - 0
src/api/ghss/ghxz.js

@@ -7,10 +7,28 @@ export function GetFxyzList(params) {
         params
     })
 }
+// 用地类型树结构
 export function GetDldmTree(params) {
     return request({
         url: '/apply/fzxz/GetDldmTree',
         method: 'get',
         params
     })
+}
+// 辅助选址数据源
+export function GetSjyList(params) {
+    return request({
+        url: '/apply/fzxz/GetSjyList',
+        method: 'get',
+        params
+    })
+}
+
+// 辅助选址数据源
+export function AddFzxz(data) {
+    return request({
+        url: '/analyse/fzss/AddFzxz',
+        method: 'post',
+        data:data
+    })
 }

+ 1 - 3
src/components/mapView/range.vue

@@ -236,9 +236,6 @@ export default {
               return item;
             }
           });
-
-          console.log(filteredArr, "filteredArr");
-
           // 数组变二维数组方法
           function listToMatrix(list, elementsPerSubArray) {
             var matrix = [],
@@ -274,6 +271,7 @@ export default {
           // this.addPolygon();
           ShapeUpload(formdata).then((res) => {
             if (res.success) {
+              this.fileDataID = res.data.id;
               this.model.xzmj = (res.data.area / 1000000).toFixed(2);
               this.$message({
                 message: "绘制成功!",

+ 72 - 51
src/views/complianceAnalysis/ghzc.scss

@@ -50,9 +50,11 @@
         padding: 1rem 10px 1rem 1rem;
         background: transparent;
         border-color: transparent;
-        .el-tabs__nav.is-stretch{
+
+        .el-tabs__nav.is-stretch {
             min-width: 104px;
         }
+
         // tabs样式
         .el-tabs__header {
             height: 32px;
@@ -67,7 +69,7 @@
             line-height: 32px;
             background: url("/static/images/ghzc/Tab_bg.png") no-repeat;
             background-size: 100% 100%;
-            border:none;
+            border: none;
             margin-right: 10px;
         }
 
@@ -245,6 +247,7 @@
     border-bottom: 4px solid #0B4072;
     display: flex;
     justify-content: space-between;
+
     .siteCon {
         width: 100px;
         display: flex;
@@ -349,10 +352,11 @@
     /* 鼠标悬浮和点击时的背景色 */
 }
 
-.el-cascader--mini{
+.el-cascader--mini {
     width: 100% !important;
 }
-.el-radio__inner{
+
+.el-radio__inner {
     background-color: #b6e1ff3b;
 }
 
@@ -361,87 +365,104 @@
     background-color: transparent !important;
     // border: none;
     color: #cddeeb;
-  }
- .el-table--border {
+}
+
+.el-table--border {
     border-radius: 5px;
-  }
- .el-table tr {
+}
+
+.el-table tr {
     background-color: transparent !important;
     color: #cddeeb;
     height: 43px;
-  }
- .el-table .el-table__cell {
+}
+
+.el-table .el-table__cell {
     background-color: transparent !important;
     padding: 0 !important;
-  }
+}
 
- .el-table td.el-table__cell,
-  .el-table th.el-table__cell.is-leaf {
+.el-table td.el-table__cell,
+.el-table th.el-table__cell.is-leaf {
     border-bottom: 1px solid #667e8f7c !important;
-  }
+}
 
-  // 设置表头的颜色
-.el-table thead tr > th {
+// 设置表头的颜色
+.el-table thead tr>th {
     width: 100%;
     background-color: #0a2450;
     color: #cddeeb;
     border: none;
-  }
-  // 去除每行的边框
-.el-table tbody tr > td {
+}
+
+// 去除每行的边框
+.el-table tbody tr>td {
     // background-color: rgb(26,28,119);
     color: #cddeeb;
     border: none;
-  }
- .el-table thead {
+}
+
+.el-table thead {
     background-color: #0a2450 !important;
-  }
+}
 
-  .el-table--border, .el-table--group{
+.el-table--border,
+.el-table--group {
     border: none;
-  }
-  .el-table::before{
+}
+
+.el-table::before {
     background-color: transparent !important;
-  }
-  .el-table--border::after{
+}
+
+.el-table--border::after {
     background-color: transparent !important;
 
-  }
-  //表格有边框
-  .el-table--border .el-table__cell{
+}
+
+//表格有边框
+.el-table--border .el-table__cell {
     border: none;
-  }
+}
+
 //树结构选中子集时父级的背景色
-  .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{
+.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
     background-color: transparent !important;
-  }
+}
 
 
 
 
-  .el-cascader-node {
+.el-cascader-node {
     color: #fff !important;
-  }
-  
-  .el-cascader-node:hover {
+}
+
+.el-cascader-node:hover {
     color: #fff !important;
     background-color: rgba(255, 255, 255, 0.35) !important;
-  }
-  
-  .el-cascader-node:not(.is-disabled):focus {
+}
+
+.el-cascader-node:not(.is-disabled):focus {
     background-color: rgba(4, 28, 50, 0.5) !important;
-  }
-  
-  .el-checkbox__input>.el-checkbox__inner {
+}
+
+.el-checkbox__input>.el-checkbox__inner {
     border: 1px solid #96a9b7;
     background-color: rgba(4, 28, 50, 0.6);
-  }
+}
+
+.el-select-dropdown__item {
+    color: #fff !important;
+    font-weight: 300;
+}
+
 .el-select-dropdown__item.hover,
 .el-select-dropdown__item:hover {
-  color: #fff !important;
-  background-color: rgba(255, 255, 255, 0.35) !important;
+    color: #fff !important;
+    background-color: rgba(255, 255, 255, 0.35) !important;
 }
-.el-select-dropdown{
+
+.el-select-dropdown {
     color: #fff !important;
     background-color: rgba(4, 28, 50, 0.5) !important;
     border: 1px solid rgba(15, 122, 200, 0.4) !important;
@@ -450,11 +471,11 @@
 .el-cascader__dropdown,
 .el-picker-panel,
 .el-picker-panel__footer {
-  color: #fff !important;
-  background-color: rgba(4, 28, 50, 0.5) !important;
-  border: 1px solid rgba(15, 122, 200, 0.4) !important;
+    color: #fff !important;
+    background-color: rgba(4, 28, 50, 0.5) !important;
+    border: 1px solid rgba(15, 122, 200, 0.4) !important;
 }
 
-.el-cascader--mini{
+.el-cascader--mini {
     right: 0px !important;
 }

+ 57 - 44
src/views/siteselection/components/fzxz.vue

@@ -37,24 +37,20 @@
           placeholder="请选择数据源"
           size="mini"
           :popper-append-to-body="false"
+          @change="handleChange2"
         >
           <el-option
             v-for="item in options"
-            :key="item.fzbs"
+            :key="item.bsm"
             :label="item.sjymc"
-            :value="item.sjymc"
+            :value="item.bsm"
           >
           </el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="用地类型:" prop="ydlx">
-        <!-- <el-input
-          v-model="ruleForm.ydlx"
-          size="mini"
-          placeholder="请输入用地类型"
-        ></el-input> -->
-
         <el-cascader
+          ref="Cascader"
           v-model="ruleForm.ydlx"
           :options="cascaderOptions"
           :props="{ expandTrigger: 'hover', checkStrictly: true }"
@@ -65,20 +61,20 @@
       </el-form-item>
       <el-form-item label="用地面积" required>
         <el-col :span="11">
-          <el-form-item prop="ydmjs">
+          <el-form-item prop="ydmjbegin">
             <el-input
               Onkeyup="this.value=this.value.replace(/[^\d^\.]+/g,'').replace(/^0+(\d)/,'$1').replace(/^\./,'0.').match(/\d+.?\d{0,2}/);this.dispatchEvent(new Event('input'))"
-              v-model="ruleForm.ydmjs"
+              v-model="ruleForm.ydmjbegin"
               size="mini"
             ></el-input>
           </el-form-item>
         </el-col>
         <el-col class="line" :span="2">-</el-col>
         <el-col :span="11">
-          <el-form-item prop="ydmje">
+          <el-form-item prop="ydmjend">
             <el-input
               Onkeyup="this.value=this.value.replace(/[^\d^\.]+/g,'').replace(/^0+(\d)/,'$1').replace(/^\./,'0.').match(/\d+.?\d{0,2}/);this.dispatchEvent(new Event('input'))"
-              v-model="ruleForm.ydmje"
+              v-model="ruleForm.ydmjend"
               size="mini"
             ></el-input>
           </el-form-item>
@@ -94,15 +90,15 @@
     </div>
     <div class="treeDiv">
       <el-table :data="tableData" style="width: 100%">
-        <el-table-column prop="name" label="因子名称" show-overflow-tooltip>
+        <el-table-column prop="yxyzmc" label="因子名称" show-overflow-tooltip>
         </el-table-column>
         <el-table-column label="条件" show-overflow-tooltip>
           <template slot-scope="scope">
-            <span>{{ yztj(scope.row.condition) }}</span>
+            <span>{{ yztj(scope.row.spatial_type) }}</span>
           </template>
         </el-table-column>
 
-        <el-table-column prop="value" label="值" show-overflow-tooltip>
+        <el-table-column prop="yxz" label="值" show-overflow-tooltip>
         </el-table-column>
       </el-table>
     </div>
@@ -117,7 +113,7 @@
 <script>
 import yxyzPop from "./yxyzPop.vue"; ///mapview/range
 import range from "@/components/mapview/range.vue"; ///mapview/range
-import { GetDldmTree } 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: {
@@ -135,16 +131,15 @@ export default {
 
   data() {
     return {
-      xz: [],
       ruleForm: {
         xzmj: 0,
         xmmc: "",
         jsdw: "",
         xmlx: "",
         ydlx: "",
-        ydmjs: "", //用地面积开始
-        ydmje: "", //用地面积结束
-        sjy: "国土空间总体规划", //数据源
+        ydmjbegin: "", //用地面积开始
+        ydmjend: "", //用地面积结束
+        sjy: "", //数据源
       },
       rules: {
         xzmj: [{ required: true, message: "请填写范围的数据" }],
@@ -156,22 +151,16 @@ export default {
         jsdw: [{ required: true, message: "请输入建设单位", trigger: "blur" }],
         xmlx: [{ required: true, message: "请输入项目类型", trigger: "blur" }],
         ydlx: [{ required: true, message: "请输入用地类型", trigger: "blur" }],
-        ydmjs: [{ required: true, message: "请输入用地面积", trigger: "blur" }],
-        ydmje: [{ required: true, message: "请输入用地面积", trigger: "blur" }],
+        ydmjbegin: [
+          { required: true, message: "请输入用地面积", trigger: "blur" },
+        ],
+        ydmjend: [
+          { required: true, message: "请输入用地面积", trigger: "blur" },
+        ],
 
         sjy: [{ required: true, message: "请选择数据源", trigger: "change" }],
       },
-      options: [
-        {
-          bsm: "vector.XZYDYH",
-          sjymc: "国土空间总体规划",
-          fzbs: "YDYHFLDM",
-          dmzd: "YDYHFLDM",
-          mczd: "YDYHFLMC",
-          xzqdmzd: "XZQDM",
-          xzqmczd: "XZQMC",
-        },
-      ],
+      options: [],
       tableData: [],
       dialogVisible: false, //选址影响因子的弹窗显隐
       value: [],
@@ -418,6 +407,8 @@ export default {
         },
       ],
       cascaderOptions: [], //用地性质数据存储数组
+      sjyBSM: "",
+      ydlxBSM: "",
     };
   },
   computed: {},
@@ -443,27 +434,49 @@ export default {
 
       this.cascaderOptions = childArr; //为Cascader的options值
     });
+    // 获取选址数据源
+    GetSjyList().then((res) => {
+      this.options = res.data;
+      this.ruleForm.sjy = res.data[0].sjymc;
+      this.sjyBSM = res.data[0].value;
+    });
   },
   methods: {
     handleChange(value) {
       console.log(value);
+      const obj = this.$refs["Cascader"].getCheckedNodes();
+      this.ydlxBSM = obj[0].value;
+    },
+    handleChange2(value) {
+      console.log(value);
+      // const obj = this.$refs['Cascader'].getCheckedNodes()
+      this.sjyBSM = value;
     },
     submitData() {
-      // this.$emit("updateParent", "loading", true);
-      //     setTimeout(() => {
-      //       let bsm = "8979e8f6a9364828a9d6b2e459c8fd76";
-      //       this.$emit("updateParent", "nowObj", this.ruleForm);
-      //       this.$emit("updateParent", "rzBsm", bsm);
-      //       this.$emit("updateParent", "loading", false);
-      //       this.reset();
-      //     }, 500);
-
       //更新范围
       var _temp = this.$refs.range.getRange();
       // this.ruleForm.xzfw = _temp.xzfw;
       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: "分析中",
@@ -492,8 +505,8 @@ export default {
         jsdw: "",
         xmlx: "",
         ydlx: "",
-        ydmjs: "", //用地面积开始
-        ydmje: "", //用地面积结束
+        ydmjbegin: "", //用地面积开始
+        ydmjend: "", //用地面积结束
         sjy: "国土空间总体规划", //数据源
         xzmj: 0,
       }),

+ 20 - 22
src/views/siteselection/components/yxyzPop.vue

@@ -46,16 +46,16 @@
           >
             <el-table-column type="selection" width="55" align="center">
             </el-table-column>
-            <el-table-column prop="name" label="因子名称"> </el-table-column>
-            <el-table-column prop="condition" label="条件" width="150">
+            <el-table-column prop="yxyzmc" label="因子名称"> </el-table-column>
+            <el-table-column prop="spatial_type" label="条件" width="150">
               <template slot-scope="scope">
                 <el-select
-                  v-model="scope.row.condition"
+                  v-model="scope.row.spatial_type"
                   placeholder="请选择"
                   class="input-style"
                   v-if="
-                    scope.row.condition == 'identity' ||
-                    scope.row.condition == 'n_identity'
+                    scope.row.spatial_type == 'identity' ||
+                    scope.row.spatial_type == 'n_identity'
                   "
                 >
                   <el-option
@@ -67,12 +67,12 @@
                   </el-option>
                 </el-select>
                 <el-select
-                  v-model="scope.row.condition"
+                  v-model="scope.row.spatial_type"
                   placeholder="请选择"
                   class="input-style"
                   v-if="
-                    scope.row.condition == 'contain' ||
-                    scope.row.condition == 'n_contain'
+                    scope.row.spatial_type == 'contain' ||
+                    scope.row.spatial_type == 'n_contain'
                   "
                 >
                   <el-option
@@ -85,11 +85,11 @@
                 </el-select>
               </template>
             </el-table-column>
-            <el-table-column prop="value" label="约束值(m)" width="120">
+            <el-table-column prop="yxz" label="约束值(m)" width="120">
               <template slot-scope="scope">
                 <el-input
                   Onkeyup="this.value=this.value.replace(/[^\d^\.]+/g,'').replace(/^0+(\d)/,'$1').replace(/^\./,'0.').match(/\d+.?\d{0,2}/);this.dispatchEvent(new Event('input'))"
-                  v-model="scope.row.value"
+                  v-model="scope.row.yxz"
                   placeholder="距离"
                   class="input-style font-14"
                 ></el-input>
@@ -207,20 +207,18 @@ export default {
     setTable(selectdata) {
       let tableList = [];
       selectdata.forEach((item) => {
+        console.log(item, "item----");
         tableList.push({
-          // name: item.label,
-          // condition: item.yztj,
-          // id: item.value,
-          // type: item.type,
+          // id: item.bsm,
+          // name: item.yxyzmc,
+          // condition: item.spatial_type,
           // value: "",
-          // sjy: item.sjy,
-          // sjlx: item.sjlx,
-          id: item.bsm,
-          name: item.yxyzmc,
-          condition: item.spatial_type,
-          value: "",
-          sjy: item.has_yxz,
-          sjlx: item.spatial_type,
+          // sjy: item.has_yxz,
+          // sjlx: item.spatial_type,
+          yzbsm: item.bsm,
+          yxyzmc: item.yxyzmc,
+          spatial_type: item.spatial_type,
+          yxz: "",
         });
       });
       tableList.forEach((item) => {

+ 1 - 1
static/Config/config.js

@@ -1,5 +1,5 @@
 //后台地址配置
-window.axiosURI = "http://192.168.60.52:8080";
+window.axiosURI = "http://192.168.100.30:8080";
 //倾斜模型高度配置
 window.modelBottomAltitude = 10;
 // 服务器ip