Browse Source

数据录入图斑列表

maxiaoxiao 1 month ago
parent
commit
c716f41732

+ 5 - 4
src/api/rsmonitoring/dataEntry.js

@@ -10,10 +10,11 @@ export function listDkdb(query) {
 }
 
 // 查询录入详细
-export function getDkdb(id) {
+export function getDkdbList(params) {
   return request({
-    url: '/rsmonitoring/dkgeomdb/' + id,
-    method: 'get'
+    url: '/rsmonitoring/dkgeomdb/details/list',
+    method: 'get',
+    params
   })
 }
 
@@ -21,7 +22,7 @@ export function adddb(data) {
   return request({
     url: '/rsmonitoring/dkgeomdb',
     method: 'post',
-    data: data
+    data
   })
 }
 

+ 3 - 0
src/components/Pagination/index.vue

@@ -102,4 +102,7 @@ function handleCurrentChange(val) {
 .pagination-container.hidden {
   display: none;
 }
+.el-pagination{
+  width: 100%;
+}
 </style>

+ 10 - 59
src/components/tablePage.vue

@@ -39,26 +39,14 @@
         </template>
       </el-table-column>
     </el-table>
-    <div
-      class="tabs-pagation pagination"
-      v-if="table.data.length && table.total"
-    >
-      <!-- <div class="font" v-if="showTotal">共{{ table.total }}条记录</div> -->
-      <!-- <el-pagination class="tabone-pagination" background layout="prev, pager, next" :current-page="pageNum"
-            :pager-count="5" :page-size="5" :total="table.total" @current-change="changePage" /> -->
-      <el-pagination
-        :current-page="pageNum"
-        :page-size="pageSize"
-        :small="false"
-        :disabled="false"
-        :background="true"
-        :layout="layout"
-        :page-sizes="[10, 15, 20, 30, 50]"
-        :total="table.total"
-        @size-change="handleSizeChange"
-        @current-change="changePage"
-      />
-    </div>
+
+    <pagination
+      v-show="table.data.length && table.total > 0"
+      :total="table.total"
+      :page="pageNum"
+      :limit="pageSize"
+      @pagination="searchFun"
+    />
   </div>
 </template>
 <script>
@@ -112,8 +100,8 @@ export default {
     // 搜索
     searchFun() {
       this.$emit("currentChange", {
-        pageIndex: this.pageNum,
-        size: this.pageSize,
+        pageNum: this.pageNum,
+        pageSize: this.pageSize,
       });
     },
 
@@ -141,44 +129,7 @@ export default {
 .el-table {
   height: calc(100% - 50px);
 }
-
-.tabs-pagation {
-  position: absolute;
-  right: 30px;
-}
 </style>
 <style lang="scss">
-.cont-table {
-  .el-pager li {
-    background-color: transparent !important;
-    // border: 1px solid #3ea6fe;
-    border-radius: 5px;
-  }
-
-  .el-pager li.active {
-    color: #3ea6fe !important;
-  }
-
-  .el-pagination button {
-    color: #dbdbdb;
-  }
-
-  .el-pagination .btn-prev,
-  .el-pagination .btn-next {
-    background-color: transparent;
-    // border: 1px solid #ebebeb;
-    border-radius: 5px;
-    line-height: 28px;
-  }
-
-  .el-pagination .btn-prev {
-    padding-right: 5px;
-  }
-
-  .el-pagination .btn-prev:hover {
-    color: #1890ff;
-  }
-}
-
 // @import url(./tabs.scss);
 </style>

+ 4 - 0
src/main.js

@@ -28,6 +28,8 @@ import './permission' // permission control
 import { useDict } from '@/utils/dict'
 import { parseTime, resetForm, addDateRange, handleTree, selectDictLabel, selectDictLabels } from '@/utils/ruoyi'
 
+import customForm from "@/components/custom-form.vue";
+import tablePage from "@/components/tablePage.vue";
 // 分页组件
 import Pagination from '@/components/Pagination'
 // 自定义表格工具组件
@@ -63,6 +65,8 @@ app.component('ImageUpload', ImageUpload)
 app.component('ImagePreview', ImagePreview)
 app.component('RightToolbar', RightToolbar)
 app.component('Editor', Editor)
+app.component('customForm', customForm)
+app.component('tablePage', tablePage)
 
 app.use(router)
 app.use(store)

+ 3 - 3
src/views/pageCode/dataEntry/config.js

@@ -42,9 +42,9 @@ export const TableHeader = [
   { label: "图斑个数", prop: "dkmj", align: 'center' },
   { label: "监测面积(亩)", prop: "dkmj", align: 'center' },
   { label: "数据量", prop: "qlx", align: 'center' },
-  { label: "录入时间", prop: "createTime", align: 'center', },
-  { label: "上传失败数量", prop: "updateNumberCheckFull", align: 'center' },
-  { label: "上传成功数量", prop: "updateNumberCheckSuccess", align: 'center' },
+  { label: "录入时间", prop: "createTime", align: 'center', width: 200,},
+  { label: "重复数量", prop: "updateNumberCheckFull", align: 'center' },
+  { label: "成功数量", prop: "updateNumberCheckSuccess", align: 'center' },
   { label: "更新失败数量", prop: "updateNumberFull", align: 'center' },
   { label: "更新成功数量", prop: "updateNumberSuccess", align: 'center' },
   { label: "操作", slot: "action", width: 140, align: 'center' },

+ 33 - 120
src/views/pageCode/dataEntry/index.vue

@@ -72,88 +72,31 @@
       @selectChange="handleSelectionChange"
       @currentChange="getList"
     >
-      <!-- <template #state="{ row }">
-        </template> -->
-    </tablePage>
-    <el-table
-      v-loading="loading"
-      :data="dkdbList"
-      @selection-change="handleSelectionChange"
-    >
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="文件名称" align="center" prop="name" />
-      <el-table-column label="区县名称" align="center" prop="dkmj" />
-      <el-table-column label="图斑个数" align="center" prop="dkmj" />
-      <el-table-column label="监测面积(亩)" align="center" prop="dkmj" />
-      <el-table-column label="数据量" align="center" prop="qlx" />
-      <el-table-column label="录入时间" align="center" prop="createTime" />
-      <el-table-column
-        label="上传失败数量"
-        align="center"
-        prop="updateNumberCheckFull"
-      />
-      <el-table-column
-        label="上传成功数量"
-        align="center"
-        prop="updateNumberCheckSuccess"
-      />
-      <el-table-column
-        label="更新失败数量"
-        align="center"
-        prop="updateNumberFull"
-      />
-      <el-table-column
-        label="更新成功数量"
-        align="center"
-        prop="updateNumberSuccess"
-      />
-      <el-table-column
-        label="操作"
-        align="center"
-        class-name="small-padding fixed-width"
-      >
-        <template #default="scope">
-          <el-button link type="primary" @click="handleUpdate(scope.row)"
-            >查看任务图斑</el-button
-          >
-          <!-- <el-button
+      <template #action="{ row }">
+        <el-button link type="primary" @click="handleBrowse(row)"
+          >查看任务图斑</el-button
+        >
+        <!-- <el-button
             link
             type="primary"
             icon="Edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['dataentry:edit']"
             >修改</el-button
-          >
-          <el-button
-            link
-            type="primary"
-            icon="Delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['dataentry:remove']"
-            >删除</el-button
           > -->
-        </template>
-      </el-table-column>
-    </el-table>
-
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      :page="queryParams.pageNum"
-      :limit="queryParams.pageSize"
-      @pagination="getList"
-    />
+      </template>
+    </tablePage>
 
     <!-- 添加或修改地块基本信息(DKdb)对话框 -->
     <el-dialog :title="title" v-model="open" width="500px" append-to-body>
       <el-form ref="dkdbRef" :model="form" :rules="rules" label-width="100px">
-        <el-form-item label="数据内容:" prop="radio1">
-          <el-radio-group v-model="form.radio1">
+        <el-form-item label="数据内容:" prop="dataType">
+          <el-radio-group v-model="form.dataType">
             <el-radio label="1" size="large">监测图斑数据</el-radio>
             <el-radio label="2" size="large">业务研判数据</el-radio>
           </el-radio-group>
         </el-form-item>
-        <el-form-item label="数据内容:" prop="shppath">
+        <el-form-item label="选择数据:" prop="shppath">
           <fileUpload
             v-model="form.shppath"
             :limit="1"
@@ -174,17 +117,11 @@
 </template>
   
   <script setup name="Dkdb">
-import {
-  listDkdb,
-  getDkdb,
-  delDkdb,
-  adddb,
-  updateDkdb,
-} from "@/api/rsmonitoring/dataEntry";
-import customForm from "@/components/custom-form.vue";
-import tablePage from "@/components/tablePage.vue";
+import { listDkdb, adddb, updateDkdb } from "@/api/rsmonitoring/dataEntry";
 const { proxy } = getCurrentInstance();
 import { FormConfig, TableHeader } from "./config";
+const route = useRoute();
+const router = useRouter();
 
 const dkdbList = ref([]);
 const open = ref(false);
@@ -197,7 +134,7 @@ const total = ref(0);
 const title = ref("");
 
 const data = reactive({
-  form: { radio1: "1", shppath: "" },
+  form: { dataType: "1", shppath: "" },
   queryParams: {
     pageNum: 1,
     pageSize: 10,
@@ -210,9 +147,9 @@ const data = reactive({
 const { queryParams, form, rules } = toRefs(data);
 
 /** 查询地块基本信息(DKdb)列表 */
-function getList() {
+function getList(pages) {
   loading.value = true;
-  listDkdb(queryParams.value).then((response) => {
+  listDkdb({ ...queryParams.value, ...pages }).then((response) => {
     dkdbList.value = response.rows;
     total.value = response.total;
     loading.value = false;
@@ -228,7 +165,7 @@ function cancel() {
 // 表单重置
 function reset() {
   form.value = {
-    radio1: "1",
+    dataType: "1",
     shppath: "",
   };
   proxy.resetForm("dkdbRef");
@@ -260,53 +197,27 @@ function handleAdd() {
   title.value = "数据录入";
 }
 
-/** 修改按钮操作 */
-function handleUpdate(row) {
-  reset();
-  const _id = row.id || ids.value;
-  getDkdb(_id).then((response) => {
-    form.value = response.data;
-    open.value = true;
-    title.value = "修改地块基本信息(DKdb)";
-  });
-}
-
 /** 提交按钮 */
 function submitForm() {
   proxy.$refs["dkdbRef"].validate((valid) => {
     if (valid) {
-      if (form.value.id != null) {
-        updateDkdb(form.value).then((response) => {
-          proxy.$modal.msgSuccess("修改成功");
-          open.value = false;
-          getList();
-        });
-      } else {
-        adddb(form.value).then((response) => {
-          proxy.$modal.msgSuccess("新增成功");
-          open.value = false;
-          getList();
-        });
-      }
+      // if (form.value.id != null) {
+      //   updateDkdb(form.value).then((response) => {
+      //     proxy.$modal.msgSuccess("修改成功");
+      //     open.value = false;
+      //     getList();
+      //   });
+      // } else {
+      adddb(form.value).then((response) => {
+        proxy.$modal.msgSuccess("新增成功");
+        open.value = false;
+        getList();
+      });
+      // }
     }
   });
 }
 
-/** 删除按钮操作 */
-function handleDelete(row) {
-  const _ids = row.id || ids.value;
-  proxy.$modal
-    .confirm('是否确认删除地块基本信息(DKdb)编号为"' + _ids + '"的数据项?')
-    .then(function () {
-      return delDkdb(_ids);
-    })
-    .then(() => {
-      getList();
-      proxy.$modal.msgSuccess("删除成功");
-    })
-    .catch(() => {});
-}
-
 /** 导出按钮操作 */
 function handleExport() {
   proxy.download(
@@ -317,7 +228,9 @@ function handleExport() {
     `dkdb_${new Date().getTime()}.xlsx`
   );
 }
-
+function handleBrowse(row) {
+  router.push({ path: "/remote/gdjc", query: { id: row.id } });
+}
 getList();
 </script>
   

+ 5 - 2
src/views/remote/farmland/config.js

@@ -43,7 +43,10 @@ export const detailInfos = [
     { flag: 'label', value: '中心点纬度', span: 8 },
     { flag: 'value', value: 'bzb', span: 16 }//unit: '人',
   ]],
-
-
+]
+export const TableHeader = [
+  { label: "图斑编号", prop: "dkbh", align: 'center' },
+  { label: "监测面积(亩)", prop: "dkmj", align: 'center',width: 110, },
+  { label: "操作", slot: "action", width: 100, align: 'center' },
 ]
 

+ 42 - 74
src/views/remote/farmland/index.vue

@@ -17,7 +17,7 @@
     > -->
     <div class="jctbCon">
       <div class="tbTitle">
-        <span>监测图斑{{ newObj.name }}</span>
+        <span>图斑列表{{ newObj.name }}</span>
         <el-select
           v-model="domains"
           multiple
@@ -42,7 +42,7 @@
             @change="getTemplate()"
           >
           </el-input> -->
-        <div class="demo-input-suffix">
+        <!-- <div class="demo-input-suffix">
           监测编号:
           <el-input
             placeholder="请输入监测编号查询"
@@ -51,7 +51,7 @@
             @change="getTemplate()"
           >
           </el-input>
-        </div>
+        </div> -->
         <div class="demo-input-suffix" v-for="(ditem, i) in domains" :key="i">
           {{ ditem + ":" }}
           <el-input
@@ -64,41 +64,32 @@
           <el-button @click.prevent="removeDomain(ditem)">删除</el-button>
         </div>
       </div>
-      
-      <el-table
-        :data="tableData"
-        border
-        style="width: 100%"
+      <tablePage
+        :cloumn="TableHeader"
+        :table="{ total, data: tableData }"
+        :indexed="false"
+        :check="true"
+        ref="tableDialogRef"
+        @selectChange="handleSelectionChange"
+        @currentChange="getTemplate"
         @row-click="tableClick"
       >
-        <el-table-column
-          :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">
-          <template slot-scope="scope">
-            <el-button
-              size="mini"
-              type="text"
-              @click.stop="handleDetails(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="getTemplate"
-      />
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            @click.stop="handleDetails(scope.row)"
+            >定位</el-button
+          >
+          <el-button
+            size="mini"
+            type="text"
+            @click.stop="handleDetails(scope.row)"
+            >对比</el-button
+          >
+      
+        </template>
+      </tablePage>
     </div>
     <!-- </el-drawer> -->
     <el-dialog title="详细信息" :visible.sync="dialogVisible" width="30%">
@@ -129,7 +120,8 @@ import {
   getXqIdMap,
   getXqIdKey,
 } from "@/api/supervise/pcsj";
-import { detailInfos } from "./config";
+import { getDkdbList } from "@/api/rsmonitoring/dataEntry";
+import { TableHeader, detailInfos } from "./config";
 import "ol/ol.css";
 // import { get as getProjection, transform } from "ol/proj.js";
 import Map from "ol/Map";
@@ -163,16 +155,20 @@ export default {
   },
   data() {
     return {
-      options: [],
+      options: [
+        { label: "监测编号", value: 0 },
+        { label: "监测面积", value: 1 },
+        { label: "外业时间", value: 2 },
+      ],
       domains: [], //存储动态搜索列表
       // value: ["监测编号"], //下拉框选中的值
       maptype: "normal",
       total: 0,
       queryParams: {
-        监测编号: "", //监测编号
+        // 监测编号: "", //监测编号
         pageNum: 1,
         pageSize: 10,
-        pcsjid: this.$route.query.id,
+        uploadld: this.$route.query.id,
       },
       drawer: true,
       direction: "rtl",
@@ -190,7 +186,8 @@ export default {
       dialogVisible: false,
       infoObj: {},
       detailInfos: detailInfos,
-      templateList: [],
+      TableHeader:TableHeader,
+
       descriptionsList: [], //详情描述列表存储字段
       envelopegeomObj: {}, //用于存储进入页面飞入视角的对象
     };
@@ -264,40 +261,10 @@ export default {
     //动态获取设置的模版字段
     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,
-            });
-          }
-        });
-      });
+      this.options = [];
 
-      getXqListMap(this.queryParams).then((res) => {
+      getDkdbList(this.queryParams).then((res) => {
         console.log(res, "======");
         this.tableData = res.rows;
         this.total = res.total;
@@ -309,6 +276,7 @@ export default {
         this.addGeoJson("mapCon2");
       });
     },
+
     handleDownload() {
       const zipfile = this.newObj.proxypath + ".zip";
       window.open(`${zipfile}`);
@@ -508,7 +476,7 @@ export default {
   position: absolute;
   right: 20px;
   top: 0px;
-  width: 28vw;
+  width: 26vw;
   padding: 20px;
   .tbTitle {
     display: flex;

+ 9 - 2
src/views/system/role/index.vue

@@ -141,7 +141,7 @@
 
       <!-- 添加或修改角色配置对话框 -->
       <el-dialog :title="title" v-model="open" width="500px" append-to-body>
-         <el-form ref="roleRef" :model="form" :rules="rules" label-width="100px">
+         <el-form ref="roleRef" :model="form" :rules="rules" label-width="100px" class="roleForm">
             <el-form-item label="角色名称" prop="roleName">
                <el-input v-model="form.roleName" placeholder="请输入角色名称" />
             </el-form-item>
@@ -401,7 +401,7 @@ function getMenuTreeselect() {
 }
 function getAuditTreeselect() {
   getAuditflowTree().then(response => {
-    flowOptions.value = response.data;
+    flowOptions.value = response.data[0].children;
   });
 }
 
@@ -639,3 +639,10 @@ function cancelDataScope() {
 
 getList();
 </script>
+<style scoped>
+.roleForm{
+  max-height: 75vh;
+  overflow: auto;
+  overflow-x: hidden;
+}
+</style>