maxiaoxiao 3 tháng trước cách đây
mục cha
commit
c642651041

+ 104 - 0
src/api/supervise/pcsj.js

@@ -77,3 +77,107 @@ export function getYwlxList(query) {
     params: query
   })
 }
+// 新增模版数据
+export function addYwlx(data) {
+  return request({
+    url: '/apply/supervise/ywlx',
+    method: 'post',
+    data: data
+  })
+}
+// 删除模版数据
+export function delYwlx(id) {
+  return request({
+    url: '/apply/supervise/ywlx/' + id,
+    method: 'delete'
+  })
+}
+//修改模版数据
+export function updateYwlx(data) {
+  return request({
+    url: '/apply/supervise/ywlx',
+    method: 'put',
+    data: data
+  })
+}
+
+//模版字段查询列表
+export function getYwlxFieldList(query) {
+  return request({
+    url: '/apply/supervise/ywlx/field/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 模版字段新增
+export function addYwlxField(data) {
+  return request({
+    url: '/apply/supervise/ywlx/field',
+    method: 'post',
+    data: data
+  })
+}
+// 删除模版数据
+export function delYwlxField(id) {
+  return request({
+    url: '/apply/supervise/ywlx/field/' + id,
+    method: 'delete'
+  })
+}
+//模版字段详情查询
+export function getYwlxField(id) {
+  return request({
+    url: '/apply/supervise/ywlx/field/' + id,
+    method: 'get'
+  })
+}
+//修改模版数据
+export function updateYwlxField(data) {
+  return request({
+    url: '/apply/supervise/ywlx/field',
+    method: 'put',
+    data: data
+  })
+}
+
+//查询图斑列表信息列表map
+export function getXqListMap(query) {
+  return request({
+    url: '/apply/supervise/xq/list.map',
+    method: 'get',
+    params: query
+  })
+}
+//查询图斑列表信息列表key
+export function getXqListKey(query) {
+  return request({
+    url: '/apply/supervise/xq/list.key',
+    method: 'get',
+    params: query
+  })
+}
+export function getXqIdMap(query) {
+  return request({
+    url: '/apply/supervise/xq/id.map',
+    method: 'get',
+    params: query
+  })
+}
+export function getXqIdKey(query) {
+  return request({
+    url: '/apply/supervise/xq/id.key',
+    method: 'get',
+    params: query
+  })
+}
+
+
+// 查询部门列表
+export function listDept(query) {
+  return request({
+    url: '/system/dept/deptTree',
+    method: 'get',
+    params: query
+  })
+}

+ 6 - 1
src/store/modules/user.js

@@ -8,7 +8,8 @@ const user = {
     name: '',
     avatar: '',
     roles: [],
-    permissions: []
+    permissions: [],
+    deptId:''
   },
 
   mutations: {
@@ -32,6 +33,9 @@ const user = {
     },
     SET_PERMISSIONS: (state, permissions) => {
       state.permissions = permissions
+    },
+    SET_DEPTID: (state, deptId) => {
+      state.deptId = deptId
     }
   },
 
@@ -69,6 +73,7 @@ const user = {
             commit('SET_ROLES', ['ROLE_DEFAULT'])
           }
           commit('SET_ID', user.userId)
+          commit('SET_DEPTID', user.deptId)
           commit('SET_NAME', user.userName)
           commit('SET_AVATAR', avatar)
           resolve(res)

+ 2 - 2
src/views/login.vue

@@ -72,8 +72,8 @@ export default {
     return {
       codeUrl: "",
       loginForm: {
-        username: "admin",
-        password: "123456",
+        username: "",
+        password: "",
         rememberMe: false,
         code: "",
         uuid: ""

+ 12 - 1
src/views/remote/MapView.vue

@@ -251,6 +251,16 @@ export default {
       });
       this.maps[target] = map;
       window.map = this.maps;
+      window.map[target].on("moveend", function (e) {
+        var zoom = window.map[target].getView().getZoom(); //获取当前地图的缩放级别
+        console.log(zoom);
+        if (zoom >= 12) {
+          // tianjinlayer.getSource().clear(); //控制地图图层不可见
+          console.log('我大于12');
+        } else {
+          console.log('我小于12');
+        }
+      });
     },
   },
   mounted() {
@@ -270,7 +280,8 @@ export default {
 
 <style lang="scss" scoped>
 .map {
-  width: calc(100% - 520px);
+  // width: calc(100% - 520px);
+  width: 70%;
   height: 91vh;
   position: relative;
 }

+ 223 - 67
src/views/remote/farmland/index.vue

@@ -1,9 +1,9 @@
 <template>
   <div id="mapApp">
-    <div class="btn" v-if="nowObj.qsx">
+    <div class="btn" v-if="nowObj['前时相']">
       <!-- <el-button @click="drawer = true">打开抽屉</el-button> -->
-      <span class="sx qsx">前时相:{{ nowObj.qsx }}</span>
-      <span class="sx hsx">后时相:{{ nowObj.hsx }}</span>
+      <span class="sx qsx">前时相:{{ nowObj['前时相']}}</span>
+      <span class="sx hsx">后时相:{{ nowObj['后时相'] }}</span>
     </div>
     <MapView :maptype="maptype" ref="MapView" />
 
@@ -13,19 +13,56 @@
       :modal="false"
       :wrapperClosable="false"
       modal-class="mask-layer"
+      size="28vw"
     >
       <div class="jctbCon">
         <div class="tbTitle">
           <span>监测图斑{{ newObj.name }}</span>
-
-          <el-input
+          <el-select
+            v-model="domains"
+            multiple
+            collapse-tags
+            placeholder="请选择其它搜索条件"
+            @change="handleChange"
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+              :disabled="item.value == '监测编号' ? true : false"
+            >
+            </el-option>
+          </el-select>
+          <el-button @click="handleDownload">下载</el-button>
+          <!-- <el-input
             placeholder="请输入监测编号查询"
             prefix-icon="el-icon-search"
-            v-model="queryParams.jcbh"
-            @change="getList()"
+            v-model="queryParams['监测编号']"
+            @change="getTemplate()"
           >
-          </el-input>
-          <el-button @click="handleDownload">下载</el-button>
+          </el-input> -->
+          <div class="demo-input-suffix">
+            监测编号:
+            <el-input
+              placeholder="请输入监测编号查询"
+              prefix-icon="el-icon-search"
+              v-model="queryParams['监测编号']"
+              @change="getTemplate()"
+            >
+            </el-input>
+          </div>
+          <div class="demo-input-suffix" v-for="(ditem, i) in domains" :key="i">
+            {{ ditem + ":" }}
+            <el-input
+              :placeholder="'请输入' + ditem + '查询'"
+              prefix-icon="el-icon-search"
+              v-model="queryParams[ditem]"
+              @change="getTemplate()"
+            >
+            </el-input>
+            <el-button @click.prevent="removeDomain(ditem)">删除</el-button>
+          </div>
         </div>
         <div class="numCard">
           <div class="cardItem">
@@ -37,21 +74,20 @@
             <span>{{ newObj.spotsarea }}</span>
           </div>
         </div>
-        <el-table :data="tableData" border style="width: 100%">
-          <!-- @cell-click="tableClick" -->
-          <el-table-column prop="jcbh" label="监测编号" width="220">
-            <template slot-scope="scope">
-              <span style="cursor: pointer" @click="tableClick(scope.row)">{{
-                scope.row.jcbh
-              }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column prop="xmc" label="区县名称" show-overflow-tooltip>
-          </el-table-column>
+        <el-table
+          :data="tableData"
+          border
+          style="width: 100%"
+          @row-click="tableClick"
+        >
           <el-table-column
-            prop="jcmj"
-            label="监测面积(亩)"
+            :prop="templateList[i]"
+            :label="templateList[i]"
             show-overflow-tooltip
+            v-for="(item, i) in templateList"
+            :key="i"
+            :width="templateList[i] == '监测编号' ? 200 : ''"
+            align="center"
           >
           </el-table-column>
           <el-table-column label="操作" align="center">
@@ -70,12 +106,20 @@
           :total="total"
           :page.sync="queryParams.pageNum"
           :limit.sync="queryParams.pageSize"
-          @pagination="getList"
+          @pagination="getTemplate"
         />
       </div>
     </el-drawer>
     <el-dialog title="详细信息" :visible.sync="dialogVisible" width="30%">
-      <CustomDetails :model="infoObj" :config="detailInfos"></CustomDetails>
+      <!-- <CustomDetails :model="infoObj" :config="detailInfos"></CustomDetails> -->
+      <el-descriptions class="margin-top" :column="1">
+        <el-descriptions-item
+          :label="item"
+          v-for="(item, i) in descriptionsList"
+          :key="i"
+          >{{ infoObj[item] }}</el-descriptions-item
+        >
+      </el-descriptions>
     </el-dialog>
   </div>
 </template>
@@ -84,7 +128,16 @@
 import MapView from "../MapView.vue";
 import CustomDetails from "@/components/custom-detailsInfo.vue";
 import parse from "wellknown";
-import { getPcsj, listPcsjXQList, getPcsjXQ } from "@/api/supervise/pcsj";
+// import { pinyin } from "pinyin-pro";
+import {
+  getPcsj,
+  listPcsjXQList,
+  getPcsjXQ,
+  getXqListMap,
+  getXqListKey,
+  getXqIdMap,
+  getXqIdKey,
+} from "@/api/supervise/pcsj";
 import { detailInfos } from "./config";
 import "ol/ol.css";
 // import { get as getProjection, transform } from "ol/proj.js";
@@ -119,10 +172,13 @@ export default {
   },
   data() {
     return {
+      options: [],
+      domains: [], //存储动态搜索列表
+      // value: ["监测编号"], //下拉框选中的值
       maptype: "normal",
       total: 0,
       queryParams: {
-        jcbh: "", //监测编号
+        监测编号: "", //监测编号
         pageNum: 1,
         pageSize: 10,
         pcsjid: this.$route.query.id,
@@ -143,6 +199,9 @@ export default {
       dialogVisible: false,
       infoObj: {},
       detailInfos: detailInfos,
+      templateList: [],
+      descriptionsList: [], //详情描述列表存储字段
+      envelopegeomObj: {}, //用于存储进入页面飞入视角的对象
     };
   },
   mounted() {
@@ -150,12 +209,115 @@ export default {
     this.$nextTick(() => {
       getPcsj(this.$route.query.id).then((response) => {
         this.newObj = response.data;
+
+        // if (this.newObj.envelopegeom && this.newObj.envelopegeom != "") {
+        //   if (typeof this.newObj.envelopegeom === "string") {
+        //     let geom = this.newObj.envelopegeom;
+        //     this.newObj.envelopegeom = parse(geom);
+        //   }
+        //   let features = new GeoJSON().readFeatures(this.newObj.envelopegeom);
+        //   this.envelopegeomObj = new VectorLayer({
+        //     source: new VectorSource({
+        //       features: features,
+        //     }),
+        //     style: function (feature) {
+        //       return new Style({
+        //         stroke: new Stroke({
+        //           //边界样式
+        //           color: "rgba(255, 0, 0, 1)",
+        //           width: 2,
+        //         }),
+        //       });
+        //     },
+        //     zIndex: 9999,
+        //   });
+        //   let fullExtent = this.envelopegeomObj.getSource().getExtent();
+
+        //   window.map["mapDiv"]
+        //     .getView()
+        //     .fit(fullExtent, window.map["mapDiv"].getSize());
+        //   window.map["mapDiv"].addLayer(this.envelopegeomObj);
+        // }
       });
-      this.getList();
+      this.getTemplate();
     });
   },
 
   methods: {
+    removeDomain(item) {
+      var index = this.domains.indexOf(item);
+      if (index !== -1) {
+        this.domains.splice(index, 1);
+        this.$delete(this.queryParams, item); //删除对象属性
+        this.getTemplate();
+      }
+    },
+    handleDelete(row) {
+      this.tableData.forEach((item, i) => {
+        window.map["mapDiv"].removeLayer(this.curPageResultLayer["mapDiv" + i]);
+      });
+    },
+    handleChange(val) {
+      // this.$set(this.queryParams, val, "");
+      // this.domains.push(val);
+      // this.domains = val;
+      if (this.domains.indexOf(val) == -1) {
+        this.domains = val;
+        this.$set(this.queryParams, val, "");
+      } else {
+        this.domains.splice(this.domains.indexOf(val), 1);
+        this.$delete(this.queryParams, item);
+      }
+      console.log(this.queryParams, ";this.queryParams", this.domains);
+    },
+    //动态获取设置的模版字段
+    getTemplate() {
+      this.handleDelete();
+      let arr = [
+        "中心点经度",
+        "中心点纬度",
+        "前时相",
+        "后时相",
+        "空间信息",
+        "geom",
+        "前时相对应影像数据",
+        "后时相对应影像数据",
+      ];
+      this.templateList = [];
+      this.options = [];
+
+      getXqListKey(this.queryParams).then((res) => {
+        res.data.forEach((i) => {
+          if (!arr.includes(i)) {
+            this.templateList.push(i);
+            // this.options.push({
+            //   // value: pinyin(i, {
+            //   //   pattern: "first",
+            //   //   toneType: "none",
+            //   //   separator: "",
+            //   // }),
+            //   label: i,
+            // });
+            this.options.push({
+              value: i,
+              label: i,
+            });
+          }
+        });
+      });
+
+      getXqListMap(this.queryParams).then((res) => {
+        console.log(res, "======");
+        this.tableData = res.rows;
+        this.total = res.total;
+        this.initVectorLayer("mapDiv");
+        this.initVectorLayer("mapCon1");
+        this.initVectorLayer("mapCon2");
+        this.addGeoJson("mapDiv");
+        this.addGeoJson("mapCon1");
+        this.addGeoJson("mapCon2");
+      });
+    },
     handleDownload() {
       const zipfile = this.newObj.proxypath + ".zip";
       window.open(`${zipfile}`);
@@ -163,8 +325,8 @@ export default {
     tableClick(row) {
       removeWebGLTile("mapCon1");
       removeWebGLTile("mapCon2");
-      let urlQsx = this.newObj.proxypath + row.qsxtif;
-      let urlHsx = this.newObj.proxypath + row.hsxtif;
+      let urlQsx = this.newObj.proxypath + row["前时相对应影像数据"];
+      let urlHsx = this.newObj.proxypath + row["后时相对应影像数据"];
       if (this.nowObj.id != row.id) {
         this.maptype = "split";
         this.nowObj = row;
@@ -181,8 +343,6 @@ export default {
       listPcsjXQList(this.queryParams).then((response) => {
         this.tableData = response.rows;
         this.total = response.total;
-        // this.open = true;
-        // this.title = "修改监管批次数据";
         this.initVectorLayer("mapDiv");
         this.initVectorLayer("mapCon1");
         this.initVectorLayer("mapCon2");
@@ -192,10 +352,13 @@ export default {
       });
     },
     handleDetails(row) {
-      getPcsjXQ(row.id).then((res) => {
+      getXqIdMap({ pcsjid: this.$route.query.id, id: row.id }).then((res) => {
         this.infoObj = res.data;
-        this.dialogVisible = true;
       });
+      getXqIdKey({ pcsjid: this.$route.query.id }).then((res) => {
+        this.descriptionsList = res.data;
+      });
+      this.dialogVisible = true;
     },
     handleClose() {
       this.drawer = false;
@@ -203,7 +366,6 @@ export default {
     test(item) {
       window.map["mapCon1"].removeLayer(this.itemObj);
       window.map["mapCon2"].removeLayer(this.itemObj);
-
       if (item.geom && item.geom != "") {
         if (typeof item.geom === "string") {
           let geom = this.tableData[i].geom;
@@ -225,27 +387,26 @@ export default {
           },
           zIndex: 9999,
         });
-        let fullExtent = this.itemObj.getSource().getExtent();
-        window.map["mapCon1"].getView().fit(fullExtent, {
-          duration: 3, //动画的持续时间,
-          callback: null,
+        window.map["mapCon1"].getView().animate({
+          center: [item["中心点经度"], item["中心点纬度"]],
+          zoom: 16.5,
+          duration: 2000, // 动画持续时间,单位毫秒
         });
         window.map["mapCon1"].addLayer(this.itemObj);
         window.map["mapCon2"].addLayer(this.itemObj);
       }
     },
-    addGeoJson2(name) {
-      window.map[name].removeLayer(this.vectorLayer[name]);
+    //创建监测图斑列表实体
+    addGeoJson(name) {
       this.tableData.forEach((titem, i) => {
         if (titem.geom && titem.geom != "") {
           if (typeof titem.geom === "string") {
-            // let geom = transform(this.tableData[i].geom);
             let geom = this.tableData[i].geom;
             titem.geom = parse(geom);
           }
           let features = new GeoJSON().readFeatures(titem.geom);
-
-          this.vectorLayer[name] = new VectorLayer({
+          var tempName = name + i;
+          this.curPageResultLayer[tempName] = new VectorLayer({
             source: new VectorSource({
               features: features,
             }),
@@ -253,36 +414,21 @@ export default {
               return new Style({
                 stroke: new Stroke({
                   //边界样式
-                  color: "#1f1cd3",
+                  color: "rgba(0, 0, 255, 1)",
                   width: 2,
                 }),
               });
             },
             zIndex: 9999,
           });
-          window.map[name].addLayer(this.vectorLayer[name]);
+          window.map[name].addLayer(this.curPageResultLayer[tempName]);
         }
       });
-      let fullExtent = this.vectorLayer[name].getSource().getExtent();
-      window.map[name].getView().fit(fullExtent, {
-        duration: 3, //动画的持续时间,
-        callback: null,
-      });
-    },
-
-    addGeoJson(name) {
-      this.tableData.forEach((titem, i) => {
-        if (titem.geom && titem.geom != "") {
-          if (typeof titem.geom === "string") {
-            // let geom = transform(this.tableData[i].geom);
-            let geom = this.tableData[i].geom;
-            titem.geom = parse(geom);
-          }
-          let features = new GeoJSON().readFeatures(titem.geom);
-          this.curPageResultLayer[name].getSource().addFeatures(features);
-        }
-      });
-      let fullExtent = this.curPageResultLayer[name].getSource().getExtent();
+      let fullExtent = this.curPageResultLayer[
+        name + (this.tableData.length - 1)
+      ]
+        .getSource()
+        .getExtent();
       window.map[name].getView().fit(fullExtent, {
         duration: 3, //动画的持续时间,
         callback: null,
@@ -354,12 +500,21 @@ export default {
 ::v-deep .el-drawer__container {
   position: static !important;
 }
+::v-deep .el-drawer__body {
+  width: 28vw;
+}
 .jctbCon {
   .tbTitle {
     display: flex;
     justify-content: space-around;
+    justify-content: flex-start;
+    flex-wrap: wrap;
     ::v-deep .el-input {
-      width: 40%;
+      // width: 28%;
+      width: 55%;
+    }
+    ::v-deep .el-input--suffix {
+      width: 100% !important;
     }
   }
   .numCard {
@@ -371,7 +526,8 @@ export default {
     align-items: center;
     justify-content: space-between;
     .cardItem {
-      width: 230px;
+      // width: 230px;
+      width: 200px;
       height: 85px;
       background: linear-gradient(
         180deg,

+ 80 - 35
src/views/remote/satellite/index.vue

@@ -11,22 +11,31 @@
       <el-form-item label="行政区">
         <!-- <el-col :span="4"> -->
         <treeselect
-          v-model="queryParams.deptId"
+          v-model="queryParams.xzqdm"
           :options="deptOptions"
           :normalizer="normalizer"
           placeholder="选择行政区"
-          @change="treeselecthange"
+          noOptionsText="暂无数据"
+          noChildrenText="没有子选项"
           :value="selectedValues"
+          @select="treeselecthange"
         />
         <!-- </el-col> -->
       </el-form-item>
-
-      <el-form-item label="活动时间">
+      <el-form-item label="文件名称">
+        <el-input
+          v-model="queryParams.name"
+          placeholder="请输入文件名称"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="数据日期">
         <el-col :span="11">
           <el-date-picker
             type="date"
-            placeholder="选择日期"
-            v-model="queryParams.filetime"
+            placeholder="选择开始日期"
+            v-model="queryParams.beginTime"
             style="width: 100%"
             value-format="yyyy-MM-dd"
           ></el-date-picker>
@@ -35,30 +44,28 @@
         <el-col :span="11">
           <el-date-picker
             type="date"
-            placeholder="选择日期"
-            v-model="queryParams.readtime"
+            placeholder="选择截止日期"
+            v-model="queryParams.endTime"
             style="width: 100%"
             value-format="yyyy-MM-dd"
           ></el-date-picker>
         </el-col>
       </el-form-item>
-      <el-form-item label="文件名称">
-        <el-input
-          v-model="queryParams.name"
-          placeholder="请输入文件名称"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
+     
       <el-form-item>
         <el-button
           type="primary"
           icon="el-icon-search"
           size="mini"
           @click="handleQuery"
+          v-hasPermi="['supervise:pcsj:list']"
           >搜索</el-button
         >
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+        <el-button
+          icon="el-icon-refresh"
+          size="mini"
+          @click="resetQuery"
+          v-hasPermi="['supervise:pcsj:list']"
           >重置</el-button
         >
       </el-form-item>
@@ -72,6 +79,7 @@
           icon="el-icon-upload"
           @click="fileUploadHandle"
           size="mini"
+          v-hasPermi="['supervise:pcsj:upload']"
           >上传</el-button
         >
       </el-col>
@@ -130,9 +138,16 @@
     <el-table
       v-loading="loading"
       :data="pcsjList"
-      @selection-change="handleSelectionChange"
+     
     >
-      <el-table-column type="selection" width="55" align="center" />
+    <!-- @selection-change="handleSelectionChange" -->
+      <!-- <el-table-column type="selection" width="55" align="center" /> -->
+      <!-- <el-table-column label="序号" align="center" prop="index" /> -->
+      <el-table-column label="序号" type="index" align="center">
+        <template slot-scope="scope">
+          <span>{{scope.$index + 1}}</span>
+        </template>
+      </el-table-column>
       <el-table-column label="文件名称" align="center" prop="name" />
       <el-table-column label="区县名称" align="center" prop="xzqmc" />
       <el-table-column
@@ -156,8 +171,8 @@
           <!-- <span>{{ scope.row.spotssize }}</span> -->
         </template>
       </el-table-column>
-
-      <el-table-column label="录入时间" align="center" prop="filetime" />
+      <el-table-column label="上传时间" align="center" prop="readtime" />
+      <el-table-column label="数据日期" align="center" prop="filetime" />
       <el-table-column
         label="操作"
         align="center"
@@ -170,6 +185,7 @@
             icon="el-icon-edit"
             @click="handleBrowse(scope.row)"
             :disabled="scope.row.readstatus != 0"
+            v-hasPermi="['supervise:pcsj:list']"
             >浏览</el-button
           >
           <el-button
@@ -177,8 +193,17 @@
             type="text"
             icon="el-icon-edit"
             @click="handleDownload(scope.row)"
+            v-hasPermi="['supervise:pcsj:list']"
             >下载</el-button
           >
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['supervise:pcsj:remove']"
+            >删除</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
@@ -247,8 +272,15 @@
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button @click="cancel">取 消</el-button>
+        <el-button
+          type="primary"
+          v-hasPermi="['supervise:pcsj:upload']"
+          @click="submitForm"
+          >确 定</el-button
+        >
+        <el-button v-hasPermi="['supervise:pcsj:upload']" @click="cancel"
+          >取 消</el-button
+        >
       </div>
     </el-dialog>
 
@@ -287,8 +319,8 @@ import {
   addPcsj,
   updatePcsj,
   tiffUpload,
+  listDept,
 } from "@/api/supervise/pcsj";
-import { listDept } from "@/api/system/dept";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 export default {
@@ -328,9 +360,9 @@ export default {
         pageNum: 1,
         pageSize: 10,
         name: "", //文件名称
-        deptId: undefined, //区县名称
-        filetime: "", //录入时间
-        readtime: "", //处理时间
+        xzqdm: undefined, //区县编码
+        beginTime: "", //录入时间
+        endTime: "", //处理时间
       },
       // 表单参数
       form: {
@@ -364,19 +396,30 @@ export default {
     this.getList();
     this.getDept();
   },
+  computed: {
+    watchDeptId() {
+      return this.queryParams.xzqdm;
+    },
+  },
+  watch: {
+    watchDeptId(newVal) {
+      // console.log(newVal,'newValnewVal');
+    },
+  },
   methods: {
     getDept() {
       // 查询参数
       let queryParams = {
-        deptName: undefined,
+        deptId: this.$store.state.user.deptId,
         status: undefined,
       };
       listDept(queryParams).then((res) => {
-        this.deptOptions = this.handleTree(res.data, "deptId");
+        this.deptOptions = res.data;
       });
     },
     treeselecthange(value) {
-      this.selectedValues = value;
+      this.selectedValues = value.district;
+      this.queryParams.xzqdm = value.district;
     },
     handleChange() {},
     /** 转换部门数据结构 */
@@ -385,8 +428,8 @@ export default {
         delete node.children;
       }
       return {
-        id: node.deptId,
-        label: node.deptName,
+        id: node.district,
+        label: node.label,
         children: node.children,
       };
     },
@@ -468,8 +511,8 @@ export default {
         pageSize: 10,
         name: "", //文件名称
         xzqdm: "", //区县名称
-        filetime: "", //录入时间
-        readtime: "", //处理时间
+        beginTime: "", //录入时间
+        endTime: "", //处理时间
       }),
         this.handleQuery();
     },
@@ -522,9 +565,11 @@ export default {
     },
     /** 删除按钮操作 */
     handleDelete(row) {
+      console.log(row)
       const ids = row.id || this.ids;
+      const idname = row.name;
       this.$modal
-        .confirm('是否确认删除监管批次数据编号为"' + ids + '"的数据项?')
+        .confirm('是否确认删除监管批次数据名称为"' + idname + '"的数据项?')
         .then(function () {
           return delPcsj(ids);
         })

+ 333 - 0
src/views/remote/template-data/index.vue

@@ -0,0 +1,333 @@
+<template>
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      label-width="140px"
+    >
+      <el-form-item label="shp字段名称">
+        <el-input
+          v-model="queryParams.shpfield"
+          placeholder="请输入shp字段名称"
+          clearable
+          @keyup.enter.native="getList"
+        />
+      </el-form-item>
+      <el-form-item label="数据库字段中文名称">
+        <el-input
+          v-model="queryParams.fieldnamezw"
+          placeholder="请输入数据库字段中文名称"
+          clearable
+          @keyup.enter.native="getList"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="getList"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
+      </el-form-item>
+    </el-form>
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          @click="addMbyz"
+          size="mini"
+          >新增</el-button
+        >
+      </el-col></el-row
+    >
+    <el-table
+      v-loading="loading"
+      :data="mbzdList"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="shp字段名称" align="center" prop="shpfield" />
+      <el-table-column label="数据库字段名称" align="center" prop="fieldname" />
+      <el-table-column
+        label="数据库字段中文名称"
+        align="center"
+        prop="fieldnamezw"
+      />
+      <el-table-column label="排序" align="center" prop="sort" />
+      <el-table-column label="业务类型" align="center" prop="ywlx" />
+      <el-table-column label="结果集显示" align="center" prop="listdisplay" />
+      <el-table-column label="详情集显示" align="center" prop="infodisplay" />
+      <el-table-column label="汇总面积" align="center" prop="sumdisplay" />
+      <el-table-column label="查询编号" align="center" prop="bhdisplay" />
+      <el-table-column label="排序方式" align="center" prop="orderfield" />
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
+        <template slot-scope="scope">
+          <!-- <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-view"
+            @click="handleView(scope.row)"
+            >查看</el-button
+          > -->
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleEdit(scope.row)"
+            >编辑</el-button
+          >
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            >删除</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+    <el-dialog
+      :title="title"
+      :visible.sync="dialogVisible"
+      width="30%"
+      :before-close="handleClose"
+    >
+      <el-form ref="form" :model="form" :rules="rules" label-width="160px">
+        <el-form-item label="shp字段名称" prop="shpfield">
+          <el-input v-model="form.shpfield"></el-input>
+        </el-form-item>
+        <el-form-item label="数据库字段名称" prop="fieldname">
+          <el-input v-model="form.fieldname"></el-input>
+        </el-form-item>
+        <el-form-item label="数据库字段中文名称" prop="fieldnamezw">
+          <el-input v-model="form.fieldnamezw"></el-input>
+        </el-form-item>
+        <el-form-item label="排序" prop="sort">
+          <!-- <el-input v-model="form.sort"></el-input> -->
+          <el-input-number
+            v-model="form.sort"
+            :min="1"
+            label="最小值为1"
+          ></el-input-number>
+        </el-form-item>
+        <el-form-item label="业务类型" prop="ywlx">
+          <el-input v-model="form.ywlx" disabled></el-input>
+        </el-form-item>
+        <el-form-item label="结果集显示" prop="listdisplay">
+          <el-input v-model="form.listdisplay"></el-input>
+        </el-form-item>
+        <el-form-item label="详情集显示" prop="infodisplay">
+          <el-input v-model="form.infodisplay"></el-input>
+        </el-form-item>
+        <el-form-item label="汇总面积" prop="sumdisplay">
+          <el-input v-model="form.sumdisplay"></el-input>
+        </el-form-item>
+        <el-form-item label="查询编号" prop="bhdisplay">
+          <el-input v-model="form.bhdisplay"></el-input>
+        </el-form-item>
+        <el-form-item label="排序方式" prop="orderfield">
+          <!-- <el-input v-model="form.orderfield"></el-input> -->
+          <el-radio v-model="form.orderfield" label="asc">asc</el-radio>
+          <el-radio v-model="form.orderfield" label="desc">desc</el-radio>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="submitForm('form')">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  getYwlxFieldList,
+  addYwlxField,
+  updateYwlxField,
+  delYwlxField,
+  getYwlxField,
+} from "@/api/supervise/pcsj";
+export default {
+  data() {
+    return {
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        shpfield: "",
+        fieldnamezw: "",
+        ywlx: this.$route.query.id,
+      },
+      loading: false,
+      mbzdList: [],
+      total: 0,
+      title: "新增",
+      form: {
+        shpfield: "",
+        fieldname: "",
+        fieldnamezw: "",
+        sort: "",
+        ywlx: this.$route.query.id,
+        listdisplay: "",
+        infodisplay: "",
+        bhdisplay: "",
+        orderfield: "",
+      },
+      rules: {
+        shpfield: [
+          { required: true, message: "请输入shp字典名称", trigger: "blur" },
+        ],
+        fieldname: [
+          { required: true, message: "请输入数据库字段名称", trigger: "blur" },
+        ],
+        fieldnamezw: [
+          {
+            required: true,
+            message: "请输入数据库字段中文名称",
+            trigger: "blur",
+          },
+        ],
+        sort: [{ required: true, message: "请选择排序", trigger: "blur" }],
+        ywlx: [{ required: true, message: "请输入业务类型", trigger: "blur" }],
+      },
+      dialogVisible: false,
+    };
+  },
+  methods: {
+    getList() {
+      this.loading = true;
+      getYwlxFieldList(this.queryParams).then((response) => {
+        this.mbzdList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+
+    addMbyz() {
+      this.dialogVisible = true;
+      this.$nextTick(() => {
+        this.reset();
+      });
+    },
+    handleEdit(row) {
+      this.title = "修改";
+      this.form = JSON.parse(JSON.stringify(row));
+      this.dialogVisible = true;
+    },
+    resetQuery() {
+      this.queryParams = {
+        pageNum: 1,
+        pageSize: 10,
+        shpfield: "",
+        fieldnamezw: "",
+        ywlx: this.$route.query.id,
+      };
+      this.getList();
+    },
+    reset() {
+      this.$refs.form.resetFields();
+      this.form = {
+        shpfield: "",
+        fieldname: "",
+        fieldnamezw: "",
+        sort: "",
+        ywlx: this.$route.query.id,
+        listdisplay: "",
+        infodisplay: "",
+        bhdisplay: "",
+        orderfield: "",
+      };
+    },
+    handleDelete(row) {
+      this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          delYwlxField(row.id).then((res) => {
+            if (res.code == 200) {
+              this.$message({
+                type: "success",
+                message: "删除成功!",
+              });
+              this.getList();
+            }
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
+        });
+    },
+    handleSelectionChange() {},
+    handleClose() {
+      this.dialogVisible = false;
+    },
+    submitForm(form) {
+      this.$refs[form].validate((valid) => {
+        if (valid) {
+          if (this.title == "新增") {
+            addYwlxField(this.form).then((res) => {
+              if (res.code == 200) {
+                this.$message({
+                  message: "添加成功!",
+                  type: "success",
+                });
+                this.dialogVisible = false;
+                this.getList();
+              }
+            });
+          } else {
+            updateYwlxField(this.form).then((res) => {
+              if (res.code == 200) {
+                this.$message({
+                  message: "修改成功!",
+                  type: "success",
+                });
+                this.dialogVisible = false;
+                this.getList();
+              }
+            });
+          }
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+  },
+  mounted() {
+    this.getList();
+    // getYwlxField(this.$route.query.id).then((res) => {
+    //   if (res.code == 200) {
+    //     console.log(res,'//////');
+    //     // this.form.ywlx == res.data.ywlx;
+    //   }
+    // });
+  },
+};
+</script>
+
+<style>
+</style>

+ 163 - 18
src/views/remote/template/index.vue

@@ -13,15 +13,15 @@
           v-model="queryParams.ywlx"
           placeholder="请输入业务类型"
           clearable
-          @keyup.enter.native="handleQuery"
+          @keyup.enter.native="getList"
         />
       </el-form-item>
       <el-form-item label="业务类型名称">
         <el-input
-          v-model="queryParams.yelxmc"
+          v-model="queryParams.ywlxmc"
           placeholder="请输入业务类型名称"
           clearable
-          @keyup.enter.native="handleQuery"
+          @keyup.enter.native="getList"
         />
       </el-form-item>
       <el-form-item>
@@ -29,7 +29,7 @@
           type="primary"
           icon="el-icon-search"
           size="mini"
-          @click="handleQuery"
+          @click="getList"
           >搜索</el-button
         >
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
@@ -47,15 +47,20 @@
           size="mini"
           >新增</el-button
         >
-      </el-col></el-row>
+      </el-col></el-row
+    >
     <el-table
       v-loading="loading"
       :data="ydlxList"
       @selection-change="handleSelectionChange"
     >
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="业务类型" align="center" prop="ywlx" />
-      <el-table-column label="业务类型名称" align="center" prop="yelxmc" />
+      <el-table-column label="业务类型" align="center">
+        <template slot-scope="scope">
+          <span style="color: #337ab7;cursor: pointer;" @click="goYzpz(scope.row)"> {{ scope.row.ywlx }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="业务类型名称" align="center" prop="ywlxmc" />
       <el-table-column label="排序" align="center" prop="sort" />
       <el-table-column label="数据源" align="center" prop="sjy" />
       <el-table-column
@@ -64,13 +69,13 @@
         class-name="small-padding fixed-width"
       >
         <template slot-scope="scope">
-          <el-button
+          <!-- <el-button
             size="mini"
             type="text"
             icon="el-icon-view"
             @click="handleView(scope.row)"
             >查看</el-button
-          >
+          > -->
           <el-button
             size="mini"
             type="text"
@@ -95,11 +100,48 @@
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
     />
+    <el-dialog
+      :title="title"
+      :visible.sync="dialogVisible"
+      width="30%"
+      :before-close="handleClose"
+    >
+      <el-form ref="form" :model="form" :rules="rules" label-width="110px">
+        <el-form-item label="业务类型" prop="ywlx">
+          <el-input v-model="form.ywlx"></el-input>
+        </el-form-item>
+        <el-form-item label="业务类型名称" prop="ywlxmc">
+          <el-input v-model="form.ywlxmc"></el-input>
+        </el-form-item>
+        <el-form-item label="排序" prop="sort">
+          <!-- <el-input v-model="form.sort"></el-input> -->
+          <el-input-number
+            v-model="form.sort"
+            @change="handleChange"
+            :min="1"
+            label="最小值为1"
+          ></el-input-number>
+        </el-form-item>
+        <el-form-item label="数据源" prop="sjy">
+          <el-input v-model="form.sjy"></el-input>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="submitForm('form')">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-import { getYwlxList } from "@/api/supervise/pcsj";
+import {
+  getYwlxList,
+  addYwlx,
+  updateYwlx,
+  delYwlx,
+} from "@/api/supervise/pcsj";
+import { reset } from "ol/transform";
 export default {
   data() {
     return {
@@ -107,11 +149,28 @@ export default {
         pageNum: 1,
         pageSize: 10,
         ywlx: "", //业务类型
-        yelxmc: "", //业务类型名称
+        ywlxmc: "", //业务类型名称
       },
       total: 0,
       loading: false,
       ydlxList: [],
+      dialogVisible: false,
+      title: "新增",
+      form: {
+        ywlx: "",
+        ywlxmc: "",
+        sort: 1,
+        sjy: "",
+      },
+      rules: {
+        // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
+        ywlx: [{ required: true, message: "请输入业务类型", trigger: "blur" }],
+        ywlxmc: [
+          { required: true, message: "请输入业务类型名称", trigger: "blur" },
+        ],
+        sort: [{ required: true, message: "请输入排序", trigger: "blur" }],
+        sjy: [{ required: true, message: "请输入数据源", trigger: "blur" }],
+      },
     };
   },
   methods: {
@@ -124,6 +183,9 @@ export default {
         this.loading = false;
       });
     },
+    goYzpz(row){
+      this.$router.push({ path: "/remote/mbyz", query: { id: row.ywlx } });
+    },
     handleQuery() {},
     //重置
     resetQuery() {
@@ -131,21 +193,104 @@ export default {
         pageNum: 1,
         pageSize: 10,
         ywlx: "", //业务类型
-        yelxmc: "", //业务类型名称
+        ywlxmc: "", //业务类型名称
       };
+      this.getList()
     },
     handleSelectionChange() {},
-    handleView(row) {},
-    handleEdit(row) {},
-    handleDelete(row) {},
+    // handleView(row) {},
+    handleEdit(row) {
+      this.title = "修改";
+      this.form = JSON.parse(JSON.stringify(row));
+      this.dialogVisible = true;
+    },
+    handleDelete(row) {
+      this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          delYwlx(row.ywlx).then((res) => {
+            if (res.code == 200) {
+              this.$message({
+                type: "success",
+                message: "删除成功!",
+              });
+              this.getList();
+            }
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
+        });
+    },
     //新增业务类型数据
-    addYwlx(){
-
-    }
+    addYwlx() {
+      this.dialogVisible = true;
+      this.title = "新增"
+      this.reset();
+    },
+    handleClose() {
+      this.dialogVisible = false;
+    },
+    //排序改变的方法
+    handleChange(value) {
+      console.log(value);
+    },
+    submitForm(form) {
+      this.$refs[form].validate((valid) => {
+        if (valid) {
+          if (this.title == "新增") {
+            addYwlx(this.form).then((res) => {
+              if (res.code == 200) {
+                this.$message({
+                  message: "添加成功!",
+                  type: "success",
+                });
+                this.dialogVisible = false;
+                this.getList();
+              }
+            });
+          } else {
+            updateYwlx(this.form).then((res) => {
+              if (res.code == 200) {
+                this.$message({
+                  message: "修改成功!",
+                  type: "success",
+                });
+                this.dialogVisible = false;
+                this.getList();
+              }
+            });
+          }
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    reset() {
+      this.$refs.form.resetFields();
+      this.form = {
+        ywlx: "",
+        ywlxmc: "",
+        sort: 1,
+        sjy: "",
+      };
+    },
   },
   mounted() {
     this.getList();
   },
+  watch: {
+    // dialogVisible(newVal, oldVal) {
+    //   this.$refs.form.resetFields();
+    // },
+  },
 };
 </script>
 

+ 1 - 1
vue.config.js

@@ -35,7 +35,7 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        target: `http://192.168.60.4:8080`,
+        target: `http://192.168.60.2:19203`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''