瀏覽代碼

规划选址选址结果与历史记录接入

lkk 1 年之前
父節點
當前提交
f951373aae

+ 289 - 10
src/views/siteselection/components/fzxz.vue

@@ -97,15 +97,49 @@
         检查</el-button
       >
     </div>
-<!-- 影响因子弹窗 -->
+    <!-- 影响因子弹窗 -->
     <el-dialog
       title="选址因子设置"
       :visible.sync="dialogVisible"
       width="50%"
       :before-close="handleClose"
       :modal-append-to-body="false"
+      :close-on-click-modal="false"
     >
-      <span>这是一段信息</span>
+      <!-- <span>这是一段信息</span> -->
+      <div style="text-align: center">
+        <el-transfer
+          style="text-align: left; display: inline-block"
+          v-model="value"
+
+          :left-default-checked="[2, 3]"
+          :right-default-checked="[1]"
+          :titles="['Source', 'Target']"
+          :button-texts="['到左边', '到右边']"
+          :format="{
+            noChecked: '${total}',
+            hasChecked: '${checked}/${total}',
+          }"
+          :props="{
+            key: 'bsm',
+            label: 'yxyzmc',
+          }"
+          @change="handleChange"
+          :data="kxyzList"
+        >
+
+          <el-button class="transfer-footer" slot="left-footer" size="small"
+            >操作</el-button
+          >
+          <el-button class="transfer-footer" slot="right-footer" size="small"
+            >操作</el-button
+          >
+        </el-transfer>
+      </div>
+
+      <!-- <div>
+        <transfer v-if="dialogVisible"></transfer>
+      </div> -->
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisible = false">取 消</el-button>
         <el-button type="primary" @click="dialogVisible = false"
@@ -117,10 +151,10 @@
 </template>
 
 <script>
