소스 검색

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

maxiaoxiao 9 달 전
부모
커밋
a5030c002a

+ 1 - 0
src/components/Combinations/LayerManage/LayerManage.vue

@@ -249,6 +249,7 @@ export default {
               item.name.indexOf("管线") > -1
             ) {
               item._baseUri.query = obj.id;
+              item.indexedDBSetting.isAttributesSave = true; //保存属性
             }
           });
           // store.state.tempLatData = layers[0];

+ 0 - 1
src/components/Query/clickQuery/clickQuery.vue

@@ -379,7 +379,6 @@ export default {
           eneityName.indexOf("管线") > -1
         ) {
           let buildingLayer = scene.layers.find(eneityName);
-          buildingLayer.indexedDBSetting.isAttributesSave = true; //保存属性
           if (buildingLayer.getSelection().length > 0) {
             const selectedId = Number(buildingLayer.getSelection()[0]);
             buildingLayer.getAttributesById([selectedId]).then(function (atts) {

+ 73 - 4
src/views/complianceAnalysis/components/lsjl.vue

@@ -52,7 +52,9 @@
         <div class="item_bottom">
           <el-tag type="warning" v-if="item.rwzt == 0">创建</el-tag>
           <el-tag v-if="item.rwzt == 1">执行中</el-tag>
-          <el-tag type="success" v-if="item.rwzt == 2 || item.rwzt == 99">完成</el-tag>
+          <el-tag type="success" v-if="item.rwzt == 2 || item.rwzt == 99"
+            >完成</el-tag
+          >
           <el-tag type="danger" v-if="item.rwzt == 3">错误</el-tag>
           <div>
             <span class="button" @click.stop="checkRz(item)">日志</span>
@@ -148,20 +150,36 @@ export default {
                 this.changeForm();
               }
             });
-          } else {
+          } else if (this.$props.type == "ghxz") {
             DelXzRes({ bsm: item.bsm }).then((res) => {
               if (res.success) {
                 Message.success("删除成功!");
                 this.changeForm();
               }
             });
+          } else if (this.$props.type == "gdbh") {
+            console.log("耕地保护删除");
           }
         })
         .catch(() => {});
     },
     checkDetails(item) {
       this.$emit("updateParent", "nowObj", item);
-      let next = this.$props.type == "hgxfx" ? "scjg" : "xzjg";
+      let next = "";
+      // let next = this.$props.type == "hgxfx" ? "scjg" : "xzjg";
+      switch (this.$props.type) {
+        case "hgxfx":
+          next = "scjg";
+          break;
+        case "ghxz":
+          next = "xzjg";
+          break;
+        case "gdbh":
+          next = "fxjg";
+          break;
+        default:
+          break;
+      }
       this.$emit("updateParent", "activeTabs", next);
       if (this.$props.type != "hgxfx") {
         this.$emit("updateParent", "rwBsm", item.bsm);
@@ -205,7 +223,9 @@ export default {
           this.listdisabled = res.data.length < 10;
           this.datalist = [...this.datalist, ...res.data];
         });
-      } else {
+      } else if (this.$props.type == "ghxz") {
+        console.log("我是规划选址");
+        //规划选址历史记录
         let tempObj = { ...this.pageObj };
         let obj = {
           startTime: tempObj.kssj,
@@ -221,6 +241,55 @@ export default {
           this.listdisabled = res.data.items.length < 10;
           this.datalist = [...this.datalist, ...res.data.items];
         });
+      } else if (this.$props.type == "gdbh") {
+        console.log("我是耕地保护");
+        setTimeout(() => {
+          this.$emit("updateParent", "loading", false);
+        }, 100);
+        //耕保历史记录
+        let tempData = [
+          {
+            bsm: "012bf914cf6344528e75a500a25965a8",
+            xmmc: "15耕地保护项目_20240828094815",
+            xmlx: null,
+            rwzt: 99,
+            jsdw: "建设单位",
+            fxbg: null,
+            geom: null,
+            dks: [],
+            landCount: 0,
+            xzyz: [],
+            createAt: "2024-08-28 10:05:23",
+          },
+          {
+            bsm: "10eb1b95ca0b44c6998fd7770d769b64",
+            xmmc: "小谷——耕地保护项目_20240828093845",
+            xmlx: null,
+            rwzt: 1,
+            jsdw: "建设单位",
+            fxbg: null,
+            geom: null,
+            dks: [],
+            landCount: 0,
+            xzyz: [],
+            createAt: "2024-08-28 09:42:39",
+          },
+          {
+            bsm: "8f84735ec1414d8b9962d8013220ca86",
+            xmmc: "小谷——耕地保护项目_20240828093845",
+            xmlx: null,
+            rwzt: 1,
+            jsdw: "建设单位",
+            fxbg: null,
+            geom: null,
+            dks: [],
+            landCount: 0,
+            xzyz: [],
+            createAt: "2024-08-28 09:39:54",
+          },
+        ];
+        this.listdisabled = tempData.length < 10;
+        this.datalist = [...this.datalist, ...tempData];
       }
     },
     zoomItem(item) {

+ 81 - 0
src/views/farmlandProtection/components/fxjg.vue

@@ -0,0 +1,81 @@
+<template>
+  <div class="fxjg">
+    分析结果sdskdhsjkhdsdk
+    <div>
+        dhsaudhaskdhksadhsa 
+      <span class="xmmc">
+        项目名称:
+        <span class="text">{{ rzMc }}</span>
+      </span>
+      <div
+        class="eicon"
+        :class="isshowAll ? 'eyes' : 'close_eyes'"
+        @click="allChange('all')"
+      ></div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {};
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.fxjg{
+  // height: calc(100vh - 108px);
+  // height: 49vh;
+  height: 100%;
+  min-width: 300px;
+  box-sizing: border-box;
+  padding: 0px 10px;
+
+  .xmmc {
+    width: calc(100% - 60px);
+    display: inline-block;
+  }
+
+  .blue {
+    color: #409eff;
+  }
+
+  .title {
+    button {
+      padding: 0;
+      float: right;
+      margin-right: 5px;
+      min-height: unset;
+    }
+
+    .export {
+      display: inline-block;
+      background-color: #0f7ac8;
+      text-align: center;
+      width: 95px;
+      height: 28px;
+      line-height: 28px;
+      float: right;
+    }
+  }
+
+  .el-form-item {
+    margin-bottom: 0;
+  }
+
+  .xz-btn {
+    width: 100%;
+    position: absolute;
+    height: 55px;
+    z-index: 2;
+    bottom: 0;
+    right: 0;
+    display: flex;
+    align-items: center;
+  }
+
+
+}
+</style>

+ 183 - 110
src/views/farmlandProtection/components/fzjcyp.vue

@@ -1,133 +1,206 @@
 <template>
-    <div class="fzjcyp ghzc">
-        <el-form :model="ruleForm" ref="ruleForm" label-width="88px" :rules="rules" label-position="left">
-            <el-form-item label="选址范围:" prop="xzmj">
-                <range type="fzjcyp" :keys="['hx', 'sc']" class="range" ref="range" />
-            </el-form-item>
-            <el-form-item label="项目名称:" prop="xmmc">
-                <el-input v-model="ruleForm.xmmc" size="mini" placeholder="请输入项目名称"></el-input>
-            </el-form-item>
-            <div class="site-title">
-                <div class="siteCon">
-                    <div class="site_Icon"></div>
-                    <span>分析模型</span>
-                </div>
-                <el-button size="mini" @click="zdyModel">自定义模型</el-button>
-            </div>
-            <div class="treeDiv">
-                <el-table :data="anaModels" style="width: 100%" :show-header="false">
-                    <el-table-column type="selection" width="33"> </el-table-column>
-                    <el-table-column prop="name" show-overflow-tooltip> </el-table-column>
-                    <el-table-column width="50">
-                        <template slot-scope="scope">
-                            <!-- <span>编辑</span> -->
-                            <el-button size="mini" type="text"
-                                @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
-                        </template>
-                    </el-table-column>
-                </el-table>
-            </div>
-        </el-form>
-        <zdyModelPop :tableData="tableData" ref="zdyPop"></zdyModelPop>
+  <div class="fzjcyp ghzc">
+    <el-form
+      :model="ruleForm"
+      ref="ruleForm"
+      label-width="88px"
+      :rules="rules"
+      label-position="left"
+    >
+      <el-form-item label="选址范围:" prop="xzmj">
+        <range type="fzjcyp" :keys="['hx', 'sc']" class="range" ref="range" />
+      </el-form-item>
+      <el-form-item label="项目名称:" prop="xmmc">
+        <el-input
+          v-model="ruleForm.xmmc"
+          size="mini"
+          placeholder="请输入项目名称"
+        ></el-input>
+      </el-form-item>
+      <div class="site-title">
+        <div class="siteCon">
+          <div class="site_Icon"></div>
+          <span>分析模型</span>
+        </div>
+        <el-button size="mini" @click="zdyModel">自定义模型</el-button>
+      </div>
+      <div class="treeDiv">
+        <el-table :data="anaModels" style="width: 100%" :show-header="false">
+          <el-table-column type="selection" width="33"> </el-table-column>
+          <el-table-column prop="name" show-overflow-tooltip> </el-table-column>
+          <el-table-column width="50">
+            <template slot-scope="scope">
+              <!-- <span>编辑</span> -->
+              <el-button
+                size="mini"
+                type="text"
+                @click="handleEdit(scope.$index, scope.row)"
+                >编辑</el-button
+              >
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+    </el-form>
+    <div class="bottomBtns">
+      <span class="clearBtn" @click="reset">取消</span>
+      <span class="sureBtn" @click="submitData">确定</span>
     </div>
+    <zdyModelPop :tableData="tableData" ref="zdyPop"></zdyModelPop>
+  </div>
 </template>
 
 <script>
 import range from "@/components/mapview/range.vue"; //绘制范围
 import zdyModelPop from "./zdyModelPop.vue"; //自定义模型面板
 import moment from "moment";
+import { Message } from "element-ui";
 export default {
-    components: {
-        range,
-        zdyModelPop
-    },
-    data() {
-        return {
-            ruleForm: {
-                xzmj: 0,
-                xmmc: "耕地保护项目_" + this.getCurrentDateTime(),
-            },
-            rules: {
-                xzmj: [{ required: true, message: "请填写范围的数据" }],
-                xmmc: [
-                    { required: true, message: "请输入项目名称", trigger: "blur" },
-                    {
-                        min: 1,
-                        message: "请输入至少为一个字符的项目名称",
-                        trigger: "blur",
-                    },
-                ],
-            },
-            //分析模型列表
-            anaModels: [
-                {
-                    id: 1,
-                    name: "耕地监测分析模型",
-                },
-                {
-                    id: 2,
-                    name: "基本农田保护模型",
-                },
-                {
-                    id: 3,
-                    name: "生态保护分析模型",
-                },
-                {
-                    id: 4,
-                    name: "矿产监测分析模型",
-                },
-            ],
-        };
-    },
-    methods: {
-        getCurrentDateTime() {
-            return moment(new Date()).format("YYYYMMDDHHmmss");
-            const now = new Date();
-            const year = now.getFullYear();
-            const month = this.padNumber(now.getMonth() + 1); // 月份是从0开始的
-            const day = this.padNumber(now.getDate());
-            const hours = this.padNumber(now.getHours());
-            const minutes = this.padNumber(now.getMinutes());
-            const seconds = this.padNumber(now.getSeconds());
-            return `${year}-${month}-${day} ${hours}-${minutes}-${seconds}`;
+  components: {
+    range,
+    zdyModelPop,
+  },
+  data() {
+    return {
+      ruleForm: {
+        xzmj: 0,
+        xmmc: "耕地保护项目_" + this.getCurrentDateTime(),
+      },
+      rules: {
+        xzmj: [{ required: true, message: "请填写范围的数据" }],
+        xmmc: [
+          { required: true, message: "请输入项目名称", trigger: "blur" },
+          {
+            min: 1,
+            message: "请输入至少为一个字符的项目名称",
+            trigger: "blur",
+          },
+        ],
+      },
+      //分析模型列表
+      anaModels: [
+        {
+          id: 1,
+          name: "耕地监测分析模型",
+        },
+        {
+          id: 2,
+          name: "基本农田保护模型",
         },
-        padNumber(num) {
-            return num < 10 ? "0" + num : num;
+        {
+          id: 3,
+          name: "生态保护分析模型",
         },
-        //自定义模型按钮
-        zdyModel() {
-            this.$refs.zdyPop.dialogVisible = true;
+        {
+          id: 4,
+          name: "矿产监测分析模型",
+        },
+      ],
+    };
+  },
+  methods: {
+    getCurrentDateTime() {
+      return moment(new Date()).format("YYYYMMDDHHmmss");
+      const now = new Date();
+      const year = now.getFullYear();
+      const month = this.padNumber(now.getMonth() + 1); // 月份是从0开始的
+      const day = this.padNumber(now.getDate());
+      const hours = this.padNumber(now.getHours());
+      const minutes = this.padNumber(now.getMinutes());
+      const seconds = this.padNumber(now.getSeconds());
+      return `${year}-${month}-${day} ${hours}-${minutes}-${seconds}`;
+    },
+    padNumber(num) {
+      return num < 10 ? "0" + num : num;
+    },
+    //自定义模型按钮
+    zdyModel() {
+      this.$refs.zdyPop.dialogVisible = true;
+    },
+    handleEdit(item) {
+      console.log(item, "暂时使用");
+      this.zdyModel();
+    },
+    reset(){
+       this.ruleForm={
+        xzmj: 0,
+        xmmc: "耕地保护项目_" + this.getCurrentDateTime(),
+      }
+      this.$refs.ruleForm.resetFields();
+      this.$refs.range.reset();
+    },
+    submitData() {
+      //更新范围
+      var _temp = this.$refs.range.getRange();
+      this.ruleForm.xzmj = _temp.xzmj;
+      this.$refs.ruleForm.validate((valid) => {
+        if (valid) {
+          if (!this.$refs.range.fileDataID) {
+            Message.warning("请绘制或导入选址范围!");
+            return;
+          }
+          let obj = {
+            xzmj: Number(this.ruleForm.xzmj),
+            xmmc: this.ruleForm.xmmc,
+          };
 
-         },
-         handleEdit(item){
-            console.log(item,'暂时使用');
-            this.zdyModel()
-         }
+          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");
+          },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)
+        //     });
+        } else {
+          loading.close();
+          console.log("error submit!!");
+          return false;
+        }
+      });
     },
+  },
 };
 </script>
 
 <style lang="less" scoped>
 .fzjcyp {
-    height: 100%;
-    line-height: 40px;
+  height: 100%;
+  line-height: 40px;
 
-    .range {
-        flex: 1;
-        width: 100%;
-    }
+  .range {
+    flex: 1;
+    width: 100%;
+  }
 
-    .XZtree {
-        width: 100%;
-        height: calc(100% - 400px);
-        // padding: 7px;
-        margin-bottom: 10px;
-        overflow-y: auto;
-    }
+  .XZtree {
+    width: 100%;
+    height: calc(100% - 400px);
+    // padding: 7px;
+    margin-bottom: 10px;
+    overflow-y: auto;
+  }
 
-    ::v-deep .ghzc .el-table td.el-table__cell,
-    .ghzc .el-table th.el-table__cell.is-leaf {
-        border-bottom: none !important;
-    }
+  ::v-deep .ghzc .el-table td.el-table__cell,
+  .ghzc .el-table th.el-table__cell.is-leaf {
+    border-bottom: none !important;
+  }
 }
 </style>

+ 16 - 13
src/views/farmlandProtection/index.vue

@@ -10,15 +10,13 @@
             <FZJCYP v-loading="loading" @updateParent="changeData" ref="fzjcyp"></FZJCYP>
           </el-tab-pane>
           <el-tab-pane label="历史记录" name="lsju">
-            历史记录
-            <!-- <Lsjl :rzBsm="rzBsm" :activeTabs="activeTabs" @updateParent="changeData" type="ghxz" ref="lsju"></Lsjl> -->
+            <Lsjl :rzBsm="rzBsm" :activeTabs="activeTabs" @updateParent="changeData" type="gdbh" ref="lsju"></Lsjl>
           </el-tab-pane>
           <el-tab-pane label="分析结果" :disabled="activeTabs != 'scjg'" name="fxjg">
-            分析结果
-            <!-- <div v-drag style="height: 100%;">
-              <XZJG :activeTabs="activeTabs" :loading="loading" :rwBsm="rwBsm" :rzMc="nowObj.xmmc"
-                v-if="activeTabs == 'xzjg'"></XZJG>
-            </div> -->
+            <div v-drag style="height: 100%;">
+              <FXJG :activeTabs="activeTabs" :loading="loading" :rwBsm="rwBsm" :rzMc="nowObj.xmmc"
+                v-if="activeTabs == 'fxjg'"></FXJG>
+            </div>
           </el-tab-pane>
         </el-tabs>
       </div>
@@ -28,10 +26,15 @@
   
   <script>
   import FZJCYP from "./components/fzjcyp.vue";
+  import FXJG from "./components/fxjg.vue";
+  import Lsjl from "../complianceAnalysis/components/lsjl.vue";
+
   export default {
     name: "farmlandProtection",
     components: {
-      FZJCYP
+      FZJCYP,
+      Lsjl,
+      FXJG
     },
     data() {
       return {
@@ -56,12 +59,12 @@
       activeTabs(newValue) {
   
         // if (newValue != "fzxz") this.$refs.fzxz.reset();
-        // if (newValue != "lsju") this.$refs.lsju.reset();
+        if (newValue != "lsju") this.$refs.lsju.reset();
   
-        // if (newValue == "lsju") {
-        //   this.$refs.lsju.reset();
-        //   this.$refs.lsju.changeForm();
-        // }
+        if (newValue == "lsju") {
+          this.$refs.lsju.reset();
+          this.$refs.lsju.changeForm();
+        }
       },
     },
   };