-// import range from "@/components/mapview/range.vue"; ///mapview/range
+import transfer from "./transfer.vue"; ///mapview/range
 export default {
   components: {
-    // range,
+    transfer,
   },
   props: {
     activeTabs: {
@@ -168,18 +202,263 @@ export default {
         },
       ],
       tableData: [],
-      dialogVisible:false,//选址影响因子的弹窗显隐
+      dialogVisible: false, //选址影响因子的弹窗显隐
+      value: [],
+      kxyzList: [
+        {
+          bsm: "BWG",
+          yxyzmc: "博物馆",
+          level: 1,
+          parent_bsm: "GGFWSS",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "CZKFBJ",
+          yxyzmc: "城镇开发边界",
+          level: 1,
+          parent_bsm: "DXGK",
+          has_yxz: false,
+          spatial_type: "contain",
+        },
+        {
+          bsm: "DL",
+          yxyzmc: "电力",
+          level: 2,
+          parent_bsm: "GX",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "DX",
+          yxyzmc: "电信",
+          level: 2,
+          parent_bsm: "GX",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "DXGK",
+          yxyzmc: "底线管控",
+          level: 0,
+          parent_bsm: null,
+          has_yxz: null,
+          spatial_type: null,
+        },
+        {
+          bsm: "GGFWSS",
+          yxyzmc: "公共服务设施",
+          level: 0,
+          parent_bsm: null,
+          has_yxz: null,
+          spatial_type: null,
+        },
+        {
+          bsm: "GL",
+          yxyzmc: "公路",
+          level: 2,
+          parent_bsm: "JT",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "GS",
+          yxyzmc: "供水",
+          level: 2,
+          parent_bsm: "GX",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "GX",
+          yxyzmc: "管线",
+          level: 1,
+          parent_bsm: "SZSS",
+          has_yxz: null,
+          spatial_type: null,
+        },
+        {
+          bsm: "GY",
+          yxyzmc: "公园",
+          level: 1,
+          parent_bsm: "GGFWSS",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "JT",
+          yxyzmc: "交通",
+          level: 1,
+          parent_bsm: "SZSS",
+          has_yxz: null,
+          spatial_type: null,
+        },
+        {
+          bsm: "JYZ",
+          yxyzmc: "加油站",
+          level: 2,
+          parent_bsm: "JT",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "LD",
+          yxyzmc: "绿地",
+          level: 1,
+          parent_bsm: "GGFWSS",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "LJCLSS",
+          yxyzmc: "垃圾处理设施",
+          level: 2,
+          parent_bsm: "QT",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "PS",
+          yxyzmc: "排水",
+          level: 2,
+          parent_bsm: "GX",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "QT",
+          yxyzmc: "其他",
+          level: 1,
+          parent_bsm: "SZSS",
+          has_yxz: null,
+          spatial_type: null,
+        },
+        {
+          bsm: "RQ",
+          yxyzmc: "燃气",
+          level: 2,
+          parent_bsm: "GX",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "STBHHX",
+          yxyzmc: "生态保护红线",
+          level: 1,
+          parent_bsm: "DXGK",
+          has_yxz: false,
+          spatial_type: "contain",
+        },
+        {
+          bsm: "SY",
+          yxyzmc: "输油",
+          level: 2,
+          parent_bsm: "GX",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "SZSS",
+          yxyzmc: "市政设施",
+          level: 0,
+          parent_bsm: null,
+          has_yxz: null,
+          spatial_type: null,
+        },
+        {
+          bsm: "TCC",
+          yxyzmc: "停车场",
+          level: 2,
+          parent_bsm: "JT",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "TL",
+          yxyzmc: "铁路",
+          level: 2,
+          parent_bsm: "JT",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "TSG",
+          yxyzmc: "图书馆",
+          level: 1,
+          parent_bsm: "GGFWSS",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "TYG",
+          yxyzmc: "体育馆",
+          level: 1,
+          parent_bsm: "GGFWSS",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "WSCLC",
+          yxyzmc: "污水处理厂",
+          level: 2,
+          parent_bsm: "QT",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "XX",
+          yxyzmc: "学校",
+          level: 1,
+          parent_bsm: "GGFWSS",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "YJJBNT",
+          yxyzmc: "永久基本农田",
+          level: 1,
+          parent_bsm: "DXGK",
+          has_yxz: false,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "YY",
+          yxyzmc: "医院",
+          level: 1,
+          parent_bsm: "GGFWSS",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "ZRWHBHQ",
+          yxyzmc: "自然文化保护区",
+          level: 1,
+          parent_bsm: "DXGK",
+          has_yxz: false,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "ZYCRK",
+          yxyzmc: "主要出入口",
+          level: 2,
+          parent_bsm: "JT",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+      ],
     };
   },
   mounted() {},
   methods: {
     yzpz() {
-      this.dialogVisible = true
-
+      this.dialogVisible = true;
+    },
+    handleClose() {
+      this.dialogVisible = false;
+    },
+    handleChange(value, direction, movedKeys) {
+      console.log(value, direction, movedKeys);
     },
-    handleClose(){
-      this.dialogVisible = false
-    }
   },
 };
 </script>

+ 423 - 0
src/views/siteselection/components/transfer.vue

@@ -0,0 +1,423 @@
+<template>
+  <!-- 自定义树形穿梭框组件、理论上左右均可选择是否为树形结构,目前固定为左侧树形、右侧无层级结构 -->
+  <div class="tree-transfer">11111111111111111111</div>
+</template>
+
+<script>
+export default {
+  components: {},
+  props: {},
+  data() {
+    return {
+      yuansiData: [],
+      dataLeft: [],
+      dataRight: [],
+      kxyzList: [
+        {
+          bsm: "BWG",
+          yxyzmc: "博物馆",
+          level: 1,
+          parent_bsm: "GGFWSS",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "CZKFBJ",
+          yxyzmc: "城镇开发边界",
+          level: 1,
+          parent_bsm: "DXGK",
+          has_yxz: false,
+          spatial_type: "contain",
+        },
+        {
+          bsm: "DL",
+          yxyzmc: "电力",
+          level: 2,
+          parent_bsm: "GX",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "DX",
+          yxyzmc: "电信",
+          level: 2,
+          parent_bsm: "GX",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "DXGK",
+          yxyzmc: "底线管控",
+          level: 0,
+          parent_bsm: null,
+          has_yxz: null,
+          spatial_type: null,
+        },
+        {
+          bsm: "GGFWSS",
+          yxyzmc: "公共服务设施",
+          level: 0,
+          parent_bsm: null,
+          has_yxz: null,
+          spatial_type: null,
+        },
+        {
+          bsm: "GL",
+          yxyzmc: "公路",
+          level: 2,
+          parent_bsm: "JT",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "GS",
+          yxyzmc: "供水",
+          level: 2,
+          parent_bsm: "GX",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "GX",
+          yxyzmc: "管线",
+          level: 1,
+          parent_bsm: "SZSS",
+          has_yxz: null,
+          spatial_type: null,
+        },
+        {
+          bsm: "GY",
+          yxyzmc: "公园",
+          level: 1,
+          parent_bsm: "GGFWSS",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "JT",
+          yxyzmc: "交通",
+          level: 1,
+          parent_bsm: "SZSS",
+          has_yxz: null,
+          spatial_type: null,
+        },
+        {
+          bsm: "JYZ",
+          yxyzmc: "加油站",
+          level: 2,
+          parent_bsm: "JT",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "LD",
+          yxyzmc: "绿地",
+          level: 1,
+          parent_bsm: "GGFWSS",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "LJCLSS",
+          yxyzmc: "垃圾处理设施",
+          level: 2,
+          parent_bsm: "QT",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "PS",
+          yxyzmc: "排水",
+          level: 2,
+          parent_bsm: "GX",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "QT",
+          yxyzmc: "其他",
+          level: 1,
+          parent_bsm: "SZSS",
+          has_yxz: null,
+          spatial_type: null,
+        },
+        {
+          bsm: "RQ",
+          yxyzmc: "燃气",
+          level: 2,
+          parent_bsm: "GX",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "STBHHX",
+          yxyzmc: "生态保护红线",
+          level: 1,
+          parent_bsm: "DXGK",
+          has_yxz: false,
+          spatial_type: "contain",
+        },
+        {
+          bsm: "SY",
+          yxyzmc: "输油",
+          level: 2,
+          parent_bsm: "GX",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "SZSS",
+          yxyzmc: "市政设施",
+          level: 0,
+          parent_bsm: null,
+          has_yxz: null,
+          spatial_type: null,
+        },
+        {
+          bsm: "TCC",
+          yxyzmc: "停车场",
+          level: 2,
+          parent_bsm: "JT",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "TL",
+          yxyzmc: "铁路",
+          level: 2,
+          parent_bsm: "JT",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "TSG",
+          yxyzmc: "图书馆",
+          level: 1,
+          parent_bsm: "GGFWSS",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "TYG",
+          yxyzmc: "体育馆",
+          level: 1,
+          parent_bsm: "GGFWSS",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "WSCLC",
+          yxyzmc: "污水处理厂",
+          level: 2,
+          parent_bsm: "QT",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "XX",
+          yxyzmc: "学校",
+          level: 1,
+          parent_bsm: "GGFWSS",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "YJJBNT",
+          yxyzmc: "永久基本农田",
+          level: 1,
+          parent_bsm: "DXGK",
+          has_yxz: false,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "YY",
+          yxyzmc: "医院",
+          level: 1,
+          parent_bsm: "GGFWSS",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "ZRWHBHQ",
+          yxyzmc: "自然文化保护区",
+          level: 1,
+          parent_bsm: "DXGK",
+          has_yxz: false,
+          spatial_type: "identity",
+        },
+        {
+          bsm: "ZYCRK",
+          yxyzmc: "主要出入口",
+          level: 2,
+          parent_bsm: "JT",
+          has_yxz: true,
+          spatial_type: "identity",
+        },
+      ],
+      defaultProps: {
+        children: "children",
+        label: "yxyzmc",
+      },
+    };
+  },
+  //   mounted() {},
+  mounted() {
+    // this.dataLeft = this.datas;
+    // let aaa = []
+    // this.defaultProps.forEach(el => {
+
+    // });
+
+    // function flatToTree(flatData, level = 0) {
+    //   const tree = [];
+
+    //   // 遍历flatData,找到level对应的子节点
+    //   for (const node of flatData) {
+    //     if (node.level === level) {
+    //       // 递归查找子节点
+    //       const children = flatToTree(flatData, node.level);
+
+    //       // 如果有子节点,则加入children属性中
+    //       if (children.length > 0) {
+    //         node.children = children;
+    //       }
+
+    //       // 加入tree中
+    //       tree.push(node);
+    //     }
+    //   }
+
+    //   return tree;
+    // }
+
+    // const treeData = flatToTree(this.kxyzList);
+    // console.log(treeData); // 输出转换得到的Tree数据
+
+    // 定义一个新数组
+    var chapterTree = [];
+    this.kxyzList.forEach((c) => {
+      // 给扁平数据数组的每一个内容项加上一个children属性,属性值为[]
+      c.children = [];
+      if (c.level == 0) {
+        // 把没有父级的内容项添加到chapterTree新数组中,定义所有的初级父级
+        // 之后,往这些初级父级的children属性中添加内容项,见下面的else判断
+        chapterTree.push(c);
+      } else {
+        // 通过当前遍历的每一个内容项的pid属性,在flatArray数组中,通过level属性寻找其父级
+        const theparent = this.kxyzList.find(function (item) {
+          return item.bsm === c.parent_bsm;
+        });
+        console.log(theparent,'00000');
+        // 把当前遍历的内容项,添加到父级的children属性中去
+        theparent.children.push(c);
+      }
+    });
+
+    console.log(chapterTree);
+
+    // this.yuansiData = JSON.parse(JSON.stringify(this.datas));
+  },
+  methods: {
+    add() {
+      // 定义一个递归过滤的方法,用来删掉父级中给的元素
+      // 获取所有选中的项并且去掉父级
+      let list = this.$refs.treeLeft.getCheckedNodes();
+      // 走原始数据中删掉已经选择的
+      // 1.父级的删除
+      const parList = list.filter((item) => {
+        return item.parameterInfoList;
+      });
+      for (let item1 of parList) {
+        let index = this.dataLeft.findIndex((item2) => {
+          return item2.id == item1.id;
+        });
+        if (index >= 0) {
+          this.dataLeft.splice(index, 1);
+        }
+      }
+      // 2.子级的删除
+      list = list.filter((item) => {
+        return !item.parameterInfoList;
+      });
+      // 这里做了三重循环,如果有可能需要对其进行优化
+      for (let item of list) {
+        for (let ind in this.dataLeft) {
+          if (this.dataLeft[ind].parameterInfoList.length) {
+            let index = this.dataLeft[ind].parameterInfoList.findIndex(
+              (item2) => {
+                return item2.id == item.id;
+              }
+            );
+            if (index >= 0) {
+              this.dataLeft[ind].parameterInfoList.splice(index, 1);
+            }
+          }
+        }
+      }
+      this.$refs.treeLeft.setCheckedNodes([]);
+      // 将选择的项添加到右侧
+      this.dataRight.push(...list);
+    },
+    remove() {
+      // 从右侧移除时的方法
+      // 1.从右侧删除选中的数据
+      let list = this.$refs.treeRight.getCheckedNodes();
+      for (let item of list) {
+        let index = this.dataRight.findIndex((item2) => {
+          return item.id == item2.id;
+        });
+        if (index >= 0) {
+          this.dataRight.splice(index, 1);
+        }
+      }
+      // 2.把右侧删除的数据添加给左侧,但是要注意父级的问题
+      this.dataLeft = JSON.parse(JSON.stringify(this.yuansiData));
+      for (let index in this.dataLeft) {
+        // 如果有子级去删除子级
+        for (let item of this.dataRight) {
+          let ind = this.dataLeft[index].parameterInfoList.findIndex(
+            (item2) => {
+              return item2.id == item.id;
+            }
+          );
+          if (ind >= 0) {
+            this.dataLeft[index].parameterInfoList.splice(ind, 1);
+          }
+        }
+        this.dataLeft = this.dataLeft.filter((item2) => {
+          return item2.parameterInfoList.length != 0;
+        });
+      }
+    },
+    getResult() {
+      return this.dataRight;
+    },
+  },
+};
+</script>
+
+
+<style scoped lang="scss">
+.tree-transfer {
+  display: flex;
+  min-height: 250px;
+  .tree-transfer-left {
+    min-width: 200px;
+    border: 1px #e5e5e5 solid;
+    border-radius: 10px;
+    padding: 10px;
+  }
+  .tree-transfer-middle {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    min-width: 120px;
+  }
+  .tree-transfer-right {
+    min-width: 200px;
+    border: 1px #e5e5e5 solid;
+    border-radius: 10px;
+    padding: 10px;
+  }
+}
+</style>

+ 93 - 0
src/views/siteselection/components/xzjg.vue

@@ -0,0 +1,93 @@
+<template>
+  <div class="hgxsc">
+    <div>项目名称XXXXXX</div>
+    <div class="block-title">
+      意向地块
+      <span>导出报告</span>
+    </div>
+    <div class="dkContainer"></div>
+    <div class="block-title">备选地块</div>
+    <div class="bxContainer">
+      <!-- <div class="dkTitle">
+        <div class="biaoti">1.地块编号B_P_123</div>
+        <div class="tool">
+          <i class="el-icon-thumb"></i>
+          <i class="el-icon-circle-plus-outline"></i>
+        </div>
+      </div> -->
+      <el-collapse accordion>
+        <el-collapse-item>
+          <template slot="title">
+            地块编号B_P_123
+            <span class="tools">
+              <i class="header-icon el-icon-thumb"></i>
+              <i class="header-icon el-icon-circle-plus-outline"></i>
+            </span>
+          </template>
+          <div class="collapseCon">
+            <p class="oneItem">
+              <span>住宅用地</span>
+              <span>123.4平方米</span>
+            </p>
+            <p>基准地标价:<span style="color: #02a7f0">77.44万元</span></p>
+          </div>
+        </el-collapse-item>
+      </el-collapse>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  components: {},
+  props: {},
+
+  data() {
+    return {};
+  },
+  mounted() {},
+  methods: {},
+};
+</script>
+
+<style lang="scss" scoped>
+.hgxsc {
+  height: 100%;
+  .dkContainer {
+    width: 100%;
+    height: 280px;
+    background-color: #0a2450;
+  }
+  .bxContainer {
+    width: 100%;
+    height: 335px;
+    background-color: #0a2450;
+    .dkTitle {
+      width: 100%;
+      height: 40px;
+      background-color: aqua;
+      display: flex;
+      justify-content: space-between;
+    }
+    .tools {
+      position: absolute;
+      right: 30px;
+    }
+    .collapseCon {
+      p {
+        width: 100%;
+        height: 30px;
+        line-height: 30px;
+        // background-color: pink;
+      }
+      .oneItem {
+        span {
+          border: 1px solid #02a7f0;
+          padding: 3px 5px;
+          border-radius: 5px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 22 - 3
src/views/siteselection/index.vue

@@ -11,9 +11,19 @@
         <el-tab-pane label="辅助选址" name="fzxz">
           <FZXZ></FZXZ>
            </el-tab-pane>
-        <el-tab-pane label="历史记录" name="lsju"> </el-tab-pane>
+        <el-tab-pane label="历史记录" name="lsju">
+          <Lsjl
+            :activeTabs="activeTabs"
+            :rzBsm="rzBsm"
+            :scjgObj="scjgObj"
+            :rwBsm="rwBsm"
+            :rwObj="rwObj"
+            :rzMc="rzMc"
+          ></Lsjl> </el-tab-pane>
         <!-- :disabled="activeTabs != 'scjg'" -->
-        <el-tab-pane label="选址结果" name="xzjg"> </el-tab-pane>
+        <el-tab-pane label="选址结果" name="xzjg"> 
+          <XZJG></XZJG>
+        </el-tab-pane>
       </el-tabs>
     </div>
   </div>
@@ -21,14 +31,23 @@
 
 <script>
 import FZXZ from "./components/fzxz.vue";
+import XZJG from "./components/xzjg.vue";
+import Lsjl from "../complianceAnalysis/components/lsjl.vue";
 export default {
   name: "siteselection",
   components: {
-    FZXZ
+    FZXZ,
+    Lsjl,
+    XZJG
   },
   data() {
     return {
       activeTabs: "fzxz",
+      rzBsm: "",
+      rwBsm: "",
+      scjgObj: {},
+      rwObj: {},
+      rzMc: "",
     };
   },
   created() {},